Skip to content

Commit fe94cb1

Browse files
committed
parisc: Drop PMD_SHIFT from calculation in pgtable.h
PMD_SHIFT isn't defined if CONFIG_PGTABLE_LEVELS == 3, and as such the kernel test robot found this warning: In file included from include/linux/pgtable.h:6, from arch/parisc/kernel/head.S:23: arch/parisc/include/asm/pgtable.h:169:32: warning: "PMD_SHIFT" is not defined, evaluates to 0 [-Wundef] 169 | #if (KERNEL_INITIAL_ORDER) >= (PMD_SHIFT) Avoid the warning by using PLD_SHIFT and BITS_PER_PTE. Signed-off-by: Helge Deller <[email protected]> Reported-by: kernel test robot <[email protected]> Cc: <[email protected]> # 6.0+
1 parent 71bdea6 commit fe94cb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/parisc/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ extern void __update_cache(pte_t pte);
166166

167167
/* This calculates the number of initial pages we need for the initial
168168
* page tables */
169-
#if (KERNEL_INITIAL_ORDER) >= (PMD_SHIFT)
170-
# define PT_INITIAL (1 << (KERNEL_INITIAL_ORDER - PMD_SHIFT))
169+
#if (KERNEL_INITIAL_ORDER) >= (PLD_SHIFT + BITS_PER_PTE)
170+
# define PT_INITIAL (1 << (KERNEL_INITIAL_ORDER - PLD_SHIFT - BITS_PER_PTE))
171171
#else
172172
# define PT_INITIAL (1) /* all initial PTEs fit into one page */
173173
#endif

0 commit comments

Comments
 (0)