GIT 4383adb9ca9b4e28a6543b3519afdecbf3386d2e git://git390.osdl.marist.edu/pub/scm/linux-2.6.git#for-andrew commit Author: Stefan Haberland Date: Wed Feb 27 17:10:29 2008 +0100 [S390] sim handling Now the system reports system information messages (SIM) to the user. The System Reference Code (SRC) which is reported to the user gives the abbility to lookup the reason of the SIM online in the documentation of the storage server. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky commit 07c0c3048b8fe7d519082659870c56e92ca847b1 Author: Stefan Weinhuber Date: Wed Feb 27 17:10:15 2008 +0100 [S390] dasd: fix reference counting in display method for proc/dasd/devices Using the /proc/dasd/devices interface leaves the reference counter of alias devices in an inconsistent state. A process that tries to set such a device offline afterwards will hang. The dasd_devices_show function returns immediately for alias devices and this code path was missing a dasd_put_device call. Signed-off-by: Stefan Weinhuber Signed-off-by: Martin Schwidefsky commit 64a934c4c0fcc3595fbe014b11d79754f2b68fa7 Author: Stefan Weinhuber Date: Wed Feb 27 17:10:14 2008 +0100 [S390] dasd: let dasd erp matching recognize alias recovery When a request fails that was started on an alias device then the first recovery step is to retry it on the base device. If the recovery request fails again with the same symptoms, the next step should not be a simple retry, but should be a proper recovery based on sense data, etc. To do so, the dasd recovery functions need to recognize the alias recovery step in the erp chain by comparing the start devices. Signed-off-by: Stefan Weinhuber Signed-off-by: Martin Schwidefsky commit b6e6d2d8b22f3e98d8be45cd2abad1be47b551b4 Author: Heiko Carstens Date: Wed Feb 27 17:10:13 2008 +0100 [S390] Get rid of memcpy gcc warning workaround. Compile smp.o with -Wno-nonnull so gcc stops warning about memcpy being used with a null parameter. Also remove the workaround code and use a char * cast instead of a void * cast to do computations. Cc: Bastian Blank Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 024cc04446ff20306369c5313e4ce7c6913761f3 Author: Heiko Carstens Date: Wed Feb 27 17:10:12 2008 +0100 [S390] idle: Fix machine check handling in idle loop. If a machine check handling is pending when the idle loop is entered default_idle will be left with timer ticks and virtual timer disabled. Fix this by "calling" the idle_chain. Also a BUG_ON(!in_interrupt) in start_hz_timer must be removed since the function now gets called from non interrupt context as well. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/Makefile | 5 ++++ arch/s390/kernel/process.c | 4 +++ arch/s390/kernel/smp.c | 10 +------ arch/s390/kernel/time.c | 2 - drivers/s390/block/dasd_3990_erp.c | 42 ++++++++++++++++++++++++++++++++--- drivers/s390/block/dasd_int.h | 5 ++++ drivers/s390/block/dasd_proc.c | 4 ++- 7 files changed, 57 insertions(+), 15 deletions(-) diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index b3b650a..4d3e383 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile @@ -4,6 +4,11 @@ EXTRA_AFLAGS := -traditional +# +# Passing null pointers is ok for smp code, since we access the lowcore here. +# +CFLAGS_smp.o := -Wno-nonnull + obj-y := bitmap.o traps.o time.o process.o base.o early.o \ setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ semaphore.o s390_ext.o debug.o irq.o ipl.o dis.o diag.o diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 1c59ec1..ce20315 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -152,6 +152,10 @@ static void default_idle(void) local_mcck_disable(); if (test_thread_flag(TIF_MCCK_PENDING)) { local_mcck_enable(); + /* disable monitor call class 0 */ + __ctl_clear_bit(8, 15); + atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE, + hcpu); local_irq_enable(); s390_handle_mcck(); return; diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 818bd09..8f894d3 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -629,14 +629,8 @@ static int __cpuinit smp_alloc_lowcore(int cpu) panic_stack = __get_free_page(GFP_KERNEL); if (!panic_stack || !async_stack) goto out; - /* - * Only need to copy the first 512 bytes from address 0. But since - * the compiler emits a warning if src == NULL for memcpy use copy_page - * instead. Copies more than needed but this code is not performance - * critical. - */ - copy_page(lowcore, &S390_lowcore); - memset((void *)lowcore + 512, 0, sizeof(*lowcore) - 512); + memcpy(lowcore, &S390_lowcore, 512); + memset((char *)lowcore + 512, 0, sizeof(*lowcore) - 512); lowcore->async_stack = async_stack + ASYNC_SIZE; lowcore->panic_stack = panic_stack + PAGE_SIZE; diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 76a5dd1..cb232c1 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -209,8 +209,6 @@ static void stop_hz_timer(void) */ static void start_hz_timer(void) { - BUG_ON(!in_interrupt()); - if (!cpu_isset(smp_processor_id(), nohz_cpu_mask)) return; account_ticks(get_clock()); diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index f69714a..49a0495 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c @@ -1996,6 +1996,38 @@ dasd_3990_erp_compound(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_compound */ /* + *DASD_3990_ERP_HANDLE_SIM + * + *DESCRIPTION + * inspects the SIM SENSE data and starts an appropriate action + * + * PARAMETER + * sense sense data of the actual error + * + * RETURN VALUES + * none + */ +static void +dasd_3990_erp_handle_sim(struct dasd_ccw_req *erp, char *sense) +{ + struct dasd_device *device = erp->startdev; + + /* print message according to log or message to operator mode */ + if ((sense[24] & DASD_SIM_MSG_TO_OP) || (sense[1] & 0x10)) { + + /* print SIM SRC from RefCode */ + DEV_MESSAGE(KERN_ERR, device, "SIM - SRC: " + "%02x%02x%02x%02x", sense[22], + sense[23], sense[11], sense[12]); + } else if (sense[24] & DASD_SIM_LOG) { + /* print SIM SRC Refcode */ + DEV_MESSAGE(KERN_WARNING, device, "SIM - SRC: " + "%02x%02x%02x%02x", sense[22], + sense[23], sense[11], sense[12]); + } +} + +/* * DASD_3990_ERP_INSPECT_32 * * DESCRIPTION @@ -2018,6 +2050,10 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) erp->function = dasd_3990_erp_inspect_32; + /* check for SIM sense data */ + if ((sense[6] & DASD_SIM_SENSE) == DASD_SIM_SENSE) + dasd_3990_erp_handle_sim(erp, sense); + if (sense[25] & DASD_SENSE_BIT_0) { /* compound program action codes (byte25 bit 0 == '1') */ @@ -2310,10 +2346,8 @@ static int dasd_3990_erp_error_match(struct dasd_ccw_req *cqr1, struct dasd_ccw_req *cqr2) { - /* check failed CCW */ - if (cqr1->irb.scsw.cpa != cqr2->irb.scsw.cpa) { - // return 0; /* CCW doesn't match */ - } + if (cqr1->startdev != cqr2->startdev) + return 0; if (cqr1->irb.esw.esw0.erw.cons != cqr2->irb.esw.esw0.erw.cons) return 0; diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 44b2984..5f5a884 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -72,6 +72,11 @@ struct dasd_block; #define DASD_SENSE_BIT_2 0x20 #define DASD_SENSE_BIT_3 0x10 +/* BIT DEFINITIONS FOR SIM SENSE */ +#define DASD_SIM_SENSE 0x0F +#define DASD_SIM_MSG_TO_OP 0x03 +#define DASD_SIM_LOG 0x0C + /* * SECTION: MACROs for klogd and s390 debug feature (dbf) */ diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 28a86f0..556063e 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c @@ -62,8 +62,10 @@ dasd_devices_show(struct seq_file *m, void *v) return 0; if (device->block) block = device->block; - else + else { + dasd_put_device(device); return 0; + } /* Print device number. */ seq_printf(m, "%s", device->cdev->dev.bus_id); /* Print discipline string. */