[PATCH v9 6/8] Revert "x86/mm: Remove unused __set_memory_prot()"
Coiby Xu
coxu at redhat.com
Tue May 6 20:05:27 PDT 2025
On Sat, May 03, 2025 at 11:46:05PM -0700, Andrew Morton wrote:
>On Fri, 2 May 2025 09:12:40 +0800 Coiby Xu <coxu at redhat.com> wrote:
>
>> This reverts commit 693bbf2a50447353c6a47961e6a7240a823ace02 as kdump
>> LUKS support (CONFIG_CRASH_DM_CRYPT) depends on __set_memory_prot.
>>
>
>x86_64 allmodconfig:
>
>In file included from drivers/gpu/drm/i915/gt/intel_ggtt.c:6:
>./arch/x86/include/asm/set_memory.h:40:57: error: unknown type name 'pgprot_t'
> 40 | int __set_memory_prot(unsigned long addr, int numpages, pgprot_t prot);
> | ^~~~~~~~
>
>I did this:
>
>
>From: Andrew Morton <akpm at linux-foundation.org>
>Subject: revert-x86-mm-remove-unused-__set_memory_prot-fix
>Date: Sat May 3 11:38:32 PM PDT 2025
>
>x86 set_memory.h needs pgtable_types.h for pgprot_t. Obtain it via the
>higher-level pgtable.h.
>
>Cc: Baoquan He <bhe at redhat.com>
>Cc: Coiby Xu <coxu at redhat.com>
>Cc: "Daniel P. Berrange" <berrange at redhat.com>
>Cc: Dave Hansen <dave.hansen at intel.com>
>Cc: Dave Young <dyoung at redhat.com>
>Cc: Jan Pazdziora <jpazdziora at redhat.com>
>Cc: Liu Pingfan <kernelfans at gmail.com>
>Cc: Milan Broz <gmazyland at gmail.com>
>Cc: Ondrej Kozina <okozina at redhat.com>
>Cc: Vitaly Kuznetsov <vkuznets at redhat.com>
>Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
>---
>
> arch/x86/include/asm/set_memory.h | 1 +
> 1 file changed, 1 insertion(+)
>
>--- a/arch/x86/include/asm/set_memory.h~revert-x86-mm-remove-unused-__set_memory_prot-fix
>+++ a/arch/x86/include/asm/set_memory.h
>@@ -4,6 +4,7 @@
>
> #include <asm/page.h>
> #include <asm-generic/set_memory.h>
>+#include <asm/pgtable.h>
>
> #define set_memory_rox set_memory_rox
> int set_memory_rox(unsigned long addr, int numpages);
>_
Thanks for catching this issue and providing a clean fix! I'll make sure
future patches pass allmodconfig. And also thanks for pulling the patch
set into -mm tree!
--
Best regards,
Coiby
More information about the kexec
mailing list