From: Will Deacon <will@kernel.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
arnd@arndb.de, Peter Zijlstra <peterz@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
PowerPC <linuxppc-dev@lists.ozlabs.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: linux-next: build failure on powerpc 8xx with 16k pages
Date: Thu, 4 Jun 2020 17:10:22 +0100 [thread overview]
Message-ID: <20200604161022.GD3650@willie-the-truck> (raw)
In-Reply-To: <1160ea76-729b-60a2-31d6-998c57b77858@csgroup.eu>
[+Arnd since I think we spoke about this on IRC once]
On Thu, Jun 04, 2020 at 02:35:14PM +0000, Christophe Leroy wrote:
> Now I get the same issue at
>
> CC mm/mincore.o
> In file included from ./include/asm-generic/bug.h:5:0,
> from ./arch/powerpc/include/asm/bug.h:109,
> from ./include/linux/bug.h:5,
> from ./include/linux/mmdebug.h:5,
> from ./include/linux/mm.h:9,
> from ./include/linux/pagemap.h:8,
> from mm/mincore.c:11:
> In function 'huge_ptep_get',
> inlined from 'mincore_hugetlb' at mm/mincore.c:35:20:
> ./include/linux/compiler.h:392:38: error: call to '__compiletime_assert_218'
> declared with attribute error: Unsupported access size for
> {READ,WRITE}_ONCE().
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^
> ./include/linux/compiler.h:373:4: note: in definition of macro
> '__compiletime_assert'
> prefix ## suffix(); \
> ^
> ./include/linux/compiler.h:392:2: note: in expansion of macro
> '_compiletime_assert'
> _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> ^
> ./include/linux/compiler.h:405:2: note: in expansion of macro
> 'compiletime_assert'
> compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
> ^
> ./include/linux/compiler.h:291:2: note: in expansion of macro
> 'compiletime_assert_rwonce_type'
> compiletime_assert_rwonce_type(x); \
> ^
> ./include/asm-generic/hugetlb.h:125:9: note: in expansion of macro
> 'READ_ONCE'
> return READ_ONCE(*ptep);
> ^
> make[2]: *** [mm/mincore.o] Error 1
>
> I guess for this one I have to implement platform specific huge_ptep_get()
Yeah, or bite the bullet and introduce proper accessors for all these
things:
pte_read()
pmd_read()
pud_read()
etc
with the default implementation pointing at READ_ONCE(), but allowing an
architecture override. It's a big job because mm/ would need repainting,
but it would have the benefit of being able to remove aggregate types from
READ_ONCE() entirely and using a special accessor just for the page-table
types.
That might also mean that we could have asm-generic versions of things
like ptep_get_and_clear() that work for architectures with hardware
update and need atomic rmw. But I'm getting ahead of myself.
Will
next prev parent reply other threads:[~2020-06-04 16:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 10:48 linux-next: build failure on powerpc 8xx with 16k pages Christophe Leroy
2020-06-04 11:17 ` Will Deacon
2020-06-04 12:00 ` Peter Zijlstra
2020-06-04 14:35 ` Christophe Leroy
2020-06-04 16:10 ` Will Deacon [this message]
2020-06-04 13:55 ` Christophe Leroy
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=20200604161022.GD3650@willie-the-truck \
--to=will@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
/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