From: Mike Rapoport <rppt@linux.ibm.com>
To: Vladimir Isaev <Vladimir.Isaev@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org, linux-arch@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARC: Use max_high_pfn as a HIGHMEM zone border
Date: Mon, 26 Apr 2021 14:29:09 +0300 [thread overview]
Message-ID: <YIakBTNpLsPJaj7i@linux.ibm.com> (raw)
In-Reply-To: <20210426101004.42695-1-isaev@synopsys.com>
Hi,
On Mon, Apr 26, 2021 at 01:10:04PM +0300, Vladimir Isaev wrote:
> Commit 4af22ded0ecf ("arc: fix memory initialization for systems with two
> memory banks") fixed highmem, but not for PAE case when highmem is
> actually bigger than lowmem.
>
> Signed-off-by: Vladimir Isaev <isaev@synopsys.com>
> Cc: Mike Rapoport <rppt@linux.ibm.com>
> ---
> arch/arc/mm/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
> index ce07e697916c..59bad6f94105 100644
> --- a/arch/arc/mm/init.c
> +++ b/arch/arc/mm/init.c
> @@ -157,7 +157,7 @@ void __init setup_arch_memory(void)
> min_high_pfn = PFN_DOWN(high_mem_start);
> max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz);
>
> - max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn;
> + max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
This is correct with PAE40, but it will break !PAE40 when "highmem" has
lower addresses than lowmem.
It rather should be something like:
if (IS_ENABLED(CONFIG_ARC_HAS_PAE40))
max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
else
max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn;
>
> high_memory = (void *)(min_high_pfn << PAGE_SHIFT);
>
> --
> 2.16.2
>
--
Sincerely yours,
Mike.
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@linux.ibm.com>
To: Vladimir Isaev <Vladimir.Isaev@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org, linux-arch@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARC: Use max_high_pfn as a HIGHMEM zone border
Date: Mon, 26 Apr 2021 14:29:09 +0300 [thread overview]
Message-ID: <YIakBTNpLsPJaj7i@linux.ibm.com> (raw)
In-Reply-To: <20210426101004.42695-1-isaev@synopsys.com>
Hi,
On Mon, Apr 26, 2021 at 01:10:04PM +0300, Vladimir Isaev wrote:
> Commit 4af22ded0ecf ("arc: fix memory initialization for systems with two
> memory banks") fixed highmem, but not for PAE case when highmem is
> actually bigger than lowmem.
>
> Signed-off-by: Vladimir Isaev <isaev@synopsys.com>
> Cc: Mike Rapoport <rppt@linux.ibm.com>
> ---
> arch/arc/mm/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c
> index ce07e697916c..59bad6f94105 100644
> --- a/arch/arc/mm/init.c
> +++ b/arch/arc/mm/init.c
> @@ -157,7 +157,7 @@ void __init setup_arch_memory(void)
> min_high_pfn = PFN_DOWN(high_mem_start);
> max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz);
>
> - max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn;
> + max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
This is correct with PAE40, but it will break !PAE40 when "highmem" has
lower addresses than lowmem.
It rather should be something like:
if (IS_ENABLED(CONFIG_ARC_HAS_PAE40))
max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
else
max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn;
>
> high_memory = (void *)(min_high_pfn << PAGE_SHIFT);
>
> --
> 2.16.2
>
--
Sincerely yours,
Mike.
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2021-04-26 11:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 10:10 [PATCH] ARC: Use max_high_pfn as a HIGHMEM zone border Vladimir Isaev
2021-04-26 10:10 ` Vladimir Isaev
2021-04-26 11:29 ` Mike Rapoport [this message]
2021-04-26 11:29 ` Mike Rapoport
2021-04-26 11:55 ` Vladimir Isaev
2021-04-26 11:55 ` Vladimir Isaev
2021-04-26 16:15 ` Mike Rapoport
2021-04-26 16:15 ` Mike Rapoport
2021-04-26 16:31 ` Vineet Gupta
2021-04-26 16:31 ` Vineet Gupta
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=YIakBTNpLsPJaj7i@linux.ibm.com \
--to=rppt@linux.ibm.com \
--cc=Vladimir.Isaev@synopsys.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-snps-arc@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.