Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1409831ybb; Wed, 25 Mar 2020 23:36:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvUwp46N6SUQCZlPcTMG8YDqZ8A9vuNrf8GqHOQ3v8pwBAZIFnYXe8AZgd+iUsxqJUcyQJ3 X-Received: by 2002:a4a:95a8:: with SMTP id o37mr4000359ooi.40.1585204575085; Wed, 25 Mar 2020 23:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585204575; cv=none; d=google.com; s=arc-20160816; b=nIlZDEBeaxMTbMUA4EKa89386ZdkVSB/rkn4Z8Eyr118bLl5FL+ZQZvxEJeGnFdgpL 7x2lTNspc7YtOf4sT6QI82+Zc/Y71cGCjPYz5JmfEohWrF5b8dS6eDGcT+WhPFxmOGUj n7Re4QLyH5wXAwfiGrbgr7sBhDHl3nxILLFlixk+WqRJ/KdFC25E6Sf5+rHvTNBahNLv B2XpTpcf1uftHtbogVshXp4VoINN+kYpQSDRNyey4q+N7RvQbGIwJ6hC1hHAHUkmSPdF YzO0WH81Jp8ctr6tPz0r7BrBiNiFfoUwXOyui/xe01C+TIn8ZDzqTwNjgBvJVDroAf35 raTw== 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=VvC8QWnRmOzqEdjQGHBaXkBEi8rPPx/mAf1Yd60724Y=; b=BgtebbiBYeCvTxLVLt17kb4uM16I70zG8LtvJazTpVKh73ShNGvXYmPOzoJQ8IlVUj OYan0Sy0Mkh2YR+rBOD2J+Iy7han6FwJwIt9qkDnOu0DzgDEBrfH5lpFIMbrODbaZJBM KVGzNXM7VvDcz9MzhgIKARi7lXoMI7zI4UTcDXIdTsVgaLb1dN9hy2fR5kKQsJgNCs6W pr8t1qs5yU6Hmii3bJuNo/EVbmEdcr165FeTFBun12UBneDr3tn7jfhl8t78xtqutoKH 42DiInltx85R+AOm6khpuvgtMEv6CoglcRW0+MHXNOfcsZlLnNrgXIi3N7ggZP1uihm3 EWKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=XIw3VO3h; 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 f23si629868oti.283.2020.03.25.23.36.00; Wed, 25 Mar 2020 23:36:15 -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=XIw3VO3h; 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 S1726347AbgCZGea (ORCPT + 99 others); Thu, 26 Mar 2020 02:34:30 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41152 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726260AbgCZGea (ORCPT ); Thu, 26 Mar 2020 02:34:30 -0400 Received: by mail-wr1-f67.google.com with SMTP id h9so6309150wrc.8 for ; Wed, 25 Mar 2020 23:34:28 -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=VvC8QWnRmOzqEdjQGHBaXkBEi8rPPx/mAf1Yd60724Y=; b=XIw3VO3hEq6zt6MobHP3j6xdFLWc2Kvz+WkoIGGpWwNupn9Ca+EHaMd4PFTAYiX3JF k04sBP/lyz1jna9TM5k623xovRZWs/idDiR7Vq1/XxFBL6Frwxh58SS9ZLh82gYkqK68 22zXeAgdVzWpYw78loeATN75/nyVZiyA1BoYxagrTGxnLo5iH8VWiKlcognYINb8mKgY TnR2/JtNKJ9bN3uUzBkee2ZXz6XDEjFj76aQrvHP1Ikfxm0y1ZK2nHNoFBZIJSbn0Bey 4rPOS3WPldP0qzjR6x+3fgfRXeg4rwhYo8AzdkcVZV6fXq6LySqDJiPED/YPT9OzsGfr y6YA== 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=VvC8QWnRmOzqEdjQGHBaXkBEi8rPPx/mAf1Yd60724Y=; b=eqPbzEzP3LMEQlmX7h0h+Lalqy3w44JEPkhkdsXiS5PJ1GpctBVt2SOnjkzodF96jH 3RJWqLTvSiJwMe72kpVSkmu/vvmelGbSdzPzSXqhGQiHa1l+dZfN2onh9J4Y2G+gG7O1 gVpgJCLkflipWGxdw+Q7uC0hiOyta6VHLbMbmC1FBbv9gsILfnM8Sq1QnmhgY9fRK8rU gp0w8053ieA9eRYjLOKHW0PMke07XfJwfGbX25IeYwqfBvC6l1N9e7rziDCTgsu1QAPK vgzFPFupdusrPJpLACn9zylB5A0DCcph5ioPjUCm+waliRpuExLc0tULhhrxlUi8hnAl IWWA== X-Gm-Message-State: ANhLgQ2VFo/HPjuE9A5u0Egafx305FYPDLREsA78ZsEbc0LlDjpHdZuQ cx1X1iAuqCehCtm/3WoqpizGEsFOW/9Do5Xe1RbcZg== X-Received: by 2002:a5d:4acd:: with SMTP id y13mr7464097wrs.61.1585204467653; Wed, 25 Mar 2020 23:34:27 -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 12:04:15 +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. Ignore my previous comment. I see that you are setting the PAGE_OFFSET to 0xffffc00000000000 in the next PATCH. The commit description is can bit improved as follows: Either the user specifies maximum physical memory size of 2GB or the user lives with the current system constraint which is 1/4th of maximum addressable memory in Sv39 MMU mode (i.e. 128GB) for now. Other than above, looks good to me. Reviewed-by: Anup Patel Regards, Anup > > 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 >