Message ID | 20200113213342.8206-4-julien@xen.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen/x86: Rework inclusion between struct pirq and | expand |
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
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,
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 *); /*