30 Dec, 2020

1 commit

  • [ Upstream commit 14d4c4fa46eeaa3922e8e1c4aa727eb0a1412804 ]

    Use of sch->dev reference after the put_device() call could trigger
    the use-after-free bugs.

    Fix this by simply adjusting the position of put_device.

    Fixes: 37db8985b211 ("s390/cio: add basic protected virtualization support")
    Reported-by: Hulk Robot
    Suggested-by: Cornelia Huck
    Signed-off-by: Qinglang Miao
    Reviewed-by: Cornelia Huck
    Reviewed-by: Vineeth Vijayan
    [vneethv@linux.ibm.com: Slight modification in the commit-message]
    Signed-off-by: Vineeth Vijayan
    Signed-off-by: Heiko Carstens
    Signed-off-by: Sasha Levin

    Qinglang Miao
     

17 Oct, 2020

1 commit

  • Pull s390 updates from Vasily Gorbik:

    - Remove address space overrides using set_fs()

    - Convert to generic vDSO

    - Convert to generic page table dumper

    - Add ARCH_HAS_DEBUG_WX support

    - Add leap seconds handling support

    - Add NVMe firmware-assisted kernel dump support

    - Extend NVMe boot support with memory clearing control and addition of
    kernel parameters

    - AP bus and zcrypt api code rework. Add adapter configure/deconfigure
    interface. Extend debug features. Add failure injection support

    - Add ECC secure private keys support

    - Add KASan support for running protected virtualization host with
    4-level paging

    - Utilize destroy page ultravisor call to speed up secure guests
    shutdown

    - Implement ioremap_wc() and ioremap_prot() with MIO in PCI code

    - Various checksum improvements

    - Other small various fixes and improvements all over the code

    * tag 's390-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (85 commits)
    s390/uaccess: fix indentation
    s390/uaccess: add default cases for __put_user_fn()/__get_user_fn()
    s390/zcrypt: fix wrong format specifications
    s390/kprobes: move insn_page to text segment
    s390/sie: fix typo in SIGP code description
    s390/lib: fix kernel doc for memcmp()
    s390/zcrypt: Introduce Failure Injection feature
    s390/zcrypt: move ap_msg param one level up the call chain
    s390/ap/zcrypt: revisit ap and zcrypt error handling
    s390/ap: Support AP card SCLP config and deconfig operations
    s390/sclp: Add support for SCLP AP adapter config/deconfig
    s390/ap: add card/queue deconfig state
    s390/ap: add error response code field for ap queue devices
    s390/ap: split ap queue state machine state from device state
    s390/zcrypt: New config switch CONFIG_ZCRYPT_DEBUG
    s390/zcrypt: introduce msg tracking in zcrypt functions
    s390/startup: correct early pgm check info formatting
    s390: remove orphaned extern variables declarations
    s390/kasan: make sure int handler always run with DAT on
    s390/ipl: add support to control memory clearing for nvme re-IPL
    ...

    Linus Torvalds
     

30 Sep, 2020

2 commits

  • arch/s390/pci/pci_bus.h: zpci_bus_init - only declaration left after
    commit 05bc1be6db4b ("s390/pci: create zPCI bus")

    arch/s390/include/asm/gmap.h: gmap_pte_notify - only declaration left
    after commit 4be130a08420 ("s390/mm: add shadow gmap support")

    arch/s390/include/asm/pgalloc.h: rcu_table_freelist_finish - only
    declaration left after commit 36409f6353fc ("[S390] use generic RCU
    page-table freeing code")

    arch/s390/include/asm/tlbflush.h: smp_ptlb_all - only declaration left
    after commit 5a79859ae0f3 ("s390: remove 31 bit support")

    arch/s390/include/asm/vtimer.h: init_cpu_vtimer - only declaration left
    after commit b5f87f15e200 ("s390/idle: consolidate idle functions and
    definitions")

    arch/s390/include/asm/pci.h: zpci_debug_info - only declaration left
    after commit 386aa051fb4b ("s390/pci: remove per device debug attribute")

    arch/s390/include/asm/vdso.h: vdso_alloc_boot_cpu - only declaration
    left after commit 4bff8cb54502 ("s390: convert to GENERIC_VDSO")

    arch/s390/include/asm/smp.h: smp_vcpu_scheduled - only declaration left
    after commit 67626fadd269 ("s390: enforce CONFIG_SMP")

    arch/s390/kernel/entry.h: restart_call_handler - only declaration left
    after commit 8b646bd75908 ("[S390] rework smp code")

    arch/s390/kernel/entry.h: startup_init_nobss - only declaration left
    after commit 2e83e0eb85ca ("s390: clean .bss before running uncompressed
    kernel")

    arch/s390/kernel/entry.h: s390_early_resume - only declaration left after
    commit 394216275c7d ("s390: remove broken hibernate / power management
    support")

    drivers/s390/char/raw3270.h: raw3270_request_alloc_bootmem - only
    declaration left after commit 33403dcfcdfd ("[S390] 3270 console:
    convert from bootmem to slab")

    drivers/s390/cio/device.h: ccw_device_schedule_sch_unregister - only
    declaration left after commit 37de53bb5290 ("[S390] cio: introduce ccw
    device todos")

    drivers/s390/char/tape.h: tape_hotplug_event - has only declaration
    since recorded git history.

    drivers/s390/char/tape.h: tape_oper_handler - has only declaration since
    recorded git history.

    drivers/s390/char/tape.h: tape_noper_handler - has only declaration
    since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_check_locate - only declaration
    left after commit 161beff8f40d ("s390/tape: remove tape block leftovers")

    drivers/s390/char/tape_std.h: tape_std_default_handler - has only
    declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_unexpect_uchk_handler - has only
    declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_irq - has only declaration since
    recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery - has only
    declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_has_failed -
    has only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_succeded - has
    only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_do_retry - has
    only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_read_opposite -
    has only declaration since recorded git history.

    drivers/s390/char/tape_std.h: tape_std_error_recovery_HWBUG - has only
    declaration since recorded git history.

    Reviewed-by: Sven Schnelle
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     
  • Added with commit 77e844b96440 ("s390/hibernate: add early resume
    function") unused since commit 394216275c7d ("s390: remove broken
    hibernate / power management support").

    Reviewed-by: Vineeth Vijayan
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     

26 Sep, 2020

1 commit

  • In the current implementation, leap seconds are only synchronized
    during the bootup process when the STP clock is synced. If the Leap
    second offset (LSO) changes the machine must be rebooted, which is
    not desired. This patch adds the required code to handle Leap second
    changes during runtime. If the Leap second changes, a Configuration
    change machine check is triggered. The STP code than schedules a Leap
    second insertion/deletion with do_adjtimex().

    Signed-off-by: Sven Schnelle
    Reviewed-by: Alexander Egorenkov
    Signed-off-by: Vasily Gorbik

    Sven Schnelle
     

16 Sep, 2020

2 commits

  • Add helper functions to expose Channel Subsystem ID (CSSID), MIF Image Id
    (IID), Channel ID (CHID) and Channel Path ID (CHPID).
    These values are required by the qeth driver's exploitation of network-
    address-change-notifications to determine which entries belong to this
    interface.

    Store the Partition identifier in System log, as this may be used to map
    a Linux view to a Hardware view for debugging purpose.

    Signed-off-by: Alexandra Winter
    Reviewed-by: Vineeth Vijayan
    Signed-off-by: Julian Wiedmann
    Acked-by: Heiko Carstens
    Signed-off-by: David S. Miller

    Alexandra Winter
     
  • Add support for operation code 3 (OC3) of the
    Perform-Network-Subchannel-Operations (PNSO) function
    of the Channel-Subsystem-Call (CHSC) instruction.

    PNSO provides 2 operation codes:
    OC0 - BRIDGE_INFO
    OC3 - ADDR_INFO (new)

    Extend the function calls to *pnso* to pass the OC and
    add new response code 0108.

    Support for OC3 is indicated by a flag in the css_general_characteristics.

    Signed-off-by: Alexandra Winter
    Reviewed-by: Julian Wiedmann
    Reviewed-by: Peter Oberparleiter
    Reviewed-by: Vineeth Vijayan
    Signed-off-by: Julian Wiedmann
    Acked-by: Heiko Carstens
    Signed-off-by: David S. Miller

    Alexandra Winter
     

14 Sep, 2020

3 commits

  • Passing a custom name from the device driver is nice - but in practice
    it's only zfcp who has been using this. So we might as well hard-code
    a naming scheme in the qdio layer, so that qeth also benefits from it.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Steffen Maier
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • __qdio_allocate_fill_qdr() is meant to set up one specific queue
    descriptor in the QDR. But for this simple task, it gets passed a bunch
    of global structs and offsets - and then navigates through the structs
    to find its actual operands.

    Clean up all the complicated pointer chasing & index calculation, and
    just pass a descriptor and its associated queue struct.

    While at it also add some virt_to_phys() translations, to clarify that
    addresses in the QDR are meant to be absolute.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • When processing a PENDING buffer with no attached aob, the current code
    would get stuck on this buffer (as the 'continue' causes us to not
    advance the buffer index) and process it repeatedly until the loop
    terminates eventually.

    Luckily this should never happen - the HW must not use the PENDING state
    when no aob was provided. But we can still make this code path less
    fragile and protect against buggy devices.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     

17 Aug, 2020

1 commit

  • The scanning through subchannels during the time of an event could
    take significant amount of time in case of platforms with lots of
    known subchannels. This might result in higher scheduling latencies
    for other tasks especially on systems with a single CPU. Add
    cond_resched() call, as the loop in slow_eval_known_fn() can be
    executed for a longer duration.

    Reviewed-by: Peter Oberparleiter
    Signed-off-by: Vineeth Vijayan
    Signed-off-by: Heiko Carstens

    Vineeth Vijayan
     

04 Aug, 2020

1 commit

  • Pull s390 updates from Heiko Carstens:

    - Add support for function error injection.

    - Add support for custom exception handlers, as required by
    BPF_PROBE_MEM.

    - Add support for BPF_PROBE_MEM.

    - Add trace events for idle enter / exit for the s390 specific idle
    implementation.

    - Remove unused zcore memmmap device.

    - Remove unused "raw view" from s390 debug feature.

    - AP bus + zcrypt device driver code refactoring.

    - Provide cex4 cca sysfs attributes for cex3 for zcrypt device driver.

    - Expose only minimal interface to walk physmem for mm/memblock. This
    is a common code change and it has been agreed on with Mike Rapoport
    and Andrew Morton that this can go upstream via the s390 tree.

    - Rework of the s390 vmem/vmmemap code to allow for future memory hot
    remove.

    - Get rid of FORCE_MAX_ZONEORDER to finally allow for order-10
    allocations again, instead of only order-8 allocations.

    - Various small improvements and fixes.

    * tag 's390-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits)
    s390/vmemmap: coding style updates
    s390/vmemmap: avoid memset(PAGE_UNUSED) when adding consecutive sections
    s390/vmemmap: remember unused sub-pmd ranges
    s390/vmemmap: fallback to PTEs if mapping large PMD fails
    s390/vmem: cleanup empty page tables
    s390/vmemmap: take the vmem_mutex when populating/freeing
    s390/vmemmap: cleanup when vmemmap_populate() fails
    s390/vmemmap: extend modify_pagetable() to handle vmemmap
    s390/vmem: consolidate vmem_add_range() and vmem_remove_range()
    s390/vmem: rename vmem_add_mem() to vmem_add_range()
    s390: enable HAVE_FUNCTION_ERROR_INJECTION
    s390/pci: clarify comment in s390_mmio_read/write
    s390/time: improve comparison for tod steering
    s390/time: select CLOCKSOURCE_VALIDATE_LAST_CYCLE
    s390/time: use CLOCKSOURCE_MASK
    s390/bpf: implement BPF_PROBE_MEM
    s390/kernel: expand exception table logic to allow new handling options
    s390/kernel: unify EX_TABLE* implementations
    s390/mm: allow order 10 allocations
    s390/mm: avoid trimming to MAX_ORDER
    ...

    Linus Torvalds
     

20 Jul, 2020

3 commits

  • For non-thinint devices in LPAR, qdio polls an idle Input Queue for a
    little while to catch more work. But platform support for thinints has
    been around practically _forever_ by now, so this micro-optimization is
    seeing 0 actual use. Remove it to reduce the overall complexity of the
    hot path.

    In the meantime we also grew support for driver-level polling
    (eg. NAPI in qeth), so it's quite questionable how useful this would
    actually be on current kernels.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Heiko Carstens

    Julian Wiedmann
     
  • The comment is inaccurate, qdio_inbound_q_moved() and/or its callers no
    longer get confused by a count of 128 completed SBALs.

    Scanning all 128 SBALs at once can improve IRQ reduction (as we now
    place the ACK at the right spot), and reduce the amount of processing
    needed to handle all completed SBALs.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Heiko Carstens

    Julian Wiedmann
     
  • Old code would only scan up to 127 SBALs at once. So the last statistics
    bucket was set aside to count "discovered 127 SBALs with new work"
    events.

    But nowadays we allow to scan all 128 SBALs for Output Queues, and a
    subsequent patch will introduce the same for Input Queues.
    So fix up the accounting to use the last bucket only when all 128 SBALs
    have been discovered with new work.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Heiko Carstens

    Julian Wiedmann
     

03 Jul, 2020

1 commit


18 Jun, 2020

2 commits

  • The way we produce SBALs to the device (first update q->nr_buf_used,
    then update the SLSB) should ensure that we never see some of the
    SLSB states when scanning the queue for progress.
    So make some noise if we do, this implies a bug in our SBAL tracking.

    Also tweak the WARN msg to provide more information.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • This removes the last remaining accesses to ->qdio_data from internal
    code. Just pass the qdio_irq struct where needed instead.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     

16 Jun, 2020

2 commits

  • Streamline the processing of QDIO Input Queues, and remove some
    intermittent SLSB updates (no deleting of old ACKs, no redundant
    transitions through NOT_INIT).

    Rather than counting ACKs, we now keep track of the whole batch of
    SBALs that were completed during the current polling cycle.
    Most completed SBALs stay in their initial state (ie. PRIMED or ERROR),
    except that the most recent SBAL in each sub-run is ACKed for
    IRQ reduction.

    The only logic changes happen in inbound_handle_work(), the other
    delta is just a renaming of the variables that track the SBAL batch.

    Note that in particular we don't need to flip the _oldest_ SBAL to
    an idle state (eg. NOT_INIT or ACKed) as a guard against catching our
    own tail. Since get_inbound_buffer_frontier() will never scan more than
    the remaining nr_buf_used SBALs, this scenario just doesn't occur.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • xchg() for a single-byte location assembles to a 4-byte Compare&Swap,
    wrapped into a non-trivial amount of retry code that deals with
    concurrent modifications to the unaffected bytes.

    Change it to a simple byte-store, but preserve the memory ordering
    semantics that the CS provided.
    This simplifies the generated code for a hot path, and in theory also
    allows us to amortize the memory barriers over multiple SLSB updates.

    CC: Andreas Krebbel
    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     

04 Jun, 2020

1 commit

  • Fixes the following sparse warnings:
    drivers/s390/cio/vfio_ccw_chp.c:62:30: warning: symbol 'vfio_ccw_schib_region_ops' was not declared. Should it be static?
    drivers/s390/cio/vfio_ccw_chp.c:117:30: warning: symbol 'vfio_ccw_crw_region_ops' was not declared. Should it be static?

    Link: https://lkml.kernel.org/r/patch.git-a34be7aede18.your-ad-here.call-01591269421-ext-5655@work.hours
    Reviewed-by: Cornelia Huck
    Signed-off-by: Vasily Gorbik

    Vasily Gorbik
     

03 Jun, 2020

3 commits

  • Since CRW events are (should be) rare, let's put a trace
    in that routine too.

    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    Signed-off-by: Cornelia Huck

    Eric Farman
     
  • Use the IRQ to notify userspace that there is a CRW
    pending in the region, related to path-availability
    changes on the passthrough subchannel.

    Signed-off-by: Farhan Ali
    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    Signed-off-by: Cornelia Huck

    Farhan Ali
     
  • This region provides a mechanism to pass a Channel Report Word
    that affect vfio-ccw devices, and needs to be passed to the guest
    for its awareness and/or processing.

    The base driver (see crw_collect_info()) provides space for two
    CRWs, as a subchannel event may have two CRWs chained together
    (one for the ssid, one for the subchannel). As vfio-ccw will
    deal with everything at the subchannel level, provide space
    for a single CRW to be transferred in one shot.

    Signed-off-by: Farhan Ali
    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    [CH: added padding to ccw_crw_region]
    Signed-off-by: Cornelia Huck

    Farhan Ali
     

02 Jun, 2020

6 commits

  • To simplify future expansion.

    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    Signed-off-by: Cornelia Huck

    Eric Farman
     
  • The schib region can be used by userspace to get the subchannel-
    information block (SCHIB) for the passthrough subchannel.
    This can be useful to get information such as channel path
    information via the SCHIB.PMCW fields.

    Signed-off-by: Farhan Ali
    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    Signed-off-by: Cornelia Huck

    Farhan Ali
     
  • This is mostly for the purposes of a later patch, since
    we'll need to do the same thing later.

    While we are at it, move the resulting function call to ahead
    of the unregistering of the IOMMU notifier, so that it's done
    in the reverse order of how it was created.

    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    Signed-off-by: Cornelia Huck

    Eric Farman
     
  • Register the chp_event callback to receive channel path related
    events for the subchannels managed by vfio-ccw.

    Signed-off-by: Farhan Ali
    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    Signed-off-by: Cornelia Huck

    Farhan Ali
     
  • Consolidate some of the cleanup code for the regions, so that
    as more are added we reduce code duplication.

    Signed-off-by: Farhan Ali
    Signed-off-by: Eric Farman
    Reviewed-by: Cornelia Huck
    Message-Id:
    Signed-off-by: Cornelia Huck

    Farhan Ali
     
  • Remove the explicit prefetch check when using vfio-ccw devices.
    This check does not trigger in practice as all Linux channel programs
    are intended to use prefetch.

    It is expected that all ORBs issued by Linux will request prefetch.
    Although non-prefetching ORBs are not rejected, they will prefetch
    nonetheless. A warning is issued up to once per 5 seconds when a
    forced prefetch occurs.

    A non-prefetch ORB does not necessarily result in an error, however
    frequent encounters with non-prefetch ORBs indicate that channel
    programs are being executed in a way that is inconsistent with what
    the guest is requesting. While there is currently no known case of an
    error caused by forced prefetch, it is possible in theory that forced
    prefetch could result in an error if applied to a channel program that
    is dependent on non-prefetch.

    Signed-off-by: Jared Rossi
    Reviewed-by: Eric Farman
    Message-Id:
    Signed-off-by: Cornelia Huck

    Jared Rossi
     

28 May, 2020

3 commits

  • CHSC3D (PNSO - perform network subchannel operation) is used for
    OC0 (Store-network-bridging-information) as well as for
    OC3 (Store-network-address-information). So common fields are renamed
    from *brinfo* to *pnso*.
    Also *_bridge_host_* is changed into *_addr_change_*, e.g.
    qeth_bridge_host_event to qeth_addr_change_event, for the
    same reasons.
    The keywords in the card traces are changed accordingly.

    Remove unused L3 types, as PNSO will only return Layer2 entries.

    Make PNSO CHSC implementation more consistent with existing API usage:
    Add new function ccw_device_pnso() to drivers/s390/cio/device_ops.c and
    the function declaration to arch/s390/include/asm/ccwdev.h, which takes
    a struct ccw_device * as parameter instead of schid and calls
    chsc_pnso().

    PNSO CHSC has no strict relationship to qdio. So move the calling
    function from qdio to qeth_l2 and move the necessary structures to a
    new file arch/s390/include/asm/chsc.h.

    Do response code evaluation only in chsc_error_from_response() and
    use return code in all other places. qeth_anset_makerc() was meant to
    evaluate the PNSO response code, but never did, because pnso_rc was
    already non-zero.

    Indentation was corrected in some places.

    Signed-off-by: Alexandra Winter
    Reviewed-by: Peter Oberparleiter
    Reviewed-by: Vineeth Vijayan
    Reviewed-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Alexandra Winter
     
  • q->first_to_kick is obsolete, and can be replaced by q->first_to_check.

    Both cursors start off at 0. Out of the three code paths that update
    first_to_check, the qdio_inspect_queue() path is irrelevant as it
    doesn't even touch first_to_kick anymore.
    This leaves us with the two tasklet-driven code paths. Here any update
    to first_to_check is followed by a call to qdio_kick_handler(), which
    advances first_to_kick by the same amount.

    So the two cursors will differ only for a tiny moment. Drivers have no
    way of deterministically observing this difference, and thus it doesn't
    matter which of the cursors we use for reporting an error to q->handler.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • Document the actual semantics, correcting an old copy & paste mistake.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     

20 May, 2020

4 commits

  • SBALs in PRIMED or ERROR state represent new work on the Input Queue.
    But while inbound_primed() does all sorts of ACK management for new
    PRIMED work, the same handling is currently missing for ERROR work.
    In particular the path for ERROR work doesn't clear up _old_ ACKs.

    Treat ERROR work the same as PRIMED work, but consider that the QEBSM
    auto-ACK feature doesn't apply here. So we need to set the ACK manually,
    as if it was a non-QEBSM device.

    Note that this doesn't aspire to actually improve performance, the main
    goal is to just unify the code paths and have consistent behaviour.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • inbound_primed() currently has two code paths - one for QEBSM that knows
    how to deal with multiple ACKs, and a non-QEBSM path that strictly
    assumes a single ACK on the queue.

    In preparation for a subsequent patch, slightly adjust the non-QEBSM
    path so that it can manage a queue with multiple ACKs.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • Refilling the Input Queue requires additional checks, as the refilled
    SBALs can overlap with the ACKs that qdio maintains on the queue.

    This code path is way too complex, and does a whole bunch of wrap-around
    checks that the modulo arithmetic in sub_buf() takes care of by itself.
    So shrink down all that code into a few lines of equivalent
    functionality.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • commit 8ebd51a705c5 ("s390/cio: idset.c: remove some unused functions")
    left behind this, remove it

    Link: https://lkml.kernel.org/r/20200508140643.30540-1-yuehaibing@huawei.com
    Signed-off-by: YueHaibing
    Reviewed-by: Vineeth Vijayan
    [vneethv@linux.ibm.com: Slight modification in the title]
    Signed-off-by: Vineeth Vijayan
    Signed-off-by: Vasily Gorbik

    YueHaibing
     

28 Apr, 2020

3 commits

  • buf_in_between() gets passed q->u.in.ack_start as 'bufnr' parameter.

    The ack_start always ranges between 0 and QDIO_MAX_BUFFERS_PER_Q - 1,
    so the subsequent check will always return true. Remove it.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Benjamin Block
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • Except for some initial thinint-only steps, the processing is identical
    to the non-thinint case. So re-use the existing helper.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Benjamin Block
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann
     
  • Knowing how many queues we initially allocated allows us to
    1) sanity-check a subsequent qdio_establish() request, and
    2) walk the queue arrays without further checks. Apply this while
    cleanly splitting qdio_free_queues() into two separate helpers.

    Signed-off-by: Julian Wiedmann
    Reviewed-by: Steffen Maier
    Reviewed-by: Benjamin Block
    Signed-off-by: Vasily Gorbik

    Julian Wiedmann