Goodbye mips64. 31704 lines of code bite the dust.
[linux-2.6/linux-mips.git] / include / asm-s390 / mmu_context.h
blob0e63fd521893bb567d294dc15507f4ab115c305c
1 /*
2 * include/asm-s390/mmu_context.h
4 * S390 version
6 * Derived from "include/asm-i386/mmu_context.h"
7 */
9 #ifndef __S390_MMU_CONTEXT_H
10 #define __S390_MMU_CONTEXT_H
13 * get a new mmu context.. S390 don't know about contexts.
15 #define init_new_context(tsk,mm) 0
17 #define destroy_context(mm) flush_tlb_mm(mm)
19 static inline void enter_lazy_tlb(struct mm_struct *mm,
20 struct task_struct *tsk)
24 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
25 struct task_struct *tsk)
27 unsigned long pgd;
29 if (prev != next) {
30 #ifndef __s390x__
31 pgd = (__pa(next->pgd)&PAGE_MASK) |
32 (_SEGMENT_TABLE|USER_STD_MASK);
33 /* Load page tables */
34 asm volatile(" lctl 7,7,%0\n" /* secondary space */
35 " lctl 13,13,%0\n" /* home space */
36 : : "m" (pgd) );
37 #else /* __s390x__ */
38 pgd = (__pa(next->pgd)&PAGE_MASK) | (_REGION_TABLE|USER_STD_MASK);
39 /* Load page tables */
40 asm volatile(" lctlg 7,7,%0\n" /* secondary space */
41 " lctlg 13,13,%0\n" /* home space */
42 : : "m" (pgd) );
43 #endif /* __s390x__ */
45 set_bit(smp_processor_id(), &next->cpu_vm_mask);
48 #define deactivate_mm(tsk,mm) do { } while (0)
50 extern inline void activate_mm(struct mm_struct *prev,
51 struct mm_struct *next)
53 switch_mm(prev, next, current);
56 #endif