13 Jan, 2012

1 commit


30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

25 Nov, 2009

1 commit

  • The existing interface only has a pre-order callback. This change
    adds an additional parameter for a post-order callback which will
    be more useful for bus scans. ACPICA BZ 779.

    Also update the external calls to acpi_walk_namespace.

    http://www.acpica.org/bugzilla/show_bug.cgi?id=779

    Signed-off-by: Lin Ming
    Signed-off-by: Bob Moore
    Signed-off-by: Len Brown

    Lin Ming
     

19 Sep, 2009

2 commits


01 Sep, 2009

1 commit

  • Similar to commit b6adc195 (PCI hotplug: acpiphp wants a 64-bit
    _SUN), pci_slot.ko reads and creates sysfs directories based on
    the _SUN method.

    Certain HP platforms return 64 bits in _SUN. This change to
    pci_slot.ko allows us to see the correct sysfs directories.

    Reported-by: Chad Smith
    Cc: stable@kernel.org
    Signed-off-by: Alex Chiang
    Signed-off-by: Len Brown

    Alex Chiang
     

07 Apr, 2009

1 commit

  • If a logical hot unplug (remove) is performed on a physical PCI slot's
    parent bridge, and then pci_slot is unloaded, we will encounter an oops:

    [] kobject_release+0x9a/0x290
    [] ? kobject_release+0x0/0x290
    [] kref_put+0x37/0x80
    [] kobject_put+0x27/0x60
    [] ? pci_destroy_slot+0x3c/0xc0
    [] pci_destroy_slot+0x45/0xc0
    [] acpi_pci_slot_remove+0x5c/0x91 [pci_slot]
    [] acpi_pci_unregister_driver+0x4b/0x62
    [] acpi_pci_slot_exit+0x10/0x12 [pci_slot]
    [] sys_delete_module+0x161/0x250

    We need to grab a reference to the parent PCI bus, which will pin
    the bus and prevent it from being released until pci_slot is unloaded.

    Cc: lenb@kernel.org
    Reviewed-by: Kenji Kaneshige
    Tested-by: Kenji Kaneshige
    Reported-by: Kenji Kaneshige
    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     

24 Oct, 2008

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (123 commits)
    dock: make dock driver not a module
    ACPI: fix ia64 build warning
    ACPI: hack around sysfs warning with link order
    ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n
    intel_menlo: fix build warning
    panasonic-laptop: fix build
    ACPICA: Update version to 20080926
    ACPICA: Add support for zero-length buffer-to-string conversions
    ACPICA: New: Validation for predefined ACPI methods/objects
    ACPICA: Fix for implicit return compatibility
    ACPICA: Fixed a couple memory leaks associated with "implicit return"
    ACPICA: Optimize buffer allocation procedure
    ACPICA: Fix possible memory leak, error exit path
    ACPICA: Fix fault after mem allocation failure in AML parser
    ACPICA: Remove unused ACPI register bit definition
    ACPICA: Update version to 20080829
    ACPICA: Fix possible memory leak in acpi_ns_get_external_pathname
    ACPICA: Cleanup for internal Reference Object
    ACPICA: Update comments - no functional changes
    ACPICA: Update for Reference ACPI_OPERAND_OBJECT
    ...

    Linus Torvalds
     

23 Oct, 2008

1 commit

  • Slot detection drivers can co-exist with hotplug drivers. The names
    of the detected/claimed slots may be different depending on module
    load order.

    For legacy reasons, we need to allow hotplug drivers to override
    the slot name if a detection driver is loaded first (and they find
    the same slots).

    Creating and overriding slot names should be an atomic operation,
    otherwise you get a locking nightmare as various drivers race to
    call pci_create_slot().

    pci_create_slot() is already serialized by grabbing the pci_bus_sem.

    We update the API and add a 'hotplug' param, which is:

    set if the caller is a hotplug driver
    NULL if the caller is a detection driver

    pci_create_slot() does not actually use the 'hotplug' parameter in this
    patch. A later patch will add the logic that uses it.

    Cc: kristen.c.accardi@intel.com
    Cc: matthew@wil.cx
    Acked-by: Kenji Kaneshige
    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     

11 Oct, 2008

1 commit

  • As of version 2.0, ACPI can return 64-bit integers. The current
    acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms.
    Change the argument to take a pointer to an acpi_integer so we support
    64-bit integers on all platforms.

    lenb: replaced use of "acpi_integer" with "unsigned long long"
    lenb: fixed bug in acpi_thermal_trips_update()

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Len Brown

    Matthew Wilcox
     

29 Jul, 2008

1 commit


23 Jul, 2008

1 commit

  • Juha Leppnen noticed that an error path in register_slot() wasn't
    returning appropriately, leading to a condition where we might access a
    kfree'ed pointer, so let's fix that.

    Additionally, fix up the copyright information in the file while
    we're in there.

    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     

11 Jun, 2008

1 commit

  • Detect all physical PCI slots as described by ACPI, and create entries in
    /sys/bus/pci/slots/.

    Not all physical slots are hotpluggable, and the acpiphp module does not
    detect them. Now we know the physical PCI geography of our system, without
    caring about hotplug.

    [kaneshige.kenji@jp.fujitsu.com: export-kobject_rename-for-pci_hotplug_core]
    Signed-off-by: Kenji Kaneshige
    Acked-by: Greg KH
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix build with CONFIG_DMI=n]
    Signed-off-by: Alex Chiang
    Cc: Greg KH
    Cc: Kristen Carlson Accardi
    Cc: Len Brown
    Acked-by: Len Brown
    Acked-by: Kenji Kaneshige
    Signed-off-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Jesse Barnes

    Alex Chiang