1. 12 5月, 2012 1 次提交
  2. 01 11月, 2011 1 次提交
  3. 07 1月, 2011 1 次提交
  4. 27 7月, 2010 1 次提交
  5. 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
  6. 28 1月, 2010 1 次提交
  7. 25 11月, 2009 1 次提交
  8. 29 8月, 2009 1 次提交
  9. 27 8月, 2009 2 次提交
  10. 18 6月, 2009 1 次提交
  11. 28 3月, 2009 1 次提交
    • B
      ACPI: call init_acpi_device_notify() explicitly rather than as initcall · 0e46517d
      Bjorn Helgaas 提交于
      This patch makes acpi_init() call init_acpi_device_notify() directly.
      Previously, init_acpi_device_notify() was an arch_initcall (sequence 3),
      so it was called before acpi_init() (a subsys_initcall at sequence 4).
      
      init_acpi_device_notify() sets the platform_notify and
      platform_notify_remove function pointers.  These pointers
      are not used until acpi_init() enumerates ACPI devices in
      this path:
      
          acpi_init()
      	    acpi_scan_init()
      		acpi_bus_scan()
      		    acpi_add_single_object()
      			acpi_device_register()
      			    device_add()
      				<use platform_notify>
      
      So it is sufficient to have acpi_init() call init_acpi_device_notify()
      directly before it enumerates devices.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      0e46517d
  12. 07 2月, 2009 1 次提交
  13. 08 11月, 2008 1 次提交
    • T
      ACPI: video: Ignore devices that aren't present in hardware · 22c13f9d
      Thomas Renninger 提交于
      This is a reimplemention of commit
      0119509c
      from Matthew Garrett <mjg59@srcf.ucam.org>
      
      This patch got removed because of a regression: ThinkPads with a
      Intel graphics card and an Integrated Graphics Device BIOS implementation
      stopped working.
      In fact, they only worked because the ACPI device of the discrete, the
      wrong one, got used (via int10). So ACPI functions were poking on the wrong
      hardware used which is a sever bug.
      The next patch provides support for above ThinkPads to be able to
      switch brightness via the legacy thinkpad_acpi driver and automatically
      detect when to use it.
      
      Original commit message from Matthew Garrett:
          Vendors often ship machines with a choice of integrated or discrete
          graphics, and use the same DSDT for both. As a result, the ACPI video
          module will locate devices that may not exist on this specific platform.
          Attempt to determine whether the device exists or not, and abort the
          device creation if it doesn't.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=9614Signed-off-by: NThomas Renninger <trenn@suse.de>
      Acked-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      22c13f9d
  14. 15 10月, 2008 1 次提交
  15. 13 10月, 2008 1 次提交
    • L
      Fix RTC wakealarm sysfs interface breakage. · 1efd325f
      Linus Torvalds 提交于
      Commit ed458df4 ("PnP: move
      pnpacpi/pnpbios_init to after PCI init") moved the PnP RTC discovery
      later, and now the ACPI RTC glue code doesn't find it any more, breaking
      the RTC wakealarm sysfs interfaces, as reported by Rafael.
      
      This really is fairly messy, and we have several annoying ordering
      constraints here - the PnP code that sets up the RTC resources wants to
      run after the PCI resources have to be registered, which in turn needs
      to run after ACPI has at least enumerated the root PCI buses etc.  Our
      initcall ordering is not fine-grained enough to make this all painless.
      
      So this moves the ACPI RTC glue ("acpi_rtc_init()") down to a regular
      module call, which fixes the problem Rafael has.  The reason this isn't
      wonderful is that we really should do acpi_rtc_init before we do the
      rtc_cmos init, and now those two are in the same module_init() section.
      
      Which happens to work, but only because drivers/rtc is linked after
      drivers/acpi.  In other words, we still have a very subtle ordering
      issue here. Grr.
      Reported-and-tested-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NDavid Brownell <david-b@pacbell.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1efd325f
  16. 04 10月, 2008 1 次提交
  17. 22 7月, 2008 1 次提交
  18. 21 7月, 2008 1 次提交
  19. 18 7月, 2008 1 次提交
  20. 17 7月, 2008 1 次提交
  21. 08 7月, 2008 1 次提交
    • R
      PCI ACPI: Rework PCI handling of wake-up · eb9d0fe4
      Rafael J. Wysocki 提交于
      * Introduce function acpi_pm_device_sleep_wake() for enabling and
        disabling the system wake-up capability of devices that are power
        manageable by ACPI.
      
      * Introduce function acpi_bus_can_wakeup() allowing other (dependent)
        subsystems to check if ACPI is able to enable the system wake-up
        capability of given device.
      
      * Introduce callback .sleep_wake() in struct pci_platform_pm_ops and
        for the ACPI PCI 'driver' make it use acpi_pm_device_sleep_wake().
      
      * Introduce callback .can_wakeup() in struct pci_platform_pm_ops and
        for the ACPI 'driver' make it use acpi_bus_can_wakeup().
      
      * Move the PME# handlig code out of pci_enable_wake() and split it
        into two functions, pci_pme_capable() and pci_pme_active(),
        allowing the caller to check if given device is capable of
        generating PME# from given power state and to enable/disable the
        device's PME# functionality, respectively.
      
      * Modify pci_enable_wake() to use the new ACPI callbacks and the new
        PME#-related functions.
      
      * Drop the generic .platform_enable_wakeup() callback that is not
        used any more.
      
      * Introduce device_set_wakeup_capable() that will set the
        power.can_wakeup flag of given device.
      
      * Rework PCI device PM initialization so that, if given device is
        capable of generating wake-up events, either natively through the
        PME# mechanism, or with the help of the platform, its
        power.can_wakeup flag is set and its power.should_wakeup flag is
        unset as appropriate.
      
      * Make ACPI set the power.can_wakeup flag for devices found to be
        wake-up capable by it.
      
      * Make the ACPI wake-up code enable/disable GPEs for devices that
        have the wakeup.flags.prepared flag set (which means that their
        wake-up power has been enabled).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      eb9d0fe4
  22. 26 6月, 2008 1 次提交
    • V
      ACPI: don't walk tables if ACPI was disabled · 4389ed2f
      Vegard Nossum 提交于
      Ingo Molnar wrote:
      > -tip auto-testing started triggering this spinlock corruption message
      > yesterday:
      >
      > [    3.976213] calling  acpi_rtc_init+0x0/0xd3
      > [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
      > [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
      > [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0
      
      This is apparently because some parts of ACPI, including mutexes, are not
      initialized when acpi=off is passed to the kernel.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4389ed2f
  23. 12 6月, 2008 1 次提交
  24. 23 2月, 2008 1 次提交
    • D
      ACPI: crosslink ACPI and "real" device nodes · 1071695f
      David Brownell 提交于
      Add cross-links between ACPI device and "real" devices in sysfs,
      exposing otherwise-hidden interrelationships between the various
      device nodes for ACPI stuff.  As a representative example, one
      hardware device is exposed as two logical devices (PNP and ACPI):
      
        .../pnp0/00:06/
        .../LNXSYSTM:00/device:00/PNP0A03:00/device:15/PNP0B00:00/
      
      The PNP device gets a "firmware_node" link pointing to the ACPI device,
      and is what a Linux device driver binds to.  The ACPI device has instead
      a "physical_node" link pointing back to the PNP device.  Other firmware
      frameworks, like OpenFirmware, could do the same thing to couple their
      firmware tables to the rest of the system.
      
      (Based on a patch from Zhang Rui.  This version is modified to not
      depend on the patch makig ACPI initialize driver model wakeup flags.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1071695f
  25. 07 2月, 2008 1 次提交
    • A
      ACPI: misc cleanups · e5685b9d
      Adrian Bunk 提交于
          This patch contains the following possible cleanups:
          - make the following needlessly global code static:
            - drivers/acpi/bay.c:dev_attr_eject
            - drivers/acpi/bay.c:dev_attr_present
            - drivers/acpi/dock.c:dev_attr_docked
            - drivers/acpi/dock.c:dev_attr_flags
            - drivers/acpi/dock.c:dev_attr_uid
            - drivers/acpi/dock.c:dev_attr_undock
            - drivers/acpi/pci_bind.c:acpi_pci_unbind()
            - drivers/acpi/pci_link.c:acpi_link_lock
            - drivers/acpi/sbs.c:acpi_sbs_callback()
            - drivers/acpi/sbshc.c:acpi_smbus_transaction()
            - drivers/acpi/sleep/main.c:acpi_sleep_prepare()
          - #if 0 the following unused global functions:
            - drivers/acpi/numa.c:acpi_unmap_pxm_to_node()
          - remove the following unused EXPORT_SYMBOL's:
            - acpi_register_gsi
            - acpi_unregister_gsi
            - acpi_strict
            - acpi_bus_receive_event
            - register_acpi_bus_type
            - unregister_acpi_bus_type
            - acpi_os_printf
            - acpi_os_sleep
            - acpi_os_stall
            - acpi_os_read_pci_configuration
            - acpi_os_create_semaphore
            - acpi_os_delete_semaphore
            - acpi_os_wait_semaphore
            - acpi_os_signal_semaphore
            - acpi_os_signal
            - acpi_pci_irq_enable
            - acpi_get_pxm
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e5685b9d
  26. 22 7月, 2007 1 次提交
  27. 09 5月, 2007 2 次提交
  28. 16 2月, 2007 1 次提交
  29. 09 2月, 2007 1 次提交
  30. 17 1月, 2007 1 次提交
  31. 02 12月, 2006 1 次提交
  32. 27 10月, 2006 1 次提交
    • C
      ACPI: optimize pci_rootbridge search · 2f000f5c
      Chen, Justin 提交于
      acpi_get_pci_rootbridge_handle() walks the ACPI name space
      searching for seg, bus and the PCI_ROOT_HID_STRING --
      returning the handle as soon as if find the match.
      
      But the current codes always parses through the whole namespace because
      the user_function find_pci_rootbridge() returns status=AE_OK when it finds the match.
      
      Make the find_pci_rootbridge() return AE_CTRL_TERMINATE when it finds the match.
      This reduces the ACPI namespace walk for acpi_get_pci_rootbridge_handle().
      Signed-off-by: NJustin Chen <justin.chen@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2f000f5c
  33. 14 10月, 2006 1 次提交
  34. 30 6月, 2006 1 次提交
  35. 10 12月, 2005 1 次提交
    • B
      [ACPI] ACPICA 20050930 · 50eca3eb
      Bob Moore 提交于
      Completed a major overhaul of the Resource Manager code -
      specifically, optimizations in the area of the AML/internal
      resource conversion code. The code has been optimized to
      simplify and eliminate duplicated code, CPU stack use has
      been decreased by optimizing function parameters and local
      variables, and naming conventions across the manager have
      been standardized for clarity and ease of maintenance (this
      includes function, parameter, variable, and struct/typedef
      names.)
      
      All Resource Manager dispatch and information tables have
      been moved to a single location for clarity and ease of
      maintenance. One new file was created, named "rsinfo.c".
      
      The ACPI return macros (return_ACPI_STATUS, etc.) have
      been modified to guarantee that the argument is
      not evaluated twice, making them less prone to macro
      side-effects. However, since there exists the possibility
      of additional stack use if a particular compiler cannot
      optimize them (such as in the debug generation case),
      the original macros are optionally available.  Note that
      some invocations of the return_VALUE macro may now cause
      size mismatch warnings; the return_UINT8 and return_UINT32
      macros are provided to eliminate these. (From Randy Dunlap)
      
      Implemented a new mechanism to enable debug tracing for
      individual control methods. A new external interface,
      acpi_debug_trace(), is provided to enable this mechanism. The
      intent is to allow the host OS to easily enable and disable
      tracing for problematic control methods. This interface
      can be easily exposed to a user or debugger interface if
      desired. See the file psxface.c for details.
      
      acpi_ut_callocate() will now return a valid pointer if a
      length of zero is specified - a length of one is used
      and a warning is issued. This matches the behavior of
      acpi_ut_allocate().
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      50eca3eb
  36. 11 11月, 2005 1 次提交
    • R
      [PATCH] pciehp: clean-up how we request control of hotplug hardware · a3a45ec8
      rajesh.shah@intel.com 提交于
      This patch further tweaks how we request control of hotplug
      controller hardware from BIOS. We first search the ACPI namespace
      corresponding to a specific hotplug controller looking for an
      _OSC or OSHP method. On failure, we successively move to the
      ACPI parent object, till we hit the highest level host bridge
      in the hierarchy. This allows for different types of BIOS's
      which place the _OSC/OSHP methods at various places in the acpi
      namespace, while still not encroaching on the namespace of
      some other root level host bridge.
      
      This patch also introduces a new load time option (pciehp_force)
      that allows us to bypass all _OSC/OSHP checking. Not supporting
      these methods seems to be be the most common ACPI firmware problem
      we've run into. This will still _not_ allow the pciehp driver to
      work correctly if the BIOS really doesn't support pciehp (i.e. if
      it doesn't generate a hotplug interrupt). Use this option with
      caution.  Some BIOS's may deliberately not build any _OSC/OSHP
      methods to make sure it retains control the hotplug hardware.
      Using the pciehp_force parameter for such systems can lead to
      two separate entities trying to control the same hardware.
      Signed-off-by: NRajesh Shah <rajesh.shah@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a3a45ec8
  37. 20 10月, 2005 1 次提交
  38. 22 9月, 2005 1 次提交