xref: /linux/arch/powerpc/include/asm/book3s/64/radix-64k.h (revision fb4e5dbd44564077fa0267a59b45961a1fd181b6)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2b0b5e9b1SAneesh Kumar K.V #ifndef _ASM_POWERPC_PGTABLE_RADIX_64K_H
3b0b5e9b1SAneesh Kumar K.V #define _ASM_POWERPC_PGTABLE_RADIX_64K_H
4b0b5e9b1SAneesh Kumar K.V 
5b0b5e9b1SAneesh Kumar K.V /*
6b0b5e9b1SAneesh Kumar K.V  * For 64K page size supported index is 13/9/9/5
7b0b5e9b1SAneesh Kumar K.V  */
8b0b5e9b1SAneesh Kumar K.V #define RADIX_PTE_INDEX_SIZE  5  /* 2MB huge page */
9b0b5e9b1SAneesh Kumar K.V #define RADIX_PMD_INDEX_SIZE  9  /* 1G huge page */
10b0b5e9b1SAneesh Kumar K.V #define RADIX_PUD_INDEX_SIZE	 9
11b0b5e9b1SAneesh Kumar K.V #define RADIX_PGD_INDEX_SIZE  13
12b0b5e9b1SAneesh Kumar K.V 
13*fb4e5dbdSAneesh Kumar K.V /*
14*fb4e5dbdSAneesh Kumar K.V  * We use a 256 byte PTE page fragment in radix
15*fb4e5dbdSAneesh Kumar K.V  * 8 bytes per each PTE entry.
16*fb4e5dbdSAneesh Kumar K.V  */
17*fb4e5dbdSAneesh Kumar K.V #define RADIX_PTE_FRAG_SIZE_SHIFT  (RADIX_PTE_INDEX_SIZE + 3)
18*fb4e5dbdSAneesh Kumar K.V #define RADIX_PTE_FRAG_NR	(PAGE_SIZE >> RADIX_PTE_FRAG_SIZE_SHIFT)
19b0b5e9b1SAneesh Kumar K.V #endif /* _ASM_POWERPC_PGTABLE_RADIX_64K_H */
20