Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334670
b: refs/heads/master
c: f71a1a4
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas committed Oct 18, 2012
1 parent d403ef4 commit 0d8e740
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c60b0c2817bd6a990b08a7651e9cf630414665f5
refs/heads/master: f71a1a42667f576ec736bb1200eba2118fee3a22
12 changes: 12 additions & 0 deletions trunk/arch/arm64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,19 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)

void __init early_init_dt_add_memory_arch(u64 base, u64 size)
{
base &= PAGE_MASK;
size &= PAGE_MASK;
if (base + size < PHYS_OFFSET) {
pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",
base, base + size);
return;
}
if (base < PHYS_OFFSET) {
pr_warning("Ignoring memory range 0x%llx - 0x%llx\n",
base, PHYS_OFFSET);
size -= PHYS_OFFSET - base;
base = PHYS_OFFSET;
}
memblock_add(base, size);
}

Expand Down

0 comments on commit 0d8e740

Please sign in to comment.