diff options
| -rw-r--r-- | arch/s390/kernel/head.S | 2 | ||||
| -rw-r--r-- | arch/s390/kernel/switch_cpu.S | 4 | ||||
| -rw-r--r-- | arch/s390/kernel/switch_cpu64.S | 4 | ||||
| -rw-r--r-- | arch/s390/oprofile/hwsampler.c | 6 | ||||
| -rw-r--r-- | drivers/s390/cio/device.c | 24 | ||||
| -rw-r--r-- | drivers/s390/cio/qdio_main.c | 16 |
6 files changed, 34 insertions, 22 deletions
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 7061398341d5..fb317bf2c378 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
| @@ -460,7 +460,7 @@ startup: | |||
| 460 | #ifndef CONFIG_MARCH_G5 | 460 | #ifndef CONFIG_MARCH_G5 |
| 461 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} | 461 | # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} |
| 462 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST | 462 | xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST |
| 463 | stfl __LC_STFL_FAC_LIST # store facility list | 463 | .insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list |
| 464 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? | 464 | tm __LC_STFL_FAC_LIST,0x01 # stfle available ? |
| 465 | jz 0f | 465 | jz 0f |
| 466 | la %r0,0 | 466 | la %r0,0 |
diff --git a/arch/s390/kernel/switch_cpu.S b/arch/s390/kernel/switch_cpu.S index 469f11b574fa..20530dd2eab1 100644 --- a/arch/s390/kernel/switch_cpu.S +++ b/arch/s390/kernel/switch_cpu.S | |||
| @@ -46,7 +46,9 @@ smp_restart_cpu: | |||
| 46 | ltr %r4,%r4 /* New stack ? */ | 46 | ltr %r4,%r4 /* New stack ? */ |
| 47 | jz 1f | 47 | jz 1f |
| 48 | lr %r15,%r4 | 48 | lr %r15,%r4 |
| 49 | 1: basr %r14,%r2 | 49 | 1: lr %r14,%r2 /* r14: Function to call */ |
| 50 | lr %r2,%r3 /* r2 : Parameter for function*/ | ||
| 51 | basr %r14,%r14 /* Call function */ | ||
| 50 | 52 | ||
| 51 | .gprregs_addr: | 53 | .gprregs_addr: |
| 52 | .long .gprregs | 54 | .long .gprregs |
diff --git a/arch/s390/kernel/switch_cpu64.S b/arch/s390/kernel/switch_cpu64.S index d94aacc898cb..5be3f43898f9 100644 --- a/arch/s390/kernel/switch_cpu64.S +++ b/arch/s390/kernel/switch_cpu64.S | |||
| @@ -42,7 +42,9 @@ smp_restart_cpu: | |||
| 42 | ltgr %r4,%r4 /* New stack ? */ | 42 | ltgr %r4,%r4 /* New stack ? */ |
| 43 | jz 1f | 43 | jz 1f |
| 44 | lgr %r15,%r4 | 44 | lgr %r15,%r4 |
| 45 | 1: basr %r14,%r2 | 45 | 1: lgr %r14,%r2 /* r14: Function to call */ |
| 46 | lgr %r2,%r3 /* r2 : Parameter for function*/ | ||
| 47 | basr %r14,%r14 /* Call function */ | ||
| 46 | 48 | ||
| 47 | .section .data,"aw",@progbits | 49 | .section .data,"aw",@progbits |
| 48 | .gprregs: | 50 | .gprregs: |
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c index 3d48f4db246d..4952872d6f0a 100644 --- a/arch/s390/oprofile/hwsampler.c +++ b/arch/s390/oprofile/hwsampler.c | |||
| @@ -517,12 +517,8 @@ stop_exit: | |||
| 517 | 517 | ||
| 518 | static int check_hardware_prerequisites(void) | 518 | static int check_hardware_prerequisites(void) |
| 519 | { | 519 | { |
| 520 | unsigned long long facility_bits[2]; | 520 | if (!test_facility(68)) |
| 521 | |||
| 522 | memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32); | ||
| 523 | if (!(facility_bits[1] & (1ULL << 59))) | ||
| 524 | return -EOPNOTSUPP; | 521 | return -EOPNOTSUPP; |
| 525 | |||
| 526 | return 0; | 522 | return 0; |
| 527 | } | 523 | } |
| 528 | /* | 524 | /* |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index df14c51f6532..8e04c00cf0ad 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
| @@ -541,15 +541,24 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr, | |||
| 541 | int force, ret; | 541 | int force, ret; |
| 542 | unsigned long i; | 542 | unsigned long i; |
| 543 | 543 | ||
| 544 | if (!dev_fsm_final_state(cdev) && | 544 | /* Prevent conflict between multiple on-/offline processing requests. */ |
| 545 | cdev->private->state != DEV_STATE_DISCONNECTED) | ||
| 546 | return -EAGAIN; | ||
| 547 | if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) | 545 | if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) |
| 548 | return -EAGAIN; | 546 | return -EAGAIN; |
| 547 | /* Prevent conflict between internal I/Os and on-/offline processing. */ | ||
| 548 | if (!dev_fsm_final_state(cdev) && | ||
| 549 | cdev->private->state != DEV_STATE_DISCONNECTED) { | ||
| 550 | ret = -EAGAIN; | ||
| 551 | goto out_onoff; | ||
| 552 | } | ||
| 553 | /* Prevent conflict between pending work and on-/offline processing.*/ | ||
| 554 | if (work_pending(&cdev->private->todo_work)) { | ||
| 555 | ret = -EAGAIN; | ||
| 556 | goto out_onoff; | ||
| 557 | } | ||
| 549 | 558 | ||
| 550 | if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) { | 559 | if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) { |
| 551 | atomic_set(&cdev->private->onoff, 0); | 560 | ret = -EINVAL; |
| 552 | return -EINVAL; | 561 | goto out_onoff; |
| 553 | } | 562 | } |
| 554 | if (!strncmp(buf, "force\n", count)) { | 563 | if (!strncmp(buf, "force\n", count)) { |
| 555 | force = 1; | 564 | force = 1; |
| @@ -574,6 +583,7 @@ static ssize_t online_store (struct device *dev, struct device_attribute *attr, | |||
| 574 | out: | 583 | out: |
| 575 | if (cdev->drv) | 584 | if (cdev->drv) |
| 576 | module_put(cdev->drv->driver.owner); | 585 | module_put(cdev->drv->driver.owner); |
| 586 | out_onoff: | ||
| 577 | atomic_set(&cdev->private->onoff, 0); | 587 | atomic_set(&cdev->private->onoff, 0); |
| 578 | return (ret < 0) ? ret : count; | 588 | return (ret < 0) ? ret : count; |
| 579 | } | 589 | } |
| @@ -1311,10 +1321,12 @@ static int purge_fn(struct device *dev, void *data) | |||
| 1311 | 1321 | ||
| 1312 | spin_lock_irq(cdev->ccwlock); | 1322 | spin_lock_irq(cdev->ccwlock); |
| 1313 | if (is_blacklisted(id->ssid, id->devno) && | 1323 | if (is_blacklisted(id->ssid, id->devno) && |
| 1314 | (cdev->private->state == DEV_STATE_OFFLINE)) { | 1324 | (cdev->private->state == DEV_STATE_OFFLINE) && |
| 1325 | (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) { | ||
| 1315 | CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid, | 1326 | CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid, |
| 1316 | id->devno); | 1327 | id->devno); |
| 1317 | ccw_device_sched_todo(cdev, CDEV_TODO_UNREG); | 1328 | ccw_device_sched_todo(cdev, CDEV_TODO_UNREG); |
| 1329 | atomic_set(&cdev->private->onoff, 0); | ||
| 1318 | } | 1330 | } |
| 1319 | spin_unlock_irq(cdev->ccwlock); | 1331 | spin_unlock_irq(cdev->ccwlock); |
| 1320 | /* Abort loop in case of pending signal. */ | 1332 | /* Abort loop in case of pending signal. */ |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 479c665e9e7c..c532ba929ccd 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
| @@ -1649,26 +1649,26 @@ static int __init init_QDIO(void) | |||
| 1649 | { | 1649 | { |
| 1650 | int rc; | 1650 | int rc; |
| 1651 | 1651 | ||
| 1652 | rc = qdio_setup_init(); | 1652 | rc = qdio_debug_init(); |
| 1653 | if (rc) | 1653 | if (rc) |
| 1654 | return rc; | 1654 | return rc; |
| 1655 | rc = qdio_setup_init(); | ||
| 1656 | if (rc) | ||
| 1657 | goto out_debug; | ||
| 1655 | rc = tiqdio_allocate_memory(); | 1658 | rc = tiqdio_allocate_memory(); |
| 1656 | if (rc) | 1659 | if (rc) |
| 1657 | goto out_cache; | 1660 | goto out_cache; |
| 1658 | rc = qdio_debug_init(); | ||
| 1659 | if (rc) | ||
| 1660 | goto out_ti; | ||
| 1661 | rc = tiqdio_register_thinints(); | 1661 | rc = tiqdio_register_thinints(); |
| 1662 | if (rc) | 1662 | if (rc) |
| 1663 | goto out_debug; | 1663 | goto out_ti; |
| 1664 | return 0; | 1664 | return 0; |
| 1665 | 1665 | ||
| 1666 | out_debug: | ||
| 1667 | qdio_debug_exit(); | ||
| 1668 | out_ti: | 1666 | out_ti: |
| 1669 | tiqdio_free_memory(); | 1667 | tiqdio_free_memory(); |
| 1670 | out_cache: | 1668 | out_cache: |
| 1671 | qdio_setup_exit(); | 1669 | qdio_setup_exit(); |
| 1670 | out_debug: | ||
| 1671 | qdio_debug_exit(); | ||
| 1672 | return rc; | 1672 | return rc; |
| 1673 | } | 1673 | } |
| 1674 | 1674 | ||
| @@ -1676,8 +1676,8 @@ static void __exit exit_QDIO(void) | |||
| 1676 | { | 1676 | { |
| 1677 | tiqdio_unregister_thinints(); | 1677 | tiqdio_unregister_thinints(); |
| 1678 | tiqdio_free_memory(); | 1678 | tiqdio_free_memory(); |
| 1679 | qdio_debug_exit(); | ||
| 1680 | qdio_setup_exit(); | 1679 | qdio_setup_exit(); |
| 1680 | qdio_debug_exit(); | ||
| 1681 | } | 1681 | } |
| 1682 | 1682 | ||
| 1683 | module_init(init_QDIO); | 1683 | module_init(init_QDIO); |
