[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221221135430.GA1510470@roeck-us.net>
Date: Wed, 21 Dec 2022 05:54:30 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, willy@...radead.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, aarcange@...hat.com,
kirill.shutemov@...ux.intel.com, jroedel@...e.de, ubizjak@...il.com
Subject: Re: [PATCH 03/13] sh/mm: Make pmd_t similar to pte_t
On Sat, Oct 22, 2022 at 01:14:06PM +0200, Peter Zijlstra wrote:
> Just like 64bit pte_t, have a low/high split in pmd_t.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
This patch causes a compile error when trying to build sh:defconfig.
In function 'follow_pmd_mask',
inlined from 'follow_pud_mask' at mm/gup.c:735:9,
inlined from 'follow_p4d_mask' at mm/gup.c:752:9,
inlined from 'follow_page_mask' at mm/gup.c:809:9:
include/linux/compiler_types.h:358:45: error: call to '__compiletime_assert_263' declared with attribute error: Unsupported access size for {READ,WRITE}_ONCE().
...
mm/gup.c:661:18: note: in expansion of macro 'READ_ONCE'
661 | pmdval = READ_ONCE(*pmd);
> ---
> arch/sh/include/asm/pgtable-3level.h | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> --- a/arch/sh/include/asm/pgtable-3level.h
> +++ b/arch/sh/include/asm/pgtable-3level.h
> @@ -28,9 +28,15 @@
> #define pmd_ERROR(e) \
> printk("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
>
> -typedef struct { unsigned long long pmd; } pmd_t;
> +typedef struct {
Was this supposed to be "union" ?
Guenter
> + struct {
> + unsigned long pmd_low;
> + unsigned long pmd_high;
> + };
> + unsigned long long pmd;
> +} pmd_t;
> #define pmd_val(x) ((x).pmd)
> -#define __pmd(x) ((pmd_t) { (x) } )
> +#define __pmd(x) ((pmd_t) { .pmd = (x) } )
>
> static inline pmd_t *pud_pgtable(pud_t pud)
> {
>
>
Powered by blists - more mailing lists