0001
0002 #ifndef _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H
0003 #define _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H
0004 #ifdef __KERNEL__
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #define _PAGE_PRESENT 0x00001
0021 #define _PAGE_USER 0x00002
0022 #define _PAGE_RW 0x00004
0023 #define _PAGE_DIRTY 0x00008
0024 #define _PAGE_EXEC 0x00010
0025 #define _PAGE_ACCESSED 0x00020
0026
0027 #define _PAGE_ENDIAN 0x00040
0028 #define _PAGE_GUARDED 0x00080
0029 #define _PAGE_COHERENT 0x00100
0030 #define _PAGE_NO_CACHE 0x00200
0031 #define _PAGE_WRITETHRU 0x00400
0032 #define _PAGE_SPECIAL 0x00800
0033
0034 #define _PAGE_KERNEL_RO 0
0035 #define _PAGE_KERNEL_ROX _PAGE_EXEC
0036 #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW)
0037 #define _PAGE_KERNEL_RWX (_PAGE_DIRTY | _PAGE_RW | _PAGE_EXEC)
0038
0039
0040 #define _PAGE_PSIZE 0
0041
0042 #define _PMD_PRESENT 0
0043 #define _PMD_PRESENT_MASK (PAGE_MASK)
0044 #define _PMD_BAD (~PAGE_MASK)
0045 #define _PMD_USER 0
0046
0047 #define _PTE_NONE_MASK 0
0048
0049 #define PTE_WIMGE_SHIFT (6)
0050
0051
0052
0053
0054
0055
0056
0057 #define _PAGE_BASE_NC (_PAGE_PRESENT | _PAGE_ACCESSED)
0058 #if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
0059 #define _PAGE_BASE (_PAGE_BASE_NC | _PAGE_COHERENT)
0060 #else
0061 #define _PAGE_BASE (_PAGE_BASE_NC)
0062 #endif
0063
0064
0065 #define PAGE_NONE __pgprot(_PAGE_BASE)
0066 #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
0067 #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC)
0068 #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER)
0069 #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
0070 #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
0071 #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
0072
0073 #endif
0074 #endif