* [PATCH] hexagon: remove code to handle nonexistent CONFIG_PAGE_SIZE_1MB
@ 2026-06-10 22:23 Ethan Nelson-Moore
2026-06-11 7:36 ` David Hildenbrand (Arm)
0 siblings, 1 reply; 2+ messages in thread
From: Ethan Nelson-Moore @ 2026-06-10 22:23 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Vlastimil Babka (SUSE),
Ankur Arora, Lorenzo Stoakes (Oracle), Ethan Nelson-Moore,
Magnus Lindholm, Andreas Larsson, Liam R. Howlett, Dinh Nguyen,
Mike Rapoport (Microsoft), linux-hexagon
Cc: Brian Cain, Dave Hansen, Helge Deller
Two Hexagon memory management headers contain code to handle
CONFIG_PAGE_SIZE_1MB, which has never existed in the kernel. Remove
this dead code.
Discovered while searching for CONFIG_* symbols referenced in code but
not defined in any Kconfig file.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
arch/hexagon/include/asm/page.h | 4 ----
arch/hexagon/include/asm/pgtable.h | 4 ----
2 files changed, 8 deletions(-)
diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h
index 6d82572a7f21..6eac99438e3f 100644
--- a/arch/hexagon/include/asm/page.h
+++ b/arch/hexagon/include/asm/page.h
@@ -28,10 +28,6 @@
#define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_256KB
#endif
-#ifdef CONFIG_PAGE_SIZE_1MB
-#define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_1MB
-#endif
-
/*
* These should be defined in hugetlb.h, but apparently not.
* "Huge" for us should be 4MB or 16MB, which are both represented
diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h
index 27b269e2870d..0c62df423a1d 100644
--- a/arch/hexagon/include/asm/pgtable.h
+++ b/arch/hexagon/include/asm/pgtable.h
@@ -89,10 +89,6 @@
#define PTRS_PER_PTE 16
#endif
-#ifdef CONFIG_PAGE_SIZE_1MB
-#define PTRS_PER_PTE 4
-#endif
-
/* Any bigger and the PTE disappears. */
#define pgd_ERROR(e) \
printk(KERN_ERR "%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__,\
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hexagon: remove code to handle nonexistent CONFIG_PAGE_SIZE_1MB
2026-06-10 22:23 [PATCH] hexagon: remove code to handle nonexistent CONFIG_PAGE_SIZE_1MB Ethan Nelson-Moore
@ 2026-06-11 7:36 ` David Hildenbrand (Arm)
0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand (Arm) @ 2026-06-11 7:36 UTC (permalink / raw)
To: Ethan Nelson-Moore, Andrew Morton, Vlastimil Babka (SUSE),
Ankur Arora, Lorenzo Stoakes (Oracle), Magnus Lindholm,
Andreas Larsson, Liam R. Howlett, Dinh Nguyen,
Mike Rapoport (Microsoft), linux-hexagon
Cc: Brian Cain, Dave Hansen, Helge Deller
On 6/11/26 00:23, Ethan Nelson-Moore wrote:
> Two Hexagon memory management headers contain code to handle
> CONFIG_PAGE_SIZE_1MB, which has never existed in the kernel. Remove
> this dead code.
>
> Discovered while searching for CONFIG_* symbols referenced in code but
> not defined in any Kconfig file.
>
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---
> arch/hexagon/include/asm/page.h | 4 ----
> arch/hexagon/include/asm/pgtable.h | 4 ----
> 2 files changed, 8 deletions(-)
>
> diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h
> index 6d82572a7f21..6eac99438e3f 100644
> --- a/arch/hexagon/include/asm/page.h
> +++ b/arch/hexagon/include/asm/page.h
> @@ -28,10 +28,6 @@
> #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_256KB
> #endif
>
> -#ifdef CONFIG_PAGE_SIZE_1MB
> -#define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_1MB
> -#endif
> -
Heh, I stumbled over that myself at some point and was like "wtf, how can that
even work" :)
$ git grep PAGE_SIZE_1MB | grep Kconfig
arch/sh/mm/Kconfig: default HUGETLB_PAGE_SIZE_1MB if PAGE_SIZE_64KB
arch/sh/mm/Kconfig:config HUGETLB_PAGE_SIZE_1MB
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-11 7:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 22:23 [PATCH] hexagon: remove code to handle nonexistent CONFIG_PAGE_SIZE_1MB Ethan Nelson-Moore
2026-06-11 7:36 ` David Hildenbrand (Arm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox