powerpc: Move memory size print into common show_cpuinfo for 32-bit
Most of the platforms were printing the size of the memory in their show_cpuinfo implementations. This moves that to the common show_cpuinfo, so that all 32-bit platforms will now print the size of memory. I also update the code to deal with the fact that total_memory is now a phys_addr_t. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
934752d8a4
commit
f465df81a8
@@ -59,6 +59,7 @@
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/xmon.h>
|
||||
#include <asm/cputhreads.h>
|
||||
#include <mm/mmu_decl.h>
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
@@ -190,6 +191,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
if (ppc_md.show_cpuinfo != NULL)
|
||||
ppc_md.show_cpuinfo(m);
|
||||
|
||||
#ifdef CONFIG_PPC32
|
||||
/* Display the amount of memory */
|
||||
seq_printf(m, "Memory\t\t: %d MB\n",
|
||||
(unsigned int)(total_memory / (1024 * 1024)));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user