From: Andrew Morton <akpm@linux-foundation.org>
To: akpm@linux-foundation.org, christophe.leroy@csgroup.eu,
linux-mm@kvack.org, mm-commits@vger.kernel.org,
steven.price@arm.com, torvalds@linux-foundation.org
Subject: [patch 10/12] mm: ptdump: fix build failure
Date: Fri, 16 Apr 2021 15:46:20 -0700 [thread overview]
Message-ID: <20210416224620.vDDxhwPBO%akpm@linux-foundation.org> (raw)
In-Reply-To: <20210416154523.3f9794326e8e1db549873cf8@linux-foundation.org>
From: Christophe Leroy <christophe.leroy@csgroup.eu>
Subject: mm: ptdump: fix build failure
CC mm/ptdump.o
In file included from <command-line>:
mm/ptdump.c: In function 'ptdump_pte_entry':
././include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_207' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE().
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
././include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
././include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
./include/asm-generic/rwonce.h:36:2: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
./include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/ptdump.c:114:14: note: in expansion of macro 'READ_ONCE'
114 | pte_t val = READ_ONCE(*pte);
| ^~~~~~~~~
make[2]: *** [mm/ptdump.o] Error 1
READ_ONCE() cannot be used for reading PTEs. Use ptep_get() instead. See
commit 481e980a7c19 ("mm: Allow arches to provide ptep_get()") and commit
c0e1c8c22beb ("powerpc/8xx: Provide ptep_get() with 16k pages") for
details.
Link: https://lkml.kernel.org/r/912b349e2bcaa88939904815ca0af945740c6bd4.1618478922.git.christophe.leroy@csgroup.eu
Fixes: 30d621f6723b ("mm: add generic ptdump")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Steven Price <steven.price@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/ptdump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/ptdump.c~mm-ptdump-fix-build-failure
+++ a/mm/ptdump.c
@@ -111,7 +111,7 @@ static int ptdump_pte_entry(pte_t *pte,
unsigned long next, struct mm_walk *walk)
{
struct ptdump_state *st = walk->private;
- pte_t val = READ_ONCE(*pte);
+ pte_t val = ptep_get(pte);
if (st->effective_prot)
st->effective_prot(st, 4, pte_val(val));
_
next prev parent reply other threads:[~2021-04-16 22:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 22:45 incoming Andrew Morton
2021-04-16 22:45 ` [patch 01/12] mm: eliminate "expecting prototype" kernel-doc warnings Andrew Morton
2021-04-16 22:45 ` [patch 02/12] kasan: fix hwasan build for gcc Andrew Morton
2021-04-16 22:46 ` [patch 03/12] kasan: remove redundant config option Andrew Morton
2021-04-16 22:46 ` [patch 04/12] csky: change a Kconfig symbol name to fix e1000 build error Andrew Morton
2021-04-17 0:45 ` Guo Ren
2021-04-16 22:46 ` [patch 05/12] ia64: remove duplicate entries in generic_defconfig Andrew Morton
2021-04-16 22:46 ` [patch 06/12] ia64: fix discontig.c section mismatches Andrew Morton
2021-04-16 22:46 ` [patch 07/12] ia64: tools: remove inclusion of ia64-specific version of errno.h header Andrew Morton
2021-04-16 22:46 ` [patch 08/12] ia64: tools: remove duplicate definition of ia64_mf() on ia64 Andrew Morton
2021-04-16 22:46 ` [patch 09/12] mm/mapping_dirty_helpers: guard hugepage pud's usage Andrew Morton
2021-04-16 22:46 ` Andrew Morton [this message]
2021-04-16 22:46 ` [patch 11/12] gcov: clang: fix clang-11+ build Andrew Morton
2021-04-19 21:36 ` Nathan Chancellor
2021-04-19 22:12 ` Linus Torvalds
2021-04-20 14:12 ` Sasha Levin
2021-04-16 22:46 ` [patch 12/12] lib: remove "expecting prototype" kernel-doc warnings Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210416224620.vDDxhwPBO%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--cc=steven.price@arm.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).