1. 10 1月, 2013 2 次提交
    • L
      ACPICA: Cleanup source to reduce differences between Linux and ACPICA. · 739dcbb9
      Lv Zheng 提交于
      This is a cosmetic patch only. Comparison of the resulting binary showed
      only line number differences.
      
      This patch does not affect the generation of the Linux binary.
      This patch decreases 389 lines of 20121018 divergence.diff.
      
      This patch reduces source code diff caused by the simple code maintenance
      work:
      1. Deletion of the unused include files.
      2. Deletion of the deprecated codes blocks.
      3. Repositioning of the code blocks.
      4. Replacing the values with the well defined macros.
      5. Replacing the types with the equivalent types.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      739dcbb9
    • L
      ACPICA: Cleanup updated comments. · 75c8044f
      Lv Zheng 提交于
      This is a cosmetic patch only. Comparison of the resulting binary showed
      only line number differences.
      
      This patch does not affect the generation of the Linux binary.
      This patch decreases 558 lines of 20121018 divergence.diff.
      
      This patch reduces the source code diff between Linux and ACPICA by
      cleaning the comments that already have been updated in ACPICA.
      
      There is no extra indentation done in this patch. Even the empty line
      deletions and insertions are also splitted into another cleanup patch so
      that this patch can be easily reviewed, and the binary differences can be
      held to a lowest level.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      75c8044f
  2. 15 11月, 2012 5 次提交
  3. 21 9月, 2012 1 次提交
  4. 31 7月, 2012 1 次提交
    • L
      ACPI: delete _GTS/_BFS support · 3f6f49c7
      Len Brown 提交于
      _GTS and _BFS were added to the suspend/resume flow
      in the ACPI 2.0 specification.
      
      Linux dutifully implemented _GTS and _BFS.
      We discovered that it was rarely seen in systems
      in the field.  Further, some of those systems had
      AML so bogus that it could never work -- proof that
      no other operating system supports _GTS and _BFS.
      So we made _GTS and _BFS optional via modparam,
      and disabled them by default.
      
      But we've had to complicate some code to keep
      this support in the kernel, as these methods are defined
      to be evaluated very close to sleep entry and exit.
      Indeed, no other AML is ever evaluated with interrupts off.
      
      We have submitted a proposal for _GTS and _BFS
      to be officially removed from the ACPI specification
      on the next revision.  Here we remove it from Linux.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      3f6f49c7
  5. 17 7月, 2012 2 次提交
  6. 01 6月, 2012 2 次提交
  7. 05 5月, 2012 1 次提交
    • L
      ACPI: Fix D3hot v D3cold confusion · 1cc0c998
      Lin Ming 提交于
      Before this patch, ACPI_STATE_D3 incorrectly referenced D3hot
      in some places, but D3cold in other places.
      
      After this patch, ACPI_STATE_D3 always means ACPI_STATE_D3_COLD;
      and all references to D3hot use ACPI_STATE_D3_HOT.
      
      ACPI's _PR3 method is used to enter both D3hot and D3cold states.
      What distinguishes D3hot from D3cold is the presence _PR3
      (Power Resources for D3hot)  If these resources are all ON,
      then the state is D3hot.  If _PR3 is not present,
      or all _PR0 resources for the devices are OFF,
      then the state is D3cold.
      
      This patch applies after Linux-3.4-rc1.
      A future syntax cleanup may remove ACPI_STATE_D3
      to emphasize that it always means ACPI_STATE_D3_COLD.
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NAaron Lu <aaron.lu@amd.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1cc0c998
  8. 27 3月, 2012 1 次提交
    • L
      ACPICA: Sleep/Wake interfaces: optionally execute _GTS and _BFS · 8a73b17e
      Lin Ming 提交于
      Enhanced the sleep/wake interfaces to optionally execute the
      _GTS method (Going To Sleep), and the _BFS method (Back From
      Sleep).  Windows apparently does not execute these methods, and
      therefore these methods are often untested. It has been seen on
      some systems where the execution of these methods causes errors
      and also prevents the machine from entering S5. It is therefore
      suggested that host operating systems do not execute these methods
      by default. In the future, perhaps these methods can be optionally
      executed based on the age of the system and/or what is the newest
      version of Windows that the BIOS asks for via _OSI.
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      8a73b17e
  9. 22 3月, 2012 2 次提交
  10. 17 1月, 2012 2 次提交
  11. 07 11月, 2011 1 次提交
  12. 29 5月, 2011 1 次提交
  13. 10 5月, 2011 3 次提交
  14. 19 1月, 2011 1 次提交
  15. 12 1月, 2011 4 次提交
  16. 01 10月, 2010 3 次提交
  17. 07 7月, 2010 3 次提交
    • R
      ACPICA: Drop acpi_set_gpe · 546eb576
      Rafael J. Wysocki 提交于
      The acpi_set_gpe() function is a little awkward, because it doesn't
      really work as advertised in the "disable" case.  Namely, if a GPE
      has been enabled with acpi_enable_gpe() and triggered a notification
      to occur, and if acpi_set_gpe() is used to disable it before
      acpi_ev_asynch_enable_gpe() runs, the GPE will be immediately enabled
      by the latter as though the acpi_set_gpe() had no effect.
      
      Thus, since it's been possible to make all of its callers use
      alternative operations to disable or enable GPEs, acpi_set_gpe() can
      be dropped.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      546eb576
    • R
      ACPICA: Remove wakeup GPE reference counting which is not used · a44061aa
      Rafael J. Wysocki 提交于
      After the previous patch that introduced acpi_gpe_wakeup() and
      modified the ACPI suspend and wakeup code to use it, the third
      argument of acpi_{enable|disable}_gpe() and the GPE wakeup
      reference counter are not necessary any more.  Remove them and
      modify all of the users of acpi_{enable|disable}_gpe()
      accordingly.  Also drop GPE type constants that aren't used
      any more.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a44061aa
    • R
      ACPICA: Introduce acpi_gpe_wakeup() · e8b6f970
      Rafael J. Wysocki 提交于
      ACPICA uses reference counters to avoid disabling GPEs too early in
      case they have been enabled for many times.  This is done separately
      for runtime and for wakeup, but the wakeup GPE reference counter is
      not really necessary, because GPEs are only enabled to wake up the
      system at the hardware level by acpi_enter_sleep_state().  Thus it
      only is necessary to set the corresponding bits in the wakeup enable
      masks of these GPEs' registers right before the system enters a sleep
      state.  Moreover, the GPE wakeup enable bits can only be set when the
      target sleep state of the system is known and they need to be cleared
      immediately after wakeup regardless of how many wakeup devices are
      associated with a given GPE.
      
      On the basis of the above observations, introduce function
      acpi_gpe_wakeup() to be used for setting or clearing the enable bit
      corresponding to a given GPE in its enable register's enable_for_wake
      mask.  Modify the ACPI suspend and wakeup code the use
      acpi_gpe_wakeup() instead of acpi_{enable|disable}_gpe() to set
      and clear GPE enable bits in their registers' enable_for_wake masks
      during system transitions to a sleep state and back to the working
      state, respectively.  [This will allow us to drop the third
      argument of acpi_{enable|disable}_gpe() and simplify the GPE
      handling code.]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e8b6f970
  18. 12 6月, 2010 2 次提交
    • R
      ACPI / ACPICA: Avoid writing full enable masks to GPE registers · c9a8bbb7
      Rafael J. Wysocki 提交于
      ACPICA uses acpi_hw_write_gpe_enable_reg() to re-enable a GPE after
      an event signaled by it has been handled.  However, this function
      writes the entire GPE enable mask to the GPE's enable register which
      may not be correct.  Namely, if one of the other GPEs in the same
      register was previously enabled by acpi_enable_gpe() and subsequently
      disabled using acpi_set_gpe(), acpi_hw_write_gpe_enable_reg() will
      re-enable it along with the target GPE.
      
      To fix this issue rework acpi_hw_write_gpe_enable_reg() so that it
      calls acpi_hw_low_set_gpe() with a special action value,
      ACPI_GPE_COND_ENABLE, that will make it only enable the GPE if the
      corresponding bit in its register's enable_for_run mask is set.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c9a8bbb7
    • R
      ACPI / ACPICA: Fix low-level GPE manipulation code · fd247447
      Rafael J. Wysocki 提交于
      ACPICA uses acpi_ev_enable_gpe() for enabling GPEs at the low level,
      which is incorrect, because this function only enables the GPE if the
      corresponding bit in its enable register's enable_for_run mask is set.
      This causes acpi_set_gpe() to work incorrectly if used for enabling
      GPEs that were not previously enabled with acpi_enable_gpe().  As a
      result, among other things, wakeup-only GPEs are never enabled by
      acpi_enable_wakeup_device(), so the devices that use them are unable
      to wake up the system.
      
      To fix this issue remove acpi_ev_enable_gpe() and its counterpart
      acpi_ev_disable_gpe() and replace acpi_hw_low_disable_gpe() with
      acpi_hw_low_set_gpe() that will be used instead to manipulate GPE
      enable bits at the low level.  Make the users of acpi_ev_enable_gpe()
      and acpi_ev_disable_gpe() call acpi_hw_low_set_gpe() instead and
      make sure that GPE enable masks are only updated by acpi_enable_gpe()
      and acpi_disable_gpe() when GPE reference counters change from 0
      to 1 and from 1 to 0, respectively.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      fd247447
  19. 06 5月, 2010 1 次提交
  20. 20 4月, 2010 1 次提交
  21. 23 2月, 2010 1 次提交
    • R
      ACPI: Use GPE reference counting to support shared GPEs · 9630bdd9
      Rafael J. Wysocki 提交于
      ACPI GPEs may map to multiple devices.  The current GPE interface
      only provides a mechanism for enabling and disabling GPEs, making
      it difficult to change the state of GPEs at runtime without extensive
      cooperation between devices.
      
      Add an API to allow devices to indicate whether or not they want
      their device's GPE to be enabled for both runtime and wakeup events.
      
      Remove the old GPE type handling entirely, which gets rid of various
      quirks, like the implicit disabling with GPE type setting. This
      requires a small amount of rework in order to ensure that non-wake
      GPEs are enabled by default to preserve existing behaviour.
      
      Based on patches from Matthew Garrett <mjg@redhat.com>.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      9630bdd9