From patchwork Wed Feb 5 05:00:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13960566 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 0E975C02197 for ; Wed, 5 Feb 2025 05:00:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C147280004; Wed, 5 Feb 2025 00:00:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44AF1280003; Wed, 5 Feb 2025 00:00:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29BE1280004; Wed, 5 Feb 2025 00:00:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 03FEB280003 for ; Wed, 5 Feb 2025 00:00:56 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5D20AB0B47 for ; Wed, 5 Feb 2025 05:00:56 +0000 (UTC) X-FDA: 83084691312.28.2BCBF02 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf25.hostedemail.com (Postfix) with ESMTP id B0678A0007 for ; Wed, 5 Feb 2025 05:00:54 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738731654; 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=XOLFGKzAq1Ih/DSvWl2e03z1sP+VNRq7tgpUtW0Lods=; b=Cfq/KiJy+RaDX3qKNTukejlUOSkGqsEXOJ3TdHXbFWBwgm0fsLtF2izsgccq543BhczcZQ wuA5tC7cnZzEuRxHmuefaerltjg0zYXpMLZjLHjjxmns0PPka8Er0PTOLoJATESW5LNdRQ ZnrP5NobLKMA4Sh7h7TrGN/k4Igzxxc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738731654; a=rsa-sha256; cv=none; b=syCOZq9a/3fnP74JVzncvs0PaeMGgYqAjEcW5DpAcHniLUzmlzOGqbjfJOXbSYY//GFqJ+ v8/xuTyqyJR3LL1U9ZeX4C9A5FSlWmWY798RzVLiRbKK5yRb/udHLO4+b4mv6kfkJIhQHr GD8/WCu1qL1E4Y+ZvDVh1qq0OvjP1kc= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com 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 5D9D611FB; Tue, 4 Feb 2025 21:01:17 -0800 (PST) Received: from a077893.blr.arm.com (unknown [10.162.16.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0BA7C3F63F; Tue, 4 Feb 2025 21:00:45 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: steven.price@arm.com, christophe.leroy@csgroup.eu, 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 V2] mm/ptdump: Drop GENERIC_PTDUMP Date: Wed, 5 Feb 2025 10:30:39 +0530 Message-Id: <20250205050039.1506377-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Stat-Signature: pkcyob3yqd7fkzeet7uurc11oypcnjzz X-Rspamd-Queue-Id: B0678A0007 X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1738731654-279163 X-HE-Meta: U2FsdGVkX19NsSuEQYNqNuTmsccBrr3uLGfEJ4roQf4qsH5N/V17hoUg2eoggAPqqLUGgFqSAlYNXRPeWd899KPrj9Zw4pI4g06Htq3apoH7SXfLFJIyEow7WlIwJ1BbLo1fVnSKBMD7fsBlhqF3C8KbDMtOXTNIoL1nQiKV9meN3/SaKBJY3wXjhsQmYmVDmvo+i1QJcSyYwftpFX3p463UijHOGARXzLZQcR1VgQgNBUazAvEtb19fEWyw4S0fu5edtM+ug92vrqQNQU3CkLQnsY3jPMKIOYQRrHYbrrpHtrtnY+x3PuyPKkkIjnZF+sdkyGsyLzvL6j3dNcNCxyU89fRqyGfCXSBcDC/RFZTtXn7zZBeBrabKzej1ZRd9gT+IEC4CxX43HoePjeEViu7LTSP9QCQb/sNc+z71g+ajM70XGs3+oVe1czH1nCRw3Y8u3wjhxTmlaXFudtgLH93x2tXnvKgo5okAHR+9JvcppHPHqBpkb2SMi0uq53sI8lCXyqcT11Auf58qqJnQCVhqsjYL0YB6iSQG0Ybt/lL2VzMjDF8/V0qevgQ9Up3/H0tdIKjFYhIiMsoJpEX70LJdZDLe6TD96X/SCyqF7f3war25fcRXbvUWHO2jQl0RG3ZokVhfm8yhfgKdSpfY/f8GOMEEi90hXSOcww6+3vx1XelP1lbSY9A7I8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ender: 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.14-rc1 Changes in V2: - Keep arch/powerpc/Kconfig alphabetically sorted per Christophe Changes in V1: https://lore.kernel.org/all/20241217034807.2541349-1-anshuman.khandual@arm.com/ 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 fcdd0ed3eca8..1f516bed81dd 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -157,7 +157,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 424f188e62d9..97312440f715 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -206,7 +206,6 @@ config PPC select GENERIC_IRQ_SHOW select GENERIC_IRQ_SHOW_LEVEL select GENERIC_PCI_IOMAP if PCI - select GENERIC_PTDUMP select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL select GENERIC_VDSO_TIME_NS @@ -314,6 +313,7 @@ config PPC select PCI_MSI_ARCH_FALLBACKS if PCI_MSI select PCI_SYSCALL if PCI select PPC_DAWR if PPC64 + select PTDUMP_CORE select RTC_LIB select SPARSE_IRQ select STRICT_KERNEL_RWX if STRICT_MODULE_RWX 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 7612c52e9b1e..bdaf08c1e1da 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -112,7 +112,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 9c9ec08d78c7..ecf6b4cb3e33 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -163,7 +163,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 87198d957e2f..b6097b6178de 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -174,7 +174,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 1eb4d23cdaae..090c44d7e1a5 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