From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/7] of/fdt: make memblock minimum physical address arch configurable
Date: Wed, 23 Sep 2015 05:45:43 +0100 [thread overview]
Message-ID: <20150923044543.GA4594@svinekod> (raw)
In-Reply-To: <1442968663-31843-2-git-send-email-ard.biesheuvel@linaro.org>
On Wed, Sep 23, 2015 at 01:37:37AM +0100, Ard Biesheuvel wrote:
> By default, early_init_dt_add_memory_arch() ignores memory below
> the base of the kernel image since it won't be addressable via the
> linear mapping. However, this is not appropriate anymore once we
> decouple the kernel text mapping from the linear mapping, so archs
> may want to drop the low limit entirely. So allow the minimum to be
> overridden by setting MIN_MEMBLOCK_ADDR.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
As it's analagou to MAX_MEMBLOCK_ADDR, this makes sense to me.
FWIW:
Acked-by: Mark RUtland <mark.rutland@arm.com>
Mark.
> ---
> drivers/of/fdt.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 6e82bc42373b..5e7ef800a816 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -967,13 +967,16 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
> }
>
> #ifdef CONFIG_HAVE_MEMBLOCK
> +#ifndef MIN_MEMBLOCK_ADDR
> +#define MIN_MEMBLOCK_ADDR __pa(PAGE_OFFSET)
> +#endif
> #ifndef MAX_MEMBLOCK_ADDR
> #define MAX_MEMBLOCK_ADDR ((phys_addr_t)~0)
> #endif
>
> void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
> {
> - const u64 phys_offset = __pa(PAGE_OFFSET);
> + const u64 phys_offset = MIN_MEMBLOCK_ADDR;
>
> if (!PAGE_ALIGNED(base)) {
> if (size < PAGE_SIZE - (base & ~PAGE_MASK)) {
> --
> 1.9.1
>
next prev parent reply other threads:[~2015-09-23 4:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 0:37 [PATCH v2 0/7] arm64: relax Image placement rules Ard Biesheuvel
2015-09-23 0:37 ` [PATCH v2 1/7] of/fdt: make memblock minimum physical address arch configurable Ard Biesheuvel
2015-09-23 4:45 ` Mark Rutland [this message]
2015-09-23 22:59 ` Rob Herring
2015-09-23 0:37 ` [PATCH v2 2/7] arm64: use more granular reservations for static page table allocations Ard Biesheuvel
2015-09-23 0:37 ` [PATCH v2 3/7] arm64: split off early mapping code from early_fixmap_init() Ard Biesheuvel
2015-09-23 0:37 ` [PATCH v2 4/7] arm64: mm: explicitly bootstrap the linear mapping Ard Biesheuvel
2015-09-23 0:37 ` [PATCH v2 5/7] arm64: move kernel mapping out of linear region Ard Biesheuvel
2015-09-23 0:37 ` [PATCH v2 6/7] arm64: map linear region as non-executable Ard Biesheuvel
2015-09-23 0:37 ` [PATCH v2 7/7] arm64: allow kernel Image to be loaded anywhere in physical memory Ard Biesheuvel
2015-10-14 11:30 ` James Morse
2015-10-14 13:25 ` Ard Biesheuvel
2015-10-14 16:34 ` Catalin Marinas
2015-10-14 16:51 ` Ard Biesheuvel
2015-10-15 10:04 ` James Morse
2015-09-24 16:37 ` [PATCH v2 0/7] arm64: relax Image placement rules Suzuki K. Poulose
2015-09-24 16:38 ` Ard Biesheuvel
2015-09-24 23:19 ` Ard Biesheuvel
2015-09-25 8:44 ` Suzuki K. Poulose
2015-09-25 21:53 ` Ard Biesheuvel
2015-10-13 17:07 ` Catalin Marinas
2015-10-13 17:14 ` Ard Biesheuvel
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=20150923044543.GA4594@svinekod \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).