/* SPDX-License-Identifier: GPL-2.0 */ /* Included from asm/pgtable-*.h only ! */ /* * Some bits are only used on some cpu families... Make sure that all * the undefined gets a sensible default */ #ifndef _PAGE_HASHPTE #define _PAGE_HASHPTE 0 #endif #ifndef _PAGE_HWWRITE #define _PAGE_HWWRITE 0 #endif #ifndef _PAGE_EXEC #define _PAGE_EXEC 0 #endif #ifndef _PAGE_ENDIAN #define _PAGE_ENDIAN 0 #endif #ifndef _PAGE_COHERENT #define _PAGE_COHERENT 0 #endif #ifndef _PAGE_WRITETHRU #define _PAGE_WRITETHRU 0 #endif #ifndef _PAGE_4K_PFN #define _PAGE_4K_PFN 0 #endif #ifndef _PAGE_SAO #define _PAGE_SAO 0 #endif #ifndef _PAGE_PSIZE #define _PAGE_PSIZE 0 #endif /* _PAGE_RO and _PAGE_RW shall not be defined at the same time */ #ifndef _PAGE_RO #define _PAGE_RO 0 #else #define _PAGE_RW 0 #endif #ifndef _PAGE_PTE #define _PAGE_PTE 0 #endif /* At least one of _PAGE_PRIVILEGED or _PAGE_USER must be defined */ #ifndef _PAGE_PRIVILEGED #define _PAGE_PRIVILEGED 0 #else #ifndef _PAGE_USER #define _PAGE_USER 0 #endif #endif #ifndef _PAGE_NA #define _PAGE_NA 0 #endif #ifndef _PAGE_HUGE #define _PAGE_HUGE 0 #endif #ifndef _PMD_PRESENT_MASK #define _PMD_PRESENT_MASK _PMD_PRESENT #endif #ifndef _PMD_SIZE #define _PMD_SIZE 0 #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() #endif #ifndef _PMD_USER #define _PMD_USER 0 #endif #ifndef _PAGE_KERNEL_RO #define _PAGE_KERNEL_RO (_PAGE_PRIVILEGED | _PAGE_RO) #endif #ifndef _PAGE_KERNEL_ROX #define _PAGE_KERNEL_ROX (_PAGE_PRIVILEGED | _PAGE_RO | _PAGE_EXEC) #endif #ifndef _PAGE_KERNEL_RW #define _PAGE_KERNEL_RW (_PAGE_PRIVILEGED | _PAGE_DIRTY | _PAGE_RW | \ _PAGE_HWWRITE) #endif #ifndef _PAGE_KERNEL_RWX #define _PAGE_KERNEL_RWX (_PAGE_PRIVILEGED | _PAGE_DIRTY | _PAGE_RW | \ _PAGE_HWWRITE | _PAGE_EXEC) #endif #ifndef _PAGE_HPTEFLAGS #define _PAGE_HPTEFLAGS _PAGE_HASHPTE #endif #ifndef _PTE_NONE_MASK #define _PTE_NONE_MASK _PAGE_HPTEFLAGS #endif /* Make sure we get a link error if PMD_PAGE_SIZE is ever called on a * kernel without large page PMD support */ #ifndef __ASSEMBLY__ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); /* * Don't just check for any non zero bits in __PAGE_USER, since for book3e * and PTE_64BIT, PAGE_KERNEL_X contains _PAGE_BAP_SR which is also in * _PAGE_USER. Need to explicitly match _PAGE_BAP_UR bit in that case too. */
static inline bool pte_user(pte_t pte) { return (pte_val(pte) & (_PAGE_USER | _PAGE_PRIVILEGED)) == _PAGE_USER; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Michael Ellerman | 22 | 84.62% | 1 | 50.00% |
Christophe Leroy | 4 | 15.38% | 1 | 50.00% |
Total | 26 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 406 | 73.29% | 3 | 18.75% |
Christophe Leroy | 79 | 14.26% | 4 | 25.00% |
Aneesh Kumar K.V | 32 | 5.78% | 3 | 18.75% |
Michael Ellerman | 24 | 4.33% | 2 | 12.50% |
Scott Wood | 6 | 1.08% | 1 | 6.25% |
Stefan Roese | 5 | 0.90% | 1 | 6.25% |
Greg Kroah-Hartman | 1 | 0.18% | 1 | 6.25% |
Lucas De Marchi | 1 | 0.18% | 1 | 6.25% |
Total | 554 | 100.00% | 16 | 100.00% |