Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp190756ybs; Sun, 24 May 2020 02:16:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaEzHEsIPSPCfaSbPwcx2VaMQhOFlYqIeawysYyGYWZHw1KJ+y81xG+FWMmtwT5NG4IBJx X-Received: by 2002:a17:906:5615:: with SMTP id f21mr14030444ejq.372.1590311778513; Sun, 24 May 2020 02:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590311778; cv=none; d=google.com; s=arc-20160816; b=WBvKtDWXnX8pGM6nBEb0QBQZh47SL9MvaIZ7wd2bsdqri5iETovbw3oDnpHkIi4Pmw Lf13bu8xkenhG44Z24PfS43bhawJxWgTQgEk+h5A/XHCZ8u9tbtKLyyiSQ6lyS0/NvSq 0U7xJzgktIWpII2bbwevtcPRWJLj0t32HgbB3ainf0wAU8Eqb3XTxUBWSLGjk6TDQRJw cz3smhns17o9HkLbjwCMM+OOM/0YAoKzVa3xOgMyiDKHubcwUGXpES+gkm6SD9jk/v/O zddBhcpnk13pGKmR2kRTjUu5jTBTj8RzkflvnaK8izSs9ATJ14aURO/oVqs+fQdDOAqD w0Qw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=B6nI+HGdlLquzt9Sz/96pm+D/CHz6xXYalADcMQmk14=; b=lycAOmI4WJdqvGN6aOk97nW0uAYxUj3S2SOiz9yX4yqr/iZDSMAzZihfqAFkXcTlOd B3kWsusQHRJIblkVeQEGInE6wj9EpAIiHusDwCUbryNepW4j+Hp+YfTMUQnrSEc3VxZC xP1R0+Wi/9izW4ZHfCG3SExN5dky6bJo4nHKovEiBnWrg59MwKLokSVEUtsdFjH18iLk 4PCY6I0CIK+SAjUeNVIFyql8ENL/vcmacple2iYIc+Tb/WLcQ941Iy+p3tBmICXYlgTF 2jNd4ouBxDG93rFHxs1Au/afnTvta8Iian61kE8kacK0udM9PwPF3lvni4xN601bKsCx VF0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id si17si7821070ejb.288.2020.05.24.02.15.56; Sun, 24 May 2020 02:16:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728665AbgEXJNU (ORCPT + 99 others); Sun, 24 May 2020 05:13:20 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:53511 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728252AbgEXJNT (ORCPT ); Sun, 24 May 2020 05:13:19 -0400 X-Originating-IP: 90.112.45.105 Received: from localhost.localdomain (lfbn-gre-1-325-105.w90-112.abo.wanadoo.fr [90.112.45.105]) (Authenticated sender: alex@ghiti.fr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id F3C7BC0003; Sun, 24 May 2020 09:13:15 +0000 (UTC) From: Alexandre Ghiti To: Paul Walmsley , Palmer Dabbelt , Zong Li , Anup Patel , Christoph Hellwig , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH 3/8] riscv: Simplify MAXPHYSMEM config Date: Sun, 24 May 2020 05:10:03 -0400 Message-Id: <20200524091008.25587-4-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200524091008.25587-1-alex@ghiti.fr> References: <20200524091008.25587-1-alex@ghiti.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Either the user specifies maximum physical memory size of 2GB or the user lives with the system constraint which is 1/4th of maximum addressable memory in Sv39 MMU mode (i.e. 128GB) for now. Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel --- arch/riscv/Kconfig | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 64b25a90d60f..e167f16131f4 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -106,7 +106,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 @@ -223,19 +223,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