Skip to content

Commit 8871331

Browse files
committed
ARC: build: disallow invalid PAE40 + 4K page config
The config option being built was | CONFIG_ARC_MMU_V4=y | CONFIG_ARC_PAGE_SIZE_4K=y | CONFIG_HIGHMEM=y | CONFIG_ARC_HAS_PAE40=y This was hitting a BUILD_BUG_ON() since a 4K page can't hoist 1k, 8-byte PTE entries (8 byte due to PAE40). BUILD_BUG_ON() is a good last ditch resort, but such a config needs to be disallowed explicitly in Kconfig. Side-note: the actual fix is single liner dependency, but while at it cleaned out a few things: - 4K dependency on MMU v3 or v4 is always true, since 288ff7d ("ARC: retire MMUv1 and MMUv2 support") - PAE40 dependency in on MMU ver not really ISA, although that follows eventually. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409160223.xydgucbY-lkp@intel.com/ Signed-off-by: Vineet Gupta <vgupta@kernel.org>
1 parent c0cd294 commit 8871331

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arc/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ config ARC_PAGE_SIZE_16K
297297
config ARC_PAGE_SIZE_4K
298298
bool "4KB"
299299
select HAVE_PAGE_SIZE_4KB
300-
depends on ARC_MMU_V3 || ARC_MMU_V4
301300

302301
endchoice
303302

@@ -474,7 +473,8 @@ config HIGHMEM
474473

475474
config ARC_HAS_PAE40
476475
bool "Support for the 40-bit Physical Address Extension"
477-
depends on ISA_ARCV2
476+
depends on MMU_V4
477+
depends on !ARC_PAGE_SIZE_4K
478478
select HIGHMEM
479479
select PHYS_ADDR_T_64BIT
480480
help

0 commit comments

Comments
 (0)