1. 18 6月, 2018 1 次提交
  2. 25 5月, 2018 1 次提交
    • R
      ACPI: EC: Dispatch the EC GPE directly on s2idle wake · 68e22011
      Rafael J. Wysocki 提交于
      On platforms where the Low Power S0 Idle _DSM interface is used,
      on wakeup from suspend-to-idle, when it is known that the ACPI SCI
      has triggered while suspended, dispatch the EC GPE in order to catch
      all EC events that may have triggered the wakeup before carrying out
      the noirq phase of device resume.
      
      That is needed to handle power button wakeup on some platforms where
      the EC goes into a low-power mode during suspend-to-idle and while in
      that mode it will discard events after a timeout.  If that timeout is
      shorter than the time it takes to complete the noirq resume of
      devices, looking for EC events after the latter is too late.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reported-by: NZhang Rui <rui.zhang@intel.com>
      Tested-by: NWendy Wang <wendy.wang@intel.com>
      68e22011
  3. 12 2月, 2018 1 次提交
  4. 04 1月, 2018 1 次提交
  5. 21 11月, 2017 1 次提交
    • L
      ACPI / EC: Fix regression related to PM ops support in ECDT device · a64a62ce
      Lv Zheng 提交于
      On platforms (ASUS X550ZE and possibly all ASUS X series) with valid ECDT
      EC but invalid DSDT EC, EC PM ops won't be invoked as ECDT EC is not an
      ACPI device. Thus the following commit actually removed post-resume
      acpi_ec_enable_event() invocation for such platforms, and triggered a
      regression on them that after being resumed, EC (actually should be ECDT)
      driver stops handling EC events:
      
       Commit: c2b46d67
       Subject: ACPI / EC: Add PM operations to improve event handling for resume process
      
      Notice that the root cause actually is "ECDT is not an ACPI device" rather
      than "the timing of acpi_ec_enable_event() invocation", this patch fixes
      this issue by enumerating ECDT EC as an ACPI device. Due to the existence
      of the noirq stage, the ability of tuning the timing of
      acpi_ec_enable_event() invocation is still meaningful.
      
      This patch is a little bit different from the posted fix by moving
      acpi_config_boot_ec() from acpi_ec_ecdt_start() to acpi_ec_add() to make
      sure that EC event handling won't be stopped as long as the ACPI EC driver
      is bound. Thus the following sequence shouldn't disable EC event handling:
      unbind,suspend,resume,bind.
      
      Fixes: c2b46d67 (ACPI / EC: Add PM operations to improve event handling for resume process)
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=196847Reported-by: NLuya Tshimbalanga <luya@fedoraproject.org>
      Tested-by: NLuya Tshimbalanga <luya@fedoraproject.org>
      Cc: 4.9+ <stable@vger.kernel.org> # 4.9+
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a64a62ce
  6. 09 11月, 2017 1 次提交
  7. 31 10月, 2017 1 次提交
    • K
      treewide: Fix function prototypes for module_param_call() · e4dca7b7
      Kees Cook 提交于
      Several function prototypes for the set/get functions defined by
      module_param_call() have a slightly wrong argument types. This fixes
      those in an effort to clean up the calls when running under type-enforced
      compiler instrumentation for CFI. This is the result of running the
      following semantic patch:
      
      @match_module_param_call_function@
      declarer name module_param_call;
      identifier _name, _set_func, _get_func;
      expression _arg, _mode;
      @@
      
       module_param_call(_name, _set_func, _get_func, _arg, _mode);
      
      @fix_set_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._set_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _set_func(
      -_val_type _val
      +const char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      @fix_get_prototype
       depends on match_module_param_call_function@
      identifier match_module_param_call_function._get_func;
      identifier _val, _param;
      type _val_type, _param_type;
      @@
      
       int _get_func(
      -_val_type _val
      +char * _val
       ,
      -_param_type _param
      +const struct kernel_param * _param
       ) { ... }
      
      Two additional by-hand changes are included for places where the above
      Coccinelle script didn't notice them:
      
      	drivers/platform/x86/thinkpad_acpi.c
      	fs/lockd/svc.c
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NJessica Yu <jeyu@kernel.org>
      e4dca7b7
  8. 14 9月, 2017 1 次提交
  9. 20 8月, 2017 1 次提交
  10. 18 8月, 2017 2 次提交
    • 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
    • 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
  11. 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
  12. 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
  13. 12 7月, 2017 2 次提交
  14. 29 6月, 2017 4 次提交
  15. 28 6月, 2017 2 次提交
    • L
      ACPI: EC: Fix EC command visibility for dynamic debug · 4625d752
      Lv Zheng 提交于
      acpi_ec_cmd_string() currently is only enabled for "DEBUG" macro, but users
      trend to use CONFIG_DYNAMIC_DEBUG and enable ec.c pr_debug() print-outs by
      "dyndbg='file ec.c +p'". In this use case, all command names are turned
      into UNDEF and the log is confusing. This affects bugzilla triage work.
      
      This patch fixes this issue by enabling acpi_ec_cmd_string() for
      CONFIG_DYNAMIC_DEBUG.
      Tested-by: NWang Wendy <wendy.wang@intel.com>
      Tested-by: NFeng Chenzhou <chenzhoux.feng@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4625d752
    • L
      ACPI: EC: Fix an EC event IRQ storming issue · 1ab69f27
      Lv Zheng 提交于
      The EC event IRQ (SCI_EVT) can only be handled by submitting QR_EC. As the
      EC driver handles SCI_EVT in a workqueue, after SCI_EVT is flagged and
      before QR_EC is submitted, there is a period risking IRQ storming. EC IRQ
      must be masked for this period but linux EC driver never does so.
      
      No end user notices the IRQ storming and no developer fixes this known
      issue because:
      
       1. The EC IRQ is always edge triggered GPE, and
       2. The kernel can execute no-op EC IRQ handler very fast.
      
      For edge-triggered EC GPE platforms, it is only reported of post-resume EC
      event lost issues, there won't be an IRQ storming. For level triggered EC
      GPE platforms, fortunately the kernel is always fast enough to execute such
      a no-op EC IRQ handler so that the IRQ handler won't be accumulated to
      starve the task contexts, causing a real IRQ storming.
      
      But the IRQ storming actually can still happen when:
      
       1. The EC IRQ performs like level triggered GPE, and
       2. The kernel EC debugging log is turned on but the console is slow enough.
      
      There are more and more platforms using EC GPE as wake GPE where the EC GPE
      is likely designed as level triggered. Then when EC debugging log is
      enabled, the EC IRQ handler is no longer a no-op but dumps IRQ status to
      the consoles. If the consoles are slow enough, the EC IRQs can arrive much
      faster than executing the handler. Finally the accumulated EC event IRQ
      handlers starve the task contexts, causing the IRQ storming to occur, and
      the kernel hangs can be observed during boot/resume.
      
      This patch fixes this issue by masking EC IRQ for this period:
      
       1. Begins when there is an SCI_EVT IRQ pending, and
       2. Ends when there is a QR_EC completed (SCI_EVT acknowledged).
      Tested-by: NWang Wendy <wendy.wang@intel.com>
      Tested-by: NFeng Chenzhou <chenzhoux.feng@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1ab69f27
  16. 23 6月, 2017 1 次提交
    • R
      ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems · 8110dd28
      Rafael J. Wysocki 提交于
      Some recent Dell laptops, including the XPS13 model numbers 9360 and
      9365, cannot be woken up from suspend-to-idle by pressing the power
      button which is unexpected and makes that feature less usable on
      those systems.  Moreover, on the 9365 ACPI S3 (suspend-to-RAM) is
      not expected to be used at all (the OS these systems ship with never
      exercises the ACPI S3 path in the firmware) and suspend-to-idle is
      the only viable system suspend mechanism there.
      
      The reason why the power button wakeup from suspend-to-idle doesn't
      work on those systems is because their power button events are
      signaled by the EC (Embedded Controller), whose GPE (General Purpose
      Event) line is disabled during suspend-to-idle transitions in Linux.
      That is done on purpose, because in general the EC tends to be noisy
      for various reasons (battery and thermal updates and similar, for
      example) and all events signaled by it would kick the CPUs out of
      deep idle states while in suspend-to-idle, which effectively might
      defeat its purpose.
      
      Of course, on the Dell systems in question the EC GPE must be enabled
      during suspend-to-idle transitions for the button press events to
      be signaled while suspended at all, but fortunately there is a way
      out of this puzzle.
      
      First of all, those systems have the ACPI_FADT_LOW_POWER_S0 flag set
      in their ACPI tables, which means that the OS is expected to prefer
      the "low power S0 idle" system state over ACPI S3 on them.  That
      causes the most recent versions of other OSes to simply ignore ACPI
      S3 on those systems, so it is reasonable to expect that it should not
      be necessary to block GPEs during suspend-to-idle on them.
      
      Second, in addition to that, the systems in question provide a special
      firmware interface that can be used to indicate to the platform that
      the OS is transitioning into a system-wide low-power state in which
      certain types of activity are not desirable or that it is leaving
      such a state and that (in principle) should allow the platform to
      adjust its operation mode accordingly.
      
      That interface is a special _DSM object under a System Power
      Management Controller device (PNP0D80).  The expected way to use it
      is to invoke function 0 from it on system initialization, functions
      3 and 5 during suspend transitions and functions 4 and 6 during
      resume transitions (to reverse the actions carried out by the
      former).  In particular, function 5 from the "Low-Power S0" device
      _DSM is expected to cause the platform to put itself into a low-power
      operation mode which should include making the EC less verbose (so to
      speak).  Next, on resume, function 6 switches the platform back to
      the "working-state" operation mode.
      
      In accordance with the above, modify the ACPI suspend-to-idle code
      to look for the "Low-Power S0" _DSM interface on platforms with the
      ACPI_FADT_LOW_POWER_S0 flag set in the ACPI tables.  If it's there,
      use it during suspend-to-idle transitions as prescribed and avoid
      changing the GPE configuration in that case.  [That should reflect
      what the most recent versions of other OSes do.]
      
      Also modify the ACPI EC driver to make it handle events during
      suspend-to-idle in the usual way if the "Low-Power S0" _DSM interface
      is going to be used to make the power button events work while
      suspended on the Dell machines mentioned above
      
      Link: http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdfSigned-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8110dd28
  17. 22 6月, 2017 1 次提交
  18. 30 1月, 2017 2 次提交
  19. 10 10月, 2016 1 次提交
  20. 10 9月, 2016 4 次提交
  21. 31 8月, 2016 5 次提交
    • L
      ACPI / EC: Enable event freeze mode to improve event handling for suspend process · d3028305
      Lv Zheng 提交于
      This patch enables the event freeze mode, flushing the EC event handling in
      .suspend() callback. This feature is experimental, if it is bisected out to
      be the cause of the real issues, please report the issues to the kernel
      bugzilla for further root causing and improvement.
      
      This mode eliminates useless _Qxx handling during the power saving
      operations, thus can help to tune the power saving operations faster. Tests
      show that this mode can efficiently block flooding _Qxx during the suspend
      process and tune the speed of the suspend faster.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d3028305
    • L
      ACPI / EC: Add PM operations to improve event handling for suspend process · 39a2a2aa
      Lv Zheng 提交于
      In the original EC driver, though the event handling is not explicitly
      stopped, the EC driver is actually not able to handle events during the
      noirq stage as the EC driver is not prepared to handle the EC events in the
      polling mode. So if there is no advance_transaction() triggered, the EC
      driver couldn't notice the EC events.
      However, do we actually need to handle EC events during suspend/resume
      stage? EC events are mostly useless for the suspend/resume period (key
      strokes and battery/thermal updates, etc.,), and the useful ones (lid
      close, power/sleep button press) should have already been delivered to the
      OSPM to trigger the power saving operations.
      Thus this patch implements acpi_ec_disable_event() to be a reverse call of
      acpi_ec_enable_event(), with which, the EC driver is able to stop handling
      the EC events in a position before entering the noirq stage.
      
      Since there are actually 2 choices for us:
      1. implement event handling in polling mode;
      2. stop event handling before entering noirq stage.
      And this patch only implements the second choice using .suspend() callback.
      Thus this is experimental (first choice is better? or different hook
      position is better?). This patch finally keeps the old behavior by default
      and prepares a boot parameter to enable this feature.
      
      The differences of the event handling availability between the old behavior
      (this patch is not applied) and the new behavior (this patch is applied)
      are as follows:
                              !FreezeEvents   FreezeEvents
      before suspend          Y               Y
      suspend before EC       Y               Y
      suspend after EC        Y               N
      suspend_late            Y               N
      suspend_noirq           Y (actually N)  N
      resume_noirq            Y (actually N)  N
      resume_late             Y (actually N)  N
      resume before EC        Y (actually N)  N
      resume after EC         Y               Y
      after resume            Y               Y
      Where "actually N" means if there is no EC transactions, the EC driver
      is actually not able to notice the pending events.
      
      We can see that FreezeEvents is the only approach now can actually flush
      the EC event handling with both query commands and _Qxx evaluations
      flushed, other modes can only flush the EC event handling with only query
      commands flushed, _Qxx evaluations occurred after stopping the EC driver
      may end up failure due to the failure of the EC transaction carried out in
      the _Qxx control methods.
      
      We also can see that this feature should be able to trigger some platform
      notifications later than resuming other drivers.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      39a2a2aa
    • L
      ACPI / EC: Add PM operations to improve event handling for resume process · c2b46d67
      Lv Zheng 提交于
      This patch makes 2 changes:
      
      1. Restore old behavior
      Originally, EC driver stops handling both events and transactions in
      acpi_ec_block_transactions(), and restarts to handle transactions in
      acpi_ec_unblock_transactions_early(), restarts to handle both events and
      transactions in acpi_ec_unblock_transactions().
      While currently, EC driver still stops handling both events and
      transactions in acpi_ec_block_transactions(), but restarts to handle both
      events and transactions in acpi_ec_unblock_transactions_early().
      This patch tries to restore the old behavior by dropping
      __acpi_ec_enable_event() from acpi_unblock_transactions_early().
      
      2. Improve old behavior
      However this still cannot fix the real issue as both of the
      acpi_ec_unblock_xxx() functions are invoked in the noirq stage. Since the
      EC driver actually doesn't implement the event handling in the polling
      mode, re-enabling the event handling too early in the noirq stage could
      result in the problem that if there is no triggering source causing
      advance_transaction() to be invoked, pending SCI_EVT cannot be detected by
      the EC driver and _Qxx cannot be triggered.
      It actually makes sense to restart the event handling in any point during
      resuming after the noirq stage. Just like the boot stage where the event
      handling is enabled in .add(), this patch further moves
      acpi_ec_enable_event() to .resume(). After doing that, the following 2
      functions can be combined:
      acpi_ec_unblock_transactions_early()/acpi_ec_unblock_transactions().
      
      The differences of the event handling availability between the old behavior
      (this patch isn't applied) and the new behavior (this patch is applied) are
      as follows:
                              !Applied        Applied
      before suspend          Y               Y
      suspend before EC       Y               Y
      suspend after EC        Y               Y
      suspend_late            Y               Y
      suspend_noirq           Y (actually N)  Y (actually N)
      resume_noirq            Y (actually N)  Y (actually N)
      resume_late             Y (actually N)  Y (actually N)
      resume before EC        Y (actually N)  Y (actually N)
      resume after EC         Y (actually N)  Y
      after resume            Y (actually N)  Y
      Where "actually N" means if there is no triggering source, the EC driver
      is actually not able to notice the pending SCI_EVT occurred in the noirq
      stage. So we can clearly see that this patch has improved the situation.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c2b46d67
    • L
      ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled · e923e8e7
      Lv Zheng 提交于
      After enabling the EC event handling, Linux is still in the noirq stage, if
      there is no triggering source (EC transaction, GPE STS status),
      advance_transaction() will not be invoked and SCI_EVT cannot be detected.
      This patch adds one more triggering source after enabling the EC event
      handling to poll the pending SCI_EVT.
      
      Known issues:
      1. Still no SCI_EVT triggering source
         There could still be no SCI_EVT triggering source after handling the
         first SCI_EVT (polled by this patch if any). Because after handling the
         first SCI_EVT, Linux could still be in noirq stage and there could still
         be no further triggering source in this stage. Then the second SCI_EVT
         indicated during this stage still cannot be detected by the EC driver.
         With this improvement applied, it is then possible to move
         acpi_ec_enable_event() out of the noirq stage to fix this issue (if the
         first SCI_EVT is handled out of the noirq stage, the follow-up SCI_EVTs
         should be able to trigger IRQs).
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e923e8e7
    • L
      ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic · 750f628b
      Lv Zheng 提交于
      There is a hidden logic in the EC driver:
      1. During boot, EC_FLAGS_QUERY_PENDING is responsible for blocking event
         handling;
      2. During suspend, EC_FLAGS_STARTED is responsible for blocking event
         handling.
      This patch uses a new EC_FLAGS_QUERY_ENABLED flag to make this hidden
      logic explicit and have code cleaned up. No functional change.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      750f628b
  22. 17 8月, 2016 1 次提交
  23. 04 8月, 2016 1 次提交
  24. 09 7月, 2016 1 次提交
  25. 04 7月, 2016 2 次提交
    • L
      ACPI / EC: Remove wrong ECDT correction quirks · bc539567
      Lv Zheng 提交于
      Our Windows probe result shows that EC._REG is evaluated after evaluating
      all _INI/_STA control methods.
      
      With boot EC always switched in acpi_ec_dsdt_probe(), we can see that as
      long as there is no EC opregion accesses in the MLC (module level code, AML
      code out of any control methods) and in _INI/_STA, there is no need to make
      sure that ECDT must be correct.
      
      Bugs of 9399/12461 were reported against an order issue that BAT0/1._STA
      evaluations contain EC accesses while the ECDT setting is wrong.
      
      >From the acpidump output posted on bug 9399, we can see that it is actually
      a different issue. In this table, if EC._REG is not executed, EC accesses
      will be done in a platform specific manner. As we've already ensured not to
      execute EC._REG during the eary stage, we can remove the quirks for bug
      9399.
      
      From the acpidump output posted on bug 12461, we can see that it still
      needs the quirk. In this table, EC._REG flags a named object whose default
      value is One, thus BAT1._STA surely should invoke EC accesses whatever we
      invoke EC._REG or not. We have to keep the quirk for it before we can root
      cause the issue.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bc539567
    • L
      ACPI / EC: Cleanup boot EC code using acpi_ec_alloc() · fd6231e7
      Lv Zheng 提交于
      Failure handling of the boot EC code is not tidy. This patch cleans
      them up with acpi_ec_alloc().
      
      This patch also changes acpi_ec_dsdt_probe(), always switches the
      boot EC from the ECDT one to the DSDT one in this function.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fd6231e7