Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
[deliverable/linux.git] / arch / s390 / include / asm / mmu.h
CommitLineData
1da177e4
LT
1#ifndef __MMU_H
2#define __MMU_H
3
146e4b3c 4typedef struct {
050eef36
MS
5 atomic_t attach_count;
6 unsigned int flush_mm;
50aa98ba 7 spinlock_t list_lock;
146e4b3c 8 struct list_head pgtable_list;
e5992f2e 9 struct list_head gmap_list;
146e4b3c 10 unsigned long asce_bits;
6252d702 11 unsigned long asce_limit;
b020632e 12 unsigned long vdso_base;
b2fa47e6
MS
13 /* Cloned contexts will be created with extended page tables. */
14 unsigned int alloc_pgste:1;
15 /* The mmu context has extended page tables. */
16 unsigned int has_pgste:1;
146e4b3c 17} mm_context_t;
1da177e4 18
a1b200e2
HC
19#define INIT_MM_CONTEXT(name) \
20 .context.list_lock = __SPIN_LOCK_UNLOCKED(name.context.list_lock), \
e5992f2e
MS
21 .context.pgtable_list = LIST_HEAD_INIT(name.context.pgtable_list), \
22 .context.gmap_list = LIST_HEAD_INIT(name.context.gmap_list),
a1b200e2 23
a0616cde
DH
24static inline int tprot(unsigned long addr)
25{
26 int rc = -EFAULT;
27
28 asm volatile(
29 " tprot 0(%1),0\n"
30 "0: ipm %0\n"
31 " srl %0,28\n"
32 "1:\n"
33 EX_TABLE(0b,1b)
34 : "+d" (rc) : "a" (addr) : "cc");
35 return rc;
36}
37
1da177e4 38#endif
This page took 0.575384 seconds and 5 git commands to generate.