]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] s390: core s390.
authorAndrew Morton <akpm@osdl.org>
Thu, 22 Apr 2004 06:34:32 +0000 (23:34 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 22 Apr 2004 06:34:32 +0000 (23:34 -0700)
From: Martin Schwidefsky <schwidefsky@de.ibm.com>

s390 core changes:
 - Fix race in do_call_softirq in regard to kernel preemption.
 - Fix typo in compat mq system call wrappers.
 - Add s390 to Kconfig for AUDITSYSCALL.
 - Redefine TASK_SIZE to TASK31_SIZE for compilation of binfmt_elf32.
 - Use correct error value for sys32_ipc when called with an invalid number.
 - New default configuration.

arch/s390/defconfig
arch/s390/kernel/binfmt_elf32.c
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/entry.S
arch/s390/kernel/entry64.S
init/Kconfig

index 574c1b2a9d068fcd34077dac1d0760da646008cf..765b7b381799ac3a58689a42fc69ab98fdfe9369 100644 (file)
@@ -18,8 +18,10 @@ CONFIG_STANDALONE=y
 #
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
 CONFIG_LOG_BUF_SHIFT=17
 CONFIG_HOTPLUG=y
 CONFIG_IKCONFIG=y
@@ -31,6 +33,7 @@ CONFIG_EPOLL=y
 CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 
 #
@@ -231,8 +234,6 @@ CONFIG_IPV6=y
 # CONFIG_INET6_ESP is not set
 # CONFIG_INET6_IPCOMP is not set
 # CONFIG_IPV6_TUNNEL is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
 # CONFIG_NETFILTER is not set
 CONFIG_XFRM=y
 # CONFIG_XFRM_USER is not set
@@ -242,7 +243,9 @@ CONFIG_XFRM=y
 #
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
 # CONFIG_LLC2 is not set
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
@@ -286,6 +289,11 @@ CONFIG_NET_CLS_POLICE=y
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
 CONFIG_NETDEVICES=y
 CONFIG_DUMMY=m
 CONFIG_BONDING=m
@@ -305,20 +313,16 @@ CONFIG_NET_ETHERNET=y
 #
 # Ethernet (10000 Mbit)
 #
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
 
 #
-# Wireless LAN (non-hamradio)
+# Token Ring devices
 #
-# CONFIG_NET_RADIO is not set
+# CONFIG_TR is not set
 
 #
-# Token Ring devices
+# Wireless LAN (non-hamradio)
 #
-# CONFIG_TR is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
+# CONFIG_NET_RADIO is not set
 
 #
 # Wan interfaces
@@ -341,23 +345,10 @@ CONFIG_QETH=y
 # CONFIG_QETH_IPV6 is not set
 # CONFIG_QETH_PERF_STATS is not set
 CONFIG_CCWGROUP=y
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
 
 #
 # File systems
@@ -397,6 +388,7 @@ CONFIG_FS_MBCACHE=y
 #
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
 # CONFIG_DEVFS_FS is not set
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
index 0cc8e5be48baa4e0a3f05ef9fe9246b1cc7ff502..b68ace7e2e4fd41404aedea30ffc2298202dad94 100644 (file)
@@ -33,6 +33,8 @@
 #define NUM_ACRS      16    
 
 #define TASK31_SIZE            (0x80000000UL)
+#undef TASK_SIZE
+#define TASK_SIZE TASK31_SIZE
 
 /* For SVR4/S390 the function pointer to be registered with `atexit` is
    passed in R14. */
index 566277b9409c945760dfe3cb8b005e2b4ab8a1aa..df06185d54c2843dccc19e178c0634e2ae172d2f 100644 (file)
@@ -297,64 +297,46 @@ static inline long put_tv32(struct compat_timeval *o, struct timeval *i)
  */
 asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr)
 {
-       if(call >> 16) /* hack for backward compatibility */
+       if (call >> 16)         /* hack for backward compatibility */
                return -EINVAL;
 
        call &= 0xffff;
 
-       if (call <= SEMTIMEDOP)
-               switch (call) {
-               case SEMTIMEDOP:
-                       if (third)
-                               return compat_sys_semtimedop(first,
-                                               compat_ptr(ptr), second,
-                                               compat_ptr(third));
-                       /* else fall through for normal semop() */
-               case SEMOP:
-                       /* struct sembuf is the same on 32 and 64bit :)) */
-                       return sys_semtimedop (first, compat_ptr(ptr),
-                                             second, NULL);
-               case SEMGET:
-                       return sys_semget (first, second, third);
-               case SEMCTL:
-                       return compat_sys_semctl (first, second, third,
-                                                compat_ptr(ptr));
-               default:
-                       return -EINVAL;
-               };
-       if (call <= MSGCTL) 
-               switch (call) {
-               case MSGSND:
-                       return compat_sys_msgsnd (first, second, third,
-                                               compat_ptr(ptr));
-               case MSGRCV:
-                       return compat_sys_msgrcv (first, second, 0, third,
-                                              0, compat_ptr(ptr));
-               case MSGGET:
-                       return sys_msgget ((key_t) first, second);
-               case MSGCTL:
-                       return compat_sys_msgctl (first, second,
-                                               compat_ptr(ptr));
-               default:
-                       return -EINVAL;
-               }
-       if (call <= SHMCTL) 
-               switch (call) {
-               case SHMAT:
-                       return compat_sys_shmat (first, second, third,
-                                               0, compat_ptr(ptr));
-               case SHMDT: 
-                       return sys_shmdt(compat_ptr(ptr));
-               case SHMGET:
-                       return sys_shmget(first, second, third);
-               case SHMCTL:
-                       return compat_sys_shmctl(first, second,
-                                               compat_ptr(ptr));
-               default:
-                       return -EINVAL;
-               }
+       switch (call) {
+       case SEMTIMEDOP:
+               return compat_sys_semtimedop(first, compat_ptr(ptr),
+                                            second, compat_ptr(third));
+       case SEMOP:
+               /* struct sembuf is the same on 32 and 64bit :)) */
+               return sys_semtimedop(first, compat_ptr(ptr),
+                                     second, NULL);
+       case SEMGET:
+               return sys_semget(first, second, third);
+       case SEMCTL:
+               return compat_sys_semctl(first, second, third,
+                                        compat_ptr(ptr));
+       case MSGSND:
+               return compat_sys_msgsnd(first, second, third,
+                                        compat_ptr(ptr));
+       case MSGRCV:
+               return compat_sys_msgrcv(first, second, 0, third,
+                                        0, compat_ptr(ptr));
+       case MSGGET:
+               return sys_msgget((key_t) first, second);
+       case MSGCTL:
+               return compat_sys_msgctl(first, second, compat_ptr(ptr));
+       case SHMAT:
+               return compat_sys_shmat(first, second, third,
+                                       0, compat_ptr(ptr));
+       case SHMDT:
+               return sys_shmdt(compat_ptr(ptr));
+       case SHMGET:
+               return sys_shmget(first, second, third);
+       case SHMCTL:
+               return compat_sys_shmctl(first, second, compat_ptr(ptr));
+       }
 
-       return -EINVAL;
+       return -ENOSYS;
 }
 
 asmlinkage long sys32_truncate64(const char * path, unsigned long high, unsigned long low)
index 043c25b7b8f9c3decfcbc8cac14f4485bd3ab1b1..66861b95da68f53125a24469edfd36cb5b60c56c 100644 (file)
@@ -1361,7 +1361,7 @@ compat_sys_mq_open_wrapper:
        llgtr   %r5,%r5                 # struct compat_mq_attr *
        jg      compat_sys_mq_open
 
-       .globl  sys_mq_unlink_wrapper
+       .globl  sys32_mq_unlink_wrapper
 sys32_mq_unlink_wrapper:
        llgtr   %r2,%r2                 # const char *
        jg      sys_mq_unlink
index 37520c7e71be2342ace9bd96aa6ba56f4331a53c..d5a9e1cdac0986167b50612e1f72f5636b8a8f34 100644 (file)
@@ -198,7 +198,8 @@ __switch_to_noper:
  */
        .global do_call_softirq
 do_call_softirq:
-       stm     %r12,%r15,24(%r15)
+       stnsm   24(%r15),0xfc
+       stm     %r12,%r15,28(%r15)
        lr      %r12,%r15
         basr    %r13,0
 do_call_base:
@@ -211,7 +212,8 @@ do_call_base:
         st     %r12,0(%r15)    # store backchain
        l       %r1,.Ldo_softirq-do_call_base(%r13)
        basr    %r14,%r1
-       lm      %r12,%r15,24(%r12)
+       lm      %r12,%r15,28(%r12)
+       ssm     24(%r15)
        br      %r14
        
 __critical_start:
index 89c52f6b35fecfb26bc085304553e38306520ace..e94e694d512cd7bd7cd40835e087336799cdf2d5 100644 (file)
@@ -186,7 +186,8 @@ __switch_to_noper:
  */
        .global do_call_softirq
 do_call_softirq:
-       stmg    %r12,%r15,48(%r15)
+       stnsm   48(%r15),0xfc
+       stmg    %r12,%r15,56(%r15)
        lgr     %r12,%r15
        lg      %r0,__LC_ASYNC_STACK
        slgr    %r0,%r15
@@ -196,7 +197,8 @@ do_call_softirq:
 0:     aghi    %r15,-STACK_FRAME_OVERHEAD
        stg     %r12,0(%r15)            # store back chain
        brasl   %r14,do_softirq
-       lmg     %r12,%r15,48(%r12)
+       lmg     %r12,%r15,56(%r12)
+       ssm     48(%r15)
        br      %r14
 
 __critical_start:
index 55261afdc3bfeca4557f1005bad31f01431deff9..337feb1026ea09e55bdee12e119077ec5de07cff 100644 (file)
@@ -149,7 +149,7 @@ config AUDIT
 
 config AUDITSYSCALL
        bool "Enable system-call auditing support"
-       depends on AUDIT && (X86 || PPC64)
+       depends on AUDIT && (X86 || PPC64 || ARCH_S390)
        default y if SECURITY_SELINUX
        default n
        help