1. 15 9月, 2012 1 次提交
  2. 14 9月, 2012 2 次提交
    • L
      ACPI / PM: Fix resource_lock dead lock in acpi_power_on_device · 40bf66ec
      Lin Ming 提交于
      Commit 0090def6("ACPI: Add interface to register/unregister device
      to/from power resources") used resource_lock to protect the devices list
      that relies on power resource. It caused a mutex dead lock, as below
      
          acpi_power_on ---> lock resource_lock
            __acpi_power_on
              acpi_power_on_device
                acpi_power_get_inferred_state
                  acpi_power_get_list_state ---> lock resource_lock
      
      This patch adds a new mutex "devices_lock" to protect the devices list
      and calls acpi_power_on_device in acpi_power_on, instead of
      __acpi_power_on, after the resource_lock is released.
      
      [rjw: Changed data type of a boolean variable to bool.]
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      40bf66ec
    • R
      ACPI / PM: Infer parent power state from child if unknown, v2 · 8f7412a7
      Rafael J. Wysocki 提交于
      It turns out that there are ACPI BIOSes defining device objects with
      _PSx and without either _PSC or _PRx.  For devices corresponding to
      those ACPI objetcs __acpi_bus_get_power() returns ACPI_STATE_UNKNOWN
      and their initial power states are regarded as unknown as a result.
      If such a device is a parent of another power-manageable device, the
      child cannot be put into a low-power state through ACPI, because
      __acpi_bus_set_power() refuses to change power states of devices
      whose parents' power states are unknown.
      
      To work around this problem, observe that the ACPI power state of
      a device cannot be higher-power (lower-number) than the power state
      of its parent.  Thus, if the device's _PSC method or the
      configuration of its power resources indicates that the device is
      in D0, the device's parent has to be in D0 as well.  Consequently,
      if the parent's power state is unknown when we've just learned that
      its child's power state is D0, we can safely set the parent's
      power.state field to ACPI_STATE_D0.
      Tested-by: NAaron Lu <aaron.lu@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      8f7412a7
  3. 20 8月, 2012 1 次提交
  4. 10 8月, 2012 1 次提交
  5. 03 8月, 2012 3 次提交
  6. 31 7月, 2012 2 次提交
    • R
      ACPI / PCI: Do not try to acquire _OSC control if that is hopeless · 2d9c8677
      Rafael J. Wysocki 提交于
      If acpi_pci_osc_support() fails for the given flags, it doesn't make
      sense to call acpi_pci_osc_control_set() down the road for the same
      flags, because it will certainly fail too.  Moreover, problem
      diagnostics is then harder, because it is not too easy to identify
      the reason of the _OSC failure in those cases.
      
      For this reason, check the status returned by acpi_pci_osc_support()
      for PCIe support flags and do not attempt to execute
      acpi_pci_osc_control_set() for those flags and print a message if
      it's "failure".  For compatibility with the existing code, disable
      ASPM in that case too.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2d9c8677
    • 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
  7. 28 7月, 2012 2 次提交
  8. 27 7月, 2012 2 次提交
  9. 26 7月, 2012 1 次提交
  10. 25 7月, 2012 2 次提交
  11. 24 7月, 2012 1 次提交
  12. 18 7月, 2012 3 次提交
  13. 17 7月, 2012 8 次提交
  14. 14 7月, 2012 7 次提交
  15. 13 7月, 2012 1 次提交
    • T
      cpufreq / ACPI: Fix not loading acpi-cpufreq driver regression · c4686c71
      Thomas Renninger 提交于
      Commit d640113f introduced a regression on SMP
      systems where the processor core with ACPI id zero is disabled
      (typically should be the case because of hyperthreading).
      The regression got spread through stable kernels.
      On 3.0.X it got introduced via 3.0.18.
      
      Such platforms may be rare, but do exist.
      Look out for a disabled processor with acpi_id 0 in dmesg:
      ACPI: LAPIC (acpi_id[0x00] lapic_id[0x10] disabled)
      
      This problem has been observed on a:
      HP Proliant BL280c G6 blade
      
      This patch restricts the introduced workaround to platforms
      with nr_cpu_ids <= 1.
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      CC: stable@vger.kernel.org
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      c4686c71
  16. 11 7月, 2012 2 次提交
    • J
      ACPI / PM: Leave Bus Master Arbitration enabled for suspend/resume · dc332fdf
      Jonathan Nieder 提交于
      This is an old suspend/resume lockup fix:
      
      	commit 2780cc4660e1
      	Author: Len Brown <len.brown@intel.com>
      	Date:   Thu Dec 23 13:43:30 2004 -0500
      
      	    [ACPI] Fix suspend/resume lockup issue
      	    by leaving Bus Master Arbitration enabled.
      	    The ACPI spec mandates it be disabled only for C3.
      
      	    http://bugzilla.kernel.org/show_bug.cgi?id=3599Signed-off-by: NDavid Shaohua Li <shaohua.li@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      
      The bug snuck back in in commit 2feec47d (ACPICA: ACPI 5: Support
      for new FADT SleepStatus, SleepControl registers, 2012-02-14),
      presumably by copy/pasting a copy of the code without that fix for the
      legacy case.
      
      On affected machines, after that commit, the machine locks up hard on
      resume from suspend.  The same fix as seven years ago still works.
      
      Addresses <https://bugzilla.kernel.org/show_bug.cgi?id=43641>.
      Reported-bisected-and-tested-by: NOctavio Alvarez <alvarezp@alvarezp.com>
      Reported-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      dc332fdf
    • P
      PM / cpuidle: System resume hang fix with cpuidle · 8651f97b
      Preeti U Murthy 提交于
      On certain bios, resume hangs if cpus are allowed to enter idle states
      during suspend [1].
      
      This was fixed in apci idle driver [2].But intel_idle driver does not
      have this fix. Thus instead of replicating the fix in both the idle
      drivers, or in more platform specific idle drivers if needed, the
      more general cpuidle infrastructure could handle this.
      
      A suspend callback in cpuidle_driver could handle this fix. But
      a cpuidle_driver provides only basic functionalities like platform idle
      state detection capability and mechanisms to support entry and exit
      into CPU idle states. All other cpuidle functions are found in the
      cpuidle generic infrastructure for good reason that all cpuidle
      drivers, irrepective of their platforms will support these functions.
      
      One option therefore would be to register a suspend callback in cpuidle
      which handles this fix. This could be called through a PM_SUSPEND_PREPARE
      notifier. But this is too generic a notfier for a driver to handle.
      
      Also, ideally the job of cpuidle is not to handle side effects of suspend.
      It should expose the interfaces which "handle cpuidle 'during' suspend"
      or any other operation, which the subsystems call during that respective
      operation.
      
      The fix demands that during suspend, no cpus should be allowed to enter
      deep C-states. The interface cpuidle_uninstall_idle_handler() in cpuidle
      ensures that. Not just that it also kicks all the cpus which are already
      in idle out of their idle states which was being done during cpu hotplug
      through a CPU_DYING_FROZEN callbacks.
      
      Now the question arises about when during suspend should
      cpuidle_uninstall_idle_handler() be called. Since we are dealing with
      drivers it seems best to call this function during dpm_suspend().
      Delaying the call till dpm_suspend_noirq() does no harm, as long as it is
      before cpu_hotplug_begin() to avoid race conditions with cpu hotpulg
      operations. In dpm_suspend_noirq(), it would be wise to place this call
      before suspend_device_irqs() to avoid ugly interactions with the same.
      
      Ananlogously, during resume.
      
      References:
      [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/674075.
      [2] http://marc.info/?l=linux-pm&m=133958534231884&w=2Reported-and-tested-by: NDave Hansen <dave@linux.vnet.ibm.com>
      Signed-off-by: NPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Reviewed-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      8651f97b
  17. 06 7月, 2012 1 次提交