1. 01 11月, 2011 1 次提交
  2. 12 1月, 2011 1 次提交
    • R
      PNP / ACPI: Use DEVICE_ACPI_HANDLE() for device ACPI handle access · cc8e7a35
      Rafael J. Wysocki 提交于
      The PNP ACPI driver squirrels the ACPI handles of PNP devices' ACPI
      companions, but this isn't correct, because those handles should be
      accessed using the DEVICE_ACPI_HANDLE() macro operating on struct
      device objects.
      
      Using DEVICE_ACPI_HANDLE() in the PNP ACPI driver instead of the
      driver's own copies of the ACPI handles allows us to avoid a problem
      with docking stations where a machine docked before suspend to RAM
      and undocked while suspended crashes during the subsequent resume (in
      that case the ACPI companion of the PNP device in question doesn't
      exist any more while the device is being resumed).  It also allows us
      to avoid the problem where suspend to RAM fails when the machine was
      undocked while suspended before (again, the ACPI companion of the PNP
      device is not present any more while it is being suspended).
      
      This change doesn't fix all of the the PNP ACPI driver's problems
      with PNP devices in docking stations (generally speaking, the driver
      has no idea that devices can come and go and doesn't even attempt to
      handle such events), but at least it makes suspend work for the
      users of docking stations who don't use the PNP devices located in
      there.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=15100Reported-and-tested-by: NToralf Förster <toralf.foerster@gmx.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      cc8e7a35
  3. 11 12月, 2010 1 次提交
  4. 02 10月, 2010 1 次提交
  5. 01 10月, 2010 1 次提交
  6. 19 7月, 2010 1 次提交
  7. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  8. 16 12月, 2009 1 次提交
  9. 11 12月, 2009 1 次提交
  10. 26 9月, 2009 3 次提交
  11. 27 8月, 2009 1 次提交
    • B
      ACPICA: Major update for acpi_get_object_info external interface · 15b8dd53
      Bob Moore 提交于
      Completed a major update for the acpi_get_object_info external interface.
      Changes include:
       - Support for variable, unlimited length HID, UID, and CID strings
       - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.)
       - Call the _SxW power methods on behalf of a device object
       - Determine if a device is a PCI root bridge
       - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO.
      These changes will require an update to all callers of this interface.
      See the ACPICA Programmer Reference for details.
      
      Also, update all invocations of acpi_get_object_info interface
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      15b8dd53
  12. 08 5月, 2009 1 次提交
  13. 04 4月, 2009 1 次提交
    • W
      Enable PNPACPI _PSx Support, v3 · 6328a574
      Witold Szczeponik 提交于
      (This is an update to the patch presented earlier in
      http://lkml.org/lkml/2008/12/8/284, with new error handling.)
      
      This patch sets the power of PnP ACPI devices to D0 when they
      are activated and to D3 when they are disabled.  The latter is
      in correspondence with the ACPI 3.0 specification, whereas the
      former is added in order to be able to power up a device after
      it has been previously disabled (or when booting up a system).
      (As a consequence, the patch makes the PnP ACPI code more ACPI
      compliant.)
      
      Section 6.2.2 of the ACPI Specification (at least versions 1.0b
      and 3.0a) states: "Prior to running this control method [_DIS],
      the OS[PM] will have already put the device in the D3 state."
      Unfortunately, there is no clear statement as to when to put
      a device in the D0 state. :-( Therefore, the patch executes the
      method calls as _PS3/_DIS and _SRS/_PS0. What is clear: "If the
      device is disabled, _SRS enables the device at the specified
      resources." (From the ACPI 3.0a Specification.)
      
      The patch fixes a problem with some IBM ThinkPads (at least the
      600E and the 600X) where the serial ports have a dedicated
      power source that needs to be brought up before the serial port
      can be used.  Without this patch, the serial port is enabled
      but has no power. (In the past, the tpctl utility had to be
      utilized to turn on the power, but support for this feature
      stopped with version 5.9 as it did not support the more recent
      kernel versions.)
      
      The error handlers that handle any errors that can occur during
      the power up/power down phases return the error codes to the
      caller directly.  Comments welcome! :-)
      
      No regressions were observed on hardware that does not require
      this patch.
      
      The patch is applied against 2.6.27.x.
      Signed-off-by: NWitold Szczeponik <Witold.Szczeponik@gmx.net>
      Acked-by: NZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      6328a574
  14. 31 12月, 2008 1 次提交
  15. 23 10月, 2008 1 次提交
  16. 11 10月, 2008 2 次提交
  17. 10 10月, 2008 1 次提交
    • L
      PnP: move pnpacpi/pnpbios_init to after PCI init · ed458df4
      Linus Torvalds 提交于
      We already did that a long time ago for pnp_system_init, but
      pnpacpi_init and pnpbios_init remained as subsys_initcalls, and get
      linked into the kernel before the arch-specific routines that finalize
      the PCI resources (pci_subsys_init).
      
      This means that the PnP routines would either register their resources
      before the PCI layer could, or would be unable to check whether a PCI
      resource had already been registered.  Both are problematic.
      
      I wanted to do this before 2.6.27, but every time we change something
      like this, something breaks.  That said, _every_ single time we trust
      some firmware (like PnP tables) more than we trust the hardware itself
      (like PCI probing), the problems have been worse.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ed458df4
  18. 17 7月, 2008 1 次提交
  19. 12 6月, 2008 1 次提交
  20. 01 5月, 2008 1 次提交
  21. 29 4月, 2008 10 次提交
  22. 14 2月, 2008 1 次提交
  23. 13 1月, 2008 1 次提交
  24. 17 10月, 2007 2 次提交
  25. 24 8月, 2007 1 次提交
  26. 30 7月, 2007 1 次提交
  27. 27 7月, 2007 1 次提交