Skip to content

Commit

Permalink
ARM: 7863/1: Let arm_add_memory() always use 64-bit arguments
Browse files Browse the repository at this point in the history
The DTB and/or the kernel command line may pass
64-bit addresses regardless of kernel configuration,
so update arm_add_memory() to take 64-bit arguments
independently of the phys_addr_t size.

This allows non-wrapping handling of high memory
banks such as the second memory bank of APE6EVM
(at 0x2_0000_0000) in case of 32-bit phys_addr_t.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Magnus Damm authored and Russell King committed Oct 29, 2013
1 parent 1436c1a commit 6a5014a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extern struct meminfo meminfo;
#define bank_phys_end(bank) ((bank)->start + (bank)->size)
#define bank_phys_size(bank) (bank)->size

extern int arm_add_memory(phys_addr_t start, phys_addr_t size);
extern int arm_add_memory(u64 start, u64 size);
extern void early_print(const char *str, ...);
extern void dump_machine_table(void);

Expand Down
6 changes: 3 additions & 3 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ void __init dump_machine_table(void)
/* can't use cpu_relax() here as it may require MMU setup */;
}

int __init arm_add_memory(phys_addr_t start, phys_addr_t size)
int __init arm_add_memory(u64 start, u64 size)
{
struct membank *bank = &meminfo.bank[meminfo.nr_banks];

Expand Down Expand Up @@ -671,8 +671,8 @@ int __init arm_add_memory(phys_addr_t start, phys_addr_t size)
static int __init early_mem(char *p)
{
static int usermem __initdata = 0;
phys_addr_t size;
phys_addr_t start;
u64 size;
u64 start;
char *endp;

/*
Expand Down

0 comments on commit 6a5014a

Please sign in to comment.