1. 20 8月, 2017 1 次提交
  2. 18 8月, 2017 5 次提交
    • L
      ACPI: EC: Fix possible issues related to EC initialization order · 69b957c2
      Lv Zheng 提交于
      Use the observation that the EC command/data register addresses are
      sufficient to determine if two EC devices are equivelent to modify
      acpi_is_boot_ec().
      
      Then, for the removed comparison factors, EC ID and EC GPE, they need
      to be synchronized for the boot_ec:
      
       1. Before registering the BIOS-provided EC event handlers in
          acpi_ec_register_query_methods(), the namespace node holding
          _Qxx methods should be located.  The real namespace PNP0C09
          device location then is apparently more trustworthy than the
          ECDT EC ID.
      
       2. Because of the ASUS quirks, the ECDT EC GPE is more trustworthy
          than the namespace PNP0C09 device's _GPE setting.
      
      Use the above observations to synchronize the boot_ec settings in
      acpi_ec_add().
      
      Finally, change the order of acpi_ec_ecdt_start() and acpi_ec_add(),
      called from acpi_bus_register_driver(), so as to follow the fast path
      of determining the location of _Qxx.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      [ rjw : Changelog & comments ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      69b957c2
    • R
      ACPI / scan: Enable GPEs before scanning the namespace · eb7f43c4
      Rafael J. Wysocki 提交于
      On some systems the platform firmware expects GPEs to be enabled
      before the enumeration of devices and if that expectation is not
      met, the systems in question may not boot in some situations.
      
      For this reason, change the initialization ordering of the ACPI
      subsystem to make it enable GPEs before scanning the namespace
      for the first time in order to enumerate devices.
      Reported-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Suggested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      eb7f43c4
    • R
      ACPICA: Make it possible to enable runtime GPEs earlier · 1312b7e0
      Rafael J. Wysocki 提交于
      Runtime GPEs have corresponding _Lxx/_Exx methods and are enabled
      automatically during the initialization of the ACPI subsystem through
      acpi_update_all_gpes() with the assumption that acpi_setup_gpe_for_wake()
      will be called in advance for all of the GPEs pointed to by _PRW
      objects in the namespace that may be affected by acpi_update_all_gpes().
      That is, acpi_ev_initialize_gpe_block() can only be called for a GPE
      block after acpi_setup_gpe_for_wake() has been called for all of the
      _PRW (wakeup) GPEs in it.
      
      The platform firmware on some systems, however, expects GPEs to be
      enabled before the enumeration of devices which is when
      acpi_setup_gpe_for_wake() is called and that goes against the above
      assumption.
      
      For this reason, introduce a new flag to be set by
      acpi_ev_initialize_gpe_block() when automatically enabling a GPE
      to indicate to acpi_setup_gpe_for_wake() that it needs to drop the
      reference to the GPE coming from acpi_ev_initialize_gpe_block()
      and modify acpi_setup_gpe_for_wake() accordingly.  These changes
      allow acpi_setup_gpe_for_wake() and acpi_ev_initialize_gpe_block()
      to be invoked in any order.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      1312b7e0
    • R
      ACPICA: Dispatch active GPEs at init time · ecc1165b
      Rafael J. Wysocki 提交于
      In some cases GPEs are already active when they are enabled by
      acpi_ev_initialize_gpe_block() and whatever happens next may depend
      on the result of handling the events signaled by them, so the
      events should not be discarded (which is what happens currently) and
      they should be handled as soon as reasonably possible.
      
      For this reason, modify acpi_ev_initialize_gpe_block() to
      dispatch GPEs with the status flag set in-band right after
      enabling them.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      ecc1165b
    • L
      ACPI: EC: Fix regression related to wrong ECDT initialization order · 98529b92
      Lv Zheng 提交于
      Commit 2a570840 (ACPI / EC: Fix a gap that ECDT EC cannot handle
      EC events) introduced acpi_ec_ecdt_start(), but that function is
      invoked before acpi_ec_query_init(), which is too early.  This causes
      the kernel to crash if an EC event occurs after boot, when ec_query_wq
      is not valid:
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000102
       ...
       Workqueue: events acpi_ec_event_handler
       task: ffff9f539790dac0 task.stack: ffffb437c0e10000
       RIP: 0010:__queue_work+0x32/0x430
      
      Normally, the DSDT EC should always be valid, so acpi_ec_ecdt_start()
      is actually a no-op in the majority of cases.  However, commit
      c712bb58 (ACPI / EC: Add support to skip boot stage DSDT probe)
      caused the probing of the DSDT EC as the "boot EC" to be skipped when
      the ECDT EC is valid and uncovered the bug.
      
      Fix this issue by invoking acpi_ec_ecdt_start() after acpi_ec_query_init()
      in acpi_ec_init().
      
      Link: https://jira01.devtools.intel.com/browse/LCK-4348
      Fixes: 2a570840 (ACPI / EC: Fix a gap that ECDT EC cannot handle EC events)
      Fixes: c712bb58 (ACPI / EC: Add support to skip boot stage DSDT probe)
      Reported-by: NWang Wendy <wendy.wang@intel.com>
      Tested-by: NFeng Chenzhou <chenzhoux.feng@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      [ rjw: Changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      98529b92
  3. 30 7月, 2017 2 次提交
    • T
      tty: pl011: fix initialization order of QDF2400 E44 · 37ef38f3
      Timur Tabi 提交于
      The work-around for Qualcomm Technologies QDF2400 Erratum 44 hinges on a
      global variable defined in the pl011 driver.  The ACPI SPCR parsing code
      determines whether the work-around is needed, and if so, it changes the
      console name from "pl011" to "qdf2400_e44".  The expectation is that
      the pl011 driver will implement the work-around when it sees the console
      name.  The global variable qdf2400_e44_present is set when that happens.
      
      The problem is that work-around needs to be enabled when the pl011
      driver probes, not when the console name is queried.  However, sbsa_probe()
      is called before pl011_console_match().  The work-around appeared to work
      previously because the default console on QDF2400 platforms was always
      ttyAMA1.  The first time sbsa_probe() is called (for ttyAMA0),
      qdf2400_e44_present is still false.  Then pl011_console_match() is called,
      and it sets qdf2400_e44_present to true.  All subsequent calls to
      sbsa_probe() enable the work-around.
      
      The solution is to move the global variable into spcr.c and let the
      pl011 driver query it during probe time.  This works because all QDF2400
      platforms require SPCR, so parse_spcr() will always be called.
      pl011_console_match still checks for the "qdf2400_e44" console name,
      but it doesn't do anything else special.
      
      Fixes: 5a0722b8 ("tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44")
      Tested-by: NJeffrey Hugo <jhugo@codeaurora.org>
      Signed-off-by: NTimur Tabi <timur@codeaurora.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      37ef38f3
    • H
      ACPI: APD: Fix HID for Hisilicon Hip07/08 · f7f3dd5b
      Hanjun Guo 提交于
      ACPI HID for Hisilicon Hip07/08 should be HISI02A1/2,
      not HISI0A21/2, HISI02A1/2 was tested ok but was modified
      by the stupid typo when upstream the patches (by me),
      correct them to the right IDs (matching the IDs in
      drivers/i2c/busses/i2c-designware-platdrv.c).
      
      Fixes: 6e14cf36 (ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller)
      Reported-by: NTao Tian <tiantao6@huawei.com>
      Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f7f3dd5b
  4. 26 7月, 2017 1 次提交
  5. 25 7月, 2017 1 次提交
  6. 20 7月, 2017 1 次提交
    • R
      ACPI / PM / EC: Flush all EC work in acpi_freeze_sync() · 880a6627
      Rafael J. Wysocki 提交于
      Commit eed4d47e (ACPI / sleep: Ignore spurious SCI wakeups from
      suspend-to-idle) introduced acpi_freeze_sync() whose purpose is to
      flush all of the processing of possible wakeup events signaled via
      the ACPI SCI.  However, it doesn't flush the query workqueue used
      by the EC driver, so the events generated by the EC may not be
      processed timely which leads to issues (increased overhead at least,
      lost events possibly).
      
      To fix that introduce acpi_ec_flush_work() that will flush all of
      the outstanding EC work and call it from acpi_freeze_sync().
      
      Fixes: eed4d47e (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      880a6627
  7. 19 7月, 2017 1 次提交
    • R
      ACPI / EC: Add parameter to force disable the GPE on suspend · 76380636
      Rafael J. Wysocki 提交于
      After commit 8110dd28 (ACPI / sleep: EC-based wakeup from
      suspend-to-idle on recent systems) the configuration of GPEs,
      including the EC one, is not changed during suspend-to-idle on
      recent systems.  That's in order to make system wakeup events
      generated by the EC work, in particular.
      
      However, on some of the systems in question (for example on Dell
      XPS13 9365), in addition to generating system wakeup events the
      EC generates a heartbeat sequence of interrupts that have nothing
      to do with wakeup while suspended, and the Low Power Idle S0 _DSM
      interface doesn't change that behavior.
      
      The users of those systems may prefer to disable the EC GPE during
      system suspend, for the cost of non-functional power button wakeup
      or similar, but currently there is no way to do that.
      
      For this reason, add a new module parameter, ec_no_wakeup, for the
      EC driver module that, if set, will cause the EC GPE to be disabled
      during system suspend and re-enabled during the subsequent system
      resume.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=192591#c106
      Amends: 8110dd28 (ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems)
      Reported-and-tested-by: NPatrik Kullman <patrik.kullman@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      76380636
  8. 18 7月, 2017 1 次提交
  9. 12 7月, 2017 6 次提交
  10. 07 7月, 2017 1 次提交
  11. 05 7月, 2017 9 次提交
  12. 03 7月, 2017 1 次提交
  13. 01 7月, 2017 3 次提交
  14. 30 6月, 2017 1 次提交
  15. 29 6月, 2017 5 次提交
  16. 28 6月, 2017 1 次提交