[RFC PATCH 15/18] ARM: LPAE: use phys_addr_t for physical start address in early_mem

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Catalin Marinas
Date: Monday, October 25, 2010 - 2:00 am

From: Will Deacon <will.deacon@arm.com>

The physical start address of memory may be > 4GB and therefore
unrepresentable using an unsigned long.

This patch changes early_mem and arm_add_memory to use phys_addr_t
instead of unsigned long for the start address.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm/kernel/setup.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index bfa710d..b1f3fe9 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -407,7 +407,7 @@ static struct machine_desc * __init setup_machine(unsigned int nr)
 	return list;
 }
 
-static int __init arm_add_memory(unsigned long start, unsigned long size)
+static int __init arm_add_memory(phys_addr_t start, unsigned long size)
 {
 	struct membank *bank = &meminfo.bank[meminfo.nr_banks];
 
@@ -443,7 +443,8 @@ static int __init arm_add_memory(unsigned long start, unsigned long size)
 static int __init early_mem(char *p)
 {
 	static int usermem __initdata = 0;
-	unsigned long size, start;
+	unsigned long size;
+	phys_addr_t start;
 	char *endp;
 
 	/*

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 09/18] ARM: LPAE: Add fault handling support, Catalin Marinas, (Mon Oct 25, 2:00 am)
[RFC PATCH 10/18] ARM: LPAE: Add context switching support, Catalin Marinas, (Mon Oct 25, 2:00 am)
[RFC PATCH 15/18] ARM: LPAE: use phys_addr_t for physical ..., Catalin Marinas, (Mon Oct 25, 2:00 am)
[RFC PATCH 16/18] ARM: LPAE: add support for ATAG_MEM64, Catalin Marinas, (Mon Oct 25, 2:01 am)
[RFC PATCH 18/18] ARM: LPAE: Add the Kconfig entries, Catalin Marinas, (Mon Oct 25, 2:01 am)
Re: [RFC PATCH 09/18] ARM: LPAE: Add fault handling support, Kirill A. Shutemov, (Mon Oct 25, 3:17 am)
Re: [RFC PATCH 09/18] ARM: LPAE: Add fault handling support, Catalin Marinas, (Mon Oct 25, 3:35 am)
Re: [RFC PATCH 17/18] ARM: LPAE: define printk format for ..., Kirill A. Shutemov, (Mon Oct 25, 5:01 am)