|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] x86/atomic: Improvements and simplifications to assembly constraints
On 08.08.2019 17:29, Andrew Cooper wrote: In principle I would give this my R-b, but ... The reason the volatile cast in __cmpxchg_user() can't be dropped is because without it, the compiler uses a stack copy rather than the in-memory copy, which ends up tripping: /* Allowed to change in Accessed/Dirty flags only. */ BUG_ON((t ^ old) & ~(intpte_t)(_PAGE_ACCESSED|_PAGE_DIRTY)); ... this is concerning me, seeing that elsewhere you eliminate casts to pointers to volatile (and often you actively cast away the attribute from the function parameters), which was one of the effects of __xg(). Therefore only with "volatile" restored everywhere where it was in effect before Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Alternatively justification for the removal would need to be added to the description. As to the description: The dropping of the semicolons after the LOCK prefixes would perhaps be worth another bullet point? It's not really just a "misc style change" imo. 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 |