16 May, 2008

1 commit

  • Everybody wants to pass it a function pointer, and in fact, that is what
    you _must_ pass it for it to make sense (since it knows that ia64 and
    ppc64 use descriptors for function pointers and fetches the actual
    address from there).

    So don't make the argument be a 'unsigned long' and force everybody to
    add a cast.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

15 May, 2008

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
    Driver core: struct class remove children list
    block: do_mounts - accept root=

    Linus Torvalds
     
  • because of the class_device was removed, now do the children list removing

    Signed-off-by: Dave Young
    Signed-off-by: Greg Kroah-Hartman

    Dave Young
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (73 commits)
    net: Fix typo in net/core/sock.c.
    ppp: Do not free not yet unregistered net device.
    netfilter: xt_iprange: module aliases for xt_iprange
    netfilter: ctnetlink: dump conntrack ID in event messages
    irda: Fix a misalign access issue. (v2)
    sctp: Fix use of uninitialized pointer
    cipso: Relax too much careful cipso hash function.
    tcp FRTO: work-around inorder receivers
    tcp FRTO: Fix fallback to conventional recovery
    New maintainer for Intel ethernet adapters
    DM9000: Use delayed work to update MII PHY state
    DM9000: Update and fix driver debugging messages
    DM9000: Add __devinit and __devexit attributes to probe and remove
    sky2: fix simple define thinko
    [netdrvr] sfc: sfc: Add self-test support
    [netdrvr] sfc: Increment rx_reset when reported as driver event
    [netdrvr] sfc: Remove unused macro EFX_XAUI_RETRAIN_MAX
    [netdrvr] sfc: Fix code formatting
    [netdrvr] sfc: Remove kernel-doc comments for removed members of struct efx_nic
    [netdrvr] sfc: Remove garbage from comment
    ...

    Linus Torvalds
     

13 May, 2008

1 commit


07 May, 2008

1 commit


01 May, 2008

3 commits


30 Apr, 2008

1 commit

  • Fuse will use temporary buffers to write back dirty data from memory mappings
    (normal writes are done synchronously). This is needed, because there cannot
    be any guarantee about the time in which a write will complete.

    By using temporary buffers, from the MM's point if view the page is written
    back immediately. If the writeout was due to memory pressure, this
    effectively migrates data from a full zone to a less full zone.

    This patch adds a new counter (NR_WRITEBACK_TEMP) for the number of pages used
    as temporary buffers.

    [Lee.Schermerhorn@hp.com: add vmstat_text for NR_WRITEBACK_TEMP]
    Signed-off-by: Miklos Szeredi
    Cc: Christoph Lameter
    Signed-off-by: Lee Schermerhorn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

29 Apr, 2008

2 commits

  • …nux-2.6-x86-bigbox-pci

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci:
    x86: add pci=check_enable_amd_mmconf and dmi check
    x86: work around io allocation overlap of HT links
    acpi: get boot_cpu_id as early for k8_scan_nodes
    x86_64: don't need set default res if only have one root bus
    x86: double check the multi root bus with fam10h mmconf
    x86: multi pci root bus with different io resource range, on 64-bit
    x86: use bus conf in NB conf fun1 to get bus range on, on 64-bit
    x86: get mp_bus_to_node early
    x86 pci: remove checking type for mmconfig probe
    x86: remove unneeded check in mmconf reject
    driver core: try parent numa_node at first before using default
    x86: seperate mmconf for fam10h out from setup_64.c
    x86: if acpi=off, force setting the mmconf for fam10h
    x86_64: check MSR to get MMCONFIG for AMD Family 10h
    x86_64: check and enable MMCONFIG for AMD Family 10h
    x86_64: set cfg_size for AMD Family 10h in case MMCONFIG
    x86: mmconf enable mcfg early
    x86: clear pci_mmcfg_virt when mmcfg get rejected
    x86: validate against acpi motherboard resources

    Fixed up fairly trivial conflicts in arch/x86/pci/{init.c,pci.h} due to
    OLPC support manually.

    Linus Torvalds
     
  • Before requesting firmware, printk a message saying what we're requesting. This
    makes it easier to see what's going on, and provides an explanation for the
    huge silent delay that one would otherwise get after accidentally building
    ipw2200 as a non-module.

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

    Ciaran McCreesh
     

27 Apr, 2008

1 commit


23 Apr, 2008

2 commits


22 Apr, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
    SCSI: convert struct class_device to struct device
    DRM: remove unused dev_class
    IB: rename "dev" to "srp_dev" in srp_host structure
    IB: convert struct class_device to struct device
    memstick: convert struct class_device to struct device
    driver core: replace remaining __FUNCTION__ occurrences
    sysfs: refill attribute buffer when reading from offset 0
    PM: Remove destroy_suspended_device()
    Firmware: add iSCSI iBFT Support
    PM: Remove legacy PM (fix)
    Kobject: Replace list_for_each() with list_for_each_entry().
    SYSFS: Explicitly include required header file slab.h.
    Driver core: make device_is_registered() work for class devices
    PM: Convert wakeup flag accessors to inline functions
    PM: Make wakeup flags available whenever CONFIG_PM is set
    PM: Fix misuse of wakeup flag accessors in serial core
    Driver core: Call device_pm_add() after bus_add_device() in device_add()
    PM: Handle device registrations during suspend/resume
    block: send disk "change" event for rescan_partitions()
    sysdev: detect multiple driver registrations
    ...

    Fixed trivial conflict in include/linux/memory.h due to semaphore header
    file change (made irrelevant by the change to mutex).

    Linus Torvalds
     
  • * 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
    Deprecate the asm/semaphore.h files in feature-removal-schedule.
    Convert asm/semaphore.h users to linux/semaphore.h
    security: Remove unnecessary inclusions of asm/semaphore.h
    lib: Remove unnecessary inclusions of asm/semaphore.h
    kernel: Remove unnecessary inclusions of asm/semaphore.h
    include: Remove unnecessary inclusions of asm/semaphore.h
    fs: Remove unnecessary inclusions of asm/semaphore.h
    drivers: Remove unnecessary inclusions of asm/semaphore.h
    net: Remove unnecessary inclusions of asm/semaphore.h
    arch: Remove unnecessary inclusions of asm/semaphore.h

    Linus Torvalds
     

20 Apr, 2008

15 commits

  • It's big, but there doesn't seem to be a way to split it up smaller...

    Signed-off-by: Tony Jones
    Signed-off-by: Kay Sievers
    Cc: Roland Dreier
    Cc: Sean Hefty
    Cc: Hal Rosenstock
    Cc: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Tony Jones
     
  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Signed-off-by: Greg Kroah-Hartman

    Harvey Harrison
     
  • After 2.6.24 there was a plan to make the PM core acquire all device
    semaphores during a suspend/hibernation to protect itself from
    concurrent operations involving device objects. That proved to be
    too heavy-handed and we found a better way to achieve the goal, but
    before it happened, we had introduced the functions
    device_pm_schedule_removal() and destroy_suspended_device() to allow
    drivers to "safely" destroy a suspended device and we had adapted some
    drivers to use them. Now that these functions are no longer necessary,
    it seems reasonable to remove them and modify their users to use the
    normal device unregistration instead.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • device_is_registered() can use the kobject value for this, so it will
    now work with devices that are associated with only a class, not a bus
    and a driver.

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

    Greg Kroah-Hartman
     
  • The various wakeup flags and their accessor macros in struct
    dev_pm_info should be available whenever CONFIG_PM is enabled, not
    just when CONFIG_PM_SLEEP is on. Otherwise remote wakeup won't always
    be configurable for runtime power management. This patch (as1056b)
    fixes the oversight.

    David Brownell adds:
    More accurately, fixes the "regression" ... as noted sometime
    last summer, after 296699de6bdc717189a331ab6bbe90e05c94db06
    introduced CONFIG_SUSPEND. But that didn't make the regression
    list for that kernel, ergo the delay in fixing it.

    [rjw: rebased]

    Signed-off-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Include dpm_sysfs_add() into device_pm_add(), in analogy with
    device_pm_remove(), and modify device_add() to call the latter after
    bus_add_device(), to avoid situations in which the PM core may
    attempt to suspend a device the registration of which has not been
    successful.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • Modify the PM core to protect its data structures, specifically the
    dpm_active list, from being corrupted if a child of the currently
    suspending device is registered concurrently with its ->suspend()
    callback. In that case, since the new device (the child) is added
    to dpm_active after its parent, the PM core will attempt to
    suspend it after the parent, which is wrong.

    Introduce a new member of struct dev_pm_info, called 'sleeping',
    and use it to check if the parent of the device being added to
    dpm_active has been suspended, in which case the device registration
    fails. Also, use 'sleeping' for checking if the ordering of devices
    on dpm_active is correct.

    Introduce variable 'all_sleeping' that will be set to 'true' once all
    devices have been suspended and make new device registrations fail
    until 'all_sleeping' is reset to 'false', in order to avoid having
    unsuspended devices around while the system is going into a sleep state.

    Remove pm_sleep_rwsem which is not necessary any more.

    Special thanks to Alan Stern for discussions and suggestions that
    lead to the creation of this patch.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • I've just found how easy it is to accidentally register a sysdev_driver for
    two different classes. When this happens, bad things happen as the
    sysdev_driver structure keeps has the list entry for the driver
    registration.

    The following patch makes a WARN_ON() if this happens, although I think
    BUG_ON or returning -EAGAIN could also be valid responses to this.

    Signed-off-by: Ben Dooks
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Ben Dooks
     
  • Fix following warning:
    WARNING: vmlinux.o(.text+0x64609c): Section mismatch in reference from the function store_online() to the function .cpuinit.text:cpu_up()

    store_online() is defined inside a HOTPLUG_CPU block so references are OK.
    Ignore references by annotating store_online() with __ref.

    Note: This is needed because cpu_up() most likely should not have been
    __cpuinit but all the hotplug cpu code misuses the __cpuinit annotation.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Sam Ravnborg
     
  • power_state is scheduled for removal, and it is used only for debug
    prints by driver core. Remove it.

    Signed-off-by: Pavel Machek
    Signed-off-by: Greg Kroah-Hartman

    Pavel Machek
     
  • register_memory()/unregister_memory() never gets called with
    "root". unregister_memory() is accessing kobject_name of
    the object just freed up. Since no one uses the code,
    lets take the code out. And also, make register_memory() static.

    Another bug fix - before calling unregister_memory()
    remove_memory_block() gets a ref on kobject. unregister_memory()
    need to drop that ref before calling sysdev_unregister().

    Signed-off-by: Badari Pulavarty
    Signed-off-by: Greg Kroah-Hartman

    Badari Pulavarty
     
  • Signed-off-by: Daniel Walker
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Daniel Walker
     
  • * Add cpu_sysdev_class functions to display the following maps
    with cpulist_scnprintf().

    cpu_online_map
    cpu_present_map
    cpu_possible_map

    * Small change to include/linux/sysdev.h to allow the attribute
    name and label to be different (to avoid collision with the
    "attr_online" entry for bringing cpus on- and off-line.)

    Cc: H. Peter Anvin
    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • * Cleaned up references to cpumask_scnprintf() and added new
    cpulist_scnprintf() interfaces where appropriate.

    * Fix some small bugs (or code efficiency improvments) for various uses
    of cpumask_scnprintf.

    * Clean up some checkpatch errors.

    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • * Use new node_to_cpumask_ptr. This creates a pointer to the
    cpumask for a given node. This definition is in mm patch:

    asm-generic-add-node_to_cpumask_ptr-macro.patch

    * Use new set_cpus_allowed_ptr function.

    Depends on:
    [mm-patch]: asm-generic-add-node_to_cpumask_ptr-macro.patch
    [sched-devel]: sched: add new set_cpus_allowed_ptr function
    [x86/latest]: x86: add cpus_scnprintf function

    Cc: Greg Kroah-Hartman
    Cc: Greg Banks
    Cc: H. Peter Anvin
    Signed-off-by: Mike Travis
    Signed-off-by: Ingo Molnar

    Mike Travis
     

19 Apr, 2008

1 commit


08 Apr, 2008

1 commit

  • Every current transport class calls transport_container_release but
    ignores the return value. This is catastrophic if it returns an error
    because the containers are part of a global list and the next action of
    almost every transport class is to free the memory used by the
    container.

    Fix this by making transport_container_release a void, but making it BUG
    if attribute_container_release returns an error ... this catches the
    root cause of a system panic much earlier. If we don't do this, we get
    an eventual BUG when the attribute container list notices the corruption
    caused by the freed memory it's still referencing.

    Also made attribute_container_release __must_check as a reminder.

    Cc: Greg KH
    Signed-off-by: James Bottomley

    James Bottomley
     

29 Mar, 2008

1 commit

  • The Coverity checker spotted that we leak the storage allocated to 'name' in
    int driver_add_kobj(). The leak looks legit to me - this is the code :

    int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
    const char *fmt, ...)
    {
    va_list args;
    char *name;
    int ret;

    va_start(args, fmt);
    name = kvasprintf(GFP_KERNEL, fmt, args);
    ^^^^^^^^ This dynamically allocates space...

    va_end(args);

    if (!name)
    return -ENOMEM;

    return kobject_add(kobj, &drv->p->kobj, "%s", name);
    ^^^^^^^^ This neglects to free the space allocated
    }

    Inside kobject_add() a copy of 'name' will be made and used. As far as I can
    see, Coverity is correct in flagging this as a leak, but I'd like some
    configmation before the patch is applied.

    This should fix it.

    Signed-off-by: Jesper Juhl
    Cc: Greg KH
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     

25 Mar, 2008

1 commit


11 Mar, 2008

2 commits

  • There's a bug in the current implementation of dma_get_required_mask()
    where it ands the returned mask with the current device mask. This
    rather defeats the purpose if you're using the call to determine what
    your mask should be (since you will at that time have the default
    DMA_32BIT_MASK). This bug results in any driver that uses this function
    *always* getting a 32 bit mask, which is wrong.

    Fix by removing the and with dev->dma_mask.

    Signed-off-by: James Bottomley
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    James Bottomley
     
  • We need to initialize the kobject for a sysdev_class as it could have
    been recycled (stupid static kobjects...)

    We also do the same thing in case sysdev devices are being
    re-registered.

    Thanks to Balaji Rao for pointing out the
    problem.

    Signed-off-by: Balaji Rao
    Tested-by: Mikael Pettersson
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Mar, 2008

2 commits