All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: Fix output of total_ram.
@ 2011-07-05  4:44 Tony Breeds
  2011-07-12 12:35 ` Josh Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Breeds @ 2011-07-05  4:44 UTC (permalink / raw)
  To: LinuxPPC-dev, Benjamin Herrenschmidt

On 32bit platforms that support >= 4GB memory total_ram was truncated.
This creates a confusing printk:
	Top of RAM: 0x100000000, Total RAM: 0x0
Fix that:
	Top of RAM: 0x100000000, Total RAM: 0x100000000

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
 arch/powerpc/mm/mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 29d4dde..ac1c3d3 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -249,7 +249,7 @@ static int __init mark_nonram_nosave(void)
  */
 void __init paging_init(void)
 {
-	unsigned long total_ram = memblock_phys_mem_size();
+	unsigned long long total_ram = memblock_phys_mem_size();
 	phys_addr_t top_of_ram = memblock_end_of_DRAM();
 	unsigned long max_zone_pfns[MAX_NR_ZONES];
 
@@ -269,7 +269,7 @@ void __init paging_init(void)
 	kmap_prot = PAGE_KERNEL;
 #endif /* CONFIG_HIGHMEM */
 
-	printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%lx\n",
+	printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%llx\n",
 	       (unsigned long long)top_of_ram, total_ram);
 	printk(KERN_DEBUG "Memory hole size: %ldMB\n",
 	       (long int)((top_of_ram - total_ram) >> 20));
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: Fix output of total_ram.
  2011-07-05  4:44 [PATCH] mm: Fix output of total_ram Tony Breeds
@ 2011-07-12 12:35 ` Josh Boyer
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Boyer @ 2011-07-12 12:35 UTC (permalink / raw)
  To: LinuxPPC-dev, Benjamin Herrenschmidt

On Tue, Jul 5, 2011 at 12:44 AM, Tony Breeds <tony@bakeyournoodle.com> wrot=
e:
> On 32bit platforms that support >=3D 4GB memory total_ram was truncated.
> This creates a confusing printk:
> =A0 =A0 =A0 =A0Top of RAM: 0x100000000, Total RAM: 0x0
> Fix that:
> =A0 =A0 =A0 =A0Top of RAM: 0x100000000, Total RAM: 0x100000000
>
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-12 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-05  4:44 [PATCH] mm: Fix output of total_ram Tony Breeds
2011-07-12 12:35 ` Josh Boyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.