This is a note to let you know that I've just added the patch titled ARM: ignore memory below PHYS_OFFSET to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm-ignore-memory-below-phys_offset.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 571b14375019c3a66ef70d4d4a7083f4238aca30 Mon Sep 17 00:00:00 2001 From: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> Date: Sat, 11 Jan 2014 11:22:18 +0000 Subject: ARM: ignore memory below PHYS_OFFSET From: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> commit 571b14375019c3a66ef70d4d4a7083f4238aca30 upstream. If the kernel is loaded higher in physical memory than normal, and we calculate PHYS_OFFSET higher than the start of RAM, this leads to boot problems as we attempt to map part of this RAM into userspace. Rather than struggle with this, just truncate the mapping. Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> Cc: Wang Nan <wangnan0@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/arm/kernel/setup.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -564,6 +564,20 @@ int __init arm_add_memory(phys_addr_t st } #endif + if (aligned_start < PHYS_OFFSET) { + if (aligned_start + size <= PHYS_OFFSET) { + pr_info("Ignoring memory below PHYS_OFFSET: 0x%08llx-0x%08llx\n", + aligned_start, aligned_start + size); + return -EINVAL; + } + + pr_info("Ignoring memory below PHYS_OFFSET: 0x%08llx-0x%08llx\n", + aligned_start, (u64)PHYS_OFFSET); + + size -= PHYS_OFFSET - aligned_start; + aligned_start = PHYS_OFFSET; + } + bank->start = aligned_start; bank->size = size & ~(phys_addr_t)(PAGE_SIZE - 1); Patches currently in stable-queue which might be from rmk+kernel@xxxxxxxxxxxxxxxx are queue-3.10/arm-ignore-memory-below-phys_offset.patch queue-3.10/arm-7811-1-locks-use-early-clobber-in-arch_spin_trylock.patch queue-3.10/arm-7991-1-sa1100-fix-compile-problem-on-collie.patch queue-3.10/arm-7864-1-handle-64-bit-memory-in-case-of-32-bit-phys_addr_t.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html