]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
um: Fix the -Wmissing-prototypes warning for __switch_mm
authorTiwei Bie <tiwei.btw@antgroup.com>
Tue, 23 Apr 2024 12:58:53 +0000 (20:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:32:24 +0000 (13:32 +0200)
[ Upstream commit 2cbade17b18c0f0fd9963f26c9fc9b057eb1cb3a ]

The __switch_mm function is defined in the user code, and is called
by the kernel code. It should be declared in a shared header.

Fixes: 4dc706c2f292 ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a bit")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/um/include/asm/mmu.h
arch/um/include/shared/skas/mm_id.h

index 5b072aba5b658f95ab8b0248f569d1fd1f2cee5b..a7cb380c0b5c07fa7238e5816e923b62cd4402ca 100644 (file)
@@ -15,8 +15,6 @@ typedef struct mm_context {
        struct page *stub_pages[2];
 } mm_context_t;
 
-extern void __switch_mm(struct mm_id * mm_idp);
-
 /* Avoid tangled inclusion with asm/ldt.h */
 extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm);
 extern void free_ldt(struct mm_context *mm);
index e82e203f5f41945372f532bd07111f01e14b0c36..92dbf727e3842a9b85a1d0cbcbd89565cfbe6551 100644 (file)
@@ -15,4 +15,6 @@ struct mm_id {
        int kill;
 };
 
+void __switch_mm(struct mm_id *mm_idp);
+
 #endif