[PATCH] arm64: Fix build error for init_new_context()
From: Kunihiko Hayashi
Date: Wed Oct 28 2020 - 18:23:55 EST
After init_new_context() in arch/arm64/include/asm/mmu_context.h changed to
inline, asm-generic/mmu_context.h inclusion was added. This should be defined.
Fixes these build error:
../include/asm-generic/mmu_context.h:34:19: error: redefinition of 'init_new_context'
34 | static inline int init_new_context(struct task_struct *tsk,
| ^~~~~~~~~~~~~~~~
Cc: Nicholas Piggin <npiggin@xxxxxxxxx>
Fixes: 4c792ad103f3 ("arm64: use asm-generic/mmu_context.h for no-op implementations")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@xxxxxxxxxxxxx>
---
arch/arm64/include/asm/mmu_context.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
index da5f146..cd5c33a 100644
--- a/arch/arm64/include/asm/mmu_context.h
+++ b/arch/arm64/include/asm/mmu_context.h
@@ -176,6 +176,7 @@ static inline void cpu_replace_ttbr1(pgd_t *pgdp)
*/
void check_and_switch_context(struct mm_struct *mm);
+#define init_new_context init_new_context
static inline int
init_new_context(struct task_struct *tsk, struct mm_struct *mm)
{
--
2.7.4