aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/include/asm/pgalloc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h
index f5b2bf3d7c1d..b2658b9220fe 100644
--- a/arch/s390/include/asm/pgalloc.h
+++ b/arch/s390/include/asm/pgalloc.h
@@ -28,6 +28,8 @@ void disable_noexec(struct mm_struct *, struct task_struct *);
28 28
29static inline void clear_table(unsigned long *s, unsigned long val, size_t n) 29static inline void clear_table(unsigned long *s, unsigned long val, size_t n)
30{ 30{
31 typedef struct { char _[n]; } addrtype;
32
31 *s = val; 33 *s = val;
32 n = (n / 256) - 1; 34 n = (n / 256) - 1;
33 asm volatile( 35 asm volatile(
@@ -39,7 +41,8 @@ static inline void clear_table(unsigned long *s, unsigned long val, size_t n)
39 "0: mvc 256(256,%0),0(%0)\n" 41 "0: mvc 256(256,%0),0(%0)\n"
40 " la %0,256(%0)\n" 42 " la %0,256(%0)\n"
41 " brct %1,0b\n" 43 " brct %1,0b\n"
42 : "+a" (s), "+d" (n)); 44 : "+a" (s), "+d" (n), "=m" (*(addrtype *) s)
45 : "m" (*(addrtype *) s));
43} 46}
44 47
45static inline void crst_table_init(unsigned long *crst, unsigned long entry) 48static inline void crst_table_init(unsigned long *crst, unsigned long entry)