On Fri,  2 May 2025 09:12:40 +0800 Coiby Xu <[email protected]> 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 <[email protected]>
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 <[email protected]>
Cc: Coiby Xu <[email protected]>
Cc: "Daniel P. Berrange" <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Jan Pazdziora <[email protected]>
Cc: Liu Pingfan <[email protected]>
Cc: Milan Broz <[email protected]>
Cc: Ondrej Kozina <[email protected]>
Cc: Vitaly Kuznetsov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 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);
_


Reply via email to