linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Rich Felker <dalias@libc.org>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	"x86@kernel.org" <x86@kernel.org>,
	Michal Hocko <mhocko@kernel.org>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	Max Filippov <jcmvbkbc@gmail.com>, Guo Ren <guoren@kernel.org>,
	Ley Foon Tan <ley.foon.tan@intel.com>,
	"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	Greg Ungerer <gerg@linux-m68k.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"linux-c6x-dev@linux-c6x.org" <linux-c6x-dev@linux-c6x.org>,
	Baoquan He <bhe@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>lin
Subject: Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order
Date: Thu, 7 May 2020 23:59:00 +0300	[thread overview]
Message-ID: <20200507205900.GH683243@linux.ibm.com> (raw)
In-Reply-To: <20200505201522.GA683243@linux.ibm.com>

On Tue, May 05, 2020 at 11:15:22PM +0300, Mike Rapoport wrote:
> On Tue, May 05, 2020 at 06:07:46PM +0000, Vineet Gupta wrote:
> > On 5/5/20 2:19 AM, Mike Rapoport wrote:
> 
> >  - Is it not better to have the core retain the flexibility just in case
> 
> If the requirement to have support for 3-banks is a theoretical
> possibility, I would prefer to adjust ARC's version of
> arch_has_descending_max_zone_pfns() to cope with either of 2-banks
> configuration (PAE40 and non-PAE40) and deal with the third bank when/if
> it actually materializes.
> 
> > Thx,
> > -Vineet
> 

The fix below should take care of any 2-bank configurations. 
This is vs. current mmotm.

From eb8124fb3584607d1036b7ae00c8092ae43e480d Mon Sep 17 00:00:00 2001
From: Mike Rapoport <rppt@linux.ibm.com>
Date: Thu, 7 May 2020 23:44:15 +0300
Subject: [PATCH] arc: free_area_init(): take into account PAE40 mode

The arch_has_descending_max_zone_pfns() does not take into account physical
memory layout for PAE40 configuration.
With PAE40 enabled, the HIGHMEM is actually higher than NORMAL and
arch_has_descending_max_zone_pfns() should return false in this case.

Signed-off-by: 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 386959bac3d2..e7bdc2ac1c87 100644
--- a/arch/arc/mm/init.c
+++ b/arch/arc/mm/init.c
@@ -79,7 +79,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 
 bool arch_has_descending_max_zone_pfns(void)
 {
-	return true;
+	return !IS_ENABLED(CONFIG_ARC_HAS_PAE40);
 }
 
 /*
-- 
2.26.1


-- 
Sincerely yours,
Mike.

  reply	other threads:[~2020-05-07 20:59 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 12:11 [PATCH v2 00/20] mm: rework free_area_init*() funcitons Mike Rapoport
2020-04-29 12:11 ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 01/20] mm: memblock: replace dereferences of memblock_region.nid with API calls Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 02/20] mm: make early_pfn_to_nid() and related defintions close to each other Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 03/20] mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-05-26 17:11   ` Catalin Marinas
2020-04-29 12:11 ` [PATCH v2 04/20] mm: free_area_init: use maximal zone PFNs rather than zone sizes Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 05/20] mm: use free_area_init() instead of free_area_init_nodes() Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-05-26 17:13   ` Catalin Marinas
2020-04-29 12:11 ` [PATCH v2 06/20] alpha: simplify detection of memory zone boundaries Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 07/20] arm: " Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 08/20] arm64: simplify detection of memory zone boundaries for UMA configs Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-05-26 17:15   ` Catalin Marinas
2020-04-29 12:11 ` [PATCH v2 09/20] csky: simplify detection of memory zone boundaries Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 10/20] m68k: mm: " Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 11/20] parisc: " Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 12/20] sparc32: " Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 13/20] unicore32: " Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 14/20] xtensa: " Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 15/20] mm: memmap_init: iterate over memblock regions rather that check each PFN Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 16/20] mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 14:17   ` Christoph Hellwig
2020-04-29 14:33     ` Mike Rapoport
2020-04-29 14:33       ` Mike Rapoport
2020-04-29 16:29   ` [PATCH v2.5 " Mike Rapoport
2020-04-29 16:29     ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-05-03 17:41   ` Guenter Roeck
2020-05-03 18:43     ` Guenter Roeck
2020-05-04 15:39       ` Mike Rapoport
2020-05-04 15:39         ` Mike Rapoport
2020-05-05  6:23         ` Vineet Gupta
2020-05-05  9:19           ` Mike Rapoport
2020-05-05 18:07             ` Vineet Gupta
2020-05-05 20:15               ` Mike Rapoport
2020-05-07 20:59                 ` Mike Rapoport [this message]
2020-05-07 21:21                   ` Vineet Gupta
2020-05-05 13:18         ` Guenter Roeck
2020-05-05 13:45           ` Mike Rapoport
2020-05-05 17:27           ` Vineet Gupta
2020-04-29 12:11 ` [PATCH v2 18/20] mm: clean up free_area_init_node() and its helpers Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 19/20] mm: simplify find_min_pfn_with_active_regions() Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport
2020-04-29 12:11 ` [PATCH v2 20/20] docs/vm: update memory-models documentation Mike Rapoport
2020-04-29 12:11   ` Mike Rapoport

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=20200507205900.GH683243@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=dalias@libc.org \
    --cc=gerg@linux-m68k.org \
    --cc=guoren@kernel.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=ley.foon.tan@intel.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-c6x-dev@linux-c6x.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=x86@kernel.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).