>>> On 23.11.18 at 17:52, <[email protected]> wrote: > --- a/xen/include/asm-x86/system.h > +++ b/xen/include/asm-x86/system.h > @@ -253,14 +253,18 @@ static inline unsigned long > array_index_mask_nospec(unsigned long index, > /* used when interrupts are already enabled or to shutdown the processor */ > #define halt() asm volatile ( "hlt" : : : "memory" ) > > -#define local_save_flags(x) \ > -({ \ > - BUILD_BUG_ON(sizeof(x) != sizeof(long)); \ > - asm volatile ( "pushf" __OS " ; pop" __OS " %0" : "=g" (x)); \ > -}) > +static inline unsigned long local_save_flags(void) > +{ > + unsigned long flags; > + > + asm volatile ( "pushf; pop %0;" : "=g" (flags) ); > + > + return flags; > +}
Provided this doesn't defeat the current possibility of the compiler POP-ing directly into a stack variable Reviewed-by: Jan Beulich <[email protected]> Apart from this I'm a little puzzled by the uppercasing of SAVE in the Arm asm() comments, but I'll leave that to the Arm maintainers. Jan _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
