Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4020765ybb; Mon, 6 Apr 2020 22:15:02 -0700 (PDT) X-Google-Smtp-Source: APiQypLHG5Fd7VvyAdVBK83w/UEHyQyn1g/PJEaXqeOA2gPl2L7gla+x2s0T2qH+ni0+RhKkNSNg X-Received: by 2002:aca:c54d:: with SMTP id v74mr424162oif.50.1586236502736; Mon, 06 Apr 2020 22:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586236502; cv=none; d=google.com; s=arc-20160816; b=AreyRkqMOEg3tEHqFv8POz8MjCmDlHveoWBzwfxHwtWvQyriLyWagIyW4ANoyXiLxf CBXJ3VNC86Ru/jLeyevejmppGEE8qJ5DyOSmZ6Je7G41zJlC8xlBQsjW1oFCM/pN5gYD 2hO8g1iE5ymG1KeiyaPpITW59G8DQ6iuzzPDTgjHq//G2re7IjIwCe4Q2YhfUU9lQSd9 9gAyFdNdJ+BKmnQ3jkaWw8qZKhUb8EyW/PReEXi2/J+rCFsn9KCW5hTJTkC3ctcXWhtg +YYshmlQIyebWx4tb5jDmr25sYCq353yiKLrLIYzDTayPPQh1QhCeOr5IqQef0BpW56A 93pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from; bh=WVPQyUKkawzhawwPCzVHVCvw6lB/elD1kxPmPfwQB3A=; b=FvohFP95Cx7OUQMgUfM09ubw7y8piiyZtrsUn7KQkqlifMEf3dvYAcHWFPOl+Rf714 XXL5BeXsdVHU+nLU3pZgTMkXjjOzosKjxnQLA+yDH2tZ3X6nU0TQoJH1u2aL2WZtUESy RsmJg8bQjpQFL1Rs8OsmWuKJCHv67sSMzF9uDk7ayS61M9qPS2Dldh6C3apOhPyIIAwE DsXVLpXmcBpLEw5ZNWxzbOLWIqNkoog1RyaWnKirfjx3lpzDSXH+KaWb5acKIN07xHPn w7A2/MpTe0X6bE/clj6raPWk+hF0ti8Q8+XkhOYfqIvvH074eZfN8pPBgXr77iHWEuCc H9NA== ARC-Authentication-Results: i=1; mx.google.com; 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 c28si809620otd.215.2020.04.06.22.14.50; Mon, 06 Apr 2020 22:15:02 -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; 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 S1726883AbgDGFNS (ORCPT + 99 others); Tue, 7 Apr 2020 01:13:18 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:34223 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbgDGFNS (ORCPT ); Tue, 7 Apr 2020 01:13:18 -0400 Received: from [192.168.1.101] (lfbn-lyo-1-453-25.w2-7.abo.wanadoo.fr [2.7.45.25]) (Authenticated sender: alex@ghiti.fr) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 24AB9200004; Tue, 7 Apr 2020 05:13:10 +0000 (UTC) From: Alex Ghiti Subject: Re: [RFC PATCH 3/7] riscv: Simplify MAXPHYSMEM config To: Palmer Dabbelt Cc: Paul Walmsley , zong.li@sifive.com, anup@brainfault.org, Christoph Hellwig , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: Message-ID: <61d65afd-1650-4e16-b93d-f6d44c95ada7@ghiti.fr> Date: Tue, 7 Apr 2020 01:13:10 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/3/20 11:53 AM, Palmer Dabbelt wrote: > On Sun, 22 Mar 2020 04:00:24 PDT (-0700), alex@ghiti.fr 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" > > I'm not sure this actually helps with anything, but if it's all going > away then it's > fine.  Originally the 2G/128G stuff was there to allow for larger VA > spaces in > the future. With runtime sv48 introduction, whatever we would have used here could have been wrong at runtime, so removing it was easier. Alex