From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr
Date: Mon, 15 Sep 2014 18:11:35 +0100 [thread overview]
Message-ID: <20140915171134.GK5415@arm.com> (raw)
In-Reply-To: <1410442661-3383-1-git-send-email-ganapatrao.kulkarni@caviumnetworks.com>
On Thu, Sep 11, 2014 at 02:37:41PM +0100, Ganapatrao Kulkarni wrote:
> In some config cases, max_mapnr is not defined and direct reference
> results in to compilation error.
> This is fixed by using set_max_mapnr() helper.
>
> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@caviumnetworks.com>
> ---
> arch/arm64/mm/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index 5472c24..271e654 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -256,7 +256,7 @@ static void __init free_unused_memmap(void)
> */
> void __init mem_init(void)
> {
> - max_mapnr = pfn_to_page(max_pfn + PHYS_PFN_OFFSET) - mem_map;
> + set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
These are not equivalent as PHYS_PFN_OFFSET is dropped (which looks like
the correct thing to do but the commit log should reflect this as well).
--
Catalin
next prev parent reply other threads:[~2014-09-15 17:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 13:37 [PATCH] arm64:mm: initialize max_mapnr using function set_max_mapnr Ganapatrao Kulkarni
2014-09-11 13:52 ` Will Deacon
2014-09-15 17:11 ` Catalin Marinas [this message]
2014-09-15 18:37 ` Ganapatrao Kulkarni
2014-09-16 17:18 ` Catalin Marinas
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=20140915171134.GK5415@arm.com \
--to=catalin.marinas@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.