Linux 5.6.13
[linux/fpc-iii.git] / arch / riscv / include / asm / mmu_context.h
blob67c463812e2d45e2fbf46d5b0d3078a8aa8456c7
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2012 Regents of the University of California
4 * Copyright (C) 2017 SiFive
5 */
7 #ifndef _ASM_RISCV_MMU_CONTEXT_H
8 #define _ASM_RISCV_MMU_CONTEXT_H
10 #include <linux/mm_types.h>
11 #include <asm-generic/mm_hooks.h>
13 #include <linux/mm.h>
14 #include <linux/sched.h>
16 static inline void enter_lazy_tlb(struct mm_struct *mm,
17 struct task_struct *task)
21 /* Initialize context-related info for a new mm_struct */
22 static inline int init_new_context(struct task_struct *task,
23 struct mm_struct *mm)
25 return 0;
28 static inline void destroy_context(struct mm_struct *mm)
32 void switch_mm(struct mm_struct *prev, struct mm_struct *next,
33 struct task_struct *task);
35 static inline void activate_mm(struct mm_struct *prev,
36 struct mm_struct *next)
38 switch_mm(prev, next, NULL);
41 static inline void deactivate_mm(struct task_struct *task,
42 struct mm_struct *mm)
46 #endif /* _ASM_RISCV_MMU_CONTEXT_H */