1. 07 10月, 2012 2 次提交
    • L
      ACPI: Add new sysfs interface to export device description · d1efe3c3
      Lance Ortiz 提交于
      Add support to export the device description obtained from the ACPI _STR
      method, if one exists for a device, to user-space via a sysfs interface.
      This new interface provides a standard and platform neutral way for users
      to obtain the description text stored in the ACPI _STR method.  If no
      _STR method exists for the device, no sysfs 'description' file will be
      created.  The 'description' file will be located in the /sys/devices/
      directory using the device's path.
      
      /sys/device/<bus>/<bridge path>/<device path>.../firmware_node/description
      
      Example:
      
      /sys/devices/pci0000:00/0000:00.07.0/0000:0e:00.0/firmware_node/description
      
      It can also be located using the ACPI device path, for example:
      
      /sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/PNP0A08:00/device:13/device:15/description
      /sys/devices/LNXSYSTM:00/device:00/ACPI0004:00/ACPI0004:01/ACPI0007:02/description
      
      Execute the 'cat' command on the 'description' file to obtain the
      description string for that device.
      
      This patch also includes documentation describing how the new sysfs
      interface works
      
      Changes from v1-v2 based on comments by Len Brown and Fengguang Wu
      * Removed output "No Description" and leaving a NULL attribute if the
      _STR method failed to evaluate.
      
      * In acpi_device_remove_files() removed the redundent check of
      dev->pnp.str_obj before calling free.  This check triggered a message
      from smatch.
      Signed-off-by: NLance Ortiz <lance.ortiz@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d1efe3c3
    • F
      ACPI: Harden acpi_table_parse_entries() against BIOS bug · 369d913b
      Fenghua Yu 提交于
      Parsing acpi table entries may fall into an infinite loop on a buggy BIOS
      which has entry length=0 in acpi table.
      
      Instead of kernel hang with few failure clue which leads to heavy lifting debug
      effort, this patch hardens kernel boot by booting into non NUMA mode. The debug
      info left in log buffer helps people identify the issue.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      369d913b
  2. 30 9月, 2012 1 次提交
  3. 25 9月, 2012 8 次提交
  4. 22 9月, 2012 5 次提交
  5. 21 9月, 2012 11 次提交
  6. 18 9月, 2012 1 次提交
    • D
      cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure · 3d339dcb
      Daniel Lezcano 提交于
      Currently we have the cpuidle_device field in the acpi_processor_power structure.
      This adds a dependency between processor.h and cpuidle.h
      
      Although it is not a real problem, removing this dependency has the benefit of
      separating a bit more the cpuidle code from the rest of the acpi code.
      Also, the compilation should be a bit improved because we do no longer
      include cpuidle.h in processor.h. The preprocessor was generating 30418 loc
      and with this patch it generates 30256 loc for processor_thermal.c, a file
      which is not concerned at all by cpuidle, like processor_perflib.c and
      processor_throttling.c.
      
      That may sound ridiculous, but "small streams make big rivers" :P
      
      This patch moves this field into a static global per cpu variable like what is
      done in the intel_idle driver.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      3d339dcb
  7. 16 9月, 2012 2 次提交
  8. 15 9月, 2012 1 次提交
  9. 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
  10. 10 9月, 2012 1 次提交
  11. 05 9月, 2012 1 次提交
  12. 20 8月, 2012 1 次提交
  13. 10 8月, 2012 1 次提交
  14. 03 8月, 2012 3 次提交