2019-05-29 07:18:00 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2017-07-10 18:06:09 -07:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 Regents of the University of California
|
2017-10-25 14:30:32 -07:00
|
|
|
* Copyright (C) 2017 SiFive
|
2017-07-10 18:06:09 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_RISCV_MMU_CONTEXT_H
|
|
|
|
#define _ASM_RISCV_MMU_CONTEXT_H
|
|
|
|
|
2017-11-29 17:55:20 -08:00
|
|
|
#include <linux/mm_types.h>
|
2017-07-10 18:06:09 -07:00
|
|
|
#include <asm-generic/mm_hooks.h>
|
|
|
|
|
|
|
|
#include <linux/mm.h>
|
|
|
|
#include <linux/sched.h>
|
|
|
|
|
2019-03-27 00:41:29 +00:00
|
|
|
void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|
|
|
struct task_struct *task);
|
2017-07-10 18:06:09 -07:00
|
|
|
|
2020-09-02 00:15:33 +10:00
|
|
|
#define activate_mm activate_mm
|
2017-07-10 18:06:09 -07:00
|
|
|
static inline void activate_mm(struct mm_struct *prev,
|
|
|
|
struct mm_struct *next)
|
|
|
|
{
|
|
|
|
switch_mm(prev, next, NULL);
|
|
|
|
}
|
|
|
|
|
2020-09-02 00:15:33 +10:00
|
|
|
#include <asm-generic/mmu_context.h>
|
2017-07-10 18:06:09 -07:00
|
|
|
|
|
|
|
#endif /* _ASM_RISCV_MMU_CONTEXT_H */
|