]> Git Repo - linux.git/commitdiff
Merge tag 's390-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
authorLinus Torvalds <[email protected]>
Tue, 15 Dec 2020 00:22:26 +0000 (16:22 -0800)
committerLinus Torvalds <[email protected]>
Tue, 15 Dec 2020 00:22:26 +0000 (16:22 -0800)
Pull s390 updates from Heiko Carstens:

 - Add support for the hugetlb_cma command line option to allocate
   gigantic hugepages using CMA

 - Add arch_get_random_long() support.

 - Add ap bus userspace notifications.

 - Increase default size of vmalloc area to 512GB and otherwise let it
   increase dynamically by the size of physical memory. This should fix
   all occurrences where the vmalloc area was not large enough.

 - Completely get rid of set_fs() (aka select SET_FS) and rework address
   space handling while doing that; making address space handling much
   more simple.

 - Reimplement getcpu vdso syscall in C.

 - Add support for extended SCLP responses (> 4k). This allows e.g. to
   handle also potential large system configurations.

 - Simplify KASAN by removing 3-level page table support and only
   supporting 4-levels from now on.

 - Improve debug-ability of the kernel decompressor code, which now
   prints also stack traces and symbols in case of problems to the
   console.

 - Remove more power management leftovers.

 - Other various fixes and improvements all over the place.

* tag 's390-5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (62 commits)
  s390/mm: add support to allocate gigantic hugepages using CMA
  s390/crypto: add arch_get_random_long() support
  s390/smp: perform initial CPU reset also for SMT siblings
  s390/mm: use invalid asce for user space when switching to init_mm
  s390/idle: fix accounting with machine checks
  s390/idle: add missing mt_cycles calculation
  s390/boot: add build-id to decompressor
  s390/kexec_file: fix diag308 subcode when loading crash kernel
  s390/cio: fix use-after-free in ccw_device_destroy_console
  s390/cio: remove pm support from ccw bus driver
  s390/cio: remove pm support from css-bus driver
  s390/cio: remove pm support from IO subchannel drivers
  s390/cio: remove pm support from chsc subchannel driver
  s390/vmur: remove unused pm related functions
  s390/tape: remove unsupported PM functions
  s390/cio: remove pm support from eadm-sch drivers
  s390: remove pm support from console drivers
  s390/dasd: remove unused pm related functions
  s390/zfcp: remove pm support from zfcp driver
  s390/ap: let bus_register() add the AP bus sysfs attributes
  ...

1  2 
arch/s390/kernel/entry.S
arch/s390/lib/delay.c
drivers/s390/block/dasd.c
init/Kconfig

diff --combined arch/s390/kernel/entry.S
index 92beb14446449e16323641ac4526102d4c072235,55f65f2b7daf693a557dd83b75680ca04251f52c..8bb9ebb71c4b2b2f4a1d8dbfc681d8a757d0180f
@@@ -55,7 -55,7 +55,7 @@@ _TIF_WORK     = (_TIF_SIGPENDING | _TIF_NOT
                   _TIF_UPROBE | _TIF_GUARDED_STORAGE | _TIF_PATCH_PENDING)
  _TIF_TRACE    = (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP | \
                   _TIF_SYSCALL_TRACEPOINT)
- _CIF_WORK     = (_CIF_ASCE_PRIMARY | _CIF_ASCE_SECONDARY | _CIF_FPU)
+ _CIF_WORK     = (_CIF_FPU)
  _PIF_WORK     = (_PIF_PER_TRAP | _PIF_SYSCALL_RESTART)
  
  _LPP_OFFSET   = __LC_LPP
  #endif
        .endm
  
+       .macro  DEBUG_USER_ASCE
+ #ifdef CONFIG_DEBUG_USER_ASCE
+       brasl   %r14,debug_user_asce
+ #endif
+       .endm
        .macro  CHECK_VMAP_STACK savearea,oklabel
  #ifdef CONFIG_VMAP_STACK
        lgr     %r14,%r15
  #endif
        .endm
  
-       .macro  SWITCH_ASYNC savearea,timer
+       .macro  SWITCH_ASYNC savearea,timer,clock
        tmhh    %r8,0x0001              # interrupting from user ?
-       jnz     2f
+       jnz     4f
  #if IS_ENABLED(CONFIG_KVM)
        lgr     %r14,%r9
        larl    %r13,.Lsie_gmap
  #endif
  0:    larl    %r13,.Lpsw_idle_exit
        cgr     %r13,%r9
-       jne     1f
+       jne     3f
  
-       mvc     __CLOCK_IDLE_EXIT(8,%r2), __LC_INT_CLOCK
-       mvc     __TIMER_IDLE_EXIT(8,%r2), __LC_ASYNC_ENTER_TIMER
+       larl    %r1,smp_cpu_mtid
+       llgf    %r1,0(%r1)
+       ltgr    %r1,%r1
+       jz      2f                      # no SMT, skip mt_cycles calculation
+       .insn   rsy,0xeb0000000017,%r1,5,__SF_EMPTY+80(%r15)
+       larl    %r3,mt_cycles
+       ag      %r3,__LC_PERCPU_OFFSET
+       la      %r4,__SF_EMPTY+16(%r15)
+ 1:    lg      %r0,0(%r3)
+       slg     %r0,0(%r4)
+       alg     %r0,64(%r4)
+       stg     %r0,0(%r3)
+       la      %r3,8(%r3)
+       la      %r4,8(%r4)
+       brct    %r1,1b
+ 2:    mvc     __CLOCK_IDLE_EXIT(8,%r2), \clock
+       mvc     __TIMER_IDLE_EXIT(8,%r2), \timer
        # account system time going idle
        ni      __LC_CPU_FLAGS+7,255-_CIF_ENABLED_WAIT
  
        mvc     __LC_LAST_UPDATE_TIMER(8),__TIMER_IDLE_EXIT(%r2)
  
        nihh    %r8,0xfcfd              # clear wait state and irq bits
1:    lg      %r14,__LC_ASYNC_STACK   # are we already on the target stack?
3:    lg      %r14,__LC_ASYNC_STACK   # are we already on the target stack?
        slgr    %r14,%r15
        srag    %r14,%r14,STACK_SHIFT
-       jnz     3f
+       jnz     5f
        CHECK_STACK \savearea
        aghi    %r15,-(STACK_FRAME_OVERHEAD + __PT_SIZE)
-       j       4f
2:    UPDATE_VTIME %r14,%r15,\timer
+       j       6f
4:    UPDATE_VTIME %r14,%r15,\timer
        BPENTER __TI_flags(%r12),_TIF_ISOLATE_BP
3:    lg      %r15,__LC_ASYNC_STACK   # load async stack
4:    la      %r11,STACK_FRAME_OVERHEAD(%r15)
5:    lg      %r15,__LC_ASYNC_STACK   # load async stack
6:    la      %r11,STACK_FRAME_OVERHEAD(%r15)
        .endm
  
        .macro UPDATE_VTIME w1,w2,enter_timer
@@@ -327,7 -349,7 +349,7 @@@ ENTRY(sie64a
        BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
  .Lsie_skip:
        ni      __SIE_PROG0C+3(%r14),0xfe       # no longer in SIE
-       lctlg   %c1,%c1,__LC_USER_ASCE          # load primary asce
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE        # load primary asce
  .Lsie_done:
  # some program checks are suppressing. C code (e.g. do_protection_exception)
  # will rewind the PSW by the ILC, which is often 4 bytes in case of SIE. There
@@@ -380,6 -402,7 +402,7 @@@ ENTRY(system_call
        lg      %r12,__LC_CURRENT
        lghi    %r14,_PIF_SYSCALL
  .Lsysc_per:
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE
        lghi    %r13,__TASK_thread
        lg      %r15,__LC_KERNEL_STACK
        la      %r11,STACK_FRAME_OVERHEAD(%r15) # pointer to pt_regs
        jnz     .Lsysc_work
        TSTMSK  __TI_flags(%r12),_TIF_WORK
        jnz     .Lsysc_work                     # check for work
-       TSTMSK  __LC_CPU_FLAGS,(_CIF_WORK-_CIF_FPU)
-       jnz     .Lsysc_work
+       DEBUG_USER_ASCE
+       lctlg   %c1,%c1,__LC_USER_ASCE
        BPEXIT  __TI_flags(%r12),_TIF_ISOLATE_BP
- .Lsysc_restore:
-       DISABLE_INTS
        TSTMSK  __LC_CPU_FLAGS, _CIF_FPU
        jz      .Lsysc_skip_fpu
        brasl   %r14,load_fpu_regs
        jo      .Lsysc_sigpending
        TSTMSK  __TI_flags(%r12),_TIF_NOTIFY_RESUME
        jo      .Lsysc_notify_resume
-       TSTMSK  __LC_CPU_FLAGS,(_CIF_ASCE_PRIMARY|_CIF_ASCE_SECONDARY)
-       jnz     .Lsysc_asce
        j       .Lsysc_return
  
  #
        larl    %r14,.Lsysc_return
        jg      schedule
  
- #
- # _CIF_ASCE_PRIMARY and/or _CIF_ASCE_SECONDARY set, load user space asce
- #
- .Lsysc_asce:
-       ni      __LC_CPU_FLAGS+7,255-_CIF_ASCE_SECONDARY
-       lctlg   %c7,%c7,__LC_VDSO_ASCE          # load secondary asce
-       TSTMSK  __LC_CPU_FLAGS,_CIF_ASCE_PRIMARY
-       jz      .Lsysc_return
- #ifndef CONFIG_HAVE_MARCH_Z10_FEATURES
-       tm      __LC_STFLE_FAC_LIST+3,0x10      # has MVCOS ?
-       jnz     .Lsysc_set_fs_fixup
-       ni      __LC_CPU_FLAGS+7,255-_CIF_ASCE_PRIMARY
-       lctlg   %c1,%c1,__LC_USER_ASCE          # load primary asce
-       j       .Lsysc_return
- .Lsysc_set_fs_fixup:
- #endif
-       larl    %r14,.Lsysc_return
-       jg      set_fs_fixup
  #
  # _TIF_SIGPENDING is set, call do_signal
  #
@@@ -636,8 -635,11 +635,11 @@@ ENTRY(pgm_check_handler
  0:    lg      %r12,__LC_CURRENT
        lghi    %r11,0
        lmg     %r8,%r9,__LC_PGM_OLD_PSW
-       tmhh    %r8,0x0001              # test problem state bit
-       jnz     3f                      # -> fault in user space
+       tmhh    %r8,0x0001              # coming from user space?
+       jno     .Lpgm_skip_asce
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE
+       j       3f
+ .Lpgm_skip_asce:
  #if IS_ENABLED(CONFIG_KVM)
        # cleanup critical section for program checks in sie64a
        lgr     %r14,%r9
        jhe     1f
        lg      %r14,__SF_SIE_CONTROL(%r15)     # get control block pointer
        ni      __SIE_PROG0C+3(%r14),0xfe       # no longer in SIE
-       lctlg   %c1,%c1,__LC_USER_ASCE          # load primary asce
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE        # load primary asce
        larl    %r9,sie_exit                    # skip forward to sie_exit
        lghi    %r11,_PIF_GUEST_FAULT
  #endif
  .Lpgm_return:
        LOCKDEP_SYS_EXIT
        tm      __PT_PSW+1(%r11),0x01   # returning to user ?
-       jno     .Lsysc_restore
+       jno     .Lpgm_restore
        TSTMSK  __PT_FLAGS(%r11),_PIF_SYSCALL
        jo      .Lsysc_do_syscall
        j       .Lsysc_tif
+ .Lpgm_restore:
+       DISABLE_INTS
+       TSTMSK  __LC_CPU_FLAGS, _CIF_FPU
+       jz      .Lpgm_skip_fpu
+       brasl   %r14,load_fpu_regs
+ .Lpgm_skip_fpu:
+       mvc     __LC_RETURN_PSW(16),__PT_PSW(%r11)
+       stpt    __LC_EXIT_TIMER
+       lmg     %r0,%r15,__PT_R0(%r11)
+       b       __LC_RETURN_LPSWE
  
  #
  # PER event in supervisor state, must be kprobes
@@@ -745,7 -757,7 +757,7 @@@ ENTRY(io_int_handler
        stmg    %r8,%r15,__LC_SAVE_AREA_ASYNC
        lg      %r12,__LC_CURRENT
        lmg     %r8,%r9,__LC_IO_OLD_PSW
-       SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_ENTER_TIMER
+       SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_ENTER_TIMER,__LC_INT_CLOCK
        stmg    %r0,%r7,__PT_R0(%r11)
        # clear user controlled registers to prevent speculative use
        xgr     %r0,%r0
        xgr     %r10,%r10
        mvc     __PT_R8(64,%r11),__LC_SAVE_AREA_ASYNC
        stmg    %r8,%r9,__PT_PSW(%r11)
+       tm      __PT_PSW+1(%r11),0x01   # coming from user space?
+       jno     .Lio_skip_asce
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE
+ .Lio_skip_asce:
        mvc     __PT_INT_CODE(12,%r11),__LC_SUBCHANNEL_ID
        xc      __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
        TSTMSK  __LC_CPU_FLAGS,_CIF_IGNORE_IRQ
        jo      .Lio_restore
 -#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS)
 -      tmhh    %r8,0x300
 -      jz      1f
        TRACE_IRQS_OFF
 -1:
 -#endif
        xc      __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
  .Lio_loop:
        lgr     %r2,%r11                # pass pointer to pt_regs
        TSTMSK  __LC_CPU_FLAGS,_CIF_WORK
        jnz     .Lio_work
  .Lio_restore:
 -#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS)
 -      tm      __PT_PSW(%r11),3
 -      jno     0f
        TRACE_IRQS_ON
 -0:
 -#endif
        mvc     __LC_RETURN_PSW(16),__PT_PSW(%r11)
        tm      __PT_PSW+1(%r11),0x01   # returning to user ?
        jno     .Lio_exit_kernel
+       DEBUG_USER_ASCE
+       lctlg   %c1,%c1,__LC_USER_ASCE
        BPEXIT  __TI_flags(%r12),_TIF_ISOLATE_BP
        stpt    __LC_EXIT_TIMER
  .Lio_exit_kernel:
        jo      .Lio_guarded_storage
        TSTMSK  __LC_CPU_FLAGS,_CIF_FPU
        jo      .Lio_vxrs
-       TSTMSK  __LC_CPU_FLAGS,(_CIF_ASCE_PRIMARY|_CIF_ASCE_SECONDARY)
-       jnz     .Lio_asce
        j       .Lio_return
  
- #
- # _CIF_ASCE_PRIMARY and/or CIF_ASCE_SECONDARY set, load user space asce
- #
- .Lio_asce:
-       ni      __LC_CPU_FLAGS+7,255-_CIF_ASCE_SECONDARY
-       lctlg   %c7,%c7,__LC_VDSO_ASCE          # load secondary asce
-       TSTMSK  __LC_CPU_FLAGS,_CIF_ASCE_PRIMARY
-       jz      .Lio_return
- #ifndef CONFIG_HAVE_MARCH_Z10_FEATURES
-       tm      __LC_STFLE_FAC_LIST+3,0x10      # has MVCOS ?
-       jnz     .Lio_set_fs_fixup
-       ni      __LC_CPU_FLAGS+7,255-_CIF_ASCE_PRIMARY
-       lctlg   %c1,%c1,__LC_USER_ASCE          # load primary asce
-       j       .Lio_return
- .Lio_set_fs_fixup:
- #endif
-       larl    %r14,.Lio_return
-       jg      set_fs_fixup
  #
  # CIF_FPU is set, restore floating-point controls and floating-point registers.
  #
@@@ -945,7 -952,7 +942,7 @@@ ENTRY(ext_int_handler
        stmg    %r8,%r15,__LC_SAVE_AREA_ASYNC
        lg      %r12,__LC_CURRENT
        lmg     %r8,%r9,__LC_EXT_OLD_PSW
-       SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_ENTER_TIMER
+       SWITCH_ASYNC __LC_SAVE_AREA_ASYNC,__LC_ASYNC_ENTER_TIMER,__LC_INT_CLOCK
        stmg    %r0,%r7,__PT_R0(%r11)
        # clear user controlled registers to prevent speculative use
        xgr     %r0,%r0
        xgr     %r10,%r10
        mvc     __PT_R8(64,%r11),__LC_SAVE_AREA_ASYNC
        stmg    %r8,%r9,__PT_PSW(%r11)
+       tm      __PT_PSW+1(%r11),0x01   # coming from user space?
+       jno     .Lext_skip_asce
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE
+ .Lext_skip_asce:
        lghi    %r1,__LC_EXT_PARAMS2
        mvc     __PT_INT_CODE(4,%r11),__LC_EXT_CPU_ADDR
        mvc     __PT_INT_PARM(4,%r11),__LC_EXT_PARAMS
        xc      __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
        TSTMSK  __LC_CPU_FLAGS,_CIF_IGNORE_IRQ
        jo      .Lio_restore
 -#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS)
 -      tmhh    %r8,0x300
 -      jz      1f
        TRACE_IRQS_OFF
 -1:
 -#endif
        xc      __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
        lgr     %r2,%r11                # pass pointer to pt_regs
        lghi    %r3,EXT_INTERRUPT
@@@ -1167,7 -1183,7 +1168,7 @@@ ENTRY(mcck_int_handler
        TSTMSK  __LC_MCCK_CODE,MCCK_CODE_PSW_IA_VALID
        jno     .Lmcck_panic
  4:    ssm     __LC_PGM_NEW_PSW        # turn dat on, keep irqs off
-       SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+64,__LC_MCCK_ENTER_TIMER
+       SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+64,__LC_MCCK_ENTER_TIMER,__LC_MCCK_CLOCK
  .Lmcck_skip:
        lghi    %r14,__LC_GPREGS_SAVE_AREA+64
        stmg    %r0,%r7,__PT_R0(%r11)
        xgr     %r10,%r10
        mvc     __PT_R8(64,%r11),0(%r14)
        stmg    %r8,%r9,__PT_PSW(%r11)
+       la      %r14,4095
+       mvc     __PT_CR1(8,%r11),__LC_CREGS_SAVE_AREA-4095+8(%r14)
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE
        xc      __PT_FLAGS(8,%r11),__PT_FLAGS(%r11)
        xc      __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
        lgr     %r2,%r11                # pass pointer to pt_regs
        brasl   %r14,s390_handle_mcck
        TRACE_IRQS_ON
  .Lmcck_return:
+       lctlg   %c1,%c1,__PT_CR1(%r11)
        lmg     %r0,%r10,__PT_R0(%r11)
        mvc     __LC_RETURN_MCCK_PSW(16),__PT_PSW(%r11) # move return PSW
        tm      __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ?
@@@ -1274,7 -1294,7 +1279,7 @@@ ENDPROC(stack_overflow
  1:    BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
        lg      %r9,__SF_SIE_CONTROL(%r15)      # get control block pointer
        ni      __SIE_PROG0C+3(%r9),0xfe        # no longer in SIE
-       lctlg   %c1,%c1,__LC_USER_ASCE          # load primary asce
+       lctlg   %c1,%c1,__LC_KERNEL_ASCE
        larl    %r9,sie_exit                    # skip forward to sie_exit
        BR_EX   %r14,%r11
  
diff --combined arch/s390/lib/delay.c
index 8c0c68e7770ea1d74a3680cc948b41d6b7709205,1734a5c19834f858d48e91c49cee0e8957ef3727..68d61f2835df91945c208206743d33acc8bb83e0
  #include <linux/export.h>
  #include <linux/irqflags.h>
  #include <linux/interrupt.h>
+ #include <linux/jump_label.h>
  #include <linux/irq.h>
  #include <asm/vtimer.h>
  #include <asm/div64.h>
  #include <asm/idle.h>
  
+ static DEFINE_STATIC_KEY_FALSE(udelay_ready);
+ void __init udelay_enable(void)
+ {
+       static_branch_enable(&udelay_ready);
+ }
  void __delay(unsigned long loops)
  {
          /*
@@@ -33,7 -41,7 +41,7 @@@ EXPORT_SYMBOL(__delay)
  
  static void __udelay_disabled(unsigned long long usecs)
  {
 -      unsigned long cr0, cr0_new, psw_mask, flags;
 +      unsigned long cr0, cr0_new, psw_mask;
        struct s390_idle_data idle;
        u64 end;
  
@@@ -45,8 -53,9 +53,8 @@@
        psw_mask = __extract_psw() | PSW_MASK_EXT | PSW_MASK_WAIT;
        set_clock_comparator(end);
        set_cpu_flag(CIF_IGNORE_IRQ);
 -      local_irq_save(flags);
        psw_idle(&idle, psw_mask);
 -      local_irq_restore(flags);
 +      trace_hardirqs_off();
        clear_cpu_flag(CIF_IGNORE_IRQ);
        set_clock_comparator(S390_lowcore.clock_comparator);
        __ctl_load(cr0, 0, 0);
@@@ -76,6 -85,11 +84,11 @@@ void __udelay(unsigned long long usecs
  {
        unsigned long flags;
  
+       if (!static_branch_likely(&udelay_ready)) {
+               udelay_simple(usecs);
+               return;
+       }
        preempt_disable();
        local_irq_save(flags);
        if (in_irq()) {
index 217a7b84abdfaf650744912ce249a877c57006e6,0ff054edcad094d1f6aff0d4bf135c2e8ab842b8..fd568248fd26ce6766fec873e183bc59cfea9f44
@@@ -75,7 -75,6 +75,6 @@@ static int dasd_flush_block_queue(struc
  static void dasd_device_tasklet(unsigned long);
  static void dasd_block_tasklet(unsigned long);
  static void do_kick_device(struct work_struct *);
- static void do_restore_device(struct work_struct *);
  static void do_reload_device(struct work_struct *);
  static void do_requeue_requests(struct work_struct *);
  static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *);
@@@ -138,7 -137,6 +137,6 @@@ struct dasd_device *dasd_alloc_device(v
        INIT_LIST_HEAD(&device->ccw_queue);
        timer_setup(&device->timer, dasd_device_timeout, 0);
        INIT_WORK(&device->kick_work, do_kick_device);
-       INIT_WORK(&device->restore_device, do_restore_device);
        INIT_WORK(&device->reload_device, do_reload_device);
        INIT_WORK(&device->requeue_requests, do_requeue_requests);
        device->state = DASD_STATE_NEW;
@@@ -620,26 -618,6 +618,6 @@@ void dasd_reload_device(struct dasd_dev
  }
  EXPORT_SYMBOL(dasd_reload_device);
  
- /*
-  * dasd_restore_device will schedule a call do do_restore_device to the kernel
-  * event daemon.
-  */
- static void do_restore_device(struct work_struct *work)
- {
-       struct dasd_device *device = container_of(work, struct dasd_device,
-                                                 restore_device);
-       device->cdev->drv->restore(device->cdev);
-       dasd_put_device(device);
- }
- void dasd_restore_device(struct dasd_device *device)
- {
-       dasd_get_device(device);
-       /* queue call to dasd_restore_device to the kernel event daemon. */
-       if (!schedule_work(&device->restore_device))
-               dasd_put_device(device);
- }
  /*
   * Set the target state for a device and starts the state change.
   */
@@@ -1514,7 -1492,6 +1492,6 @@@ int dasd_start_IO(struct dasd_ccw_req *
                              "start_IO: -EIO device gone, retry");
                break;
        case -EINVAL:
-               /* most likely caused in power management context */
                DBF_DEV_EVENT(DBF_WARNING, device, "%s",
                              "start_IO: -EINVAL device currently "
                              "not accessible");
@@@ -2048,7 -2025,7 +2025,7 @@@ static void __dasd_device_check_expire(
  static int __dasd_device_is_unusable(struct dasd_device *device,
                                     struct dasd_ccw_req *cqr)
  {
-       int mask = ~(DASD_STOPPED_DC_WAIT | DASD_UNRESUMED_PM | DASD_STOPPED_NOSPC);
+       int mask = ~(DASD_STOPPED_DC_WAIT | DASD_STOPPED_NOSPC);
  
        if (test_bit(DASD_FLAG_OFFLINE, &device->flags) &&
            !test_bit(DASD_FLAG_SAFE_OFFLINE_RUNNING, &device->flags)) {
@@@ -2112,8 -2089,7 +2089,7 @@@ static void __dasd_device_check_path_ev
        if (!dasd_path_get_tbvpm(device))
                return;
  
-       if (device->stopped &
-           ~(DASD_STOPPED_DC_WAIT | DASD_UNRESUMED_PM))
+       if (device->stopped & ~(DASD_STOPPED_DC_WAIT))
                return;
        rc = device->discipline->verify_path(device,
                                             dasd_path_get_tbvpm(device));
@@@ -2980,12 -2956,6 +2956,12 @@@ static int _dasd_requeue_request(struc
  
        if (!block)
                return -EINVAL;
 +      /*
 +       * If the request is an ERP request there is nothing to requeue.
 +       * This will be done with the remaining original request.
 +       */
 +      if (cqr->refers)
 +              return 0;
        spin_lock_irq(&cqr->dq->lock);
        req = (struct request *) cqr->callback_data;
        blk_mq_requeue_request(req, false);
@@@ -3794,11 -3764,6 +3770,6 @@@ int dasd_generic_path_operational(struc
                 "operational\n");
        DBF_DEV_EVENT(DBF_WARNING, device, "%s", "path operational");
        dasd_device_remove_stop_bits(device, DASD_STOPPED_DC_WAIT);
-       if (device->stopped & DASD_UNRESUMED_PM) {
-               dasd_device_remove_stop_bits(device, DASD_UNRESUMED_PM);
-               dasd_restore_device(device);
-               return 1;
-       }
        dasd_schedule_device_bh(device);
        if (device->block) {
                dasd_schedule_block_bh(device->block);
@@@ -4058,66 -4023,6 +4029,6 @@@ void dasd_schedule_requeue(struct dasd_
  }
  EXPORT_SYMBOL(dasd_schedule_requeue);
  
- int dasd_generic_pm_freeze(struct ccw_device *cdev)
- {
-       struct dasd_device *device = dasd_device_from_cdev(cdev);
-       if (IS_ERR(device))
-               return PTR_ERR(device);
-       /* mark device as suspended */
-       set_bit(DASD_FLAG_SUSPENDED, &device->flags);
-       if (device->discipline->freeze)
-               device->discipline->freeze(device);
-       /* disallow new I/O  */
-       dasd_device_set_stop_bits(device, DASD_STOPPED_PM);
-       return dasd_generic_requeue_all_requests(device);
- }
- EXPORT_SYMBOL_GPL(dasd_generic_pm_freeze);
- int dasd_generic_restore_device(struct ccw_device *cdev)
- {
-       struct dasd_device *device = dasd_device_from_cdev(cdev);
-       int rc = 0;
-       if (IS_ERR(device))
-               return PTR_ERR(device);
-       /* allow new IO again */
-       dasd_device_remove_stop_bits(device,
-                                    (DASD_STOPPED_PM | DASD_UNRESUMED_PM));
-       dasd_schedule_device_bh(device);
-       /*
-        * call discipline restore function
-        * if device is stopped do nothing e.g. for disconnected devices
-        */
-       if (device->discipline->restore && !(device->stopped))
-               rc = device->discipline->restore(device);
-       if (rc || device->stopped)
-               /*
-                * if the resume failed for the DASD we put it in
-                * an UNRESUMED stop state
-                */
-               device->stopped |= DASD_UNRESUMED_PM;
-       if (device->block) {
-               dasd_schedule_block_bh(device->block);
-               if (device->block->request_queue)
-                       blk_mq_run_hw_queues(device->block->request_queue,
-                                            true);
-       }
-       clear_bit(DASD_FLAG_SUSPENDED, &device->flags);
-       dasd_put_device(device);
-       return 0;
- }
- EXPORT_SYMBOL_GPL(dasd_generic_restore_device);
  static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device,
                                                   int rdc_buffer_size,
                                                   int magic)
diff --combined init/Kconfig
index 0872a5a2e7590c0ade132f624af8d6e39de61544,36e280846c5f0c2f69bd0d45a65de071efe90156..b77c60f8b963d4ae43140cce57b4c19af2e28732
@@@ -47,10 -47,6 +47,10 @@@ config CLANG_VERSIO
        int
        default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
  
 +config LLD_VERSION
 +      int
 +      default $(shell,$(srctree)/scripts/lld-version.sh $(LD))
 +
  config CC_CAN_LINK
        bool
        default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT
@@@ -114,7 -110,7 +114,7 @@@ config INIT_ENV_ARG_LIMI
  
  config COMPILE_TEST
        bool "Compile also drivers which will not load"
-       depends on !UML
+       depends on !UML && !S390
        default n
        help
          Some drivers can be compiled on a different platform than they are
@@@ -723,7 -719,7 +723,7 @@@ config LOG_CPU_MAX_BUF_SHIF
          with more CPUs. Therefore this value is used only when the sum of
          contributions is greater than the half of the default kernel ring
          buffer as defined by LOG_BUF_SHIFT. The default values are set
 -        so that more than 64 CPUs are needed to trigger the allocation.
 +        so that more than 16 CPUs are needed to trigger the allocation.
  
          Also this option is ignored when "log_buf_len" kernel parameter is
          used as it forces an exact (power of two) size of the ring buffer.
@@@ -1352,12 -1348,6 +1352,12 @@@ config LD_DEAD_CODE_DATA_ELIMINATIO
          present. This option is not well tested yet, so use at your
          own risk.
  
 +config LD_ORPHAN_WARN
 +      def_bool y
 +      depends on ARCH_WANT_LD_ORPHAN_WARN
 +      depends on !LD_IS_LLD || LLD_VERSION >= 110000
 +      depends on $(ld-option,--orphan-handling=warn)
 +
  config SYSCTL
        bool
  
This page took 0.143656 seconds and 4 git commands to generate.