[3/4] xen/domain: Remove #ifndef surrounding alloc_pirq_struct()
diff mbox series

Message ID 20200113213342.8206-4-julien@xen.org
State New
Headers show
Series
  • xen/x86: Rework inclusion between struct pirq and
Related show

Commit Message

Julien Grall Jan. 13, 2020, 9:33 p.m. UTC
From: Julien Grall <jgrall@amazon.com>

None of the supported architecture override alloc_pirq_struct() with
a macro. So remove the #ifdef surrounding the prototype.

Signed-off-by: Julien Grall <jgrall@amazon.com>
---
 xen/include/xen/domain.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Jan Beulich Jan. 14, 2020, 9:37 a.m. UTC | #1
On 13.01.2020 22:33, Julien Grall wrote:
> --- a/xen/include/xen/domain.h
> +++ b/xen/include/xen/domain.h
> @@ -41,9 +41,7 @@ struct vcpu *alloc_vcpu_struct(const struct domain *d);
>  void free_vcpu_struct(struct vcpu *v);
>  
>  /* Allocate/free a PIRQ structure. */
> -#ifndef alloc_pirq_struct
>  struct pirq *alloc_pirq_struct(struct domain *);
> -#endif
>  void free_pirq_struct(void *);

Is this really a helpful change. Back then ia64 had a #define for
this, and a future port may want to do so as well. Is there
anything actively problematic with leaving this untouched?

Jan
Julien Grall Jan. 14, 2020, 12:30 p.m. UTC | #2
Hi Jan,

On 14/01/2020 09:37, Jan Beulich wrote:
> On 13.01.2020 22:33, Julien Grall wrote:
>> --- a/xen/include/xen/domain.h
>> +++ b/xen/include/xen/domain.h
>> @@ -41,9 +41,7 @@ struct vcpu *alloc_vcpu_struct(const struct domain *d);
>>   void free_vcpu_struct(struct vcpu *v);
>>   
>>   /* Allocate/free a PIRQ structure. */
>> -#ifndef alloc_pirq_struct
>>   struct pirq *alloc_pirq_struct(struct domain *);
>> -#endif
>>   void free_pirq_struct(void *);
> 
> Is this really a helpful change. Back then ia64 had a #define for
> this, and a future port may want to do so as well.

I did notice it was used by ia64 but I am unconvinced this is going to 
be used in the future. Most likely because there is singler caller for 
alloc_pirq_struct() and this is not a hot path. So using a static 
inline/macro is not really a good solution here.

> Is there anything actively problematic with leaving this untouched?
Yes, this doesn't reduce the amount of unused code we have and will 
unlikely to be used in the future. If we really need it then we can 
re-introduce it.

Cheers,

Patch
diff mbox series

diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h
index 1cb205d977..89bf0a1721 100644
--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -41,9 +41,7 @@  struct vcpu *alloc_vcpu_struct(const struct domain *d);
 void free_vcpu_struct(struct vcpu *v);
 
 /* Allocate/free a PIRQ structure. */
-#ifndef alloc_pirq_struct
 struct pirq *alloc_pirq_struct(struct domain *);
-#endif
 void free_pirq_struct(void *);
 
 /*