25 May, 2010

1 commit

  • Add a per-node sysfs file called compact. When the file is written to,
    each zone in that node is compacted. The intention that this would be
    used by something like a job scheduler in a batch system before a job
    starts so that the job can allocate the maximum number of hugepages
    without significant start-up cost.

    Signed-off-by: Mel Gorman
    Acked-by: Rik van Riel
    Reviewed-by: KOSAKI Motohiro
    Reviewed-by: Christoph Lameter
    Reviewed-by: Minchan Kim
    Reviewed-by: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

22 May, 2010

19 commits

  • In this code section the final S of CONFIG_MODULES was missed making
    the whole check useless

    Signed-off-by: Christoph Egger
    Cc: Mark McLoughlin
    Signed-off-by: Greg Kroah-Hartman

    Christoph Egger
     
  • This allows bin_attr->read,write,mmap callbacks to check file specific data
    (such as inode owner) as part of any privilege validation.

    Signed-off-by: Chris Wright
    Signed-off-by: Greg Kroah-Hartman

    Chris Wright
     
  • device_del and device_rename were modified to use
    sysfs_delete_link and sysfs_rename_link respectively to ensure
    when these operations happen on devices whose classes
    are in namespace directories they work properly.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Benjamin Thery
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Move complete knowledge of namespaces into the kobject layer
    so we can use that information when reporting kobjects to
    userspace.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • While device_shutdown() walks through devices_kset to shutdown all
    devices, device unplug events may race to shutdown individual devices.
    Specifically, sd_shutdown(), on behalf of fc_starget_delete(), has
    been observed deleting devices during device_shutdown()'s list
    traversal. So we factor out list_for_each_entry_safe_reverse(...) in
    favor of while (!list_empty(...)).

    Signed-off-by: Hugh Daschbach
    Signed-off-by: Greg Kroah-Hartman

    Hugh Daschbach
     
  • fw_id has the same life time as firmware_priv so it makes sense to move
    it into firmware_priv structure instead of allocating separately.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • Split builtin firmware handling into separate functions to clean up the
    main body of code.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • Do not create 'timeout' attribute manually, let driver core do it for us.
    This also ensures that attribute is cleaned up properly.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • When we use request_firmware_nowait(), userspace may
    not want to answer negatively right away when for
    example it is answering from an initrd only, but
    with request_firmware() it has to in order to not
    delay the kernel boot until the request times out.

    This allows userspace to differentiate between the
    two in order to be able to reply negatively to async
    requests only when all filesystems have been mounted
    and have been checked for the requested firmware file.

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

    Johannes Berg
     
  • The conversion of device->sem to device->mutex resulted in lockdep
    warnings. Create a novalidate class for now until the driver folks
    come up with separate classes. That way we have at least the basic
    mutex debugging coverage.

    Add a checkpatch error so the usage is reserved for device->mutex.

    [ tglx: checkpatch and compile fix for LOCKDEP=n ]

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Peter Zijlstra
     
  • The semaphore is semantically a mutex. Convert it to a real mutex and
    fix up a few places where code was relying on semaphore.h to be included
    by device.h, as well as the users of the trylock function, as that value
    is now reversed.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • When runtime PM for platform_bus was added, it allowed for platforms
    to customize the runtime PM methods since they are defined as weak
    symbols.

    This patch allows platforms to also extend the system PM methods with
    custom hooks so runtime PM and system PM extensions can be managed
    together by custom platform-specific code.

    Signed-off-by: Kevin Hilman
    Cc: Magnus Damm
    Cc: Rafael Wysocki
    Cc: Dmitry Torokhov
    Cc: Eric Miao
    Signed-off-by: Greg Kroah-Hartman

    Kevin Hilman
     
  • Make devtmpfs available on (embedded) configurations without SHMEM/TMPFS,
    using ramfs instead.

    Saves ~15KB.

    Signed-off-by: Peter Korsgaard
    Acked-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Peter Korsgaard
     
  • kasprintf combines kmalloc and sprintf, and takes care of the size
    calculation itself.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression a,flag;
    expression list args;
    statement S;
    @@

    a =
    - \(kmalloc\|kzalloc\)(...,flag)
    + kasprintf(flag,args)

    - sprintf(a,args);
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Greg Kroah-Hartman

    Julia Lawall
     
  • This patch (as1351) removes an unnecessary and unwanted assignment
    from device_initialize(). The wakeup flags are set to 0 along with
    everything else when the device structure is allocated, so we don't
    need to do it again. Furthermore, the subsystem might already have
    set these flags to their correct values; we don't want to override it.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch fix a potential race condition in the driver_bound() function
    in the file driver/base/dd.c.

    The broadcast of the BUS_NOTIFY_BOUND_DRIVER notifier should be done
    after adding the new device to the driver list. Otherwise notifier
    listener will fail if they use functions like usb_find_interface().

    The patch is against kernel 2.6.33. Please merge it.

    Signed-off-by: Stefani Seibold
    Signed-off-by: Greg Kroah-Hartman

    Stefani Seibold
     
  • The messages from _request_firmware() informing that firmware is
    being requested or built-in firmware is going to be used are printed
    at KERN_INFO, which produces lots of noise on systems with huge
    numbers of AMD CPUs. Reduce the level of these messages to
    KERN_DEBUG to get rid of that noise.

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

    Rafael J. Wysocki
     
  • fix memory leak introduced by the patch 6e03a201bbe:
    firmware: speed up request_firmware()

    1. vfree won't release pages there were allocated explicitly and mapped
    using vmap. The memory has to be vunmap-ed and the pages needs
    to be freed explicitly

    2. page array is moved into the 'struct
    firmware' so that we can free it from release_firmware()
    and not only in fw_dev_release()

    The fix doesn't break the firmware load speed.

    Cc: Johannes Berg
    Cc: Ming Lei
    Cc: Catalin Marinas
    Singed-off-by: Kay Sievers
    Signed-off-by: David Woodhouse
    Signed-off-by: Tomas Winkler
    Signed-off-by: Greg Kroah-Hartman

    David Woodhouse
     
  • Without CONFIG_CPUMASK_OFFSTACK, simply inverting cpu_online_mask leads
    to CPUs beyond nr_cpu_ids to be displayed twice and CPUs not even
    possible to be displayed as offline.

    Signed-off-by: Jan Beulich
    Cc: Andi Kleen
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Jan Beulich
     

21 May, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
    PM: PM QOS update fix
    Freezer / cgroup freezer: Update stale locking comments
    PM / platform_bus: Allow runtime PM by default
    i2c: Fix bus-level power management callbacks
    PM QOS update
    PM / Hibernate: Fix block_io.c printk warning
    PM / Hibernate: Group swap ops
    PM / Hibernate: Move the first_sector out of swsusp_write
    PM / Hibernate: Separate block_io
    PM / Hibernate: Snapshot cleanup
    FS / libfs: Implement simple_write_to_buffer
    PM / Hibernate: document open(/dev/snapshot) side effects
    PM / Runtime: Add sysfs debug files
    PM: Improve device power management document
    PM: Update device power management document
    PM: Allow runtime_suspend methods to call pm_schedule_suspend()
    PM: pm_wakeup - switch to using bool

    Linus Torvalds
     

20 May, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (127 commits)
    sh: update defconfigs.
    sh: Fix up the NUMA build for recent LMB changes.
    sh64: provide a stub per_cpu_trap_init() definition.
    sh: fix up CONFIG_KEXEC=n build.
    sh: fixup the docbook paths for clock framework shuffling.
    driver core: Early dev_name() depends on slab_is_available().
    sh: simplify WARN usage in SH clock driver
    sh: Check return value of clk_get on ms7724
    sh: Check return value of clk_get on ecovec24
    sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.c
    sh: move sh clock.c contents to drivers/sh/clk.
    sh: move sh asm/clock.h contents to linux/sh_clk.h V2
    sh: remove unused clock lookup
    sh: switch boards to clkdev
    sh: switch sh4-202 to clkdev
    sh: switch shx3 to clkdev
    sh: switch sh7757 to clkdev
    sh: switch sh7763 to clkdev
    sh: switch sh7780 to clkdev
    sh: switch sh7786 to clkdev
    ...

    Linus Torvalds
     

18 May, 2010

2 commits

  • …/git/tip/linux-2.6-tip

    * 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86/amd-iommu: Add amd_iommu=off command line option
    iommu-api: Remove iommu_{un}map_range functions
    x86/amd-iommu: Implement ->{un}map callbacks for iommu-api
    x86/amd-iommu: Make amd_iommu_iova_to_phys aware of multiple page sizes
    x86/amd-iommu: Make iommu_unmap_page and fetch_pte aware of page sizes
    x86/amd-iommu: Make iommu_map_page and alloc_pte aware of page sizes
    kvm: Change kvm_iommu_map_pages to map large pages
    VT-d: Change {un}map_range functions to implement {un}map interface
    iommu-api: Add ->{un}map callbacks to iommu_ops
    iommu-api: Add iommu_map and iommu_unmap functions
    iommu-api: Rename ->{un}map function pointers to ->{un}map_range

    Linus Torvalds
     
  • Make the platform resource input parameters of platform_device_add_resources()
    and platform_device_register_simple() const, as the resources are copied and
    never modified.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     

13 May, 2010

2 commits

  • Paul Mundt
     
  • The early dev_name() setup needs to do an allocation which can only be
    satisfied under slab_is_available() conditions. Some of the early
    platform drivers may be initialized before this point, and those still
    need to contend themselves with an empty dev_name.

    This fixes up a regression with the SH earlyprintk which was bailing out
    prior to hitting the early probe path due to not being able to satisfy
    the early allocation. Other early platform drivers (such as the early
    timers) that need to match the dev name are sufficiently late that
    allocations are already possible.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

11 May, 2010

4 commits

  • Conflicts:
    arch/x86/kernel/amd_iommu.c

    Joerg Roedel
     
  • Currently the default runtime PM callbacks for platform devices return
    -ENOSYS, preventing the use of runtime PM platforms until they have
    provided at least a default implementation. This hinders the use of
    runtime PM by devices which work with many platforms such as memory
    mapped devices, MFDs and on chip IPs shared by multiple architectures.

    Change the default implementation to the standard pm_generic_runtime
    one, allowing drivers to use runtime PM without per-architecture
    changes.

    Signed-off-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rafael J. Wysocki

    Mark Brown
     
  • Add a few sysfs files relating to runtime power management for
    advanced debug purposes:

    runtime_enabled: is runtime PM enabled for this device? States
    are "enabled", "disabled", "forbidden" or a combination
    of the latter two.

    runtime_status: what state is the device in currently? E.g., it
    reports "suspended" for runtime-suspended devices, and
    "active" for active devices. NOTE: if runtime_enabled
    returns "disabled", the value of this file may not
    reflect its physical state.

    runtime_usage: the runtime PM usage count of a device

    runtime_active_kids: the runtime PM children usage count of a device, or
    0 if the ignore_children flag is set.

    Also, CONFIG_PM_SLEEP_ADVANCED_DEBUG is not defined in any Kconfig
    file, so replace it with CONFIG_PM_ADVANCED_DEBUG.

    Signed-off-by: Dominik Brodowski
    Acked-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki

    Dominik Brodowski
     
  • This patch (as1361) changes the runtime PM interface slightly; it
    allows suspend requests to be scheduled while the runtime_suspend
    method is running. If the method succeeds then the scheduled request
    is cancelled, whereas if the method fails then an idle notification is
    sent only if no request was scheduled.

    Being able to schedule suspend requests from within a runtime_suspend
    method is useful for drivers that need to test for idleness and
    suspend the device all while holding a single spinlock, or for drivers
    that want to check for idleness by polling.

    Signed-off-by: Alan Stern
    Signed-off-by: Rafael J. Wysocki

    Alan Stern
     

26 Apr, 2010

1 commit


10 Apr, 2010

1 commit

  • This reverts commit ba168fc37dea145deeb8fa9e7e71c748d2e00d74.

    It changes user-visible sysfs interfaces, and breaks some existing user
    space applications which apparently rely on the fact that the output
    does not contain the "0x" prefix.

    Requested-by: Heiko Carstens
    Acked-by: KOSAKI Motohiro
    Acked-by: Wu Fengguang
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

07 Apr, 2010

1 commit

  • NODEMASK_ALLOC/FREE are mapped to kmalloc/free if NODES_SHIFT > 8.
    Among its several users, drivers/base/node.c wasn't including slab.h
    leading to build failure if NODES_SHIFT > 8. Include slab.h from
    drivers/base/node.c.

    This isn't an ideal solution but including slab.h directly from
    nodemask.h is not an option because nodemask.h gets included
    everywhere. For now, make it work by including slab.h from its users.

    Signed-off-by: Tejun Heo
    Reported-by: Ingo Molnar

    Tejun Heo
     

06 Apr, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] qla1280: retain firmware for error recovery
    [SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init
    [SCSI] advansys: fix regression with request_firmware change
    [SCSI] qla2xxx: Updated version number to 8.03.02-k2.
    [SCSI] qla2xxx: Prevent sending mbx commands from sysfs during isp reset.
    [SCSI] qla2xxx: Disable MSI on qla24xx chips other than QLA2432.
    [SCSI] qla2xxx: Check to make sure multique and CPU affinity support is not enabled at the same time.
    [SCSI] qla2xxx: Correct vp_idx checking during PORT_UPDATE processing.
    [SCSI] qla2xxx: Honour "Extended BB credits" bit for CNAs.
    [SCSI] scsi_transport_fc: Make sure commands are completed when rport is offline
    [SCSI] libiscsi: Fix recovery slowdown regression

    Linus Torvalds
     

05 Apr, 2010

1 commit


30 Mar, 2010

2 commits

  • …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
     
  • Conflicts:
    arch/sh/kernel/cpu/clock.c

    Signed-off-by: Paul Mundt

    Paul Mundt
     

29 Mar, 2010

1 commit


28 Mar, 2010

1 commit


24 Mar, 2010

1 commit

  • The new-style dev_pm_ops provide callbacks for both IRQs enabled
    and disabled. However, the _noirq variants were only called for
    buses registered with a device, not for classes and types.

    In order to properly use dev_pm_ops in class pcmcia_socket_class,
    support _noirq actions also on classes and types.

    Signed-off-by: Dominik Brodowski
    Acked-by: Rafael J. Wysocki

    Dominik Brodowski