]>
Commit | Line | Data |
---|---|---|
07037db5 PD |
1 | /* |
2 | * Copyright (C) 2012 Regents of the University of California | |
08f051ed | 3 | * Copyright (C) 2017 SiFive |
07037db5 PD |
4 | * |
5 | * This program is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU General Public License | |
7 | * as published by the Free Software Foundation, version 2. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
13 | */ | |
14 | ||
15 | #ifndef _ASM_RISCV_MMU_CONTEXT_H | |
16 | #define _ASM_RISCV_MMU_CONTEXT_H | |
17 | ||
741fc3ff | 18 | #include <linux/mm_types.h> |
07037db5 PD |
19 | #include <asm-generic/mm_hooks.h> |
20 | ||
21 | #include <linux/mm.h> | |
22 | #include <linux/sched.h> | |
07037db5 PD |
23 | |
24 | static inline void enter_lazy_tlb(struct mm_struct *mm, | |
25 | struct task_struct *task) | |
26 | { | |
27 | } | |
28 | ||
29 | /* Initialize context-related info for a new mm_struct */ | |
30 | static inline int init_new_context(struct task_struct *task, | |
31 | struct mm_struct *mm) | |
32 | { | |
33 | return 0; | |
34 | } | |
35 | ||
36 | static inline void destroy_context(struct mm_struct *mm) | |
37 | { | |
38 | } | |
39 | ||
f6635f87 GG |
40 | void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
41 | struct task_struct *task); | |
07037db5 PD |
42 | |
43 | static inline void activate_mm(struct mm_struct *prev, | |
44 | struct mm_struct *next) | |
45 | { | |
46 | switch_mm(prev, next, NULL); | |
47 | } | |
48 | ||
49 | static inline void deactivate_mm(struct task_struct *task, | |
50 | struct mm_struct *mm) | |
51 | { | |
52 | } | |
53 | ||
54 | #endif /* _ASM_RISCV_MMU_CONTEXT_H */ |