[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/4] xen/arch: Switch local_irq_save() to being a static inline helper
>>> On 23.11.18 at 17:52, <andrew.cooper3@xxxxxxxxxx> wrote: > ... rather than a macro which writes to its parameter by name. Take the > opportunity to fold the assignment into the flags declaraion where > appropriate. Do you really? Why not ... > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -401,7 +401,7 @@ void *map_domain_page(mfn_t mfn) > lpae_t pte; > int i, slot; > > - local_irq_save(flags); > + flags = local_irq_save(); ... here, for example? There are a few more cases, I think. > --- a/xen/include/asm-x86/system.h > +++ b/xen/include/asm-x86/system.h > @@ -262,11 +262,15 @@ static inline unsigned long local_save_flags(void) > return flags; > } > > -#define local_irq_save(x) \ > -({ \ > - x = local_save_flags(); \ > - local_irq_disable(); \ > -}) > +static inline unsigned long local_irq_save(void) > +{ > + unsigned long flags = local_save_flags(); > + > + local_irq_disable(); > + > + return flags; > +} Do we really need/want to retain this as a per-arch construct? Since you touch all instances anyway, do we really want to stick to its misleading name? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |