1. 05 2月, 2015 1 次提交
  2. 21 10月, 2014 3 次提交
  3. 21 4月, 2014 2 次提交
    • L
      ACPICA: Update use of acpi_os_wait_events_complete interface. · 69c841b6
      Lv Zheng 提交于
      This patch cleans up all of the acpi_os_wait_events_complete() invocations to
      make it to be invoked inside of ACPICA in the way to accommodate Linux's
      work queue implementation.
      
      According to the report, current Linux kernel code is facing a boot time
      race issue in the acpi_remove_notify_handler(). This is because:
      Linux is using work queues to implement a deferred handler call environment
      while ACPICA expects OSPM to implement acpi_os_wait_events_complete() using
      wait queues.  The position to invoke a "waiter" is not suitable for a
      "flusher" as new invocations can be scheduled after this position and
      before the deletion of the handler from its management container.
      
      Since the following commit has deleted acpi_os_wait_events_complete()
      parameters, it thus might not be possible for OSPM to achieve a safe
      removal using wait queues.  This requires ACPICA to be changed accordingly
      to "flush" handlers rather than "wait" them to be drain up:
      
        Commit: 5ff986a2a9db11858247b71fe242fe17617229aa
        Date: Wed, 16 May 2012 13:36:07 -0700
        Subject: Introduce acpi_os_wait_events_complete interface.
      
        This interface will block until asynchronous events like notifies
        and GPEs are complete. Within ACPICA, it is called before a notify or GPE
        handler is removed. ACPICA BZ 868.
      
      This patch fixes this issue by invoking acpi_os_wait_events_complete() in the
      way to "flush" things - it thus should be put to the position after handler
      is removed from its management container but before it is destructed.
      
      The technical concerns are:
      1. MTX_NAMESPACE is used to protect things that acpi_os_wait_events_complete()
         might be waiting for, thus MTX_NAMESPACE must be unlocked before
         invoking acpi_os_wait_events_complete().
      2. MTX_NAMESPACE is also used to implement the serialization of
         acpi_install_notify_handler() and acpi_remove_notify_handler(). This patch
         changes this logic, thus if there are many
         acpi_install/remove_notify_handler() invoked in parallel, the
         acpi_os_wait_events_complete() might face the races which could cause it
         never running to an end.  Normally this will require additional code to
         implement a separate locking facility which is not implemented due to 3.
      3. Given ACPICA users will always invoke acpi_install_notify_handler() once
         during Linux module/device initialization and invoke
         acpi_remove_notify_handler() once during module/device finalization,
         problem stated in 2 will not happen in Linux environment due to the
         mutual exclusive module/device existence, this fix thus is sufficient.
      Same concerns can apply to acpi_install/remove_gpe_handler(). Reported and
      tested: Ronald Vink.  Fixed: Lv Zheng.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=60583Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Reported-and-Tested-by: NRonald Vink <ronald.vink@boskalis.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      69c841b6
    • B
      ACPICA: Add EXPORT_SYMBOL macros for install/remove SCI handler interfaces. · 1d44efab
      Bob Moore 提交于
      These recently added interfaces did not have these macros, used
      by some hosts.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1d44efab
  4. 11 2月, 2014 1 次提交
  5. 31 10月, 2013 2 次提交
  6. 24 9月, 2013 1 次提交
  7. 12 3月, 2013 1 次提交
  8. 25 1月, 2013 1 次提交
  9. 10 1月, 2013 2 次提交
    • L
      ACPICA: Cleanup indentation to reduce differences between Linux and ACPICA. · 3e8214e5
      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 210 lines of 20121018 divergence.diff.
      
      The ACPICA source codes uses a totally different indentation style from the
      Linux to be compatible with other users (operating systems or BIOS).
      
      Indentation differences are critical to the release automation. There are
      two causes related to the "indentation" that are affecting the release
      automation:
      1. The ACPICA -> Linux release process is:
           ACPICA source -- acpisrc - hierarchy - indent ->
           linuxized ACPICA source -- diff ->
           linuxized ACPICA patch (x) -- human intervention ->
           linuxized ACPICA patch (o)
           Where
             'x' means "cannot be directly applied to the Linux"
             'o' means "can be directly applied to the Linux"
         Different "indent" version or "indent" options used in the "indent"
         step will lead to different divergences.
         The version of "indent" used for the current release process is:
           GNU indent 2.2.11
         The options of "indent" used for the current release process is:
           -npro -kr -i8 -ts8 -sob -l80 -ss -ncs
      2. Manual indentation prettifying work in the Linux side will also harm the
         automatically generated linuxized ACPICA patches, making them impossible
         to apply directly.
      
      This patch fixes source code differences caused by the two causes so that
      the "human intervention" can be reduced in the future.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3e8214e5
    • 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
  10. 15 11月, 2012 1 次提交
  11. 17 7月, 2012 1 次提交
  12. 01 6月, 2012 2 次提交
  13. 22 3月, 2012 1 次提交
  14. 17 1月, 2012 1 次提交
  15. 01 11月, 2011 1 次提交
  16. 19 1月, 2011 1 次提交
  17. 12 1月, 2011 3 次提交
  18. 25 9月, 2010 1 次提交
    • R
      ACPI / ACPICA: Defer enabling of runtime GPEs (v3) · a2100801
      Rafael J. Wysocki 提交于
      The current ACPI GPEs initialization code has a problem that it
      enables some GPEs pointed to by device _PRW methods, generally
      intended for signaling wakeup events (system or device wakeup).
      These GPEs are then almost immediately disabled by the ACPI namespace
      scanning code with the help of acpi_gpe_can_wake(), but it would be
      better not to enable them at all until really necessary.
      
      Modify the initialization of GPEs so that the ones that have
      associated _Lxx or _Exx methods and are not pointed to by any _PRW
      methods will be enabled after the namespace scan is complete.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a2100801
  19. 07 8月, 2010 1 次提交
    • R
      ACPI / ACPICA: Fix reference counting problems with GPE handlers · 28f4f8a9
      Rafael J. Wysocki 提交于
      If a handler is installed for a GPE associated with an AML method and
      such that it cannot wake up the system from sleep states, the GPE
      remains enabled after the handler has been installed, although it
      should be disabled in that case to avoid spurious execution of the
      handler.
      
      Fix this issue by making acpi_install_gpe_handler() disable GPEs
      that were previously associated with AML methods and cannot wake up
      the system from sleep states.
      
      Analogously, make acpi_remove_gpe_handler() enable the GPEs that
      are associated with AML methods after their handlers have been
      removed and cannot wake up the system from sleep states.  In addition
      to that, fix a code ordering issue in acpi_remove_gpe_handler() that
      renders the locking ineffective (ACPI_MTX_EVENTS is released
      temporarily in the middle of the routine to wait for the completion
      of events already in progress).
      
      For this purpose introduce acpi_raw_disable_gpe() and
      acpi_raw_enable_gpe() to be called with acpi_gbl_gpe_lock held
      and rework acpi_disable_gpe() and acpi_enable_gpe(), respectively, to
      use them.  Also rework acpi_gpe_can_wake() to use
      acpi_raw_disable_gpe() instead of calling acpi_disable_gpe() after
      releasing the lock to avoid the possible theoretical race with
      acpi_install_gpe_handler().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: "Moore, Robert" <robert.moore@intel.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      28f4f8a9
  20. 12 6月, 2010 1 次提交
  21. 20 4月, 2010 2 次提交
  22. 23 2月, 2010 2 次提交
    • R
      ACPI / ACPICA: Multiple system notify handlers per device · 3f0be671
      Rafael J. Wysocki 提交于
      Currently it only is possible to install one system notify handler
      per namespace node, but this is not enough for PCI run-time power
      management, because we need to install power management notifiers for
      devices that already have hotplug notifiers installed.  While in
      principle this could be handled at the PCI level, that would be
      suboptimal due to the way in which the ACPI-based PCI hotplug code is
      designed.
      
      For this reason, modify ACPICA so that it is possible to install more
      than one system notify handler per namespace node.  Namely, make
      acpi_install_notify_handler(), acpi_remove_notify_handler() and
      acpi_ev_notify_dispatch() use a list of system notify handler objects
      associated with a namespace node.
      
      Make acpi_remove_notify_handler() call acpi_os_wait_events_complete()
      upfront to avoid a situation in which concurrent instance of
      acpi_remove_notify_handler() removes the handler from under us while
      we're waiting for the event queues to flush.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      3f0be671
    • 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
  23. 23 1月, 2010 1 次提交
  24. 16 12月, 2009 1 次提交
  25. 28 3月, 2009 1 次提交
  26. 09 1月, 2009 2 次提交
  27. 31 12月, 2008 1 次提交
  28. 30 12月, 2008 1 次提交
  29. 24 4月, 2008 1 次提交