diff options
-rw-r--r-- | arch/ppc64/kernel/lmb.c | 19 | ||||
-rw-r--r-- | arch/ppc64/mm/init.c | 4 | ||||
-rw-r--r-- | include/asm-ppc64/abs_addr.h | 6 |
3 files changed, 2 insertions, 27 deletions
diff --git a/arch/ppc64/kernel/lmb.c b/arch/ppc64/kernel/lmb.c index 6cb275615fc4..111da736652b 100644 --- a/arch/ppc64/kernel/lmb.c +++ b/arch/ppc64/kernel/lmb.c | |||
@@ -313,25 +313,6 @@ lmb_end_of_DRAM(void) | |||
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | 315 | ||
316 | unsigned long __init | ||
317 | lmb_abs_to_phys(unsigned long aa) | ||
318 | { | ||
319 | unsigned long i, pa = aa; | ||
320 | struct lmb *_lmb = &lmb; | ||
321 | struct lmb_region *_mem = &(_lmb->memory); | ||
322 | |||
323 | for (i=0; i < _mem->cnt; i++) { | ||
324 | unsigned long lmbbase = _mem->region[i].base; | ||
325 | unsigned long lmbsize = _mem->region[i].size; | ||
326 | if ( lmb_addrs_overlap(aa,1,lmbbase,lmbsize) ) { | ||
327 | pa = _mem->region[i].physbase + (aa - lmbbase); | ||
328 | break; | ||
329 | } | ||
330 | } | ||
331 | |||
332 | return pa; | ||
333 | } | ||
334 | |||
335 | /* | 316 | /* |
336 | * Truncate the lmb list to memory_limit if it's set | 317 | * Truncate the lmb list to memory_limit if it's set |
337 | * You must call lmb_analyze() after this. | 318 | * You must call lmb_analyze() after this. |
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index 9edfe267123e..a16cf12c586b 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | #include <asm/pgalloc.h> | 43 | #include <asm/pgalloc.h> |
44 | #include <asm/page.h> | 44 | #include <asm/page.h> |
45 | #include <asm/abs_addr.h> | ||
46 | #include <asm/prom.h> | 45 | #include <asm/prom.h> |
47 | #include <asm/lmb.h> | 46 | #include <asm/lmb.h> |
48 | #include <asm/rtas.h> | 47 | #include <asm/rtas.h> |
@@ -167,7 +166,6 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags) | |||
167 | ptep = pte_alloc_kernel(&init_mm, pmdp, ea); | 166 | ptep = pte_alloc_kernel(&init_mm, pmdp, ea); |
168 | if (!ptep) | 167 | if (!ptep) |
169 | return -ENOMEM; | 168 | return -ENOMEM; |
170 | pa = abs_to_phys(pa); | ||
171 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, | 169 | set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT, |
172 | __pgprot(flags))); | 170 | __pgprot(flags))); |
173 | spin_unlock(&init_mm.page_table_lock); | 171 | spin_unlock(&init_mm.page_table_lock); |
@@ -547,7 +545,7 @@ void __init do_init_bootmem(void) | |||
547 | */ | 545 | */ |
548 | bootmap_pages = bootmem_bootmap_pages(total_pages); | 546 | bootmap_pages = bootmem_bootmap_pages(total_pages); |
549 | 547 | ||
550 | start = abs_to_phys(lmb_alloc(bootmap_pages<<PAGE_SHIFT, PAGE_SIZE)); | 548 | start = lmb_alloc(bootmap_pages<<PAGE_SHIFT, PAGE_SIZE); |
551 | BUG_ON(!start); | 549 | BUG_ON(!start); |
552 | 550 | ||
553 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); | 551 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); |
diff --git a/include/asm-ppc64/abs_addr.h b/include/asm-ppc64/abs_addr.h index ab4320c1cf5b..200db1c45f29 100644 --- a/include/asm-ppc64/abs_addr.h +++ b/include/asm-ppc64/abs_addr.h | |||
@@ -56,9 +56,6 @@ static inline unsigned long phys_to_abs(unsigned long pa) | |||
56 | return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); | 56 | return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); |
57 | } | 57 | } |
58 | 58 | ||
59 | /* A macro so it can take pointers or unsigned long. */ | ||
60 | #define abs_to_phys(aa) lmb_abs_to_phys((unsigned long)(aa)) | ||
61 | |||
62 | #else /* !CONFIG_MSCHUNKS */ | 59 | #else /* !CONFIG_MSCHUNKS */ |
63 | 60 | ||
64 | #define chunk_to_addr(chunk) ((unsigned long)(chunk)) | 61 | #define chunk_to_addr(chunk) ((unsigned long)(chunk)) |
@@ -68,12 +65,11 @@ static inline unsigned long phys_to_abs(unsigned long pa) | |||
68 | 65 | ||
69 | #define phys_to_abs(pa) (pa) | 66 | #define phys_to_abs(pa) (pa) |
70 | #define physRpn_to_absRpn(rpn) (rpn) | 67 | #define physRpn_to_absRpn(rpn) (rpn) |
71 | #define abs_to_phys(aa) (aa) | ||
72 | 68 | ||
73 | #endif /* !CONFIG_MSCHUNKS */ | 69 | #endif /* !CONFIG_MSCHUNKS */ |
74 | 70 | ||
75 | /* Convenience macros */ | 71 | /* Convenience macros */ |
76 | #define virt_to_abs(va) phys_to_abs(__pa(va)) | 72 | #define virt_to_abs(va) phys_to_abs(__pa(va)) |
77 | #define abs_to_virt(aa) __va(abs_to_phys(aa)) | 73 | #define abs_to_virt(aa) __va(aa) |
78 | 74 | ||
79 | #endif /* _ABS_ADDR_H */ | 75 | #endif /* _ABS_ADDR_H */ |