1. 26 Mar, 2018 5 commits
    • Julian Wiedmann's avatar
      s390/qdio: split up CCQ handling for EQBS / SQBS · 88bf319f
      Julian Wiedmann authored
      Get rid of the confusing two-stage translation in a hot path, and only
      handle CCQs that we anticipate for the respective command. Any
      unexpected value (such as CCQ 97 (rc == 1) for SQBS) should be
      considered a severe HW/driver bug, and traced as such.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Reviewed-by: default avatarBenjamin Block <bblock@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      88bf319f
    • Julian Wiedmann's avatar
      s390/qdio: don't retry EQBS after CCQ 96 · dae55b6f
      Julian Wiedmann authored
      Immediate retry of EQBS after CCQ 96 means that we potentially misreport
      the state of buffers inspected during the first EQBS call.
      
      This occurs when
      1. the first EQBS finds all inspected buffers still in the initial state
         set by the driver (ie INPUT EMPTY or OUTPUT PRIMED),
      2. the EQBS terminates early with CCQ 96, and
      3. by the time that the second EQBS comes around, the state of those
         previously inspected buffers has changed.
      
      If the state reported by the second EQBS is 'driver-owned', all we know
      is that the previous buffers are driver-owned now as well. But we can't
      tell if they all have the same state. So for instance
      - the second EQBS reports OUTPUT EMPTY, but any number of the previous
        buffers could be OUTPUT ERROR by now,
      - the second EQBS reports OUTPUT ERROR, but any number of the previous
        buffers could be OUTPUT EMPTY by now.
      
      Effectively, this can result in both over- and underreporting of errors.
      
      If the state reported by the second EQBS is 'HW-owned', that doesn't
      guarantee that the previous buffers have not been switched to
      driver-owned in the mean time. So for instance
      - the second EQBS reports INPUT EMPTY, but any number of the previous
        buffers could be INPUT PRIMED (or INPUT ERROR) by now.
      
      This would result in failure to process pending work on the queue. If
      it's the final check before yielding initiative, this can cause
      a (temporary) queue stall due to IRQ avoidance.
      
      Fixes: 25f269f1 ("[S390] qdio: EQBS retry after CCQ 96")
      Cc: <stable@vger.kernel.org> #v3.2+
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Reviewed-by: default avatarBenjamin Block <bblock@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      dae55b6f
    • Julian Wiedmann's avatar
      s390/qdio: restrict buffer merging to eligible devices · c11a3dfd
      Julian Wiedmann authored
      Only attempt to merge PENDING into EMPTY buffers for devices where
      the PENDING state is actually expected (ie. IQD with CQ).
      This might speed up the hot path a little bit.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Reviewed-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Reviewed-by: default avatarBenjamin Block <bblock@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      c11a3dfd
    • Julian Wiedmann's avatar
      s390/qdio: don't merge ERROR output buffers · 0cf1e051
      Julian Wiedmann authored
      On an Output queue, both EMPTY and PENDING buffer states imply that the
      buffer is ready for completion-processing by the upper-layer drivers.
      
      So for a non-QEBSM Output queue, get_buf_states() merges mixed
      batches of PENDING and EMPTY buffers into one large batch of EMPTY
      buffers. The upper-layer driver (ie. qeth) later distuingishes PENDING
      from EMPTY by inspecting the slsb_state for
      QDIO_OUTBUF_STATE_FLAG_PENDING.
      
      But the merge logic in get_buf_states() contains a bug that causes us to
      erronously also merge ERROR buffers into such a batch of EMPTY buffers
      (ERROR is 0xaf, EMPTY is 0xa1; so ERROR & EMPTY == EMPTY).
      Effectively, most outbound ERROR buffers are currently discarded
      silently and processed as if they had succeeded.
      
      Note that this affects _all_ non-QEBSM device types, not just IQD with CQ.
      
      Fix it by explicitly spelling out the exact conditions for merging.
      
      For extracting the "get initial state" part out of the loop, this relies
      on the fact that get_buf_states() is never called with a count of 0. The
      QEBSM path already strictly requires this, and the two callers with
      variable 'count' make sure of it.
      
      Fixes: 104ea556 ("qdio: support asynchronous delivery of storage blocks")
      Cc: <stable@vger.kernel.org> #v3.2+
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Reviewed-by: default avatarUrsula Braun <ubraun@linux.vnet.ibm.com>
      Reviewed-by: default avatarBenjamin Block <bblock@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      0cf1e051
    • Julian Wiedmann's avatar
      s390/qdio: simplify math in get_*_buffer_frontier() · 152485bf
      Julian Wiedmann authored
      When determining the buffer count that get_buf_states() should
      be queried for, 'count' is capped at 127 buffers.
      So the check
      	q->first_to_check == (q->first_to_check + count) % 128
      can be reduced to
      	count == 0
      
      This helps to emphasize that get_buf_states() is really only
      called with count > 0.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Reviewed-by: default avatarBenjamin Block <bblock@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      152485bf
  2. 19 Mar, 2018 8 commits
  3. 01 Mar, 2018 2 commits
  4. 27 Feb, 2018 6 commits
  5. 22 Feb, 2018 13 commits
  6. 19 Feb, 2018 3 commits
  7. 18 Feb, 2018 3 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0e06fb5b
      Linus Torvalds authored
      Pull x86 Kconfig fixes from Thomas Gleixner:
       "Three patchlets to correct HIGHMEM64G and CMPXCHG64 dependencies in
        Kconfig when CPU selections are explicitely set to M586 or M686"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig
        x86/Kconfig: Exclude i586-class CPUs lacking PAE support from the HIGHMEM64G Kconfig group
        x86/Kconfig: Add missing i586-class CPUs to the X86_CMPXCHG64 Kconfig group
      0e06fb5b
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9ca2c16f
      Linus Torvalds authored
      Pull perf updates from Thomas Gleixner:
       "Perf tool updates and kprobe fixes:
      
         - perf_mmap overwrite mode fixes/overhaul, prep work to get 'perf
           top' using it, making it bearable to use it in large core count
           systems such as Knights Landing/Mill Intel systems (Kan Liang)
      
         - s/390 now uses syscall.tbl, just like x86-64 to generate the
           syscall table id -> string tables used by 'perf trace' (Hendrik
           Brueckner)
      
         - Use strtoull() instead of home grown function (Andy Shevchenko)
      
         - Synchronize kernel ABI headers, v4.16-rc1 (Ingo Molnar)
      
         - Document missing 'perf data --force' option (Sangwon Hong)
      
         - Add perf vendor JSON metrics for ARM Cortex-A53 Processor (William
           Cohen)
      
         - Improve error handling and error propagation of ftrace based
           kprobes so failures when installing kprobes are not silently
           ignored and create disfunctional tracepoints"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
        kprobes: Propagate error from disarm_kprobe_ftrace()
        kprobes: Propagate error from arm_kprobe_ftrace()
        Revert "tools include s390: Grab a copy of arch/s390/include/uapi/asm/unistd.h"
        perf s390: Rework system call table creation by using syscall.tbl
        perf s390: Grab a copy of arch/s390/kernel/syscall/syscall.tbl
        tools/headers: Synchronize kernel ABI headers, v4.16-rc1
        perf test: Fix test trace+probe_libc_inet_pton.sh for s390x
        perf data: Document missing --force option
        perf tools: Substitute yet another strtoull()
        perf top: Check the latency of perf_top__mmap_read()
        perf top: Switch default mode to overwrite mode
        perf top: Remove lost events checking
        perf hists browser: Add parameter to disable lost event warning
        perf top: Add overwrite fall back
        perf evsel: Expose the perf_missing_features struct
        perf top: Check per-event overwrite term
        perf mmap: Discard legacy interface for mmap read
        perf test: Update mmap read functions for backward-ring-buffer test
        perf mmap: Introduce perf_mmap__read_event()
        perf mmap: Introduce perf_mmap__read_done()
        ...
      9ca2c16f
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2d6c4e40
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "A small set of updates mostly for irq chip drivers:
      
         - MIPS GIC fix for spurious, masked interrupts
      
         - fix for a subtle IPI bug in GICv3
      
         - do not probe GICv3 ITSs that are marked as disabled
      
         - multi-MSI support for GICv2m
      
         - various small cleanups"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqdomain: Re-use DEFINE_SHOW_ATTRIBUTE() macro
        irqchip/bcm: Remove hashed address printing
        irqchip/gic-v2m: Add PCI Multi-MSI support
        irqchip/gic-v3: Ignore disabled ITS nodes
        irqchip/gic-v3: Use wmb() instead of smb_wmb() in gic_raise_softirq()
        irqchip/gic-v3: Change pr_debug message to pr_devel
        irqchip/mips-gic: Avoid spuriously handling masked interrupts
      2d6c4e40