LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] m68k: Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, etc.
@ 2021-07-21 10:43 Wende Tan
2021-07-26 9:23 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Wende Tan @ 2021-07-21 10:43 UTC (permalink / raw)
To: geert, linux-m68k; +Cc: Wende Tan, linux-kernel, lkp
Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, `PTRS_PER_PMD`,
and `__PAGETABLE_PMD_FOLDED` when PGTABLE_LEVELS == 2 (i.e. SUN3 ||
COLDFIRE). They have already been defined in
`asm-generic/pgtable-nopmd.h`.
See also https://lore.kernel.org/lkml/202107201907.lqC6B3dF-lkp@intel.com/#t
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Wende Tan <twd2.me@gmail.com>
---
arch/m68k/include/asm/pgtable_mm.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h
index 143ba7de9bda..51653e8216a7 100644
--- a/arch/m68k/include/asm/pgtable_mm.h
+++ b/arch/m68k/include/asm/pgtable_mm.h
@@ -37,9 +37,9 @@
/* PMD_SHIFT determines the size of the area a second-level page table can map */
#if CONFIG_PGTABLE_LEVELS == 3
#define PMD_SHIFT 18
-#endif
#define PMD_SIZE (1UL << PMD_SHIFT)
#define PMD_MASK (~(PMD_SIZE-1))
+#endif
/* PGDIR_SHIFT determines what a third-level page table entry can map */
#ifdef CONFIG_SUN3
@@ -58,13 +58,9 @@
*/
#ifdef CONFIG_SUN3
#define PTRS_PER_PTE 16
-#define __PAGETABLE_PMD_FOLDED 1
-#define PTRS_PER_PMD 1
#define PTRS_PER_PGD 2048
#elif defined(CONFIG_COLDFIRE)
#define PTRS_PER_PTE 512
-#define __PAGETABLE_PMD_FOLDED 1
-#define PTRS_PER_PMD 1
#define PTRS_PER_PGD 1024
#else
#define PTRS_PER_PTE 64
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] m68k: Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, etc.
2021-07-21 10:43 [PATCH] m68k: Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, etc Wende Tan
@ 2021-07-26 9:23 ` Geert Uytterhoeven
2021-07-26 14:14 ` twd2
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-07-26 9:23 UTC (permalink / raw)
To: Wende Tan; +Cc: linux-m68k, Linux Kernel Mailing List, kbuild test robot
Hi Wende,
On Wed, Jul 21, 2021 at 12:44 PM Wende Tan <twd2.me@gmail.com> wrote:
> Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, `PTRS_PER_PMD`,
> and `__PAGETABLE_PMD_FOLDED` when PGTABLE_LEVELS == 2 (i.e. SUN3 ||
> COLDFIRE). They have already been defined in
> `asm-generic/pgtable-nopmd.h`.
Thanks for your patch!
> See also https://lore.kernel.org/lkml/202107201907.lqC6B3dF-lkp@intel.com/#t
I'm a bit confused: is this a new issue introduced by the patch from
the above thread, or is this a pre-existing issue?
If the latter, do you know when it was introduced, and how to reproduce it?
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Wende Tan <twd2.me@gmail.com>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] m68k: Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, etc.
2021-07-26 9:23 ` Geert Uytterhoeven
@ 2021-07-26 14:14 ` twd2
0 siblings, 0 replies; 3+ messages in thread
From: twd2 @ 2021-07-26 14:14 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-m68k, Linux Kernel Mailing List, kbuild test robot
On 2021/7/26 17:23, Geert Uytterhoeven wrote:
> Hi Wende,
>
> On Wed, Jul 21, 2021 at 12:44 PM Wende Tan <twd2.me@gmail.com> wrote:
>> Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, `PTRS_PER_PMD`,
>> and `__PAGETABLE_PMD_FOLDED` when PGTABLE_LEVELS == 2 (i.e. SUN3 ||
>> COLDFIRE). They have already been defined in
>> `asm-generic/pgtable-nopmd.h`.
> Thanks for your patch!
>
>> See also https://lore.kernel.org/lkml/202107201907.lqC6B3dF-lkp@intel.com/#t
> I'm a bit confused: is this a new issue introduced by the patch from
> the above thread, or is this a pre-existing issue?
> If the latter, do you know when it was introduced, and how to reproduce it?
I think this is a pre-existing issue, introduced in
commit 60e50f34b13e ("m68k: mm: use pgtable-nopXd instead of 4level-fixup") .
This commit replaced the usage of `4level-fixup.h` in `pgtable_mm.h` to
`pgtable-nop*d.h` and removed the redundent definition of `PMD_SHIFT` but
forgot to clean up other macros like `PMD_SIZE` (it should be moved into
the `#if` condition) [1].
And, GCC will not complain until two definitions of a macro with the same
name differ (as the above thread changes `1UL` to `_UL(1)`), hiding this
issue.
[1] https://github.com/torvalds/linux/commit/60e50f34b13e9e40763be12aa55f2144d8da514c#diff-9ec45948bad35c0e35d0c2d301a2a643336ff8fe2ee8ea3fff19d8f0bb948a46L34
Thanks.
Wende
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Wende Tan <twd2.me@gmail.com>
> Gr{oetje,eeting}s,
>
> Geert
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-26 14:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 10:43 [PATCH] m68k: Remove redefinitions of `PMD_SIZE`, `PMD_MASK`, etc Wende Tan
2021-07-26 9:23 ` Geert Uytterhoeven
2021-07-26 14:14 ` twd2
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).