aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc/pgtable.h')
-rw-r--r--include/asm-sparc/pgtable.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h
index 8f4f6a959651..b33c35411e82 100644
--- a/include/asm-sparc/pgtable.h
+++ b/include/asm-sparc/pgtable.h
@@ -82,6 +82,8 @@ extern unsigned long page_kernel;
82/* Top-level page directory */ 82/* Top-level page directory */
83extern pgd_t swapper_pg_dir[1024]; 83extern pgd_t swapper_pg_dir[1024];
84 84
85extern void paging_init(void);
86
85/* Page table for 0-4MB for everybody, on the Sparc this 87/* Page table for 0-4MB for everybody, on the Sparc this
86 * holds the same as on the i386. 88 * holds the same as on the i386.
87 */ 89 */
@@ -152,7 +154,7 @@ BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t)
152BTFIXUPDEF_CALL(void, pte_clear, pte_t *) 154BTFIXUPDEF_CALL(void, pte_clear, pte_t *)
153BTFIXUPDEF_CALL(int, pte_read, pte_t) 155BTFIXUPDEF_CALL(int, pte_read, pte_t)
154 156
155extern __inline__ int pte_none(pte_t pte) 157static inline int pte_none(pte_t pte)
156{ 158{
157 return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); 159 return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask));
158} 160}
@@ -165,7 +167,7 @@ BTFIXUPDEF_CALL_CONST(int, pmd_bad, pmd_t)
165BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) 167BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t)
166BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) 168BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *)
167 169
168extern __inline__ int pmd_none(pmd_t pmd) 170static inline int pmd_none(pmd_t pmd)
169{ 171{
170 return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); 172 return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask));
171} 173}
@@ -192,20 +194,20 @@ BTFIXUPDEF_HALF(pte_writei)
192BTFIXUPDEF_HALF(pte_dirtyi) 194BTFIXUPDEF_HALF(pte_dirtyi)
193BTFIXUPDEF_HALF(pte_youngi) 195BTFIXUPDEF_HALF(pte_youngi)
194 196
195extern int pte_write(pte_t pte) __attribute_const__; 197static int pte_write(pte_t pte) __attribute_const__;
196extern __inline__ int pte_write(pte_t pte) 198static inline int pte_write(pte_t pte)
197{ 199{
198 return pte_val(pte) & BTFIXUP_HALF(pte_writei); 200 return pte_val(pte) & BTFIXUP_HALF(pte_writei);
199} 201}
200 202
201extern int pte_dirty(pte_t pte) __attribute_const__; 203static int pte_dirty(pte_t pte) __attribute_const__;
202extern __inline__ int pte_dirty(pte_t pte) 204static inline int pte_dirty(pte_t pte)
203{ 205{
204 return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); 206 return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi);
205} 207}
206 208
207extern int pte_young(pte_t pte) __attribute_const__; 209static int pte_young(pte_t pte) __attribute_const__;
208extern __inline__ int pte_young(pte_t pte) 210static inline int pte_young(pte_t pte)
209{ 211{
210 return pte_val(pte) & BTFIXUP_HALF(pte_youngi); 212 return pte_val(pte) & BTFIXUP_HALF(pte_youngi);
211} 213}
@@ -215,8 +217,8 @@ extern __inline__ int pte_young(pte_t pte)
215 */ 217 */
216BTFIXUPDEF_HALF(pte_filei) 218BTFIXUPDEF_HALF(pte_filei)
217 219
218extern int pte_file(pte_t pte) __attribute_const__; 220static int pte_file(pte_t pte) __attribute_const__;
219extern __inline__ int pte_file(pte_t pte) 221static inline int pte_file(pte_t pte)
220{ 222{
221 return pte_val(pte) & BTFIXUP_HALF(pte_filei); 223 return pte_val(pte) & BTFIXUP_HALF(pte_filei);
222} 224}
@@ -227,20 +229,20 @@ BTFIXUPDEF_HALF(pte_wrprotecti)
227BTFIXUPDEF_HALF(pte_mkcleani) 229BTFIXUPDEF_HALF(pte_mkcleani)
228BTFIXUPDEF_HALF(pte_mkoldi) 230BTFIXUPDEF_HALF(pte_mkoldi)
229 231
230extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; 232static pte_t pte_wrprotect(pte_t pte) __attribute_const__;
231extern __inline__ pte_t pte_wrprotect(pte_t pte) 233static inline pte_t pte_wrprotect(pte_t pte)
232{ 234{
233 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); 235 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti));
234} 236}
235 237
236extern pte_t pte_mkclean(pte_t pte) __attribute_const__; 238static pte_t pte_mkclean(pte_t pte) __attribute_const__;
237extern __inline__ pte_t pte_mkclean(pte_t pte) 239static inline pte_t pte_mkclean(pte_t pte)
238{ 240{
239 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); 241 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani));
240} 242}
241 243
242extern pte_t pte_mkold(pte_t pte) __attribute_const__; 244static pte_t pte_mkold(pte_t pte) __attribute_const__;
243extern __inline__ pte_t pte_mkold(pte_t pte) 245static inline pte_t pte_mkold(pte_t pte)
244{ 246{
245 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); 247 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi));
246} 248}
@@ -253,8 +255,6 @@ BTFIXUPDEF_CALL_CONST(pte_t, pte_mkyoung, pte_t)
253#define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte) 255#define pte_mkdirty(pte) BTFIXUP_CALL(pte_mkdirty)(pte)
254#define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte) 256#define pte_mkyoung(pte) BTFIXUP_CALL(pte_mkyoung)(pte)
255 257
256#define page_pte_prot(page, prot) mk_pte(page, prot)
257#define page_pte(page) mk_pte(page, __pgprot(0))
258#define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot) 258#define pfn_pte(pfn, prot) mk_pte(pfn_to_page(pfn), prot)
259 259
260BTFIXUPDEF_CALL(unsigned long, pte_pfn, pte_t) 260BTFIXUPDEF_CALL(unsigned long, pte_pfn, pte_t)
@@ -276,8 +276,8 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int)
276 276
277BTFIXUPDEF_INT(pte_modify_mask) 277BTFIXUPDEF_INT(pte_modify_mask)
278 278
279extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; 279static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__;
280extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) 280static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
281{ 281{
282 return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | 282 return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) |
283 pgprot_val(newprot)); 283 pgprot_val(newprot));
@@ -384,13 +384,13 @@ extern struct ctx_list ctx_used; /* Head of used contexts list */
384 384
385#define NO_CONTEXT -1 385#define NO_CONTEXT -1
386 386
387extern __inline__ void remove_from_ctx_list(struct ctx_list *entry) 387static inline void remove_from_ctx_list(struct ctx_list *entry)
388{ 388{
389 entry->next->prev = entry->prev; 389 entry->next->prev = entry->prev;
390 entry->prev->next = entry->next; 390 entry->prev->next = entry->next;
391} 391}
392 392
393extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) 393static inline void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry)
394{ 394{
395 entry->next = head; 395 entry->next = head;
396 (entry->prev = head->prev)->next = entry; 396 (entry->prev = head->prev)->next = entry;
@@ -399,7 +399,7 @@ extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *e
399#define add_to_free_ctxlist(entry) add_to_ctx_list(&ctx_free, entry) 399#define add_to_free_ctxlist(entry) add_to_ctx_list(&ctx_free, entry)
400#define add_to_used_ctxlist(entry) add_to_ctx_list(&ctx_used, entry) 400#define add_to_used_ctxlist(entry) add_to_ctx_list(&ctx_used, entry)
401 401
402extern __inline__ unsigned long 402static inline unsigned long
403__get_phys (unsigned long addr) 403__get_phys (unsigned long addr)
404{ 404{
405 switch (sparc_cpu_model){ 405 switch (sparc_cpu_model){
@@ -414,7 +414,7 @@ __get_phys (unsigned long addr)
414 } 414 }
415} 415}
416 416
417extern __inline__ int 417static inline int
418__get_iospace (unsigned long addr) 418__get_iospace (unsigned long addr)
419{ 419{
420 switch (sparc_cpu_model){ 420 switch (sparc_cpu_model){