Re: [PATCH] mark read_crX() asm code as volatile

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nick Piggin <nickpiggin@...>
Cc: H. Peter Anvin <hpa@...>, Chuck Ebbert <cebbert@...>, Arjan van de Ven <arjan@...>, Kirill Korotaev <dev@...>, Andrew Morton <akpm@...>, Linux Kernel Mailing List <linux-kernel@...>, <devel@...>
Date: Wednesday, October 3, 2007 - 4:45 am

> 

When it has no m (or equivalent like g) constrained argument 
and no memory clobber.
 

You add any of the above.


You could do a memory clobber, but it would be heavier than the volatile
because the memory clobber clobbers all cached variables. volatile essentially 
just says "don't remove; has side effects". Normally gcc does that automatically
for something without outputs, but this one has.

Besides a CRx access does not actually clobber memory.

-Andi
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] mark read_crX() asm code as volatile, Kirill Korotaev, (Tue Oct 2, 10:08 am)
Re: [PATCH] mark read_crX() asm code as volatile, Arjan van de Ven, (Tue Oct 2, 11:28 am)
Re: [PATCH] mark read_crX() asm code as volatile, Kirill Korotaev, (Wed Oct 3, 4:25 am)
Re: [PATCH] mark read_crX() asm code as volatile, H. Peter Anvin, (Tue Oct 2, 3:21 pm)
Re: [PATCH] mark read_crX() asm code as volatile, Chuck Ebbert, (Tue Oct 2, 2:27 pm)
Re: [PATCH] mark read_crX() asm code as volatile, Nick Piggin, (Tue Oct 2, 8:14 am)
Re: [PATCH] mark read_crX() asm code as volatile, H. Peter Anvin, (Wed Oct 3, 2:18 am)
Re: [PATCH] mark read_crX() asm code as volatile, Nick Piggin, (Tue Oct 2, 11:49 am)
Re: [PATCH] mark read_crX() asm code as volatile, Andi Kleen, (Wed Oct 3, 4:45 am)
Re: [PATCH] mark read_crX() asm code as volatile, Andi Kleen, (Tue Oct 2, 10:17 am)