From 94f89922e1e094f57a143965059a3e477f3f2fdc Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Wed, 2 Sep 2020 00:15:17 +1000 Subject: asm-generic: add generic MMU versions of mmu context functions Many of these are no-ops on many architectures, so extend mmu_context.h to cover MMU and NOMMU, and split the NOMMU bits out to nommu_context.h Signed-off-by: Nicholas Piggin Acked-by: Mike Rapoport Acked-by: Arnd Bergmann Cc: linux-arch@vger.kernel.org Signed-off-by: Arnd Bergmann --- arch/microblaze/include/asm/mmu_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/include/asm/mmu_context.h b/arch/microblaze/include/asm/mmu_context.h index f74f9da07fdc..34004efb3def 100644 --- a/arch/microblaze/include/asm/mmu_context.h +++ b/arch/microblaze/include/asm/mmu_context.h @@ -2,5 +2,5 @@ #ifdef CONFIG_MMU # include #else -# include +# include #endif -- cgit v1.2.3 From 97f130106f2987be90a393c8527671a8cdc432e8 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Wed, 2 Sep 2020 00:15:26 +1000 Subject: microblaze: use asm-generic/mmu_context.h for no-op implementations Wire asm-generic/mmu_context.h to provide generic empty hooks for arch code simplification. Signed-off-by: Nicholas Piggin Acked-by: Michal Simek Signed-off-by: Arnd Bergmann --- arch/microblaze/include/asm/mmu_context_mm.h | 8 ++++---- arch/microblaze/include/asm/processor.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/include/asm/mmu_context_mm.h b/arch/microblaze/include/asm/mmu_context_mm.h index a1c7dd48454c..c2c77f708455 100644 --- a/arch/microblaze/include/asm/mmu_context_mm.h +++ b/arch/microblaze/include/asm/mmu_context_mm.h @@ -33,10 +33,6 @@ to represent all kernel pages as shared among all contexts. */ -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - # define NO_CONTEXT 256 # define LAST_CONTEXT 255 # define FIRST_CONTEXT 1 @@ -105,6 +101,7 @@ static inline void get_mmu_context(struct mm_struct *mm) /* * We're finished using the context for an address space. */ +#define destroy_context destroy_context static inline void destroy_context(struct mm_struct *mm) { if (mm->context != NO_CONTEXT) { @@ -126,6 +123,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, * After we have set current->mm to a new value, this activates * the context for the new mm so we see the new mappings. */ +#define activate_mm activate_mm static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm) { @@ -136,5 +134,7 @@ static inline void activate_mm(struct mm_struct *active_mm, extern void mmu_context_init(void); +#include + # endif /* __KERNEL__ */ #endif /* _ASM_MICROBLAZE_MMU_CONTEXT_H */ diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 1ff5a82b76b6..616211871a6e 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h @@ -122,9 +122,6 @@ unsigned long get_wchan(struct task_struct *p); # define KSTK_EIP(task) (task_pc(task)) # define KSTK_ESP(task) (task_sp(task)) -/* FIXME */ -# define deactivate_mm(tsk, mm) do { } while (0) - # define STACK_TOP TASK_SIZE # define STACK_TOP_MAX STACK_TOP -- cgit v1.2.3