Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14071132pxu; Mon, 4 Jan 2021 12:06:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzb/1SaNlpybIV89OJoJUHWliozjBWtpFwH7uhxNivLMb04zs5vWhutXL4nxut+80TDUQIF X-Received: by 2002:a50:ed04:: with SMTP id j4mr73886346eds.84.1609790771469; Mon, 04 Jan 2021 12:06:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609790771; cv=none; d=google.com; s=arc-20160816; b=v3lAXoJnsbi1a3vePd82Qr6pUIY8TONQpQY0BY5ioDSvsGn9hHlKSefoFoyslUEPPi MJDz/wfXaQgjazJBq14MX9SceFjs708r7Ei2Pxdq5zLSP+IeC79dXIWzs5LNZ7m/VJ+t sP8GMsS1AFBVgR+WsuvzbjlmQAcVttxdVYlk5tm/QDCEIQ0PltLTXv6blomI9NKMK+pu LRWwDKdRXPWK8pzwwm32dbi7wN0T/HHBw1KwrLuuLKG8YmjMhz7DyEwrVjrXa8hVdSYd sUuqecE9CjWtR+2ZrYUPktCjqMuexAYCUBxlCdwRHB2JLdfDTeDRUfODY3APvEl0BepN YTUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ghT91cordwyOH2ieLmUTvmmwi29cNx5YrOG5J8Cpcns=; b=k3jMxqU48OYwPmpD9KbJSEFUpVcnjiXoJPKV3+j5zv7spX5bQu8KWxaJ6UAWoU2xvo jfifXmb8zxT50vbb8coyDQoX0GrJh/a3tjL5cztX+oeP92PUut0ymtQmfOOfL+UybicO 8fkXoLr6btwWakKREbL41KJtjd+g7p3dsDmC2HJo6d6280mLtyuWEFhHDKLBGQ1asIOT 5gJges3tdrFQI+Af73zNVWJAKP3p+Jouwqov6DFXOsTcXO9z2BfvdNfC6oGFiFw2OYdw 0OQrGmbf6A8Wl5ajRLJj18qns3fKMo/dscxmvVe/hzGPeHdetvo6pJ3tXHZSu4onXOYh E0+g== 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 x60si32207996ede.80.2021.01.04.12.05.47; Mon, 04 Jan 2021 12:06:11 -0800 (PST) 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 S1727319AbhADUEw (ORCPT + 99 others); Mon, 4 Jan 2021 15:04:52 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:49985 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbhADUEw (ORCPT ); Mon, 4 Jan 2021 15:04:52 -0500 X-Originating-IP: 90.112.190.212 Received: from debian.home (lfbn-gre-1-231-212.w90-112.abo.wanadoo.fr [90.112.190.212]) (Authenticated sender: alex@ghiti.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id CA64720002; Mon, 4 Jan 2021 20:04:08 +0000 (UTC) From: Alexandre Ghiti To: Paul Walmsley , Palmer Dabbelt , Zong Li , Anup Patel , Christoph Hellwig , Ard Biesheuvel , Arnd Bergmann , linux-efi@vger.kernel.org, linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Ghiti Subject: [RFC PATCH 05/12] riscv: Simplify MAXPHYSMEM config Date: Mon, 4 Jan 2021 14:58:33 -0500 Message-Id: <20210104195840.1593-6-alex@ghiti.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210104195840.1593-1-alex@ghiti.fr> References: <20210104195840.1593-1-alex@ghiti.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 2979a44103be..852ab2f7a50d 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -127,7 +127,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 @@ -235,19 +235,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