Commit d98295d3 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Arnd Bergmann

arm64: use asm-generic/mmu_context.h for no-op implementations

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 292f70d7
...@@ -174,9 +174,9 @@ static inline void cpu_replace_ttbr1(pgd_t *pgdp) ...@@ -174,9 +174,9 @@ static inline void cpu_replace_ttbr1(pgd_t *pgdp)
* Setting a reserved TTBR0 or EPD0 would work, but it all gets ugly when you * Setting a reserved TTBR0 or EPD0 would work, but it all gets ugly when you
* take CPU migration into account. * take CPU migration into account.
*/ */
#define destroy_context(mm) do { } while(0)
void check_and_switch_context(struct mm_struct *mm); void check_and_switch_context(struct mm_struct *mm);
#define init_new_context(tsk, mm) init_new_context(tsk, mm)
static inline int static inline int
init_new_context(struct task_struct *tsk, struct mm_struct *mm) init_new_context(struct task_struct *tsk, struct mm_struct *mm)
{ {
...@@ -208,6 +208,7 @@ static inline void update_saved_ttbr0(struct task_struct *tsk, ...@@ -208,6 +208,7 @@ static inline void update_saved_ttbr0(struct task_struct *tsk,
} }
#endif #endif
#define enter_lazy_tlb enter_lazy_tlb
static inline void static inline void
enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{ {
...@@ -248,15 +249,14 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, ...@@ -248,15 +249,14 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
update_saved_ttbr0(tsk, next); update_saved_ttbr0(tsk, next);
} }
#define deactivate_mm(tsk,mm) do { } while (0)
#define activate_mm(prev,next) switch_mm(prev, next, current)
void verify_cpu_asid_bits(void); void verify_cpu_asid_bits(void);
void post_ttbr_update_workaround(void); void post_ttbr_update_workaround(void);
unsigned long arm64_mm_context_get(struct mm_struct *mm); unsigned long arm64_mm_context_get(struct mm_struct *mm);
void arm64_mm_context_put(struct mm_struct *mm); void arm64_mm_context_put(struct mm_struct *mm);
#include <asm-generic/mmu_context.h>
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* !__ASM_MMU_CONTEXT_H */ #endif /* !__ASM_MMU_CONTEXT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment