]> git.ipfire.org Git - thirdparty/linux.git/blame - arch/riscv/include/asm/mmu_context.h
riscv: move switch_mm to its own file
[thirdparty/linux.git] / arch / riscv / include / asm / mmu_context.h
CommitLineData
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
24static 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 */
30static inline int init_new_context(struct task_struct *task,
31 struct mm_struct *mm)
32{
33 return 0;
34}
35
36static inline void destroy_context(struct mm_struct *mm)
37{
38}
39
f6635f87
GG
40void switch_mm(struct mm_struct *prev, struct mm_struct *next,
41 struct task_struct *task);
07037db5
PD
42
43static inline void activate_mm(struct mm_struct *prev,
44 struct mm_struct *next)
45{
46 switch_mm(prev, next, NULL);
47}
48
49static inline void deactivate_mm(struct task_struct *task,
50 struct mm_struct *mm)
51{
52}
53
54#endif /* _ASM_RISCV_MMU_CONTEXT_H */