* [PATCH 5/6] mm/gup: Replace ACCESS_ONCE with READ_ONCE for STRICT_MM_TYPECHECKS [not found] <1427274719-25890-1-git-send-email-mpe@ellerman.id.au> @ 2015-03-25 9:11 ` Michael Ellerman 2015-03-25 9:18 ` Christian Borntraeger 0 siblings, 1 reply; 3+ messages in thread From: Michael Ellerman @ 2015-03-25 9:11 UTC (permalink / raw) To: linuxppc-dev Cc: linux-kernel, aneesh.kumar, akpm, kirill.shutemov, aarcange, borntraeger, steve.capper, linux-mm If STRICT_MM_TYPECHECKS is enabled the generic gup code fails to build because we are using ACCESS_ONCE on non-scalar types. Convert all uses to READ_ONCE. Cc: akpm@linux-foundation.org Cc: kirill.shutemov@linux.intel.com Cc: aarcange@redhat.com Cc: borntraeger@de.ibm.com Cc: steve.capper@linaro.org Cc: linux-mm@kvack.org Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> --- mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index a6e24e246f86..120c3adc843c 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -901,7 +901,7 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end, * * for an example see gup_get_pte in arch/x86/mm/gup.c */ - pte_t pte = ACCESS_ONCE(*ptep); + pte_t pte = READ_ONCE(*ptep); struct page *page; /* @@ -1191,7 +1191,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, local_irq_save(flags); pgdp = pgd_offset(mm, addr); do { - pgd_t pgd = ACCESS_ONCE(*pgdp); + pgd_t pgd = READ_ONCE(*pgdp); next = pgd_addr_end(addr, end); if (pgd_none(pgd)) -- 2.1.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/6] mm/gup: Replace ACCESS_ONCE with READ_ONCE for STRICT_MM_TYPECHECKS 2015-03-25 9:11 ` [PATCH 5/6] mm/gup: Replace ACCESS_ONCE with READ_ONCE for STRICT_MM_TYPECHECKS Michael Ellerman @ 2015-03-25 9:18 ` Christian Borntraeger 2015-03-25 9:24 ` Michael Ellerman 0 siblings, 1 reply; 3+ messages in thread From: Christian Borntraeger @ 2015-03-25 9:18 UTC (permalink / raw) To: Michael Ellerman, linuxppc-dev Cc: linux-kernel, aneesh.kumar, akpm, kirill.shutemov, aarcange, steve.capper, linux-mm, Jason Low, Linus Torvalds Am 25.03.2015 um 10:11 schrieb Michael Ellerman: > If STRICT_MM_TYPECHECKS is enabled the generic gup code fails to build > because we are using ACCESS_ONCE on non-scalar types. > > Convert all uses to READ_ONCE. There is a similar patch from Jason Low in Andrews patch. If that happens in 4.0-rc, we probably want to merge this before 4.0. > > Cc: akpm@linux-foundation.org > Cc: kirill.shutemov@linux.intel.com > Cc: aarcange@redhat.com > Cc: borntraeger@de.ibm.com > Cc: steve.capper@linaro.org > Cc: linux-mm@kvack.org > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > --- > mm/gup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/gup.c b/mm/gup.c > index a6e24e246f86..120c3adc843c 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -901,7 +901,7 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end, > * > * for an example see gup_get_pte in arch/x86/mm/gup.c > */ > - pte_t pte = ACCESS_ONCE(*ptep); > + pte_t pte = READ_ONCE(*ptep); > struct page *page; > > /* > @@ -1191,7 +1191,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, > local_irq_save(flags); > pgdp = pgd_offset(mm, addr); > do { > - pgd_t pgd = ACCESS_ONCE(*pgdp); > + pgd_t pgd = READ_ONCE(*pgdp); > > next = pgd_addr_end(addr, end); > if (pgd_none(pgd)) > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/6] mm/gup: Replace ACCESS_ONCE with READ_ONCE for STRICT_MM_TYPECHECKS 2015-03-25 9:18 ` Christian Borntraeger @ 2015-03-25 9:24 ` Michael Ellerman 0 siblings, 0 replies; 3+ messages in thread From: Michael Ellerman @ 2015-03-25 9:24 UTC (permalink / raw) To: Christian Borntraeger Cc: linuxppc-dev, linux-kernel, aneesh.kumar, akpm, kirill.shutemov, aarcange, steve.capper, linux-mm, Jason Low, Linus Torvalds On Wed, 2015-03-25 at 10:18 +0100, Christian Borntraeger wrote: > Am 25.03.2015 um 10:11 schrieb Michael Ellerman: > > If STRICT_MM_TYPECHECKS is enabled the generic gup code fails to build > > because we are using ACCESS_ONCE on non-scalar types. > > > > Convert all uses to READ_ONCE. > > There is a similar patch from Jason Low in Andrews patch. Ah sorry, I didn't think to check. > If that happens in 4.0-rc, we probably want to merge this before 4.0. My series can wait, it's not urgent. So I'll plan to merge mine once Andrew's tree has gone into Linus' tree for 4.1. cheers -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-25 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1427274719-25890-1-git-send-email-mpe@ellerman.id.au>
2015-03-25 9:11 ` [PATCH 5/6] mm/gup: Replace ACCESS_ONCE with READ_ONCE for STRICT_MM_TYPECHECKS Michael Ellerman
2015-03-25 9:18 ` Christian Borntraeger
2015-03-25 9:24 ` Michael Ellerman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox