aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r--arch/sparc64/mm/init.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 4cad0b32b0a..a9828d748e2 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -610,8 +610,6 @@ static void __init remap_kernel(void)
610 610
611static void __init inherit_prom_mappings(void) 611static void __init inherit_prom_mappings(void)
612{ 612{
613 read_obp_translations();
614
615 /* Now fixup OBP's idea about where we really are mapped. */ 613 /* Now fixup OBP's idea about where we really are mapped. */
616 printk("Remapping the kernel... "); 614 printk("Remapping the kernel... ");
617 remap_kernel(); 615 remap_kernel();
@@ -771,6 +769,9 @@ static void __init find_ramdisk(unsigned long phys_base)
771 initrd_end = ramdisk_image + sparc_ramdisk_size; 769 initrd_end = ramdisk_image + sparc_ramdisk_size;
772 770
773 lmb_reserve(initrd_start, initrd_end); 771 lmb_reserve(initrd_start, initrd_end);
772
773 initrd_start += PAGE_OFFSET;
774 initrd_end += PAGE_OFFSET;
774 } 775 }
775#endif 776#endif
776} 777}
@@ -1744,7 +1745,17 @@ void __init paging_init(void)
1744 1745
1745 lmb_init(); 1746 lmb_init();
1746 1747
1747 /* Find available physical memory... */ 1748 /* Find available physical memory...
1749 *
1750 * Read it twice in order to work around a bug in openfirmware.
1751 * The call to grab this table itself can cause openfirmware to
1752 * allocate memory, which in turn can take away some space from
1753 * the list of available memory. Reading it twice makes sure
1754 * we really do get the final value.
1755 */
1756 read_obp_translations();
1757 read_obp_memory("reg", &pall[0], &pall_ents);
1758 read_obp_memory("available", &pavail[0], &pavail_ents);
1748 read_obp_memory("available", &pavail[0], &pavail_ents); 1759 read_obp_memory("available", &pavail[0], &pavail_ents);
1749 1760
1750 phys_base = 0xffffffffffffffffUL; 1761 phys_base = 0xffffffffffffffffUL;
@@ -1785,8 +1796,6 @@ void __init paging_init(void)
1785 1796
1786 inherit_prom_mappings(); 1797 inherit_prom_mappings();
1787 1798
1788 read_obp_memory("reg", &pall[0], &pall_ents);
1789
1790 init_kpte_bitmap(); 1799 init_kpte_bitmap();
1791 1800
1792 /* Ok, we can use our TLB miss and window trap handlers safely. */ 1801 /* Ok, we can use our TLB miss and window trap handlers safely. */
@@ -2362,16 +2371,3 @@ void __flush_tlb_all(void)
2362 __asm__ __volatile__("wrpr %0, 0, %%pstate" 2371 __asm__ __volatile__("wrpr %0, 0, %%pstate"
2363 : : "r" (pstate)); 2372 : : "r" (pstate));
2364} 2373}
2365
2366#ifdef CONFIG_MEMORY_HOTPLUG
2367
2368void online_page(struct page *page)
2369{
2370 ClearPageReserved(page);
2371 init_page_count(page);
2372 __free_page(page);
2373 totalram_pages++;
2374 num_physpages++;
2375}
2376
2377#endif /* CONFIG_MEMORY_HOTPLUG */