1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_POWERPC_PGTABLE_MASKS_H 3 #define _ASM_POWERPC_PGTABLE_MASKS_H 4 5 #ifndef _PAGE_NA 6 #define _PAGE_NA 0 7 #define _PAGE_NAX _PAGE_EXEC 8 #define _PAGE_RO _PAGE_READ 9 #define _PAGE_ROX (_PAGE_READ | _PAGE_EXEC) 10 #define _PAGE_RW (_PAGE_READ | _PAGE_WRITE) 11 #define _PAGE_RWX (_PAGE_READ | _PAGE_WRITE | _PAGE_EXEC) 12 #endif 13 14 /* Permission flags for kernel mappings */ 15 #ifndef _PAGE_KERNEL_RO 16 #define _PAGE_KERNEL_RO _PAGE_RO 17 #define _PAGE_KERNEL_ROX _PAGE_ROX 18 #define _PAGE_KERNEL_RW (_PAGE_RW | _PAGE_DIRTY) 19 #define _PAGE_KERNEL_RWX (_PAGE_RWX | _PAGE_DIRTY) 20 #endif 21 22 /* Permission masks used to generate the __P and __S table */ 23 #define PAGE_NONE __pgprot(_PAGE_BASE | _PAGE_NA) 24 #define PAGE_EXECONLY_X __pgprot(_PAGE_BASE | _PAGE_NAX) 25 #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_RW) 26 #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_RWX) 27 #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_RO) 28 #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_ROX) 29 #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_RO) 30 #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_ROX) 31 32 #endif /* _ASM_POWERPC_PGTABLE_MASKS_H */ 33