s390 patches for 4.16-rc5
Subsystems (3)
Hi Linus,
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus
to receive the following updates:
Nine bug fixes for s390:
* Three fixes for the expoline code, one of them is strictly speaking a cleanup but as it relates to code added with 4.16 I would like to include the patch.
* Three timer related fixes in the common I/O layer
* A fix for the handling of internal DASD request which could cause panics.
* One correction in regard to the accounting of pud page tables vs. compat tasks.
* The register scrubbing in entry.S caused spurious crashes, this is fixed now as well.
Christian Borntraeger (1):
s390/entry.S: fix spurious zeroing of r0
Eugeniu Rosca (1):
s390: Replace IS_ENABLED(EXPOLINE_*) with IS_ENABLED(CONFIG_EXPOLINE_*)
Guenter Roeck (1):
s390: Fix runtime warning about negative pgtables_bytes
Hendrik Brueckner (1):
s390/clean-up: use CFI_* macros in entry.S
Martin Schwidefsky (1):
s390: do not bypass BPENTER for interrupt system calls
Sebastian Ott (3):
s390/cio: fix ccw_device_start_timeout API s390/cio: fix return code after missing interrupt s390/cio: clear timer when terminating driver I/O
Stefan Haberland (1):
s390/dasd: fix handling of internal requests
arch/s390/include/asm/mmu_context.h | 1 + arch/s390/kernel/entry.S | 10 +++--- arch/s390/kernel/nospec-branch.c | 4 +-- drivers/s390/block/dasd.c | 21 ++++------- drivers/s390/cio/device_fsm.c | 7 ++-- drivers/s390/cio/device_ops.c | 72 +++++++++++++++++-------------------- drivers/s390/cio/io_sch.h | 1 + 7 files changed, 54 insertions(+), 62 deletions(-)
arch/s390/include/asm/mmu_context.h +1 -0
@@ -63,6 +63,7 @@ static inline int init_new_context(struct task_struct *tsk, _ASCE_USER_BITS | _ASCE_TYPE_SEGMENT;/* pgd_alloc() did not account this pmd */ mm_inc_nr_pmds (mm); +mm_inc_nr_puds (mm); }crst_table_init ((unsigned long *) mm->pgd,pgd_entry_type (mm));return 0 ;
arch/s390/kernel/entry.S +6 -4
@@ -14,6 +14,7 @@ #include <asm/processor.h> #include <asm/cache.h> #include <asm/ctl_reg.h> +#include <asm/dwarf.h> #include <asm/errno.h> #include <asm/ptrace.h> #include <asm/thread_info.h>
@@ -230,7 +231,7 @@ _PIF_WORK = (_PIF_PER_TRAP | _PIF_SYSCALL_RESTART) .hidden \name .type \name,@function \name: - .cfi_startproc + CFI_STARTPROC #ifdef CONFIG_HAVE_MARCH_Z10_FEATURES exrl 0,0f #else
@@ -239,7 +240,7 @@ _PIF_WORK = (_PIF_PER_TRAP | _PIF_SYSCALL_RESTART) #endif j . 0: br \reg - .cfi_endproc + CFI_ENDPROC .endm GEN_BR_THUNK __s390x_indirect_jump_r1use_r9,%r9,%r1
@@ -426,13 +427,13 @@ ENTRY(system_call) UPDATE_VTIME %r8,%r9,__LC_SYNC_ENTER_TIMER BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP stmg %r0,%r7,__PT_R0(%r11) - # clear user controlled register to prevent speculative use - xgr %r0,%r0 mvc __PT_R8(64,%r11),__LC_SAVE_AREA_SYNC mvc __PT_PSW(16,%r11),__LC_SVC_OLD_PSW mvc __PT_INT_CODE(4,%r11),__LC_SVC_ILC stg %r14,__PT_FLAGS(%r11) .Lsysc_do_svc: + # clear user controlled register to prevent speculative use + xgr %r0,%r0 # load address of system call table lg %r10,__THREAD_sysc_table(%r13,%r12) llgh %r8,__PT_INT_CODE+2(%r11)
@@ -1439,6 +1440,7 @@ cleanup_critical: stg %r15,__LC_SYSTEM_TIMER 0: # update accounting time stamp mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER + BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP # set up saved register r11 lg %r15,__LC_KERNEL_STACK la %r9,STACK_FRAME_OVERHEAD(%r15)
arch/s390/kernel/nospec-branch.c +2 -2
@@ -2,8 +2,8 @@#include <linux/module.h> #include <asm/nospec-branch.h> -int nospec_call_disable =IS_ENABLED (EXPOLINE_OFF ); -int nospec_return_disable = !IS_ENABLED (EXPOLINE_FULL ); +int nospec_call_disable =IS_ENABLED (CONFIG_EXPOLINE_OFF ); +int nospec_return_disable = !IS_ENABLED (CONFIG_EXPOLINE_FULL );static int __init nospectre_v2_setup_early (char *str) {
drivers/s390/block/dasd.c +7 -14
@@ -2581,8 +2581,6 @@ int dasd_cancel_req(struct dasd_ccw_req *cqr)case DASD_CQR_QUEUED :/* request was not started - just set to cleared */ cqr->status =DASD_CQR_CLEARED ; -if (cqr->callback_data ==DASD_SLEEPON_START_TAG ) - cqr->callback_data =DASD_SLEEPON_END_TAG ;break ;case DASD_CQR_IN_IO :/* request in IO - terminate IO and release again */
@@ -3902,9 +3900,12 @@ static int dasd_generic_requeue_all_requests(struct dasd_device *device)wait_event (dasd_flush_wq, (cqr->status !=DASD_CQR_CLEAR_PENDING )); -/* mark sleepon requests as ended */ -if (cqr->callback_data ==DASD_SLEEPON_START_TAG ) - cqr->callback_data =DASD_SLEEPON_END_TAG ; +/* +* requeue requests to blocklayer will only work +* for block device requests +*/ +if (_dasd_requeue_request (cqr)) +continue ;/* remove requests from device and block queue */ list_del_init (&cqr->devlist);
@@ -3917,13 +3918,6 @@ static int dasd_generic_requeue_all_requests(struct dasd_device *device) cqr = refers; } -/* -* requeue requests to blocklayer will only work -* for block device requests -*/ -if (_dasd_requeue_request (cqr)) -continue ; -if (cqr->block)list_del_init (&cqr->blocklist); cqr->block->base->discipline->free_cp(
@@ -3940,8 +3934,7 @@ static int dasd_generic_requeue_all_requests(struct dasd_device *device)list_splice_tail (&requeue_queue, &device->ccw_queue);spin_unlock_irq (get_ccwdev_lock (device->cdev)); } -/* wake up generic waitqueue for eventually ended sleepon requests */ -wake_up (&generic_waitq); +dasd_schedule_device_bh (device);return rc; }
drivers/s390/cio/device_fsm.c +5 -2
@@ -795,6 +795,7 @@ ccw_device_online_timeout(struct ccw_device *cdev, enum dev_event dev_event)ccw_device_set_timeout (cdev,0 ); cdev->private->iretry =255 ; + cdev->private->async_kill_io_rc = -ETIMEDOUT ; ret =ccw_device_cancel_halt_clear (cdev);if (ret == -EBUSY ) {ccw_device_set_timeout (cdev,3 *HZ );
@@ -871,7 +872,7 @@ ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event)/* OK, i/o is dead now. Call interrupt handler. */ if (cdev->handler) cdev->handler (cdev, cdev->private->intparm, -ERR_PTR (-EIO )); +ERR_PTR (cdev->private->async_kill_io_rc)); } static void
@@ -888,14 +889,16 @@ ccw_device_killing_timeout(struct ccw_device *cdev, enum dev_event dev_event)ccw_device_online_verify (cdev,0 );if (cdev->handler) cdev->handler (cdev, cdev->private->intparm, -ERR_PTR (-EIO )); +ERR_PTR (cdev->private->async_kill_io_rc)); }void ccw_device_kill_io (struct ccw_device *cdev) {int ret; +ccw_device_set_timeout (cdev,0 ); cdev->private->iretry =255 ; + cdev->private->async_kill_io_rc = -EIO ; ret =ccw_device_cancel_halt_clear (cdev);if (ret == -EBUSY ) {ccw_device_set_timeout (cdev,3 *HZ );
drivers/s390/cio/device_ops.c +32 -40
160 lines not on this page · raw message
drivers/s390/cio/io_sch.h +1 -0
@@ -157,6 +157,7 @@ struct ccw_device_private {unsigned long intparm;/* user interruption parameter */ struct qdio_irq *qdio_data;struct irb irb;/* device status */ +int async_kill_io_rc;struct senseid senseid;/* SenseID info */ struct pgid pgid[8 ];/* path group IDs per chpid*/ struct ccw1 iccws[2 ];/* ccws for SNID/SID/SPGID commands */