04 Jul, 2013

2 commits

  • Merge first patch-bomb from Andrew Morton:
    - various misc bits
    - I'm been patchmonkeying ocfs2 for a while, as Joel and Mark have been
    distracted. There has been quite a bit of activity.
    - About half the MM queue
    - Some backlight bits
    - Various lib/ updates
    - checkpatch updates
    - zillions more little rtc patches
    - ptrace
    - signals
    - exec
    - procfs
    - rapidio
    - nbd
    - aoe
    - pps
    - memstick
    - tools/testing/selftests updates

    * emailed patches from Andrew Morton : (445 commits)
    tools/testing/selftests: don't assume the x bit is set on scripts
    selftests: add .gitignore for kcmp
    selftests: fix clean target in kcmp Makefile
    selftests: add .gitignore for vm
    selftests: add hugetlbfstest
    self-test: fix make clean
    selftests: exit 1 on failure
    kernel/resource.c: remove the unneeded assignment in function __find_resource
    aio: fix wrong comment in aio_complete()
    drivers/w1/slaves/w1_ds2408.c: add magic sequence to disable P0 test mode
    drivers/memstick/host/r592.c: convert to module_pci_driver
    drivers/memstick/host/jmb38x_ms: convert to module_pci_driver
    pps-gpio: add device-tree binding and support
    drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
    drivers/pps/clients/pps-gpio.c: convert to devm_* helpers
    drivers/parport/share.c: use kzalloc
    Documentation/accounting/getdelays.c: avoid strncpy in accounting tool
    aoe: update internal version number to v83
    aoe: update copyright date
    aoe: perform I/O completions in parallel
    ...

    Linus Torvalds
     
  • Calling dev_set_name with a single paramter causes it to be handled as a
    format string. Many callers are passing potentially dynamic string
    content, so use "%s" in those cases to avoid any potential accidents,
    including wrappers like device_create*() and bdi_register().

    Signed-off-by: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

03 Jun, 2013

6 commits


29 Jan, 2013

1 commit


22 Jan, 2013

2 commits

  • OPP pointers cannot be expected to be valid beyond the boundary
    of rcu_read_lock and rcu_read_unlock. Unfortunately, the current
    exynos4 busfreq driver does not honor the usage constraint and stores
    the OPP pointer in struct busfreq_data. This could potentially
    become invalid later such as: across devfreq opp change decisions,
    resulting in unpredictable behavior.

    To fix this, we introduce a busfreq specific busfreq_opp_info
    structure which is used to handle OPP information. OPP information
    is de-referenced to voltage and frequency pairs as needed into
    busfreq_opp_info structure and used as needed.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     
  • OPP pointers are protected by RCU locks, the pointer validity is
    permissible only under the section of rcu_read_lock to rcu_read_unlock

    Add documentation to the effect.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     

09 Jan, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 Dec, 2012

1 commit

  • * pm-devfreq: (23 commits)
    PM / devfreq: remove compiler error with module governors (2)
    PM / devfreq: Fix return value in devfreq_remove_governor()
    PM / devfreq: Fix incorrect argument in error message
    PM / devfreq: missing rcu_read_lock() added for find_device_opp()
    PM / devfreq: remove compiler error when a governor is module
    PM / devfreq: exynos4_bus.c: Fixed an alignment of the func call args.
    PM / devfreq: Add sysfs node to expose available governors
    PM / devfreq: allow sysfs governor node to switch governor
    PM / devfreq: governors: add GPL module license and allow module build
    PM / devfreq: map devfreq drivers to governor using name
    PM / devfreq: register governors with devfreq framework
    PM / devfreq: provide hooks for governors to be registered
    PM / devfreq: export update_devfreq
    PM / devfreq: Add sysfs node for representing frequency transition information.
    PM / devfreq: Add sysfs node to expose available frequencies
    PM / devfreq: documentation cleanups for devfreq header
    PM / devfreq: Use devm_* functions in exynos4_bus.c
    PM / devfreq: make devfreq_class static
    PM / devfreq: fix sscanf handling for writable sysfs entries
    PM / devfreq: kernel-doc typo corrections
    ...

    Rafael J. Wysocki
     

29 Nov, 2012

1 commit


26 Nov, 2012

3 commits


20 Nov, 2012

11 commits

  • I fixed the following check item (via checkpatch.pl --strict option):
    CHECK: Alignment should match open parenthesis

    Signed-off-by: Sangho Yi
    [Merge conflict resolved]
    Signed-off-by: MyungJoo Ham

    Sangho Yi
     
  • Now that governor list can be variable, knowing the available governors
    is useful to be able to select a governor using relevant sysfs node.

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    Signed-off-by: MyungJoo Ham

    Nishanth Menon
     
  • This allows us to select governor runtime from the
    default configuration without having to rebuild kernel
    or the devfreq driver using the sysfs node:
    /sys/class/devfreq/.../governor
    cat of the governor will return valid governor
    and an echo 'governor_name'>governor will switch
    governor

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    Acked-by: MyungJoo Ham
    Signed-off-by: MyungJoo Ham

    Nishanth Menon
     
  • Add GPL module license and remove the static build
    restrictions for building governors. This allows governors now
    to be loaded on a need basis and reloaded independently of kernel
    build

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    Acked-by: MyungJoo Ham
    Signed-off-by: MyungJoo Ham

    Nishanth Menon
     
  • Allow devfreq drivers to register a preferred governor name
    and when the devfreq governor loads itself at a later point
    required drivers are managed appropriately, at the time of
    unload of a devfreq governor, stop managing those drivers
    as well.

    Since the governor structures do not need to be exposed
    anymore, remove the definitions and make them static

    NOTE: devfreq_list_lock is now used to protect governor
    start and stop - as this allows us to protect governors and
    devfreq with the proper dependencies as needed.

    As part of this change, change the registration of exynos
    bus driver to request for ondemand using the governor name.

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    [Merge conflict resolved by MyungJoo Ham]
    Signed-off-by: MyungJoo Ham

    Nishanth Menon
     
  • With the new registration functions, governors can be now
    registered with devfreq framework.

    NOTE: generates 'discards qualifiers from pointer target type'
    build warnings, which the next patche in this series fixes

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    Acked-by: MyungJoo Ham
    Signed-off-by: MyungJoo Ham

    Nishanth Menon
     
  • Add devfreq_add_governor and devfreq_remove_governor which
    can be invoked by governors to register with devfreq.

    This sets up the stage to dynamically switch governors and
    allow governors to be dynamically loaded as well.

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    Acked-by: MyungJoo Ham

    Nishanth Menon
     
  • Allow update_devfreq to be used by devfreq governor built
    as modules

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    Acked-by: MyungJoo Ham
    Signed-off-by: MyungJoo Ham

    Nishanth Menon
     
  • This patch adds sysfs node which can be used to get information of frequency
    transition. It represents transition table which contains total number of transition of
    each freqeuncy state and time spent. It is inspired CPUFREQ's status driver.

    Signed-off-by: Jonghwa Lee
    [Added Documentation/ABI entry, updated kernel-doc, and resolved merge conflict]
    Signed-off-by: MyungJoo Ham

    Jonghwa Lee
     
  • devfreq governors such as ondemand are controlled by a min and
    max frequency, while governors like userspace governor allow us
    to set a specific frequency.
    However, for the same specific device, depending on the SoC, the
    available frequencies can vary.

    So expose the available frequencies as a snapshot over sysfs to
    allow informed decisions.

    This was inspired by cpufreq framework's equivalent for similar
    usage sysfs node: scaling_available_frequencies.

    Cc: Rajagopal Venkat
    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Cc: "Rafael J. Wysocki"
    Cc: Kevin Hilman
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Signed-off-by: Nishanth Menon
    Signed-off-by: MyungJoo Ham

    Nishanth Menon
     
  • devm_* functions are device managed functions and make cleanup code
    simpler and smaller.
    devm_kzalloc and devm_regulator_get functions are used.

    Signed-off-by: Sachin Kamat
    [renamed the patch title by MyungJoo Ham]
    Signed-off-by: MyungJoo Ham

    Sachin Kamat
     

15 Nov, 2012

7 commits

  • Currently the opp_find* functions return -ENODEV when:
    a) it cant find a device (e.g. request for an OPP search on device
    which was not registered)
    b) When it cant find a match for the search strategy used

    This makes life a little in-efficient for users such as devfreq
    to make reasonable judgement before switching search strategies.

    So, standardize the return results as following:
    -EINVAL for bad pointer parameters
    -ENODEV when device cannot be found
    -ERANGE when search fails

    This has the following benefit for devfreq implementation:
    The search fails when an unregistered device pointer is provided.
    This is a trigger to change the search direction and search for
    a better fit, however, if we cannot differentiate between a valid
    search range failure Vs an unregistered device, second search goes
    through the same fail return condition. This can be avoided by
    appropriate handling of error return code.

    With this change, we also fix devfreq for the improved search
    strategy with updated error code.

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

    Nishanth Menon
     
  • devfreq_class is used internally by devfreq and has no
    need to be globally available.

    This also fixes the following sparse warning:
    drivers/devfreq/devfreq.c:30:14: warning: symbol 'devfreq_class' was not declared. Should it be static?

    Signed-off-by: Nishanth Menon
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     
  • sscanf returns 0 when an invalid parameter like:
    echo -n "a">min_freq
    is attempted. Returning back the return result(0) will
    cause the command not to return back to command
    prompt.

    Instead, just return -EINVAL when sscanf does not
    return 1.

    This is done for min_freq, max_freq and polling_interval

    Signed-off-by: Nishanth Menon
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     
  • Parameter documentation needs a ':' for scripts/kernel-doc
    to parse properly.

    Minor fixes for ones warned by:
    ./scripts/kernel-doc -text drivers/devfreq/devfreq.c>/dev/null

    Signed-off-by: Nishanth Menon
    Acked-by: Randy Dunlap
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Nishanth Menon
     
  • Devfreq returns governor predicted frequency as current frequency
    via sysfs interface. But device may not support all frequencies
    that governor predicts. So add a callback in device profile to get
    current freq from driver. Also add a new sysfs node to expose
    governor predicted next target frequency.

    Signed-off-by: Rajagopal Venkat
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Rajagopal Venkat
     
  • Add devfreq suspend/resume apis for devfreq users. This patch
    supports suspend and resume of devfreq load monitoring, required
    for devices which can idle.

    Signed-off-by: Rajagopal Venkat
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Rajagopal Venkat
     
  • Prepare devfreq core framework to support devices which
    can idle. When device idleness is detected perhaps through
    runtime-pm, need some mechanism to suspend devfreq load
    monitoring and resume back when device is online. Present
    code continues monitoring unless device is removed from
    devfreq core.

    This patch introduces following design changes,

    - use per device work instead of global work to monitor device
    load. This enables suspend/resume of device devfreq and
    reduces monitoring code complexity.
    - decouple delayed work based load monitoring logic from core
    by introducing helpers functions to be used by governors. This
    provides flexibility for governors either to use delayed work
    based monitoring functions or to implement their own mechanism.
    - devfreq core interacts with governors via events to perform
    specific actions. These events include start/stop devfreq.
    This sets ground for adding suspend/resume events.

    The devfreq apis are not modified and are kept intact.

    Signed-off-by: Rajagopal Venkat
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Rajagopal Venkat
     

22 Aug, 2012

1 commit


24 May, 2012

1 commit

  • 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
     

02 May, 2012

1 commit

  • Performance and powersave governor's get_target_freq
    is not called if driver chooses one of these two governors.
    Add init function in governor profile to call update_devfreq
    which will call get_target_freq subsequently.

    Signed-off-by: Xiaoguang Chen
    Acked-by: MyungJoo Ham
    Signed-off-by: Rafael J. Wysocki

    Xiaoguang Chen
     

16 Apr, 2012

1 commit