Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp313586ybg; Wed, 3 Jun 2020 01:16:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPas3Kbe/UGINgBCIw8veInDQ+y4KFNB67qW8+C/qa6BfVQS+vj2KJJuGb/aNqClXPH9OM X-Received: by 2002:a17:906:1d5b:: with SMTP id o27mr19810804ejh.344.1591172190390; Wed, 03 Jun 2020 01:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591172190; cv=none; d=google.com; s=arc-20160816; b=mgtxRpqCuZQOVXu6OYI2r5lzwrWGspXnIBsK0YZacc3b/oZvHFXLQUxD8AYMz3E/p1 RBrgf2r7AGRzh8nU/hXiKA6Giw6/EL0UVkNJD83HzihD3CxeQLk15mYk+tMDV7A0tCEx C++mNnInRhxfxw0t8710D4SneCD+lcawR6rgApFQJuST4mQQL90zOkk2S7kG2gg3276e jPrzSp4hJiuk5LP0VjcDLeFIM3+89m3oiqD6gpylp8cSsYTSmW4CdUCRG2Yg+iACASUT Lpfm03MMb1aFEcV/iHJacBxbAAtyUCwLGQ9opghd/x3oNq9JRJGtczA2hlJMshUqGD9b OyEA== 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=oaVaRzWSPxCFSha8C5K47ELAuQMTSx4Q1wQrKl3AXVLPUm2Dt9kSuHB03Ya0/yr/mT Lj6j7oA0gu+bl13lQkCzNGREbEQEEJTtG74H/QSgFv/3DbYoPR5yBIg7XKM5ER60PTrE TZb1gA80XTlMV5VK7XxctDzSZDpXxjx8iN2YaI/QkH3gJk2SRic/JLxlt7Q8hNA6olnd 2qKli61K/nubfLfEYoHpXe02Lmk8dWWBE7Qkzfe9HHT2E+USulo8ufOSmL/k30lCxVa8 VbicddtHEGBMK39k7N9ManWiBqmma3df8gyTL5hrk8qe9dRwNiI5xRvJqdAkJP1snyv8 fPNQ== 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 t5si730227ejs.458.2020.06.03.01.16.05; Wed, 03 Jun 2020 01:16:30 -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 S1726120AbgFCIOS (ORCPT + 99 others); Wed, 3 Jun 2020 04:14:18 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:47821 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbgFCIOR (ORCPT ); Wed, 3 Jun 2020 04:14:17 -0400 Received: from debian.home (lfbn-gre-1-325-105.w90-112.abo.wanadoo.fr [90.112.45.105]) (Authenticated sender: alex@ghiti.fr) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 14EA020000A; Wed, 3 Jun 2020 08:14:13 +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 v2 3/8] riscv: Simplify MAXPHYSMEM config Date: Wed, 3 Jun 2020 04:10:59 -0400 Message-Id: <20200603081104.14004-4-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200603081104.14004-1-alex@ghiti.fr> References: <20200603081104.14004-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