Skip to content

Commit a7ee539

Browse files
RashmicaGmpe
authored andcommitted
powerpc/Kconfig: Update config option based on page size.
Currently on PPC64 changing kernel pagesize from 4K to 64K leaves FORCE_MAX_ZONEORDER set to 13 - which produces a compile error. The error occurs because of the following constraint (from include/linux/mmzone.h) being violated: MAX_ORDER -1 + PAGESHIFT <= SECTION_SIZE_BITS. Expanding this out, we get: FORCE_MAX_ZONEBITS <= 25 - PAGESHIFT, which requires, for a 64K page, FORCE_MAX_ZONEBITS <= 9. Thus set max value of FORCE_MAX_ZONEORDER for 64K pages to 9, and 4K pages to 13. Also, check the minimum value: In include/linux/huge_mm.h, we have the constraint HPAGE_PMD_ORDER < MAX_ORDER which expands out to: PTE_INDEX_SIZE < FORCE_MAX_ZONEORDER. PTE_INDEX_SIZE is: 9 (4k hash or no hash 4K pgtable) or 8 (64K hash or no hash 64K pgtable). Thus a min value of 8 for 64K pages and 9 for 4K pages is reasonable. So, update the range of FORCE_MAX_ZONEORDER from 9-64 to 8-9 for 64K pages and from 13-64 to 9-13 for 4K pages. Signed-off-by: Rashmica Gupta <[email protected]> Reviewed-by: Balbir Singh <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 6a0bcab commit a7ee539

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,9 @@ endchoice
605605

606606
config FORCE_MAX_ZONEORDER
607607
int "Maximum zone order"
608-
range 9 64 if PPC64 && PPC_64K_PAGES
608+
range 8 9 if PPC64 && PPC_64K_PAGES
609609
default "9" if PPC64 && PPC_64K_PAGES
610-
range 13 64 if PPC64 && !PPC_64K_PAGES
610+
range 9 13 if PPC64 && !PPC_64K_PAGES
611611
default "13" if PPC64 && !PPC_64K_PAGES
612612
range 9 64 if PPC32 && PPC_16K_PAGES
613613
default "9" if PPC32 && PPC_16K_PAGES

0 commit comments

Comments
 (0)