Skip to contentSkip to conversation

hexagon: remove code to handle nonexistent CONFIG_PAGE_SIZE_1MB

PATCH In review Ethan Nelson-Moore 3 participants 3 messages Jun 10 – Jul 1 Qualcomm hexagon architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hexagon: remove code to handle nonexistent CONFIG_PAGE_SIZE_1MB

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.

---
 arch/hexagon/include/asm/page.h    | 4 ----
 arch/hexagon/include/asm/pgtable.h | 4 ----
 2 files changed, 8 deletions(-)
arch/hexagon/include/asm/page.h +0 -4
index 6d82572a7f21..6eac99438e3f 100644
@@ -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
arch/hexagon/include/asm/pgtable.h +0 -4
index 27b269e2870d..0c62df423a1d 100644
@@ -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__,\
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Ethan Nelson-Moore

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.

---
 arch/hexagon/include/asm/page.h    | 4 ----
 arch/hexagon/include/asm/pgtable.h | 4 ----
 2 files changed, 8 deletions(-)
arch/hexagon/include/asm/page.h +0 -0
index 6d82572a7f21..6eac99438e3f 100644

arch/hexagon/include/asm/page.h line 34

Quoted 7 lines
arch/hexagon/include/asm/page.h +0 -4
@@ -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
Signature · 3 lines
Cheers,

David
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ethan Nelson-Moore
Quoted 4 lines · Ethan Nelson-Moore

Two Hexagon memory management headers contain code to handle CONFIG_PAGE_SIZE_1MB, which has never existed in the kernel. Remove this dead code.

Quoted 8 lines

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---
  arch/hexagon/include/asm/page.h    | 4 ----
  arch/hexagon/include/asm/pgtable.h | 4 ----
  2 files changed, 8 deletions(-)