Thread (30 messages) 30 messages, 5 authors, 2013-06-19

Re: [PATCH -V10 10/15] powerpc: Prevent gcc to re-read the pagetables

flat view

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2013-06-05 22:39:49

On Wed, 2013-06-05 at 16:41 +0100, David Laight wrote:
quoted
 	ptep = pte_offset_kernel(&pmd, addr);
 	do {
-		pte_t pte = *ptep;
+		pte_t pte = ACCESS_ONCE(*ptep);
Why not just define ptep as a 'pointer to volatile'?
ACCESS_ONCE is the proper way to do it in Linux. pointer to volatile
can have ... interesting semantics.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help