Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6211
b: refs/heads/master
c: e88bcd1
h: refs/heads/master
i:
  6209: e39ee20
  6207: afe06d6
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Aug 29, 2005
1 parent c1a53ff commit 2d34adf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4a0f97020444f83bf22bb9c8c20d8af2b4e6317
refs/heads/master: e88bcd1b29f63738b702e57d831758706162347e
19 changes: 0 additions & 19 deletions trunk/arch/ppc64/kernel/lmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,25 +313,6 @@ lmb_end_of_DRAM(void)
return 0;
}

unsigned long __init
lmb_abs_to_phys(unsigned long aa)
{
unsigned long i, pa = aa;
struct lmb *_lmb = &lmb;
struct lmb_region *_mem = &(_lmb->memory);

for (i=0; i < _mem->cnt; i++) {
unsigned long lmbbase = _mem->region[i].base;
unsigned long lmbsize = _mem->region[i].size;
if ( lmb_addrs_overlap(aa,1,lmbbase,lmbsize) ) {
pa = _mem->region[i].physbase + (aa - lmbbase);
break;
}
}

return pa;
}

/*
* Truncate the lmb list to memory_limit if it's set
* You must call lmb_analyze() after this.
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/ppc64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

#include <asm/pgalloc.h>
#include <asm/page.h>
#include <asm/abs_addr.h>
#include <asm/prom.h>
#include <asm/lmb.h>
#include <asm/rtas.h>
Expand Down Expand Up @@ -167,7 +166,6 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
ptep = pte_alloc_kernel(&init_mm, pmdp, ea);
if (!ptep)
return -ENOMEM;
pa = abs_to_phys(pa);
set_pte_at(&init_mm, ea, ptep, pfn_pte(pa >> PAGE_SHIFT,
__pgprot(flags)));
spin_unlock(&init_mm.page_table_lock);
Expand Down Expand Up @@ -547,7 +545,7 @@ void __init do_init_bootmem(void)
*/
bootmap_pages = bootmem_bootmap_pages(total_pages);

start = abs_to_phys(lmb_alloc(bootmap_pages<<PAGE_SHIFT, PAGE_SIZE));
start = lmb_alloc(bootmap_pages<<PAGE_SHIFT, PAGE_SIZE);
BUG_ON(!start);

boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages);
Expand Down
6 changes: 1 addition & 5 deletions trunk/include/asm-ppc64/abs_addr.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ static inline unsigned long phys_to_abs(unsigned long pa)
return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK);
}

/* A macro so it can take pointers or unsigned long. */
#define abs_to_phys(aa) lmb_abs_to_phys((unsigned long)(aa))

#else /* !CONFIG_MSCHUNKS */

#define chunk_to_addr(chunk) ((unsigned long)(chunk))
Expand All @@ -68,12 +65,11 @@ static inline unsigned long phys_to_abs(unsigned long pa)

#define phys_to_abs(pa) (pa)
#define physRpn_to_absRpn(rpn) (rpn)
#define abs_to_phys(aa) (aa)

#endif /* !CONFIG_MSCHUNKS */

/* Convenience macros */
#define virt_to_abs(va) phys_to_abs(__pa(va))
#define abs_to_virt(aa) __va(abs_to_phys(aa))
#define abs_to_virt(aa) __va(aa)

#endif /* _ABS_ADDR_H */

0 comments on commit 2d34adf

Please sign in to comment.