From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
James Morse <james.morse@arm.com>,
Geoff Levand <geoff@infradead.org>,
Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>,
Dave Young <dyoung@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Pratyush Anand <panand@redhat.com>,
Sameer Goel <sgoel@codeaurora.org>,
David Woodhouse <dwmw2@infradead.org>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH v34 01/14] memblock: add memblock_clear_nomap()
Date: Tue, 28 Mar 2017 10:47:38 +0100 [thread overview]
Message-ID: <CAKv+Gu_Siy5ObfLjXKXk3qRKgB+QQ2ZtJtA0b8-qd8j4q5UhtA@mail.gmail.com> (raw)
In-Reply-To: <20170328065033.15966-1-takahiro.akashi@linaro.org>
On 28 March 2017 at 07:50, AKASHI Takahiro <takahiro.akashi@linaro.org> wrote:
> This function, with a combination of memblock_mark_nomap(), will be used
> in a later kdump patch for arm64 when it temporarily isolates some range
> of memory from the other memory blocks in order to create a specific
> kernel mapping at boot time.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> include/linux/memblock.h | 1 +
> mm/memblock.c | 12 ++++++++++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/include/linux/memblock.h b/include/linux/memblock.h
> index bdfc65af4152..e82daffcfc44 100644
> --- a/include/linux/memblock.h
> +++ b/include/linux/memblock.h
> @@ -93,6 +93,7 @@ int memblock_mark_hotplug(phys_addr_t base, phys_addr_t size);
> int memblock_clear_hotplug(phys_addr_t base, phys_addr_t size);
> int memblock_mark_mirror(phys_addr_t base, phys_addr_t size);
> int memblock_mark_nomap(phys_addr_t base, phys_addr_t size);
> +int memblock_clear_nomap(phys_addr_t base, phys_addr_t size);
> ulong choose_memblock_flags(void);
>
> /* Low level functions */
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 696f06d17c4e..2f4ca8104ea4 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -805,6 +805,18 @@ int __init_memblock memblock_mark_nomap(phys_addr_t base, phys_addr_t size)
> }
>
> /**
> + * memblock_clear_nomap - Clear flag MEMBLOCK_NOMAP for a specified region.
> + * @base: the base phys addr of the region
> + * @size: the size of the region
> + *
> + * Return 0 on success, -errno on failure.
> + */
> +int __init_memblock memblock_clear_nomap(phys_addr_t base, phys_addr_t size)
> +{
> + return memblock_setclr_flag(base, size, 0, MEMBLOCK_NOMAP);
> +}
> +
> +/**
> * __next_reserved_mem_region - next function for for_each_reserved_region()
> * @idx: pointer to u64 loop variable
> * @out_start: ptr to phys_addr_t for start address of the region, can be %NULL
> --
> 2.11.1
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-03-28 9:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170328064831.15894-1-takahiro.akashi@linaro.org>
2017-03-28 6:50 ` AKASHI Takahiro
2017-03-28 9:47 ` Ard Biesheuvel [this message]
2017-03-28 6:50 ` [PATCH v34 02/14] memblock: add memblock_cap_memory_range() AKASHI Takahiro
2017-03-28 9:48 ` 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=CAKv+Gu_Siy5ObfLjXKXk3qRKgB+QQ2ZtJtA0b8-qd8j4q5UhtA@mail.gmail.com \
--to=ard.biesheuvel@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=bauerman@linux.vnet.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=dwmw2@infradead.org \
--cc=dyoung@redhat.com \
--cc=geoff@infradead.org \
--cc=james.morse@arm.com \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=panand@redhat.com \
--cc=sgoel@codeaurora.org \
--cc=takahiro.akashi@linaro.org \
--cc=will.deacon@arm.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