diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-10-30 11:08:25 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-10-30 11:08:25 +0100 |
commit | a5d00dc3a4b65ed38249f3225e453944c633747b (patch) | |
tree | 6249ca5a5f13059f42890525a9ea7133778f3891 /arch/arm64/kernel/setup.c | |
parent | 1a8506d4402b6e96c2ed778dc7ccbb48d1e02fce (diff) | |
parent | 0914f7961babbf28aaa2f19b453951fb4841c03f (diff) | |
download | op-kernel-dev-a5d00dc3a4b65ed38249f3225e453944c633747b.zip op-kernel-dev-a5d00dc3a4b65ed38249f3225e453944c633747b.tar.gz |
Merge branch 'for-linus' into for-next
... for migrating the core changes for USB-audio disconnection fixes
Diffstat (limited to 'arch/arm64/kernel/setup.c')
-rw-r--r-- | arch/arm64/kernel/setup.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 48ffb9f..7665a9b 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -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); } |