27 Sep, 2011

1 commit

  • Commit b7ab83e (PM: Use spinlock instead of mutex in clock
    management functions) introduced a regression causing clocks_mutex
    to be acquired under a spinlock. This happens because
    pm_clk_suspend() and pm_clk_resume() call pm_clk_acquire() under
    pcd->lock, but pm_clk_acquire() executes clk_get() which causes
    clocks_mutex to be acquired. Similarly, __pm_clk_remove(),
    executed under pcd->lock, calls clk_put(), which also causes
    clocks_mutex to be acquired.

    To fix those problems make pm_clk_add() call pm_clk_acquire(), so
    that pm_clk_suspend() and pm_clk_resume() don't have to do that.
    Change pm_clk_remove() and pm_clk_destroy() to separate
    modifications of the pcd->clock_list list from the actual removal of
    PM clock entry objects done by __pm_clk_remove().

    Reported-and-tested-by: Guennadi Liakhovetski
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Russell King

    Rafael J. Wysocki
     

09 Sep, 2011

1 commit


06 Sep, 2011

1 commit

  • The conversion to per bus type registration functions means we don't need
    to do module_get()s to hold the bus types in memory (their users will link
    to them) so we removed all those calls. This left module_put() calls in
    the cleanup paths which aren't needed and which cause unbalanced puts if
    we ever try to unload anything.

    Reported-by: Jonathan Cameron
    Signed-off-by: Mark Brown

    Mark Brown
     

29 Aug, 2011

1 commit


27 Aug, 2011

1 commit

  • …t/gregkh/driver-core-2.6

    * 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
    drivers:misc: ti-st: fix unexpected UART close
    drivers:misc: ti-st: free skb on firmware download
    drivers:misc: ti-st: wait for completion at fail
    drivers:misc: ti-st: reinit completion before send
    drivers:misc: ti-st: fail-safe on wrong pkt type
    drivers:misc: ti-st: reinit completion on ver read
    drivers:misc:ti-st: platform hooks for chip states
    drivers:misc: ti-st: avoid a misleading dbg msg
    base/devres.c: quiet sparse noise about context imbalance
    pti: add missing CONFIG_PCI dependency
    drivers/base/devtmpfs.c: correct annotation of `setup_done'
    driver core: fix kernel-doc warning in platform.c
    firmware: fix google/gsmi.c build warning

    Linus Torvalds
     

25 Aug, 2011

2 commits

  • In commit a144c6a6c924 ("PM: Print a warning if firmware is requested
    when tasks are frozen") we not only printed a warning if somebody tried
    to load the firmware when tasks are frozen - we also failed the load.

    But that check was done before the check for built-in firmware, and then
    when we disallowed usermode helpers during bootup (commit 288d5abec831:
    "Boot up with usermodehelper disabled"), that actually means that
    built-in modules can no longer load their firmware even if the firmware
    is built in too. Which used to work, and some people depended on it for
    the R100 driver.

    So move the test for usermodehelper_is_disabled() down, to after
    checking the built-in firmware.

    This should fix:

    https://bugzilla.kernel.org/show_bug.cgi?id=40952

    Reported-by: James Cloos
    Bisected-by: Elimar Riesebieter
    Cc: Michel Dänzer
    Cc: Rafael Wysocki
    Cc: Greg Kroah-Hartman
    Cc: Valdis Kletnieks
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The lock member of struct pm_clk_data is of type struct mutex,
    which is a problem, because the suspend and resume routines
    defined in drivers/base/power/clock_ops.c cannot be executed
    with interrupts disabled for this reason. Modify
    struct pm_clk_data so that its lock member is a spinlock.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Magnus Damm

    Rafael J. Wysocki
     

23 Aug, 2011

1 commit


18 Aug, 2011

1 commit


16 Aug, 2011

1 commit

  • Commit b33f9cbd67ba ("regmap: Specify a module license") added a
    MODULES_LICENSE to this file without adding an include of module.h.

    module.h should have been included anyway, since this file has
    EXPORT_SYMBOLs as well. With the pending module.h split up, this would
    probably have caused build problems.

    Cc: Stephen Warren
    Cc: Mark Brown
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

15 Aug, 2011

1 commit


14 Aug, 2011

1 commit


12 Aug, 2011

1 commit

  • CONFIG_REGMAP_I2C/SPI are set to m when selected by a tristate config
    option that's set to m. The regmap modules don't specify a license, so
    fail to link to regmap_init at load time, since that is EXPORT_SYMBOL_GPL.
    Fix this by specifying a license for the regmap modules.

    Signed-off-by: Stephen Warren
    Signed-off-by: Mark Brown

    Stephen Warren
     

09 Aug, 2011

2 commits

  • This fixes the following section mismatch issue:

    WARNING: vmlinux.o(.text+0x1192bf): Section mismatch in reference from the function devtmpfsd() to the variable .init.data:setup_done
    The function devtmpfsd() references the variable __initdata setup_done.
    This is often because devtmpfsd lacks a __initdata annotation or the annotation of setup_done is wrong.

    WARNING: vmlinux.o(.text+0x119342): Section mismatch in reference from the function devtmpfsd() to the variable .init.data:setup_done
    The function devtmpfsd() references the variable __initdata setup_done.
    This is often because devtmpfsd lacks a __initdata annotation or the annotation of setup_done is wrong.

    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Greg Kroah-Hartman

    Arnaud Lacombe
     
  • Warning(drivers/base/platform.c:50): No description found for parameter 'pdev'
    Warning(drivers/base/platform.c:50): Excess function parameter 'dev' description in 'arch_setup_pdev_archdata'

    Signed-off-by: Randy Dunlap
    Cc: Greg Kroah-Hartman
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

06 Aug, 2011

2 commits

  • Currently the use of pm_runtime_put_sync() is not safe from
    interrupts-disabled context because rpm_idle() will release the
    spinlock and enable interrupts for the idle callbacks. This enables
    interrupts during a time where interrupts were expected to be
    disabled, and can have strange side effects on drivers that expected
    interrupts to be disabled.

    This is not a bug since the documentation clearly states that only
    _put_sync_suspend() is safe in IRQ-safe mode.

    However, pm_runtime_put_sync() could be made safe when in IRQ-safe
    mode by releasing the spinlock but not re-enabling interrupts, which
    is what this patch aims to do.

    Problem was found when using some buggy drivers that set
    pm_runtime_irq_safe() and used _put_sync() in interrupts-disabled
    context.

    Reported-by: Colin Cross
    Tested-by: Nishanth Menon
    Signed-off-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki

    Kevin Hilman
     
  • The local variable ret is defined twice in pm_genpd_poweron(), which
    causes this function to always return 0, even if the PM domain's
    .power_on() callback fails, in which case an error code should be
    returned.

    Remove the wrong second definition of ret and additionally remove an
    unnecessary definition of wait from pm_genpd_poweron().

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

28 Jul, 2011

1 commit

  • create_path() on something without a single / in it will return err
    without initializing it. It actually can't happen (we call that thing
    only if create on the same path returns -ENOENT, which won't happen
    happen for single-component path), but in this case initializing err
    to 0 is more than making compiler to STFU - would be the right thing
    to return on such paths; the function creates a parent directory of
    given pathname and in that case it has no work to do...

    Signed-off-by: Al Viro

    Al Viro
     

27 Jul, 2011

2 commits


26 Jul, 2011

4 commits

  • …/gregkh/driver-core-2.6

    * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
    updated Documentation/ja_JP/SubmittingPatches
    debugfs: add documentation for debugfs_create_x64
    uio: uio_pdrv_genirq: Add OF support
    firmware: gsmi: remove sysfs entries when unload the module
    Documentation/zh_CN: Fix messy code file email-clients.txt
    driver core: add more help description for "path to uevent helper"
    driver-core: modify FIRMWARE_IN_KERNEL help message
    driver-core: Kconfig grammar corrections in firmware configuration
    DOCUMENTATION: Replace create_device() with device_create().
    DOCUMENTATION: Update overview.txt in Doc/driver-model.
    pti: pti_tty_install documentation mispelling.

    Linus Torvalds
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (99 commits)
    drivers/virt: add missing linux/interrupt.h to fsl_hypervisor.c
    powerpc/85xx: fix mpic configuration in CAMP mode
    powerpc: Copy back TIF flags on return from softirq stack
    powerpc/64: Make server perfmon only built on ppc64 server devices
    powerpc/pseries: Fix hvc_vio.c build due to recent changes
    powerpc: Exporting boot_cpuid_phys
    powerpc: Add CFAR to oops output
    hvc_console: Add kdb support
    powerpc/pseries: Fix hvterm_raw_get_chars to accept < 16 chars, fixing xmon
    powerpc/irq: Quieten irq mapping printks
    powerpc: Enable lockup and hung task detectors in pseries and ppc64 defeconfigs
    powerpc: Add mpt2sas driver to pseries and ppc64 defconfig
    powerpc: Disable IRQs off tracer in ppc64 defconfig
    powerpc: Sync pseries and ppc64 defconfigs
    powerpc/pseries/hvconsole: Fix dropped console output
    hvc_console: Improve tty/console put_chars handling
    powerpc/kdump: Fix timeout in crash_kexec_wait_realmode
    powerpc/mm: Fix output of total_ram.
    powerpc/cpufreq: Add cpufreq driver for Momentum Maple boards
    powerpc: Correct annotations of pmu registration functions
    ...

    Fix up trivial Kconfig/Makefile conflicts in arch/powerpc, drivers, and
    drivers/cpufreq

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    fs: take the ACL checks to common code
    bury posix_acl_..._masq() variants
    kill boilerplates around posix_acl_create_masq()
    generic_acl: no need to clone acl just to push it to set_cached_acl()
    kill boilerplate around posix_acl_chmod_masq()
    reiserfs: cache negative ACLs for v1 stat format
    xfs: cache negative ACLs if there is no attribute fork
    9p: do no return 0 from ->check_acl without actually checking
    vfs: move ACL cache lookup into generic code
    CIFS: Fix oops while mounting with prefixpath
    xfs: Fix wrong return value of xfs_file_aio_write
    fix devtmpfs race
    caam: don't pass bogus S_IFCHR to debugfs_create_...()
    get rid of create_proc_entry() abuses - proc_mkdir() is there for purpose
    asus-wmi: ->is_visible() can't return negative
    fix jffs2 ACLs on big-endian with 16bit mode_t
    9p: close ACL leaks
    ocfs2_init_acl(): fix a leak
    VFS : mount lock scalability for internal mounts

    Linus Torvalds
     
  • After we's done complete(&req->done), there's nothing to prevent the
    scope containing *req from being gone and *req overwritten by any
    kind of junk. So we must read req->next before that...

    Signed-off-by: Al Viro

    Al Viro
     

25 Jul, 2011

1 commit


24 Jul, 2011

1 commit


23 Jul, 2011

5 commits

  • Signed-off-by: Mark Brown
    Acked-by: Liam Girdwood
    Acked-by: Wolfram Sang
    Acked-by: Grant Likely

    Mark Brown
     
  • Signed-off-by: Mark Brown
    Acked-by: Liam Girdwood
    Acked-by: Wolfram Sang
    Acked-by: Grant Likely

    Mark Brown
     
  • There are many places in the tree where we implement register access for
    devices on non-memory mapped buses, especially I2C and SPI. Since hardware
    designers seem to have settled on a relatively consistent set of register
    interfaces this can be effectively factored out into shared code. There
    are a standard set of formats for marshalling data for exchange with the
    device, with the actual I/O mechanisms generally being simple byte
    streams.

    We create an abstraction for marshaling data into formats which can be
    sent on the control interfaces, and create a standard method for
    plugging in actual transport underneath that.

    This is mostly a refactoring and renaming of the bottom level of the
    existing code for sharing register I/O which we have in ASoC. A
    subsequent patch in this series converts ASoC to use this. The main
    difference in interface is that reads return values by writing to a
    location provided by a pointer rather than in the return value, ensuring
    we can use the full range of the type for register data. We also use
    unsigned types rather than ints for the same reason.

    As some of the devices can have very large register maps the existing
    ASoC code also contains infrastructure for managing register caches.
    This cache work will be moved over in a future stage to allow for
    separate review, the current patch only deals with the physical I/O.

    Signed-off-by: Mark Brown
    Acked-by: Liam Girdwood
    Acked-by: Greg Kroah-Hartman
    Acked-by: Wolfram Sang
    Acked-by: Grant Likely

    Mark Brown
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (107 commits)
    vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp
    isofs: Remove global fs lock
    jffs2: fix IN_DELETE_SELF on overwriting rename() killing a directory
    fix IN_DELETE_SELF on overwriting rename() on ramfs et.al.
    mm/truncate.c: fix build for CONFIG_BLOCK not enabled
    fs:update the NOTE of the file_operations structure
    Remove dead code in dget_parent()
    AFS: Fix silly characters in a comment
    switch d_add_ci() to d_splice_alias() in "found negative" case as well
    simplify gfs2_lookup()
    jfs_lookup(): don't bother with . or ..
    get rid of useless dget_parent() in btrfs rename() and link()
    get rid of useless dget_parent() in fs/btrfs/ioctl.c
    fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers
    drivers: fix up various ->llseek() implementations
    fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek
    Ext4: handle SEEK_HOLE/SEEK_DATA generically
    Btrfs: implement our own ->llseek
    fs: add SEEK_HOLE and SEEK_DATA flags
    reiserfs: make reiserfs default to barrier=flush
    ...

    Fix up trivial conflicts in fs/xfs/linux-2.6/xfs_super.c due to the new
    shrinker callout for the inode cache, that clashed with the xfs code to
    start the periodic workers later.

    Linus Torvalds
     
  • …/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:
    iommu/core: Fix build with INTR_REMAP=y && CONFIG_DMAR=n
    iommu/amd: Don't use MSI address range for DMA addresses
    iommu/amd: Move missing parts to drivers/iommu
    iommu: Move iommu Kconfig entries to submenu
    x86/ia64: intel-iommu: move to drivers/iommu/
    x86: amd_iommu: move to drivers/iommu/
    msm: iommu: move to drivers/iommu/
    drivers: iommu: move to a dedicated folder
    x86/amd-iommu: Store device alias as dev_data pointer
    x86/amd-iommu: Search for existind dev_data before allocting a new one
    x86/amd-iommu: Allow dev_data->alias to be NULL
    x86/amd-iommu: Use only dev_data in low-level domain attach/detach functions
    x86/amd-iommu: Use only dev_data for dte and iotlb flushing routines
    x86/amd-iommu: Store ATS state in dev_data
    x86/amd-iommu: Store devid in dev_data
    x86/amd-iommu: Introduce global dev_data_list
    x86/amd-iommu: Remove redundant device_flush_dte() calls
    iommu-api: Add missing header file

    Fix up trivial conflicts (independent additions close to each other) in
    drivers/Makefile and include/linux/pci.h

    Linus Torvalds
     

20 Jul, 2011

3 commits


16 Jul, 2011

4 commits

  • * pm-runtime:
    OMAP: PM: disable idle on suspend for GPIO and UART
    OMAP: PM: omap_device: add API to disable idle on suspend
    OMAP: PM: omap_device: add system PM methods for PM domain handling
    OMAP: PM: omap_device: conditionally use PM domain runtime helpers
    PM / Runtime: Add new helper function: pm_runtime_status_suspended()
    PM / Runtime: Consistent utilization of deferred_resume
    PM / Runtime: Prevent runtime_resume from racing with probe
    PM / Runtime: Replace "run-time" with "runtime" in documentation
    PM / Runtime: Improve documentation of enable, disable and barrier
    PM: Limit race conditions between runtime PM and system sleep (v2)
    PCI / PM: Detect early wakeup in pci_pm_prepare()
    PM / Runtime: Return special error code if runtime PM is disabled
    PM / Runtime: Update documentation of interactions with system sleep

    Rafael J. Wysocki
     
  • * pm-domains: (33 commits)
    ARM / shmobile: Return -EBUSY from A4LC power off if A3RV is active
    PM / Domains: Take .power_off() error code into account
    ARM / shmobile: Use genpd_queue_power_off_work()
    ARM / shmobile: Use pm_genpd_poweroff_unused()
    PM / Domains: Introduce function to power off all unused PM domains
    PM / Domains: Queue up power off work only if it is not pending
    PM / Domains: Improve handling of wakeup devices during system suspend
    PM / Domains: Do not restore all devices on power off error
    PM / Domains: Allow callbacks to execute all runtime PM helpers
    PM / Domains: Do not execute device callbacks under locks
    PM / Domains: Make failing pm_genpd_prepare() clean up properly
    PM / Domains: Set device state to "active" during system resume
    ARM: mach-shmobile: sh7372 A3RV requires A4LC
    PM / Domains: Export pm_genpd_poweron() in header
    ARM: mach-shmobile: sh7372 late pm domain off
    ARM: mach-shmobile: Runtime PM late init callback
    ARM: mach-shmobile: sh7372 D4 support
    ARM: mach-shmobile: sh7372 A4MP support
    ARM: mach-shmobile: sh7372: make sure that fsi is peripheral of spu2
    ARM: mach-shmobile: sh7372 A3SG support
    ...

    Rafael J. Wysocki
     
  • Some users are apparently confused by dmesg output from
    read_magic_time(), which looks like "real" time and date.
    Add the "RTC" string to time stamps printed by read_magic_time() to
    avoid that confusion.

    Reported-by: Justin P. Mattock
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • cpufreq table allocated by opp_init_cpufreq_table is better
    freed by OPP layer itself. This allows future modifications to
    the table handling to be transparent to the users.

    Signed-off-by: Nishanth Menon
    Acked-by: Kevin Hilman
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     

15 Jul, 2011

2 commits

  • Currently pm_genpd_poweroff() discards error codes returned by
    the PM domain's .power_off() callback, because it's safer to always
    regard the domain as inaccessible to drivers after a failing
    .power_off(). Still, there are situations in which the low-level
    code may want to indicate that it doesn't want to power off the
    domain, so allow it to do that by returning -EBUSY from .power_off().

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Magnus Damm

    Rafael J. Wysocki
     
  • Make pd_power_down_a3rv() use genpd_queue_power_off_work() to queue
    up the powering off of the A4LC domain to avoid queuing it up when
    it is pending.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Magnus Damm

    Rafael J. Wysocki