diff options
-rw-r--r-- | arch/sparc64/mm/init.c | 84 | ||||
-rw-r--r-- | include/asm-sparc64/pgtable.h | 88 |
2 files changed, 86 insertions, 86 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 9c2fc239f3ee..81f9f4bffaff 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -1334,90 +1334,6 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
1334 | } | 1334 | } |
1335 | #endif | 1335 | #endif |
1336 | 1336 | ||
1337 | /* SUN4U pte bits... */ | ||
1338 | #define _PAGE_SZ4MB_4U 0x6000000000000000 /* 4MB Page */ | ||
1339 | #define _PAGE_SZ512K_4U 0x4000000000000000 /* 512K Page */ | ||
1340 | #define _PAGE_SZ64K_4U 0x2000000000000000 /* 64K Page */ | ||
1341 | #define _PAGE_SZ8K_4U 0x0000000000000000 /* 8K Page */ | ||
1342 | #define _PAGE_NFO_4U 0x1000000000000000 /* No Fault Only */ | ||
1343 | #define _PAGE_IE_4U 0x0800000000000000 /* Invert Endianness */ | ||
1344 | #define _PAGE_SOFT2_4U 0x07FC000000000000 /* Software bits, set 2 */ | ||
1345 | #define _PAGE_RES1_4U 0x0002000000000000 /* Reserved */ | ||
1346 | #define _PAGE_SZ32MB_4U 0x0001000000000000 /* (Panther) 32MB page */ | ||
1347 | #define _PAGE_SZ256MB_4U 0x2001000000000000 /* (Panther) 256MB page */ | ||
1348 | #define _PAGE_SN_4U 0x0000800000000000 /* (Cheetah) Snoop */ | ||
1349 | #define _PAGE_RES2_4U 0x0000780000000000 /* Reserved */ | ||
1350 | #define _PAGE_PADDR_4U 0x000007FFFFFFE000 /* (Cheetah) paddr[42:13] */ | ||
1351 | #define _PAGE_SOFT_4U 0x0000000000001F80 /* Software bits: */ | ||
1352 | #define _PAGE_EXEC_4U 0x0000000000001000 /* Executable SW bit */ | ||
1353 | #define _PAGE_MODIFIED_4U 0x0000000000000800 /* Modified (dirty) */ | ||
1354 | #define _PAGE_FILE_4U 0x0000000000000800 /* Pagecache page */ | ||
1355 | #define _PAGE_ACCESSED_4U 0x0000000000000400 /* Accessed (ref'd) */ | ||
1356 | #define _PAGE_READ_4U 0x0000000000000200 /* Readable SW Bit */ | ||
1357 | #define _PAGE_WRITE_4U 0x0000000000000100 /* Writable SW Bit */ | ||
1358 | #define _PAGE_PRESENT_4U 0x0000000000000080 /* Present */ | ||
1359 | #define _PAGE_L_4U 0x0000000000000040 /* Locked TTE */ | ||
1360 | #define _PAGE_CP_4U 0x0000000000000020 /* Cacheable in P-Cache */ | ||
1361 | #define _PAGE_CV_4U 0x0000000000000010 /* Cacheable in V-Cache */ | ||
1362 | #define _PAGE_E_4U 0x0000000000000008 /* side-Effect */ | ||
1363 | #define _PAGE_P_4U 0x0000000000000004 /* Privileged Page */ | ||
1364 | #define _PAGE_W_4U 0x0000000000000002 /* Writable */ | ||
1365 | |||
1366 | /* SUN4V pte bits... */ | ||
1367 | #define _PAGE_NFO_4V 0x4000000000000000 /* No Fault Only */ | ||
1368 | #define _PAGE_SOFT2_4V 0x3F00000000000000 /* Software bits, set 2 */ | ||
1369 | #define _PAGE_MODIFIED_4V 0x2000000000000000 /* Modified (dirty) */ | ||
1370 | #define _PAGE_ACCESSED_4V 0x1000000000000000 /* Accessed (ref'd) */ | ||
1371 | #define _PAGE_READ_4V 0x0800000000000000 /* Readable SW Bit */ | ||
1372 | #define _PAGE_WRITE_4V 0x0400000000000000 /* Writable SW Bit */ | ||
1373 | #define _PAGE_PADDR_4V 0x00FFFFFFFFFFE000 /* paddr[55:13] */ | ||
1374 | #define _PAGE_IE_4V 0x0000000000001000 /* Invert Endianness */ | ||
1375 | #define _PAGE_E_4V 0x0000000000000800 /* side-Effect */ | ||
1376 | #define _PAGE_CP_4V 0x0000000000000400 /* Cacheable in P-Cache */ | ||
1377 | #define _PAGE_CV_4V 0x0000000000000200 /* Cacheable in V-Cache */ | ||
1378 | #define _PAGE_P_4V 0x0000000000000100 /* Privileged Page */ | ||
1379 | #define _PAGE_EXEC_4V 0x0000000000000080 /* Executable Page */ | ||
1380 | #define _PAGE_W_4V 0x0000000000000040 /* Writable */ | ||
1381 | #define _PAGE_SOFT_4V 0x0000000000000030 /* Software bits */ | ||
1382 | #define _PAGE_FILE_4V 0x0000000000000020 /* Pagecache page */ | ||
1383 | #define _PAGE_PRESENT_4V 0x0000000000000010 /* Present */ | ||
1384 | #define _PAGE_RESV_4V 0x0000000000000008 /* Reserved */ | ||
1385 | #define _PAGE_SZ16GB_4V 0x0000000000000007 /* 16GB Page */ | ||
1386 | #define _PAGE_SZ2GB_4V 0x0000000000000006 /* 2GB Page */ | ||
1387 | #define _PAGE_SZ256MB_4V 0x0000000000000005 /* 256MB Page */ | ||
1388 | #define _PAGE_SZ32MB_4V 0x0000000000000004 /* 32MB Page */ | ||
1389 | #define _PAGE_SZ4MB_4V 0x0000000000000003 /* 4MB Page */ | ||
1390 | #define _PAGE_SZ512K_4V 0x0000000000000002 /* 512K Page */ | ||
1391 | #define _PAGE_SZ64K_4V 0x0000000000000001 /* 64K Page */ | ||
1392 | #define _PAGE_SZ8K_4V 0x0000000000000000 /* 8K Page */ | ||
1393 | |||
1394 | #if PAGE_SHIFT == 13 | ||
1395 | #define _PAGE_SZBITS_4U _PAGE_SZ8K_4U | ||
1396 | #define _PAGE_SZBITS_4V _PAGE_SZ8K_4V | ||
1397 | #elif PAGE_SHIFT == 16 | ||
1398 | #define _PAGE_SZBITS_4U _PAGE_SZ64K_4U | ||
1399 | #define _PAGE_SZBITS_4V _PAGE_SZ64K_4V | ||
1400 | #elif PAGE_SHIFT == 19 | ||
1401 | #define _PAGE_SZBITS_4U _PAGE_SZ512K_4U | ||
1402 | #define _PAGE_SZBITS_4V _PAGE_SZ512K_4V | ||
1403 | #elif PAGE_SHIFT == 22 | ||
1404 | #define _PAGE_SZBITS_4U _PAGE_SZ4MB_4U | ||
1405 | #define _PAGE_SZBITS_4V _PAGE_SZ4MB_4V | ||
1406 | #else | ||
1407 | #error Wrong PAGE_SHIFT specified | ||
1408 | #endif | ||
1409 | |||
1410 | #if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB) | ||
1411 | #define _PAGE_SZHUGE_4U _PAGE_SZ4MB_4U | ||
1412 | #define _PAGE_SZHUGE_4V _PAGE_SZ4MB_4V | ||
1413 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K) | ||
1414 | #define _PAGE_SZHUGE_4U _PAGE_SZ512K_4U | ||
1415 | #define _PAGE_SZHUGE_4V _PAGE_SZ512K_4V | ||
1416 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_64K) | ||
1417 | #define _PAGE_SZHUGE_4U _PAGE_SZ64K_4U | ||
1418 | #define _PAGE_SZHUGE_4V _PAGE_SZ64K_4V | ||
1419 | #endif | ||
1420 | |||
1421 | #define _PAGE_CACHE_4U (_PAGE_CP_4U | _PAGE_CV_4U) | 1337 | #define _PAGE_CACHE_4U (_PAGE_CP_4U | _PAGE_CV_4U) |
1422 | #define _PAGE_CACHE_4V (_PAGE_CP_4V | _PAGE_CV_4V) | 1338 | #define _PAGE_CACHE_4V (_PAGE_CP_4V | _PAGE_CV_4V) |
1423 | #define __DIRTY_BITS_4U (_PAGE_MODIFIED_4U | _PAGE_WRITE_4U | _PAGE_W_4U) | 1339 | #define __DIRTY_BITS_4U (_PAGE_MODIFIED_4U | _PAGE_WRITE_4U | _PAGE_W_4U) |
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) |