Skip to contentSkip to conversation

mips: drop ranges for definition of ARCH_FORCE_MAX_ORDER

PATCH Applied Mike Rapoport 4 participants 5 messages Mar 22, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: drop ranges for definition of ARCH_FORCE_MAX_ORDER

From: "Mike Rapoport (IBM)" <[email protected]>

MIPS defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages.

Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults.

Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.

---
 arch/mips/Kconfig | 4 ----
 1 file changed, 4 deletions(-)
arch/mips/Kconfig +0 -4
index 3e8b765b8c7b..a0f6e9d0a561 100644
@@ -2137,13 +2137,9 @@ endchoice
 
 config ARCH_FORCE_MAX_ORDER
 	int "Maximum zone order"
-	range 13 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
 	default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
-	range 12 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
 	default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
-	range 11 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
 	default "11" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
-	range 0 63
 	default "10"
 	help
 	  The kernel memory allocator divides physically contiguous memory
Signature · 1 line
2.35.1
#1 lore raw

Forgot to mention that the patch is on top of akpm/mm-unstable

Quoted 38 lines · Mike Rapoport

From: "Mike Rapoport (IBM)" <[email protected]>

MIPS defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages.

Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults.

Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.

---
 arch/mips/Kconfig | 4 ----
 1 file changed, 4 deletions(-)
arch/mips/Kconfig +0 -4
index 3e8b765b8c7b..a0f6e9d0a561 100644
@@ -2137,13 +2137,9 @@ endchoice
 
 config ARCH_FORCE_MAX_ORDER
 	int "Maximum zone order"
-	range 13 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
 	default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
-	range 12 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
 	default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
-	range 11 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
 	default "11" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
-	range 0 63
 	default "10"
 	help
 	  The kernel memory allocator divides physically contiguous memory
Signature · 1 line
2.35.1
Signature · 2 lines
Sincerely yours,
Mike.
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Mike Rapoport
Quoted 37 lines · Mike Rapoport

From: "Mike Rapoport (IBM)" <[email protected]>

MIPS defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages.

Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults.

Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.

---
 arch/mips/Kconfig | 4 ----
 1 file changed, 4 deletions(-)
arch/mips/Kconfig +0 -4
index 3e8b765b8c7b..a0f6e9d0a561 100644
@@ -2137,13 +2137,9 @@ endchoice
 
 config ARCH_FORCE_MAX_ORDER
 	int "Maximum zone order"
-	range 13 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
 	default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
-	range 12 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
 	default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
-	range 11 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
 	default "11" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
-	range 0 63
 	default "10"
 	help
 	  The kernel memory allocator divides physically contiguous memory
Signature · 1 line
2.35.1

Thank you for cleaning this up.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
Acked-by on v1 1/1
#3 lore raw
In reply to Mike Rapoport
Quoted 6 lines · Mike Rapoport

From: "Mike Rapoport (IBM)" <[email protected]>

MIPS defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages.

Quoted 7 lines

Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults.

Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.

Signature · 1 line
  Kiryl Shutsemau / Kirill A. Shutemov
Reviewed-by on v1 1/1
#4 lore raw
In reply to Mike Rapoport
Quoted 25 lines · Mike Rapoport

From: "Mike Rapoport (IBM)" <[email protected]>

MIPS defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages.

Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults.

Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges.

---
  arch/mips/Kconfig | 4 ----
  1 file changed, 4 deletions(-)
arch/mips/Kconfig +0 -0
index 3e8b765b8c7b..a0f6e9d0a561 100644
@@ -2137,13 +2137,9 @@ endchoice
 
  config ARCH_FORCE_MAX_ORDER
  	int "Maximum zone order"

arch/mips/Kconfig endchoice · line 2145

Quoted 10 lines
arch/mips/Kconfig +0 -4
-	range 13 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
  	default "13" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_64KB
-	range 12 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
  	default "12" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_32KB
-	range 11 63 if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
  	default "11" if MIPS_HUGE_TLB_SUPPORT && PAGE_SIZE_16KB
-	range 0 63
  	default "10"
  	help
  	  The kernel memory allocator divides physically contiguous memory
Signature · 3 lines
Thanks,

David / dhildenb