14 Dec, 2006

4 commits

  • platform_device_add_data() makes a copy of the data that is given to it,
    and thus the parameter can be const. This removes a warning when data
    from get_property() on powerpc is handed to platform_device_add_data(),
    as get_property() returns a const pointer.

    Signed-off-by: Scott Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Scott Wood
     
  • This function can be __init

    Cc: David Brownell
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Andrew Morton
     
  • Class virtual directory is created as the need arises.
    But it is not deleted when the class is unregistered.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Greg Kroah-Hartman

    Akinobu Mita
     
  • Run this:

    #!/bin/sh
    for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
    echo "De-casting $f..."
    perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
    done

    And then go through and reinstate those cases where code is casting pointers
    to non-pointers.

    And then drop a few hunks which conflicted with outstanding work.

    Cc: Russell King , Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Greg KH
    Cc: Jens Axboe
    Cc: Paul Fulghum
    Cc: Alan Cox
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Ian Kent
    Cc: Steven French
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

08 Dec, 2006

6 commits

  • * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (156 commits)
    [PATCH] x86-64: Export smp_call_function_single
    [PATCH] i386: Clean up smp_tune_scheduling()
    [PATCH] unwinder: move .eh_frame to RODATA
    [PATCH] unwinder: fully support linker generated .eh_frame_hdr section
    [PATCH] x86-64: don't use set_irq_regs()
    [PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq
    [PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM
    [PATCH] i386: replace kmalloc+memset with kzalloc
    [PATCH] x86-64: remove remaining pc98 code
    [PATCH] x86-64: remove unused variable
    [PATCH] x86-64: Fix constraints in atomic_add_return()
    [PATCH] x86-64: fix asm constraints in i386 atomic_add_return
    [PATCH] x86-64: Correct documentation for bzImage protocol v2.05
    [PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
    [PATCH] x86-64: Fix numaq build error
    [PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header
    [PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
    [PATCH] x86-64: Clarify error message in GART code
    [PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
    [PATCH] x86-64: Remove unwind stack pointer alignment forcing again
    ...

    Fixed conflict in include/linux/uaccess.h manually

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • There was lots of #ifdef noise in the kernel due to hotcpu_notifier(fn,
    prio) not correctly marking 'fn' as used in the !HOTPLUG_CPU case, and thus
    generating compiler warnings of unused symbols, hence forcing people to add
    #ifdefs.

    the compiler can skip truly unused functions just fine:

    text data bss dec hex filename
    1624412 728710 3674856 6027978 5bfaca vmlinux.before
    1624412 728710 3674856 6027978 5bfaca vmlinux.after

    [akpm@osdl.org: topology.c fix]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Do proper error-checking and propagation in drivers/base/memory.c, hence fix
    __must_check warnings.

    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • SLAB_KERNEL is an alias of GFP_KERNEL.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • SLAB_ATOMIC is an alias of GFP_ATOMIC

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • For node-aware skb allocations we need information about the node in struct
    net_device or struct device. Davem suggested to put it into struct device
    which this patch does.

    In particular:

    - struct device gets a new int numa_node member if CONFIG_NUMA is set
    - there are two new helpers, dev_to_node and set_dev_node to
    transparently deal with the non-numa case
    - for pci devices the node-info is set to the value we get from
    pcibus_to_node.

    Note that for some architectures pcibus_to_node doesn't work yet at the time
    we call it currently. This is harmless and will just mean skb allocations
    aren't node-local on this architectures until the implementation of
    pcibus_to_node on these architectures have been updated (There are patches for
    x86 and x86_64 floating around)

    [akpm@osdl.org: cleanup]
    Signed-off-by: Christoph Hellwig
    Cc: Christoph Lameter
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

07 Dec, 2006

1 commit


04 Dec, 2006

1 commit


02 Dec, 2006

16 commits

  • This defines a new platform_driver_probe() method allowing the driver's
    probe() method, and its support code+data, to safely live in __init
    sections for typical system configurations.

    Many system-on-chip processors could benefit from this API, to the tune
    of recovering hundreds to thousands of bytes per driver. That's memory
    which is currently wasted holding code which can never be called after
    system startup, yet can not be removed. It can't be removed because of
    the linkage requirement that pointers to init section code (like, ideally,
    probe support) must not live in other sections (like driver method tables)
    after those pointers would be invalid.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • As pointed out by Alan Stern, device_move needs to use klist_remove which waits
    until removal is complete.

    Signed-off-by: Cornelia Huck
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     
  • Provide a function device_move() to move a device to a new parent device. Add
    auxilliary functions kobject_move() and sysfs_move_dir().
    kobject_move() generates a new uevent of type KOBJ_MOVE, containing the
    previous path (DEVPATH_OLD) in addition to the usual values. For this, a new
    interface kobject_uevent_env() is created that allows to add further
    environmental data to the uevent at the kobject layer.

    Signed-off-by: Cornelia Huck
    Acked-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     
  • This patch makes the needlessly global setup_parent() static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • Introduce device_find_child() to match device_for_each_child().

    Signed-off-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     
  • Take return value of sysfs_create_group() into account. That function got
    called in case of CPU_ONLINE notification. Since callbacks are not allowed
    to fail on CPU_ONLINE notification do the sysfs group creation on
    CPU_UP_PREPARE notification.

    Also remember if creation succeeded in a bitmask. So it's possible to know
    whether it's legal to call sysfs_remove_group or not.

    In addition some other minor stuff:

    - since CPU_UP_PREPARE might fail add CPU_UP_CANCELED handling as well.
    - use hotcpu_notifier instead of register_hotcpu_notifier.
    - #ifdef code that isn't needed in the !CONFIG_HOTPLUG_CPU case.

    Signed-off-by: Heiko Carstens
    Acked-by: Cornelia Huck
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Heiko Carstens
     
  • Move the call to platform_notify_remove() to after the call to
    bus_remove_device(), where it belongs. It's bogus to notify the platform
    of removal while drivers are still attached to the device and possibly
    still operating since the platform might use this callback to tear down
    some resources used by the driver (ACPI bits, iommu table, ...)

    Signed-off-by: Benjamin Herrenschmidt
    Cc: "Brown, Len"
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     
  • Converts from using struct "class_device" to "struct device" making
    everything show up properly in /sys/devices/ with symlinks from the
    /sys/class directory.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Turn off class symlinks CONFIG_SYSFS_DEPRECATED is enabled.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Disable the PHYSDEV* uevent variables if CONFIG_SYSFS_DEPRECATED is
    enabled.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Turn off device symlinks CONFIG_SYSFS_DEPRECATED is enabled.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Turn off the bus symlinks if CONFIG_SYSFS_DEPRECATED is enabled

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • If CONFIG_SYSFS_DEPRECATED is enabled, old versions of udev will work
    properly with devices that are associated with a class.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • It doesn't need to be global or in device.h

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Create the "driver" link before the child device may be created by
    the probing logic. This makes it possible for userspace (udev), to
    determine the driver property of the parent device, at the time the
    child device is created.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • I finally did as you suggested and added the notifier to the struct
    bus_type itself. There are still problems to be expected is something
    attaches to a bus type where the code can hook in different struct
    device sub-classes (which is imho a big bogosity but I won't even try to
    argue that case now) but it will solve nicely a number of issues I've
    had so far.

    That also means that clients interested in registering for such
    notifications have to do it before devices are added and after bus types
    are registered. Fortunately, most bus types that matter for the various
    usage scenarios I have in mind are registerd at postcore_initcall time,
    which means I have a really nice spot at arch_initcall time to add my
    notifiers.

    There are 4 notifications provided. Device being added (before hooked to
    the bus) and removed (failure of previous case or after being unhooked
    from the bus), along with driver being bound to a device and about to be
    unbound.

    The usage I have for these are:

    - The 2 first ones are used to maintain a struct device_ext that is
    hooked to struct device.firmware_data. This structure contains for now a
    pointer to the Open Firmware node related to the device (if any), the
    NUMA node ID (for quick access to it) and the DMA operations pointers &
    iommu table instance for DMA to/from this device. For bus types I own
    (like IBM VIO or EBUS), I just maintain that structure directly from the
    bus code when creating the devices. But for bus types managed by generic
    code like PCI or platform (actually, of_platform which is a variation of
    platform linked to Open Firmware device-tree), I need this notifier.

    - The other two ones have a completely different usage scenario. I have
    cases where multiple devices and their drivers depend on each other. For
    example, the IBM EMAC network driver needs to attach to a MAL DMA engine
    which is a separate device, and a PHY interface which is also a separate
    device. They are all of_platform_device's (well, about to be with my
    upcoming patches) but there is no say in what precise order the core
    will "probe" them and instanciate the various modules. The solution I
    found for that is to have the drivers for emac to use multithread_probe,
    and wait for a driver to be bound to the target MAL and PHY control
    devices (the device-tree contains reference to the MAL and PHY interface
    nodes, which I can then match to of_platform_devices). Right now, I've
    been polling, but with that notifier, I can more cleanly wait (with a
    timeout of course).

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     

26 Nov, 2006

1 commit


29 Oct, 2006

1 commit

  • Put SYS_HYPERVISOR inside the Generic Driver Config menu where it should
    be. Otherwise xconfig displays it as a dangling (lost) menu item under
    Device Drivers, all by itself (when all options are displayed).

    Signed-off-by: Randy Dunlap
    Cc:
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

28 Oct, 2006

1 commit

  • The multithreaded-probing code has a problem: after one initcall level (eg,
    core_initcall) has been processed, we will then start processing the next
    level (postcore_initcall) while the kernel threads which are handling
    core_initcall are still executing. This breaks the guarantees which the
    layered initcalls previously gave us.

    IOW, we want to be multithreaded _within_ an initcall level, but not between
    different levels.

    Fix that up by causing the probing code to wait for all outstanding probes at
    one level to complete before we start processing the next level.

    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

19 Oct, 2006

9 commits