1. 02 7月, 2015 2 次提交
    • L
      ACPICA: Tables: Enable both 32-bit and 64-bit FACS · c04e1fb4
      Lv Zheng 提交于
      ACPICA commit f7b86f35416e3d1f71c3d816ff5075ddd33ed486
      
      The following commit is reported to have broken s2ram on some platforms:
       Commit: 0249ed24
       ACPICA: Add option to favor 32-bit FADT addresses.
      The platform reports 2 FACS tables (which is not allowed by ACPI
      specification) and the new 32-bit address favor rule forces OSPMs to use
      the FACS table reported via FADT's X_FIRMWARE_CTRL field.
      
      The root cause of the reported bug might be one of the followings:
      1. BIOS may favor the 64-bit firmware waking vector address when the
         version of the FACS is greater than 0 and Linux currently only supports
         resuming from the real mode, so the 64-bit firmware waking vector has
         never been set and might be invalid to BIOS while the commit enables
         higher version FACS.
      2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the
         FADT while the commit doesn't set the firmware waking vector address of
         the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking
         vector address of the FACS reported by "X_FIRMWARE_CTRL".
      
      This patch excludes the cases that can trigger the bugs caused by the root
      cause 2.
      
      There is no handshaking mechanism can be used by OSPM to tell BIOS which
      FACS is currently used. Thus the FACS reported by "FIRMWARE_CTRL" may still
      be used by BIOS and the 0 value of the 32-bit firmware waking vector might
      trigger such failure.
      
      This patch tries to favor 32bit FACS address in another way where both the
      FACS reported by "FIRMWARE_CTRL" and the FACS reported by "X_FIRMWARE_CTRL"
      are loaded so that further commit can set firmware waking vector in the
      both tables to ensure we can exclude the cases that trigger the bugs caused
      by the root cause 2. The exclusion is split into 2 commits as this commit
      is also useful for dumping more ACPI tables, it won't get reverted when
      such exclusion is no longer necessary. Lv Zheng.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
      Link: https://github.com/acpica/acpica/commit/f7b86f35
      Cc: 3.14.1+ <stable@vger.kernel.org> # 3.14.1+
      Reported-and-tested-by: NOswald Buddenhagen <ossi@kde.org>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c04e1fb4
    • L
      ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS · aca2a5d3
      Lv Zheng 提交于
      ACPICA commit 7aa598d711644ab0de5f70ad88f1e2de253115e4
      
      The following commit is reported to have broken s2ram on some platforms:
       Commit: 0249ed24
       ACPICA: Add option to favor 32-bit FADT addresses.
      The platform reports 2 FACS tables (which is not allowed by ACPI
      specification) and the new 32-bit address favor rule forces OSPMs to use
      the FACS table reported via FADT's X_FIRMWARE_CTRL field.
      
      The root cause of the reported bug might be one of the followings:
      1. BIOS may favor the 64-bit firmware waking vector address when the
         version of the FACS is greater than 0 and Linux currently only supports
         resuming from the real mode, so the 64-bit firmware waking vector has
         never been set and might be invalid to BIOS while the commit enables
         higher version FACS.
      2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the
         FADT while the commit doesn't set the firmware waking vector address of
         the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking
         vector address of the FACS reported by "X_FIRMWARE_CTRL".
      
      This patch excludes the cases that can trigger the bugs caused by the root
      cause 1.
      
      ACPI specification says:
      A. 32-bit FACS address (FIRMWARE_CTRL field in FADT):
         Physical memory address of the FACS, where OSPM and firmware exchange
         control information.
         If the X_FIRMWARE_CTRL field contains a non zero value then this field
         must be zero.
         A zero value indicates that no FACS is specified by this field.
      B. 64-bit FACS address (X_FIRMWARE_CTRL field in FADT):
         64bit physical memory address of the FACS.
         This field is used when the physical address of the FACS is above 4GB.
         If the FIRMWARE_CTRL field contains a non zero value then this field
         must be zero.
         A zero value indicates that no FACS is specified by this field.
      Thus the 32bit and 64bit firmware waking vector should indicate completely
      different resuming environment - real mode (1MB addressable) and non real
      mode (4GB+ addressable) and currently Linux only supports resuming from
      real mode.
      
      This patch enables 64-bit firmware waking vector for selected FACS via new
      acpi_set_firmware_waking_vectors() API so that it's up to OSPMs to
      determine which resuming mode should be used by BIOS and ACPICA changes
      won't trigger the bugs caused by the root cause 1. Lv Zheng.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
      Link: https://github.com/acpica/acpica/commit/7aa598d7Reported-and-tested-by: NOswald Buddenhagen <ossi@kde.org>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      aca2a5d3
  2. 25 6月, 2015 1 次提交
  3. 23 6月, 2015 1 次提交
  4. 22 5月, 2015 8 次提交
  5. 13 5月, 2015 1 次提交
  6. 04 5月, 2015 1 次提交
    • W
      ACPI / PNP: add two IDs to list for PNPACPI device enumeration · 622532bb
      Witold Szczeponik 提交于
      Commit eec15edb (ACPI / PNP: use device ID list for PNPACPI device
      enumeration) changed the way how ACPI devices are enumerated and when
      they are added to the PNP bus.
      
      However, it broke the sound card support on (at least) a vintage
      IBM ThinkPad 600E: with said commit applied, two of the necessary
      "CSC01xx" devices are not added to the PNP bus and hence can not be
      found during the initialization of the "snd-cs4236" module.  As a
      consequence, loading "snd-cs4236" causes null pointer exceptions.
      The attached patch fixes the problem end re-enables sound on the
      IBM ThinkPad 600E.
      
      Fixes: eec15edb (ACPI / PNP: use device ID list for PNPACPI device enumeration)
      Signed-off-by: NWitold Szczeponik <Witold.Szczeponik@gmx.net>
      Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      622532bb
  7. 01 5月, 2015 2 次提交
  8. 29 4月, 2015 1 次提交
  9. 24 4月, 2015 2 次提交
    • R
      ACPI / scan: Add a scan handler for PRP0001 · 7d284352
      Rafael J. Wysocki 提交于
      If the special PRP0001 device ID is present in the given device's list
      of ACPI/PNP IDs and the device has a valid "compatible" property in
      the _DSD, it should be enumerated using the default mechanism,
      unless some scan handlers match the IDs preceding PRP0001 in the
      device's list of ACPI/PNP IDs.  In addition to that, no scan handlers
      matching the IDs following PRP0001 in that list should be attached
      to the device.
      
      To make that happen, define a scan handler that will match PRP0001
      and trigger the default enumeration for the matching devices if the
      "compatible" property is present for them.
      
      Since that requires the check for platform_id and device->handler
      to be removed from acpi_default_enumeration(), move the fallback
      invocation of acpi_default_enumeration() to acpi_bus_attach()
      (after it's checked if there's a matching ACPI driver for the
      device), which is a better place to call it, and do the platform_id
      check in there too (device->handler is guaranteed to be unset at
      the point where the function is looking for a matching ACPI driver).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NDarren Hart <dvhart@linux.intel.com>
      7d284352
    • R
      ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline() · 4c533c80
      Rafael J. Wysocki 提交于
      acpi_scan_is_offline() may be called under the physical_node_lock
      lock of the given device object's parent, so prevent lockdep from
      complaining about that by annotating that instance with
      SINGLE_DEPTH_NESTING.
      
      Fixes: caa73ea1 (ACPI / hotplug / driver core: Handle containers in a special way)
      Reported-and-tested-by: NXie XiuQi <xiexiuqi@huawei.com>
      Reviewed-by: NToshi Kani <toshi.kani@hp.com>
      Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4c533c80
  10. 22 4月, 2015 1 次提交
  11. 15 4月, 2015 2 次提交
    • R
      ACPICA: Store GPE register enable masks upfront · 0ee0d349
      Rafael J. Wysocki 提交于
      It is reported that ACPI interrupts do not work any more on
      Dell Latitude D600 after commit c50f13c6 (ACPICA: Save
      current masks of enabled GPEs after enable register writes).
      The problem turns out to be related to the fact that the
      enable_mask and enable_for_run GPE bit masks are not in
      sync (in the absence of any system suspend/resume events)
      for at least one GPE register on that machine.
      
      Address this problem by writing the enable_for_run mask into
      enable_mask as soon as enable_for_run is updated instead of
      doing that only after the subsequent register write has
      succeeded.  For consistency, update acpi_hw_gpe_enable_write()
      to store the bit mask to be written into the GPE register
      in enable_mask unconditionally before the write.
      
      Since the ACPI_GPE_SAVE_MASK flag is not necessary any more after
      that, drop it along with the symbols depending on it.
      Reported-and-tested-by: NJim Bos <jim876@xs4all.nl>
      Fixes: c50f13c6 (ACPICA: Save current masks of enabled GPEs after enable register writes)
      Cc: 3.19+ <stable@vger.kernel.org> # 3.19+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0ee0d349
    • K
      ACPI / battery: Fix doubly added battery on system suspend · 31f7dc79
      Krzysztof Kozlowski 提交于
      Commit 297d716f ("power_supply: Change ownership from driver to
      core") inverted the logic in battery_notify().  As an effect already
      present battery was re-added on each system suspend or hibernation.
      
          WARNING: CPU: 0 PID: 303 at ../fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x80()
          sysfs: cannot create duplicate filename '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0C0A:00/power_supply/BAT0'
          CPU: 0 PID: 303 Comm: rtcwake Not tainted 4.0.0-ARCH-02621-g07e6253af953 #48
          Call Trace:
            sysfs_create_dir_ns+0x8d/0xa0
            kobject_add_internal+0xb6/0x370
            kobject_add+0x6f/0xd0
            device_add+0x120/0x6c0
            __power_supply_register+0x145/0x290
            power_supply_register_no_ws+0x10/0x20
            sysfs_add_battery+0x84/0xc5 [battery]
            battery_notify+0x45/0x6b [battery]
            notifier_call_chain+0x4f/0x80
            __blocking_notifier_call_chain+0x4b/0x70
            blocking_notifier_call_chain+0x16/0x20
            pm_notifier_call_chain+0x1a/0x40
            pm_suspend+0x3ed/0x4e0
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-By: NSebastian Reichel <sre@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31f7dc79
  12. 14 4月, 2015 18 次提交