aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/appldata/appldata_mem.c1
-rw-r--r--arch/s390/appldata/appldata_net_sum.c1
-rw-r--r--arch/s390/boot/compressed/misc.c8
-rw-r--r--arch/s390/crypto/prng.c1
-rw-r--r--arch/s390/defconfig40
-rw-r--r--arch/s390/hypfs/hypfs_diag.c1
-rw-r--r--arch/s390/hypfs/inode.c2
-rw-r--r--arch/s390/include/asm/pgtable.h6
-rw-r--r--arch/s390/include/asm/system.h9
-rw-r--r--arch/s390/kernel/compat_linux.c2
-rw-r--r--arch/s390/kernel/early.c3
-rw-r--r--arch/s390/kernel/entry.S8
-rw-r--r--arch/s390/kernel/entry64.S8
-rw-r--r--arch/s390/kernel/head.S3
-rw-r--r--arch/s390/kernel/head64.S2
-rw-r--r--arch/s390/kernel/ipl.c1
-rw-r--r--arch/s390/kernel/kprobes.c1
-rw-r--r--arch/s390/kernel/process.c2
-rw-r--r--arch/s390/kernel/setup.c5
-rw-r--r--arch/s390/kernel/smp.c7
-rw-r--r--arch/s390/kernel/sysinfo.c1
-rw-r--r--arch/s390/kernel/time.c1
-rw-r--r--arch/s390/kernel/topology.c3
-rw-r--r--arch/s390/kvm/interrupt.c1
-rw-r--r--arch/s390/kvm/priv.c1
-rw-r--r--arch/s390/kvm/sigp.c1
-rw-r--r--arch/s390/mm/cmm.c1
-rw-r--r--arch/s390/mm/init.c1
-rw-r--r--arch/s390/mm/maccess.c26
-rw-r--r--arch/s390/mm/page-states.c1
-rw-r--r--arch/s390/mm/pgtable.c2
-rw-r--r--arch/s390/mm/vmem.c12
32 files changed, 114 insertions, 48 deletions
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c
index 4188cbe63a54..e43fe7537031 100644
--- a/arch/s390/appldata/appldata_mem.c
+++ b/arch/s390/appldata/appldata_mem.c
@@ -11,7 +11,6 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/slab.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/kernel_stat.h> 15#include <linux/kernel_stat.h>
17#include <linux/pagemap.h> 16#include <linux/pagemap.h>
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c
index 4ce7fa95880f..9a9586f4103f 100644
--- a/arch/s390/appldata/appldata_net_sum.c
+++ b/arch/s390/appldata/appldata_net_sum.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/slab.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/kernel_stat.h> 16#include <linux/kernel_stat.h>
18#include <linux/netdevice.h> 17#include <linux/netdevice.h>
diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c
index a97d69525829..14e0479d3888 100644
--- a/arch/s390/boot/compressed/misc.c
+++ b/arch/s390/boot/compressed/misc.c
@@ -24,8 +24,8 @@
24/* Symbols defined by linker scripts */ 24/* Symbols defined by linker scripts */
25extern char input_data[]; 25extern char input_data[];
26extern int input_len; 26extern int input_len;
27extern int _text; 27extern char _text, _end;
28extern int _end; 28extern char _bss, _ebss;
29 29
30static void error(char *m); 30static void error(char *m);
31 31
@@ -129,12 +129,12 @@ unsigned long decompress_kernel(void)
129 unsigned long output_addr; 129 unsigned long output_addr;
130 unsigned char *output; 130 unsigned char *output;
131 131
132 check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start);
133 memset(&_bss, 0, &_ebss - &_bss);
132 free_mem_ptr = (unsigned long)&_end; 134 free_mem_ptr = (unsigned long)&_end;
133 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; 135 free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
134 output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL); 136 output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL);
135 137
136 check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start);
137
138#ifdef CONFIG_BLK_DEV_INITRD 138#ifdef CONFIG_BLK_DEV_INITRD
139 /* 139 /*
140 * Move the initrd right behind the end of the decompressed 140 * Move the initrd right behind the end of the decompressed
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index a3209906739e..aa819dac2360 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -10,6 +10,7 @@
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/moduleparam.h> 11#include <linux/moduleparam.h>
12#include <linux/random.h> 12#include <linux/random.h>
13#include <linux/slab.h>
13#include <asm/debug.h> 14#include <asm/debug.h>
14#include <asm/uaccess.h> 15#include <asm/uaccess.h>
15 16
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 7ae71cc56973..bcd6884985ad 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.33-rc2 3# Linux kernel version: 2.6.34-rc3
4# Mon Jan 4 09:03:07 2010 4# Fri Apr 9 09:57:10 2010
5# 5#
6CONFIG_SCHED_MC=y 6CONFIG_SCHED_MC=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -17,6 +17,7 @@ CONFIG_GENERIC_TIME=y
17CONFIG_GENERIC_TIME_VSYSCALL=y 17CONFIG_GENERIC_TIME_VSYSCALL=y
18CONFIG_GENERIC_CLOCKEVENTS=y 18CONFIG_GENERIC_CLOCKEVENTS=y
19CONFIG_GENERIC_BUG=y 19CONFIG_GENERIC_BUG=y
20CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
20CONFIG_NO_IOMEM=y 21CONFIG_NO_IOMEM=y
21CONFIG_NO_DMA=y 22CONFIG_NO_DMA=y
22CONFIG_GENERIC_LOCKBREAK=y 23CONFIG_GENERIC_LOCKBREAK=y
@@ -62,15 +63,11 @@ CONFIG_TREE_RCU=y
62# CONFIG_RCU_TRACE is not set 63# CONFIG_RCU_TRACE is not set
63CONFIG_RCU_FANOUT=64 64CONFIG_RCU_FANOUT=64
64# CONFIG_RCU_FANOUT_EXACT is not set 65# CONFIG_RCU_FANOUT_EXACT is not set
66# CONFIG_RCU_FAST_NO_HZ is not set
65# CONFIG_TREE_RCU_TRACE is not set 67# CONFIG_TREE_RCU_TRACE is not set
66CONFIG_IKCONFIG=y 68CONFIG_IKCONFIG=y
67CONFIG_IKCONFIG_PROC=y 69CONFIG_IKCONFIG_PROC=y
68CONFIG_LOG_BUF_SHIFT=17 70CONFIG_LOG_BUF_SHIFT=17
69CONFIG_GROUP_SCHED=y
70CONFIG_FAIR_GROUP_SCHED=y
71# CONFIG_RT_GROUP_SCHED is not set
72CONFIG_USER_SCHED=y
73# CONFIG_CGROUP_SCHED is not set
74CONFIG_CGROUPS=y 71CONFIG_CGROUPS=y
75# CONFIG_CGROUP_DEBUG is not set 72# CONFIG_CGROUP_DEBUG is not set
76CONFIG_CGROUP_NS=y 73CONFIG_CGROUP_NS=y
@@ -79,6 +76,7 @@ CONFIG_CGROUP_NS=y
79# CONFIG_CPUSETS is not set 76# CONFIG_CPUSETS is not set
80# CONFIG_CGROUP_CPUACCT is not set 77# CONFIG_CGROUP_CPUACCT is not set
81# CONFIG_RESOURCE_COUNTERS is not set 78# CONFIG_RESOURCE_COUNTERS is not set
79# CONFIG_CGROUP_SCHED is not set
82CONFIG_SYSFS_DEPRECATED=y 80CONFIG_SYSFS_DEPRECATED=y
83CONFIG_SYSFS_DEPRECATED_V2=y 81CONFIG_SYSFS_DEPRECATED_V2=y
84# CONFIG_RELAY is not set 82# CONFIG_RELAY is not set
@@ -93,6 +91,7 @@ CONFIG_INITRAMFS_SOURCE=""
93CONFIG_RD_GZIP=y 91CONFIG_RD_GZIP=y
94CONFIG_RD_BZIP2=y 92CONFIG_RD_BZIP2=y
95CONFIG_RD_LZMA=y 93CONFIG_RD_LZMA=y
94CONFIG_RD_LZO=y
96# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 95# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
97CONFIG_SYSCTL=y 96CONFIG_SYSCTL=y
98CONFIG_ANON_INODES=y 97CONFIG_ANON_INODES=y
@@ -126,6 +125,7 @@ CONFIG_SLAB=y
126# CONFIG_SLUB is not set 125# CONFIG_SLUB is not set
127# CONFIG_SLOB is not set 126# CONFIG_SLOB is not set
128# CONFIG_PROFILING is not set 127# CONFIG_PROFILING is not set
128CONFIG_TRACEPOINTS=y
129CONFIG_HAVE_OPROFILE=y 129CONFIG_HAVE_OPROFILE=y
130CONFIG_KPROBES=y 130CONFIG_KPROBES=y
131CONFIG_HAVE_SYSCALL_WRAPPERS=y 131CONFIG_HAVE_SYSCALL_WRAPPERS=y
@@ -134,6 +134,7 @@ CONFIG_HAVE_KPROBES=y
134CONFIG_HAVE_KRETPROBES=y 134CONFIG_HAVE_KRETPROBES=y
135CONFIG_HAVE_ARCH_TRACEHOOK=y 135CONFIG_HAVE_ARCH_TRACEHOOK=y
136CONFIG_USE_GENERIC_SMP_HELPERS=y 136CONFIG_USE_GENERIC_SMP_HELPERS=y
137CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
137CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES=y 138CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES=y
138 139
139# 140#
@@ -246,6 +247,7 @@ CONFIG_64BIT=y
246CONFIG_SMP=y 247CONFIG_SMP=y
247CONFIG_NR_CPUS=32 248CONFIG_NR_CPUS=32
248CONFIG_HOTPLUG_CPU=y 249CONFIG_HOTPLUG_CPU=y
250# CONFIG_SCHED_BOOK is not set
249CONFIG_COMPAT=y 251CONFIG_COMPAT=y
250CONFIG_SYSVIPC_COMPAT=y 252CONFIG_SYSVIPC_COMPAT=y
251CONFIG_AUDIT_ARCH=y 253CONFIG_AUDIT_ARCH=y
@@ -345,13 +347,13 @@ CONFIG_PM_SLEEP=y
345CONFIG_HIBERNATION=y 347CONFIG_HIBERNATION=y
346CONFIG_PM_STD_PARTITION="" 348CONFIG_PM_STD_PARTITION=""
347# CONFIG_PM_RUNTIME is not set 349# CONFIG_PM_RUNTIME is not set
350CONFIG_PM_OPS=y
348CONFIG_NET=y 351CONFIG_NET=y
349 352
350# 353#
351# Networking options 354# Networking options
352# 355#
353CONFIG_PACKET=y 356CONFIG_PACKET=y
354# CONFIG_PACKET_MMAP is not set
355CONFIG_UNIX=y 357CONFIG_UNIX=y
356CONFIG_XFRM=y 358CONFIG_XFRM=y
357# CONFIG_XFRM_USER is not set 359# CONFIG_XFRM_USER is not set
@@ -529,6 +531,7 @@ CONFIG_NET_SCH_FIFO=y
529# 531#
530# CONFIG_NET_PKTGEN is not set 532# CONFIG_NET_PKTGEN is not set
531# CONFIG_NET_TCPPROBE is not set 533# CONFIG_NET_TCPPROBE is not set
534# CONFIG_NET_DROP_MONITOR is not set
532CONFIG_CAN=m 535CONFIG_CAN=m
533CONFIG_CAN_RAW=m 536CONFIG_CAN_RAW=m
534CONFIG_CAN_BCM=m 537CONFIG_CAN_BCM=m
@@ -605,6 +608,7 @@ CONFIG_MISC_DEVICES=y
605# 608#
606# SCSI device support 609# SCSI device support
607# 610#
611CONFIG_SCSI_MOD=y
608# CONFIG_RAID_ATTRS is not set 612# CONFIG_RAID_ATTRS is not set
609CONFIG_SCSI=y 613CONFIG_SCSI=y
610# CONFIG_SCSI_DMA is not set 614# CONFIG_SCSI_DMA is not set
@@ -863,6 +867,7 @@ CONFIG_MISC_FILESYSTEMS=y
863# CONFIG_BEFS_FS is not set 867# CONFIG_BEFS_FS is not set
864# CONFIG_BFS_FS is not set 868# CONFIG_BFS_FS is not set
865# CONFIG_EFS_FS is not set 869# CONFIG_EFS_FS is not set
870# CONFIG_LOGFS is not set
866# CONFIG_CRAMFS is not set 871# CONFIG_CRAMFS is not set
867# CONFIG_SQUASHFS is not set 872# CONFIG_SQUASHFS is not set
868# CONFIG_VXFS_FS is not set 873# CONFIG_VXFS_FS is not set
@@ -891,6 +896,7 @@ CONFIG_SUNRPC=y
891# CONFIG_RPCSEC_GSS_KRB5 is not set 896# CONFIG_RPCSEC_GSS_KRB5 is not set
892# CONFIG_RPCSEC_GSS_SPKM3 is not set 897# CONFIG_RPCSEC_GSS_SPKM3 is not set
893# CONFIG_SMB_FS is not set 898# CONFIG_SMB_FS is not set
899# CONFIG_CEPH_FS is not set
894# CONFIG_CIFS is not set 900# CONFIG_CIFS is not set
895# CONFIG_NCP_FS is not set 901# CONFIG_NCP_FS is not set
896# CONFIG_CODA_FS is not set 902# CONFIG_CODA_FS is not set
@@ -952,6 +958,7 @@ CONFIG_DEBUG_MUTEXES=y
952# CONFIG_LOCK_STAT is not set 958# CONFIG_LOCK_STAT is not set
953CONFIG_DEBUG_SPINLOCK_SLEEP=y 959CONFIG_DEBUG_SPINLOCK_SLEEP=y
954# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 960# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
961CONFIG_STACKTRACE=y
955# CONFIG_DEBUG_KOBJECT is not set 962# CONFIG_DEBUG_KOBJECT is not set
956CONFIG_DEBUG_BUGVERBOSE=y 963CONFIG_DEBUG_BUGVERBOSE=y
957# CONFIG_DEBUG_INFO is not set 964# CONFIG_DEBUG_INFO is not set
@@ -973,12 +980,17 @@ CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
973# CONFIG_LATENCYTOP is not set 980# CONFIG_LATENCYTOP is not set
974CONFIG_SYSCTL_SYSCALL_CHECK=y 981CONFIG_SYSCTL_SYSCALL_CHECK=y
975# CONFIG_DEBUG_PAGEALLOC is not set 982# CONFIG_DEBUG_PAGEALLOC is not set
983CONFIG_NOP_TRACER=y
976CONFIG_HAVE_FUNCTION_TRACER=y 984CONFIG_HAVE_FUNCTION_TRACER=y
977CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y 985CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
978CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y 986CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
979CONFIG_HAVE_DYNAMIC_FTRACE=y 987CONFIG_HAVE_DYNAMIC_FTRACE=y
980CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 988CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
981CONFIG_HAVE_SYSCALL_TRACEPOINTS=y 989CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
990CONFIG_RING_BUFFER=y
991CONFIG_EVENT_TRACING=y
992CONFIG_CONTEXT_SWITCH_TRACER=y
993CONFIG_TRACING=y
982CONFIG_TRACING_SUPPORT=y 994CONFIG_TRACING_SUPPORT=y
983CONFIG_FTRACE=y 995CONFIG_FTRACE=y
984# CONFIG_FUNCTION_TRACER is not set 996# CONFIG_FUNCTION_TRACER is not set
@@ -995,10 +1007,15 @@ CONFIG_BRANCH_PROFILE_NONE=y
995# CONFIG_KMEMTRACE is not set 1007# CONFIG_KMEMTRACE is not set
996# CONFIG_WORKQUEUE_TRACER is not set 1008# CONFIG_WORKQUEUE_TRACER is not set
997# CONFIG_BLK_DEV_IO_TRACE is not set 1009# CONFIG_BLK_DEV_IO_TRACE is not set
1010CONFIG_KPROBE_EVENT=y
1011# CONFIG_RING_BUFFER_BENCHMARK is not set
998# CONFIG_DYNAMIC_DEBUG is not set 1012# CONFIG_DYNAMIC_DEBUG is not set
999CONFIG_SAMPLES=y 1013CONFIG_SAMPLES=y
1014# CONFIG_SAMPLE_TRACEPOINTS is not set
1015# CONFIG_SAMPLE_TRACE_EVENTS is not set
1000# CONFIG_SAMPLE_KOBJECT is not set 1016# CONFIG_SAMPLE_KOBJECT is not set
1001# CONFIG_SAMPLE_KPROBES is not set 1017# CONFIG_SAMPLE_KPROBES is not set
1018# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
1002 1019
1003# 1020#
1004# Security options 1021# Security options
@@ -1032,6 +1049,7 @@ CONFIG_CRYPTO_MANAGER=y
1032CONFIG_CRYPTO_MANAGER2=y 1049CONFIG_CRYPTO_MANAGER2=y
1033CONFIG_CRYPTO_GF128MUL=m 1050CONFIG_CRYPTO_GF128MUL=m
1034# CONFIG_CRYPTO_NULL is not set 1051# CONFIG_CRYPTO_NULL is not set
1052# CONFIG_CRYPTO_PCRYPT is not set
1035CONFIG_CRYPTO_WORKQUEUE=y 1053CONFIG_CRYPTO_WORKQUEUE=y
1036# CONFIG_CRYPTO_CRYPTD is not set 1054# CONFIG_CRYPTO_CRYPTD is not set
1037CONFIG_CRYPTO_AUTHENC=m 1055CONFIG_CRYPTO_AUTHENC=m
@@ -1119,7 +1137,7 @@ CONFIG_CRYPTO_SHA512_S390=m
1119# CONFIG_CRYPTO_DES_S390 is not set 1137# CONFIG_CRYPTO_DES_S390 is not set
1120# CONFIG_CRYPTO_AES_S390 is not set 1138# CONFIG_CRYPTO_AES_S390 is not set
1121CONFIG_S390_PRNG=m 1139CONFIG_S390_PRNG=m
1122# CONFIG_BINARY_PRINTF is not set 1140CONFIG_BINARY_PRINTF=y
1123 1141
1124# 1142#
1125# Library routines 1143# Library routines
@@ -1136,14 +1154,16 @@ CONFIG_LIBCRC32C=m
1136CONFIG_ZLIB_INFLATE=y 1154CONFIG_ZLIB_INFLATE=y
1137CONFIG_ZLIB_DEFLATE=m 1155CONFIG_ZLIB_DEFLATE=m
1138CONFIG_LZO_COMPRESS=m 1156CONFIG_LZO_COMPRESS=m
1139CONFIG_LZO_DECOMPRESS=m 1157CONFIG_LZO_DECOMPRESS=y
1140CONFIG_DECOMPRESS_GZIP=y 1158CONFIG_DECOMPRESS_GZIP=y
1141CONFIG_DECOMPRESS_BZIP2=y 1159CONFIG_DECOMPRESS_BZIP2=y
1142CONFIG_DECOMPRESS_LZMA=y 1160CONFIG_DECOMPRESS_LZMA=y
1161CONFIG_DECOMPRESS_LZO=y
1143CONFIG_NLATTR=y 1162CONFIG_NLATTR=y
1144CONFIG_HAVE_KVM=y 1163CONFIG_HAVE_KVM=y
1145CONFIG_VIRTUALIZATION=y 1164CONFIG_VIRTUALIZATION=y
1146CONFIG_KVM=m 1165CONFIG_KVM=m
1166# CONFIG_VHOST_NET is not set
1147CONFIG_VIRTIO=y 1167CONFIG_VIRTIO=y
1148CONFIG_VIRTIO_RING=y 1168CONFIG_VIRTIO_RING=y
1149CONFIG_VIRTIO_BALLOON=m 1169CONFIG_VIRTIO_BALLOON=m
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index 87cf523192e9..5b1acdba6495 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/gfp.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include <linux/string.h> 16#include <linux/string.h>
18#include <linux/vmalloc.h> 17#include <linux/vmalloc.h>
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index cd128b07beda..c53f8ac825ca 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -14,8 +14,8 @@
14#include <linux/fs.h> 14#include <linux/fs.h>
15#include <linux/namei.h> 15#include <linux/namei.h>
16#include <linux/vfs.h> 16#include <linux/vfs.h>
17#include <linux/slab.h>
17#include <linux/pagemap.h> 18#include <linux/pagemap.h>
18#include <linux/gfp.h>
19#include <linux/time.h> 19#include <linux/time.h>
20#include <linux/parser.h> 20#include <linux/parser.h>
21#include <linux/sysfs.h> 21#include <linux/sysfs.h>
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 9b5b9189c15e..89a504c3f12e 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -105,7 +105,7 @@ extern char empty_zero_page[PAGE_SIZE];
105#ifndef __ASSEMBLY__ 105#ifndef __ASSEMBLY__
106/* 106/*
107 * The vmalloc area will always be on the topmost area of the kernel 107 * The vmalloc area will always be on the topmost area of the kernel
108 * mapping. We reserve 96MB (31bit) / 1GB (64bit) for vmalloc, 108 * mapping. We reserve 96MB (31bit) / 128GB (64bit) for vmalloc,
109 * which should be enough for any sane case. 109 * which should be enough for any sane case.
110 * By putting vmalloc at the top, we maximise the gap between physical 110 * By putting vmalloc at the top, we maximise the gap between physical
111 * memory and vmalloc to catch misplaced memory accesses. As a side 111 * memory and vmalloc to catch misplaced memory accesses. As a side
@@ -120,8 +120,8 @@ extern unsigned long VMALLOC_START;
120#define VMALLOC_END 0x7e000000UL 120#define VMALLOC_END 0x7e000000UL
121#define VMEM_MAP_END 0x80000000UL 121#define VMEM_MAP_END 0x80000000UL
122#else /* __s390x__ */ 122#else /* __s390x__ */
123#define VMALLOC_SIZE (1UL << 30) 123#define VMALLOC_SIZE (128UL << 30)
124#define VMALLOC_END 0x3e040000000UL 124#define VMALLOC_END 0x3e000000000UL
125#define VMEM_MAP_END 0x40000000000UL 125#define VMEM_MAP_END 0x40000000000UL
126#endif /* __s390x__ */ 126#endif /* __s390x__ */
127 127
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h
index 67ee6c3c6bb3..1741c1556a4e 100644
--- a/arch/s390/include/asm/system.h
+++ b/arch/s390/include/asm/system.h
@@ -110,6 +110,7 @@ extern void pfault_fini(void);
110#endif /* CONFIG_PFAULT */ 110#endif /* CONFIG_PFAULT */
111 111
112extern void cmma_init(void); 112extern void cmma_init(void);
113extern int memcpy_real(void *, void *, size_t);
113 114
114#define finish_arch_switch(prev) do { \ 115#define finish_arch_switch(prev) do { \
115 set_fs(current->thread.mm_segment); \ 116 set_fs(current->thread.mm_segment); \
@@ -218,8 +219,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
218 " l %0,%2\n" 219 " l %0,%2\n"
219 "0: nr %0,%5\n" 220 "0: nr %0,%5\n"
220 " lr %1,%0\n" 221 " lr %1,%0\n"
221 " or %0,%2\n" 222 " or %0,%3\n"
222 " or %1,%3\n" 223 " or %1,%4\n"
223 " cs %0,%1,%2\n" 224 " cs %0,%1,%2\n"
224 " jnl 1f\n" 225 " jnl 1f\n"
225 " xr %1,%0\n" 226 " xr %1,%0\n"
@@ -239,8 +240,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
239 " l %0,%2\n" 240 " l %0,%2\n"
240 "0: nr %0,%5\n" 241 "0: nr %0,%5\n"
241 " lr %1,%0\n" 242 " lr %1,%0\n"
242 " or %0,%2\n" 243 " or %0,%3\n"
243 " or %1,%3\n" 244 " or %1,%4\n"
244 " cs %0,%1,%2\n" 245 " cs %0,%1,%2\n"
245 " jnl 1f\n" 246 " jnl 1f\n"
246 " xr %1,%0\n" 247 " xr %1,%0\n"
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 11c3aba664ea..73b624ed9cd8 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -29,7 +29,6 @@
29#include <linux/sem.h> 29#include <linux/sem.h>
30#include <linux/msg.h> 30#include <linux/msg.h>
31#include <linux/shm.h> 31#include <linux/shm.h>
32#include <linux/slab.h>
33#include <linux/uio.h> 32#include <linux/uio.h>
34#include <linux/quota.h> 33#include <linux/quota.h>
35#include <linux/module.h> 34#include <linux/module.h>
@@ -52,6 +51,7 @@
52#include <linux/ptrace.h> 51#include <linux/ptrace.h>
53#include <linux/fadvise.h> 52#include <linux/fadvise.h>
54#include <linux/ipc.h> 53#include <linux/ipc.h>
54#include <linux/slab.h>
55 55
56#include <asm/types.h> 56#include <asm/types.h>
57#include <asm/uaccess.h> 57#include <asm/uaccess.h>
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 31d618a443af..2d92c2cf92d7 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -82,7 +82,8 @@ asm(
82 " lm 6,15,24(15)\n" 82 " lm 6,15,24(15)\n"
83#endif 83#endif
84 " br 14\n" 84 " br 14\n"
85 " .size savesys_ipl_nss, .-savesys_ipl_nss\n"); 85 " .size savesys_ipl_nss, .-savesys_ipl_nss\n"
86 " .previous\n");
86 87
87static __initdata char upper_command_line[COMMAND_LINE_SIZE]; 88static __initdata char upper_command_line[COMMAND_LINE_SIZE];
88 89
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 4348f9bc5393..6af7045280a8 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -964,7 +964,7 @@ cleanup_critical:
964 clc 4(4,%r12),BASED(cleanup_table_io_work_loop) 964 clc 4(4,%r12),BASED(cleanup_table_io_work_loop)
965 bl BASED(0f) 965 bl BASED(0f)
966 clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) 966 clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4)
967 bl BASED(cleanup_io_return) 967 bl BASED(cleanup_io_work_loop)
9680: 9680:
969 br %r14 969 br %r14
970 970
@@ -1039,6 +1039,12 @@ cleanup_sysc_leave_insn:
1039 1039
1040cleanup_io_return: 1040cleanup_io_return:
1041 mvc __LC_RETURN_PSW(4),0(%r12) 1041 mvc __LC_RETURN_PSW(4),0(%r12)
1042 mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_return)
1043 la %r12,__LC_RETURN_PSW
1044 br %r14
1045
1046cleanup_io_work_loop:
1047 mvc __LC_RETURN_PSW(4),0(%r12)
1042 mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) 1048 mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop)
1043 la %r12,__LC_RETURN_PSW 1049 la %r12,__LC_RETURN_PSW
1044 br %r14 1050 br %r14
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 29fd0f1e6ec4..52106d53271c 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -946,7 +946,7 @@ cleanup_critical:
946 clc 8(8,%r12),BASED(cleanup_table_io_work_loop) 946 clc 8(8,%r12),BASED(cleanup_table_io_work_loop)
947 jl 0f 947 jl 0f
948 clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8) 948 clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8)
949 jl cleanup_io_return 949 jl cleanup_io_work_loop
9500: 9500:
951 br %r14 951 br %r14
952 952
@@ -1021,6 +1021,12 @@ cleanup_sysc_leave_insn:
1021 1021
1022cleanup_io_return: 1022cleanup_io_return:
1023 mvc __LC_RETURN_PSW(8),0(%r12) 1023 mvc __LC_RETURN_PSW(8),0(%r12)
1024 mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_return)
1025 la %r12,__LC_RETURN_PSW
1026 br %r14
1027
1028cleanup_io_work_loop:
1029 mvc __LC_RETURN_PSW(8),0(%r12)
1024 mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop) 1030 mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop)
1025 la %r12,__LC_RETURN_PSW 1031 la %r12,__LC_RETURN_PSW
1026 br %r14 1032 br %r14
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index ca4a62bd862f..9d1f76702d47 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -517,7 +517,10 @@ startup:
517 lhi %r1,2 # mode 2 = esame (dump) 517 lhi %r1,2 # mode 2 = esame (dump)
518 sigp %r1,%r0,0x12 # switch to esame mode 518 sigp %r1,%r0,0x12 # switch to esame mode
519 sam64 # switch to 64 bit mode 519 sam64 # switch to 64 bit mode
520 larl %r13,4f
521 lmh %r0,%r15,0(%r13) # clear high-order half
520 jg startup_continue 522 jg startup_continue
5234: .fill 16,4,0x0
521#else 524#else
522 mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) 525 mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0)
523 l %r13,4f-.LPG0(%r13) 526 l %r13,4f-.LPG0(%r13)
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 39580e768658..1f70970de0aa 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -21,7 +21,6 @@ startup_continue:
21 larl %r1,sched_clock_base_cc 21 larl %r1,sched_clock_base_cc
22 mvc 0(8,%r1),__LC_LAST_UPDATE_CLOCK 22 mvc 0(8,%r1),__LC_LAST_UPDATE_CLOCK
23 larl %r13,.LPG1 # get base 23 larl %r13,.LPG1 # get base
24 lmh %r0,%r15,.Lzero64-.LPG1(%r13) # clear high-order half
25 lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers 24 lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers
26 lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area 25 lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area
27 # move IPL device to lowcore 26 # move IPL device to lowcore
@@ -67,7 +66,6 @@ startup_continue:
67.L4malign:.quad 0xffffffffffc00000 66.L4malign:.quad 0xffffffffffc00000
68.Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 67.Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8
69.Lnop: .long 0x07000700 68.Lnop: .long 0x07000700
70.Lzero64:.fill 16,4,0x0
71.Lparmaddr: 69.Lparmaddr:
72 .quad PARMAREA 70 .quad PARMAREA
73 .align 64 71 .align 64
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 7eedbbcb54aa..72c8b0d070c8 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -15,6 +15,7 @@
15#include <linux/reboot.h> 15#include <linux/reboot.h>
16#include <linux/ctype.h> 16#include <linux/ctype.h>
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/gfp.h>
18#include <asm/ipl.h> 19#include <asm/ipl.h>
19#include <asm/smp.h> 20#include <asm/smp.h>
20#include <asm/setup.h> 21#include <asm/setup.h>
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index 86783efa24ee..3d34eef5a2c3 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -29,6 +29,7 @@
29#include <asm/cacheflush.h> 29#include <asm/cacheflush.h>
30#include <asm/sections.h> 30#include <asm/sections.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/slab.h>
32 33
33DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 34DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
34DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 35DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 00b6d1d292f2..1039fdea15b5 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -16,9 +16,9 @@
16#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/smp.h> 17#include <linux/smp.h>
18#include <linux/stddef.h> 18#include <linux/stddef.h>
19#include <linux/slab.h>
19#include <linux/unistd.h> 20#include <linux/unistd.h>
20#include <linux/ptrace.h> 21#include <linux/ptrace.h>
21#include <linux/slab.h>
22#include <linux/vmalloc.h> 22#include <linux/vmalloc.h>
23#include <linux/user.h> 23#include <linux/user.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 77a63ae419f0..91625f759ccd 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -25,7 +25,6 @@
25#include <linux/stddef.h> 25#include <linux/stddef.h>
26#include <linux/unistd.h> 26#include <linux/unistd.h>
27#include <linux/ptrace.h> 27#include <linux/ptrace.h>
28#include <linux/slab.h>
29#include <linux/user.h> 28#include <linux/user.h>
30#include <linux/tty.h> 29#include <linux/tty.h>
31#include <linux/ioport.h> 30#include <linux/ioport.h>
@@ -401,7 +400,7 @@ setup_lowcore(void)
401 * Setup lowcore for boot cpu 400 * Setup lowcore for boot cpu
402 */ 401 */
403 BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096); 402 BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096);
404 lc = __alloc_bootmem(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); 403 lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0);
405 lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; 404 lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY;
406 lc->restart_psw.addr = 405 lc->restart_psw.addr =
407 PSW_ADDR_AMODE | (unsigned long) restart_int_handler; 406 PSW_ADDR_AMODE | (unsigned long) restart_int_handler;
@@ -433,7 +432,7 @@ setup_lowcore(void)
433#ifndef CONFIG_64BIT 432#ifndef CONFIG_64BIT
434 if (MACHINE_HAS_IEEE) { 433 if (MACHINE_HAS_IEEE) {
435 lc->extended_save_area_addr = (__u32) 434 lc->extended_save_area_addr = (__u32)
436 __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0); 435 __alloc_bootmem_low(PAGE_SIZE, PAGE_SIZE, 0);
437 /* enable extended save area */ 436 /* enable extended save area */
438 __ctl_set_bit(14, 29); 437 __ctl_set_bit(14, 29);
439 } 438 }
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 29f65bce55e1..e4d98de83dd8 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -36,6 +36,7 @@
36#include <linux/cpu.h> 36#include <linux/cpu.h>
37#include <linux/timex.h> 37#include <linux/timex.h>
38#include <linux/bootmem.h> 38#include <linux/bootmem.h>
39#include <linux/slab.h>
39#include <asm/asm-offsets.h> 40#include <asm/asm-offsets.h>
40#include <asm/ipl.h> 41#include <asm/ipl.h>
41#include <asm/setup.h> 42#include <asm/setup.h>
@@ -292,9 +293,9 @@ static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu)
292 zfcpdump_save_areas[cpu] = kmalloc(sizeof(struct save_area), GFP_KERNEL); 293 zfcpdump_save_areas[cpu] = kmalloc(sizeof(struct save_area), GFP_KERNEL);
293 while (raw_sigp(phy_cpu, sigp_stop_and_store_status) == sigp_busy) 294 while (raw_sigp(phy_cpu, sigp_stop_and_store_status) == sigp_busy)
294 cpu_relax(); 295 cpu_relax();
295 memcpy(zfcpdump_save_areas[cpu], 296 memcpy_real(zfcpdump_save_areas[cpu],
296 (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE, 297 (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE,
297 sizeof(struct save_area)); 298 sizeof(struct save_area));
298} 299}
299 300
300struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; 301struct save_area *zfcpdump_save_areas[NR_CPUS + 1];
diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c
index b5e75e1061c8..a0ffc7717ed6 100644
--- a/arch/s390/kernel/sysinfo.c
+++ b/arch/s390/kernel/sysinfo.c
@@ -11,6 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/delay.h> 12#include <linux/delay.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/slab.h>
14#include <asm/ebcdic.h> 15#include <asm/ebcdic.h>
15#include <asm/sysinfo.h> 16#include <asm/sysinfo.h>
16#include <asm/cpcmd.h> 17#include <asm/cpcmd.h>
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index aa2483e460f3..fba6dec156bf 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -36,6 +36,7 @@
36#include <linux/notifier.h> 36#include <linux/notifier.h>
37#include <linux/clocksource.h> 37#include <linux/clocksource.h>
38#include <linux/clockchips.h> 38#include <linux/clockchips.h>
39#include <linux/gfp.h>
39#include <asm/uaccess.h> 40#include <asm/uaccess.h>
40#include <asm/delay.h> 41#include <asm/delay.h>
41#include <asm/s390_ext.h> 42#include <asm/s390_ext.h>
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 14ef6f05e432..247b4c2d1e51 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -165,10 +165,11 @@ static void tl_to_cores(struct tl_info *info)
165 default: 165 default:
166 clear_cores(); 166 clear_cores();
167 machine_has_topology = 0; 167 machine_has_topology = 0;
168 return; 168 goto out;
169 } 169 }
170 tle = next_tle(tle); 170 tle = next_tle(tle);
171 } 171 }
172out:
172 spin_unlock_irq(&topology_lock); 173 spin_unlock_irq(&topology_lock);
173} 174}
174 175
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 834774d8d5f3..35c21bf910c5 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -14,6 +14,7 @@
14#include <linux/kvm_host.h> 14#include <linux/kvm_host.h>
15#include <linux/hrtimer.h> 15#include <linux/hrtimer.h>
16#include <linux/signal.h> 16#include <linux/signal.h>
17#include <linux/slab.h>
17#include <asm/asm-offsets.h> 18#include <asm/asm-offsets.h>
18#include <asm/uaccess.h> 19#include <asm/uaccess.h>
19#include "kvm-s390.h" 20#include "kvm-s390.h"
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 28c55677eb39..44205507717c 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -12,6 +12,7 @@
12 */ 12 */
13 13
14#include <linux/kvm.h> 14#include <linux/kvm.h>
15#include <linux/gfp.h>
15#include <linux/errno.h> 16#include <linux/errno.h>
16#include <asm/current.h> 17#include <asm/current.h>
17#include <asm/debug.h> 18#include <asm/debug.h>
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 241a48459b66..eff3c5989b46 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -14,6 +14,7 @@
14 14
15#include <linux/kvm.h> 15#include <linux/kvm.h>
16#include <linux/kvm_host.h> 16#include <linux/kvm_host.h>
17#include <linux/slab.h>
17#include "gaccess.h" 18#include "gaccess.h"
18#include "kvm-s390.h" 19#include "kvm-s390.h"
19 20
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index f16bd04e39e9..f87b34731e1d 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -12,6 +12,7 @@
12#include <linux/fs.h> 12#include <linux/fs.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/gfp.h>
15#include <linux/sched.h> 16#include <linux/sched.h>
16#include <linux/sysctl.h> 17#include <linux/sysctl.h>
17#include <linux/ctype.h> 18#include <linux/ctype.h>
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index d5865e4024ce..acc91c75bc94 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -26,6 +26,7 @@
26#include <linux/pfn.h> 26#include <linux/pfn.h>
27#include <linux/poison.h> 27#include <linux/poison.h>
28#include <linux/initrd.h> 28#include <linux/initrd.h>
29#include <linux/gfp.h>
29#include <asm/processor.h> 30#include <asm/processor.h>
30#include <asm/system.h> 31#include <asm/system.h>
31#include <asm/uaccess.h> 32#include <asm/uaccess.h>
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c
index 81756271dc44..a8c2af8c650f 100644
--- a/arch/s390/mm/maccess.c
+++ b/arch/s390/mm/maccess.c
@@ -59,3 +59,29 @@ long probe_kernel_write(void *dst, void *src, size_t size)
59 } 59 }
60 return copied < 0 ? -EFAULT : 0; 60 return copied < 0 ? -EFAULT : 0;
61} 61}
62
63int memcpy_real(void *dest, void *src, size_t count)
64{
65 register unsigned long _dest asm("2") = (unsigned long) dest;
66 register unsigned long _len1 asm("3") = (unsigned long) count;
67 register unsigned long _src asm("4") = (unsigned long) src;
68 register unsigned long _len2 asm("5") = (unsigned long) count;
69 unsigned long flags;
70 int rc = -EFAULT;
71
72 if (!count)
73 return 0;
74 flags = __raw_local_irq_stnsm(0xf8UL);
75 asm volatile (
76 "0: mvcle %1,%2,0x0\n"
77 "1: jo 0b\n"
78 " lhi %0,0x0\n"
79 "2:\n"
80 EX_TABLE(1b,2b)
81 : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1),
82 "+d" (_len2), "=m" (*((long *) dest))
83 : "m" (*((long *) src))
84 : "cc", "memory");
85 __raw_local_irq_ssm(flags);
86 return rc;
87}
diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c
index 098923ae458f..a90d45e9dfb0 100644
--- a/arch/s390/mm/page-states.c
+++ b/arch/s390/mm/page-states.c
@@ -10,6 +10,7 @@
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/gfp.h>
13#include <linux/init.h> 14#include <linux/init.h>
14 15
15#define ESSA_SET_STABLE 1 16#define ESSA_SET_STABLE 1
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index ad621e06ada3..8d999249d357 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -6,11 +6,11 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/errno.h> 8#include <linux/errno.h>
9#include <linux/gfp.h>
9#include <linux/mm.h> 10#include <linux/mm.h>
10#include <linux/swap.h> 11#include <linux/swap.h>
11#include <linux/smp.h> 12#include <linux/smp.h>
12#include <linux/highmem.h> 13#include <linux/highmem.h>
13#include <linux/slab.h>
14#include <linux/pagemap.h> 14#include <linux/pagemap.h>
15#include <linux/spinlock.h> 15#include <linux/spinlock.h>
16#include <linux/module.h> 16#include <linux/module.h>
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 300ab012b0fd..90165e7ca04e 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -11,6 +11,7 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/list.h> 12#include <linux/list.h>
13#include <linux/hugetlb.h> 13#include <linux/hugetlb.h>
14#include <linux/slab.h>
14#include <asm/pgalloc.h> 15#include <asm/pgalloc.h>
15#include <asm/pgtable.h> 16#include <asm/pgtable.h>
16#include <asm/setup.h> 17#include <asm/setup.h>
@@ -70,12 +71,8 @@ static pte_t __ref *vmem_pte_alloc(void)
70 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); 71 pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t));
71 if (!pte) 72 if (!pte)
72 return NULL; 73 return NULL;
73 if (MACHINE_HAS_HPAGE) 74 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
74 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO, 75 PTRS_PER_PTE * sizeof(pte_t));
75 PTRS_PER_PTE * sizeof(pte_t));
76 else
77 clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY,
78 PTRS_PER_PTE * sizeof(pte_t));
79 return pte; 76 return pte;
80} 77}
81 78
@@ -116,8 +113,7 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro)
116 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && 113 if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) &&
117 (address + HPAGE_SIZE <= start + size) && 114 (address + HPAGE_SIZE <= start + size) &&
118 (address >= HPAGE_SIZE)) { 115 (address >= HPAGE_SIZE)) {
119 pte_val(pte) |= _SEGMENT_ENTRY_LARGE | 116 pte_val(pte) |= _SEGMENT_ENTRY_LARGE;
120 _SEGMENT_ENTRY_CO;
121 pmd_val(*pm_dir) = pte_val(pte); 117 pmd_val(*pm_dir) = pte_val(pte);
122 address += HPAGE_SIZE - PAGE_SIZE; 118 address += HPAGE_SIZE - PAGE_SIZE;
123 continue; 119 continue;