]> git.hungrycats.org Git - linux/commitdiff
[PATCH] s390: core s390 update
authorAndrew Morton <akpm@osdl.org>
Mon, 1 Mar 2004 15:00:55 +0000 (07:00 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 1 Mar 2004 15:00:55 +0000 (07:00 -0800)
From: Martin Schwidefsky <schwidefsky@de.ibm.com>

s390 bug fixes:

- Add missing i/o controls to compat ioctl translation table.

- Fix some gcc 3.4 warnings.

- Export _sb_findmap.

- Export smp_call_function_on only if CONFIG_SMP=y.

- Add safe-guard to diag10.

- Add type definition for compat_timer_t.

- Fix first argument of signal_processor_ps.

arch/s390/kernel/compat_ioctl.c
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_ptrace.h
arch/s390/kernel/s390_ksyms.c
arch/s390/kernel/smp.c
arch/s390/kernel/traps.c
arch/s390/mm/cmm.c
arch/s390/mm/init.c
include/asm-s390/compat.h
include/asm-s390/sigp.h

index 390881f8b911172a1403316052e9cde77e9437c1..7c7ca191f7f4a0f7c49c8b4c7b5e30a8cd3cb47b 100644 (file)
@@ -49,7 +49,16 @@ COMPATIBLE_IOCTL(BIODASDRSRV)
 COMPATIBLE_IOCTL(BIODASDRLSE)
 COMPATIBLE_IOCTL(BIODASDSLCK)
 COMPATIBLE_IOCTL(BIODASDINFO)
+COMPATIBLE_IOCTL(BIODASDINFO2)
 COMPATIBLE_IOCTL(BIODASDFMT)
+COMPATIBLE_IOCTL(BIODASDPRRST)
+COMPATIBLE_IOCTL(BIODASDQUIESCE)
+COMPATIBLE_IOCTL(BIODASDRESUME)
+COMPATIBLE_IOCTL(BIODASDPRRD)
+COMPATIBLE_IOCTL(BIODASDPSRD)
+COMPATIBLE_IOCTL(BIODASDGATTR)
+COMPATIBLE_IOCTL(BIODASDSATTR)
+
 #endif
 
 #if defined(CONFIG_S390_TAPE) || defined(CONFIG_S390_TAPE_MODULE)
index d69ded304b9b5ef8217954524910da33147fc7d1..96374895090604a096a2d7104f3226a09368334e 100644 (file)
@@ -1161,8 +1161,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, i
        put_user(reclen, &dirent->d_reclen);
        copy_to_user(dirent->d_name, name, namlen);
        put_user(0, dirent->d_name + namlen);
-       ((char *) dirent) += reclen;
-       buf->current_dir = dirent;
+       buf->current_dir = ((void *)dirent) + reclen;
        buf->count -= reclen;
        return 0;
 }
index e6942a0eaad2b04a678ead6ca488ccaf62fd98e7..419aef913ee1233c0ab6af25c81ef21a1a22061f 100644 (file)
@@ -3,23 +3,20 @@
 
 #include "compat_linux.h"  /* needed for _psw_t32 */
 
-typedef struct
-{
+typedef struct {
        __u32 cr[3];
-} per_cr_words32  __attribute__((packed));
+} per_cr_words32;
 
-typedef struct
-{
+typedef struct {
        __u16          perc_atmid;          /* 0x096 */
        __u32          address;             /* 0x098 */
        __u8           access_id;           /* 0x0a1 */
-} per_lowcore_words32  __attribute__((packed));
+} per_lowcore_words32;
 
-typedef struct
-{
+typedef struct {
        union {
                per_cr_words32   words;
-       } control_regs  __attribute__((packed));
+       } control_regs;
        /*
         * Use these flags instead of setting em_instruction_fetch
         * directly they are used so that single stepping can be
@@ -37,7 +34,7 @@ typedef struct
        union {
                per_lowcore_words32 words;
        } lowcore; 
-} per_struct32 __attribute__((packed));
+} per_struct32;
 
 struct user_regs_struct32
 {
index b51f748069a4a72d97df84566bc2527e39fb6309..0153d8437ecc1712f0162a83d52f41d72050c927 100644 (file)
@@ -29,6 +29,7 @@
 EXPORT_SYMBOL_NOVERS(_oi_bitmap);
 EXPORT_SYMBOL_NOVERS(_ni_bitmap);
 EXPORT_SYMBOL_NOVERS(_zb_findmap);
+EXPORT_SYMBOL_NOVERS(_sb_findmap);
 EXPORT_SYMBOL_NOVERS(__copy_from_user_asm);
 EXPORT_SYMBOL_NOVERS(__copy_to_user_asm);
 EXPORT_SYMBOL_NOVERS(__clear_user_asm);
@@ -92,5 +93,4 @@ EXPORT_SYMBOL(console_device);
 EXPORT_SYMBOL_NOVERS(do_call_softirq);
 EXPORT_SYMBOL(sys_wait4);
 EXPORT_SYMBOL(cpcmd);
-EXPORT_SYMBOL(smp_call_function_on);
 EXPORT_SYMBOL(sys_ioctl);
index c528cb0acfd79b374188888d09c1bec369bd99da..2ee07a4757164afdfca26bc0bd633dbb1c33ae9e 100644 (file)
@@ -203,10 +203,11 @@ int smp_call_function_on(void (*func) (void *info), void *info,
        put_cpu();
        return 0;
 }
+EXPORT_SYMBOL(smp_call_function_on);
 
 static inline void do_send_stop(void)
 {
-        u32 dummy;
+        unsigned long dummy;
         int i, rc;
 
         /* stop all processors */
@@ -222,7 +223,7 @@ static inline void do_send_stop(void)
 static inline void do_store_status(void)
 {
         unsigned long low_core_addr;
-        u32 dummy;
+        unsigned long dummy;
         int i, rc;
 
         /* store status of all processors in their lowcores (real 0) */
@@ -619,7 +620,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                if (lowcore_ptr[i] == NULL || async_stack == 0ULL)
                        panic("smp_boot_cpus failed to allocate memory\n");
 
-                memcpy(lowcore_ptr[i], &S390_lowcore, sizeof(struct _lowcore));
+               *(lowcore_ptr[i]) = S390_lowcore;
                lowcore_ptr[i]->async_stack = async_stack + (ASYNC_SIZE);
        }
        set_prefix((u32)(unsigned long) lowcore_ptr[smp_processor_id()]);
index 26291f8d748ac27b21205001eadb13083cc7a69d..b2bc205d40cb1bead8c300be46cddfc3a0bcc0aa 100644 (file)
@@ -616,8 +616,6 @@ void __init trap_init(void)
         pgm_check_table[9] = &divide_exception;
         pgm_check_table[0x10] = &do_segment_exception;
         pgm_check_table[0x11] = &do_page_exception;
-        pgm_check_table[0x10] = &do_segment_exception;
-        pgm_check_table[0x11] = &do_page_exception;
         pgm_check_table[0x12] = &translation_exception;
         pgm_check_table[0x13] = &special_op_exception;
 #ifndef CONFIG_ARCH_S390X
index f3221ed4e4c322bfc5fab5fd429a88b2ff564204..095a5648c1cfc5a4bbd78f8c650640df1bb4f465 100644 (file)
@@ -87,8 +87,7 @@ cmm_alloc_pages(long pages, long *counter, struct cmm_page_array **list)
                        pa->index = 0;
                        *list = pa;
                }
-               if (page < 0x80000000UL)
-                       diag10(page);
+               diag10(page);
                pa->pages[pa->index++] = page;
                (*counter)++;
                pages--;
index 7248a1657fe5d52b98a4ee50831f1a7a47825851..c2a74cea7702b35fdc0e2241a17de4ce506d52d8 100644 (file)
@@ -42,9 +42,9 @@ char  empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
 
 void diag10(unsigned long addr)
 {
-#ifdef __s390x__
-        if (addr >= 0x80000000)
+        if (addr >= 0x7ff00000)
                 return;
+#ifdef __s390x__
         asm volatile ("sam31\n\t"
                       "diag %0,%0,0x10\n\t"
                       "sam64" : : "a" (addr) );
index 1b564c56246289da628e6717f2280960a5b65331..40839180883a634978094c13f718a962d56f9c0c 100644 (file)
@@ -25,6 +25,7 @@ typedef u16           compat_ipc_pid_t;
 typedef s32            compat_daddr_t;
 typedef u32            compat_caddr_t;
 typedef __kernel_fsid_t        compat_fsid_t;
+typedef s32            compat_timer_t;
 
 typedef s32            compat_int_t;
 typedef s32            compat_long_t;
index fa78e05a19c5d4bf175ee91fabc1bc83ee1faaa4..d5583c78dc9b1858b7822d6c67aa64ac74983f3e 100644 (file)
@@ -121,7 +121,7 @@ signal_processor_p(unsigned long parameter,__u16 cpu_addr,
  * Signal processor with parameter and return status
  */
 extern __inline__ sigp_ccode
-signal_processor_ps(__u32 *statusptr, unsigned long parameter,
+signal_processor_ps(unsigned long *statusptr, unsigned long parameter,
                    __u16 cpu_addr, sigp_order_code order_code)
 {
        sigp_ccode ccode;