um: Fix the -Wmissing-prototypes warning for __switch_mm

BugLink: https://bugs.launchpad.net/bugs/2073603

[ 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: 4dc706c2f2 ("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>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
Tiwei Bie
2024-04-23 20:58:53 +08:00
committed by Roxana Nicolescu
parent 477766cbec
commit bc8980946b
2 changed files with 2 additions and 2 deletions
-2
View 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);
+2
View File
@@ -15,4 +15,6 @@ struct mm_id {
int kill;
};
void __switch_mm(struct mm_id *mm_idp);
#endif