Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] compile fix for latest binutils
[S390] cio: prevent purging of CCW devices in the online state
[S390] qdio: fix init sequence
[S390] Fix parameter passing for smp_switch_to_cpu()
[S390] oprofile s390: prevent stack corruption

+34 -22
+1 -1
arch/s390/kernel/head.S
··· 460 460 #ifndef CONFIG_MARCH_G5 461 461 # check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10} 462 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 464 tm __LC_STFL_FAC_LIST,0x01 # stfle available ? 465 465 jz 0f 466 466 la %r0,0
+3 -1
arch/s390/kernel/switch_cpu.S
··· 46 46 ltr %r4,%r4 /* New stack ? */ 47 47 jz 1f 48 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 53 .gprregs_addr: 52 54 .long .gprregs
+3 -1
arch/s390/kernel/switch_cpu64.S
··· 42 42 ltgr %r4,%r4 /* New stack ? */ 43 43 jz 1f 44 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 49 .section .data,"aw",@progbits 48 50 .gprregs:
+1 -5
arch/s390/oprofile/hwsampler.c
··· 517 517 518 518 static int check_hardware_prerequisites(void) 519 519 { 520 - unsigned long long facility_bits[2]; 521 - 522 - memcpy(facility_bits, S390_lowcore.stfle_fac_list, 32); 523 - if (!(facility_bits[1] & (1ULL << 59))) 520 + if (!test_facility(68)) 524 521 return -EOPNOTSUPP; 525 - 526 522 return 0; 527 523 } 528 524 /*
+18 -6
drivers/s390/cio/device.c
··· 541 541 int force, ret; 542 542 unsigned long i; 543 543 544 - if (!dev_fsm_final_state(cdev) && 545 - cdev->private->state != DEV_STATE_DISCONNECTED) 546 - return -EAGAIN; 544 + /* Prevent conflict between multiple on-/offline processing requests. */ 547 545 if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) 548 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 559 if (cdev->drv && !try_module_get(cdev->drv->driver.owner)) { 551 - atomic_set(&cdev->private->onoff, 0); 552 - return -EINVAL; 560 + ret = -EINVAL; 561 + goto out_onoff; 553 562 } 554 563 if (!strncmp(buf, "force\n", count)) { 555 564 force = 1; ··· 583 574 out: 584 575 if (cdev->drv) 585 576 module_put(cdev->drv->driver.owner); 577 + out_onoff: 586 578 atomic_set(&cdev->private->onoff, 0); 587 579 return (ret < 0) ? ret : count; 588 580 } ··· 1321 1311 1322 1312 spin_lock_irq(cdev->ccwlock); 1323 1313 if (is_blacklisted(id->ssid, id->devno) && 1324 - (cdev->private->state == DEV_STATE_OFFLINE)) { 1314 + (cdev->private->state == DEV_STATE_OFFLINE) && 1315 + (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) { 1325 1316 CIO_MSG_EVENT(3, "ccw: purging 0.%x.%04x\n", id->ssid, 1326 1317 id->devno); 1327 1318 ccw_device_sched_todo(cdev, CDEV_TODO_UNREG); 1319 + atomic_set(&cdev->private->onoff, 0); 1328 1320 } 1329 1321 spin_unlock_irq(cdev->ccwlock); 1330 1322 /* Abort loop in case of pending signal. */
+8 -8
drivers/s390/cio/qdio_main.c
··· 1649 1649 { 1650 1650 int rc; 1651 1651 1652 - rc = qdio_setup_init(); 1652 + rc = qdio_debug_init(); 1653 1653 if (rc) 1654 1654 return rc; 1655 + rc = qdio_setup_init(); 1656 + if (rc) 1657 + goto out_debug; 1655 1658 rc = tiqdio_allocate_memory(); 1656 1659 if (rc) 1657 1660 goto out_cache; 1658 - rc = qdio_debug_init(); 1659 - if (rc) 1660 - goto out_ti; 1661 1661 rc = tiqdio_register_thinints(); 1662 1662 if (rc) 1663 - goto out_debug; 1663 + goto out_ti; 1664 1664 return 0; 1665 1665 1666 - out_debug: 1667 - qdio_debug_exit(); 1668 1666 out_ti: 1669 1667 tiqdio_free_memory(); 1670 1668 out_cache: 1671 1669 qdio_setup_exit(); 1670 + out_debug: 1671 + qdio_debug_exit(); 1672 1672 return rc; 1673 1673 } 1674 1674 ··· 1676 1676 { 1677 1677 tiqdio_unregister_thinints(); 1678 1678 tiqdio_free_memory(); 1679 - qdio_debug_exit(); 1680 1679 qdio_setup_exit(); 1680 + qdio_debug_exit(); 1681 1681 } 1682 1682 1683 1683 module_init(init_QDIO);