25 Jun, 2012

1 commit

  • __device_suspend() must always send a completion. Otherwise, parent
    devices will wait forever.

    Commit 1e2ef05b, "PM: Limit race conditions between runtime PM and
    system sleep (v2)", introduced a regression by short-circuiting the
    complete_all() for certain error cases.

    This patch fixes the bug by always signalling a completion.

    Addresses http://crosbug.com/31972

    Tested by injecting an abort.

    Signed-off-by: Mandeep Singh Baines
    Cc: stable@vger.kernel.org
    Signed-off-by: Rafael J. Wysocki

    Mandeep Singh Baines
     

21 Jun, 2012

1 commit

  • Pull driver core and printk fixes from Greg Kroah-Hartman:
    "Here are some fixes for 3.5-rc4 that resolve the kmsg problems that
    people have reported showing up after the printk and kmsg changes went
    into 3.5-rc1. There are also a smattering of other tiny fixes for the
    extcon and hyper-v drivers that people have reported.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'driver-core-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove()
    extcon: Set platform drvdata in gpio_extcon_probe() and fix irq leak
    extcon: Fix wrong index in max8997_extcon_cable[]
    kmsg - kmsg_dump() fix CONFIG_PRINTK=n compilation
    printk: return -EINVAL if the message len is bigger than the buf size
    printk: use mutex lock to stop syslog_seq from going wild
    kmsg - kmsg_dump() use iterator to receive log buffer content
    vme: change maintainer e-mail address
    Extcon: Don't try to create duplicate link names
    driver core: fixup reversed deferred probe order
    printk: Fix alignment of buf causing crash on ARM EABI
    Tools: hv: verify origin of netlink connector message

    Linus Torvalds
     

14 Jun, 2012

1 commit

  • If driver requests probe deferral,
    it will be added to deferred_probe_pending_list
    by driver_deferred_probe_add(), but, it used list_add().
    Because of that, deferred probe will be run as reversed order.
    This patch uses list_add_tail(), and solved this issue.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Greg Kroah-Hartman

    Kuninori Morimoto
     

08 Jun, 2012

1 commit


03 Jun, 2012

2 commits

  • The word to be transmitted/received via regmap is composed by the following
    parts:

    config->reg_bits
    config->val_bits
    config->pad_bits

    ,so the total size should be calculated by summing up the number of bits of
    each element and using a DIV_ROUND_UP to return the number of bytes.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Mark Brown

    Fabio Estevam
     
  • If debugfs isn't cleaned up, stale files will be left in the filesystem
    which will cause an OOPS when accessed the first time, and hang the
    accessing application when accessed again, presumably due to some lock
    being left held.

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

    Stephen Warren
     

02 Jun, 2012

1 commit

  • Pull vfs changes from Al Viro.
    "A lot of misc stuff. The obvious groups:
    * Miklos' atomic_open series; kills the damn abuse of
    ->d_revalidate() by NFS, which was the major stumbling block for
    all work in that area.
    * ripping security_file_mmap() and dealing with deadlocks in the
    area; sanitizing the neighborhood of vm_mmap()/vm_munmap() in
    general.
    * ->encode_fh() switched to saner API; insane fake dentry in
    mm/cleancache.c gone.
    * assorted annotations in fs (endianness, __user)
    * parts of Artem's ->s_dirty work (jff2 and reiserfs parts)
    * ->update_time() work from Josef.
    * other bits and pieces all over the place.

    Normally it would've been in two or three pull requests, but
    signal.git stuff had eaten a lot of time during this cycle ;-/"

    Fix up trivial conflicts in Documentation/filesystems/vfs.txt (the
    'truncate_range' inode method was removed by the VM changes, the VFS
    update adds an 'update_time()' method), and in fs/btrfs/ulist.[ch] (due
    to sparse fix added twice, with other changes nearby).

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (95 commits)
    nfs: don't open in ->d_revalidate
    vfs: retry last component if opening stale dentry
    vfs: nameidata_to_filp(): don't throw away file on error
    vfs: nameidata_to_filp(): inline __dentry_open()
    vfs: do_dentry_open(): don't put filp
    vfs: split __dentry_open()
    vfs: do_last() common post lookup
    vfs: do_last(): add audit_inode before open
    vfs: do_last(): only return EISDIR for O_CREAT
    vfs: do_last(): check LOOKUP_DIRECTORY
    vfs: do_last(): make ENOENT exit RCU safe
    vfs: make follow_link check RCU safe
    vfs: do_last(): use inode variable
    vfs: do_last(): inline walk_component()
    vfs: do_last(): make exit RCU safe
    vfs: split do_lookup()
    Btrfs: move over to use ->update_time
    fs: introduce inode operation ->update_time
    reiserfs: get rid of resierfs_sync_super
    reiserfs: mark the superblock as dirty a bit later
    ...

    Linus Torvalds
     

30 May, 2012

3 commits

  • Since there are uses for I2C_M_NOSTART which are much more sensible and
    standard than most of the protocol mangling functionality (the main one
    being gather writes to devices where something like a register address
    needs to be inserted before a block of data) create a new I2C_FUNC_NOSTART
    for this feature and update all the users to use it.

    Also strengthen the disrecommendation of the protocol mangling while we're
    at it.

    In the case of regmap-i2c we remove the requirement for mangling as
    I2C_M_NOSTART is the only mangling feature which is being used.

    Signed-off-by: Mark Brown
    Acked-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Mark Brown
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • /sys/devices/system/node/{online,possible} outputs a garbage byte
    because print_nodes_state() returns content size + 1. To fix the bug,
    the patch changes the use of cpuset_sprintf_cpulist to follow the use at
    other places, which is clearer and safer.

    This bug was introduced in v2.6.24 (commit bde631a51876: "mm: add node
    states sysfs class attributeS").

    Signed-off-by: Ryota Ozaki
    Cc: Lee Schermerhorn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryota Ozaki
     

26 May, 2012

2 commits

  • Pull dma-buf updates from Sumit Semwal:
    "Here's the first signed-tag pull request for dma-buf framework. It
    includes the following key items:
    - mmap support
    - vmap support
    - related documentation updates

    These are needed by various drivers to allow mmap/vmap of dma-buf
    shared buffers. Dave Airlie has some prime patches dependent on the
    vmap pull as well."

    * tag 'tag-for-linus-3.5' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf:
    dma-buf: add initial vmap documentation
    dma-buf: minor documentation fixes.
    dma-buf: add vmap interface
    dma-buf: mmap support

    Linus Torvalds
     
  • Pull CMA and ARM DMA-mapping updates from Marek Szyprowski:
    "These patches contain two major updates for DMA mapping subsystem
    (mainly for ARM architecture). First one is Contiguous Memory
    Allocator (CMA) which makes it possible for device drivers to allocate
    big contiguous chunks of memory after the system has booted.

    The main difference from the similar frameworks is the fact that CMA
    allows to transparently reuse the memory region reserved for the big
    chunk allocation as a system memory, so no memory is wasted when no
    big chunk is allocated. Once the alloc request is issued, the
    framework migrates system pages to create space for the required big
    chunk of physically contiguous memory.

    For more information one can refer to nice LWN articles:

    - 'A reworked contiguous memory allocator':
    http://lwn.net/Articles/447405/

    - 'CMA and ARM':
    http://lwn.net/Articles/450286/

    - 'A deep dive into CMA':
    http://lwn.net/Articles/486301/

    - and the following thread with the patches and links to all previous
    versions:
    https://lkml.org/lkml/2012/4/3/204

    The main client for this new framework is ARM DMA-mapping subsystem.

    The second part provides a complete redesign in ARM DMA-mapping
    subsystem. The core implementation has been changed to use common
    struct dma_map_ops based infrastructure with the recent updates for
    new dma attributes merged in v3.4-rc2. This allows to use more than
    one implementation of dma-mapping calls and change/select them on the
    struct device basis. The first client of this new infractructure is
    dmabounce implementation which has been completely cut out of the
    core, common code.

    The last patch of this redesign update introduces a new, experimental
    implementation of dma-mapping calls on top of generic IOMMU framework.
    This lets ARM sub-platform to transparently use IOMMU for DMA-mapping
    calls if one provides required IOMMU hardware.

    For more information please refer to the following thread:
    http://www.spinics.net/lists/arm-kernel/msg175729.html

    The last patch merges changes from both updates and provides a
    resolution for the conflicts which cannot be avoided when patches have
    been applied on the same files (mainly arch/arm/mm/dma-mapping.c)."

    Acked by Andrew Morton :
    "Yup, this one please. It's had much work, plenty of review and I
    think even Russell is happy with it."

    * 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping: (28 commits)
    ARM: dma-mapping: use PMD size for section unmap
    cma: fix migration mode
    ARM: integrate CMA with DMA-mapping subsystem
    X86: integrate CMA with DMA-mapping subsystem
    drivers: add Contiguous Memory Allocator
    mm: trigger page reclaim in alloc_contig_range() to stabilise watermarks
    mm: extract reclaim code from __alloc_pages_direct_reclaim()
    mm: Serialize access to min_free_kbytes
    mm: page_isolation: MIGRATE_CMA isolation functions added
    mm: mmzone: MIGRATE_CMA migration type added
    mm: page_alloc: change fallbacks array handling
    mm: page_alloc: introduce alloc_contig_range()
    mm: compaction: export some of the functions
    mm: compaction: introduce isolate_freepages_range()
    mm: compaction: introduce map_pages()
    mm: compaction: introduce isolate_migratepages_range()
    mm: page_alloc: remove trailing whitespace
    ARM: dma-mapping: add support for IOMMU mapper
    ARM: dma-mapping: use alloc, mmap, free from dma_ops
    ARM: dma-mapping: remove redundant code and do the cleanup
    ...

    Conflicts:
    arch/x86/include/asm/dma-mapping.h

    Linus Torvalds
     

25 May, 2012

3 commits

  • Some minor inline documentation fixes for gaps resulting from new patches.

    Signed-off-by: Sumit Semwal
    Signed-off-by: Sumit Semwal

    Sumit Semwal
     
  • The main requirement I have for this interface is for scanning out
    using the USB gpu devices. Since these devices have to read the
    framebuffer on updates and linearly compress it, using kmaps
    is a major overhead for every update.

    v2: fix warn issues pointed out by Sylwester Nawrocki.

    v3: fix compile !CONFIG_DMA_SHARED_BUFFER and add _GPL for now

    Signed-off-by: Dave Airlie
    Reviewed-by: Rob Clark
    Signed-off-by: Sumit Semwal

    Dave Airlie
     
  • Compared to Rob Clark's RFC I've ditched the prepare/finish hooks
    and corresponding ioctls on the dma_buf file. The major reason for
    that is that many people seem to be under the impression that this is
    also for synchronization with outstanding asynchronous processsing.
    I'm pretty massively opposed to this because:

    - It boils down reinventing a new rather general-purpose userspace
    synchronization interface. If we look at things like futexes, this
    is hard to get right.
    - Furthermore a lot of kernel code has to interact with this
    synchronization primitive. This smells a look like the dri1 hw_lock,
    a horror show I prefer not to reinvent.
    - Even more fun is that multiple different subsystems would interact
    here, so we have plenty of opportunities to create funny deadlock
    scenarios.

    I think synchronization is a wholesale different problem from data
    sharing and should be tackled as an orthogonal problem.

    Now we could demand that prepare/finish may only ensure cache
    coherency (as Rob intended), but that runs up into the next problem:
    We not only need mmap support to facilitate sw-only processing nodes
    in a pipeline (without jumping through hoops by importing the dma_buf
    into some sw-access only importer), which allows for a nicer
    ION->dma-buf upgrade path for existing Android userspace. We also need
    mmap support for existing importing subsystems to support existing
    userspace libraries. And a loot of these subsystems are expected to
    export coherent userspace mappings.

    So prepare/finish can only ever be optional and the exporter /needs/
    to support coherent mappings. Given that mmap access is always
    somewhat fallback-y in nature I've decided to drop this optimization,
    instead of just making it optional. If we demonstrate a clear need for
    this, supported by benchmark results, we can always add it in again
    later as an optional extension.

    Other differences compared to Rob's RFC is the above mentioned support
    for mapping a dma-buf through facilities provided by the importer.
    Which results in mmap support no longer being optional.

    Note that this dma-buf mmap patch does _not_ support every possible
    insanity an existing subsystem could pull of with mmap: Because it
    does not allow to intercept pagefaults and shoot down ptes importing
    subsystems can't add some magic of their own at these points (e.g. to
    automatically synchronize with outstanding rendering or set up some
    special resources). I've done a cursory read through a few mmap
    implementions of various subsytems and I'm hopeful that we can avoid
    this (and the complexity it'd bring with it).

    Additonally I've extended the documentation a bit to explain the hows
    and whys of this mmap extension.

    In case we ever want to add support for explicitly cache maneged
    userspace mmap with a prepare/finish ioctl pair, we could specify that
    userspace needs to mmap a different part of the dma_buf, e.g. the
    range starting at dma_buf->size up to dma_buf->size*2. This works
    because the size of a dma_buf is invariant over it's lifetime. The
    exporter would obviously need to fall back to coherent mappings for
    both ranges if a legacy clients maps the coherent range and the
    architecture cannot suppor conflicting caching policies. Also, this
    would obviously be optional and userspace needs to be able to fall
    back to coherent mappings.

    v2:
    - Spelling fixes from Rob Clark.
    - Compile fix for !DMA_BUF from Rob Clark.
    - Extend commit message to explain how explicitly cache managed mmap
    support could be added later.
    - Extend the documentation with implementations notes for exporters
    that need to manually fake coherency.

    v3:
    - dma_buf pointer initialization goof-up noticed by Rebecca Schultz
    Zavin.

    Cc: Rob Clark
    Cc: Rebecca Schultz Zavin
    Acked-by: Rob Clark
    Signed-Off-by: Daniel Vetter
    Signed-off-by: Sumit Semwal

    Daniel Vetter
     

24 May, 2012

2 commits

  • Pull power management updates from Rafael Wysocki:

    - Implementation of opportunistic suspend (autosleep) and user space
    interface for manipulating wakeup sources.

    - Hibernate updates from Bojan Smojver and Minho Ban.

    - Updates of the runtime PM core and generic PM domains framework
    related to PM QoS.

    - Assorted fixes.

    * tag 'pm-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits)
    epoll: Fix user space breakage related to EPOLLWAKEUP
    PM / Domains: Make it possible to add devices to inactive domains
    PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format
    PM / Domains: Fix computation of maximum domain off time
    PM / Domains: Fix link checking when add subdomain
    PM / Sleep: User space wakeup sources garbage collector Kconfig option
    PM / Sleep: Make the limit of user space wakeup sources configurable
    PM / Documentation: suspend-and-cpuhotplug.txt: Fix typo
    PM / Domains: Cache device stop and domain power off governor results, v3
    PM / Domains: Make device removal more straightforward
    PM / Sleep: Fix a mistake in a conditional in autosleep_store()
    epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready
    PM / QoS: Create device constraints objects on notifier registration
    PM / Runtime: Remove device fields related to suspend time, v2
    PM / Domains: Rework default domain power off governor function, v2
    PM / Domains: Rework default device stop governor function, v2
    PM / Sleep: Add user space interface for manipulating wakeup sources, v3
    PM / Sleep: Add "prevent autosleep time" statistics to wakeup sources
    PM / Sleep: Implement opportunistic sleep, v2
    PM / Sleep: Add wakeup_source_activate and wakeup_source_deactivate tracepoints
    ...

    Linus Torvalds
     
  • Pull a regmap kconfig dependency fix from Mark Brown:
    "Fix the dependency on IRQ_DOMAIN for REGMAP_IRQ in the core

    Fixes a missing select from the Palmas driver a bit more throoughly."

    * tag 'regmap-domain-deps' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
    regmap: Use select .. if to get IRQ_DOMAIN enabled

    Linus Torvalds
     

23 May, 2012

3 commits

  • Ensure that we can't get randconfig breakage by doing the IRQ_DOMAIN
    select automatically. Don't just do the select from REGMAP_IRQ to ensure
    that the select actually gets noticed.

    Reported-by: Randy Dunlap
    Signed-off-by: Mark Brown

    Mark Brown
     
  • Pull scheduler changes from Ingo Molnar:
    "The biggest change is the cleanup/simplification of the load-balancer:
    instead of the current practice of architectures twiddling scheduler
    internal data structures and providing the scheduler domains in
    colorfully inconsistent ways, we now have generic scheduler code in
    kernel/sched/core.c:sched_init_numa() that looks at the architecture's
    node_distance() parameters and (while not fully trusting it) deducts a
    NUMA topology from it.

    This inevitably changes balancing behavior - hopefully for the better.

    There are various smaller optimizations, cleanups and fixlets as well"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched: Taint kernel with TAINT_WARN after sleep-in-atomic bug
    sched: Remove stale power aware scheduling remnants and dysfunctional knobs
    sched/debug: Fix printing large integers on 32-bit platforms
    sched/fair: Improve the ->group_imb logic
    sched/nohz: Fix rq->cpu_load[] calculations
    sched/numa: Don't scale the imbalance
    sched/fair: Revert sched-domain iteration breakage
    sched/x86: Rewrite set_cpu_sibling_map()
    sched/numa: Fix the new NUMA topology bits
    sched/numa: Rewrite the CONFIG_NUMA sched domain support
    sched/fair: Propagate 'struct lb_env' usage into find_busiest_group
    sched/fair: Add some serialization to the sched_domain load-balance walk
    sched/fair: Let minimally loaded cpu balance the group
    sched: Change rq->nr_running to unsigned int
    x86/numa: Check for nonsensical topologies on real hw as well
    x86/numa: Hard partition cpu topology masks on node boundaries
    x86/numa: Allow specifying node_distance() for numa=fake
    x86/sched: Make mwait_usable() heed to "idle=" kernel parameters properly
    sched: Update documentation and comments
    sched_rt: Avoid unnecessary dequeue and enqueue of pushable tasks in set_cpus_allowed_rt()

    Linus Torvalds
     
  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the driver core, and other driver subsystems, pull request for
    the 3.5-rc1 merge window.

    Outside of a few minor driver core changes, we ended up with the
    following different subsystem and core changes as well, due to
    interdependancies on the driver core:
    - hyperv driver updates
    - drivers/memory being created and some drivers moved into it
    - extcon driver subsystem created out of the old Android staging
    switch driver code
    - dynamic debug updates
    - printk rework, and /dev/kmsg changes

    All of this has been tested in the linux-next releases for a few weeks
    with no reported problems.

    Signed-off-by: Greg Kroah-Hartman "

    Fix up conflicts in drivers/extcon/extcon-max8997.c where git noticed
    that a patch to the deleted drivers/misc/max8997-muic.c driver needs to
    be applied to this one.

    * tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (90 commits)
    uio_pdrv_genirq: get irq through platform resource if not set otherwise
    memory: tegra{20,30}-mc: Remove empty *_remove()
    printk() - isolate KERN_CONT users from ordinary complete lines
    sysfs: get rid of some lockdep false positives
    Drivers: hv: util: Properly handle version negotiations.
    Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp()
    memory: tegra{20,30}-mc: Use dev_err_ratelimited()
    driver core: Add dev_*_ratelimited() family
    Driver Core: don't oops with unregistered driver in driver_find_device()
    printk() - restore prefix/timestamp printing for multi-newline strings
    printk: add stub for prepend_timestamp()
    ARM: tegra30: Make MC optional in Kconfig
    ARM: tegra20: Make MC optional in Kconfig
    ARM: tegra30: MC: Remove unnecessary BUG*()
    ARM: tegra20: MC: Remove unnecessary BUG*()
    printk: correctly align __log_buf
    ARM: tegra30: Add Tegra Memory Controller(MC) driver
    ARM: tegra20: Add Tegra Memory Controller(MC) driver
    printk() - restore timestamp printing at console output
    printk() - do not merge continuation lines of different threads
    ...

    Linus Torvalds
     

22 May, 2012

1 commit


21 May, 2012

2 commits

  • The Contiguous Memory Allocator is a set of helper functions for DMA
    mapping framework that improves allocations of contiguous memory chunks.

    CMA grabs memory on system boot, marks it with MIGRATE_CMA migrate type
    and gives back to the system. Kernel is allowed to allocate only movable
    pages within CMA's managed memory so that it can be used for example for
    page cache when DMA mapping do not use it. On
    dma_alloc_from_contiguous() request such pages are migrated out of CMA
    area to free required contiguous block and fulfill the request. This
    allows to allocate large contiguous chunks of memory at any time
    assuming that there is enough free memory available in the system.

    This code is heavily based on earlier works by Michal Nazarewicz.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Kyungmin Park
    Signed-off-by: Michal Nazarewicz
    Acked-by: Arnd Bergmann
    Tested-by: Rob Clark
    Tested-by: Ohad Ben-Cohen
    Tested-by: Benjamin Gaignard
    Tested-by: Robert Nelson
    Tested-by: Barry Song

    Marek Szyprowski
     
  • Add a common helper for dma-mapping core for mapping a coherent buffer
    to userspace.

    Reported-by: Subash Patel
    Signed-off-by: Marek Szyprowski
    Acked-by: Kyungmin Park
    Tested-By: Subash Patel

    Marek Szyprowski
     

19 May, 2012

2 commits

  • * pm-domains:
    PM / Domains: Make it possible to add devices to inactive domains

    Rafael J. Wysocki
     
  • The generic PM domains core code currently requires domains to be in
    the "power on" state for adding devices to them, but this limitation
    turns out to be inconvenient in some situations, so remove it.

    For this purpose, make __pm_genpd_add_device() set the device's
    need_restore flag if the domain is in the "power off" state, so that
    the device's "restore state" (usually .runtime_resume()) callback
    is executed when it is resumed after the domain has been turned on.
    If the domain is in the "power on" state, the device's need_restore
    flag will be cleared by __pm_genpd_add_device(), so that its "save
    state" (usually .runtime_suspend()) callback is executed when the
    domain is about to be turned off. However, since that default
    behavior need not be always desirable, add a helper function
    pm_genpd_dev_need_restore() allowing a device's need_restore flag
    to be set/unset at any time.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

18 May, 2012

1 commit


17 May, 2012

1 commit

  • It's been broken forever (i.e. it's not scheduling in a power
    aware fashion), as reported by Suresh and others sending
    patches, and nobody cares enough to fix it properly ...
    so remove it to make space free for something better.

    There's various problems with the code as it stands today, first
    and foremost the user interface which is bound to topology
    levels and has multiple values per level. This results in a
    state explosion which the administrator or distro needs to
    master and almost nobody does.

    Furthermore large configuration state spaces aren't good, it
    means the thing doesn't just work right because it's either
    under so many impossibe to meet constraints, or even if
    there's an achievable state workloads have to be aware of
    it precisely and can never meet it for dynamic workloads.

    So pushing this kind of decision to user-space was a bad idea
    even with a single knob - it's exponentially worse with knobs
    on every node of the topology.

    There is a proposal to replace the user interface with a single
    3 state knob:

    sched_balance_policy := { performance, power, auto }

    where 'auto' would be the preferred default which looks at things
    like Battery/AC mode and possible cpufreq state or whatever the hw
    exposes to show us power use expectations - but there's been no
    progress on it in the past many months.

    Aside from that, the actual implementation of the various knobs
    is known to be broken. There have been sporadic attempts at
    fixing things but these always stop short of reaching a mergable
    state.

    Therefore this wholesale removal with the hopes of spurring
    people who care to come forward once again and work on a
    coherent replacement.

    Signed-off-by: Peter Zijlstra
    Cc: Suresh Siddha
    Cc: Arjan van de Ven
    Cc: Vincent Guittot
    Cc: Vaidyanathan Srinivasan
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1326104915.2442.53.camel@twins
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

15 May, 2012

1 commit


14 May, 2012

4 commits

  • driver_find_device() can be called with an unregistered driver. Need
    to check driver_private to see if it's populated or not, especially
    under deferrable probe.

    In the case that there are 2 drivers, one depends on the other. With
    -EPROBE_DEFER, two drivers can use deferred probe to ensure that their
    relative probe order doesn't matter. If dependee driver is probed
    first, then the dependant's driver_find_device('dependee')
    succeeds. If the dependant is probed first, then the dependant's
    driver_find_device('dependee') should return NULL, and the dependant
    should get -EPROBE_DEFER. driver_find_device() needs to return NULL if
    it's not populated.

    In [PATCHv5 2/3] ARM: tegra: Add SMMU enabler in AHB:
    http://article.gmane.org/gmane.linux.ports.tegra/4658

    "tegra_ahb_driver" may not be populated when it's called.

    For more SMMU/AHB specific discussion, refer to the following thread:
    https://lkml.org/lkml/2012/5/10/21

    Signed-off-by: Hiroshi DOYU
    Cc: Stephen Warren
    Signed-off-by: Greg Kroah-Hartman

    Hiroshi DOYU
     
  • This gets us up to date with the recommended current kernel infrastructure
    and should transparently give us device tree interrupt bindings for any
    devices using the framework. If an explicit IRQ mapping is passed in then
    a legacy interrupt range is created, otherwise a simple linear mapping is
    used. Previously a mapping was mandatory so existing drivers should not
    be affected.

    A function regmap_irq_get_virq() is provided to allow drivers to map
    individual IRQs which should be used in preference to the existing
    regmap_irq_chip_get_base() which is only valid if a legacy IRQ range is
    provided.

    Signed-off-by: Mark Brown

    Mark Brown
     
  • Mark Brown
     
  • It's needed for freeing and for obtaining the IRQ base later on.

    Signed-off-by: Mark Brown

    Mark Brown
     

12 May, 2012

4 commits

  • regmap: Last minute bug fix for 3.4

    This is a last minute bug fix that was only just noticed since the code
    path that's being exercised here is one that is fairly rarely used. The
    changelog for the change itself is extremely clear and the code itself
    is obvious to inspection so should be pretty safe.

    Conflicts:
    drivers/base/regmap/regmap.c (overlap between the fix and stride code)

    Mark Brown
     
  • * pm-sleep:
    PM / Sleep: User space wakeup sources garbage collector Kconfig option
    PM / Sleep: Make the limit of user space wakeup sources configurable
    PM / Documentation: suspend-and-cpuhotplug.txt: Fix typo
    PM / Sleep: Fix a mistake in a conditional in autosleep_store()
    epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready
    PM / Sleep: Add user space interface for manipulating wakeup sources, v3
    PM / Sleep: Add "prevent autosleep time" statistics to wakeup sources
    PM / Sleep: Implement opportunistic sleep, v2
    PM / Sleep: Add wakeup_source_activate and wakeup_source_deactivate tracepoints
    PM / Sleep: Change wakeup source statistics to follow Android
    PM / Sleep: Use wait queue to signal "no wakeup events in progress"
    PM / Sleep: Look for wakeup events in later stages of device suspend
    PM / Hibernate: Hibernate/thaw fixes/improvements

    Rafael J. Wysocki
     
  • The default domain power off governor function for generic PM
    domains, default_power_down_ok(), may violate subdomain maximum
    off time limit by allowing the master domain to be off for too
    long. Namely, it only finds the minium of all device maximum
    off times over the domain's devices and uses that to compute the
    domain's maximum off time, but it should do the same for the
    subdomains.

    Fix this problem by modifying default_power_down_ok() to compute
    the given domain's maximum off time as the difference between the
    minimum off time over all devices and subdomains in the domain and
    its power on latency.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Current pm_genpd_add_subdomain() will allow duplicated link between
    master and slave domain. This patch fixed it.

    Because when current pm_genpd_add_subdomain() checks whether the link
    between the master and slave generic PM domain already exists,
    slave_links instead of master_links of master domain is used.

    Signed-off-by: Huang Ying
    Signed-off-by: Rafael J. Wysocki

    Huang Ying
     

09 May, 2012

2 commits

  • The function regmap_bulk_read() calls the regmap_read() for
    each register if set of register has volatile and cache is
    enabled. In this case, last few register read makes the memory
    corruption if the register size is not the size of unsigned int.
    The regam_read() takes argument as unsigned int for returning
    value and it update the value as
    *val = map->format.parse_val(map->work_buf);
    This causes complete 4 bytes (size of unsigned int) to get written.
    Now if client pass the memory pointer for value which is equal to the
    required size of register count in regmap_bulk_read() then last few
    register read actually update the memory beyond passed pointer size.

    Avoid this by using local variable for read and then do memcpy()
    for actual byte copy to passed pointer based on register size.

    I allocated one pointer ptr and take first 16 bytes dump of that
    pointer then call regmap_bulk_read() with pointer which is just
    on top of this allocated pointer and register count of 128. Here
    register size is 1 byte.
    The memory trace of last 5 register read are as follows:

    [ 5.438589] regmap_bulk_read after regamp_read() for register 122
    [ 5.447421] 0xef993c20 0xef993c00 0x00000000 0x00000001
    [ 5.467535] regmap_bulk_read after regamp_read() for register 123
    [ 5.476374] 0xef993c20 0xef993c00 0x00000000 0x00000001
    [ 5.496425] regmap_bulk_read after regamp_read() for register 124
    [ 5.505260] 0xef993c20 0xef993c00 0x00000000 0x00000001
    [ 5.525372] regmap_bulk_read after regamp_read() for register 125
    [ 5.534205] 0xef993c00 0xef993c00 0x00000000 0x00000001
    [ 5.554258] regmap_bulk_read after regamp_read() for register 126
    [ 5.563100] 0xef990000 0xef993c00 0x00000000 0x00000001
    [ 5.554258] regmap_bulk_read after regamp_read() for register 127
    [ 5.587108] 0xef000000 0xef993c00 0x00000000 0x00000001

    Here it is observed that the memory content at first word started changing
    on last 3 regmap_read() and so corruption happened.

    Signed-off-by: Laxman Dewangan
    Signed-off-by: Mark Brown

    Laxman Dewangan
     
  • Use devres to implement dev_get_regmap(). This should mean that in almost
    all cases devices wishing to take advantage of framework features based on
    regmap shouldn't need to explicitly pass the regmap into the framework.
    This simplifies device setup a bit.

    Signed-off-by: Mark Brown

    Mark Brown
     

08 May, 2012

1 commit

  • Extends dev_printk() to attach a dictionary with a device identifier
    and the driver core subsystem name to logged messages, which makes
    dev_prink() reliable machine-readable. In addition to the printed
    plain text message, it creates these properties:
    SUBSYSTEM= - the driver-core subsytem name
    DEVICE=
    b12:8 - block dev_t
    c127:3 - char dev_t
    n8 - netdev ifindex
    +sound:card0 - subsystem:devname

    Tested-by: William Douglas
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

06 May, 2012

1 commit

  • The results of the default device stop and domain power off governor
    functions for generic PM domains, default_stop_ok() and
    default_power_down_ok(), depend only on the timing data of devices,
    which are static, and on their PM QoS constraints. Thus, in theory,
    these functions only need to carry out their computations, which may
    be time consuming in general, when it is known that the PM QoS
    constraint of at least one of the devices in question has changed.

    Use the PM QoS notifiers of devices to implement that. First,
    introduce new fields, constraint_changed and max_off_time_changed,
    into struct gpd_timing_data and struct generic_pm_domain,
    respectively, and register a PM QoS notifier function when adding
    a device into a domain that will set those fields to 'true' whenever
    the device's PM QoS constraint is modified. Second, make
    default_stop_ok() and default_power_down_ok() use those fields to
    decide whether or not to carry out their computations from scratch.

    The device and PM domain hierarchies are taken into account in that
    and the expense is that the changes of PM QoS constraints of
    suspended devices will not be taken into account immediately, which
    isn't guaranteed anyway in general.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki