Skip to content
Snippets Groups Projects
  1. Feb 24, 2010
    • Rafael J. Wysocki's avatar
      ACPI: Use GPE reference counting to support shared GPEs · cbbc0de7
      Rafael J. Wysocki authored
      
      To fix a bug and address the reviewers' comments regarding the ACPI
      GPE refcounting patch, do the following additional changes:
      
      o Remove the second argument of acpi_ev_enable_gpe(),
        'write_to_hardware', because it is not necessary any more.
      
      o Add the "bad parameter" test against 'type' in
        acpi_enable_gpe() and acpi_disable_gpe().
      
      o Make acpi_enable_gpe() only check 'status' for runtime GPEs if
        acpi_ev_enable_gpe() was actually called.
      
      o Make acpi_disable_gpe() return 'status' returned by
        acpi_ev_disable_gpe() and fix a bug where ACPI_GPE_TYPE_WAKE
        and ACPI_GPE_TYPE_RUNTIME were exchanged by mistake.
      
      o Add comments explaining why acpi_set_gpe() is used by the ACPI EC
        driver.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      cbbc0de7
  2. Feb 23, 2010
  3. Feb 22, 2010
    • Rafael J. Wysocki's avatar
      PCI / ACPI / PM: Platform support for PCI PME wake-up · b67ea761
      Rafael J. Wysocki authored
      
      Although the majority of PCI devices can generate PMEs that in
      principle may be used to wake up devices suspended at run time,
      platform support is generally necessary to convert PMEs into wake-up
      events that can be delivered to the kernel.  If ACPI is used for this
      purpose, PME signals generated by a PCI device will trigger the ACPI
      GPE associated with the device to generate an ACPI wake-up event that
      we can set up a handler for, provided that everything is configured
      correctly.
      
      Unfortunately, the subset of PCI devices that have GPEs associated
      with them is quite limited.  The devices without dedicated GPEs have
      to rely on the GPEs associated with other devices (in the majority of
      cases their upstream bridges and, possibly, the root bridge) to
      generate ACPI wake-up events in response to PME signals from them.
      
      Add ACPI platform support for PCI PME wake-up:
      o Add a framework making is possible to use ACPI system notify
        handlers for run-time PM.
      o Add new PCI platform callback ->run_wake() to struct
        pci_platform_pm_ops allowing us to enable/disable the platform to
        generate wake-up events for given device.  Implemet this callback
        for the ACPI platform.
      o Define ACPI wake-up handlers for PCI devices and PCI root buses and
        make the PCI-ACPI binding code register wake-up notifiers for all
        PCI devices present in the ACPI tables.
      o Add function pci_dev_run_wake() which can be used by PCI drivers to
        check if given device is capable of generating wake-up events at
        run time.
      
      Developed in cooperation with Matthew Garrett <mjg@redhat.com>.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      b67ea761
    • Rafael J. Wysocki's avatar
      ACPI / ACPICA: Multiple system notify handlers per device · 3f0be671
      Rafael J. Wysocki authored
      
      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: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      3f0be671
    • Rafael J. Wysocki's avatar
      ACPI / PM: Add more run-time wake-up fields · f517709d
      Rafael J. Wysocki authored
      
      Use the run_wake flag to mark all devices for which run-time wake-up
      events may be generated by the platform.  Introduce a new wake-up
      flag, always_enabled, for marking devices that should be permanently
      enabled to generate run-time events.  Also, introduce a reference
      counter for run-wake devices and a function that will initialize all
      of the run-time wake-up fields for given device.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarLen Brown <len.brown@intel.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      f517709d
    • Rafael J. Wysocki's avatar
      ACPI: Use GPE reference counting to support shared GPEs · 9630bdd9
      Rafael J. Wysocki authored
      
      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: default avatarMatthew Garrett <mjg@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      9630bdd9
    • Pallipadi, Venkatesh's avatar
      ACPI: Be in TS_POLLING state during mwait based C-state entry · d306ebc2
      Pallipadi, Venkatesh authored
      ACPI deep C-state entry had a long standing bug/missing feature, wherein we were sending
      resched IPIs when an idle CPU is in mwait based deep C-state. Only mwait based C1 was using
      the write to the monitored address to wake up mwait'ing CPU.
      
      This patch changes the code to retain TS_POLLING bit if we are entering an mwait based
      deep C-state.
      
      The patch has been verified to reduce the number of resched IPIs in general and also
      improves the performance/power on workloads with low system utilization (i.e., when mwait based
      deep C-states are being used).
      
      Fixes "netperf ~50% regression with 2.6.33-rc1, bisect to 1b9508f6"
      http://marc.info/?l=linux-kernel&m=126441481427331&w=4
      
      
      
      Reported-by: default avatarLin Ming <ming.m.lin@intel.com>
      Tested-by: default avatarAlex Shi <alex.shi@intel.com>
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      d306ebc2
  4. Feb 18, 2010
  5. Feb 16, 2010
  6. Jan 31, 2010
  7. Jan 27, 2010
  8. Jan 22, 2010
  9. Jan 19, 2010
    • Len Brown's avatar
      ACPI: delete acpi_processor_power_verify_c2() · d22edd29
      Len Brown authored
      
      no functional change -- cleanup only.
      
      acpi_processor_power_verify_c2() was nearly empty due to a previous patch,
      so expand its remains into its one caller and delete it.
      
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      d22edd29
    • Len Brown's avatar
      ACPI: allow C3 > 1000usec · a6d72c18
      Len Brown authored
      
      Do for C3 what the previous patch did for C2.
      
      The C2 patch was in response to a highly visible
      and multiply reported C-state/turbo failure,
      while this change has no bug report in-hand.
      
      This will enable C3 in Linux on systems where BIOS
      overstates C3 latency in _CST.  It will also enable
      future systems which may actually have C3 > 1000usec.
      
      Linux has always ignored ACPI BIOS C3 with exit latency > 1000 usec,
      and the ACPI spec is clear that is correct FADT-supplied C3.
      
      However, the ACPI spec explicitly states that _CST-supplied C-states
      have no latency limits.
      
      So move the 1000usec C3 test out of the code shared
      by FADT and _CST code-paths, and into the FADT-specific path.
      
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      a6d72c18
    • Len Brown's avatar
      ACPI: enable C2 and Turbo-mode on Nehalem notebooks on A/C · 5d76b6f6
      Len Brown authored
      Linux has always ignored ACPI BIOS C2 with exit latency > 100 usec,
      and the ACPI spec is clear that is correct FADT-supplied C2.
      
      However, the ACPI spec explicitly states that _CST-supplied C-states
      have no latency limits.
      
      So move the 100usec C2 test out of the code shared
      by FADT and _CST code-paths, and into the FADT-specific path.
      
      This bug has not been visible until Nehalem, which advertises
      a CPU-C2 worst case exit latency on servers of 205usec.
      That (incorrect) figure is being used by BIOS writers
      on mobile Nehalem systems for the AC configuration.
      Thus, Linux ignores C2 leaving just C1, which is
      saves less power, and also impacts performance
      by preventing the use of turbo mode.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=15064
      
      
      
      Tested-by: default avatarAlex Chiang <achiang@hp.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      5d76b6f6
    • Darren Jenkins's avatar
      ACPI: power_meter: remove double kfree() · 7f07a605
      Darren Jenkins authored
      
      resource->domain_devices can be double kfree()'d in a couple of places.
      Fix this by setting num_domain_devices = 0 after the kfree().
      
      Coverity CID: 13356, 13355, 13354
      
      Signed-off-by: default avatarDarren Jenkins <darrenrjenkins@gmail.com>
      Acked-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      7f07a605
    • Alex Chiang's avatar
      ACPI: processor: restrict early _PDC to opt-in platforms · 2205cbe8
      Alex Chiang authored
      Commit 78f16996 (ACPI: processor: call _PDC early) blindly walks
      the namespace and calls _PDC on every processor object it finds.
      
      This change may cause issues on platforms that declare dummy
      values for SSDTs on non-present processors (disabled in MADT).
      When we call _PDC and dynamically attempt to execute the AML
      Load() op on these dummy SSDTs, there's no telling what might
      happen.
      
      Rather than finding every platform that has bogus SSDTs, restrict
      early _PDC calls to platforms that are known to need early
      evaluation of _PDC.
      
      This is a minimal, temporary fix (given the context of the
      current release cycle). A real solution of checking the MADT for
      non-present processors will be written for the next merge window.
      
      References:
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=14710
      	http://bugzilla.kernel.org/show_bug.cgi?id=14954
      
      
      
      Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      2205cbe8
  10. Jan 16, 2010
    • Rakib Mullick's avatar
      ACPI: Fix unused variable warning in sbs.c · c19bdb61
      Rakib Mullick authored
      
      When CONFIG_ACPI_SYSFS_POWER=n and CONFIG_ACPI_PROCFS_POWER=n, then
      we're warned by the following warning:
      
      drivers/acpi/sbs.c: In function `acpi_battery_remove':
      drivers/acpi/sbs.c:825: warning: unused variable `battery'
      
      Signed-off-by: default avatarRakib Mullick <rakib.mullick@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      c19bdb61
    • Márton Németh's avatar
      acpi: make ACPI device id constant · c97adf9e
      Márton Németh authored
      The ids field of the struct acpi_driver is constant in <linux/acpi/acpi_bus.h>
      so it is worth to make the initialization data also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/
      
      )
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      
      Signed-off-by: default avatarMárton Németh <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      c97adf9e
    • Tony Luck's avatar
      ACPI: Fix section mismatch error for acpi_early_processor_set_pdc() · 7a0b73a4
      Tony Luck authored
      
      Alex Chiang introduced acpi_early_processor_set_pdc() in commit:
       ACPI: processor: call _PDC early
       78f16996
      
      But this results in a section mismatch:
      
      WARNING: drivers/acpi/acpi.o(.text+0xa9c1): Section mismatch in reference from the
      function acpi_early_processor_set_pdc() to the variable .cpuinit.data:processor_idle_dmi_table
      The function acpi_early_processor_set_pdc() references
      the variable __cpuinitdata processor_idle_dmi_table.
      This is often because acpi_early_processor_set_pdc lacks a __cpuinitdata
      annotation or the annotation of processor_idle_dmi_table is wrong.
      
      The only caller of acpi_early_processor_set_pdc() is acpi_bus_init() which
      is an "__init" function. So the correct fix here is to mark
      acpi_early_processor_set_pdc() "__init" too.
      
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      Acked-by: default avatarAlex Chiang <achiang@hp.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      7a0b73a4
  11. Jan 15, 2010
  12. Dec 30, 2009
  13. Dec 29, 2009
  14. Dec 24, 2009
Loading