17 Jan, 2012

1 commit


14 Jan, 2012

2 commits


13 Jan, 2012

2 commits

  • This is going to be used by other subsystems so they should select it.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • Currently no udev events for memory hotplug "online" and "offline" are
    generated:

    # udevadm monitor
    # echo offline > /sys/devices/system/memory/memory4/state
    ==> No event

    When kdump is loaded, kexec detects the current memory configuration and
    stores it in the pre-allocated ELF core header. Therefore, for kdump it
    is necessary to reload the kdump kernel with kexec when the memory
    configuration changes (e.g. for online/offline hotplug memory).

    In order to do this automatically, udev rules should be used. This kernel
    patch adds udev events for "online" and "offline". Together with this
    kernel patch, the following udev rules for online/offline have to be added
    to "/etc/udev/rules.d/98-kexec.rules":

    SUBSYSTEM=="memory", ACTION=="online", PROGRAM="/etc/init.d/kdump restart"
    SUBSYSTEM=="memory", ACTION=="offline", PROGRAM="/etc/init.d/kdump restart"

    [sfr@canb.auug.org.au: fixups for class to subsystem conversion]
    Signed-off-by: Michael Holzheu
    Cc: Heiko Carstens
    Cc: Vivek Goyal
    Cc: "Eric W. Biederman"
    Cc: Kay Sievers
    Cc: Dave Hansen
    Cc: Martin Schwidefsky
    Cc: Greg KH
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     

12 Jan, 2012

2 commits

  • frv, h8300, m68k, microblaze, openrisc, score, um and xtensa currently
    do not register a CPU device. Add the config option GENERIC_CPU_DEVICES
    which causes a generic CPU device to be registered for each present CPU,
    and make all these architectures select it.

    Richard Weinberger covered UML and suggested using
    per_cpu.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     
  • cpu_dev_init() is only called from driver_init(), which does not check
    its return value. Therefore make cpu_dev_init() return void.

    We must register the CPU subsystem, so panic if this fails.

    If sched_create_sysfs_power_savings_entries() fails, the damage is
    contained, so ignore this (as before).

    Signed-off-by: Ben Hutchings
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     

09 Jan, 2012

5 commits

  • * 'dma-buf-merge' of git://people.freedesktop.org/~airlied/linux:
    dma-buf: mark EXPERIMENTAL for 1st release.
    dma-buf: Documentation for buffer sharing framework
    dma-buf: Introduce dma buffer sharing mechanism

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (36 commits)
    mfd: Clearing events requires event registers to be writable for da9052-core
    mfd: Fix annotations in da9052-core
    gpiolib: Mark da9052 driver broken
    mfd: Declare da9052_regmap_config for the bus drivers
    MFD: DA9052/53 MFD core module add SPI support v2
    MFD: DA9052/53 MFD core module
    regmap: Add irq_base accessor to regmap_irq
    regmap: Allow drivers to reinitialise the register cache at runtime
    regmap: Add trace event for successful cache reads
    regmap: Allow regmap_update_bits() users to detect changes
    regmap: Report if we actually handled an interrupt in regmap-irq
    regmap: Fix rbtreee build when not using debugfs
    regmap: Provide debugfs dump of the rbtree cache data
    regmap: Do debugfs init before cache init
    regmap: Suppress noop writes in regmap_update_bits()
    regmap: Remove indexed cache type
    regmap: Drop check whether a register is readable in regcache_read
    regmap: Properly round cache_word_size
    regmap: Add support for 10/14 register formating
    regmap: Try cached read before checking if a hardware read is possible
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     
  • * 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
    PM / Hibernate: Implement compat_ioctl for /dev/snapshot
    PM / Freezer: fix return value of freezable_schedule_timeout_killable()
    PM / shmobile: Allow the A4R domain to be turned off at run time
    PM / input / touchscreen: Make st1232 use device PM QoS constraints
    PM / QoS: Introduce dev_pm_qos_add_ancestor_request()
    PM / shmobile: Remove the stay_on flag from SH7372's PM domains
    PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
    PM / shmobile: Add support for the sh7372 A4S power domain / sleep mode
    PM: Drop generic_subsys_pm_ops
    PM / Sleep: Remove forward-only callbacks from AMBA bus type
    PM / Sleep: Remove forward-only callbacks from platform bus type
    PM: Run the driver callback directly if the subsystem one is not there
    PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers
    PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412.
    PM / Sleep: Merge internal functions in generic_ops.c
    PM / Sleep: Simplify generic system suspend callbacks
    PM / Hibernate: Remove deprecated hibernation snapshot ioctls
    PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()
    ARM: S3C64XX: Implement basic power domain support
    PM / shmobile: Use common always on power domain governor
    ...

    Fix up trivial conflict in fs/xfs/xfs_buf.c due to removal of unused
    XBT_FORCE_SLEEP bit

    Linus Torvalds
     
  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

08 Jan, 2012

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

07 Jan, 2012

1 commit

  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

06 Jan, 2012

2 commits

  • Mark dma-buf buffer sharing API as EXPERIMENTAL for first release.
    We will remove this in later versions, once it gets smoothed out
    and has more users.

    Signed-off-by: Sumit Semwal
    Signed-off-by: Sumit Semwal
    Signed-off-by: Dave Airlie

    Sumit Semwal
     
  • This is the first step in defining a dma buffer sharing mechanism.

    A new buffer object dma_buf is added, with operations and API to allow easy
    sharing of this buffer object across devices.

    The framework allows:
    - creation of a buffer object, its association with a file pointer, and
    associated allocator-defined operations on that buffer. This operation is
    called the 'export' operation.
    - different devices to 'attach' themselves to this exported buffer object, to
    facilitate backing storage negotiation, using dma_buf_attach() API.
    - the exported buffer object to be shared with the other entity by asking for
    its 'file-descriptor (fd)', and sharing the fd across.
    - a received fd to get the buffer object back, where it can be accessed using
    the associated exporter-defined operations.
    - the exporter and user to share the scatterlist associated with this buffer
    object using map_dma_buf and unmap_dma_buf operations.

    Atleast one 'attach()' call is required to be made prior to calling the
    map_dma_buf() operation.

    Couple of building blocks in map_dma_buf() are added to ease introduction
    of sync'ing across exporter and users, and late allocation by the exporter.

    For this first version, this framework will work with certain conditions:
    - *ONLY* exporter will be allowed to mmap to userspace (outside of this
    framework - mmap is not a buffer object operation),
    - currently, *ONLY* users that do not need CPU access to the buffer are
    allowed.

    More details are there in the documentation patch.

    This is based on design suggestions from many people at the mini-summits[1],
    most notably from Arnd Bergmann , Rob Clark and
    Daniel Vetter .

    The implementation is inspired from proof-of-concept patch-set from
    Tomasz Stanislawski , who demonstrated buffer sharing
    between two v4l2 devices. [2]

    [1]: https://wiki.linaro.org/OfficeofCTO/MemoryManagement
    [2]: http://lwn.net/Articles/454389

    Signed-off-by: Sumit Semwal
    Signed-off-by: Sumit Semwal
    Reviewed-by: Daniel Vetter
    Reviewed-by: Dave Airlie
    Reviewed-and-Tested-by: Rob Clark
    Signed-off-by: Dave Airlie

    Sumit Semwal
     

05 Jan, 2012

1 commit

  • This oops was reported recently:
    firmware_loading_store+0xf9/0x17b
    dev_attr_store+0x20/0x22
    sysfs_write_file+0x101/0x134
    vfs_write+0xac/0xf3
    sys_write+0x4a/0x6e
    system_call_fastpath+0x16/0x1b

    The complete backtrace was unfortunately not captured, but details can be found
    here:
    https://bugzilla.redhat.com/show_bug.cgi?id=769920

    The cause is fairly clear.

    Its caused by the fact that firmware_loading_store has a case 0 in its
    switch statement that reads and writes the fw_priv->fw poniter without the
    protection of the fw_lock mutex. since there is a window between the time that
    _request_firmware sets fw_priv->fw to NULL and the time the corresponding sysfs
    file is unregistered, its possible for a user space application to race in, and
    write a zero to the loading file, causing a NULL dereference in
    firmware_loading_store. Fix it by extending the protection of the fw_lock mutex
    to cover all of the firware_loading_store function.

    Signed-off-by: Neil Horman
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Neil Horman
     

04 Jan, 2012

2 commits


26 Dec, 2011

3 commits

  • * pm-domains:
    PM / shmobile: Allow the A4R domain to be turned off at run time
    PM / input / touchscreen: Make st1232 use device PM QoS constraints
    PM / QoS: Introduce dev_pm_qos_add_ancestor_request()
    PM / shmobile: Remove the stay_on flag from SH7372's PM domains
    PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
    PM / shmobile: Add support for the sh7372 A4S power domain / sleep mode
    ARM: S3C64XX: Implement basic power domain support
    PM / shmobile: Use common always on power domain governor
    PM / Domains: Provide an always on power domain governor
    PM / Domains: Fix default system suspend/resume operations
    PM / Domains: Make it possible to assign names to generic PM domains
    PM / Domains: fix compilation failure for CONFIG_PM_GENERIC_DOMAINS unset
    PM / Domains: Automatically update overoptimistic latency information
    PM / Domains: Add default power off governor function (v4)
    PM / Domains: Add device stop governor function (v4)
    PM / Domains: Rework system suspend callback routines (v2)
    PM / Domains: Introduce "save/restore state" device callbacks
    PM / Domains: Make it possible to use per-device domain callbacks

    Rafael J. Wysocki
     
  • * pm-runtime:
    PM / Runtime: Use device PM QoS constraints (v2)

    Rafael J. Wysocki
     
  • Some devices, like the I2C controller on SH7372, are not
    necessary for providing power to their children or forwarding
    wakeup signals (and generally interrupts) from them. They are
    only needed by their children when there's some data to transfer,
    so they may be suspended for the majority of time and resumed
    on demand, when the children have data to send or receive. For this
    purpose, however, their power.ignore_children flags have to be set,
    or the PM core wouldn't allow them to be suspended while their
    children were active.

    Unfortunately, in some situations it may take too much time to
    resume such devices so that they can assist their children in
    transferring data. For example, if such a device belongs to a PM
    domain which goes to the "power off" state when that device is
    suspended, it may take too much time to restore power to the
    domain in response to the request from one of the device's
    children. In that case, if the parent's resume time is critical,
    the domain should stay in the "power on" state, although it still may
    be desirable to power manage the parent itself (e.g. by manipulating
    its clock).

    In general, device PM QoS may be used to address this problem.
    Namely, if the device's children added PM QoS latency constraints
    for it, they would be able to prevent it from being put into an
    overly deep low-power state. However, in some cases the devices
    needing to be serviced are not the immediate children of a
    "children-ignoring" device, but its grandchildren or even less
    direct descendants. In those cases, the entity wanting to add a
    PM QoS request for a given device's ancestor that ignores its
    children will have to find it in the first place, so introduce a new
    helper function that may be used to achieve that. This function,
    dev_pm_qos_add_ancestor_request(), will search for the first
    ancestor of the given device whose power.ignore_children flag is
    set and will add a device PM QoS latency request for that ancestor
    on behalf of the caller. The request added this way may be removed
    with the help of dev_pm_qos_remove_request() in the future, like
    any other device PM QoS latency request.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

22 Dec, 2011

7 commits

  • This moves the 'memory sysdev_class' over to a regular 'memory' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

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

    Kay Sievers
     
  • This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.

    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: Tigran Aivazian
    Cc: Len Brown
    Cc: Zhang Rui
    Cc: Dave Jones
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: "Rafael J. Wysocki"
    Cc: "Srivatsa S. Bhat"
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Since the PM core is now going to execute driver callbacks directly
    if the corresponding subsystem callbacks are not present,
    forward-only subsystem callbacks (i.e. such that only execute the
    corresponding driver callbacks) are not necessary any more. Thus
    it is possible to remove generic_subsys_pm_ops, because the only
    callback in there that is not forward-only, .runtime_idle, is not
    really used by the only user of generic_subsys_pm_ops, which is
    vio_bus_type.

    However, the generic callback routines themselves cannot be removed
    from generic_ops.c, because they are used individually by a number
    of subsystems.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • The forward-only PM callbacks provided by the platform bus type are
    not necessary any more, because the PM core executes driver callbacks
    when the corresponding subsystem callbacks are not present, so drop
    them.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Make the PM core execute driver PM callbacks directly if the
    corresponding subsystem callbacks are not present.

    There are three reasons for doing that. First, it reflects the
    behavior of drivers/base/dd.c:really_probe() that runs the driver's
    .probe() callback directly if the bus type's one is not defined, so
    this change will remove one arbitrary difference between the PM core
    and the remaining parts of the driver core. Second, it will allow
    some subsystems, whose PM callbacks don't do anything except for
    executing driver callbacks, to be simplified quite a bit by removing
    those "forward-only" callbacks. Finally, it will allow us to remove
    one level of indirection in the system suspend and resume code paths
    where it is not necessary, which is going to lead to less debug noise
    with initcall_debug passed in the kernel command line (messages won't
    be printed for driverless devices whose subsystems don't provide
    PM callbacks among other things).

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Make the pm_op() and pm_noirq_op() functions return pointers to
    appropriate callbacks instead of executing those callbacks and
    returning their results.

    This change is required for a subsequent modification that will
    execute the corresponding driver callback if the subsystem
    callback returned by either pm_op(), or pm_noirq_op() is NULL.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • * master: (848 commits)
    SELinux: Fix RCU deref check warning in sel_netport_insert()
    binary_sysctl(): fix memory leak
    mm/vmalloc.c: remove static declaration of va from __get_vm_area_node
    ipmi_watchdog: restore settings when BMC reset
    oom: fix integer overflow of points in oom_badness
    memcg: keep root group unchanged if creation fails
    nilfs2: potential integer overflow in nilfs_ioctl_clean_segments()
    nilfs2: unbreak compat ioctl
    cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask
    evm: prevent racing during tfm allocation
    evm: key must be set once during initialization
    mmc: vub300: fix type of firmware_rom_wait_states module parameter
    Revert "mmc: enable runtime PM by default"
    mmc: sdhci: remove "state" argument from sdhci_suspend_host
    x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT
    IB/qib: Correct sense on freectxts increment and decrement
    RDMA/cma: Verify private data length
    cgroups: fix a css_set not found bug in cgroup_attach_proc
    oprofile: Fix uninitialized memory access when writing to writing to oprofilefs
    Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"
    ...

    Conflicts:
    kernel/cgroup_freezer.c

    Rafael J. Wysocki
     

21 Dec, 2011

1 commit


18 Dec, 2011

2 commits

  • After the change that removed the code related to runtime PM
    from __pm_generic_call() and __pm_generic_resume() these two
    functions need not be separate any more, so merge them.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • The pm_runtime_suspended() check in __pm_generic_call() doesn't
    really help and may cause problems to happen, because in some cases
    the system suspend callbacks need to be called even if the given
    device has been suspended by runtime PM. For example, if the device
    generally supports remote wakeup and is not enabled to wake up
    the system from sleep, it should be prevented from generating wakeup
    signals during system suspend and that has to be done by the
    suspend callbacks that the pm_runtime_suspended() check prevents from
    being executed.

    Similarly, it may not be a good idea to unconditionally change
    the runtime PM status of the device to 'active' in
    __pm_generic_resume(), because the driver may want to leave the
    device in the 'suspended' state, depending on what happened to it
    before the system suspend and whether or not it is enabled to
    wake up the system.

    For the above reasons, remove the pm_runtime_suspended()
    check from __pm_generic_call() and remove the code changing the
    device's runtime PM status from __pm_generic_resume().

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

15 Dec, 2011

1 commit

  • All sysdev classes and sysdev devices will converted to regular devices
    and buses to properly hook userspace into the event processing.

    There is no interesting difference between a 'sysdev' and 'device' which
    would justify to roll an entire own subsystem with different userspace
    export semantics. Userspace relies on events and generic sysfs subsystem
    infrastructure from sysdev devices, which are currently not properly
    available.

    Every converted sysdev class will create a regular device with the class
    name in /sys/devices/system and all registered devices will becom a children
    of theses devices.

    For compatibility reasons, the sysdev class-wide attributes are created
    at this parent device. (Do not copy that logic for anything new, subsystem-
    wide properties belong to the subsystem, not to some fake parent device
    created in /sys/devices.)

    Every sysdev driver is implemented as a simple subsystem interface now,
    and no longer called a driver.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

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

    Kay Sievers
     

14 Dec, 2011

1 commit


12 Dec, 2011

2 commits

  • …e/regmap into mfd/da9052

    Mark Brown
     
  • When architectures register CPUs, they indicate whether the CPU allows
    hotplugging; notably, x86 and ARM don't allow hotplugging CPU 0.
    Userspace can easily query the hotpluggability of a CPU via sysfs;
    however, the kernel has no convenient way of accessing that property in
    an architecture-independent way. While the kernel can simply try it and
    see, some code needs to distinguish between "hotplug failed" and
    "hotplug has no hope of working on this CPU"; for example, rcutorture's
    CPU hotplug tests want to avoid drowning out real hotplug failures with
    expected failures.

    Expose this property via a new cpu_is_hotpluggable function, so that the
    rest of the kernel can access it in an architecture-independent way.

    Signed-off-by: Josh Triplett
    Signed-off-by: Paul E. McKenney

    Josh Triplett
     

10 Dec, 2011

3 commits

  • platform_device_register_full doesn't modify *pdevinfo so it can be
    marked as const without further adaptions.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     
  • Commit a144c6a (PM: Print a warning if firmware is requested when tasks
    are frozen) introduced usermodehelper_is_disabled() to warn and exit
    immediately if firmware is requested when usermodehelpers are disabled.

    However, it is racy. Consider the following scenario, currently used in
    drivers/base/firmware_class.c:

    ...
    if (usermodehelper_is_disabled())
    goto out;

    /* Do actual work */
    ...

    out:
    return err;

    Nothing prevents someone from disabling usermodehelpers just after the check
    in the 'if' condition, which means that it is quite possible to try doing the
    "actual work" with usermodehelpers disabled, leading to undesirable
    consequences.

    In particular, this race condition in _request_firmware() causes task freezing
    failures whenever suspend/hibernation is in progress because, it wrongly waits
    to get the firmware/microcode image from userspace when actually the
    usermodehelpers are disabled or userspace has been frozen.
    Some of the example scenarios that cause freezing failures due to this race
    are those that depend on userspace via request_firmware(), such as x86
    microcode module initialization and microcode image reload.

    Previous discussions about this issue can be found at:
    http://thread.gmane.org/gmane.linux.kernel/1198291/focus=1200591

    This patch adds proper synchronization to fix this issue.

    It is to be noted that this patchset fixes the freezing failures but doesn't
    remove the warnings. IOW, it does not attempt to add explicit synchronization
    to x86 microcode driver to avoid requesting microcode image at inopportune
    moments. Because, the warnings were introduced to highlight such cases, in the
    first place. And we need not silence the warnings, since we take care of the
    *real* problem (freezing failure) and hence, after that, the warnings are
    pretty harmless anyway.

    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     
  • Since systems are likely to have power domains that can't be turned off
    for various reasons at least temporarily while implementing power domain
    support provide a default governor which will always refuse to power off
    the domain, saving platforms having to implement their own.

    Since the code is so tiny don't bother with a Kconfig symbol for it.

    Signed-off-by: Mark Brown
    Signed-off-by: Rafael J. Wysocki

    Mark Brown
     

09 Dec, 2011

1 commit

  • Commit d23b9b00cdde5c93b914a172cecd57d5625fcd04 (PM / Domains: Rework
    system suspend callback routines (v2)) broke the system suspend and
    resume handling by devices belonging to generic PM domains, because
    it used freeze/thaw callbacks instead of suspend/resume ones and
    didn't initialize device callbacks for system suspend/resume
    properly at all. Fix those problems.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki