1. 25 8月, 2010 1 次提交
  2. 12 8月, 2010 1 次提交
    • T
      acpi: fix bogus preemption logic · 0a7992c9
      Thomas Gleixner 提交于
      The ACPI_PREEMPTION_POINT() logic was introduced in commit 8bd108d1
      (ACPICA: add preemption point after each opcode parse).  The follow up
      commits abe1dfab, 138d1569, c084ca70 tried to fix the preemption logic
      back and forth, but nobody noticed that the usage of
      in_atomic_preempt_off() in that context is wrong.
      
      The check which guards the call of cond_resched() is:
      
          if (!in_atomic_preempt_off() && !irqs_disabled())
      
      in_atomic_preempt_off() is not intended for general use as the comment
      above the macro definition clearly says:
      
       * Check whether we were atomic before we did preempt_disable():
       * (used by the scheduler, *after* releasing the kernel lock)
      
      On a CONFIG_PREEMPT=n kernel the usage of in_atomic_preempt_off() works by
      accident, but with CONFIG_PREEMPT=y it's just broken.
      
      The whole purpose of the ACPI_PREEMPTION_POINT() is to reduce the latency
      on a CONFIG_PREEMPT=n kernel, so make ACPI_PREEMPTION_POINT() depend on
      CONFIG_PREEMPT=n and remove the in_atomic_preempt_off() check.
      
      Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16210
      
      [akpm@linux-foundation.org: fix build]
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Francois Valenduc <francois.valenduc@tvcablenet.be>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0a7992c9
  3. 11 8月, 2010 1 次提交
  4. 03 8月, 2010 6 次提交
  5. 02 8月, 2010 1 次提交
  6. 31 7月, 2010 1 次提交
    • M
      ACPI: Disable ASPM if the platform won't provide _OSC control for PCIe · 852972ac
      Matthew Garrett 提交于
      The PCI SIG documentation for the _OSC OS/firmware handshaking interface
      states:
      
      "If the _OSC control method is absent from the scope of a host bridge
      device, then the operating system must not enable or attempt to use any
      features defined in this section for the hierarchy originated by the host
      bridge."
      
      The obvious interpretation of this is that the OS should not attempt to use
      PCIe hotplug, PME or AER - however, the specification also notes that an
      _OSC method is *required* for PCIe hierarchies, and experimental validation
      with An Alternative OS indicates that it doesn't use any PCIe functionality
      if the _OSC method is missing. That arguably means we shouldn't be using
      MSI or extended config space, but right now our problems seem to be limited
      to vendors being surprised when ASPM gets enabled on machines when other
      OSs refuse to do so. So, for now, let's just disable ASPM if the _OSC
      method doesn't exist or refuses to hand over PCIe capability control.
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      852972ac
  7. 27 7月, 2010 1 次提交
  8. 25 7月, 2010 1 次提交
  9. 23 7月, 2010 2 次提交
  10. 21 7月, 2010 1 次提交
  11. 13 7月, 2010 5 次提交
    • R
      ACPI / ACPICA: Simplify acpi_ev_initialize_gpe_block() · a0d46871
      Rafael J. Wysocki 提交于
      Simplify the main loop in acpi_ev_initialize_gpe_block() by
      rearranging code and removing the "enabled" label that is not
      necessary any more.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a0d46871
    • R
      ACPI / ACPICA: Fail acpi_gpe_wakeup() if ACPI_GPE_CAN_WAKE is unset · 9ce10df8
      Rafael J. Wysocki 提交于
      Make acpi_gpe_wakeup() return error code for GPEs whose
      ACPI_GPE_CAN_WAKE flag is not set.  This way acpi_gpe_wakeup() will
      only wake for the GPEs reported by the host OS as "wakeup" ones with
      the help of acpi_gpe_can_wake().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      9ce10df8
    • R
      ACPI / ACPICA: Do not execute _PRW methods during initialization · 9874647b
      Rafael J. Wysocki 提交于
      Currently, during initialization ACPICA walks the entire ACPI
      namespace in search of any device objects with assciated _PRW
      methods.  All of the _PRW methods found are executed in the process
      to extract the GPE information returned by them, so that the GPEs in
      question can be marked as "able to wakeup" (more precisely, the
      ACPI_GPE_CAN_WAKE flag is set for them).  The only purpose of this
      exercise is to avoid enabling the CAN_WAKE GPEs automatically, even
      if there are _Lxx/_Exx methods associated with them.  However, it is
      both costly and unnecessary, because the host OS has to execute the
      _PRW methods anyway to check which devices can wake up the system
      from sleep states.  Moreover, it then uses full information
      returned by _PRW, including the GPE information, so it can take care
      of disabling the GPEs if necessary.
      
      Remove the code that walks the namespace and executes _PRW from
      ACPICA and modify comments to reflect that change.  Make
      acpi_bus_set_run_wake_flags() disable GPEs for wakeup devices
      so that they don't cause spurious wakeup events to be signaled.
      This not only reduces the complexity of the ACPICA initialization
      code, but in some cases it should reduce the kernel boot time as
      well.
      
      Unfortunately, for this purpose we need a new ACPICA function,
      acpi_gpe_can_wake(), to be called by the host OS in order to disable
      the GPEs that can wake up the system and were previously enabled by
      acpi_ev_initialize_gpe_block() or acpi_ev_update_gpes() (such a GPE
      should be disabled only once, because the initialization code enables
      it only once, but it may be pointed to by _PRW for multiple devices
      and that's why the additional function is necessary).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      9874647b
    • R
      ACPI: Fix bogus GPE test in acpi_bus_set_run_wake_flags() · e8e18c95
      Rafael J. Wysocki 提交于
      When we check if a GPE can be used for runtime signaling, we only
      search the FADT GPE blocks, which is incorrect, becuase the GPE
      may be located elsewhere.  We really should be using the GPE device
      information previously returned by _PRW here, so make that happen.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e8e18c95
    • A
      ACPI: processor: fix processor_physically_present on UP · 856b185d
      Alex Chiang 提交于
      The commit 5d554a7b (ACPI: processor: add internal
      processor_physically_present()) is broken on uniprocessor (UP)
      configurations, as acpi_get_cpuid() will always return -1.
      
      We use the value of num_possible_cpus() to tell us whether we got
      an invalid cpuid from acpi_get_cpuid() in the SMP case, or if
      instead, we are UP, in which case num_possible_cpus() is #defined
      as 1.
      
      We use num_possible_cpus() instead of num_online_cpus() to
      protect ourselves against the scenario of CPU hotplug, and we've
      taken down all the CPUs except one.
      
      Thanks to Jan Pogadl for initial report and analysis and Chen
      Gong for review.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=16357
      
      Reported-by: Jan Pogadl <pogadl.jan@googlemail.com>:
      Reviewed-by: NChen Gong <gong.chen@linux.intel.com>
      Signed-off-by: NAlex Chiang <achiang@canonical.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      856b185d
  12. 07 7月, 2010 19 次提交