diff options
Diffstat (limited to 'include/asm-sparc/pgtable.h')
-rw-r--r-- | include/asm-sparc/pgtable.h | 48 |
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 */ |
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 | } |
@@ -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 | ||
260 | BTFIXUPDEF_CALL(unsigned long, pte_pfn, pte_t) | 260 | BTFIXUPDEF_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 | ||
277 | BTFIXUPDEF_INT(pte_modify_mask) | 277 | BTFIXUPDEF_INT(pte_modify_mask) |
278 | 278 | ||
279 | extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; | 279 | 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) | 280 | static 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 | ||
387 | extern __inline__ void remove_from_ctx_list(struct ctx_list *entry) | 387 | static 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 | ||
393 | extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) | 393 | static 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 | ||
402 | extern __inline__ unsigned long | 402 | static 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 | ||
417 | extern __inline__ int | 417 | static 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){ |