diff options
Diffstat (limited to 'include/asm-sparc/pgtable.h')
| -rw-r--r-- | include/asm-sparc/pgtable.h | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 8f4f6a959651..a14e98677500 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 */ |
| 83 | extern pgd_t swapper_pg_dir[1024]; | 83 | extern pgd_t swapper_pg_dir[1024]; |
| 84 | 84 | ||
| 85 | extern 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) | |||
| 152 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) | 154 | BTFIXUPDEF_CALL(void, pte_clear, pte_t *) |
| 153 | BTFIXUPDEF_CALL(int, pte_read, pte_t) | 155 | BTFIXUPDEF_CALL(int, pte_read, pte_t) |
| 154 | 156 | ||
| 155 | extern __inline__ int pte_none(pte_t pte) | 157 | static 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) | |||
| 165 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) | 167 | BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) |
| 166 | BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) | 168 | BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) |
| 167 | 169 | ||
| 168 | extern __inline__ int pmd_none(pmd_t pmd) | 170 | static 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) | |||
| 192 | BTFIXUPDEF_HALF(pte_dirtyi) | 194 | BTFIXUPDEF_HALF(pte_dirtyi) |
| 193 | BTFIXUPDEF_HALF(pte_youngi) | 195 | BTFIXUPDEF_HALF(pte_youngi) |
| 194 | 196 | ||
| 195 | extern int pte_write(pte_t pte) __attribute_const__; | 197 | static int pte_write(pte_t pte) __attribute_const__; |
| 196 | extern __inline__ int pte_write(pte_t pte) | 198 | static 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 | ||
| 201 | extern int pte_dirty(pte_t pte) __attribute_const__; | 203 | static int pte_dirty(pte_t pte) __attribute_const__; |
| 202 | extern __inline__ int pte_dirty(pte_t pte) | 204 | static 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 | ||
| 207 | extern int pte_young(pte_t pte) __attribute_const__; | 209 | static int pte_young(pte_t pte) __attribute_const__; |
| 208 | extern __inline__ int pte_young(pte_t pte) | 210 | static 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 | */ |
| 216 | BTFIXUPDEF_HALF(pte_filei) | 218 | BTFIXUPDEF_HALF(pte_filei) |
| 217 | 219 | ||
| 218 | extern int pte_file(pte_t pte) __attribute_const__; | 220 | static int pte_file(pte_t pte) __attribute_const__; |
| 219 | extern __inline__ int pte_file(pte_t pte) | 221 | static 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) | |||
| 227 | BTFIXUPDEF_HALF(pte_mkcleani) | 229 | BTFIXUPDEF_HALF(pte_mkcleani) |
| 228 | BTFIXUPDEF_HALF(pte_mkoldi) | 230 | BTFIXUPDEF_HALF(pte_mkoldi) |
| 229 | 231 | ||
| 230 | extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; | 232 | static pte_t pte_wrprotect(pte_t pte) __attribute_const__; |
| 231 | extern __inline__ pte_t pte_wrprotect(pte_t pte) | 233 | static 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 | ||
| 236 | extern pte_t pte_mkclean(pte_t pte) __attribute_const__; | 238 | static pte_t pte_mkclean(pte_t pte) __attribute_const__; |
| 237 | extern __inline__ pte_t pte_mkclean(pte_t pte) | 239 | static 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 | ||
| 242 | extern pte_t pte_mkold(pte_t pte) __attribute_const__; | 244 | static pte_t pte_mkold(pte_t pte) __attribute_const__; |
| 243 | extern __inline__ pte_t pte_mkold(pte_t pte) | 245 | static 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 | } |
| @@ -276,8 +278,8 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int) | |||
| 276 | 278 | ||
| 277 | BTFIXUPDEF_INT(pte_modify_mask) | 279 | BTFIXUPDEF_INT(pte_modify_mask) |
| 278 | 280 | ||
| 279 | extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; | 281 | static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; |
| 280 | extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) | 282 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 281 | { | 283 | { |
| 282 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | | 284 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | |
| 283 | pgprot_val(newprot)); | 285 | pgprot_val(newprot)); |
| @@ -384,13 +386,13 @@ extern struct ctx_list ctx_used; /* Head of used contexts list */ | |||
| 384 | 386 | ||
| 385 | #define NO_CONTEXT -1 | 387 | #define NO_CONTEXT -1 |
| 386 | 388 | ||
| 387 | extern __inline__ void remove_from_ctx_list(struct ctx_list *entry) | 389 | static inline void remove_from_ctx_list(struct ctx_list *entry) |
| 388 | { | 390 | { |
| 389 | entry->next->prev = entry->prev; | 391 | entry->next->prev = entry->prev; |
| 390 | entry->prev->next = entry->next; | 392 | entry->prev->next = entry->next; |
| 391 | } | 393 | } |
| 392 | 394 | ||
| 393 | extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) | 395 | static inline void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) |
| 394 | { | 396 | { |
| 395 | entry->next = head; | 397 | entry->next = head; |
| 396 | (entry->prev = head->prev)->next = entry; | 398 | (entry->prev = head->prev)->next = entry; |
| @@ -399,7 +401,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) | 401 | #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) | 402 | #define add_to_used_ctxlist(entry) add_to_ctx_list(&ctx_used, entry) |
| 401 | 403 | ||
| 402 | extern __inline__ unsigned long | 404 | static inline unsigned long |
| 403 | __get_phys (unsigned long addr) | 405 | __get_phys (unsigned long addr) |
| 404 | { | 406 | { |
| 405 | switch (sparc_cpu_model){ | 407 | switch (sparc_cpu_model){ |
| @@ -414,7 +416,7 @@ __get_phys (unsigned long addr) | |||
| 414 | } | 416 | } |
| 415 | } | 417 | } |
| 416 | 418 | ||
| 417 | extern __inline__ int | 419 | static inline int |
| 418 | __get_iospace (unsigned long addr) | 420 | __get_iospace (unsigned long addr) |
| 419 | { | 421 | { |
| 420 | switch (sparc_cpu_model){ | 422 | switch (sparc_cpu_model){ |
