Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2943340pxb; Tue, 12 Jan 2021 02:26:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjjPG/JfQY8BxpSZp+BIvOK5iGpBDhQ+9W03iqDJ7+LLqpBOEs9cVRe2pXXhiY8h2eckG0 X-Received: by 2002:a17:906:2e16:: with SMTP id n22mr2766658eji.477.1610447181776; Tue, 12 Jan 2021 02:26:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610447181; cv=none; d=google.com; s=arc-20160816; b=OyO2p0Ih1AlKzDIgC0jGJjhxtXcPMCSUG3hdXng/fZ3zPpuRf0p/9A5ifNQc4+0FnN E4TT45c9eGOo8IXme7myGURB5oc9B+vcFrHcQ+acky4Q5DoI72CnS/GF50n34ZqYdCuP hRDvUWDZl/lj+izRF3Lrb2veVicAwvgK6ENMqAG99xW1hpfrNzPHyZ2QafkH+/sVhoBb 0D6bRYQBsKS3HY7Xa9KBHgs/u4rcP1KMbhZbiwn3RJ9kwoJIau2cAm1tIe1EQD1JVyDs IUYb/nRvHvEuWqlNlc+3BI3QeIqnvf5vG0/IGDbNWkd6HqqJWpfSrca1kqlEF0iKoDq+ HdUg== 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 :wdcironportexception:ironport-sdr:ironport-sdr:ironport-sdr :dkim-signature; bh=3ja84ze2jlBnZOdJtY4T31xTAzwmsnRuGMOTOoGG41M=; b=BDLodbAxvEVqjGdl2LyyA9gCYfasD1VeT45+GgdibJ/YC7Z6rvBkYRhnNKM57aurMw Q3MQXButVbgGNqiElNTT3kt5z/fTQDvBYD31YCqpAuvxjMymyOMtgJ9Lj08JbdUry7JO 2dJeBwz+YJS+Ut8Kc21Y3jYybNPd55OccvHOmPZRQs/CA3ReUHp4TAMq7bZbX215NMU4 pNBsIxf3tw1bbCiCXX2P24BXB1ExZfih7tkLpEmBI9xnypKl/KDUIJCwil+DtJ1KsdC1 teB53An2xdmM8r+Rlj9vmRQa2iLtdSkjvgrnv0b2Thq5XYTLraaR789uXUI8j421ihnB awJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=WxD35NP3; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si928105eja.412.2021.01.12.02.25.57; Tue, 12 Jan 2021 02:26:21 -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; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=WxD35NP3; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391592AbhALAZM (ORCPT + 99 others); Mon, 11 Jan 2021 19:25:12 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:47494 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404204AbhAKXsM (ORCPT ); Mon, 11 Jan 2021 18:48:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1610408891; x=1641944891; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+/8BmP8C7btVepEdnOtx9sho7KAoL9aXx1ciJIHqe4c=; b=WxD35NP3WlFmQ3qwhIhSQNmbrHd/uzcy2tmStcBrKNPVPZBHUphyZ98v PtTRBqtGPw45QcEukwP3RdDMp8Nye9fKsIpv+dw1uyrfbdH3Y2PdoewMj TFetblz5UU0Bq62XmhfZUV/fFMc9L5dHPYAR+3DNypLkbXGToT0u2jjtv 5IyinS0y49PH0PiNvvcky1mj6T8SQIxYIRto/M4JZwG7ATbzDTR1UnARp MLF2ufCJgoLdOGt7yqBMgUsxq7vdXvmrcXlXG+CMIhDdrmaSSXrTJXDHb y9GCs6Uj1/PAPTy8dLHFm0pEq7CVrrHZpkmkq9zCMpJ/pQ3qBWsSKdxVd Q==; IronPort-SDR: uXk9FAurF492VsggGknBd/QAeTJ+T+4XyZwpPLIK651np4tpTX3UHbB3l8PGfVFaWAOZIuNo7I tZBT6EpwfK4KdzApPSpTY98cfJ9skzF9ibD7h8UpsYjV9VHcXsQZfWLv4hzJKn1QxGbQYNQqhB +OGV45jP/90P/PKEXe9HRPkApGIaVmAM0ES0JEEZfH6a49cj+k32VqtnEmP2XQJPZL6QVpKm1o 6T2u9EgZH0UaLtH9u3PcloL1eh9LJFJxAretpRkL7vSEqjJmetHsotg5fIrXui5t+NTCei4DDN e3Y= X-IronPort-AV: E=Sophos;i="5.79,339,1602518400"; d="scan'208";a="157190577" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 12 Jan 2021 07:45:21 +0800 IronPort-SDR: +bUHhmdSx/ghF1LKWkrUrpgQRqq/ozJcBxn7aVDiixhs0w7kpBgdZ6HCkgwe95frmr3XbgWECx Kph8fFlqPSJKnCSO8TiCAqM/h++09vzP3Dpn2WrDczyFW4YDJmLTx0KlV57GBUrF+kcvYjK1oS wdFJ1Rv1Z2bbRo+0viePCxuIjPI2dhInFboadOXF1Z1GzU3h36ntSmr8SKJicMmSMSPhSHO/JR l0aoWa9g23jEyWzIf7LDF9rQOuL74AAW2ESrLMCxzfumpOnM3bXoG26UKRF85KdmrhqVjvohQO M3ac2+By9A3Ctoop1PYaP6yr Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 15:28:15 -0800 IronPort-SDR: zFde0dV1F7ht98QYkLAXJBORMAjs7tHP3IEAYTIWsA4CUz13AiLqT4r5/9B7sGzVCQj6Arl1F+ BOv2cKIrsO9wh6aJHd+ew9712SjYCDn0RdQBli4/sR3xKuEMybGbGBoNnXV/664RTCo8k/cbjq 5D3ZdxYmNucNrCFlp7lNQR6mloDBG1f0AsjygumfCSo3sF5hl289xRO2iMVxG4Q2lqSvnxNboa YVd7oah5XAGLjlXnEhZl//krMn/kjLrO9ITDtYEn7cQKOTlKylcAgNuWteZ85PO9NI5iFkHLlo DrY= WDCIronportException: Internal Received: from usa002483.ad.shared (HELO jedi-01.hgst.com) ([10.86.62.194]) by uls-op-cesaip02.wdc.com with ESMTP; 11 Jan 2021 15:45:21 -0800 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Anup Patel , Albert Ou , Andrew Morton , Ard Biesheuvel , linux-riscv@lists.infradead.org, Mike Rapoport , Palmer Dabbelt , Paul Walmsley Subject: [PATCH v2 4/4] RISC-V: Fix maximum allowed phsyical memory for RV32 Date: Mon, 11 Jan 2021 15:45:04 -0800 Message-Id: <20210111234504.3782179-5-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210111234504.3782179-1-atish.patra@wdc.com> References: <20210111234504.3782179-1-atish.patra@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linux kernel can only map 1GB of address space for RV32 as the page offset is set to 0xC0000000. The current description in the Kconfig is confusing as it indicates that RV32 can support 2GB of physical memory. That is simply not true for current kernel. In future, a 2GB split support can be added to allow 2GB physical address space. Reviewed-by: Anup Patel Signed-off-by: Atish Patra --- arch/riscv/Kconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 81b76d44725d..e9e2c1f0a690 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -137,7 +137,7 @@ config PA_BITS config PAGE_OFFSET hex - default 0xC0000000 if 32BIT && MAXPHYSMEM_2GB + default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB default 0x80000000 if 64BIT && !MMU default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB @@ -247,10 +247,12 @@ config MODULE_SECTIONS choice prompt "Maximum Physical Memory" - default MAXPHYSMEM_2GB if 32BIT + default MAXPHYSMEM_1GB if 32BIT default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY + config MAXPHYSMEM_1GB + bool "1GiB" config MAXPHYSMEM_2GB bool "2GiB" config MAXPHYSMEM_128GB -- 2.25.1