18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2012 Regents of the University of California 48c2ecf20Sopenharmony_ci * Copyright (C) 2017 SiFive 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef _ASM_RISCV_MMU_CONTEXT_H 88c2ecf20Sopenharmony_ci#define _ASM_RISCV_MMU_CONTEXT_H 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <linux/mm_types.h> 118c2ecf20Sopenharmony_ci#include <asm-generic/mm_hooks.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/mm.h> 148c2ecf20Sopenharmony_ci#include <linux/sched.h> 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_cistatic inline void enter_lazy_tlb(struct mm_struct *mm, 178c2ecf20Sopenharmony_ci struct task_struct *task) 188c2ecf20Sopenharmony_ci{ 198c2ecf20Sopenharmony_ci} 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* Initialize context-related info for a new mm_struct */ 228c2ecf20Sopenharmony_cistatic inline int init_new_context(struct task_struct *task, 238c2ecf20Sopenharmony_ci struct mm_struct *mm) 248c2ecf20Sopenharmony_ci{ 258c2ecf20Sopenharmony_ci return 0; 268c2ecf20Sopenharmony_ci} 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_cistatic inline void destroy_context(struct mm_struct *mm) 298c2ecf20Sopenharmony_ci{ 308c2ecf20Sopenharmony_ci} 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_civoid switch_mm(struct mm_struct *prev, struct mm_struct *next, 338c2ecf20Sopenharmony_ci struct task_struct *task); 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_cistatic inline void activate_mm(struct mm_struct *prev, 368c2ecf20Sopenharmony_ci struct mm_struct *next) 378c2ecf20Sopenharmony_ci{ 388c2ecf20Sopenharmony_ci switch_mm(prev, next, NULL); 398c2ecf20Sopenharmony_ci} 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cistatic inline void deactivate_mm(struct task_struct *task, 428c2ecf20Sopenharmony_ci struct mm_struct *mm) 438c2ecf20Sopenharmony_ci{ 448c2ecf20Sopenharmony_ci} 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#endif /* _ASM_RISCV_MMU_CONTEXT_H */ 47