1. 28 2月, 2017 2 次提交
  2. 25 2月, 2017 1 次提交
  3. 21 2月, 2017 1 次提交
    • A
      cxl: fix nested locking hang during EEH hotplug · 171ed0fc
      Andrew Donnellan 提交于
      Commit 14a3ae34 ("cxl: Prevent read/write to AFU config space while AFU
      not configured") introduced a rwsem to fix an invalid memory access that
      occurred when someone attempts to access the config space of an AFU on a
      vPHB whilst the AFU is deconfigured, such as during EEH recovery.
      
      It turns out that it's possible to run into a nested locking issue when EEH
      recovery fails and a full device hotplug is required.
      cxl_pci_error_detected() deconfigures the AFU, taking a writer lock on
      configured_rwsem. When EEH recovery fails, the EEH code calls
      pci_hp_remove_devices() to remove the device, which in turn calls
      cxl_remove() -> cxl_pci_remove_afu() -> pci_deconfigure_afu(), which tries
      to grab the writer lock that's already held.
      
      Standard rwsem semantics don't express what we really want to do here and
      don't allow for nested locking. Fix this by replacing the rwsem with an
      atomic_t which we can control more finely. Allow the AFU to be locked
      multiple times so long as there are no readers.
      
      Fixes: 14a3ae34 ("cxl: Prevent read/write to AFU config space while AFU not configured")
      Cc: stable@vger.kernel.org # v4.9+
      Signed-off-by: NAndrew Donnellan <andrew.donnellan@au1.ibm.com>
      Acked-by: NFrederic Barrat <fbarrat@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      171ed0fc
  4. 12 2月, 2017 1 次提交
    • B
      misc: eeprom: at24: use device_property_*() functions instead of of_get_property() · dd905a61
      Ben Gardner 提交于
      Allow the at24 driver to get configuration information from both OF and
      ACPI by using the more generic device_property functions.
      This change was inspired by the at25.c driver.
      
      I have a custom board with a ST M24C02 EEPROM attached to an I2C bus.
      With the following ACPI construct, this patch instantiates a working
      instance of the driver.
      
      Device (EEP0) {
       Name (_HID, "PRP0001")
       Name (_DSD, Package () {
        ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
        Package () {
         Package () {"compatible", Package () {"st,24c02"}},
         Package () {"pagesize", 16},
        },
       })
       Name (_CRS, ResourceTemplate () {
        I2cSerialBus (
         0x0057, ControllerInitiated, 400000,
         AddressingMode7Bit, "\\_SB.PCI0.I2C3", 0x00,
         ResourceConsumer,,)
       })
      }
      Signed-off-by: NBen Gardner <gardner.ben@gmail.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      dd905a61
  5. 10 2月, 2017 11 次提交
  6. 03 2月, 2017 5 次提交
  7. 31 1月, 2017 10 次提交
  8. 27 1月, 2017 2 次提交
  9. 25 1月, 2017 7 次提交