aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-03-25x86: hpet: Use proper destructor for delayed workThomas Gleixner1-1/+1
destroy_timer_on_stack() is hardly the right thing for a delayed work. We leak a tracking object for the work itself when DEBUG_OBJECTS is enabled. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Vince Weaver <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-25workqueue: Provide destroy_delayed_work_on_stack()Thomas Gleixner2-0/+9
If a delayed or deferrable work is on stack we need to tell debug objects that we are destroying the timer and the work. Otherwise we leak the tracking object. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Vince Weaver <[email protected]> Acked-by: Tejun Heo <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-22clocksource: CMT, MTU2, TMU and STI should depend on GENERIC_CLOCKEVENTSGeert Uytterhoeven1-0/+4
If GENERIC_CLOCKEVENTS=n: drivers/clocksource/sh_cmt.c:54:28: error: field 'ced' has incomplete type drivers/clocksource/sh_cmt.c: In function 'sh_cmt_interrupt': drivers/clocksource/sh_cmt.c:407:23: error: 'CLOCK_EVT_MODE_ONESHOT' undeclared (first use in this function) drivers/clocksource/sh_mtu2.c:44:28: error: field 'ced' has incomplete type drivers/clocksource/sh_mtu2.c: In function 'ced_to_sh_mtu2': drivers/clocksource/sh_mtu2.c:184:70: warning: initialization from incompatible pointer type [enabled by default] drivers/clocksource/sh_mtu2.c: At top level: drivers/clocksource/sh_mtu2.c:188:16: warning: 'enum clock_event_mode' declared inside parameter list [enabled by default] drivers/clocksource/sh_tmu.c:45:28: error: field 'ced' has incomplete type drivers/clocksource/sh_tmu.c: In function 'sh_tmu_interrupt': drivers/clocksource/sh_tmu.c:207:21: error: 'CLOCK_EVT_MODE_ONESHOT' undeclared (first use in this function) drivers/clocksource/em_sti.c:44:28: error: field 'ced' has incomplete type drivers/clocksource/em_sti.c: In function 'ced_to_em_sti': drivers/clocksource/em_sti.c:251:69: warning: initialization from incompatible pointer type [enabled by default] drivers/clocksource/em_sti.c: At top level: drivers/clocksource/em_sti.c:255:16: warning: 'enum clock_event_mode' declared inside parameter list [enabled by default] Signed-off-by: Geert Uytterhoeven <[email protected]> Cc: Magnus Damm <[email protected]> Cc: Daniel Lezcano <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-20timer: Remove code redundancy while calling get_nohz_timer_target()Viresh Kumar4-22/+11
There are only two users of get_nohz_timer_target(): timer and hrtimer. Both call it under same circumstances, i.e. #ifdef CONFIG_NO_HZ_COMMON if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu)) return get_nohz_timer_target(); #endif So, it makes more sense to get all this as part of get_nohz_timer_target() instead of duplicating code at two places. For this another parameter is required to be passed to this routine, pinned. Signed-off-by: Viresh Kumar <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/1e1b53537217d58d48c2d7a222a9c3ac47d5b64c.1395140107.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-20hrtimer: Rearrange comments in the order struct members are declaredViresh Kumar1-2/+2
Rearrange kernel doc comments in the order members of struct hrtimer are declared. Signed-off-by: Viresh Kumar <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/1db1a3cfbe8a9ea49396af75c6ac04a2e67e3ab0.1395226248.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-20timer: Use variable head instead of &work_list in __run_timers()Viresh Kumar1-1/+1
We already have a variable 'head' that points to '&work_list', and so we should use that instead wherever possible. Signed-off-by: Viresh Kumar <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/0d8645a6efc8360c4196c9797d59343abbfdcc5e.1395129136.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-11clocksource: exynos_mct: silence a static checker warningDan Carpenter1-1/+1
My guess is we aren't going to have a 2 digit cpuid here any time soon but the static checkers don't know that and complain that the snprintf() could overflow. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11arm: zynq: Add support for cpufreqSoren Brinkmann3-0/+11
The generic cpufreq-cpu0 driver can scale the CPU frequency on Zynq SOCs. Add the required platform device to the BSP and appropriate OPPs to the dts. Cc: Rob Herring <[email protected]> Cc: Pawel Moll <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Russell King <[email protected]> Cc: [email protected] Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Michal Simek <[email protected]>
2014-03-11arm: zynq: Don't use arm_global_timer with cpufreqSoren Brinkmann1-1/+1
The timer frequency of the arm_global_timer depends on the CPU frequency. With cpufreq altering that frequency the arm_global_timer does not maintain a stable time base. Therefore don't enable that timer in case cpufreq is enabled. Cc: Russell King <[email protected]> Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Michal Simek <[email protected]>
2014-03-11clocksource/cadence_ttc: Overhaul clocksource frequency adjustmentSoren Brinkmann1-20/+84
The currently used method adjusting the clocksource to a changing input frequency does not work on kernels from 3.11 on. The new approach is to keep the timer frequency as constant as possible. I.e. - due to the TTC's prescaler limitations, allow frequency changes only if the frequency scales by a power of 2 - adjust the counter's divider on the fly when a frequency change occurs This limits cpufreq to scale by certain factors only. But we may keep the time base somewhat constant, so that sleep() & co keep working as expected, while supporting cpufreq. Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Michal Simek <[email protected]>
2014-03-11clocksource/cadence_ttc: Call clockevents_update_freq() with IRQs enabledSoren Brinkmann1-15/+2
The timer core takes care of serialization and IRQs. Hence the driver is no longer required to disable interrupts when calling clockevents_update_freq(). Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Michal Simek <[email protected]>
2014-03-11clocksource: Add Kconfig entries for CMT, MTU2, TMU and STIMagnus Damm1-0/+44
Add Kconfig entries for CMT, MTU2, TMU and STI to drivers/clocksource/Kconfig. This will allow us to get rid of duplicated entires in architecture code such as arch/sh and arch/arm/mach-shmobile. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11sh: Remove Kconfig entries for TMU, CMT and MTU2Magnus Damm1-53/+23
Now when drivers/clocksource/Kconfig has been updated with entires for CMT, TMU and MTU2 it is safe to remove these from SH. Signed-off-by: Magnus Damm <[email protected]> Acked-by: John Stultz <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11ARM: shmobile: Remove CMT, TMU and STI Kconfig entriesMagnus Damm1-18/+18
Now when drivers/clocksource/Kconfig has been updated with entires for CMT, TMU, MTU2, and STI it is safe to remove these from mach-shmobile. Also select timers per SoC via SYS_SUPPORTS_xxx. Signed-off-by: Magnus Damm <[email protected]> Acked-by: John Stultz <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11clocksource: armada-370-xp: Use atomic access for shared registersEzequiel Garcia1-8/+4
Replace the driver-specific thread-safe shared register API by the recently introduced atomic_io_clear_set(). Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11clocksource: orion: Use atomic access for shared registersEzequiel Garcia1-18/+10
Replace the driver-specific thread-safe shared register API by the recently introduced atomic_io_clear_set(). Cc: Daniel Lezcano <[email protected]> Tested-by: Sebastian Hesselbarth <[email protected]> Tested-by: Willy Tarreau <[email protected]> Acked-by: Jason Cooper <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11clocksource: timer-keystone: Delete unnecessary variableMatthias Brugger1-4/+1
Commit 438e0bff5257 added the timer-keystone device driver but make use of an unnecessary variable in the init function. This patch deletes this variable. Signed-off-by: Matthias Brugger <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11clocksource: timer-keystone: introduce clocksource driver for KeystoneIvan Khoronzhuk2-0/+245
Add broadcast clock-event device for the Keystone arch. The timer can be configured as a general-purpose 64-bit timer, dual general-purpose 32-bit timers. When configured as dual 32-bit timers, each half can operate in conjunction (chain mode) or independently (unchained mode) of each other. Reviewed-by: Stephen Boyd <[email protected]> Acked-by: Santosh shilimkar <[email protected]> Signed-off-by: Ivan Khoronzhuk <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11clocksource: keystone: add bindings for keystone timerIvan Khoronzhuk1-0/+29
This patch provides bindings for the 64-bit timer in the KeyStone architecture devices. The timer can be configured as a general-purpose 64-bit timer, dual general-purpose 32-bit timers. When configured as dual 32-bit timers, each half can operate in conjunction (chain mode) or independently (unchained mode) of each other. It is global timer is a free running up-counter and can generate interrupt when the counter reaches preset counter values. Documentation: http://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf Acked-by: Rob Herring <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Ivan Khoronzhuk <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11ARM: sunxi: dt: Convert to the new clocksource compatibleMaxime Ripard5-5/+5
Switch the device tree to the new compatibles introduced in the timer driver to have a common pattern accross all Allwinner SoCs. Signed-off-by: Maxime Ripard <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11clocksource: sunxi: Add new compatiblesMaxime Ripard2-3/+3
The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility. Signed-off-by: Maxime Ripard <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11ARM: u300: move timer driver to clocksourceLinus Walleij4-5/+3
Move the U300 timer driver down to the clocksource driver subsystem and keep arch/arm clean. Cc: Daniel Lezcano <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-11clocksource: arch_timer: Set dynamic irq affinity on mmio clockeventStephen Boyd1-0/+1
Set the CLOCK_EVT_FEAT_DYNIRQ flag on the memory mapped clockevent so that we save power by waking up the CPU with the next event when this timer is used in broadcast mode. Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2014-03-10Merge branch 'fortglx/3.15/time' of ↵Thomas Gleixner2-0/+3
git://git.linaro.org/people/john.stultz/linux into timers/core - support CLOCK_BOOTTIME clock in timerfd - Add missing header file Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-04timer: Make sure TIMER_FLAG_MASK bits are free in allocated baseViresh Kumar1-3/+2
Currently we are using two lowest bit of base for internal purpose and so they both should be zero in the allocated address. The code was doing the right thing before this patch came in: commit c5f66e99b (timer: Implement TIMER_IRQSAFE) Tejun probably forgot to update this piece of code which checks if the lowest 'n' bits are zero or not and so wasn't updated according to the new flag. Lets use TIMER_FLAG_MASK in the calculations here. [ tglx: Massaged changelog ] Signed-off-by: Viresh Kumar <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/9144e10d7e854a0aa8a673332adec356d81a923c.1393576981.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-04timer: Check failure of timer_cpu_notify() before calling init_timer_stats()Viresh Kumar1-2/+2
timer_cpu_notify() should return NOTIFY_OK and nothing else. Anything else would trigger a BUG_ON(). Return value of this routine is already checked correctly but is done after issuing a call to init_timer_stats(). The right order would be to check the error case first and then call init_timer_stats(). Lets do it. Signed-off-by: Viresh Kumar <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/c439f5b6bbc2047e1662f4d523350531425bcf9d.1393576981.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner <[email protected]>
2014-03-02kernel: Include appropriate header file in time/timekeeping_debug.cRashika Kheria1-0/+2
Include appropriate header file kernel/time/timekeeping_internal.h in kernel/time/timekeeping_debug.c because it has prototype declaration of function defined in kernel/time/timekeeping_debug.c. This eliminates the following warning in kernel/time/timekeeping_debug.c: kernel/time/timekeeping_debug.c:68:6: warning: no previous prototype for ‘tk_debug_account_sleep_time’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Signed-off-by: John Stultz <[email protected]>
2014-02-28Merge branch 'timers.2014.02.25a' of ↵Thomas Gleixner1-2/+28
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into timers/core Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-25timers: Make internal_add_timer() update ->next_timer if ->active_timers == 0Oleg Nesterov1-2/+2
The internal_add_timer() function updates base->next_timer only if timer->expires < base->next_timer. This is correct, but it also makes sense to do the same if we add the first non-deferrable timer. Signed-off-by: Oleg Nesterov <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Tested-by: Mike Galbraith <[email protected]>
2014-02-25timers: Reduce future __run_timers() latency for first add to empty listPaul E. McKenney1-0/+1
The __run_timers() function currently steps through the list one jiffy at a time in order to update the timer wheel. However, if the timer wheel is empty, no adjustment is needed other than updating ->timer_jiffies. Therefore, just before we add a timer to an empty timer wheel, we should mark the timer wheel as being up to date. This marking will reduce (and perhaps eliminate) the jiffy-stepping that a future __run_timers() call will need to do in response to some future timer posting or migration. This commit therefore updates ->timer_jiffies for this case. Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Reviewed-by: Oleg Nesterov <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> Tested-by: Mike Galbraith <[email protected]>
2014-02-25timers: Reduce future __run_timers() latency for newly emptied listPaul E. McKenney1-0/+2
The __run_timers() function currently steps through the list one jiffy at a time in order to update the timer wheel. However, if the timer wheel is empty, no adjustment is needed other than updating ->timer_jiffies. Therefore, if we just emptied the timer wheel, for example, by deleting the last timer, we should mark the timer wheel as being up to date. This marking will reduce (and perhaps eliminate) the jiffy-stepping that a future __run_timers() call will need to do in response to some future timer posting or migration. This commit therefore catches ->timer_jiffies for this case. Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Reviewed-by: Oleg Nesterov <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> Tested-by: Mike Galbraith <[email protected]>
2014-02-25timers: Reduce __run_timers() latency for empty listPaul E. McKenney1-0/+18
The __run_timers() function currently steps through the list one jiffy at a time in order to update the timer wheel. However, if the timer wheel is empty, no adjustment is needed other than updating ->timer_jiffies. In this case, which is likely to be common for NO_HZ_FULL kernels, the kernel currently incurs a large latency for no good reason. This commit therefore short-circuits this case. Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Reviewed-by: Oleg Nesterov <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> Tested-by: Mike Galbraith <[email protected]>
2014-02-25timers: Track total number of timers in listPaul E. McKenney1-0/+5
Currently, the tvec_base structure's ->active_timers field tracks only the non-deferrable timers, which means that even if ->active_timers is zero, there might well be deferrable timers in the list. This commit therefore adds an ->all_timers field to track all the timers, whether deferrable or not. Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Reviewed-by: Oleg Nesterov <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> Tested-by: Mike Galbraith <[email protected]>
2014-02-14nohz: ensure users are aware boot CPU is not NO_HZ_FULLPaul Gortmaker1-1/+1
This bit of information is in the Kconfig help text: "Note the boot CPU will still be kept outside the range to handle the timekeeping duty." However neither the variable NO_HZ_FULL_ALL, or the prompt convey this important detail, so lets add it to the prompt to make it more explicitly obvious to the average user. Acked-by: Paul E. McKenney <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Frederic Weisbecker <[email protected]>
2014-02-14timer: Spare IPI when deferrable timer is queued on idle remote targetsViresh Kumar1-1/+8
When a timer is enqueued or modified on a remote target, the latter is expected to see and handle this timer on its next tick. However if the target is idle and CONFIG_NO_HZ_IDLE=y, the CPU may be sleeping tickless and the timer may be ignored. wake_up_nohz_cpu() takes care of that by setting TIF_NEED_RESCHED and sending an IPI to idle targets so that the tick is reevaluated on the idle loop through the tick_nohz_idle_*() APIs. Now this is all performed regardless of the power properties of the timer. If the timer is deferrable, idle targets don't need to be woken up. Only the next buzy tick needs to care about it, and no IPI kick is needed for that to happen. So lets spare the IPI on idle targets when the timer is deferrable. Meanwhile we keep the current behaviour on full dynticks targets. We can spare IPIs on idle full dynticks targets as well but some tricky races against idle_cpu() must be dealt all along to make sure that the timer is well handled after idle exit. We can deal with that later since NO_HZ_FULL already has more important powersaving issues. Reported-by: Thomas Gleixner <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/CAKohpomMZ0TAN2e6N76_g4ZRzxd5vZ1XfuZfxrP7GMxfTNiLVw@mail.gmail.com Signed-off-by: Frederic Weisbecker <[email protected]>
2014-02-09tick: Fixup more fallout from hrtimer broadcast modePreeti U Murthy3-2/+6
The hrtimer mode of broadcast is supported only when GENERIC_CLOCKEVENTS_BROADCAST and TICK_ONESHOT config options are enabled. Hence compile in the functions for hrtimer mode of broadcast only when these options are selected. Also fix max_delta_ticks value for the pseudo clock device. Reported-by: Fengguang Wu <[email protected]> Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Preeti U Murthy <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-07time: Fixup fallout from recent clockevent/tick changesThomas Gleixner2-2/+3
Make the stub function static inline instead of static and move the clockevents related function into the proper ifdeffed section. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Soren Brinkmann <[email protected]> Cc: Preeti U Murthy <[email protected]>
2014-02-07tick: Introduce hrtimer based broadcastPreeti U Murthy4-4/+167
On some architectures, in certain CPU deep idle states the local timers stop. An external clock device is used to wakeup these CPUs. The kernel support for the wakeup of these CPUs is provided by the tick broadcast framework by using the external clock device as the wakeup source. However not all implementations of architectures provide such an external clock device. This patch includes support in the broadcast framework to handle the wakeup of the CPUs in deep idle states on such systems by queuing a hrtimer on one of the CPUs, which is meant to handle the wakeup of CPUs in deep idle states. This patchset introduces a pseudo clock device which can be registered by the archs as tick_broadcast_device in the absence of a real external clock device. Once registered, the broadcast framework will work as is for these architectures as long as the archs take care of the BROADCAST_ENTER notification failing for one of the CPUs. This CPU is made the stand by CPU to handle wakeup of the CPUs in deep idle and it *must not enter deep idle states*. The CPU with the earliest wakeup is chosen to be this CPU. Hence this way the stand by CPU dynamically moves around and so does the hrtimer which is queued to trigger at the next earliest wakeup time. This is consistent with the case where an external clock device is present. The smp affinity of this clock device is set to the CPU with the earliest wakeup. This patchset handles the hotplug of the stand by CPU as well by moving the hrtimer on to the CPU handling the CPU_DEAD notification. Originally-from: Thomas Gleixner <[email protected]> Signed-off-by: Preeti U Murthy <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-07cpuidle: Handle clockevents_notify(BROADCAST_ENTER) failurePreeti U Murthy1-6/+8
Some archs set the CPUIDLE_FLAG_TIMER_STOP flag for idle states in which the local timers stop. The cpuidle_idle_call() currently handles such idle states by calling into the broadcast framework so as to wakeup CPUs at their next wakeup event. With the hrtimer mode of broadcast, the BROADCAST_ENTER call into the broadcast frameowork can fail for archs that do not have an external clock device to handle wakeups and the CPU in question has thus to be made the stand by CPU. This patch handles such cases by failing the call into cpuidle so that the arch can take some default action. The arch will certainly not enter a similar idle state because a failed cpuidle call will also implicitly indicate that the broadcast framework has not registered this CPU to be woken up. Hence we are safe if we fail the cpuidle call. In the process move the functions that trace idle statistics just before and after the entry and exit into idle states respectively. In other scenarios where the call to cpuidle fails, we end up not tracing idle entry and exit since a decision on an idle state could not be taken. Similarly when the call to broadcast framework fails, we skip tracing idle statistics because we are in no further position to take a decision on an alternative idle state to enter into. Signed-off-by: Preeti U Murthy <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Rafael J. Wysocki <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-07time: Change the return type of clockevents_notify() to integerPreeti U Murthy4-11/+15
The broadcast framework can potentially be made use of by archs which do not have an external clock device as well. Then, it is required that one of the CPUs need to handle the broadcasting of wakeup IPIs to the CPUs in deep idle. As a result its local timers should remain functional all the time. For such a CPU, the BROADCAST_ENTER notification has to fail indicating that its clock device cannot be shutdown. To make way for this support, change the return type of tick_broadcast_oneshot_control() and hence clockevents_notify() to indicate such scenarios. Signed-off-by: Preeti U Murthy <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-07clockevents: Adjust timer interval when frequency changesSoren Brinkmann1-3/+6
clockevent devices in periodic mode are not updated when the frequency of the device changes. Issue a dev->set_mode() callback which forces the device to reevaluate the timer settings. Signed-off-by: Soren Brinkmann <[email protected]> Cc: [email protected] Cc: Daniel Lezcano <[email protected]> Cc: Michal Simek <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-07clockevents: Serialize calls to clockevents_update_freq() in the coreThomas Gleixner3-13/+45
We can identify the broadcast device in the core and serialize all callers including interrupts on a different CPU against the update. Also, disabling interrupts is moved into the core allowing callers to leave interrutps enabled when calling clockevents_update_freq(). Signed-off-by: Soren Brinkmann <[email protected]> Cc: [email protected] Cc: Soeren Brinkmann <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: Michal Simek <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-07timekeeping: Move clock sync work to power efficient workqueueShaibal Dutta1-2/+3
For better use of CPU idle time, allow the scheduler to select the CPU on which the CMOS clock sync work would be scheduled. This improves idle residency time and conserver power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Signed-off-by: Shaibal Dutta <[email protected]> [[email protected]: Added commit message. Aligned code.] Signed-off-by: Zoran Markovic <[email protected]> Cc: John Stultz <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-02-02Linus 3.14-rc1Linus Torvalds1-3/+3
2014-02-02Merge branch 'parisc-3.14' of ↵Linus Torvalds15-73/+278
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "The three major changes in this patchset is a implementation for flexible userspace memory maps, cache-flushing fixes (again), and a long-discussed ABI change to make EWOULDBLOCK the same value as EAGAIN. parisc has been the only platform where we had EWOULDBLOCK != EAGAIN to keep HP-UX compatibility. Since we will probably never implement full HP-UX support, we prefer to drop this compatibility to make it easier for us with Linux userspace programs which mostly never checked for both values. We don't expect major fall-outs because of this change, and if we face some, we will simply rebuild the necessary applications in the debian archives" * 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: add flexible mmap memory layout support parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc parisc: convert uapi/asm/stat.h to use native types only parisc: wire up sched_setattr and sched_getattr parisc: fix cache-flushing parisc/sti_console: prefer Linux fonts over built-in ROM fonts
2014-02-02hpfs: optimize quad buffer loadingMikulas Patocka1-46/+50
HPFS needs to load 4 consecutive 512-byte sectors when accessing the directory nodes or bitmaps. We can't switch to 2048-byte block size because files are allocated in the units of 512-byte sectors. Previously, the driver would allocate a 2048-byte area using kmalloc, copy the data from four buffers to this area and eventually copy them back if they were modified. In the current implementation of the buffer cache, buffers are allocated in the pagecache. That means that 4 consecutive 512-byte buffers are stored in consecutive areas in the kernel address space. So, we don't need to allocate extra memory and copy the content of the buffers there. This patch optimizes the code to avoid copying the buffers. It checks if the four buffers are stored in contiguous memory - if they are not, it falls back to allocating a 2048-byte area and copying data there. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-02-02hpfs: remember free spaceMikulas Patocka3-10/+87
Previously, hpfs scanned all bitmaps each time the user asked for free space using statfs. This patch changes it so that hpfs scans the bitmaps only once, remembes the free space and on next invocation of statfs it returns the value instantly. New versions of wine are hammering on the statfs syscall very heavily, making some games unplayable when they're stored on hpfs, with load times in minutes. This should be backported to the stable kernels because it fixes user-visible problem (excessive level load times in wine). Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2014-02-02parisc: add flexible mmap memory layout supportHelge Deller6-43/+233
Add support for the flexible mmap memory layout (as described in http://lwn.net/Articles/91829). This is especially very interesting on parisc since we currently only support 32bit userspace (even with a 64bit Linux kernel). Signed-off-by: Helge Deller <[email protected]>
2014-02-02parisc: Make EWOULDBLOCK be equal to EAGAIN on pariscGuy Martin1-1/+1
On Linux, only parisc uses a different value for EWOULDBLOCK which causes a lot of troubles for applications not checking for both values. Since the hpux compat is long dead, make EWOULDBLOCK behave the same as all other architectures. Signed-off-by: Guy Martin <[email protected]> Signed-off-by: Helge Deller <[email protected]>
2014-02-02parisc: convert uapi/asm/stat.h to use native types onlyHelge Deller1-21/+19
The stat.h header file is exported to userspace. Some userspace applications failed to compile due to missing/unknown types, so we better convert it to use native types only (like it's done on other architectures too). Signed-off-by: Helge Deller <[email protected]>