diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2012-05-13 04:21:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-13 15:51:53 -0400 |
commit | 9701b264d3267b55ace45bc579eabefc7decfa57 (patch) | |
tree | 399be67cba77e5da48b3fe9e3fdaa3927df044c7 /arch | |
parent | 642ea3ed9c652bb9e105e55afcb9ad15b040f71f (diff) |
sparc32: drop btfixup in pgtable_32.h
Only one function left using btfixup.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/include/asm/pgtable_32.h | 60 | ||||
-rw-r--r-- | arch/sparc/kernel/ioport.c | 10 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.c | 77 |
3 files changed, 58 insertions, 89 deletions
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h index 6c823f920a5b..088db0c4e05f 100644 --- a/arch/sparc/include/asm/pgtable_32.h +++ b/arch/sparc/include/asm/pgtable_32.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/swap.h> | 17 | #include <linux/swap.h> |
18 | #include <asm/types.h> | 18 | #include <asm/types.h> |
19 | #include <asm/pgtsrmmu.h> | 19 | #include <asm/pgtsrmmu.h> |
20 | #include <asm/vaddrs.h> | ||
20 | #include <asm/oplib.h> | 21 | #include <asm/oplib.h> |
21 | #include <asm/btfixup.h> | 22 | #include <asm/btfixup.h> |
22 | #include <asm/cpu_type.h> | 23 | #include <asm/cpu_type.h> |
@@ -137,9 +138,15 @@ static inline struct page *pmd_page(pmd_t pmd) | |||
137 | return pfn_to_page((pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4)); | 138 | return pfn_to_page((pmd_val(pmd) & SRMMU_PTD_PMASK) >> (PAGE_SHIFT-4)); |
138 | } | 139 | } |
139 | 140 | ||
140 | BTFIXUPDEF_CALL_CONST(unsigned long, pgd_page_vaddr, pgd_t) | 141 | static inline unsigned long pgd_page_vaddr(pgd_t pgd) |
141 | 142 | { | |
142 | #define pgd_page_vaddr(pgd) BTFIXUP_CALL(pgd_page_vaddr)(pgd) | 143 | if (srmmu_device_memory(pgd_val(pgd))) { |
144 | return ~0; | ||
145 | } else { | ||
146 | unsigned long v = pgd_val(pgd) & SRMMU_PTD_PMASK; | ||
147 | return (unsigned long)__nocache_va(v << 4); | ||
148 | } | ||
149 | } | ||
143 | 150 | ||
144 | static inline int pte_present(pte_t pte) | 151 | static inline int pte_present(pte_t pte) |
145 | { | 152 | { |
@@ -310,12 +317,10 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot) | |||
310 | return prot; | 317 | return prot; |
311 | } | 318 | } |
312 | 319 | ||
313 | BTFIXUPDEF_INT(pte_modify_mask) | ||
314 | |||
315 | static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; | 320 | static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; |
316 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 321 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
317 | { | 322 | { |
318 | return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | | 323 | return __pte((pte_val(pte) & SRMMU_CHG_MASK) | |
319 | pgprot_val(newprot)); | 324 | pgprot_val(newprot)); |
320 | } | 325 | } |
321 | 326 | ||
@@ -328,12 +333,14 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
328 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) | 333 | #define pgd_offset_k(address) pgd_offset(&init_mm, address) |
329 | 334 | ||
330 | /* Find an entry in the second-level page table.. */ | 335 | /* Find an entry in the second-level page table.. */ |
331 | BTFIXUPDEF_CALL(pmd_t *, pmd_offset, pgd_t *, unsigned long) | 336 | static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address) |
332 | #define pmd_offset(dir,addr) BTFIXUP_CALL(pmd_offset)(dir,addr) | 337 | { |
338 | return (pmd_t *) pgd_page_vaddr(*dir) + | ||
339 | ((address >> PMD_SHIFT) & (PTRS_PER_PMD - 1)); | ||
340 | } | ||
333 | 341 | ||
334 | /* Find an entry in the third-level page table.. */ | 342 | /* Find an entry in the third-level page table.. */ |
335 | BTFIXUPDEF_CALL(pte_t *, pte_offset_kernel, pmd_t *, unsigned long) | 343 | pte_t *pte_offset_kernel(pmd_t * dir, unsigned long address); |
336 | #define pte_offset_kernel(dir,addr) BTFIXUP_CALL(pte_offset_kernel)(dir,addr) | ||
337 | 344 | ||
338 | /* | 345 | /* |
339 | * This shortcut works on sun4m (and sun4d) because the nocache area is static. | 346 | * This shortcut works on sun4m (and sun4d) because the nocache area is static. |
@@ -342,9 +349,7 @@ BTFIXUPDEF_CALL(pte_t *, pte_offset_kernel, pmd_t *, unsigned long) | |||
342 | #define pte_unmap(pte) do{}while(0) | 349 | #define pte_unmap(pte) do{}while(0) |
343 | 350 | ||
344 | struct seq_file; | 351 | struct seq_file; |
345 | BTFIXUPDEF_CALL(void, mmu_info, struct seq_file *) | 352 | void mmu_info(struct seq_file *m); |
346 | |||
347 | #define mmu_info(p) BTFIXUP_CALL(mmu_info)(p) | ||
348 | 353 | ||
349 | /* Fault handler stuff... */ | 354 | /* Fault handler stuff... */ |
350 | #define FAULT_CODE_PROT 0x1 | 355 | #define FAULT_CODE_PROT 0x1 |
@@ -355,22 +360,29 @@ BTFIXUPDEF_CALL(void, update_mmu_cache, struct vm_area_struct *, unsigned long, | |||
355 | 360 | ||
356 | #define update_mmu_cache(vma,addr,ptep) BTFIXUP_CALL(update_mmu_cache)(vma,addr,ptep) | 361 | #define update_mmu_cache(vma,addr,ptep) BTFIXUP_CALL(update_mmu_cache)(vma,addr,ptep) |
357 | 362 | ||
358 | BTFIXUPDEF_CALL(void, sparc_mapiorange, unsigned int, unsigned long, | 363 | void srmmu_mapiorange(unsigned int bus, unsigned long xpa, |
359 | unsigned long, unsigned int) | 364 | unsigned long xva, unsigned int len); |
360 | BTFIXUPDEF_CALL(void, sparc_unmapiorange, unsigned long, unsigned int) | 365 | void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len); |
361 | #define sparc_mapiorange(bus,pa,va,len) BTFIXUP_CALL(sparc_mapiorange)(bus,pa,va,len) | ||
362 | #define sparc_unmapiorange(va,len) BTFIXUP_CALL(sparc_unmapiorange)(va,len) | ||
363 | 366 | ||
364 | extern int invalid_segment; | 367 | extern int invalid_segment; |
365 | 368 | ||
366 | /* Encode and de-code a swap entry */ | 369 | /* Encode and de-code a swap entry */ |
367 | BTFIXUPDEF_CALL(unsigned long, __swp_type, swp_entry_t) | 370 | static inline unsigned long __swp_type(swp_entry_t entry) |
368 | BTFIXUPDEF_CALL(unsigned long, __swp_offset, swp_entry_t) | 371 | { |
369 | BTFIXUPDEF_CALL(swp_entry_t, __swp_entry, unsigned long, unsigned long) | 372 | return (entry.val >> SRMMU_SWP_TYPE_SHIFT) & SRMMU_SWP_TYPE_MASK; |
373 | } | ||
370 | 374 | ||
371 | #define __swp_type(__x) BTFIXUP_CALL(__swp_type)(__x) | 375 | static inline unsigned long __swp_offset(swp_entry_t entry) |
372 | #define __swp_offset(__x) BTFIXUP_CALL(__swp_offset)(__x) | 376 | { |
373 | #define __swp_entry(__type,__off) BTFIXUP_CALL(__swp_entry)(__type,__off) | 377 | return (entry.val >> SRMMU_SWP_OFF_SHIFT) & SRMMU_SWP_OFF_MASK; |
378 | } | ||
379 | |||
380 | static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset) | ||
381 | { | ||
382 | return (swp_entry_t) { | ||
383 | (type & SRMMU_SWP_TYPE_MASK) << SRMMU_SWP_TYPE_SHIFT | ||
384 | | (offset & SRMMU_SWP_OFF_MASK) << SRMMU_SWP_OFF_SHIFT }; | ||
385 | } | ||
374 | 386 | ||
375 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 387 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
376 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 388 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 9b93da1c821a..1720fc294f5e 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -229,7 +229,7 @@ _sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz) | |||
229 | } | 229 | } |
230 | 230 | ||
231 | pa &= PAGE_MASK; | 231 | pa &= PAGE_MASK; |
232 | sparc_mapiorange(bus, pa, res->start, resource_size(res)); | 232 | srmmu_mapiorange(bus, pa, res->start, resource_size(res)); |
233 | 233 | ||
234 | return (void __iomem *)(unsigned long)(res->start + offset); | 234 | return (void __iomem *)(unsigned long)(res->start + offset); |
235 | } | 235 | } |
@@ -243,7 +243,7 @@ static void _sparc_free_io(struct resource *res) | |||
243 | 243 | ||
244 | plen = resource_size(res); | 244 | plen = resource_size(res); |
245 | BUG_ON((plen & (PAGE_SIZE-1)) != 0); | 245 | BUG_ON((plen & (PAGE_SIZE-1)) != 0); |
246 | sparc_unmapiorange(res->start, plen); | 246 | srmmu_unmapiorange(res->start, plen); |
247 | release_resource(res); | 247 | release_resource(res); |
248 | } | 248 | } |
249 | 249 | ||
@@ -293,7 +293,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len, | |||
293 | } | 293 | } |
294 | 294 | ||
295 | // XXX The mmu_map_dma_area does this for us below, see comments. | 295 | // XXX The mmu_map_dma_area does this for us below, see comments. |
296 | // sparc_mapiorange(0, virt_to_phys(va), res->start, len_total); | 296 | // srmmu_mapiorange(0, virt_to_phys(va), res->start, len_total); |
297 | /* | 297 | /* |
298 | * XXX That's where sdev would be used. Currently we load | 298 | * XXX That's where sdev would be used. Currently we load |
299 | * all iommu tables with the same translations. | 299 | * all iommu tables with the same translations. |
@@ -464,7 +464,7 @@ static void *pci32_alloc_coherent(struct device *dev, size_t len, | |||
464 | printk("pci_alloc_consistent: cannot occupy 0x%lx", len_total); | 464 | printk("pci_alloc_consistent: cannot occupy 0x%lx", len_total); |
465 | goto err_nova; | 465 | goto err_nova; |
466 | } | 466 | } |
467 | sparc_mapiorange(0, virt_to_phys(va), res->start, len_total); | 467 | srmmu_mapiorange(0, virt_to_phys(va), res->start, len_total); |
468 | 468 | ||
469 | *pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */ | 469 | *pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */ |
470 | return (void *) res->start; | 470 | return (void *) res->start; |
@@ -509,7 +509,7 @@ static void pci32_free_coherent(struct device *dev, size_t n, void *p, | |||
509 | } | 509 | } |
510 | 510 | ||
511 | dma_make_coherent(ba, n); | 511 | dma_make_coherent(ba, n); |
512 | sparc_unmapiorange((unsigned long)p, n); | 512 | srmmu_unmapiorange((unsigned long)p, n); |
513 | 513 | ||
514 | release_resource(res); | 514 | release_resource(res); |
515 | kfree(res); | 515 | kfree(res); |
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index d9487d851843..32cec268c2c1 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -109,10 +109,6 @@ void *srmmu_nocache_pool; | |||
109 | void *srmmu_nocache_bitmap; | 109 | void *srmmu_nocache_bitmap; |
110 | static struct bit_map srmmu_nocache_map; | 110 | static struct bit_map srmmu_nocache_map; |
111 | 111 | ||
112 | static inline unsigned long srmmu_pgd_page(pgd_t pgd) | ||
113 | { return srmmu_device_memory(pgd_val(pgd))?~0:(unsigned long)__nocache_va((pgd_val(pgd) & SRMMU_PTD_PMASK) << 4); } | ||
114 | |||
115 | |||
116 | static inline int srmmu_pte_none(pte_t pte) | 112 | static inline int srmmu_pte_none(pte_t pte) |
117 | { return !(pte_val(pte) & 0xFFFFFFF); } | 113 | { return !(pte_val(pte) & 0xFFFFFFF); } |
118 | 114 | ||
@@ -163,15 +159,8 @@ static inline pte_t srmmu_pte_modify(pte_t pte, pgprot_t newprot) | |||
163 | static inline pgd_t *srmmu_pgd_offset(struct mm_struct * mm, unsigned long address) | 159 | static inline pgd_t *srmmu_pgd_offset(struct mm_struct * mm, unsigned long address) |
164 | { return mm->pgd + (address >> SRMMU_PGDIR_SHIFT); } | 160 | { return mm->pgd + (address >> SRMMU_PGDIR_SHIFT); } |
165 | 161 | ||
166 | /* Find an entry in the second-level page table.. */ | ||
167 | static inline pmd_t *srmmu_pmd_offset(pgd_t * dir, unsigned long address) | ||
168 | { | ||
169 | return (pmd_t *) srmmu_pgd_page(*dir) + | ||
170 | ((address >> PMD_SHIFT) & (PTRS_PER_PMD - 1)); | ||
171 | } | ||
172 | |||
173 | /* Find an entry in the third-level page table.. */ | 162 | /* Find an entry in the third-level page table.. */ |
174 | static inline pte_t *srmmu_pte_offset(pmd_t * dir, unsigned long address) | 163 | pte_t *pte_offset_kernel(pmd_t * dir, unsigned long address) |
175 | { | 164 | { |
176 | void *pte; | 165 | void *pte; |
177 | 166 | ||
@@ -180,23 +169,6 @@ static inline pte_t *srmmu_pte_offset(pmd_t * dir, unsigned long address) | |||
180 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); | 169 | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)); |
181 | } | 170 | } |
182 | 171 | ||
183 | static unsigned long srmmu_swp_type(swp_entry_t entry) | ||
184 | { | ||
185 | return (entry.val >> SRMMU_SWP_TYPE_SHIFT) & SRMMU_SWP_TYPE_MASK; | ||
186 | } | ||
187 | |||
188 | static unsigned long srmmu_swp_offset(swp_entry_t entry) | ||
189 | { | ||
190 | return (entry.val >> SRMMU_SWP_OFF_SHIFT) & SRMMU_SWP_OFF_MASK; | ||
191 | } | ||
192 | |||
193 | static swp_entry_t srmmu_swp_entry(unsigned long type, unsigned long offset) | ||
194 | { | ||
195 | return (swp_entry_t) { | ||
196 | (type & SRMMU_SWP_TYPE_MASK) << SRMMU_SWP_TYPE_SHIFT | ||
197 | | (offset & SRMMU_SWP_OFF_MASK) << SRMMU_SWP_OFF_SHIFT }; | ||
198 | } | ||
199 | |||
200 | /* | 172 | /* |
201 | * size: bytes to allocate in the nocache area. | 173 | * size: bytes to allocate in the nocache area. |
202 | * align: bytes, number to align at. | 174 | * align: bytes, number to align at. |
@@ -333,8 +305,8 @@ static void __init srmmu_nocache_init(void) | |||
333 | 305 | ||
334 | while (vaddr < srmmu_nocache_end) { | 306 | while (vaddr < srmmu_nocache_end) { |
335 | pgd = pgd_offset_k(vaddr); | 307 | pgd = pgd_offset_k(vaddr); |
336 | pmd = srmmu_pmd_offset(__nocache_fix(pgd), vaddr); | 308 | pmd = pmd_offset(__nocache_fix(pgd), vaddr); |
337 | pte = srmmu_pte_offset(__nocache_fix(pmd), vaddr); | 309 | pte = pte_offset_kernel(__nocache_fix(pmd), vaddr); |
338 | 310 | ||
339 | pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV); | 311 | pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV); |
340 | 312 | ||
@@ -467,8 +439,8 @@ static inline void srmmu_mapioaddr(unsigned long physaddr, | |||
467 | 439 | ||
468 | physaddr &= PAGE_MASK; | 440 | physaddr &= PAGE_MASK; |
469 | pgdp = pgd_offset_k(virt_addr); | 441 | pgdp = pgd_offset_k(virt_addr); |
470 | pmdp = srmmu_pmd_offset(pgdp, virt_addr); | 442 | pmdp = pmd_offset(pgdp, virt_addr); |
471 | ptep = srmmu_pte_offset(pmdp, virt_addr); | 443 | ptep = pte_offset_kernel(pmdp, virt_addr); |
472 | tmp = (physaddr >> 4) | SRMMU_ET_PTE; | 444 | tmp = (physaddr >> 4) | SRMMU_ET_PTE; |
473 | 445 | ||
474 | /* | 446 | /* |
@@ -482,8 +454,8 @@ static inline void srmmu_mapioaddr(unsigned long physaddr, | |||
482 | set_pte(ptep, __pte(tmp)); | 454 | set_pte(ptep, __pte(tmp)); |
483 | } | 455 | } |
484 | 456 | ||
485 | static void srmmu_mapiorange(unsigned int bus, unsigned long xpa, | 457 | void srmmu_mapiorange(unsigned int bus, unsigned long xpa, |
486 | unsigned long xva, unsigned int len) | 458 | unsigned long xva, unsigned int len) |
487 | { | 459 | { |
488 | while (len != 0) { | 460 | while (len != 0) { |
489 | len -= PAGE_SIZE; | 461 | len -= PAGE_SIZE; |
@@ -501,14 +473,14 @@ static inline void srmmu_unmapioaddr(unsigned long virt_addr) | |||
501 | pte_t *ptep; | 473 | pte_t *ptep; |
502 | 474 | ||
503 | pgdp = pgd_offset_k(virt_addr); | 475 | pgdp = pgd_offset_k(virt_addr); |
504 | pmdp = srmmu_pmd_offset(pgdp, virt_addr); | 476 | pmdp = pmd_offset(pgdp, virt_addr); |
505 | ptep = srmmu_pte_offset(pmdp, virt_addr); | 477 | ptep = pte_offset_kernel(pmdp, virt_addr); |
506 | 478 | ||
507 | /* No need to flush uncacheable page. */ | 479 | /* No need to flush uncacheable page. */ |
508 | __pte_clear(ptep); | 480 | __pte_clear(ptep); |
509 | } | 481 | } |
510 | 482 | ||
511 | static void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len) | 483 | void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len) |
512 | { | 484 | { |
513 | while (len != 0) { | 485 | while (len != 0) { |
514 | len -= PAGE_SIZE; | 486 | len -= PAGE_SIZE; |
@@ -949,7 +921,7 @@ static void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, | |||
949 | memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE); | 921 | memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE); |
950 | pgd_set(__nocache_fix(pgdp), pmdp); | 922 | pgd_set(__nocache_fix(pgdp), pmdp); |
951 | } | 923 | } |
952 | pmdp = srmmu_pmd_offset(__nocache_fix(pgdp), start); | 924 | pmdp = pmd_offset(__nocache_fix(pgdp), start); |
953 | if(srmmu_pmd_none(*(pmd_t *)__nocache_fix(pmdp))) { | 925 | if(srmmu_pmd_none(*(pmd_t *)__nocache_fix(pmdp))) { |
954 | ptep = (pte_t *)__srmmu_get_nocache(PTE_SIZE, PTE_SIZE); | 926 | ptep = (pte_t *)__srmmu_get_nocache(PTE_SIZE, PTE_SIZE); |
955 | if (ptep == NULL) | 927 | if (ptep == NULL) |
@@ -979,7 +951,7 @@ static void __init srmmu_allocate_ptable_skeleton(unsigned long start, | |||
979 | memset(pmdp, 0, SRMMU_PMD_TABLE_SIZE); | 951 | memset(pmdp, 0, SRMMU_PMD_TABLE_SIZE); |
980 | pgd_set(pgdp, pmdp); | 952 | pgd_set(pgdp, pmdp); |
981 | } | 953 | } |
982 | pmdp = srmmu_pmd_offset(pgdp, start); | 954 | pmdp = pmd_offset(pgdp, start); |
983 | if(srmmu_pmd_none(*pmdp)) { | 955 | if(srmmu_pmd_none(*pmdp)) { |
984 | ptep = (pte_t *) __srmmu_get_nocache(PTE_SIZE, | 956 | ptep = (pte_t *) __srmmu_get_nocache(PTE_SIZE, |
985 | PTE_SIZE); | 957 | PTE_SIZE); |
@@ -1045,7 +1017,7 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start, | |||
1045 | memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE); | 1017 | memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE); |
1046 | pgd_set(__nocache_fix(pgdp), pmdp); | 1018 | pgd_set(__nocache_fix(pgdp), pmdp); |
1047 | } | 1019 | } |
1048 | pmdp = srmmu_pmd_offset(__nocache_fix(pgdp), start); | 1020 | pmdp = pmd_offset(__nocache_fix(pgdp), start); |
1049 | if(srmmu_pmd_none(*(pmd_t *)__nocache_fix(pmdp))) { | 1021 | if(srmmu_pmd_none(*(pmd_t *)__nocache_fix(pmdp))) { |
1050 | ptep = (pte_t *) __srmmu_get_nocache(PTE_SIZE, | 1022 | ptep = (pte_t *) __srmmu_get_nocache(PTE_SIZE, |
1051 | PTE_SIZE); | 1023 | PTE_SIZE); |
@@ -1066,7 +1038,7 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start, | |||
1066 | start += SRMMU_REAL_PMD_SIZE; | 1038 | start += SRMMU_REAL_PMD_SIZE; |
1067 | continue; | 1039 | continue; |
1068 | } | 1040 | } |
1069 | ptep = srmmu_pte_offset(__nocache_fix(pmdp), start); | 1041 | ptep = pte_offset_kernel(__nocache_fix(pmdp), start); |
1070 | *(pte_t *)__nocache_fix(ptep) = __pte(prompte); | 1042 | *(pte_t *)__nocache_fix(ptep) = __pte(prompte); |
1071 | start += PAGE_SIZE; | 1043 | start += PAGE_SIZE; |
1072 | } | 1044 | } |
@@ -1200,8 +1172,8 @@ void __init srmmu_paging_init(void) | |||
1200 | srmmu_allocate_ptable_skeleton(PKMAP_BASE, PKMAP_END); | 1172 | srmmu_allocate_ptable_skeleton(PKMAP_BASE, PKMAP_END); |
1201 | 1173 | ||
1202 | pgd = pgd_offset_k(PKMAP_BASE); | 1174 | pgd = pgd_offset_k(PKMAP_BASE); |
1203 | pmd = srmmu_pmd_offset(pgd, PKMAP_BASE); | 1175 | pmd = pmd_offset(pgd, PKMAP_BASE); |
1204 | pte = srmmu_pte_offset(pmd, PKMAP_BASE); | 1176 | pte = pte_offset_kernel(pmd, PKMAP_BASE); |
1205 | pkmap_page_table = pte; | 1177 | pkmap_page_table = pte; |
1206 | 1178 | ||
1207 | flush_cache_all(); | 1179 | flush_cache_all(); |
@@ -1233,7 +1205,7 @@ void __init srmmu_paging_init(void) | |||
1233 | } | 1205 | } |
1234 | } | 1206 | } |
1235 | 1207 | ||
1236 | static void srmmu_mmu_info(struct seq_file *m) | 1208 | void mmu_info(struct seq_file *m) |
1237 | { | 1209 | { |
1238 | seq_printf(m, | 1210 | seq_printf(m, |
1239 | "MMU type\t: %s\n" | 1211 | "MMU type\t: %s\n" |
@@ -2015,24 +1987,9 @@ void __init load_mmu(void) | |||
2015 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); | 1987 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); |
2016 | #endif | 1988 | #endif |
2017 | 1989 | ||
2018 | BTFIXUPSET_CALL(pgd_page_vaddr, srmmu_pgd_page, BTFIXUPCALL_NORM); | ||
2019 | |||
2020 | BTFIXUPSET_INT(pte_modify_mask, SRMMU_CHG_MASK); | ||
2021 | BTFIXUPSET_CALL(pmd_offset, srmmu_pmd_offset, BTFIXUPCALL_NORM); | ||
2022 | BTFIXUPSET_CALL(pte_offset_kernel, srmmu_pte_offset, BTFIXUPCALL_NORM); | ||
2023 | |||
2024 | BTFIXUPSET_CALL(update_mmu_cache, srmmu_update_mmu_cache, BTFIXUPCALL_NOP); | 1990 | BTFIXUPSET_CALL(update_mmu_cache, srmmu_update_mmu_cache, BTFIXUPCALL_NOP); |
2025 | BTFIXUPSET_CALL(destroy_context, srmmu_destroy_context, BTFIXUPCALL_NORM); | 1991 | BTFIXUPSET_CALL(destroy_context, srmmu_destroy_context, BTFIXUPCALL_NORM); |
2026 | 1992 | ||
2027 | BTFIXUPSET_CALL(sparc_mapiorange, srmmu_mapiorange, BTFIXUPCALL_NORM); | ||
2028 | BTFIXUPSET_CALL(sparc_unmapiorange, srmmu_unmapiorange, BTFIXUPCALL_NORM); | ||
2029 | |||
2030 | BTFIXUPSET_CALL(__swp_type, srmmu_swp_type, BTFIXUPCALL_NORM); | ||
2031 | BTFIXUPSET_CALL(__swp_offset, srmmu_swp_offset, BTFIXUPCALL_NORM); | ||
2032 | BTFIXUPSET_CALL(__swp_entry, srmmu_swp_entry, BTFIXUPCALL_NORM); | ||
2033 | |||
2034 | BTFIXUPSET_CALL(mmu_info, srmmu_mmu_info, BTFIXUPCALL_NORM); | ||
2035 | |||
2036 | get_srmmu_type(); | 1993 | get_srmmu_type(); |
2037 | 1994 | ||
2038 | #ifdef CONFIG_SMP | 1995 | #ifdef CONFIG_SMP |