summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/mmu.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-03-28 18:30:02 +0100
committerDavid Howells <dhowells@redhat.com>2012-03-28 18:30:02 +0100
commita0616cdebcfd575dcd4c46102d1b52fbb827fc29 (patch)
tree49c67a23f3bcdb72a94317ddeff65e450b574746 /arch/s390/include/asm/mmu.h
parentae3a197e3d0bfe3f4bf1693723e82dc018c096f3 (diff)
downloadlinux-a0616cdebcfd575dcd4c46102d1b52fbb827fc29.tar.bz2
Disintegrate asm/system.h for S390
Disintegrate asm/system.h for S390. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-s390@vger.kernel.org
Diffstat (limited to 'arch/s390/include/asm/mmu.h')
-rw-r--r--arch/s390/include/asm/mmu.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/s390/include/asm/mmu.h b/arch/s390/include/asm/mmu.h
index 4506791adcd5..1c7d6ce328bf 100644
--- a/arch/s390/include/asm/mmu.h
+++ b/arch/s390/include/asm/mmu.h
@@ -21,4 +21,18 @@ typedef struct {
.context.pgtable_list = LIST_HEAD_INIT(name.context.pgtable_list), \
.context.gmap_list = LIST_HEAD_INIT(name.context.gmap_list),
+static inline int tprot(unsigned long addr)
+{
+ int rc = -EFAULT;
+
+ asm volatile(
+ " tprot 0(%1),0\n"
+ "0: ipm %0\n"
+ " srl %0,28\n"
+ "1:\n"
+ EX_TABLE(0b,1b)
+ : "+d" (rc) : "a" (addr) : "cc");
+ return rc;
+}
+
#endif