On Wed, 2013-06-05 at 16:41 +0100, David Laight wrote:
> >     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.


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to