Re: [PATCH] hexagon: remove code to handle nonexistent CONFIG_PAGE_SIZE_1MB

"David Hildenbrand (Arm)" <[email protected]> Thu, 11 Jun 2026 09:36:58 +0200
Newsgroups org.kernel.vger.linux-hexagon
Message-ID <[email protected]>
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 <[email protected]>
> ---
>  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) <[email protected]>

-- 
Cheers,

David