stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "arm64: set MAX_MEMBLOCK_ADDR according to linear region size" has been added to the 4.1-stable tree
@ 2015-09-23  4:35 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-09-23  4:35 UTC (permalink / raw)
  To: ard.biesheuvel, catalin.marinas, gregkh, stuart.yoder,
	will.deacon
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    arm64: set MAX_MEMBLOCK_ADDR according to linear region size

to the 4.1-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:
     arm64-set-max_memblock_addr-according-to-linear-region-size.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 34ba2c4247e5c4b1542b1106e156af324660c4f0 Mon Sep 17 00:00:00 2001
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Date: Tue, 18 Aug 2015 10:34:42 +0100
Subject: arm64: set MAX_MEMBLOCK_ADDR according to linear region size

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

commit 34ba2c4247e5c4b1542b1106e156af324660c4f0 upstream.

The linear region size of a 39-bit VA kernel is only 256 GB, which
may be insufficient to cover all of system RAM, even on platforms
that have much less than 256 GB of memory but which is laid out
very sparsely.

So make sure we clip the memory we will not be able to map before
installing it into the memblock memory table, by setting
MAX_MEMBLOCK_ADDR accordingly.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/include/asm/memory.h |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -114,6 +114,14 @@ extern phys_addr_t		memstart_addr;
 #define PHYS_OFFSET		({ memstart_addr; })
 
 /*
+ * The maximum physical address that the linear direct mapping
+ * of system RAM can cover. (PAGE_OFFSET can be interpreted as
+ * a 2's complement signed quantity and negated to derive the
+ * maximum size of the linear mapping.)
+ */
+#define MAX_MEMBLOCK_ADDR	({ memstart_addr - PAGE_OFFSET - 1; })
+
+/*
  * PFNs are used to describe any physical page; this means
  * PFN 0 == physical address 0.
  *


Patches currently in stable-queue which might be from ard.biesheuvel@linaro.org are

queue-4.1/arm64-set-max_memblock_addr-according-to-linear-region-size.patch
queue-4.1/arm64-flush-fp-simd-state-correctly-after-execve.patch
queue-4.1/of-fdt-make-memblock-maximum-physical-address-arch-configurable.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-23  4:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-23  4:35 Patch "arm64: set MAX_MEMBLOCK_ADDR according to linear region size" has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).