Skip to content

Commit

Permalink
nds32: use asm-generic/mmu_context.h for no-op implementations
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Piggin <[email protected]>
Acked-by: Greentime Hu <[email protected]>
Cc: Nick Hu <[email protected]>
Cc: Vincent Chen <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
npiggin authored and arndb committed Oct 27, 2020
1 parent 5b3a582 commit f62408e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions arch/nds32/include/asm/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
#include <asm/proc-fns.h>
#include <asm-generic/mm_hooks.h>

#define init_new_context init_new_context
static inline int
init_new_context(struct task_struct *tsk, struct mm_struct *mm)
{
mm->context.id = 0;
return 0;
}

#define destroy_context(mm) do { } while(0)

#define CID_BITS 9
extern spinlock_t cid_lock;
extern unsigned int cpu_last_cid;
Expand Down Expand Up @@ -47,10 +46,6 @@ static inline void check_context(struct mm_struct *mm)
__new_context(mm);
}

static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
}

static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
Expand All @@ -62,7 +57,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
}
}

#define deactivate_mm(tsk,mm) do { } while (0)
#define activate_mm(prev,next) switch_mm(prev, next, NULL)
#include <asm-generic/mmu_context.h>

#endif

0 comments on commit f62408e

Please sign in to comment.