1. 09 1月, 2020 1 次提交
    • H
      s390/zcrypt: move ap device reset from bus to driver code · 0c874cd0
      Harald Freudenberger 提交于
      This patch moves the reset invocation of an ap device when
      fresh detected from the ap bus to the probe() function of
      the driver responsible for this device.
      
      The virtualisation of ap devices makes it necessary to
      remove unconditioned resets on fresh appearing apqn devices.
      It may be that such a device is already enabled for guest
      usage. So there may be a race condition between host ap bus
      and guest ap bus doing the reset. This patch moves the
      reset from the ap bus to the zcrypt drivers. So if there
      is no zcrypt driver bound to an ap device - for example
      the ap device is bound to the vfio device driver - the
      ap device is untouched passed to the vfio device driver.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      0c874cd0
  2. 19 9月, 2019 1 次提交
  3. 12 7月, 2019 1 次提交
  4. 24 6月, 2019 1 次提交
    • S
      bus_find_device: Unify the match callback with class_find_device · 418e3ea1
      Suzuki K Poulose 提交于
      There is an arbitrary difference between the prototypes of
      bus_find_device() and class_find_device() preventing their callers
      from passing the same pair of data and match() arguments to both of
      them, which is the const qualifier used in the prototype of
      class_find_device().  If that qualifier is also used in the
      bus_find_device() prototype, it will be possible to pass the same
      match() callback function to both bus_find_device() and
      class_find_device(), which will allow some optimizations to be made in
      order to avoid code duplication going forward.  Also with that, constify
      the "data" parameter as it is passed as a const to the match function.
      
      For this reason, change the prototype of bus_find_device() to match
      the prototype of class_find_device() and adjust its callers to use the
      const qualifier in accordance with the new prototype of it.
      
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Andreas Noever <andreas.noever@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: David Kershner <david.kershner@unisys.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Harald Freudenberger <freude@linux.ibm.com>
      Cc: Hartmut Knaack <knaack.h@gmx.de>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Jonathan Cameron <jic23@kernel.org>
      Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michael Jamet <michael.jamet@intel.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
      Cc: Sebastian Ott <sebott@linux.ibm.com>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
      Cc: rafael@kernel.org
      Acked-by: NCorey Minyard <minyard@acm.org>
      Acked-by: NDavid Kershner <david.kershner@unisys.com>
      Acked-by: NMark Brown <broonie@kernel.org>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Acked-by: Wolfram Sang <wsa@the-dreams.de> # for the I2C parts
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NSuzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      418e3ea1
  5. 28 5月, 2019 1 次提交
    • H
      s390/zcrypt: Fix wrong dispatching for control domain CPRBs · 7379e652
      Harald Freudenberger 提交于
      The zcrypt device driver does not handle CPRBs which address
      a control domain correctly. This fix introduces a workaround:
      The domain field of the request CPRB is checked if there is
      a valid domain value in there. If this is true and the value
      is a control only domain (a domain which is enabled in the
      crypto config ADM mask but disabled in the AQM mask) the
      CPRB is forwarded to the default usage domain. If there is
      no default domain, the request is rejected with an ENODEV.
      
      This fix is important for maintaining crypto adapters. For
      example one LPAR can use a crypto adapter domain ('Control
      and Usage') but another LPAR needs to be able to maintain
      this adapter domain ('Control'). Scenarios like this did
      not work properly and the patch enables this.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      7379e652
  6. 29 4月, 2019 1 次提交
  7. 12 3月, 2019 1 次提交
  8. 06 3月, 2019 1 次提交
    • H
      s390/zcrypt: revisit ap device remove procedure · 01396a37
      Harald Freudenberger 提交于
      Working with the vfio-ap driver let to some revisit of the way
      how an ap (queue) device is removed from the driver.
      With the current implementation all the cleanup was done before
      the driver even got notified about the removal. Now the ap
      queue removal is done in 3 steps:
      1) A preparation step, all ap messages within the queue
         are flushed and so the driver does 'receive' them.
         Also a new state AP_STATE_REMOVE assigned to the queue
         makes sure there are no new messages queued in.
      2) Now the driver's remove function is invoked and the
         driver should do the job of cleaning up it's internal
         administration lists or whatever. After 2) is done
         it is guaranteed, that the driver is not invoked any
         more. On the other hand the driver has to make sure
         that the APQN is not accessed any more after step 2
         is complete.
      3) Now the ap bus code does the job of total cleanup of the
         APQN. A reset with zero is triggered and the state of
         the queue goes to AP_STATE_UNBOUND.
         After step 3) is complete, the ap queue has no pending
         messages and the APQN is cleared and so there are no
         requests and replies lingering around in the firmware
         queue for this APQN. Also the interrupts are disabled.
      
      After these remove steps the ap queue device may be assigned
      to another driver.
      
      Stress testing this remove/probe procedure showed a problem with the
      correct module reference counting. The actual receive of an reply in
      the driver is done asynchronous with completions. So with a driver
      change on an ap queue the message flush triggers completions but the
      threads waiting for the completions may run at a time where the queue
      already has the new driver assigned. So the module_put() at receive
      time needs to be done on the driver module which queued the ap
      message. This change is also part of this patch.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: NIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      01396a37
  9. 13 2月, 2019 1 次提交
    • H
      s390/zcrypt: use new state UNBOUND during queue driver rebind · b1af7528
      Harald Freudenberger 提交于
      When an alternate driver (vfio-ap) has bound an ap queue and this
      binding is revised the ap queue device is in an intermittent
      state not bound to any driver. The internal state variable
      covered this with the state AP_STATE_BORKED which is also used to
      reflect broken devices. When now an ap bus scan runs such a
      device is destroyed and on the next scan reconstructed.
      
      So a stress test with high frequency switching the queue driver
      between the default and the vfio-ap driver hit this gap and the
      queue was removed until the next ap bus scan. This fix now
      introduces another state for the in-between condition for a queue
      momentary not bound to a driver and so the ap bus scan function
      skips this device instead of removing it.
      
      Also some very slight but maybe helpful debug feature messages
      come with this patch - in particular a message showing that a
      broken card/queue device will get removed.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Reviewed-by: NIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b1af7528
  10. 28 1月, 2019 1 次提交
    • H
      s390/zcrypt: fix specification exception on z196 during ap probe · 8f9aca0c
      Harald Freudenberger 提交于
      The older machines don't have the QCI instruction available.
      With support for up to 256 crypto cards the probing of each
      card has been extended to check card ids from 0 up to 255.
      For machines with QCI support there is a filter limiting the
      range of probed cards. The older machines (z196 and older)
      don't have this filter and so since support for 256 cards is
      in the driver all cards are probed. However, these machines
      also require to have the card id fit into 6 bits. Exceeding
      this limit results in a specification exception which happens
      on every kernel startup even when there is no crypto configured
      and used at all.
      
      This fix limits the range of probed crypto cards to 64 if
      there is no QCI instruction available to obey to the older
      ap architecture and so fixes the specification exceptions
      on z196 machines.
      
      Cc: stable@vger.kernel.org # v4.17+
      Fixes: af4a7227 ("s390/zcrypt: Support up to 256 crypto adapters.")
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8f9aca0c
  11. 13 12月, 2018 1 次提交
    • H
      s390/zcrypt: rework ap scan bus code · a7b1868a
      Harald Freudenberger 提交于
      Rework of the AP bus scan code. The ap_scan_bus() function
      is large, so this patch splits the code by introducing a new
      new function _ap_scan_bus_adapter() which deals with just
      one adapter and thus reduces the scan function code complexity.
      
      Now the AP bus scan can handle a type change of an crypto
      adapter on the fly (e.g. from CEX5 to CEX6). This may be
      the case with newer versions of zVM where the card may
      be pure virtual and a type change is just one click.
      However a type or function change requires to unregister
      all queue devices and the card device and re-register them.
      
      Comments around the AP bus scan code have been added and/or
      improved to provide some hopefully useful hints about what
      the code is actually doing.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      a7b1868a
  12. 27 11月, 2018 1 次提交
    • H
      s390/zcrypt: reinit ap queue state machine during device probe · 104f708f
      Harald Freudenberger 提交于
      Until the vfio-ap driver came into live there was a well known
      agreement about the way how ap devices are initialized and their
      states when the driver's probe function is called.
      
      However, the vfio device driver when receiving an ap queue device does
      additional resets thereby removing the registration for interrupts for
      the ap device done by the ap bus core code. So when later the vfio
      driver releases the device and one of the default zcrypt drivers takes
      care of the device the interrupt registration needs to get
      renewed. The current code does no renew and result is that requests
      send into such a queue will never see a reply processed - the
      application hangs.
      
      This patch adds a function which resets the aq queue state machine for
      the ap queue device and triggers the walk through the initial states
      (which are reset and registration for interrupts). This function is
      now called before the driver's probe function is invoked.
      
      When the association between driver and device is released, the
      driver's remove function is called. The current implementation calls a
      ap queue function ap_queue_remove(). This invokation has been moved to
      the ap bus function to make the probe / remove pair for ap bus and
      drivers more symmetric.
      
      Fixes: 7e0bdbe5 ("s390/zcrypt: AP bus support for alternate driver(s)")
      Cc: stable@vger.kernel.org # 4.19+
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Reviewd-by: NTony Krowiak <akrowiak@linux.ibm.com>
      Reviewd-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      104f708f
  13. 09 10月, 2018 1 次提交
  14. 08 10月, 2018 1 次提交
    • H
      s390/zcrypt: multiple zcrypt device nodes support · 00fab235
      Harald Freudenberger 提交于
      This patch is an extension to the zcrypt device driver to provide,
      support and maintain multiple zcrypt device nodes. The individual
      zcrypt device nodes can be restricted in terms of crypto cards,
      domains and available ioctls. Such a device node can be used as a
      base for container solutions like docker to control and restrict
      the access to crypto resources.
      
      The handling is done with a new sysfs subdir /sys/class/zcrypt.
      Echoing a name (or an empty sting) into the attribute "create" creates
      a new zcrypt device node. In /sys/class/zcrypt a new link will appear
      which points to the sysfs device tree of this new device. The
      attribute files "ioctlmask", "apmask" and "aqmask" in this directory
      are used to customize this new zcrypt device node instance. Finally
      the zcrypt device node can be destroyed by echoing the name into
      /sys/class/zcrypt/destroy. The internal structs holding the device
      info are reference counted - so a destroy will not hard remove a
      device but only marks it as removable when the reference counter drops
      to zero.
      
      The mask values are bitmaps in big endian order starting with bit 0.
      So adapter number 0 is the leftmost bit, mask is 0x8000...  The sysfs
      attributes accept 2 different formats:
      * Absolute hex string starting with 0x like "0x12345678" does set
        the mask starting from left to right. If the given string is shorter
        than the mask it is padded with 0s on the right. If the string is
        longer than the mask an error comes back (EINVAL).
      * Relative format - a concatenation (done with ',') of the
        terms +<bitnr>[-<bitnr>] or -<bitnr>[-<bitnr>]. <bitnr> may be any
        valid number (hex, decimal or octal) in the range 0...255. Here are
        some examples:
          "+0-15,+32,-128,-0xFF"
          "-0-255,+1-16,+0x128"
          "+1,+2,+3,+4,-5,-7-10"
      
      A simple usage examples:
      
        # create new zcrypt device 'my_zcrypt':
        echo "my_zcrypt" >/sys/class/zcrypt/create
        # go into the device dir of this new device
        echo "my_zcrypt" >create
        cd my_zcrypt/
        ls -l
        total 0
        -rw-r--r-- 1 root root 4096 Jul 20 15:23 apmask
        -rw-r--r-- 1 root root 4096 Jul 20 15:23 aqmask
        -r--r--r-- 1 root root 4096 Jul 20 15:23 dev
        -rw-r--r-- 1 root root 4096 Jul 20 15:23 ioctlmask
        lrwxrwxrwx 1 root root    0 Jul 20 15:23 subsystem -> ../../../../class/zcrypt
        ...
        # customize this zcrypt node clone
        # enable only adapter 0 and 2
        echo "0xa0" >apmask
        # enable only domain 6
        echo "+6" >aqmask
        # enable all 256 ioctls
        echo "+0-255" >ioctls
        # now the /dev/my_zcrypt may be used
        # finally destroy it
        echo "my_zcrypt" >/sys/class/zcrypt/destroy
      
      Please note that a very similar 'filtering behavior' also applies to
      the parent z90crypt device. The two mask attributes apmask and aqmask
      in /sys/bus/ap act the very same for the z90crypt device node. However
      the implementation here is totally different as the ap bus acts on
      bind/unbind of queue devices and associated drivers but the effect is
      still the same. So there are two filters active for each additional
      zcrypt device node: The adapter/domain needs to be enabled on the ap
      bus level and it needs to be active on the zcrypt device node level.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      00fab235
  15. 20 9月, 2018 1 次提交
  16. 12 9月, 2018 1 次提交
  17. 21 8月, 2018 1 次提交
    • H
      s390/zcrypt: hex string mask improvements for apmask and aqmask. · 3d8f60d3
      Harald Freudenberger 提交于
      The sysfs attributes /sys/bus/ap/apmask and /sys/bus/ap/aqmask
      and the kernel command line arguments ap.apm and ap.aqm get
      an improvement of the value parsing with this patch:
      
      The mask values are bitmaps in big endian order starting with bit 0.
      So adapter number 0 is the leftmost bit, mask is 0x8000... The sysfs
      attributes and the kernel command line accept 2 different formats:
       - Absolute hex string starting with 0x like "0x12345678" does set
         the mask starting from left to right. If the given string is shorter
         than the mask it is padded with 0s on the right. If the string is
         longer than the mask an error comes back (EINVAL).
       - Relative format - a concatenation (done with ',') of the terms
         +<bitnr>[-<bitnr>] or -<bitnr>[-<bitnr>]. <bitnr> may be any
         valid number (hex, decimal or octal) in the range 0...255.
         Here are some examples:
           "+0-15,+32,-128,-0xFF"
           "-0-255,+1-16,+0x128"
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      3d8f60d3
  18. 20 8月, 2018 2 次提交
    • H
      s390/zcrypt: AP bus support for alternate driver(s) · 7e0bdbe5
      Harald Freudenberger 提交于
      The current AP bus, AP devices and AP device drivers implementation
      uses a clearly defined mapping for binding AP devices to AP device
      drivers. So for example a CEX6C queue will always be bound to the
      cex4queue device driver.
      
      The Linux Device Driver model has no sensitivity for more than one
      device driver eligible for one device type. If there exist more than
      one drivers matching to the device type, simple all drivers are tried
      consecutively.  There is no way to determine and influence the probing
      order of the drivers.
      
      With KVM there is a need to provide additional device drivers matching
      to the very same type of AP devices. With a simple implementation the
      KVM drivers run in competition to the regular drivers. Whichever
      'wins' a device depends on build order and implementation details
      within the common Linux Device Driver Model and is not
      deterministic. However, a userspace process could figure out which
      device should be bound to which driver and sort out the correct
      binding by manipulating attributes in the sysfs.
      
      If for security reasons a AP device must not get bound to the 'wrong'
      device driver the sorting out has to be done within the Linux kernel
      by the AP bus code. This patch modifies the behavior of the AP bus
      for probing drivers for devices in a way that two sets of drivers are
      usable. Two new bitmasks 'apmask' and 'aqmask' are used to mark a
      subset of the APQN range for 'usable by the ap bus and the default
      drivers' or 'not usable by the default drivers and thus available for
      alternate drivers like vfio-xxx'. So an APQN which is addressed by
      this masking only the default drivers will be probed. In contrary an
      APQN which is not addressed by the masks will never be probed and
      bound to default drivers but onny to alternate drivers.
      
      Eventually the two masks give a way to divide the range of APQNs into
      two pools: one pool of APQNs used by the AP bus and the default
      drivers and thus via zcrypt drivers available to the userspace of the
      system. And another pool where no zcrypt drivers are bound to and
      which can be used by alternate drivers (like vfio-xxx) for their
      needs. This division is hot-plug save and makes sure a APQN assigned
      to an alternate driver is at no time somehow exploitable by the wrong
      party.
      
      The two masks are located in sysfs at /sys/bus/ap/apmask and
      /sys/bus/ap/aqmask.  The mask syntax is exactly the same as the
      already existing mask attributes in the /sys/bus/ap directory (for
      example ap_usage_domain_mask and ap_control_domain_mask).
      
      By default all APQNs belong to the ap bus and the default drivers:
      
        cat /sys/bus/ap/apmask
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
        cat /sys/bus/ap/aqmask
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
      
      The masks can be changed at boot time with the kernel command line
      like this:
      
        ... ap.apmask=0xffff ap.aqmask=0x40
      
      This would give these two pools:
      
        default drivers pool:    adapter 0 - 15, domain 1
        alternate drivers pool:  adapter 0 - 15, all but domain 1
      			   adapter 16-255, all domains
      
      The sysfs attributes for this two masks are writeable and an
      administrator is able to reconfigure the assignements on the fly by
      writing new mask values into.  With changing the mask(s) a revision of
      the existing queue to driver bindings is done. So all APQNs which are
      bound to the 'wrong' driver are reprobed via kernel function
      device_reprobe() and thus the new correct driver will be assigned with
      respect of the changed apmask and aqmask bits.
      
      The mask values are bitmaps in big endian order starting with bit 0.
      So adapter number 0 is the leftmost bit, mask is 0x8000... The sysfs
      attributes accept 2 different formats:
      - Absolute hex string starting with 0x like "0x12345678" does set
        the mask starting from left to right. If the given string is shorter
        than the mask it is padded with 0s on the right. If the string is
        longer than the mask an error comes back (EINVAL).
      - '+' or '-' followed by a numerical value. Valid examples are "+1",
        "-13", "+0x41", "-0xff" and even "+0" and "-0". Only the addressed
        bit in the mask is switched on ('+') or off ('-').
      
      This patch will also be the base for an upcoming extension to the
      zcrypt drivers to be able to provide additional zcrypt device nodes
      with filtering based on ap and aq masks.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      7e0bdbe5
    • H
      s390/zcrypt: code beautify · ac2b96f3
      Harald Freudenberger 提交于
      Code beautify by following most of the checkpatch suggestions:
       - SPDX license identifier line complains by checkpatch
       - missing space or newline complains by checkpatch
       - octal numbers for permssions complains by checkpatch
       - renaming of static sysfs functions complains by checkpatch
       - fix of block comment complains by checkpatch
       - fix printf like calls where function name instead of %s __func__
         was used
       - __packed instead of __attribute__((packed))
       - init to zero for static variables removed
       - use of DEVICE_ATTR_RO and DEVICE_ATTR_RW macros
      
      No functional code changes or API changes!
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      ac2b96f3
  19. 16 8月, 2018 1 次提交
  20. 19 7月, 2018 1 次提交
  21. 25 6月, 2018 1 次提交
  22. 10 4月, 2018 3 次提交
  23. 24 11月, 2017 2 次提交
    • G
      s390: crypto: Remove redundant license text · 0b622e60
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all drivers/s390/crypto/ files, that
      identifies the license in a specific and legally-defined manner.  So the
      extra GPL text wording can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Harald Freudenberger <freude@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0b622e60
    • G
      s390: crypto: add SPDX identifiers to the remaining files · 812141a9
      Greg Kroah-Hartman 提交于
      It's good to have SPDX identifiers in all files to make it easier to
      audit the kernel tree for correct licenses.
      
      Update the drivers/s390/crypto/ files with the correct SPDX license
      identifier based on the license text in the file itself.  The SPDX
      identifier is a legally binding shorthand, which can be used instead of
      the full boiler plate text.
      
      This work is based on a script and data from Thomas Gleixner, Philippe
      Ombredanne, and Kate Stewart.
      
      Cc: Harald Freudenberger <freude@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      812141a9
  24. 14 11月, 2017 1 次提交
  25. 09 11月, 2017 1 次提交
  26. 23 10月, 2017 1 次提交
    • H
      s390/zcrypt: Introduce QACT support for AP bus devices. · 9a564108
      Harald Freudenberger 提交于
      This patch introduces a new ap_qact() function which
      exploits the PQAP(QACT) subfunction. QACT is a new
      interface to Query the Ap Compatilibity Type based
      on a given AP qid, type, mode and version.
      
      Based on this new function the AP bus scan code is
      slightly reworked to use this new interface for
      querying the compatible type for each new AP queue
      device detected. So new and unknown devices can
      get automatically mapped to a compatible type and
      handled without the need for toleration patches
      for every new hardware.
      
      The currently highest known hardware is CEX6S.
      With this patch a possible successor can get
      queried for a combatible type known by the device
      driver without the need for an toleration patch.
      Signed-off-by: NHarald Freudenberger <freude@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      9a564108
  27. 06 9月, 2017 2 次提交
  28. 12 6月, 2017 1 次提交
  29. 02 6月, 2017 1 次提交
    • H
      s390/zcrypt: Fix blocking queue device after unbind/bind. · e3850508
      Harald Freudenberger 提交于
      When the association between a queue device and the
      driver is released via unbind and later re-associated
      the queue device was not operational any more. Reason
      was a wrong administration of the card/queue lists
      within the ap device driver.
      
      This patch introduces revised card/queue list handling
      within the ap device driver: when an ap device is
      detected it is initial not added to the card/queue list
      any more. With driver probe the card device is added to
      the card list/the queue device is added to the queue list
      within a card. With driver remove the device is removed
      from the card/queue list. Additionally there are some
      situations within the ap device live where the lists
      need update upon card/queue device release (for example
      device hot unplug or suspend/resume).
      Signed-off-by: NHarald Freudenberger <freude@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      e3850508
  30. 23 2月, 2017 1 次提交
  31. 20 2月, 2017 2 次提交
  32. 26 12月, 2016 1 次提交
    • T
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner 提交于
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      8b0e1953
  33. 14 12月, 2016 2 次提交