Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1401481ybb; Wed, 25 Mar 2020 23:23:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuXy7fRMZmv4X8WIyeb1q0RbpkdIQbptBXVkJM+UWMDiF7ER6KSmTIvmgX7OQKnnTODgDSR X-Received: by 2002:a9d:5cc8:: with SMTP id r8mr4092432oti.18.1585203817738; Wed, 25 Mar 2020 23:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585203817; cv=none; d=google.com; s=arc-20160816; b=XSKPa/pYQsOMn+h1qg0toiivdcn3QYUYLkd0KGiMjcSmWMv5biGCSIWxLiO5wly8FV Yv4wHpU4by8toQ9koW5ENoqHGgeP+8oh2U9rSc95PwbQGAA5sSGt0We/YZTYpXCiLRWt 9ifuNTReCUW7WEzuTIgWqbeSc9swvvy07wJmgImBVer8XBhw1LWRmxNehckjr1cCTQUH 4EM+ezU5v0PLOwf5fsUEQnCI3h8XkwO2QVSLzqepma4261nzVHAXPKGHCOYVxq14gnQr eHgwPfo8Oc4t1wxfPIAaFy7pL8vwhLhh+21e2yoi5uDAaSKpvpL3jEy4fXK0UNS69vke PTPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mkmDzl8QbMEyVDVqrUppr7SgDLQJmLXWVe0+y40YkLQ=; b=YPOQsgYsP82Mc4xMxmyW+kt5Bor3hvQOMwC/P6s7hLS1Cdgn4c6fh3HSU0zsIjO8zD ZEF2y6+sylCQJSb1en2qC7DB2qtbkyfgKvqDH6eTyykG4z1J+RJ8A4K7ZEG6hEsnkfd9 BK5e5Yx1kDKLfCV7a/5TjEVTuTSul7mFsIhj+gUGkFLxKISJSfpsbaq8wIItXyEW2boP u18ZLsOEvnU7+13H0dqw1NYYQlzYruYMb+RleD3QooLa8Z4JOfX5rI3CKu2UUhU/RF1P l7Qvp36LCcaBTszieQobWU4dJv+WqaiWBr2s4GGtAfxlsCHDHCxdQ5+bihX6aE5uSQeu dEcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=cp6ZDCxa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si667253oto.260.2020.03.25.23.23.23; Wed, 25 Mar 2020 23:23:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=cp6ZDCxa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726296AbgCZGW6 (ORCPT + 99 others); Thu, 26 Mar 2020 02:22:58 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51276 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgCZGW5 (ORCPT ); Thu, 26 Mar 2020 02:22:57 -0400 Received: by mail-wm1-f65.google.com with SMTP id c187so5249703wme.1 for ; Wed, 25 Mar 2020 23:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mkmDzl8QbMEyVDVqrUppr7SgDLQJmLXWVe0+y40YkLQ=; b=cp6ZDCxaq81LNJbQvsBg96fKgf6ZLLSfrJC1gse9F0mRsZJ/E/CfeduBoijTSjEgI8 92mrlCu/QRyMwysaKbf3S10EvHDt3xUM1gltecPNi0NPXd1h9VYfQZXJv+14KaPehTfF XFK3y4zipTKxlxIC8qG+sIOvEhT843CIBDBrW5aDC3F7hOdzIeOrz9ZzqC452DR7QWml xaPM4bebCKBc7/yoCH1wWbDjIkZAK/JhY777wvCgQVvRpjtgWoNCP6i5HPlaC/1PiMM7 utICdp6oJidA6sGO2ZBX0TwlySPeDBunBWrHQv719z6srOljbJY9NYkH6esvzH2qhB1C dY4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mkmDzl8QbMEyVDVqrUppr7SgDLQJmLXWVe0+y40YkLQ=; b=XecHdhyXQBj92xWBGrfjUcJiFOCNj7tV2vAEgohYcmkWhBxjH/RqTF9wTQg5fNLoh4 IH9qftFE2Lb6znlj7GTaSx3w3etfk9U2yitQx43lqkJGuqXecmyBzz3Eo+UhT3XRmyuM 7pEuqHOYusaOkdYKjDzl9DgvGAdM8ten8WZNyiBdZdL1uCIEafdmhUAwNbjvPHuyeC1u XszmKiMcDWEk2QV6tu39Us25qs80Mf+cBFFikNdg7EFmqLpi5ZeM8VJ+sRUOxAWjX9Tv SLitDyXeCfBd/GfSoQOI6UxQi0256eSB6fZtri9eqfqLf/m+OqxtONwMeLWN0pjLfYoI lGmQ== X-Gm-Message-State: ANhLgQ3XyuYBuvKg2k1xuBNi+ySs6YCvPJt7L2VIDjF8rs9rCDAk/enW 67iHbbyJtge/lh5dGSKvOWATq7E33xFAu+8x/wkfJQ== X-Received: by 2002:a1c:5452:: with SMTP id p18mr1458497wmi.102.1585203774917; Wed, 25 Mar 2020 23:22:54 -0700 (PDT) MIME-Version: 1.0 References: <20200322110028.18279-1-alex@ghiti.fr> <20200322110028.18279-4-alex@ghiti.fr> In-Reply-To: <20200322110028.18279-4-alex@ghiti.fr> From: Anup Patel Date: Thu, 26 Mar 2020 11:52:43 +0530 Message-ID: Subject: Re: [RFC PATCH 3/7] riscv: Simplify MAXPHYSMEM config To: Alexandre Ghiti Cc: Paul Walmsley , Palmer Dabbelt , Zong Li , Christoph Hellwig , linux-riscv , "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 22, 2020 at 4:33 PM Alexandre Ghiti wrote: > > Either the user specifies maximum physical memory size of 2GB or the > user lives with the system constraint which is 128GB in 64BIT for now. > > Signed-off-by: Alexandre Ghiti > --- > arch/riscv/Kconfig | 20 ++++++-------------- > 1 file changed, 6 insertions(+), 14 deletions(-) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index 8e4b1cbcf2c2..a475c78e66bc 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -104,7 +104,7 @@ config PAGE_OFFSET > default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB > default 0x80000000 if 64BIT && !MMU > default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB > - default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB > + default 0xffffffe000000000 if 64BIT && !MAXPHYSMEM_2GB > > config ARCH_FLATMEM_ENABLE > def_bool y > @@ -216,19 +216,11 @@ config MODULE_SECTIONS > bool > select HAVE_MOD_ARCH_SPECIFIC > > -choice > - prompt "Maximum Physical Memory" > - default MAXPHYSMEM_2GB if 32BIT > - default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW > - default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY > - > - config MAXPHYSMEM_2GB > - bool "2GiB" > - config MAXPHYSMEM_128GB > - depends on 64BIT && CMODEL_MEDANY > - bool "128GiB" > -endchoice > - > +config MAXPHYSMEM_2GB > + bool "Maximum Physical Memory 2GiB" > + default y if 32BIT > + default y if 64BIT && CMODEL_MEDLOW > + default n > > config SMP > bool "Symmetric Multi-Processing" > -- > 2.20.1 > Currently, we don't have systems with 256 GB or more memory but I am sure quite a few organizations are working on server class RISC-V. Let's not force RV64 physical memory limit to 128GB by removing MAXPHYSMEM_128GB. On the contrary, I suggest to have more options such as MAXPHYSMEM_256GB, MAXPHYSMEM_512GB, and MAXPHYSMEM_1TB. Regards, Anup