03 Jul, 2015

1 commit

  • …/kernel/git/paulg/linux

    Pull module_platform_driver replacement from Paul Gortmaker:
    "Replace module_platform_driver with builtin_platform driver in non
    modules.

    We see an increasing number of non-modular drivers using
    modular_driver() type register functions. There are several downsides
    to letting this continue unchecked:

    - The code can appear modular to a reader of the code, and they won't
    know if the code really is modular without checking the Makefile
    and Kconfig to see if compilation is governed by a bool or
    tristate.

    - Coders of drivers may be tempted to code up an __exit function that
    is never used, just in order to satisfy the required three args of
    the modular registration function.

    - Non-modular code ends up including the <module.h> which increases
    CPP overhead that they don't need.

    - It hinders us from performing better separation of the module init
    code and the generic init code.

    So here we introduce similar macros for builtin drivers. Then we
    convert builtin drivers (controlled by a bool Kconfig) by making the
    following type of mapping:

    module_platform_driver() ---> builtin_platform_driver()
    module_platform_driver_probe() ---> builtin_platform_driver_probe().

    The set of drivers that are converted here are just the ones that
    showed up as relying on an implicit include of <module.h> during a
    pending header cleanup. So we convert them here vs adding an include
    of <module.h> to non-modular code to avoid compile fails. Additonal
    conversions can be done asynchronously at any time.

    Once again, an unused module_exit function that is removed here
    appears in the diffstat as an outlier wrt all the other changes"

    * tag 'module-builtin_driver-v4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    drivers/clk: convert sunxi/clk-mod0.c to use builtin_platform_driver
    drivers/power: Convert non-modular syscon-reboot to use builtin_platform_driver
    drivers/soc: Convert non-modular soc-realview to use builtin_platform_driver
    drivers/soc: Convert non-modular tegra/pmc to use builtin_platform_driver
    drivers/cpufreq: Convert non-modular s5pv210-cpufreq.c to use builtin_platform_driver
    drivers/cpuidle: Convert non-modular drivers to use builtin_platform_driver
    drivers/platform: Convert non-modular pdev_bus to use builtin_platform_driver
    platform_device: better support builtin boilerplate avoidance

    Linus Torvalds
     

02 Jul, 2015

1 commit

  • Pull power management and ACPI fixes from Rafael Wysocki:
    "These are fixes that didn't make it to the previous PM+ACPI pull
    request or are fixing issues introduced by it.

    Specifics:

    - Fix a recently added memory leak in an error path in the ACPI
    resources management code (Dan Carpenter)

    - Fix a build warning triggered by an ACPI video header function that
    should be static inline (Borislav Petkov)

    - Change names of helper function converting struct fwnode_handle
    pointers to either struct device_node or struct acpi_device
    pointers so they don't conflict with local variable names
    (Alexander Sverdlin)

    - Make the hibernate core re-enable nonboot CPUs on failures to
    disable them as expected (Vitaly Kuznetsov)

    - Increase the default timeout of the device suspend watchdog to
    prevent it from triggering too early on some systems (Takashi Iwai)

    - Prevent the cpuidle powernv driver from registering idle states
    with CPUIDLE_FLAG_TIMER_STOP set if CONFIG_TICK_ONESHOT is unset
    which leads to boot hangs (Preeti U Murthy)"

    * tag 'pm+acpi-4.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    tick/idle/powerpc: Do not register idle states with CPUIDLE_FLAG_TIMER_STOP set in periodic mode
    PM / sleep: Increase default DPM watchdog timeout to 60
    PM / hibernate: re-enable nonboot cpus on disable_nonboot_cpus() failure
    ACPI / OF: Rename of_node() and acpi_node() to to_of_node() and to_acpi_node()
    ACPI / video: Inline acpi_video_set_dmi_backlight_type
    ACPI / resources: free memory on error in add_region_before()

    Linus Torvalds
     

27 Jun, 2015

1 commit

  • Pull ARM updates from Russell King:
    "Bigger items included in this update are:

    - A series of updates from Arnd for ARM randconfig build failures
    - Updates from Dmitry for StrongARM SA-1100 to move IRQ handling to
    drivers/irqchip/
    - Move ARMs SP804 timer to drivers/clocksource/
    - Perf updates from Mark Rutland in preparation to move the ARM perf
    code into drivers/ so it can be shared with ARM64.
    - MCPM updates from Nicolas
    - Add support for taking platform serial number from DT
    - Re-implement Keystone2 physical address space switch to conform to
    architecture requirements
    - Clean up ARMv7 LPAE code, which goes in hand with the Keystone2
    changes.
    - L2C cleanups to avoid unlocking caches if we're prevented by the
    secure support to unlock.
    - Avoid cleaning a potentially dirty cache containing stale data on
    CPU initialisation
    - Add ARM-only entry point for secondary startup (for machines that
    can only call into a Thumb kernel in ARM mode). Same thing is also
    done for the resume entry point.
    - Provide arch_irqs_disabled via asm-generic
    - Enlarge ARMv7M vector table
    - Always use BFD linker for VDSO, as gold doesn't accept some of the
    options we need.
    - Fix an incorrect BSYM (for Thumb symbols) usage, and convert all
    BSYM compiler macros to a "badr" (for branch address).
    - Shut up compiler warnings provoked by our cmpxchg() implementation.
    - Ensure bad xchg sizes fail to link"

    * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (75 commits)
    ARM: Fix build if CLKDEV_LOOKUP is not configured
    ARM: fix new BSYM() usage introduced via for-arm-soc branch
    ARM: 8383/1: nommu: avoid deprecated source register on mov
    ARM: 8391/1: l2c: add options to overwrite prefetching behavior
    ARM: 8390/1: irqflags: Get arch_irqs_disabled from asm-generic
    ARM: 8387/1: arm/mm/dma-mapping.c: Add arm_coherent_dma_mmap
    ARM: 8388/1: tcm: Don't crash when TCM banks are protected by TrustZone
    ARM: 8384/1: VDSO: force use of BFD linker
    ARM: 8385/1: VDSO: group link options
    ARM: cmpxchg: avoid warnings from macro-ized cmpxchg() implementations
    ARM: remove __bad_xchg definition
    ARM: 8369/1: ARMv7M: define size of vector table for Vybrid
    ARM: 8382/1: clocksource: make ARM_TIMER_SP804 depend on GENERIC_SCHED_CLOCK
    ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource
    ARM: 8365/1: introduce sp804_timer_disable and remove arm_timer.h inclusion
    ARM: 8364/1: fix BE32 module loading
    ARM: 8360/1: add secondary_startup_arm prototype in header file
    ARM: 8359/1: correct secondary_startup_arm mode
    ARM: proc-v7: sanitise and document registers around errata
    ARM: proc-v7: clean up MIDR access
    ...

    Linus Torvalds
     

26 Jun, 2015

2 commits

  • * acpi-video:
    ACPI / video: Inline acpi_video_set_dmi_backlight_type

    * device-properties:
    ACPI / OF: Rename of_node() and acpi_node() to to_of_node() and to_acpi_node()

    * pm-sleep:
    PM / sleep: Increase default DPM watchdog timeout to 60
    PM / hibernate: re-enable nonboot cpus on disable_nonboot_cpus() failure

    * pm-cpuidle:
    tick/idle/powerpc: Do not register idle states with CPUIDLE_FLAG_TIMER_STOP set in periodic mode

    Rafael J. Wysocki
     
  • On some archs, the local clockevent device stops in deep cpuidle states.
    The broadcast framework is used to wakeup cpus in these idle states, in
    which either an external clockevent device is used to send wakeup ipis
    or the hrtimer broadcast framework kicks in in the absence of such a
    device. One cpu is nominated as the broadcast cpu and this cpu sends
    wakeup ipis to sleeping cpus at the appropriate time. This is the
    implementation in the oneshot mode of broadcast.

    In periodic mode of broadcast however, the presence of such cpuidle
    states results in the cpuidle driver calling tick_broadcast_enable()
    which shuts down the local clockevent devices of all the cpus and
    appoints the tick broadcast device as the clockevent device for each of
    them. This works on those archs where the tick broadcast device is a
    real clockevent device. But on archs which depend on the hrtimer mode
    of broadcast, the tick broadcast device hapens to be a pseudo device.
    The consequence is that the local clockevent devices of all cpus are
    shutdown and the kernel hangs at boot time in periodic mode.

    Let us thus not register the cpuidle states which have
    CPUIDLE_FLAG_TIMER_STOP flag set, on archs which depend on the hrtimer
    mode of broadcast in periodic mode. This patch takes care of doing this
    on powerpc. The cpus would not have entered into such deep cpuidle
    states in periodic mode on powerpc anyway. So there is no loss here.

    Signed-off-by: Preeti U Murthy
    Cc: 3.19+ # 3.19+
    Signed-off-by: Rafael J. Wysocki

    preeti
     

22 Jun, 2015

2 commits


19 Jun, 2015

1 commit

  • * pm-sleep:
    PM / sleep: trace_device_pm_callback coverage in dpm_prepare/complete
    PM / wakeup: add a dummy wakeup_source to record statistics
    PM / sleep: Make suspend-to-idle-specific code depend on CONFIG_SUSPEND
    PM / sleep: Return -EBUSY from suspend_enter() on wakeup detection
    PM / tick: Add tracepoints for suspend-to-idle diagnostics
    PM / sleep: Fix symbol name in a comment in kernel/power/main.c
    leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger
    ARM: omap-device: use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS
    bus: omap_l3_noc: add missed callbacks for suspend-to-disk
    PM / sleep: Add macro to define common noirq system PM callbacks
    PM / sleep: Refine diagnostic messages in enter_state()
    PM / wakeup: validate wakeup source before activating it.

    * pm-runtime:
    PM / Runtime: Update last_busy in rpm_resume
    PM / runtime: add note about re-calling in during device probe()

    Rafael J. Wysocki
     

17 Jun, 2015

1 commit

  • All these drivers are configured with Kconfig options that are
    declared as bool. Hence it is not possible for the code
    to be built as modular. However the code is currently using the
    module_platform_driver() macro for driver registration.

    While this currently works, we really don't want to be including
    the module.h header in non-modular code, which we'll be forced
    to do, pending some upcoming code relocation from init.h into
    module.h. So we fix it now by using the non-modular equivalent.

    Cc: "Rafael J. Wysocki"
    Cc: Daniel Lezcano
    Cc: Michal Simek
    Cc: linux-pm@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

30 May, 2015

1 commit

  • The CPUIDLE_DRIVER_STATE_START symbol is defined as 1 only if
    CONFIG_ARCH_HAS_CPU_RELAX is set, otherwise it is defined as 0.
    However, if CONFIG_ARCH_HAS_CPU_RELAX is set, the first (index 0)
    entry in the cpuidle driver's table of states is overwritten with
    the default "poll" entry by the core. The "state" defined by the
    "poll" entry doesn't provide ->enter_dead and ->enter_freeze
    callbacks and its exit_latency is 0.

    For this reason, it is not necessary to use CPUIDLE_DRIVER_STATE_START
    in cpuidle_play_dead() (->enter_dead is NULL, so the "poll state"
    will be skipped by the loop).

    It also is arguably unuseful to return states with exit_latency
    equal to 0 from find_deepest_state(), so the function can be modified
    to start the loop from index 0 and the "poll state" will be skipped by
    it as a result of the check against latency_req.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Preeti U Murthy

    Rafael J. Wysocki
     

19 May, 2015

1 commit


15 May, 2015

3 commits

  • If tick_broadcast_enter() fails in cpuidle_enter_state(),
    try to find another idle state to enter instead of invoking
    default_idle_call() immediately and returning -EBUSY which
    should increase the chances of saving some energy in those
    cases.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Preeti U Murthy
    Tested-by: Preeti U Murthy
    Tested-by: Sudeep Holla
    Acked-by: Kevin Hilman

    Rafael J. Wysocki
     
  • The check of the cpuidle_enter() return value against -EBUSY
    made in call_cpuidle() will not be necessary any more if
    cpuidle_enter_state() calls default_idle_call() directly when it
    is about to return -EBUSY, so make that happen and eliminate the
    check.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Preeti U Murthy
    Tested-by: Preeti U Murthy
    Tested-by: Sudeep Holla
    Acked-by: Kevin Hilman

    Rafael J. Wysocki
     
  • Introduce a wrapper function around idle_set_state() called
    sched_idle_set_state() that will pass this_rq() to it as the
    first argument and make cpuidle_enter_state() call the new
    function before and after entering the target state.

    At the same time, remove direct invocations of idle_set_state()
    from call_cpuidle().

    This will allow the invocation of default_idle_call() to be
    moved from call_cpuidle() to cpuidle_enter_state() safely
    and call_cpuidle() to be simplified a bit as a result.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Preeti U Murthy
    Tested-by: Preeti U Murthy
    Tested-by: Sudeep Holla
    Acked-by: Kevin Hilman

    Rafael J. Wysocki
     

10 May, 2015

1 commit


06 May, 2015

1 commit

  • This is currently unused.

    If a suspend must be limited to CPU level only by preventing the last man
    from triggering a cluster level suspend then this should be determined
    according to many other criteria the MCPM layer is currently not aware of.
    It is unlikely that mcpm_cpu_suspend() would be the proper conduit for
    that information anyway.

    Signed-off-by: Nicolas Pitre
    Acked-by: Dave Martin

    Nicolas Pitre
     

05 May, 2015

1 commit

  • Avoid calling the governor's ->reflect method if the state index
    passed to cpuidle_reflect() is negative.

    This allows the analogous check to be dropped from menu_reflect(),
    so do that too, and ensures that arbitrary error codes can be
    passed to cpuidle_reflect() as the index with no adverse
    consequences.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Daniel Lezcano
    Acked-by: Peter Zijlstra (Intel)

    Rafael J. Wysocki
     

29 Apr, 2015

1 commit

  • Commit 335f49196fd6 (sched/idle: Use explicit broadcast oneshot
    control function) replaced clockevents_notify() invocations in
    cpuidle_idle_call() with direct calls to tick_broadcast_enter()
    and tick_broadcast_exit(), but it overlooked the fact that
    interrupts were already enabled before calling the latter which
    led to functional breakage on systems using idle states with the
    CPUIDLE_FLAG_TIMER_STOP flag set.

    Fix that by moving the invocations of tick_broadcast_enter()
    and tick_broadcast_exit() down into cpuidle_enter_state() where
    interrupts are still disabled when tick_broadcast_exit() is
    called. Also ensure that interrupts will be disabled before
    running tick_broadcast_exit() even if they have been enabled by
    the idle state's ->enter callback. Trigger a WARN_ON_ONCE() in
    that case, as we generally don't want that to happen for states
    with CPUIDLE_FLAG_TIMER_STOP set.

    Fixes: 335f49196fd6 (sched/idle: Use explicit broadcast oneshot control function)
    Reported-and-tested-by: Linus Walleij
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Daniel Lezcano
    Reported-and-tested-by: Sudeep Holla
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

23 Apr, 2015

1 commit

  • Pull ARM SoC fixes from Olof Johansson:
    "Here's the usual "low-priority fixes that didn't make it into the last
    few -rcs, with a twist: We had a fixes pull request that I didn't send
    in time to get into 4.0, so we'll send some of them to Greg for
    -stable as well.

    Contents here is as usual not all that controversial:

    - a handful of randconfig fixes from Arnd, in particular for older
    Samsung platforms

    - Exynos fixes, !SMP building, DTS updates for MMC and lid switch

    - Kbuild fix to create output subdirectory for DTB files

    - misc minor fixes for OMAP"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
    ARM: at91/dt: sama5d3 xplained: add phy address for macb1
    kbuild: Create directory for target DTB
    ARM: mvebu: Disable CPU Idle on Armada 38x
    ARM: DRA7: Enable Cortex A15 errata 798181
    ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102
    ARM: dts: DRA7: Add bandgap and related thermal nodes
    bus: ocp2scp: SYNC2 value should be changed to 0x6
    ARM: dts: am4372: Add "ti,am437x-ocp2scp" as compatible string for OCP2SCP
    ARM: OMAP2+: remove superfluous NULL pointer check
    ARM: EXYNOS: Fix build breakage cpuidle on !SMP
    ARM: dts: fix lid and power pin-functions for exynos5250-spring
    ARM: dts: fix mmc node updates for exynos5250-spring
    ARM: OMAP4: remove dead kconfig option OMAP4_ERRATA_I688
    MAINTAINERS: add OMAP defconfigs under OMAP SUPPORT
    ARM: OMAP1: PM: fix some build warnings on 1510-only Kconfigs
    ARM: cns3xxx: don't export static symbol
    ARM: S3C24XX: avoid a Kconfig warning
    ARM: S3C24XX: fix header file inclusions
    ARM: S3C24XX: fix building without PM_SLEEP
    ARM: S3C24XX: use SAMSUNG_WAKEMASK for s3c2416
    ...

    Linus Torvalds
     

21 Apr, 2015

1 commit

  • Pull final removal of deprecated cpus_* cpumask functions from Rusty Russell:
    "This is the final removal (after several years!) of the obsolete
    cpus_* functions, prompted by their mis-use in staging.

    With these function removed, all cpu functions should only iterate to
    nr_cpu_ids, so we finally only allocate that many bits when cpumasks
    are allocated offstack"

    * tag 'cpumask-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (25 commits)
    cpumask: remove __first_cpu / __next_cpu
    cpumask: resurrect CPU_MASK_CPU0
    linux/cpumask.h: add typechecking to cpumask_test_cpu
    cpumask: only allocate nr_cpumask_bits.
    Fix weird uses of num_online_cpus().
    cpumask: remove deprecated functions.
    mips: fix obsolete cpumask_of_cpu usage.
    x86: fix more deprecated cpu function usage.
    ia64: remove deprecated cpus_ usage.
    powerpc: fix deprecated CPU_MASK_CPU0 usage.
    CPU_MASK_ALL/CPU_MASK_NONE: remove from deprecated region.
    staging/lustre/o2iblnd: Don't use cpus_weight
    staging/lustre/libcfs: replace deprecated cpus_ calls with cpumask_
    staging/lustre/ptlrpc: Do not use deprecated cpus_* functions
    blackfin: fix up obsolete cpu function usage.
    parisc: fix up obsolete cpu function usage.
    tile: fix up obsolete cpu function usage.
    arm64: fix up obsolete cpu function usage.
    mips: fix up obsolete cpu function usage.
    x86: fix up obsolete cpu function usage.
    ...

    Linus Torvalds
     

17 Apr, 2015

1 commit

  • Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal
    implementation and use the kernel one.

    Signed-off-by: Javi Merino
    Acked-by: Rafael J. Wysocki
    Cc: Mel Gorman
    Cc: Stephen Hemminger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Javi Merino
     

15 Apr, 2015

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "These are mostly fixes and cleanups all over, although there are a few
    items that sort of fall into the new feature category.

    First off, we have new callbacks for PM domains that should help us to
    handle some issues related to device initialization in a better way.

    There also is some consolidation in the unified device properties API
    area allowing us to use that inferface for accessing data coming from
    platform initialization code in addition to firmware-provided data.

    We have some new device/CPU IDs in a few drivers, support for new
    chips and a new cpufreq driver too.

    Specifics:

    - Generic PM domains support update including new PM domain callbacks
    to handle device initialization better (Russell King, Rafael J
    Wysocki, Kevin Hilman)

    - Unified device properties API update including a new mechanism for
    accessing data provided by platform initialization code (Rafael J
    Wysocki, Adrian Hunter)

    - ARM cpuidle update including ARM32/ARM64 handling consolidation
    (Daniel Lezcano)

    - intel_idle update including support for the Silvermont Core in the
    Baytrail SOC and for the Airmont Core in the Cherrytrail and
    Braswell SOCs (Len Brown, Mathias Krause)

    - New cpufreq driver for Hisilicon ACPU (Leo Yan)

    - intel_pstate update including support for the Knights Landing chip
    (Dasaratharaman Chandramouli, Kristen Carlson Accardi)

    - QorIQ cpufreq driver update (Tang Yuantian, Arnd Bergmann)

    - powernv cpufreq driver update (Shilpasri G Bhat)

    - devfreq update including Tegra support changes (Tomeu Vizoso,
    MyungJoo Ham, Chanwoo Choi)

    - powercap RAPL (Running-Average Power Limit) driver update including
    support for Intel Broadwell server chips (Jacob Pan, Mathias Krause)

    - ACPI device enumeration update related to the handling of the
    special PRP0001 device ID allowing DT-style 'compatible' property
    to be used for ACPI device identification (Rafael J Wysocki)

    - ACPI EC driver update including limited _DEP support (Lan Tianyu,
    Lv Zheng)

    - ACPI backlight driver update including a new mechanism to allow
    native backlight handling to be forced on non-Windows 8 systems and
    a new quirk for Lenovo Ideapad Z570 (Aaron Lu, Hans de Goede)

    - New Windows Vista compatibility quirk for Sony VGN-SR19XN (Chen Yu)

    - Assorted ACPI fixes and cleanups (Aaron Lu, Martin Kepplinger,
    Masanari Iida, Mika Westerberg, Nan Li, Rafael J Wysocki)

    - Fixes related to suspend-to-idle for the iTCO watchdog driver and
    the ACPI core system suspend/resume code (Rafael J Wysocki, Chen Yu)

    - PM tracing support for the suspend phase of system suspend/resume
    transitions (Zhonghui Fu)

    - Configurable delay for the system suspend/resume testing facility
    (Brian Norris)

    - PNP subsystem cleanups (Peter Huewe, Rafael J Wysocki)"

    * tag 'pm+acpi-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (74 commits)
    ACPI / scan: Fix NULL pointer dereference in acpi_companion_match()
    ACPI / scan: Rework modalias creation when "compatible" is present
    intel_idle: mark cpu id array as __initconst
    powercap / RAPL: mark rapl_ids array as __initconst
    powercap / RAPL: add ID for Broadwell server
    intel_pstate: Knights Landing support
    intel_pstate: remove MSR test
    cpufreq: fix qoriq uniprocessor build
    ACPI / scan: Take the PRP0001 position in the list of IDs into account
    ACPI / scan: Simplify acpi_match_device()
    ACPI / scan: Generalize of_compatible matching
    device property: Introduce firmware node type for platform data
    device property: Make it possible to use secondary firmware nodes
    PM / watchdog: iTCO: stop watchdog during system suspend
    cpufreq: hisilicon: add acpu driver
    ACPI / EC: Call acpi_walk_dep_device_list() after installing EC opregion handler
    cpufreq: powernv: Report cpu frequency throttling
    intel_idle: Add support for the Airmont Core in the Cherrytrail and Braswell SOCs
    intel_idle: Update support for Silvermont Core in Baytrail SOC
    PM / devfreq: tegra: Register governor on module init
    ...

    Linus Torvalds
     

14 Apr, 2015

1 commit

  • Pull timer updates from Ingo Molnar:
    "The main changes in this cycle were:

    - clockevents state machine cleanups and enhancements (Viresh Kumar)

    - clockevents broadcast notifier horror to state machine conversion
    and related cleanups (Thomas Gleixner, Rafael J Wysocki)

    - clocksource and timekeeping core updates (John Stultz)

    - clocksource driver updates and fixes (Ben Dooks, Dmitry Osipenko,
    Hans de Goede, Laurent Pinchart, Maxime Ripard, Xunlei Pang)

    - y2038 fixes (Xunlei Pang, John Stultz)

    - NMI-safe ktime_get_raw_fast() and general refactoring of the clock
    code, in preparation to perf's per event clock ID support (Peter
    Zijlstra)

    - generic sched/clock fixes, optimizations and cleanups (Daniel
    Thompson)

    - clockevents cpu_down() race fix (Preeti U Murthy)"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (94 commits)
    timers/PM: Drop unnecessary braces from tick_freeze()
    timers/PM: Fix up tick_unfreeze()
    timekeeping: Get rid of stale comment
    clockevents: Cleanup dead cpu explicitely
    clockevents: Make tick handover explicit
    clockevents: Remove broadcast oneshot control leftovers
    sched/idle: Use explicit broadcast oneshot control function
    ARM: Tegra: Use explicit broadcast oneshot control function
    ARM: OMAP: Use explicit broadcast oneshot control function
    intel_idle: Use explicit broadcast oneshot control function
    ACPI/idle: Use explicit broadcast control function
    ACPI/PAD: Use explicit broadcast oneshot control function
    x86/amd/idle, clockevents: Use explicit broadcast oneshot control functions
    clockevents: Provide explicit broadcast oneshot control functions
    clockevents: Remove the broadcast control leftovers
    ARM: OMAP: Use explicit broadcast control function
    intel_idle: Use explicit broadcast control function
    cpuidle: Use explicit broadcast control function
    ACPI/processor: Use explicit broadcast control function
    ACPI/PAD: Use explicit broadcast control function
    ...

    Linus Torvalds
     

10 Apr, 2015

1 commit


04 Apr, 2015

1 commit

  • …ne/linux-samsung into fixes

    Merge "Samsung 2nd fixes for v4.0" from Kukjin Kim:

    - Fix build breakage exynos cpuidle driver on !SMP
    because it is coupled built-in so added check for SMP.

    - Fix lid, power pin-functions and mmc node updates
    for exynos5250-spring: Fixes commit ID 53dd4138bb0a
    ("ARM: dts: Add exynos5250-spring device tree")

    * tag 'samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
    ARM: EXYNOS: Fix build breakage cpuidle on !SMP
    ARM: dts: fix lid and power pin-functions for exynos5250-spring
    ARM: dts: fix mmc node updates for exynos5250-spring

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

03 Apr, 2015

2 commits

  • Thomas Schlichter reports the following issue on his Samsung NC20:

    "The C-states C1 and C2 to the OS when connected to AC, and additionally
    provides the C3 C-state when disconnected from AC. However, the number
    of C-states shown in sysfs is fixed to the number of C-states present
    at boot.
    If I boot with AC connected, I always only see the C-states up to C2
    even if I disconnect AC.

    The reason is commit 130a5f692425 (ACPI / cpuidle: remove dev->state_count
    setting). It removes the update of dev->state_count, but sysfs uses
    exactly this variable to show the C-states.

    The fix is to use drv->state_count in sysfs. As this is currently the
    last user of dev->state_count, this variable can be completely removed."

    Remove dev->state_count as per the above.

    Reported-by: Thomas Schlichter
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kyungmin Park
    Acked-by: Daniel Lezcano
    Cc: 3.14+ # 3.14+
    [ rjw: Changelog ]
    Signed-off-by: Rafael J. Wysocki

    Bartlomiej Zolnierkiewicz
     
  • Replace the clockevents_notify() call with an explicit function call.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Rafael J. Wysocki
    Cc: Daniel Lezcano
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/2106401.cYdJzzA6Ic@vostro.rjw.lan
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

24 Mar, 2015

6 commits

  • If the cpuidle init cpu operation returns -ENXIO, therefore reporting HW
    failure or misconfiguration, the CPUidle driver skips the respective
    cpuidle device initialization because the associated platform back-end HW
    is not operational.

    That prevents the system to crash and allows to handle the error gracefully.

    For example, on Qcom's platform, each core has a SPM. The device associated
    with this SPM is initialized before the cpuidle framework. If there is an error
    in the initialization (eg. error in the DT), the system continues to boot but
    in degraded mode as some SPM may not be correctly initialized.

    Signed-off-by: Daniel Lezcano
    Acked-by: Lorenzo Pieralisi

    Daniel Lezcano
     
  • ARM32 and ARM64 have the same DT definitions and the same approaches.

    The generic ARM cpuidle driver can be put in common for those two
    architectures.

    Signed-off-by: Daniel Lezcano
    Acked-by: Kevin Hilman
    Acked-by: Rob Herring
    Acked-by: Lorenzo Pieralisi
    Tested-by: Lorenzo Pieralisi

    Daniel Lezcano
     
  • In the next patch, this driver will be common across ARM/ARM64. Remove all refs
    to ARM64 as it will be shared with ARM32.

    Signed-off-by: Daniel Lezcano
    Acked-by: Kevin Hilman
    Acked-by: Rob Herring
    Acked-by: Lorenzo Pieralisi
    Tested-by: Lorenzo Pieralisi

    Daniel Lezcano
     
  • With this change the cpuidle-arm64.c file calls the same function name
    for both ARM and ARM64.

    Signed-off-by: Daniel Lezcano
    Acked-by: Kevin Hilman
    Acked-by: Rob Herring
    Acked-by: Catalin Marinas
    Tested-by: Lorenzo Pieralisi

    Daniel Lezcano
     
  • Call the common ARM/ARM64 'arm_cpuidle_suspend' instead of cpu_suspend function
    which is specific to ARM64.

    Signed-off-by: Daniel Lezcano
    Acked-by: Kevin Hilman
    Acked-by: Rob Herring
    Acked-by: Lorenzo Pieralisi
    Tested-by: Lorenzo Pieralisi

    Daniel Lezcano
     
  • The cpu_do_idle() function is always used by the cpuidle drivers.

    That led to have each driver including cpuidle.h and proc-fns.h, they are
    always paired. That makes a lot of duplicate headers inclusion. Instead of
    including both in each .c file, move the proc-fns.h header inclusion in the
    cpuidle.h header file directly, so we can save some line of code.

    Signed-off-by: Daniel Lezcano
    Acked-by: Kevin Hilman
    Acked-by: Lorenzo Pieralisi
    Tested-by: Lorenzo Pieralisi

    Daniel Lezcano
     

18 Mar, 2015

1 commit

  • The Exynos cpuidle driver has coupled cpuidle built-in so it cannot be
    built without SMP:

    arch/arm/mach-exynos/pm.c: In function 'exynos_cpu0_enter_aftr':
    arch/arm/mach-exynos/pm.c:246:4: error: implicit declaration of function 'arch_send_wakeup_ipi_mask' [-Werror=implicit-function-declaration]
    arch/arm/mach-exynos/built-in.o: In function 'exynos_pre_enter_aftr':
    ../arch/arm/mach-exynos/pm.c:300: undefined reference to 'cpu_boot_reg_base'
    arch/arm/mach-exynos/built-in.o: In function 'exynos_cpu1_powerdown':
    ../arch/arm/mach-exynos/pm.c:282: undefined reference to 'exynos_cpu_power_down'

    Fix it by adding missing checks for SMP.

    Reported-by: Krzysztof Kozlowski
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Kukjin Kim

    Bartlomiej Zolnierkiewicz
     

14 Mar, 2015

2 commits

  • Originally, the thresholds used in the cpuidle driver for Armada SOCs
    were temporarily chosen, leaving room for improvements.

    This commit updates the thresholds for the Armada XP SOCs with values
    that positively impact performances:

    without patch with patch vendor kernel
    - iperf localhost (gbit/sec) ~3.7 ~6.4 ~5.4
    - ioping tmpfs (iops) ~163k ~206k ~179k
    - ioping tmpfs (mib/s) ~636 ~805 ~699

    The idle power consumption is negatively impacted (proportionally less
    than the performance gain), and we are still performing better than
    the vendor kernel here:

    without patch with patch vendor kernel
    - power consumption idle (W) ~2.4 ~3.2 ~4.4
    - power consumption busy (W) ~8.6 ~8.3 ~8.6

    There is still room for improvement regarding the value of these
    thresholds, they were chosen to mimic the vendor kernel.

    This patch only impacts Armada XP SOCs and was tested on Online Labs
    C1 boards. A similar approach can be taken to improve the performances
    of the Armada 370 and Armada 38x SOCs.

    Thanks a lot to Thomas Petazzoni, Gregory Clement and Willy Tarreau
    for the discussions and tips around this topic.

    Signed-off-by: Sebastien Rannou
    Signed-off-by: Daniel Lezcano
    Acked-by: Gregory CLEMENT

    Sebastien Rannou
     
  • As stated in kernel/cpu_pm.c, "Platform is responsible for ensuring
    that cpu_pm_enter is not called twice on the same CPU before
    cpu_pm_exit is called.". In the current code in case of failure when
    calling mvebu_v7_cpu_suspend, the function cpu_pm_exit() is never
    called whereas cpu_pm_enter() was called just before.

    This patch moves the cpu_pm_exit() in order to balance the
    cpu_pm_enter() calls.

    Cc: stable@vger.kernel.org
    Reported-by: Fulvio Benini
    Signed-off-by: Gregory CLEMENT
    Signed-off-by: Daniel Lezcano

    Gregory CLEMENT
     

06 Mar, 2015

1 commit

  • Commit 381063133246 (PM / sleep: Re-implement suspend-to-idle handling)
    overlooked the fact that entering some sufficiently deep idle states
    by CPUs may cause their local timers to stop and in those cases it
    is necessary to switch over to a broadcast timer prior to entering
    the idle state. If the cpuidle driver in use does not provide
    the new ->enter_freeze callback for any of the idle states, that
    problem affects suspend-to-idle too, but it is not taken into account
    after the changes made by commit 381063133246.

    Fix that by changing the definition of cpuidle_enter_freeze() and
    re-arranging of the code in cpuidle_idle_call(), so the former does
    not call cpuidle_enter() any more and the fallback case is handled
    by cpuidle_idle_call() directly.

    Fixes: 381063133246 (PM / sleep: Re-implement suspend-to-idle handling)
    Reported-and-tested-by: Lorenzo Pieralisi
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Peter Zijlstra (Intel)

    Rafael J. Wysocki
     

05 Mar, 2015

1 commit


01 Mar, 2015

2 commits

  • Modify cpuidle_enter_freeze() to do the sanity checks done by
    cpuidle_select() to avoid crashing the suspend-to-idle code
    path in case something is missing.

    Fixes: 381063133246 (PM / sleep: Re-implement suspend-to-idle handling)
    Original-by: Lorenzo Pieralisi
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Peter Zijlstra (Intel)

    Rafael J. Wysocki
     
  • Disabling interrupts at the end of cpuidle_enter_freeze() is not
    useful, because its caller, cpuidle_idle_call(), re-enables them
    right away after invoking it.

    To avoid that unnecessary back and forth dance with interrupts,
    make cpuidle_enter_freeze() enable interrupts after calling
    enter_freeze_proper() and drop the local_irq_disable() at its
    end, so that all of the code paths in it end up with interrupts
    enabled. Then, cpuidle_idle_call() will not need to re-enable
    interrupts after calling cpuidle_enter_freeze() any more, because
    the latter will return with interrupts enabled, in analogy with
    cpuidle_enter().

    Reported-by: Lorenzo Pieralisi
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Peter Zijlstra (Intel)

    Rafael J. Wysocki