archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <>
To: Thomas Bogendoerfer <>
	Mike Rapoport <>
Subject: [RFT PATCH] MIPS: Octeon: drop dependency on CONFIG_HOLES_IN_ZONE
Date: Sun, 18 Apr 2021 12:35:12 +0300	[thread overview]
Message-ID: <> (raw)

From: Mike Rapoport <>

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.

Signed-off-by: Mike Rapoport <>


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(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d89efba3d8a4..96b08cd3b442 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -990,7 +990,6 @@ config CAVIUM_OCTEON_SOC
 	select ZONE_DMA32
-	select HOLES_IN_ZONE
 	select GPIOLIB
 	select USE_OF
@@ -1226,9 +1225,6 @@ config HAVE_PLAT_MEMCPY
 config ISA_DMA_API
-	bool

             reply	other threads:[~2021-04-18  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18  9:35 Mike Rapoport [this message]
2021-04-29 21:06 ` [RFT PATCH] MIPS: Octeon: drop dependency on CONFIG_HOLES_IN_ZONE Thomas Bogendoerfer
2021-04-30  9:35   ` Mike Rapoport
2021-04-30 10:42     ` Thomas Bogendoerfer
2021-04-30 15:11       ` Mike Rapoport
2021-05-11 20:40 ` Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).