blob: 623b598bbdbf953e063fef7282cbda3081c55f1a [file] [log] [blame]
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07001#ifndef __SPARC_MMU_CONTEXT_H
2#define __SPARC_MMU_CONTEXT_H
3
4#include <asm/btfixup.h>
5
6#ifndef __ASSEMBLY__
7
8#include <asm-generic/mm_hooks.h>
9
10static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
11{
12}
13
14/*
15 * Initialize a new mmu context. This is invoked when a new
16 * address space instance (unique or shared) is instantiated.
17 */
18#define init_new_context(tsk, mm) (((mm)->context = NO_CONTEXT), 0)
19
20/*
21 * Destroy a dead context. This occurs when mmput drops the
22 * mm_users count to zero, the mmaps have been released, and
23 * all the page tables have been flushed. Our job is to destroy
24 * any remaining processor-specific state.
25 */
Sam Ravnborgb796c6d2012-05-13 10:30:54 +020026void destroy_context(struct mm_struct *mm);
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070027
28/* Switch the current MM context. */
Sam Ravnborg34d4acc2012-05-12 08:04:11 +000029void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm,
30 struct task_struct *tsk);
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070031
32#define deactivate_mm(tsk,mm) do { } while (0)
33
34/* Activate a new MM instance for the current task. */
35#define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL)
36
37#endif /* !(__ASSEMBLY__) */
38
39#endif /* !(__SPARC_MMU_CONTEXT_H) */