MIPS: Octeon: drop dependency on CONFIG_HOLES_IN_ZONE
PATCH 1/1 MIPS: Octeon: drop dependency on CONFIG_HOLES_IN_ZONE
From: Mike Rapoport <[email protected]>
CAVIUM_OCTEON_SOC configuration selects HOLES_IN_ZONE option to cope with memory crashes that were happening in 2011.
This option effectively aliases pfn_valid_within() to pfn_valid() when enabled and hardwires it to 1 when disabled. The check for pfn_valid_within() is only relevant in case the memory map may have holes or undefined struct page instances inside MAX_ORDER chunks.
Since 2011 memory management initialization in general and memory map initialization particularly became much more robust so the check for pfn_valid_within() is not required on Octeon even despite its, hmm, unusual memory setup.
Remove the selection of HOLES_IN_ZONE by CAVIUM_OCTEON_SOC and drop the HOLES_IN_ZONE configuration option entirely as Octeon was the only MIPS platform to use it.
---
Hi,
I've tried to find why Octeon needed CONFIG_HOLES_IN_ZONE in the first place, but there is nothing except the changelog in commit 465aaed0030b ("MIPS: Octeon: Select CONFIG_HOLES_IN_ZONE"):
Current Octeon systems do in fact have holes in their memory zones. We need to select HOLES_IN_ZONE. If we do not, some memory configurations will result in crashes at boot time
Since then there were too many changes around memory management initialization both in the generic mm and on the MIPS side to track what exactly could case the crashes.
I'm pretty confident that HOLES_IN_ZONE is not required for Octeon systems anymore and can be removed.
I'd really appreciate if somebody with access to an Octeon system could test this patch.
arch/mips/Kconfig | 4 ---- 1 file changed, 4 deletions(-)
arch/mips/Kconfig +0 -4
@@ -990,7 +990,6 @@ config CAVIUM_OCTEON_SOC select HAVE_PLAT_FW_INIT_CMDLINE select HAVE_PLAT_MEMCPY select ZONE_DMA32 - select HOLES_IN_ZONE select GPIOLIB select USE_OF select ARCH_SPARSEMEM_ENABLE
@@ -1226,9 +1225,6 @@ config HAVE_PLAT_MEMCPY config ISA_DMA_API bool -config HOLES_IN_ZONE - bool - config SYS_SUPPORTS_RELOCATABLE bool help
Signature · 1 line
2.28.0
Thomas Bogendoerfer
maintainerQuoted 2 lines · Mike Rapoport
I'd really appreciate if somebody with access to an Octeon system could test this patch.
Tested on an Ubiquiti edgerouter 12. Works with problem and I haven't even seen a change in memory output.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
Hi Thomas,
Quoted 6 lines · Thomas Bogendoerfer
Quoted 2 lines · Mike Rapoport
I'd really appreciate if somebody with access to an Octeon system could test this patch.
Tested on an Ubiquiti edgerouter 12. Works with problem and I haven't even seen a change in memory output.
Is "works with problem" a misprint or something went wrong?
Quoted 5 lines
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
Signature · 2 lines
Sincerely yours, Mike.
Thomas Bogendoerfer
maintainerQuoted 11 lines · Mike Rapoport
Hi Thomas,
Quoted 6 lines · Thomas Bogendoerfer
Quoted 2 lines · Mike Rapoport
I'd really appreciate if somebody with access to an Octeon system could test this patch.
Tested on an Ubiquiti edgerouter 12. Works with problem and I haven't even seen a change in memory output.
Is "works with problem" a misprint or something went wrong?
that should have been "without problem". All good in my test, but that was more or less booting and checking memory log messages.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]
Quoted 8 lines · Thomas Bogendoerfer
Quoted 7 lines · Mike Rapoport
Hi Thomas,
Quoted 4 lines · Thomas Bogendoerfer
Quoted 2 lines · Mike Rapoport
I'd really appreciate if somebody with access to an Octeon system could test this patch.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Tested on an Ubiquiti edgerouter 12. Works with problem and I haven't even seen a change in memory output.
Is "works with problem" a misprint or something went wrong?
that should have been "without problem".
Thanks for the clarification :)
Quoted 2 lines
All good in my test, but that was more or less booting and checking memory log messages.
Well, this is way better than build testing I did. The commit 465aaed0030b ("MIPS: Octeon: Select CONFIG_HOLES_IN_ZONE") that added CONFIG_HOLES_IN_ZONE for Octeons talked about crashes at boot time, so boot testing seems appropriate.
The only concern, is peculiar memory configuration Octeon may have with Linux and non-Linux "partitions" that will be different on different systems, but nevertheless I think the generic mm nowadays is robust enough to cope with those without CONFIG_HOLES_IN_ZONE.
I presumed the patch would go via MIPS tree, so it's you call Thomas.
Signature · 2 lines
Sincerely yours, Mike.
Quoted 36 lines · Mike Rapoport
From: Mike Rapoport <[email protected]>
CAVIUM_OCTEON_SOCconfiguration selectsHOLES_IN_ZONEoption to cope with memory crashes that were happening in 2011.This option effectively aliases
pfn_valid_within()topfn_valid()when enabled and hardwires it to 1 when disabled. The check forpfn_valid_within()is only relevant in case the memory map may have holes or undefined struct page instances insideMAX_ORDERchunks.Since 2011 memory management initialization in general and memory map initialization particularly became much more robust so the check for
pfn_valid_within()is not required on Octeon even despite its, hmm, unusual memory setup.Remove the selection of
HOLES_IN_ZONEbyCAVIUM_OCTEON_SOCand drop theHOLES_IN_ZONEconfiguration option entirely as Octeon was the only MIPS platform to use it.Signed-off-by Mike Rapoport <[email protected]>---
Hi,
I've tried to find why Octeon needed
CONFIG_HOLES_IN_ZONEin the first place, but there is nothing except the changelog in commit465aaed0030b("MIPS: Octeon: SelectCONFIG_HOLES_IN_ZONE"):Current Octeon systems do in fact have holes in their memory zones. We need to select
HOLES_IN_ZONE. If we do not, some memory configurations will result in crashes at boot timeSince then there were too many changes around memory management initialization both in the generic mm and on the MIPS side to track what exactly could case the crashes.
Quoted 8 lines
I'm pretty confident that
HOLES_IN_ZONEis not required for Octeon systems anymore and can be removed.I'd really appreciate if somebody with access to an Octeon system could test this patch.
arch/mips/Kconfig | 4 ---- 1 file changed, 4 deletions(-)
applied to mips-next.
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]