From: Kirill A. Shutemov Date: Tue, 6 Jun 2023 09:56:22 +0000 (+0300) Subject: x86/mm: Fix enc_status_change_finish_noop() X-Git-Tag: v6.6.7~2591^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94142c9d1bdf1c18027a42758ceb6bdd59a92012;p=platform%2Fkernel%2Flinux-starfive.git x86/mm: Fix enc_status_change_finish_noop() enc_status_change_finish_noop() is now defined as always-fail, which doesn't make sense for noop. The change has no user-visible effect because it is only called if the platform has CC_ATTR_MEM_ENCRYPT. All platforms with the attribute override the callback with their own implementation. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/all/20230606095622.1939-4-kirill.shutemov%40linux.intel.com --- diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index f230d4d..6466431 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -131,7 +131,7 @@ struct x86_cpuinit_ops x86_cpuinit = { static void default_nmi_init(void) { }; static bool enc_status_change_prepare_noop(unsigned long vaddr, int npages, bool enc) { return true; } -static bool enc_status_change_finish_noop(unsigned long vaddr, int npages, bool enc) { return false; } +static bool enc_status_change_finish_noop(unsigned long vaddr, int npages, bool enc) { return true; } static bool enc_tlb_flush_required_noop(bool enc) { return false; } static bool enc_cache_flush_required_noop(void) { return false; } static bool is_private_mmio_noop(u64 addr) {return false; }