1. 29 8月, 2013 2 次提交
  2. 15 8月, 2013 4 次提交
  3. 13 8月, 2013 3 次提交
  4. 08 8月, 2013 5 次提交
    • S
      ACPI / Sleep: Fix incorrect placement of __initdata · 3e4376ff
      Sachin Kamat 提交于
      __initdata should be placed between the variable name and equal
      sign for the variable to be placed in the intended section.
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3e4376ff
    • S
      ACPI / processor: Fix incorrect placement of __initdata · 8ef9fc78
      Sachin Kamat 提交于
      __initdata should be placed between the variable name and equal
      sign for the variable to be placed in the intended section.
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8ef9fc78
    • S
      ACPI / EC: Fix incorrect placement of __initdata · 6cef7497
      Sachin Kamat 提交于
      __initdata should be placed between the variable name and equal
      sign for the variable to be placed in the intended section.
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6cef7497
    • R
      ACPI: Try harder to resolve _ADR collisions for bridges · 60f75b8e
      Rafael J. Wysocki 提交于
      In theory, under a given ACPI namespace node there should be only
      one child device object with _ADR whose value matches a given bus
      address exactly.  In practice, however, there are systems in which
      multiple child device objects under a given parent have _ADR matching
      exactly the same address.  In those cases we use _STA to determine
      which of the multiple matching devices is enabled, since some systems
      are known to indicate which ACPI device object to associate with the
      given physical (usually PCI) device this way.
      
      Unfortunately, as it turns out, there are systems in which many
      device objects under the same parent have _ADR matching exactly the
      same bus address and none of them has _STA, in which case they all
      should be regarded as enabled according to the spec.  Still, if
      those device objects are supposed to represent bridges (e.g. this
      is the case for device objects corresponding to PCIe ports), we can
      try harder and skip the ones that have no child device objects in the
      ACPI namespace.  With luck, we can avoid using device objects that we
      are not expected to use this way.
      
      Although this only works for bridges whose children also have ACPI
      namespace representation, it is sufficient to address graphics
      adapter detection issues on some systems, so rework the code finding
      a matching device ACPI handle for a given bus address to implement
      this idea.
      
      Introduce a new function, acpi_find_child(), taking three arguments:
      the ACPI handle of the device's parent, a bus address suitable for
      the device's bus type and a bool indicating if the device is a
      bridge and make it work as outlined above.  Reimplement the function
      currently used for this purpose, acpi_get_child(), as a call to
      acpi_find_child() with the last argument set to 'false' and make
      the PCI subsystem use acpi_find_child() with the bridge information
      passed as the last argument to it.  [Lan Tianyu notices that it is
      not sufficient to use pci_is_bridge() for that, because the device's
      subordinate pointer hasn't been set yet at this point, so use
      hdr_type instead.]
      
      This change fixes a regression introduced inadvertently by commit
      33f767d7 (ACPI: Rework acpi_get_child() to be more efficient) which
      overlooked the fact that for acpi_walk_namespace() "post-order" means
      "after all children have been visited" rather than "on the way back",
      so for device objects without children and for namespace walks of
      depth 1, as in the acpi_get_child() case, the "post-order" callbacks
      ordering is actually the same as the ordering of "pre-order" ones.
      Since that commit changed the namespace walk in acpi_get_child() to
      terminate after finding the first matching object instead of going
      through all of them and returning the last one, it effectively
      changed the result returned by that function in some rare cases and
      that led to problems (the switch from a "pre-order" to a "post-order"
      callback was supposed to prevent that from happening, but it was
      ineffective).
      
      As it turns out, the systems where the change made by commit
      33f767d7 actually matters are those where there are multiple ACPI
      device objects representing the same PCIe port (which effectively
      is a bridge).  Moreover, only one of them, and the one we are
      expected to use, has child device objects in the ACPI namespace,
      so the regression can be addressed as described above.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=60561Reported-by: NPeter Wu <lekensteyn@gmail.com>
      Tested-by: NVladimir Lalov <mail@vlalov.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
      60f75b8e
    • Y
      ACPI / processor: move try_offline_node() after acpi_unmap_lsapic() · 1e385f6f
      Yasuaki Ishimatsu 提交于
      try_offline_node() checks that all CPUs associated with the given
      node have been removed by using cpu_present_bits.  If all cpus
      related to that node have been removed, try_offline_node() clears
      the node information.
      
      However, try_offline_node() called from acpi_processor_remove() never
      clears the node information.  For disabling cpu_present_bits,
      acpi_unmap_lsapic() needs be called.  Yet, acpi_unmap_lsapic() is
      called after try_offline_node() has run.  So when try_offline_node()
      runs, the CPU's cpu_present_bits is always set.
      
      Fix the issue by moving try_offline_node() after acpi_unmap_lsapic().
      
      The problem fixed here was uncovered by commit cecdb193 "ACPI / scan:
      Change the implementation of acpi_bus_trim()".
      
      [rjw: Changelog]
      Signed-off-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Acked-by: NToshi Kani <toshi.kani@hp.com>
      Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1e385f6f
  5. 07 8月, 2013 1 次提交
  6. 06 8月, 2013 4 次提交
  7. 05 8月, 2013 1 次提交
    • F
      ACPI / video: improve quirk check in acpi_video_bqc_quirk() · b3b301c5
      Felipe Contreras 提交于
      If the _BCL package ordering is descending, the first level
      (br->levels[2]) is likely to be 0, and if the number of levels
      matches the number of steps, we might confuse a returned level to
      mean the index.
      
      For example:
      
        current_level = max_level = 100
        test_level = 0
        returned level = 100
      
      In this case 100 means the level, not the index, and _BCM failed.
      Still, if the _BCL package ordering is descending, the index of
      level 0 is also 100, so we assume _BQC is indexed, when it's not.
      
      This causes all _BQC calls to return bogus values causing weird
      behavior from the user's perspective.  For example:
      
      xbacklight -set 10; xbacklight -set 20;
      
      would flash to 90% and then slowly down to the desired level (20).
      
      The solution is simple; test anything other than the first level
      (e.g. 1).
      
      [rjw: Changelog]
      Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b3b301c5
  8. 30 7月, 2013 1 次提交
  9. 26 7月, 2013 2 次提交
  10. 19 7月, 2013 1 次提交
  11. 18 7月, 2013 4 次提交
  12. 15 7月, 2013 5 次提交
  13. 05 7月, 2013 1 次提交
  14. 04 7月, 2013 5 次提交
    • N
      ACPI / fan: Initialize acpi_state variable · 85eb9827
      Naresh Bhat 提交于
      Make the following compiler warning go away:
      
       CC      drivers/acpi/fan.o
      drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
      drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]
      
      by initializing the local variable acpi_state in fan_get_cur_state().
      
      [rjw: Changelog]
      Signed-off-by: NNaresh Bhat <naresh.bhat@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      85eb9827
    • H
      ACPI / scan: remove unused LIST_HEAD(acpi_device_list) · b67cf7c4
      Haicheng Li 提交于
      The acpi_device_list list is not used, so removed it.
      
      [rjw: Changelog]
      Signed-off-by: NHaicheng Li <haicheng.li@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b67cf7c4
    • R
      ACPI / dock: Actually define acpi_dock_init() as void · 2ce65fe8
      Rafael J. Wysocki 提交于
      Commit 94add0f8 (ACPI / dock: Initialize ACPI dock subsystem upfront)
      changed the header of acpi_dock_init() in internal.h so that it is
      supposed to be a void function now, but it forgot to update its
      actual definition in dock.c according to which it still is supposed
      to return int.
      
      Although that didn't cause any visible breakage or even a compiler
      warning to be thrown, which is odd enough, fix it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 3.10+ <stable@vger.kernel.org>
      2ce65fe8
    • R
      ACPI / PM: Fix corner case in acpi_bus_update_power() · 91bdad0b
      Rafael J. Wysocki 提交于
      The role of acpi_bus_update_power() is to update the given ACPI
      device object's power.state field to reflect the current physical
      state of the device (as inferred from the configuration of power
      resources and _PSC, if available).  For this purpose it calls
      acpi_device_set_power() that should update the power resources'
      reference counters and set power.state as appropriate.  However,
      that doesn't work if the "new" state is D1, D2 or D3hot and the
      the current value of power.state means D3cold, because in that
      case acpi_device_set_power() will refuse to transition the device
      from D3cold to non-D0.
      
      To address this problem, make acpi_bus_update_power() call
      acpi_power_transition() directly to update the power resources'
      reference counters and only use acpi_device_set_power() to put
      the device into D0 if the current physical state of it cannot
      be determined.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      91bdad0b
    • K
      clean up scary strncpy(dst, src, strlen(src)) uses · 096a8aac
      Kees Cook 提交于
      Fix various weird constructions of strncpy(dst, src, strlen(src)).
      
      Length limits should be about the space available in the destination,
      not repurposed as a method to either always include or always exclude a
      trailing NULL byte.  Either the NULL should always be copied (using
      strlcpy), or it should not be copied (using something like memcpy).
      Readable code should not depend on the weird behavior of strncpy when it
      hits the length limit.  Better to avoid the anti-pattern entirely.
      
      [akpm@linux-foundation.org: revert getdelays.c part due to missing bsd/string.h]
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>	[staging]
      Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>	[acpi]
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ursula Braun <ursula.braun@de.ibm.com>
      Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com>
      Cc: Richard Weinberger <richard@nod.at>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      096a8aac
  15. 01 7月, 2013 1 次提交