Commit df6560ba authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] s390: core s390 update

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.
parent 5ba43334
......@@ -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)
......
......@@ -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;
}
......
......@@ -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
{
......
......@@ -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);
......@@ -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()]);
......
......@@ -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
......
......@@ -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--;
......
......@@ -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) );
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment