aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
commit51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch)
tree9f54936c87764bef75e97395cb56b7d1e0df24c6 /arch/s390
parent4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff)
parent6be325719b3e54624397e413efd4b33a997e55a3 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/defconfig86
-rw-r--r--arch/s390/include/asm/bug.h4
-rw-r--r--arch/s390/include/asm/param.h28
-rw-r--r--arch/s390/include/asm/sigp.h20
-rw-r--r--arch/s390/include/asm/thread_info.h12
-rw-r--r--arch/s390/include/asm/unistd.h6
-rw-r--r--arch/s390/kernel/compat_linux.c41
-rw-r--r--arch/s390/kernel/compat_wrapper.S9
-rw-r--r--arch/s390/kernel/process.c3
-rw-r--r--arch/s390/kernel/ptrace.c8
-rw-r--r--arch/s390/kernel/setup.c8
-rw-r--r--arch/s390/kernel/signal.c10
-rw-r--r--arch/s390/kernel/smp.c9
-rw-r--r--arch/s390/kernel/syscalls.S1
-rw-r--r--arch/s390/kernel/topology.c2
-rw-r--r--arch/s390/lib/spinlock.c2
-rw-r--r--arch/s390/mm/mmap.c4
17 files changed, 143 insertions, 110 deletions
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index f4e53c6708dc..b416aa11b91e 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.31 3# Linux kernel version: 2.6.33-rc2
4# Tue Sep 22 17:43:13 2009 4# Mon Jan 4 09:03:07 2010
5# 5#
6CONFIG_SCHED_MC=y 6CONFIG_SCHED_MC=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -51,6 +51,7 @@ CONFIG_AUDIT=y
51# 51#
52CONFIG_TREE_RCU=y 52CONFIG_TREE_RCU=y
53# CONFIG_TREE_PREEMPT_RCU is not set 53# CONFIG_TREE_PREEMPT_RCU is not set
54# CONFIG_TINY_RCU is not set
54# CONFIG_RCU_TRACE is not set 55# CONFIG_RCU_TRACE is not set
55CONFIG_RCU_FANOUT=64 56CONFIG_RCU_FANOUT=64
56# CONFIG_RCU_FANOUT_EXACT is not set 57# CONFIG_RCU_FANOUT_EXACT is not set
@@ -113,7 +114,6 @@ CONFIG_HAVE_PERF_EVENTS=y
113# CONFIG_PERF_EVENTS is not set 114# CONFIG_PERF_EVENTS is not set
114# CONFIG_PERF_COUNTERS is not set 115# CONFIG_PERF_COUNTERS is not set
115CONFIG_VM_EVENT_COUNTERS=y 116CONFIG_VM_EVENT_COUNTERS=y
116# CONFIG_STRIP_ASM_SYMS is not set
117# CONFIG_COMPAT_BRK is not set 117# CONFIG_COMPAT_BRK is not set
118CONFIG_SLAB=y 118CONFIG_SLAB=y
119# CONFIG_SLUB is not set 119# CONFIG_SLUB is not set
@@ -149,21 +149,78 @@ CONFIG_STOP_MACHINE=y
149CONFIG_BLOCK=y 149CONFIG_BLOCK=y
150CONFIG_BLK_DEV_BSG=y 150CONFIG_BLK_DEV_BSG=y
151# CONFIG_BLK_DEV_INTEGRITY is not set 151# CONFIG_BLK_DEV_INTEGRITY is not set
152# CONFIG_BLK_CGROUP is not set
152CONFIG_BLOCK_COMPAT=y 153CONFIG_BLOCK_COMPAT=y
153 154
154# 155#
155# IO Schedulers 156# IO Schedulers
156# 157#
157CONFIG_IOSCHED_NOOP=y 158CONFIG_IOSCHED_NOOP=y
158CONFIG_IOSCHED_AS=y
159CONFIG_IOSCHED_DEADLINE=y 159CONFIG_IOSCHED_DEADLINE=y
160CONFIG_IOSCHED_CFQ=y 160CONFIG_IOSCHED_CFQ=y
161# CONFIG_DEFAULT_AS is not set 161# CONFIG_CFQ_GROUP_IOSCHED is not set
162CONFIG_DEFAULT_DEADLINE=y 162CONFIG_DEFAULT_DEADLINE=y
163# CONFIG_DEFAULT_CFQ is not set 163# CONFIG_DEFAULT_CFQ is not set
164# CONFIG_DEFAULT_NOOP is not set 164# CONFIG_DEFAULT_NOOP is not set
165CONFIG_DEFAULT_IOSCHED="deadline" 165CONFIG_DEFAULT_IOSCHED="deadline"
166CONFIG_PREEMPT_NOTIFIERS=y 166CONFIG_PREEMPT_NOTIFIERS=y
167CONFIG_ARCH_INLINE_SPIN_TRYLOCK=y
168CONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y
169CONFIG_ARCH_INLINE_SPIN_LOCK=y
170CONFIG_ARCH_INLINE_SPIN_LOCK_BH=y
171CONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y
172CONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y
173CONFIG_ARCH_INLINE_SPIN_UNLOCK=y
174CONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y
175CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y
176CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y
177CONFIG_ARCH_INLINE_READ_TRYLOCK=y
178CONFIG_ARCH_INLINE_READ_LOCK=y
179CONFIG_ARCH_INLINE_READ_LOCK_BH=y
180CONFIG_ARCH_INLINE_READ_LOCK_IRQ=y
181CONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y
182CONFIG_ARCH_INLINE_READ_UNLOCK=y
183CONFIG_ARCH_INLINE_READ_UNLOCK_BH=y
184CONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y
185CONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y
186CONFIG_ARCH_INLINE_WRITE_TRYLOCK=y
187CONFIG_ARCH_INLINE_WRITE_LOCK=y
188CONFIG_ARCH_INLINE_WRITE_LOCK_BH=y
189CONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y
190CONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y
191CONFIG_ARCH_INLINE_WRITE_UNLOCK=y
192CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y
193CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y
194CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y
195# CONFIG_INLINE_SPIN_TRYLOCK is not set
196# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
197# CONFIG_INLINE_SPIN_LOCK is not set
198# CONFIG_INLINE_SPIN_LOCK_BH is not set
199# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
200# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
201# CONFIG_INLINE_SPIN_UNLOCK is not set
202# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
203# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
204# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
205# CONFIG_INLINE_READ_TRYLOCK is not set
206# CONFIG_INLINE_READ_LOCK is not set
207# CONFIG_INLINE_READ_LOCK_BH is not set
208# CONFIG_INLINE_READ_LOCK_IRQ is not set
209# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
210# CONFIG_INLINE_READ_UNLOCK is not set
211# CONFIG_INLINE_READ_UNLOCK_BH is not set
212# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
213# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
214# CONFIG_INLINE_WRITE_TRYLOCK is not set
215# CONFIG_INLINE_WRITE_LOCK is not set
216# CONFIG_INLINE_WRITE_LOCK_BH is not set
217# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
218# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
219# CONFIG_INLINE_WRITE_UNLOCK is not set
220# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
221# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
222# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
223# CONFIG_MUTEX_SPIN_ON_OWNER is not set
167CONFIG_FREEZER=y 224CONFIG_FREEZER=y
168 225
169# 226#
@@ -227,14 +284,13 @@ CONFIG_MEMORY_HOTPLUG=y
227CONFIG_MEMORY_HOTPLUG_SPARSE=y 284CONFIG_MEMORY_HOTPLUG_SPARSE=y
228CONFIG_MEMORY_HOTREMOVE=y 285CONFIG_MEMORY_HOTREMOVE=y
229CONFIG_PAGEFLAGS_EXTENDED=y 286CONFIG_PAGEFLAGS_EXTENDED=y
230CONFIG_SPLIT_PTLOCK_CPUS=4 287CONFIG_SPLIT_PTLOCK_CPUS=999999
231CONFIG_MIGRATION=y 288CONFIG_MIGRATION=y
232CONFIG_PHYS_ADDR_T_64BIT=y 289CONFIG_PHYS_ADDR_T_64BIT=y
233CONFIG_ZONE_DMA_FLAG=1 290CONFIG_ZONE_DMA_FLAG=1
234CONFIG_BOUNCE=y 291CONFIG_BOUNCE=y
235CONFIG_VIRT_TO_BUS=y 292CONFIG_VIRT_TO_BUS=y
236CONFIG_HAVE_MLOCK=y 293# CONFIG_KSM is not set
237CONFIG_HAVE_MLOCKED_PAGE_BIT=y
238CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 294CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
239 295
240# 296#
@@ -339,6 +395,7 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
339CONFIG_INET6_XFRM_MODE_BEET=y 395CONFIG_INET6_XFRM_MODE_BEET=y
340# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 396# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
341CONFIG_IPV6_SIT=y 397CONFIG_IPV6_SIT=y
398# CONFIG_IPV6_SIT_6RD is not set
342CONFIG_IPV6_NDISC_NODETYPE=y 399CONFIG_IPV6_NDISC_NODETYPE=y
343# CONFIG_IPV6_TUNNEL is not set 400# CONFIG_IPV6_TUNNEL is not set
344# CONFIG_IPV6_MULTIPLE_TABLES is not set 401# CONFIG_IPV6_MULTIPLE_TABLES is not set
@@ -504,6 +561,10 @@ CONFIG_BLK_DEV=y
504# CONFIG_BLK_DEV_COW_COMMON is not set 561# CONFIG_BLK_DEV_COW_COMMON is not set
505CONFIG_BLK_DEV_LOOP=m 562CONFIG_BLK_DEV_LOOP=m
506# CONFIG_BLK_DEV_CRYPTOLOOP is not set 563# CONFIG_BLK_DEV_CRYPTOLOOP is not set
564
565#
566# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
567#
507CONFIG_BLK_DEV_NBD=m 568CONFIG_BLK_DEV_NBD=m
508# CONFIG_BLK_DEV_OSD is not set 569# CONFIG_BLK_DEV_OSD is not set
509CONFIG_BLK_DEV_RAM=y 570CONFIG_BLK_DEV_RAM=y
@@ -710,7 +771,6 @@ CONFIG_S390_VMUR=m
710# CONFIG_PPS is not set 771# CONFIG_PPS is not set
711# CONFIG_POWER_SUPPLY is not set 772# CONFIG_POWER_SUPPLY is not set
712# CONFIG_THERMAL is not set 773# CONFIG_THERMAL is not set
713# CONFIG_THERMAL_HWMON is not set
714# CONFIG_WATCHDOG is not set 774# CONFIG_WATCHDOG is not set
715# CONFIG_REGULATOR is not set 775# CONFIG_REGULATOR is not set
716# CONFIG_MEMSTICK is not set 776# CONFIG_MEMSTICK is not set
@@ -864,6 +924,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
864CONFIG_ENABLE_MUST_CHECK=y 924CONFIG_ENABLE_MUST_CHECK=y
865CONFIG_FRAME_WARN=2048 925CONFIG_FRAME_WARN=2048
866CONFIG_MAGIC_SYSRQ=y 926CONFIG_MAGIC_SYSRQ=y
927# CONFIG_STRIP_ASM_SYMS is not set
867# CONFIG_UNUSED_SYMBOLS is not set 928# CONFIG_UNUSED_SYMBOLS is not set
868CONFIG_DEBUG_FS=y 929CONFIG_DEBUG_FS=y
869# CONFIG_HEADERS_CHECK is not set 930# CONFIG_HEADERS_CHECK is not set
@@ -931,7 +992,6 @@ CONFIG_BRANCH_PROFILE_NONE=y
931CONFIG_SAMPLES=y 992CONFIG_SAMPLES=y
932# CONFIG_SAMPLE_KOBJECT is not set 993# CONFIG_SAMPLE_KOBJECT is not set
933# CONFIG_SAMPLE_KPROBES is not set 994# CONFIG_SAMPLE_KPROBES is not set
934# CONFIG_KMEMCHECK is not set
935 995
936# 996#
937# Security options 997# Security options
@@ -939,7 +999,11 @@ CONFIG_SAMPLES=y
939# CONFIG_KEYS is not set 999# CONFIG_KEYS is not set
940# CONFIG_SECURITY is not set 1000# CONFIG_SECURITY is not set
941# CONFIG_SECURITYFS is not set 1001# CONFIG_SECURITYFS is not set
942# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1002# CONFIG_DEFAULT_SECURITY_SELINUX is not set
1003# CONFIG_DEFAULT_SECURITY_SMACK is not set
1004# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
1005CONFIG_DEFAULT_SECURITY_DAC=y
1006CONFIG_DEFAULT_SECURITY=""
943CONFIG_CRYPTO=y 1007CONFIG_CRYPTO=y
944 1008
945# 1009#
diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h
index efb74fd5156e..b1066b9fb5f8 100644
--- a/arch/s390/include/asm/bug.h
+++ b/arch/s390/include/asm/bug.h
@@ -52,6 +52,10 @@
52 unreachable(); \ 52 unreachable(); \
53} while (0) 53} while (0)
54 54
55#define __WARN() do { \
56 __EMIT_BUG(BUGFLAG_WARNING); \
57} while (0)
58
55#define WARN_ON(x) ({ \ 59#define WARN_ON(x) ({ \
56 int __ret_warn_on = !!(x); \ 60 int __ret_warn_on = !!(x); \
57 if (__builtin_constant_p(__ret_warn_on)) { \ 61 if (__builtin_constant_p(__ret_warn_on)) { \
diff --git a/arch/s390/include/asm/param.h b/arch/s390/include/asm/param.h
index 34aaa4603347..c616821bf2ac 100644
--- a/arch/s390/include/asm/param.h
+++ b/arch/s390/include/asm/param.h
@@ -1,30 +1,6 @@
1/*
2 * include/asm-s390/param.h
3 *
4 * S390 version
5 *
6 * Derived from "include/asm-i386/param.h"
7 */
8
9#ifndef _ASMS390_PARAM_H 1#ifndef _ASMS390_PARAM_H
10#define _ASMS390_PARAM_H 2#define _ASMS390_PARAM_H
11 3
12#ifdef __KERNEL__ 4#include <asm-generic/param.h>
13# define HZ CONFIG_HZ /* Internal kernel timer frequency */
14# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
15# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
16#endif
17
18#ifndef HZ
19#define HZ 100
20#endif
21
22#define EXEC_PAGESIZE 4096
23
24#ifndef NOGROUP
25#define NOGROUP (-1)
26#endif
27
28#define MAXHOSTNAMELEN 64 /* max length of hostname */
29 5
30#endif 6#endif /* _ASMS390_PARAM_H */
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h
index ec403d4304f8..f72d611f7e13 100644
--- a/arch/s390/include/asm/sigp.h
+++ b/arch/s390/include/asm/sigp.h
@@ -15,11 +15,19 @@
15#ifndef __SIGP__ 15#ifndef __SIGP__
16#define __SIGP__ 16#define __SIGP__
17 17
18#include <asm/ptrace.h> 18#include <asm/system.h>
19#include <asm/atomic.h>
20 19
21/* get real cpu address from logical cpu number */ 20/* get real cpu address from logical cpu number */
22extern volatile int __cpu_logical_map[]; 21extern int __cpu_logical_map[];
22
23static inline int cpu_logical_map(int cpu)
24{
25#ifdef CONFIG_SMP
26 return __cpu_logical_map[cpu];
27#else
28 return stap();
29#endif
30}
23 31
24typedef enum 32typedef enum
25{ 33{
@@ -79,7 +87,7 @@ signal_processor(__u16 cpu_addr, sigp_order_code order_code)
79 " ipm %0\n" 87 " ipm %0\n"
80 " srl %0,28\n" 88 " srl %0,28\n"
81 : "=d" (ccode) 89 : "=d" (ccode)
82 : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), 90 : "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
83 "a" (order_code) : "cc" , "memory"); 91 "a" (order_code) : "cc" , "memory");
84 return ccode; 92 return ccode;
85} 93}
@@ -98,7 +106,7 @@ signal_processor_p(__u32 parameter, __u16 cpu_addr, sigp_order_code order_code)
98 " ipm %0\n" 106 " ipm %0\n"
99 " srl %0,28\n" 107 " srl %0,28\n"
100 : "=d" (ccode) 108 : "=d" (ccode)
101 : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), 109 : "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
102 "a" (order_code) : "cc" , "memory"); 110 "a" (order_code) : "cc" , "memory");
103 return ccode; 111 return ccode;
104} 112}
@@ -118,7 +126,7 @@ signal_processor_ps(__u32 *statusptr, __u32 parameter, __u16 cpu_addr,
118 " ipm %0\n" 126 " ipm %0\n"
119 " srl %0,28\n" 127 " srl %0,28\n"
120 : "=d" (ccode), "+d" (reg1) 128 : "=d" (ccode), "+d" (reg1)
121 : "d" (__cpu_logical_map[cpu_addr]), "a" (order_code) 129 : "d" (cpu_logical_map(cpu_addr)), "a" (order_code)
122 : "cc" , "memory"); 130 : "cc" , "memory");
123 *statusptr = reg1; 131 *statusptr = reg1;
124 return ccode; 132 return ccode;
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h
index 07eb61b2fb3a..66069e736842 100644
--- a/arch/s390/include/asm/thread_info.h
+++ b/arch/s390/include/asm/thread_info.h
@@ -93,13 +93,12 @@ static inline struct thread_info *current_thread_info(void)
93#define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ 93#define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */
94#define TIF_SECCOMP 10 /* secure computing */ 94#define TIF_SECCOMP 10 /* secure computing */
95#define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ 95#define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */
96#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ 96#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling
97#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling
98 TIF_NEED_RESCHED */ 97 TIF_NEED_RESCHED */
99#define TIF_31BIT 18 /* 32bit process */ 98#define TIF_31BIT 17 /* 32bit process */
100#define TIF_MEMDIE 19 99#define TIF_MEMDIE 18
101#define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */ 100#define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */
102#define TIF_FREEZE 21 /* thread is freezing for suspend */ 101#define TIF_FREEZE 20 /* thread is freezing for suspend */
103 102
104#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) 103#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
105#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 104#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
@@ -112,7 +111,6 @@ static inline struct thread_info *current_thread_info(void)
112#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) 111#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
113#define _TIF_SECCOMP (1<<TIF_SECCOMP) 112#define _TIF_SECCOMP (1<<TIF_SECCOMP)
114#define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) 113#define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT)
115#define _TIF_USEDFPU (1<<TIF_USEDFPU)
116#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 114#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
117#define _TIF_31BIT (1<<TIF_31BIT) 115#define _TIF_31BIT (1<<TIF_31BIT)
118#define _TIF_FREEZE (1<<TIF_FREEZE) 116#define _TIF_FREEZE (1<<TIF_FREEZE)
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h
index 192a7203a14f..6e9f049fa823 100644
--- a/arch/s390/include/asm/unistd.h
+++ b/arch/s390/include/asm/unistd.h
@@ -269,8 +269,7 @@
269#define __NR_pwritev 329 269#define __NR_pwritev 329
270#define __NR_rt_tgsigqueueinfo 330 270#define __NR_rt_tgsigqueueinfo 330
271#define __NR_perf_event_open 331 271#define __NR_perf_event_open 331
272#define __NR_recvmmsg 332 272#define NR_syscalls 332
273#define NR_syscalls 333
274 273
275/* 274/*
276 * There are some system calls that are not present on 64 bit, some 275 * There are some system calls that are not present on 64 bit, some
@@ -377,6 +376,9 @@
377#define __IGNORE_migrate_pages 376#define __IGNORE_migrate_pages
378#define __IGNORE_move_pages 377#define __IGNORE_move_pages
379 378
379/* Ignore system calls that are also reachable via sys_socket */
380#define __IGNORE_recvmmsg
381
380#define __ARCH_WANT_IPC_PARSE_VERSION 382#define __ARCH_WANT_IPC_PARSE_VERSION
381#define __ARCH_WANT_OLD_READDIR 383#define __ARCH_WANT_OLD_READDIR
382#define __ARCH_WANT_SYS_ALARM 384#define __ARCH_WANT_SYS_ALARM
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 22c9e557bb22..11c3aba664ea 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -616,44 +616,35 @@ asmlinkage long sys32_fstatat64(unsigned int dfd, char __user *filename,
616 */ 616 */
617 617
618struct mmap_arg_struct_emu31 { 618struct mmap_arg_struct_emu31 {
619 u32 addr; 619 compat_ulong_t addr;
620 u32 len; 620 compat_ulong_t len;
621 u32 prot; 621 compat_ulong_t prot;
622 u32 flags; 622 compat_ulong_t flags;
623 u32 fd; 623 compat_ulong_t fd;
624 u32 offset; 624 compat_ulong_t offset;
625}; 625};
626 626
627asmlinkage unsigned long 627asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg)
628old32_mmap(struct mmap_arg_struct_emu31 __user *arg)
629{ 628{
630 struct mmap_arg_struct_emu31 a; 629 struct mmap_arg_struct_emu31 a;
631 int error = -EFAULT;
632 630
633 if (copy_from_user(&a, arg, sizeof(a))) 631 if (copy_from_user(&a, arg, sizeof(a)))
634 goto out; 632 return -EFAULT;
635
636 error = -EINVAL;
637 if (a.offset & ~PAGE_MASK) 633 if (a.offset & ~PAGE_MASK)
638 goto out; 634 return -EINVAL;
639 635 a.addr = (unsigned long) compat_ptr(a.addr);
640 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, 636 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
641 a.offset >> PAGE_SHIFT); 637 a.offset >> PAGE_SHIFT);
642out:
643 return error;
644} 638}
645 639
646asmlinkage long 640asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg)
647sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg)
648{ 641{
649 struct mmap_arg_struct_emu31 a; 642 struct mmap_arg_struct_emu31 a;
650 int error = -EFAULT;
651 643
652 if (copy_from_user(&a, arg, sizeof(a))) 644 if (copy_from_user(&a, arg, sizeof(a)))
653 goto out; 645 return -EFAULT;
654 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); 646 a.addr = (unsigned long) compat_ptr(a.addr);
655out: 647 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset);
656 return error;
657} 648}
658 649
659asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count) 650asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count)
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index faeaccc7d7d9..30de2d0e52bb 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1853,12 +1853,3 @@ sys32_execve_wrapper:
1853 llgtr %r3,%r3 # compat_uptr_t * 1853 llgtr %r3,%r3 # compat_uptr_t *
1854 llgtr %r4,%r4 # compat_uptr_t * 1854 llgtr %r4,%r4 # compat_uptr_t *
1855 jg sys32_execve # branch to system call 1855 jg sys32_execve # branch to system call
1856
1857 .globl compat_sys_recvmmsg_wrapper
1858compat_sys_recvmmsg_wrapper:
1859 lgfr %r2,%r2 # int
1860 llgtr %r3,%r3 # struct compat_mmsghdr *
1861 llgfr %r4,%r4 # unsigned int
1862 llgfr %r5,%r5 # unsigned int
1863 llgtr %r6,%r6 # struct compat_timespec *
1864 jg compat_sys_recvmmsg
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 5417eb57271a..00b6d1d292f2 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -153,8 +153,6 @@ void exit_thread(void)
153 153
154void flush_thread(void) 154void flush_thread(void)
155{ 155{
156 clear_used_math();
157 clear_tsk_thread_flag(current, TIF_USEDFPU);
158} 156}
159 157
160void release_thread(struct task_struct *dead_task) 158void release_thread(struct task_struct *dead_task)
@@ -217,6 +215,7 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
217 p->thread.mm_segment = get_fs(); 215 p->thread.mm_segment = get_fs();
218 /* Don't copy debug registers */ 216 /* Don't copy debug registers */
219 memset(&p->thread.per_info, 0, sizeof(p->thread.per_info)); 217 memset(&p->thread.per_info, 0, sizeof(p->thread.per_info));
218 clear_tsk_thread_flag(p, TIF_SINGLE_STEP);
220 /* Initialize per thread user and system timer values */ 219 /* Initialize per thread user and system timer values */
221 ti = task_thread_info(p); 220 ti = task_thread_info(p);
222 ti->user_timer = 0; 221 ti->user_timer = 0;
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 13815d39f7dd..7cf464234419 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -65,6 +65,7 @@ FixPerRegisters(struct task_struct *task)
65{ 65{
66 struct pt_regs *regs; 66 struct pt_regs *regs;
67 per_struct *per_info; 67 per_struct *per_info;
68 per_cr_words cr_words;
68 69
69 regs = task_pt_regs(task); 70 regs = task_pt_regs(task);
70 per_info = (per_struct *) &task->thread.per_info; 71 per_info = (per_struct *) &task->thread.per_info;
@@ -98,6 +99,13 @@ FixPerRegisters(struct task_struct *task)
98 per_info->control_regs.bits.storage_alt_space_ctl = 1; 99 per_info->control_regs.bits.storage_alt_space_ctl = 1;
99 else 100 else
100 per_info->control_regs.bits.storage_alt_space_ctl = 0; 101 per_info->control_regs.bits.storage_alt_space_ctl = 0;
102
103 if (task == current) {
104 __ctl_store(cr_words, 9, 11);
105 if (memcmp(&cr_words, &per_info->control_regs.words,
106 sizeof(cr_words)) != 0)
107 __ctl_load(per_info->control_regs.words, 9, 11);
108 }
101} 109}
102 110
103void user_enable_single_step(struct task_struct *task) 111void user_enable_single_step(struct task_struct *task)
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 0663287fa1b3..8d8957b38ab3 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -87,7 +87,6 @@ unsigned long elf_hwcap = 0;
87char elf_platform[ELF_PLATFORM_SIZE]; 87char elf_platform[ELF_PLATFORM_SIZE];
88 88
89struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS]; 89struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS];
90volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */
91 90
92int __initdata memory_end_set; 91int __initdata memory_end_set;
93unsigned long __initdata memory_end; 92unsigned long __initdata memory_end;
@@ -124,12 +123,6 @@ void __cpuinit cpu_init(void)
124 */ 123 */
125 get_cpu_id(&S390_lowcore.cpu_id); 124 get_cpu_id(&S390_lowcore.cpu_id);
126 125
127 /*
128 * Force FPU initialization:
129 */
130 clear_thread_flag(TIF_USEDFPU);
131 clear_used_math();
132
133 atomic_inc(&init_mm.mm_count); 126 atomic_inc(&init_mm.mm_count);
134 current->active_mm = &init_mm; 127 current->active_mm = &init_mm;
135 BUG_ON(current->mm); 128 BUG_ON(current->mm);
@@ -855,7 +848,6 @@ setup_arch(char **cmdline_p)
855 setup_lowcore(); 848 setup_lowcore();
856 849
857 cpu_init(); 850 cpu_init();
858 __cpu_logical_map[0] = stap();
859 s390_init_cpu_topology(); 851 s390_init_cpu_topology();
860 852
861 /* 853 /*
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index 6b4fef877f9d..1675c48b9145 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -500,18 +500,10 @@ void do_signal(struct pt_regs *regs)
500 clear_thread_flag(TIF_RESTORE_SIGMASK); 500 clear_thread_flag(TIF_RESTORE_SIGMASK);
501 501
502 /* 502 /*
503 * If we would have taken a single-step trap
504 * for a normal instruction, act like we took
505 * one for the handler setup.
506 */
507 if (current->thread.per_info.single_step)
508 set_thread_flag(TIF_SINGLE_STEP);
509
510 /*
511 * Let tracing know that we've done the handler setup. 503 * Let tracing know that we've done the handler setup.
512 */ 504 */
513 tracehook_signal_handler(signr, &info, &ka, regs, 505 tracehook_signal_handler(signr, &info, &ka, regs,
514 test_thread_flag(TIF_SINGLE_STEP)); 506 current->thread.per_info.single_step);
515 } 507 }
516 return; 508 return;
517 } 509 }
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 93e52039321b..76a6fdd46c45 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -52,6 +52,9 @@
52#include <asm/cpu.h> 52#include <asm/cpu.h>
53#include "entry.h" 53#include "entry.h"
54 54
55/* logical cpu to cpu address */
56int __cpu_logical_map[NR_CPUS];
57
55static struct task_struct *current_set[NR_CPUS]; 58static struct task_struct *current_set[NR_CPUS];
56 59
57static u8 smp_cpu_type; 60static u8 smp_cpu_type;
@@ -717,6 +720,12 @@ void __init smp_cpus_done(unsigned int max_cpus)
717{ 720{
718} 721}
719 722
723void __init smp_setup_processor_id(void)
724{
725 S390_lowcore.cpu_nr = 0;
726 __cpu_logical_map[0] = stap();
727}
728
720/* 729/*
721 * the frequency of the profiling timer can be changed 730 * the frequency of the profiling timer can be changed
722 * by writing a multiplier value into /proc/profile. 731 * by writing a multiplier value into /proc/profile.
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 4f292c936872..30eca070d426 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -340,4 +340,3 @@ SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv_wrapper)
340SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper) 340SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper)
341SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo_wrapper) /* 330 */ 341SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo_wrapper) /* 330 */
342SYSCALL(sys_perf_event_open,sys_perf_event_open,sys_perf_event_open_wrapper) 342SYSCALL(sys_perf_event_open,sys_perf_event_open,sys_perf_event_open_wrapper)
343SYSCALL(sys_recvmmsg,sys_recvmmsg,compat_sys_recvmmsg_wrapper)
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 3c72c9cf22b6..14ef6f05e432 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -114,7 +114,7 @@ static void add_cpus_to_core(struct tl_cpu *tl_cpu, struct core_info *core)
114 114
115 rcpu = CPU_BITS - 1 - cpu + tl_cpu->origin; 115 rcpu = CPU_BITS - 1 - cpu + tl_cpu->origin;
116 for_each_present_cpu(lcpu) { 116 for_each_present_cpu(lcpu) {
117 if (__cpu_logical_map[lcpu] == rcpu) { 117 if (cpu_logical_map(lcpu) == rcpu) {
118 cpu_set(lcpu, core->mask); 118 cpu_set(lcpu, core->mask);
119 smp_cpu_polarization[lcpu] = tl_cpu->pp; 119 smp_cpu_polarization[lcpu] = tl_cpu->pp;
120 } 120 }
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index 10754a375668..cff327f109a8 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -34,7 +34,7 @@ static inline void _raw_yield_cpu(int cpu)
34{ 34{
35 if (MACHINE_HAS_DIAG9C) 35 if (MACHINE_HAS_DIAG9C)
36 asm volatile("diag %0,0,0x9c" 36 asm volatile("diag %0,0,0x9c"
37 : : "d" (__cpu_logical_map[cpu])); 37 : : "d" (cpu_logical_map(cpu)));
38 else 38 else
39 _raw_yield(); 39 _raw_yield();
40} 40}
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
index f4558ccf02b9..869efbaed3ea 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
@@ -40,7 +40,7 @@
40 40
41static inline unsigned long mmap_base(void) 41static inline unsigned long mmap_base(void)
42{ 42{
43 unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur; 43 unsigned long gap = rlimit(RLIMIT_STACK);
44 44
45 if (gap < MIN_GAP) 45 if (gap < MIN_GAP)
46 gap = MIN_GAP; 46 gap = MIN_GAP;
@@ -61,7 +61,7 @@ static inline int mmap_is_legacy(void)
61#endif 61#endif
62 return sysctl_legacy_va_layout || 62 return sysctl_legacy_va_layout ||
63 (current->personality & ADDR_COMPAT_LAYOUT) || 63 (current->personality & ADDR_COMPAT_LAYOUT) ||
64 current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY; 64 rlimit(RLIMIT_STACK) == RLIM_INFINITY;
65} 65}
66 66
67#ifndef CONFIG_64BIT 67#ifndef CONFIG_64BIT