Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp697414pxb; Wed, 29 Sep 2021 07:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEwOXld1vKcMYwOZ4ejvrr7JUcx9wu79oCpt/3Xa70Cxxxw5AQrWppq4kplD67R7E6JWII X-Received: by 2002:a17:906:7804:: with SMTP id u4mr165631ejm.462.1632927323916; Wed, 29 Sep 2021 07:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632927323; cv=none; d=google.com; s=arc-20160816; b=Uuxxq2aFG/G6EYCSeVf81yUJC+s9dWPtdHDFS/TcsJP4vxKOxTrTrWbXGL9pdb8vCP GaOYwITdG+PR9cwwmHJ111jt4WibAE8y68dMouXAOVzRSsDb5wozbf/LWLG9T3wCHsiv yvsrP5Rz/BSxdiynpAaUy4hxCbVcul+/IUQB6T0ex6hccon/HyZ9Zs2+yX8kJi+PGtt0 og9BOyQYj4oqHGwbXpZdhXxXBAmIW6MWKk36uw+w3avNrn4tgFT2+wSob6dkUFCpGzyT +P0C7yoUxNBB8nH5V042EAXja3pFgcdKI6N5nRfBPM224VfEqRkxhQA1YveEdK6C8R0u QcvQ== 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 :dkim-signature; bh=omlMO8oiSqY28NQ++6IIM/VRVI4+XjHYuKkKGp3z8ks=; b=Et/2eEdphIObKyqi1tJh+Xb1u9nLtPxIKoSzE7yBqUQQS+4Ue/B/tJJNMQH9kEBecS YVH6vNANxkzCU3xnMjkLHZ6nt/PWXmt3jzj3/FWLiua7MySoSyop6yaYD0OBdpUMuotw rAcy4NDUshJl90QLMMAumsp4jzd1jSDZE/pXYWrkJ6QD9Og3v4G3VkNzbxOsbqgv7ma5 Ucya5iK7NbKy7J3S6/PDZ06UqJSJO90zEd4K5TiX15YgO/FKdZgJvIpn2AlW5uZBnLsU n4bUNqA/70oMY3jnY90KVDuQQbdOjyD8Vb3OM3Zag8Jfxih2l53Lp9+NWc0WvkoS/fc4 pGjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Nnsvahvh; 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=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si127921edr.209.2021.09.29.07.54.59; Wed, 29 Sep 2021 07:55:23 -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; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Nnsvahvh; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344763AbhI2OzU (ORCPT + 99 others); Wed, 29 Sep 2021 10:55:20 -0400 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]:60044 "EHLO smtp-relay-internal-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344650AbhI2OzS (ORCPT ); Wed, 29 Sep 2021 10:55:18 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 3059740601 for ; Wed, 29 Sep 2021 14:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632927217; bh=omlMO8oiSqY28NQ++6IIM/VRVI4+XjHYuKkKGp3z8ks=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NnsvahvhgKa0JVQnmFo6KCW8+rV1UBjyJpyMOvr53+0PKX607FxXoNaqg7zzv1c0R hvdSR/280oZGDLKnGMQObJ5VHXuKjK+Dl+JvtoPAD1DHWGtJGApIz6kAn6UzJkmzbP LvupAjr2yJ1BnL+EFcVMa2T3jIqwHA8wSKdxdRkuVnMWEG32OgGj88O3ntYJCIYw4d YEoSx4ziNsTkVYhLXnEhyxcINWo7BrCirt6NzkZ8BXxGcENZEtpfve4/Dpgrn5JzbU D472VFNeTZQnn2MO+JqA4iQzPtp2COd8MFcbt8W/EC/kdL0frXOa+Ezwd5q4Wh0fnW JbQQlKObLd21w== Received: by mail-wr1-f69.google.com with SMTP id k2-20020adfc702000000b0016006b2da9bso700546wrg.1 for ; Wed, 29 Sep 2021 07:53:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=omlMO8oiSqY28NQ++6IIM/VRVI4+XjHYuKkKGp3z8ks=; b=nzWI5GUBl+JiG+2cOlim++Fx2mfcghB9PpVqvPxwtdOcRLRVSCwr65uUzMqshb5g1A 6gUIRsvTZLhPB0rtK4/RszGg+seohWrrU6ywmiJoqGB6R/oqKJBDq9O5jXqDx0OoqLO7 aXtNIKyLsP1xobwci7BxaedkDShDxiikm6x6MW7DAJmqZujXminiWIqIBvLvKJol246q VylcQQegrKfYfpAWLLApOP93DfmUzciYnaTpJRwYHqoOPiCWtBN16QcoBmC1ZXuWYrcg wQ14yIfb9YcEeig/n6tCtO3KNALepzJIusxHV/UJ43JO+PIfg4XSst7q0MX6JsHFnXp+ UJAQ== X-Gm-Message-State: AOAM531a3IfukCOpPduFbGIaJU3N30/Zw5E6t6KFM5r6zJ0GE/cCUEKg 9CN62qjDg5MmU+zJqNkcLKvCCAyXXjuiqED3Ii3iBLus2XpUJ/oxBrms/2SQCjZTSOENVPBcoP6 +X1i5/ypwz/0QbmO+mPimOKZgg5X+yxKSOXqgw6cykA== X-Received: by 2002:a1c:7e48:: with SMTP id z69mr6608692wmc.95.1632927216592; Wed, 29 Sep 2021 07:53:36 -0700 (PDT) X-Received: by 2002:a1c:7e48:: with SMTP id z69mr6608661wmc.95.1632927216369; Wed, 29 Sep 2021 07:53:36 -0700 (PDT) Received: from alex.home (lfbn-lyo-1-470-249.w2-7.abo.wanadoo.fr. [2.7.60.249]) by smtp.gmail.com with ESMTPSA id g1sm2428205wmk.2.2021.09.29.07.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 07:53:36 -0700 (PDT) From: Alexandre Ghiti To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Zong Li , Anup Patel , Atish Patra , Christoph Hellwig , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Ard Biesheuvel , Arnd Bergmann , Kees Cook , Guo Ren , Heinrich Schuchardt , Mayuresh Chitale , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-efi@vger.kernel.org, linux-arch@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH v2 02/10] riscv: Get rid of MAXPHYSMEM configs Date: Wed, 29 Sep 2021 16:51:05 +0200 Message-Id: <20210929145113.1935778-3-alexandre.ghiti@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210929145113.1935778-1-alexandre.ghiti@canonical.com> References: <20210929145113.1935778-1-alexandre.ghiti@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CONFIG_MAXPHYSMEM_* were 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, I suspect that commit 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") which moved the kernel to 0xffffffff80000000 broke the MAXPHYSMEM_2GB config which defined PAGE_OFFSET at the same address. Signed-off-by: Alexandre Ghiti --- arch/riscv/Kconfig | 23 ++----------------- arch/riscv/configs/nommu_k210_defconfig | 1 - .../riscv/configs/nommu_k210_sdcard_defconfig | 1 - arch/riscv/configs/nommu_virt_defconfig | 1 - 4 files changed, 2 insertions(+), 24 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index ee61ecae3ae0..13e9c4298fbc 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -147,10 +147,9 @@ config MMU 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 ARCH_FLATMEM_ENABLE def_bool !NUMA @@ -256,24 +255,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 diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig index b16a2a12c82a..dae9179984cc 100644 --- a/arch/riscv/configs/nommu_k210_defconfig +++ b/arch/riscv/configs/nommu_k210_defconfig @@ -30,7 +30,6 @@ 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" diff --git a/arch/riscv/configs/nommu_k210_sdcard_defconfig b/arch/riscv/configs/nommu_k210_sdcard_defconfig index 61f887f65419..03f91525a059 100644 --- a/arch/riscv/configs/nommu_k210_sdcard_defconfig +++ b/arch/riscv/configs/nommu_k210_sdcard_defconfig @@ -22,7 +22,6 @@ 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" diff --git a/arch/riscv/configs/nommu_virt_defconfig b/arch/riscv/configs/nommu_virt_defconfig index e046a0babde4..f224be697785 100644 --- 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 -- 2.30.2