The patch titled Subject: x86-mm-move-protection_map-inside-the-platform-fix has been added to the -mm mm-unstable branch. Its filename is x86-mm-move-protection_map-inside-the-platform-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/x86-mm-move-protection_map-inside-the-platform-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: x86-mm-move-protection_map-inside-the-platform-fix Date: Sat Jul 2 01:22:52 PM PDT 2022 fix "no previous prototype for add_encrypt_protection_map" Reported-by: kernel test robot <lkp@xxxxxxxxx> Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86/include/asm/mem_encrypt.h | 2 ++ arch/x86/mm/mem_encrypt_amd.c | 3 +-- arch/x86/mm/pgprot.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/mem_encrypt.h~x86-mm-move-protection_map-inside-the-platform-fix +++ a/arch/x86/include/asm/mem_encrypt.h @@ -89,6 +89,8 @@ static inline void mem_encrypt_free_decr /* Architecture __weak replacement functions */ void __init mem_encrypt_init(void); +void add_encrypt_protection_map(void); + /* * The __sme_pa() and __sme_pa_nodebug() macros are meant for use when * writing to or comparing values from the cr3 register. Having the --- a/arch/x86/mm/mem_encrypt_amd.c~x86-mm-move-protection_map-inside-the-platform-fix +++ a/arch/x86/mm/mem_encrypt_amd.c @@ -26,6 +26,7 @@ #include <asm/tlbflush.h> #include <asm/fixmap.h> #include <asm/setup.h> +#include <asm/mem_encrypt.h> #include <asm/bootparam.h> #include <asm/set_memory.h> #include <asm/cacheflush.h> @@ -484,8 +485,6 @@ void __init early_set_mem_enc_dec_hyperc enc_dec_hypercall(vaddr, npages, enc); } -void add_encrypt_protection_map(void); - void __init sme_early_init(void) { if (!sme_me_mask) --- a/arch/x86/mm/pgprot.c~x86-mm-move-protection_map-inside-the-platform-fix +++ a/arch/x86/mm/pgprot.c @@ -3,6 +3,7 @@ #include <linux/export.h> #include <linux/mm.h> #include <asm/pgtable.h> +#include <asm/mem_encrypt.h> static pgprot_t protection_map[16] __ro_after_init = { [VM_NONE] = PAGE_NONE, _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are android-binder-stop-saving-a-pointer-to-the-vma-fix.patch mm-remove-the-vma-linked-list-fix-2-fix.patch mm-drop-oom-code-from-exit_mmap-fix-fix.patch mm-add-merging-after-mremap-resize-checkpatch-fixes.patch mm-factor-helpers-for-memory_failure_dev_pagemap-fix.patch xfs-support-cow-in-fsdax-mode-fix.patch mm-thp-kill-transparent_hugepage_active-fix.patch mm-thp-kill-transparent_hugepage_active-fix-fix.patch mm-page_alloc-protect-pcp-lists-with-a-spinlock-fix.patch x86-mm-move-protection_map-inside-the-platform-fix.patch