From patchwork Tue Dec 17 03:48:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13910951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4735FE7717F for ; Tue, 17 Dec 2024 03:48:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C969A6B007B; Mon, 16 Dec 2024 22:48:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C20496B0082; Mon, 16 Dec 2024 22:48:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC0596B0083; Mon, 16 Dec 2024 22:48:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8B2876B007B for ; Mon, 16 Dec 2024 22:48:23 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0639D16040A for ; Tue, 17 Dec 2024 03:48:23 +0000 (UTC) X-FDA: 82903066344.20.8AEFB69 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf10.hostedemail.com (Postfix) with ESMTP id 05895C0008 for ; Tue, 17 Dec 2024 03:48:07 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf10.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734407287; a=rsa-sha256; cv=none; b=K2Hkru+xdouFXXhIo7hmOQj8BWm6z21hMUwOPTeueaUj+o2XJhRh3y2pBvixaTRkpEQ7+6 EiIVHjCKtR4MNKOSUPI8AeptFnFnoVG8GZu9ehaI8fvdKdpPD9rzR4SASloN2hZPmzhA8n wAtC20gAvx+LD2PWTCPLn9V6Jqzaor4= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf10.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734407287; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=c/CARx85000XHBKgmihX+K8OJrtESPIODkKBMnaE4CQ=; b=h/03vnvjogc/KcdkLyJbxOri8vB25X0ned9hPAmHOqumbk4B+Ob7F0qBVEG9SIEt5cFukQ 658dBOJC9b+liCQfwKVkeXCEaNxjREAw9EGdA75J2X8SciT7m55gUoarXXyl91Q/GRp+6Q +xrPnz+67QWamyh6yaAI0HXG6A0XnfM= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 32CDA1063; Mon, 16 Dec 2024 19:48:48 -0800 (PST) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.16.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7C23E3F720; Mon, 16 Dec 2024 19:48:13 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: steven.price@arm.com, Anshuman Khandual , Catalin Marinas , Will Deacon , Jonathan Corbet , Marc Zyngier , Michael Ellerman , Nicholas Piggin , Paul Walmsley , Palmer Dabbelt , Heiko Carstens , Vasily Gorbik , Thomas Gleixner , Ingo Molnar , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org Subject: [PATCH] mm/ptdump: Drop GENERIC_PTDUMP Date: Tue, 17 Dec 2024 09:18:07 +0530 Message-Id: <20241217034807.2541349-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 05895C0008 X-Stat-Signature: by6gj39z4x9519zhybuqkwbxxofm8w7t X-HE-Tag: 1734407287-656278 X-HE-Meta: U2FsdGVkX18Lk7y2SmZVUOGVFSRQricq1j0/4BltWvLDr9LkSEGB4dRlCN6nOok0ZXpAxm3M81OPghYdA2PPX79/ezhchX7wyMXuy9UWFPlmHtGEX513S+lzYW8RJHYkOm+jNVaJU0nE9I0uoHjsivdVu5GcOwZnbHI8TQTc/5C0Y2I5sUUpH0uKHFNhFrKdFY1H4j378dezfwxflfXt0b7zJWFqNtwu+QoWyPx57lkagpNhYyIVv5uwFLtY0bzWcaTgyXkuV6LKNIyHLNnSvgDHLD9T+fu1nGpvSIybIrXXuFmE1SVXTyqJ8xsvV+CKqpBTlULRP9J/Bu1VTml18Yw6qq2zfjYu96CwUQlrnGzzB8fvtsjCNB35oM4GLU7JKcrytHN6BwWNcwBLomG3Baiy0bGa//bSKYw5IpPfhOoyESg4CqFD/RfP0YFo7TzNHIDLrNKpyt53yKE1+gPsTdk6+iAxkc+xb8nwIAzvWiSmwXfyMtfiu9nVYqGuPn1FKniPeszHs7XlrNyquxY6Pde/yTvZ9WzsYdou64+GadtuJ0o4vKh0/qtX65To/l5kV2vvWlRgCgwGZRZ2bPge+utBqfDCCxE3tY/VcfwkkXAoF93kzmb8xmdARrYKUMqx/0wCO2gccIkccSxEwgKmZyNt++JLbxvWTsWioUJHF6ruCjza50JeMpBlqJmMYKXPy4dUh0LiImxTzbs0xmxtRhPe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KSCzy/Q4xkPARG9jVI+gZh5gQruy6ZkHF/Pqco= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: GENERIC_PTDUMP does not guard any code but instead just used for platform's subscription into core ptdump defined under PTDUMP_CORE, which is selected. Instead use PTDUMP_CORE for platform subscription and drop GENERIC_PTDUMP. Cc: Catalin Marinas Cc: Will Deacon Cc: Jonathan Corbet Cc: Marc Zyngier Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kvmarm@lists.linux.dev Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-riscv@lists.infradead.org Cc: linux-s390@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Anshuman Khandual --- This patch applies on v6.13-rc3 and has been tested on arm64, although it also clears build tests on impacted platforms. Documentation/arch/arm64/ptdump.rst | 1 - arch/arm64/Kconfig | 2 +- arch/arm64/kvm/Kconfig | 3 +-- arch/powerpc/Kconfig | 2 +- arch/powerpc/configs/mpc885_ads_defconfig | 1 - arch/riscv/Kconfig | 2 +- arch/s390/Kconfig | 2 +- arch/x86/Kconfig | 2 +- arch/x86/Kconfig.debug | 2 +- kernel/configs/debug.config | 1 - mm/Kconfig.debug | 8 ++------ 11 files changed, 9 insertions(+), 17 deletions(-) diff --git a/Documentation/arch/arm64/ptdump.rst b/Documentation/arch/arm64/ptdump.rst index 5dcfc5d7cddf..61ca040a885b 100644 --- a/Documentation/arch/arm64/ptdump.rst +++ b/Documentation/arch/arm64/ptdump.rst @@ -22,7 +22,6 @@ offlining of memory being accessed by the ptdump code. In order to dump the kernel page tables, enable the following configurations and mount debugfs:: - CONFIG_GENERIC_PTDUMP=y CONFIG_PTDUMP_CORE=y CONFIG_PTDUMP_DEBUGFS=y diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 100570a048c5..b5479c8b454c 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -154,7 +154,7 @@ config ARM64 select GENERIC_IRQ_SHOW_LEVEL select GENERIC_LIB_DEVMEM_IS_ALLOWED select GENERIC_PCI_IOMAP - select GENERIC_PTDUMP + select PTDUMP_CORE select GENERIC_SCHED_CLOCK select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig index ead632ad01b4..fe17d7f5b061 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig @@ -71,8 +71,7 @@ config PTDUMP_STAGE2_DEBUGFS depends on KVM depends on DEBUG_KERNEL depends on DEBUG_FS - depends on GENERIC_PTDUMP - select PTDUMP_CORE + depends on PTDUMP_CORE default n help Say Y here if you want to show the stage-2 kernel pagetables diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index a0ce777f9706..c716f8df10de 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -203,7 +203,7 @@ config PPC select GENERIC_IRQ_SHOW select GENERIC_IRQ_SHOW_LEVEL select GENERIC_PCI_IOMAP if PCI - select GENERIC_PTDUMP + select PTDUMP_CORE select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL select GENERIC_VDSO_TIME_NS diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig index 77306be62e9e..ea6f836407d2 100644 --- a/arch/powerpc/configs/mpc885_ads_defconfig +++ b/arch/powerpc/configs/mpc885_ads_defconfig @@ -78,4 +78,3 @@ CONFIG_DEBUG_VM_PGTABLE=y CONFIG_DETECT_HUNG_TASK=y CONFIG_BDI_SWITCH=y CONFIG_PPC_EARLY_DEBUG=y -CONFIG_GENERIC_PTDUMP=y diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index d4a7ca0388c0..05f969729e72 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -111,7 +111,7 @@ config RISCV select GENERIC_IRQ_SHOW_LEVEL select GENERIC_LIB_DEVMEM_IS_ALLOWED select GENERIC_PCI_IOMAP - select GENERIC_PTDUMP if MMU + select PTDUMP_CORE if MMU select GENERIC_SCHED_CLOCK select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL if MMU && 64BIT diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 0077969170e8..0e19fe547d84 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -155,7 +155,7 @@ config S390 select GENERIC_CPU_VULNERABILITIES select GENERIC_ENTRY select GENERIC_GETTIMEOFDAY - select GENERIC_PTDUMP + select PTDUMP_CORE select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL select GENERIC_VDSO_TIME_NS diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 9d7bd0ae48c4..d84cb2ac93ac 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -173,7 +173,7 @@ config X86 select GENERIC_IRQ_RESERVATION_MODE select GENERIC_IRQ_SHOW select GENERIC_PENDING_IRQ if SMP - select GENERIC_PTDUMP + select PTDUMP_CORE select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL select GENERIC_GETTIMEOFDAY diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 74777a97e394..198d7f090b98 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -59,7 +59,7 @@ config EARLY_PRINTK_USB_XDBC config EFI_PGT_DUMP bool "Dump the EFI pagetable" depends on EFI - select PTDUMP_CORE + depends on PTDUMP_CORE help Enable this if you want to dump the EFI page table before enabling virtual mode. This can be used to debug miscellaneous diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config index 20552f163930..8aafd050b754 100644 --- a/kernel/configs/debug.config +++ b/kernel/configs/debug.config @@ -73,7 +73,6 @@ CONFIG_DEBUG_VM=y CONFIG_DEBUG_VM_PGFLAGS=y CONFIG_DEBUG_VM_RB=y CONFIG_DEBUG_VM_VMACACHE=y -CONFIG_GENERIC_PTDUMP=y CONFIG_KASAN=y CONFIG_KASAN_GENERIC=y CONFIG_KASAN_INLINE=y diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index 41a58536531d..b206e5a11f96 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -187,7 +187,7 @@ config DEBUG_WX bool "Warn on W+X mappings at boot" depends on ARCH_HAS_DEBUG_WX depends on MMU - select PTDUMP_CORE + depends on PTDUMP_CORE help Generate a warning if any W+X mappings are found at boot. @@ -212,9 +212,6 @@ config DEBUG_WX If in doubt, say "Y". -config GENERIC_PTDUMP - bool - config PTDUMP_CORE bool @@ -222,8 +219,7 @@ config PTDUMP_DEBUGFS bool "Export kernel pagetable layout to userspace via debugfs" depends on DEBUG_KERNEL depends on DEBUG_FS - depends on GENERIC_PTDUMP - select PTDUMP_CORE + depends on PTDUMP_CORE help Say Y here if you want to show the kernel pagetable layout in a debugfs file. This information is only useful for kernel developers