diff options
author | Tiwei Bie <tiwei.btw@antgroup.com> | 2024-04-23 20:58:53 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-16 13:23:35 +0200 |
commit | c08650c13bfc05794855480cc51075fdfcc388e0 (patch) | |
tree | 265858d56c4838c170a86608075ac97211b2ccba /arch | |
parent | f0f4cb4cc3f43324bab3b5541b27e79cbd15c8d1 (diff) | |
download | linux-stable-c08650c13bfc05794855480cc51075fdfcc388e0.tar.gz linux-stable-c08650c13bfc05794855480cc51075fdfcc388e0.tar.bz2 linux-stable-c08650c13bfc05794855480cc51075fdfcc388e0.zip |
um: Fix the -Wmissing-prototypes warning for __switch_mm
[ 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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/include/asm/mmu.h | 2 | ||||
-rw-r--r-- | arch/um/include/shared/skas/mm_id.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h index da705448590f..21fbe5454dbd 100644 --- a/arch/um/include/asm/mmu.h +++ b/arch/um/include/asm/mmu.h @@ -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); diff --git a/arch/um/include/shared/skas/mm_id.h b/arch/um/include/shared/skas/mm_id.h index 48dd0989ddaa..169482ec95f9 100644 --- a/arch/um/include/shared/skas/mm_id.h +++ b/arch/um/include/shared/skas/mm_id.h @@ -14,4 +14,6 @@ struct mm_id { unsigned long stack; }; +void __switch_mm(struct mm_id *mm_idp); + #endif |