aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-12 20:07:51 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:31 -0500
commitff02e0d26f139ad95ec3a7e94f88faccaa180dff (patch)
tree7a872c9792561c77c672ba640b80134c592d93c7 /include/asm-sparc64
parent221b2fb818c307e1cb47e036a1671ca554d9cd0a (diff)
[SPARC64]: Move PTE field definitions back into asm/pgtable.h
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/pgtable.h88
1 files changed, 86 insertions, 2 deletions
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index bd8bce704a9f..3c02d5d9a533 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -91,8 +91,92 @@
91#endif /* !(__ASSEMBLY__) */ 91#endif /* !(__ASSEMBLY__) */
92 92
93/* PTE bits which are the same in SUN4U and SUN4V format. */ 93/* PTE bits which are the same in SUN4U and SUN4V format. */
94#define _PAGE_VALID 0x8000000000000000 /* Valid TTE */ 94#define _PAGE_VALID _AC(0x8000000000000000,UL) /* Valid TTE */
95#define _PAGE_R 0x8000000000000000 /* Keep ref bit up to date*/ 95#define _PAGE_R _AC(0x8000000000000000,UL) /* Keep ref bit uptodate*/
96
97/* SUN4U pte bits... */
98#define _PAGE_SZ4MB_4U _AC(0x6000000000000000,UL) /* 4MB Page */
99#define _PAGE_SZ512K_4U _AC(0x4000000000000000,UL) /* 512K Page */
100#define _PAGE_SZ64K_4U _AC(0x2000000000000000,UL) /* 64K Page */
101#define _PAGE_SZ8K_4U _AC(0x0000000000000000,UL) /* 8K Page */
102#define _PAGE_NFO_4U _AC(0x1000000000000000,UL) /* No Fault Only */
103#define _PAGE_IE_4U _AC(0x0800000000000000,UL) /* Invert Endianness */
104#define _PAGE_SOFT2_4U _AC(0x07FC000000000000,UL) /* Software bits, set 2 */
105#define _PAGE_RES1_4U _AC(0x0002000000000000,UL) /* Reserved */
106#define _PAGE_SZ32MB_4U _AC(0x0001000000000000,UL) /* (Panther) 32MB page */
107#define _PAGE_SZ256MB_4U _AC(0x2001000000000000,UL) /* (Panther) 256MB page */
108#define _PAGE_SN_4U _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */
109#define _PAGE_RES2_4U _AC(0x0000780000000000,UL) /* Reserved */
110#define _PAGE_PADDR_4U _AC(0x000007FFFFFFE000,UL) /* (Cheetah) pa[42:13] */
111#define _PAGE_SOFT_4U _AC(0x0000000000001F80,UL) /* Software bits: */
112#define _PAGE_EXEC_4U _AC(0x0000000000001000,UL) /* Executable SW bit */
113#define _PAGE_MODIFIED_4U _AC(0x0000000000000800,UL) /* Modified (dirty) */
114#define _PAGE_FILE_4U _AC(0x0000000000000800,UL) /* Pagecache page */
115#define _PAGE_ACCESSED_4U _AC(0x0000000000000400,UL) /* Accessed (ref'd) */
116#define _PAGE_READ_4U _AC(0x0000000000000200,UL) /* Readable SW Bit */
117#define _PAGE_WRITE_4U _AC(0x0000000000000100,UL) /* Writable SW Bit */
118#define _PAGE_PRESENT_4U _AC(0x0000000000000080,UL) /* Present */
119#define _PAGE_L_4U _AC(0x0000000000000040,UL) /* Locked TTE */
120#define _PAGE_CP_4U _AC(0x0000000000000020,UL) /* Cacheable in P-Cache */
121#define _PAGE_CV_4U _AC(0x0000000000000010,UL) /* Cacheable in V-Cache */
122#define _PAGE_E_4U _AC(0x0000000000000008,UL) /* side-Effect */
123#define _PAGE_P_4U _AC(0x0000000000000004,UL) /* Privileged Page */
124#define _PAGE_W_4U _AC(0x0000000000000002,UL) /* Writable */
125
126/* SUN4V pte bits... */
127#define _PAGE_NFO_4V _AC(0x4000000000000000,UL) /* No Fault Only */
128#define _PAGE_SOFT2_4V _AC(0x3F00000000000000,UL) /* Software bits, set 2 */
129#define _PAGE_MODIFIED_4V _AC(0x2000000000000000,UL) /* Modified (dirty) */
130#define _PAGE_ACCESSED_4V _AC(0x1000000000000000,UL) /* Accessed (ref'd) */
131#define _PAGE_READ_4V _AC(0x0800000000000000,UL) /* Readable SW Bit */
132#define _PAGE_WRITE_4V _AC(0x0400000000000000,UL) /* Writable SW Bit */
133#define _PAGE_PADDR_4V _AC(0x00FFFFFFFFFFE000,UL) /* paddr[55:13] */
134#define _PAGE_IE_4V _AC(0x0000000000001000,UL) /* Invert Endianness */
135#define _PAGE_E_4V _AC(0x0000000000000800,UL) /* side-Effect */
136#define _PAGE_CP_4V _AC(0x0000000000000400,UL) /* Cacheable in P-Cache */
137#define _PAGE_CV_4V _AC(0x0000000000000200,UL) /* Cacheable in V-Cache */
138#define _PAGE_P_4V _AC(0x0000000000000100,UL) /* Privileged Page */
139#define _PAGE_EXEC_4V _AC(0x0000000000000080,UL) /* Executable Page */
140#define _PAGE_W_4V _AC(0x0000000000000040,UL) /* Writable */
141#define _PAGE_SOFT_4V _AC(0x0000000000000030,UL) /* Software bits */
142#define _PAGE_FILE_4V _AC(0x0000000000000020,UL) /* Pagecache page */
143#define _PAGE_PRESENT_4V _AC(0x0000000000000010,UL) /* Present */
144#define _PAGE_RESV_4V _AC(0x0000000000000008,UL) /* Reserved */
145#define _PAGE_SZ16GB_4V _AC(0x0000000000000007,UL) /* 16GB Page */
146#define _PAGE_SZ2GB_4V _AC(0x0000000000000006,UL) /* 2GB Page */
147#define _PAGE_SZ256MB_4V _AC(0x0000000000000005,UL) /* 256MB Page */
148#define _PAGE_SZ32MB_4V _AC(0x0000000000000004,UL) /* 32MB Page */
149#define _PAGE_SZ4MB_4V _AC(0x0000000000000003,UL) /* 4MB Page */
150#define _PAGE_SZ512K_4V _AC(0x0000000000000002,UL) /* 512K Page */
151#define _PAGE_SZ64K_4V _AC(0x0000000000000001,UL) /* 64K Page */
152#define _PAGE_SZ8K_4V _AC(0x0000000000000000,UL) /* 8K Page */
153
154#if PAGE_SHIFT == 13
155#define _PAGE_SZBITS_4U _PAGE_SZ8K_4U
156#define _PAGE_SZBITS_4V _PAGE_SZ8K_4V
157#elif PAGE_SHIFT == 16
158#define _PAGE_SZBITS_4U _PAGE_SZ64K_4U
159#define _PAGE_SZBITS_4V _PAGE_SZ64K_4V
160#elif PAGE_SHIFT == 19
161#define _PAGE_SZBITS_4U _PAGE_SZ512K_4U
162#define _PAGE_SZBITS_4V _PAGE_SZ512K_4V
163#elif PAGE_SHIFT == 22
164#define _PAGE_SZBITS_4U _PAGE_SZ4MB_4U
165#define _PAGE_SZBITS_4V _PAGE_SZ4MB_4V
166#else
167#error Wrong PAGE_SHIFT specified
168#endif
169
170#if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB)
171#define _PAGE_SZHUGE_4U _PAGE_SZ4MB_4U
172#define _PAGE_SZHUGE_4V _PAGE_SZ4MB_4V
173#elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K)
174#define _PAGE_SZHUGE_4U _PAGE_SZ512K_4U
175#define _PAGE_SZHUGE_4V _PAGE_SZ512K_4V
176#elif defined(CONFIG_HUGETLB_PAGE_SIZE_64K)
177#define _PAGE_SZHUGE_4U _PAGE_SZ64K_4U
178#define _PAGE_SZHUGE_4V _PAGE_SZ64K_4V
179#endif
96 180
97/* These are actually filled in at boot time by sun4{u,v}_pgprot_init() */ 181/* These are actually filled in at boot time by sun4{u,v}_pgprot_init() */
98#define __P000 __pgprot(0) 182#define __P000 __pgprot(0)