From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Date: Thu, 07 May 2020 20:59:00 +0000 Subject: Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order Message-Id: <20200507205900.GH683243@linux.ibm.com> List-Id: References: <20200429121126.17989-1-rppt@kernel.org> <20200429121126.17989-18-rppt@kernel.org> <20200503174138.GA114085@roeck-us.net> <20200503184300.GA154219@roeck-us.net> <20200504153901.GM14260@kernel.org> <20200505091946.GG342687@linux.ibm.com> <88b9465b-6e6d-86ca-3776-ccb7a5b60b7f@synopsys.com> <20200505201522.GA683243@linux.ibm.com> In-Reply-To: <20200505201522.GA683243@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Vineet Gupta , Andrew Morton Cc: Rich Felker , "linux-ia64@vger.kernel.org" , "linux-doc@vger.kernel.org" , Catalin Marinas , Heiko Carstens , "x86@kernel.org" , Michal Hocko , "James E.J. Bottomley" , Max Filippov , Guo Ren , Ley Foon Tan , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Greg Ungerer , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-c6x-dev@linux-c6x.org" , Baoquan He , Jonathan Corbet 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: >=20 > > =A0- Is it not better to have the core retain the flexibility just in c= ase >=20 > 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. >=20 > > Thx, > > -Vineet >=20 The fix below should take care of any 2-bank configurations.=20 This is vs. current mmotm. >From eb8124fb3584607d1036b7ae00c8092ae43e480d Mon Sep 17 00:00:00 2001 From: Mike Rapoport 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 --- 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 s= ize) =20 bool arch_has_descending_max_zone_pfns(void) { - return true; + return !IS_ENABLED(CONFIG_ARC_HAS_PAE40); } =20 /* --=20 2.26.1 --=20 Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49278 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbgEGU7x (ORCPT ); Thu, 7 May 2020 16:59:53 -0400 Date: Thu, 7 May 2020 23:59:00 +0300 From: Mike Rapoport Subject: Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order Message-ID: <20200507205900.GH683243@linux.ibm.com> References: <20200429121126.17989-1-rppt@kernel.org> <20200429121126.17989-18-rppt@kernel.org> <20200503174138.GA114085@roeck-us.net> <20200503184300.GA154219@roeck-us.net> <20200504153901.GM14260@kernel.org> <20200505091946.GG342687@linux.ibm.com> <88b9465b-6e6d-86ca-3776-ccb7a5b60b7f@synopsys.com> <20200505201522.GA683243@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200505201522.GA683243@linux.ibm.com> Sender: linux-s390-owner@vger.kernel.org List-ID: To: Vineet Gupta , Andrew Morton Cc: Rich Felker , "linux-ia64@vger.kernel.org" , "linux-doc@vger.kernel.org" , Catalin Marinas , Heiko Carstens , Michal Hocko , "James E.J. Bottomley" , Max Filippov , Guo Ren , "linux-csky@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Greg Ungerer , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-c6x-dev@linux-c6x.org" , Baoquan He , Jonathan Corbet , "linux-sh@vger.kernel.org" , "linux-hexagon@vger.kernel.org" , Helge Deller , "x86@kernel.org" , Russell King , Ley Foon Tan , Geert Uytterhoeven , Guenter Roeck , Mike Rapoport 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: >=20 > > =EF=BF=BD- Is it not better to have the core retain the flexibility jus= t in case >=20 > 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. >=20 > > Thx, > > -Vineet >=20 The fix below should take care of any 2-bank configurations.=20 This is vs. current mmotm. >From eb8124fb3584607d1036b7ae00c8092ae43e480d Mon Sep 17 00:00:00 2001 From: Mike Rapoport 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 --- 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 s= ize) =20 bool arch_has_descending_max_zone_pfns(void) { - return true; + return !IS_ENABLED(CONFIG_ARC_HAS_PAE40); } =20 /* --=20 2.26.1 --=20 Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50840C38A2A for ; Thu, 7 May 2020 20:59:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2512720661 for ; Thu, 7 May 2020 20:59:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726437AbgEGU7x (ORCPT ); Thu, 7 May 2020 16:59:53 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49278 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbgEGU7x (ORCPT ); Thu, 7 May 2020 16:59:53 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047KXEPA092959; Thu, 7 May 2020 16:59:10 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 30ux6fbgv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:59:10 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 047KcG9Q103121; Thu, 7 May 2020 16:59:09 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 30ux6fbgu5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:59:09 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047KpZWI004436; Thu, 7 May 2020 20:59:06 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma01fra.de.ibm.com with ESMTP id 30s0g5cxas-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 20:59:06 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047Kx4uI50593830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 20:59:04 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8698C4C04A; Thu, 7 May 2020 20:59:04 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01C9A4C040; Thu, 7 May 2020 20:59:02 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.201.211]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 May 2020 20:59:01 +0000 (GMT) Date: Thu, 7 May 2020 23:59:00 +0300 From: Mike Rapoport To: Vineet Gupta , Andrew Morton Cc: Rich Felker , "linux-ia64@vger.kernel.org" , "linux-doc@vger.kernel.org" , Catalin Marinas , Heiko Carstens , Michal Hocko , "James E.J. Bottomley" , Max Filippov , Guo Ren , "linux-csky@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Greg Ungerer , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-c6x-dev@linux-c6x.org" , Baoquan He , Jonathan Corbet , "linux-sh@vger.kernel.org" , "linux-hexagon@vger.kernel.org" , Helge Deller , "x86@kernel.org" , Russell King , Ley Foon Tan , Geert Uytterhoeven , Guenter Roeck , Mike Rapoport Subject: Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order Message-ID: <20200507205900.GH683243@linux.ibm.com> References: <20200429121126.17989-1-rppt@kernel.org> <20200429121126.17989-18-rppt@kernel.org> <20200503174138.GA114085@roeck-us.net> <20200503184300.GA154219@roeck-us.net> <20200504153901.GM14260@kernel.org> <20200505091946.GG342687@linux.ibm.com> <88b9465b-6e6d-86ca-3776-ccb7a5b60b7f@synopsys.com> <20200505201522.GA683243@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200505201522.GA683243@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-07_14:2020-05-07,2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=5 phishscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070163 Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org 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 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 --- 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport 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 Message-ID: <20200507205900.GH683243@linux.ibm.com> References: <20200429121126.17989-1-rppt@kernel.org> <20200429121126.17989-18-rppt@kernel.org> <20200503174138.GA114085@roeck-us.net> <20200503184300.GA154219@roeck-us.net> <20200504153901.GM14260@kernel.org> <20200505091946.GG342687@linux.ibm.com> <88b9465b-6e6d-86ca-3776-ccb7a5b60b7f@synopsys.com> <20200505201522.GA683243@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20200505201522.GA683243@linux.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+glpr-linux-riscv=m.gmane-mx.org@lists.infradead.org To: Vineet Gupta , Andrew Morton Cc: Rich Felker , "linux-ia64@vger.kernel.org" , "linux-doc@vger.kernel.org" , Catalin Marinas , Heiko Carstens , "x86@kernel.org" , Michal Hocko , "James E.J. Bottomley" , Max Filippov , Guo Ren , Ley Foon Tan , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Greg Ungerer , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-c6x-dev@linux-c6x.org" , Baoquan He , Jonathan Corbet lin List-Id: linux-arch.vger.kernel.org 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 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 --- 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B461C38A2A for ; Thu, 7 May 2020 20:59:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 247CC20661 for ; Thu, 7 May 2020 20:59:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m0X1p0Rb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 247CC20661 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/OrObKHBe+LHHwlERJdDQpKMV5JFc5D3egzjkGp39YA=; b=m0X1p0Rb21blhxz/1y6niHDY5 D27MSuV44kyELorFZjhPI4HhQB71qIESPOQP2dESlUUCisTDGfdJu7qEaDgLwkug0HofTW2oC04kg KDbbj0OHEoR2Y/G+9jdr45231nXfrq7FuOEKTAGnTft56QO5JiOV57B9NBrF/cPFUsMoolndDyPv9 mEZvZa5LoMZ0w9cHWDpIP5q+5B3zUWf4V+9e7nnfnJFW8QxBU5EQApIx4ka5Wlo7KfpqxrtocqxFT WV1CX08o4QYcVE0Pq/CQMK5jODncWMox84k+rmzKLh7WzMR8TgvC44Mgp0el4RiV3UVQmG6VHmLpw OqgOs/x+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWncF-0003RC-GU; Thu, 07 May 2020 20:59:35 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWncD-0003P2-JP for linux-riscv@lists.infradead.org; Thu, 07 May 2020 20:59:34 +0000 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047KXEPA092959; Thu, 7 May 2020 16:59:10 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 30ux6fbgv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:59:10 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 047KcG9Q103121; Thu, 7 May 2020 16:59:09 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 30ux6fbgu5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:59:09 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047KpZWI004436; Thu, 7 May 2020 20:59:06 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma01fra.de.ibm.com with ESMTP id 30s0g5cxas-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 20:59:06 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047Kx4uI50593830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 20:59:04 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8698C4C04A; Thu, 7 May 2020 20:59:04 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 01C9A4C040; Thu, 7 May 2020 20:59:02 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.201.211]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 May 2020 20:59:01 +0000 (GMT) Date: Thu, 7 May 2020 23:59:00 +0300 From: Mike Rapoport To: Vineet Gupta , Andrew Morton Subject: Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order Message-ID: <20200507205900.GH683243@linux.ibm.com> References: <20200429121126.17989-1-rppt@kernel.org> <20200429121126.17989-18-rppt@kernel.org> <20200503174138.GA114085@roeck-us.net> <20200503184300.GA154219@roeck-us.net> <20200504153901.GM14260@kernel.org> <20200505091946.GG342687@linux.ibm.com> <88b9465b-6e6d-86ca-3776-ccb7a5b60b7f@synopsys.com> <20200505201522.GA683243@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200505201522.GA683243@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-07_14:2020-05-07, 2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=5 phishscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070163 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200507_135933_644934_93F9B143 X-CRM114-Status: GOOD ( 20.51 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , "linux-ia64@vger.kernel.org" , "linux-doc@vger.kernel.org" , Catalin Marinas , Heiko Carstens , "x86@kernel.org" , Michal Hocko , "James E.J. Bottomley" , Max Filippov , Guo Ren , Ley Foon Tan , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Greg Ungerer , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-c6x-dev@linux-c6x.org" , Baoquan He , Jonathan Corbet , "linux-hexagon@vger.kernel.org" , Helge Deller , "linux-sh@vger.kernel.org" , Russell King , "linux-csky@vger.kernel.org" , Geert Uytterhoeven , Guenter Roeck , Mike Rapoport Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org 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 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 --- 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport 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 Message-ID: <20200507205900.GH683243@linux.ibm.com> References: <20200429121126.17989-1-rppt@kernel.org> <20200429121126.17989-18-rppt@kernel.org> <20200503174138.GA114085@roeck-us.net> <20200503184300.GA154219@roeck-us.net> <20200504153901.GM14260@kernel.org> <20200505091946.GG342687@linux.ibm.com> <88b9465b-6e6d-86ca-3776-ccb7a5b60b7f@synopsys.com> <20200505201522.GA683243@linux.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/OrObKHBe+LHHwlERJdDQpKMV5JFc5D3egzjkGp39YA=; b=m0X1p0Rb21blhxz/1y6niHDY5 D27MSuV44kyELorFZjhPI4HhQB71qIESPOQP2dESlUUCisTDGfdJu7qEaDgLwkug0HofTW2oC04kg KDbbj0OHEoR2Y/G+9jdr45231nXfrq7FuOEKTAGnTft56QO5JiOV57B9NBrF/cPFUsMoolndDyPv9 mEZvZa5LoMZ0w9cHWDpIP5q+5B3zUWf4V+9e7nnfnJFW8QxBU5EQApIx4ka5Wlo7KfpqxrtocqxFT WV1CX08o4QYcVE0Pq/CQMK5jODncWMox84k+rmzKLh7WzMR8TgvC44Mgp0el4RiV3UVQmG6VHmLpw OqgOs/x+A==; Content-Disposition: inline In-Reply-To: <20200505201522.GA683243@linux.ibm.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+glpr-linux-riscv=m.gmane-mx.org@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" To: Vineet Gupta , Andrew Morton Cc: Rich Felker , "linux-ia64@vger.kernel.org" , "linux-doc@vger.kernel.org" , Catalin Marinas , Heiko Carstens , "x86@kernel.org" , Michal Hocko , "James E.J. Bottomley" , Max Filippov , Guo Ren , Ley Foon Tan , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Greg Ungerer , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-c6x-dev@linux-c6x.org" , Baoquan He , Jonathan Corbet , lin 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: >=20 > > =A0- Is it not better to have the core retain the flexibility just in c= ase >=20 > 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. >=20 > > Thx, > > -Vineet >=20 The fix below should take care of any 2-bank configurations.=20 This is vs. current mmotm. >From eb8124fb3584607d1036b7ae00c8092ae43e480d Mon Sep 17 00:00:00 2001 From: Mike Rapoport 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 --- 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 s= ize) =20 bool arch_has_descending_max_zone_pfns(void) { - return true; + return !IS_ENABLED(CONFIG_ARC_HAS_PAE40); } =20 /* --=20 2.26.1 --=20 Sincerely yours, Mike.