Skip to contentSkip to conversation

sh: mm: Remove checks for nonexistent CONFIG_CPU_SUBTYPE_ST40

PATCH Superseded Ethan Nelson-Moore 2 participants 2 messages Jun 13 – Jun 15 SuperH

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: mm: Remove checks for nonexistent CONFIG_CPU_SUBTYPE_ST40

The CONFIG_CPU_SUBTYPE_ST40 option was removed in commit f96691872439 ("sh: Kill off the remaining ST40 cruft."), but a check for it remained in arch/sh/include/cpu-sh4/cpu/mmu_context.h. Remove this dead code. Also remove the definition of and references to the MMUCR_SE bit mask, because it is defined as zero on all CPUs other than ST40.

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

---
 arch/sh/include/cpu-sh4/cpu/mmu_context.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
arch/sh/include/cpu-sh4/cpu/mmu_context.h +1 -7
index 421b56d5c595..4a6148e1ea84 100644
@@ -43,12 +43,6 @@
 #define MMUCR_URC		0x0000FC00
 #define MMUCR_URC_SHIFT		10
 
-#if defined(CONFIG_32BIT) && defined(CONFIG_CPU_SUBTYPE_ST40)
-#define MMUCR_SE		(1 << 4)
-#else
-#define MMUCR_SE		(0)
-#endif
-
 #ifdef CONFIG_CPU_HAS_PTEAEX
 #define MMUCR_AEX		(1 << 6)
 #else
@@ -69,7 +63,7 @@
 
 #define MMU_NTLB_ENTRIES	64
 #define MMU_CONTROL_INIT	(MMUCR_AT | MMUCR_TI | MMUCR_SQMD | \
-				 MMUCR_ME | MMUCR_SE | MMUCR_AEX)
+				 MMUCR_ME | MMUCR_AEX)
 
 #define TRA	0xff000020
 #define EXPEVT	0xff000024
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Ethan,

Thanks for your patch!

Quoted 2 lines · Ethan Nelson-Moore

The CONFIG_CPU_SUBTYPE_ST40 option was removed in commit f96691872439 ("sh: Kill off the remaining ST40 cruft."), but a check for it remained

s/remained/was added later/

The ST40-removal predates commit d02b08f6e8b184ff ("sh: Clean up places that make 29-bit physical assumptions."), which introduced the check.

Quoted 8 lines

in arch/sh/include/cpu-sh4/cpu/mmu_context.h. Remove this dead code. Also remove the definition of and references to the MMUCR_SE bit mask, because it is defined as zero on all CPUs other than ST40.

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

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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