sparc32: More memory probing consolidation.

The PROM library function prom_meminit() builds a table,
prom_phys_avail[], just so that probe_memory() in
arch/sparc/mm/fault.c can copy it into sp_banks[].

Just have prom_meminit() fill in the sp_banks[] array directly, and
remove duplicated sort() function.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2008-05-01 22:28:17 -07:00
parent ccc34028d4
commit 9f2b2a5f68
5 changed files with 73 additions and 153 deletions

View File

@@ -180,11 +180,9 @@ static void __init boot_flags_init(char *commands)
/* This routine will in the future do all the nasty prom stuff
* to probe for the mmu type and its parameters, etc. This will
* also be where SMP things happen plus the Sparc specific memory
* physical memory probe as on the alpha.
* also be where SMP things happen.
*/
extern int prom_probe_memory(void);
extern void sun4c_probe_vac(void);
extern char cputypval;
extern unsigned long start, end;
@@ -268,7 +266,6 @@ void __init setup_arch(char **cmdline_p)
if (ARCH_SUN4C_SUN4)
sun4c_probe_vac();
load_mmu();
(void) prom_probe_memory();
phys_base = 0xffffffffUL;
highest_paddr = 0UL;