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)
committerRichard Weinberger <richard@nod.at>
Tue, 30 Apr 2024 12:14:08 +0000 (14:14 +0200)
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>
arch/um/include/asm/mmu.h
arch/um/include/shared/skas/mm_id.h

index a7555e43ed14ae21431aa58b2e8a8a556b538518..f2923c767bb9a1b7316943ae59044695b12e300c 100644 (file)
@@ -14,8 +14,6 @@ typedef struct mm_context {
        struct uml_arch_mm_context arch;
 } 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