From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Cc: Sascha Hauer <kernel@pengutronix.de>, Tony Lindgren <tony@atomide.com>
Subject: [PATCH] Allow memblock steal operations to remove memory from anywhere
Date: Sun, 12 Aug 2012 11:57:08 +0100 [thread overview]
Message-ID: <20120812105708.GD18957@n2100.arm.linux.org.uk> (raw)
Found this with the cubox, which wants to obtain large blocks of
RAM for the GPU and VPU devices at boot time. I don't believe
any other platforms care where the memory comes from, so I think
this is safe.
However, OMAP and iMX folk should check this patch - thanks.
8<===
From: Russell King <rmk+kernel@arm.linux.org.uk>
Subject: ARM: Allow arm_memblock_steal() to remove memory from any RAM region
Allow arm_memblock_steal() to remove memory from any RAM region,
including highmem areas. This allows memory to be stolen from the
very top of declared memory, including highmem areas, rather than
our precious lowmem.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mm/init.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index f54d592..04632f3 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -324,7 +324,7 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
BUG_ON(!arm_memblock_steal_permitted);
- phys = memblock_alloc(size, align);
+ phys = memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE);
memblock_free(phys, size);
memblock_remove(phys, size);
next reply other threads:[~2012-08-12 10:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-12 10:57 Russell King - ARM Linux [this message]
2012-08-12 12:07 ` [PATCH] Allow memblock steal operations to remove memory from anywhere Sascha Hauer
2012-08-12 12:46 ` Shilimkar, Santosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120812105708.GD18957@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox