Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3653926pxb; Mon, 24 Jan 2022 14:31:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaxxfegHQF9tjLMnLq8CpNKuArPppaxMEGkEXpTrJy7+vkhaQVFsJHR4e77cZeriw0eNxo X-Received: by 2002:a62:be09:0:b0:4c6:1af8:e547 with SMTP id l9-20020a62be09000000b004c61af8e547mr15973844pff.3.1643063513223; Mon, 24 Jan 2022 14:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063513; cv=none; d=google.com; s=arc-20160816; b=vtuxm9kSfUzO/kzMZPl66f+ePjdxqITEtr0sdUcMpR8mfpRvqfxBY0O/QLMtQ09kT5 qZfJObdrUGajqR32NrYbz1UyZqJ+G5TiZ6xUAK+vNW7H+hwWsP85tTj1OwtxB1OESV/Q GNKwo4MKrW81GdbPk7/izjJtgZObJQBLnCp7yoKXoTwoeDY53Y5wiabjR4mKTPUUnzL9 5lf2i7lq70fFAXRDnj7dZkArxL3rBSAbUa/y27plyf8K/tARJEylOPyb8Cmsu9TnYRzh LvPrqJiZpY5FSH3C8f2/lp+7kiw4e7CcDWQMuzlvHwqMZYjhmmEMoqrodukHQUJ4quHR 963g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aqHl9PmAwd/xxbZH7Ndwz98H6D3rL/LiIzwjPZF5RYs=; b=IijIRbC3fK0J/4lYNYLGl2qVKSLKhUmCqfYJ55zshFN4eDLLb0tvYd689okVaKuoGK AGlUkJS+X8VRWhMKF8vEd80Ts2Oc3xoOwjKMbV9XKDlmEYZpZhRXRztTGsghEzKIMUWe XkhMGo4mAOfIZxXCYUNnXik+eFbRpnr8y8DfH1PN9ykyvjK15Kih1IMPGN2EEWRdLmq0 RG3x+XkIHCAE5xZ3SgFJZlZ5V3OpX1CrxUFJ0IDtVHaAZx2Hg6fW7HA2GwaFAdCOoz2j 6hJqbOSXh8ymdfC41c3sgLG84w6HNWOzKepZxdSJRb6VPHq7JyeKBBT4cDOcJZ8QoGqr 5Y+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F0erfDtt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z1si6547754plg.542.2022.01.24.14.31.41; Mon, 24 Jan 2022 14:31:53 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=F0erfDtt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1586545AbiAXW0x (ORCPT + 99 others); Mon, 24 Jan 2022 17:26:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390883AbiAXVM6 (ORCPT ); Mon, 24 Jan 2022 16:12:58 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82405C06E004; Mon, 24 Jan 2022 12:10:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4A42DB8122F; Mon, 24 Jan 2022 20:10:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 881F1C340E5; Mon, 24 Jan 2022 20:10:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055037; bh=zp/NYWIKoE3tOdV+Shax2CsA4xFUZ7F/J0Kgo/s5+RE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F0erfDtt3tjN+W4kzCI/2dHR15AJ75KPbRku4deLeKaK+JhrWnF4OMdL2x1s2o0uv 5i5cVyTIkC/bFLBLY6rQAQDVEkk1JHKqKBsmT5lTN/hMhDCLqaxSIKBE5H96hFf07o D77baBY6ZsU7eW68JPJUhMBg57FkZHsSlVY7Ywiw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Alexandre Ghiti , Conor Dooley , Palmer Dabbelt Subject: [PATCH 5.15 021/846] riscv: Get rid of MAXPHYSMEM configs Date: Mon, 24 Jan 2022 19:32:18 +0100 Message-Id: <20220124184101.647245147@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandre Ghiti commit db1503d355a79d1d4255a9996f20e72848b74a56 upstream. CONFIG_MAXPHYSMEM_* are actually never used, even the nommu defconfigs selecting the MAXPHYSMEM_2GB had no effects on PAGE_OFFSET since it was preempted by !MMU case right before. In addition, the move of the kernel mapping at the end of the address space broke the use of MAXPHYSMEM_2G with MMU since it defines PAGE_OFFSET at the same address as the kernel mapping. Reported-by: Geert Uytterhoeven Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Alexandre Ghiti Tested-by: Geert Uytterhoeven Tested-by: Conor Dooley Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/Kconfig | 23 ++--------------------- arch/riscv/configs/nommu_k210_defconfig | 2 -- arch/riscv/configs/nommu_k210_sdcard_defconfig | 2 -- arch/riscv/configs/nommu_virt_defconfig | 1 - 4 files changed, 2 insertions(+), 26 deletions(-) --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -158,10 +158,9 @@ config PA_BITS config PAGE_OFFSET hex - default 0xC0000000 if 32BIT && MAXPHYSMEM_1GB + default 0xC0000000 if 32BIT default 0x80000000 if 64BIT && !MMU - default 0xffffffff80000000 if 64BIT && MAXPHYSMEM_2GB - default 0xffffffe000000000 if 64BIT && MAXPHYSMEM_128GB + default 0xffffffe000000000 if 64BIT config KASAN_SHADOW_OFFSET hex @@ -270,24 +269,6 @@ config MODULE_SECTIONS bool select HAVE_MOD_ARCH_SPECIFIC -choice - prompt "Maximum Physical Memory" - default MAXPHYSMEM_1GB if 32BIT - default MAXPHYSMEM_2GB if 64BIT && CMODEL_MEDLOW - default MAXPHYSMEM_128GB if 64BIT && CMODEL_MEDANY - - config MAXPHYSMEM_1GB - depends on 32BIT - bool "1GiB" - config MAXPHYSMEM_2GB - depends on 64BIT && CMODEL_MEDLOW - bool "2GiB" - config MAXPHYSMEM_128GB - depends on 64BIT && CMODEL_MEDANY - bool "128GiB" -endchoice - - config SMP bool "Symmetric Multi-Processing" help --- a/arch/riscv/configs/nommu_k210_defconfig +++ b/arch/riscv/configs/nommu_k210_defconfig @@ -29,8 +29,6 @@ CONFIG_EMBEDDED=y CONFIG_SLOB=y # CONFIG_MMU is not set CONFIG_SOC_CANAAN=y -CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic" -CONFIG_MAXPHYSMEM_2GB=y CONFIG_SMP=y CONFIG_NR_CPUS=2 CONFIG_CMDLINE="earlycon console=ttySIF0" --- a/arch/riscv/configs/nommu_k210_sdcard_defconfig +++ b/arch/riscv/configs/nommu_k210_sdcard_defconfig @@ -21,8 +21,6 @@ CONFIG_EMBEDDED=y CONFIG_SLOB=y # CONFIG_MMU is not set CONFIG_SOC_CANAAN=y -CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic" -CONFIG_MAXPHYSMEM_2GB=y CONFIG_SMP=y CONFIG_NR_CPUS=2 CONFIG_CMDLINE="earlycon console=ttySIF0 rootdelay=2 root=/dev/mmcblk0p1 ro" --- a/arch/riscv/configs/nommu_virt_defconfig +++ b/arch/riscv/configs/nommu_virt_defconfig @@ -27,7 +27,6 @@ CONFIG_SLOB=y # CONFIG_SLAB_MERGE_DEFAULT is not set # CONFIG_MMU is not set CONFIG_SOC_VIRT=y -CONFIG_MAXPHYSMEM_2GB=y CONFIG_SMP=y CONFIG_CMDLINE="root=/dev/vda rw earlycon=uart8250,mmio,0x10000000,115200n8 console=ttyS0" CONFIG_CMDLINE_FORCE=y