Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] powerpc: Remove calculation of io hole

In mm_init_ppc64() we calculate the location of the "IO hole", but then
no one ever looks at the value. So don't bother.

That's actually all mm_init_ppc64() does, so get rid of it too.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Michael Ellerman and committed by
Paul Mackerras
f8642ebe 6c600ad8

-53
-2
arch/powerpc/kernel/setup_64.c
··· 497 497 #endif 498 498 printk("-----------------------------------------------------\n"); 499 499 500 - mm_init_ppc64(); 501 - 502 500 DBG(" <- setup_system()\n"); 503 501 } 504 502
-48
arch/powerpc/mm/init_64.c
··· 84 84 /* max amount of RAM to use */ 85 85 unsigned long __max_memory; 86 86 87 - /* info on what we think the IO hole is */ 88 - unsigned long io_hole_start; 89 - unsigned long io_hole_size; 90 - 91 - /* 92 - * Do very early mm setup. 93 - */ 94 - void __init mm_init_ppc64(void) 95 - { 96 - #ifndef CONFIG_PPC_ISERIES 97 - unsigned long i; 98 - #endif 99 - 100 - ppc64_boot_msg(0x100, "MM Init"); 101 - 102 - /* This is the story of the IO hole... please, keep seated, 103 - * unfortunately, we are out of oxygen masks at the moment. 104 - * So we need some rough way to tell where your big IO hole 105 - * is. On pmac, it's between 2G and 4G, on POWER3, it's around 106 - * that area as well, on POWER4 we don't have one, etc... 107 - * We need that as a "hint" when sizing the TCE table on POWER3 108 - * So far, the simplest way that seem work well enough for us it 109 - * to just assume that the first discontinuity in our physical 110 - * RAM layout is the IO hole. That may not be correct in the future 111 - * (and isn't on iSeries but then we don't care ;) 112 - */ 113 - 114 - #ifndef CONFIG_PPC_ISERIES 115 - for (i = 1; i < lmb.memory.cnt; i++) { 116 - unsigned long base, prevbase, prevsize; 117 - 118 - prevbase = lmb.memory.region[i-1].base; 119 - prevsize = lmb.memory.region[i-1].size; 120 - base = lmb.memory.region[i].base; 121 - if (base > (prevbase + prevsize)) { 122 - io_hole_start = prevbase + prevsize; 123 - io_hole_size = base - (prevbase + prevsize); 124 - break; 125 - } 126 - } 127 - #endif /* CONFIG_PPC_ISERIES */ 128 - if (io_hole_start) 129 - printk("IO Hole assumed to be %lx -> %lx\n", 130 - io_hole_start, io_hole_start + io_hole_size - 1); 131 - 132 - ppc64_boot_msg(0x100, "MM Init Done"); 133 - } 134 - 135 87 void free_initmem(void) 136 88 { 137 89 unsigned long addr;
-2
include/asm-powerpc/lmb.h
··· 54 54 55 55 extern void lmb_dump_all(void); 56 56 57 - extern unsigned long io_hole_start; 58 - 59 57 static inline unsigned long 60 58 lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) 61 59 {
-1
include/asm-powerpc/mmu.h
··· 236 236 extern void hpte_init_native(void); 237 237 extern void hpte_init_lpar(void); 238 238 extern void hpte_init_iSeries(void); 239 - extern void mm_init_ppc64(void); 240 239 241 240 extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, 242 241 unsigned long va, unsigned long prpn,