commit 91d1aa43 (context_tracking: New context tracking susbsystem)
generalized parts of the RCU userspace extended quiescent state into
the context tracking subsystem. Context tracking is then used
to implement adaptive tickless (a.k.a extended nohz)
To support the new context tracking subsystem on ARM, the user/kernel
boundary transtions need to be instrumented.
For exceptions and IRQs in usermode, the existing usr_entry macro is
used to instrument the user->kernel transition. For the return to
usermode path, the ret_to_user* path is instrumented. Using the
usr_entry macro, this covers interrupts in userspace, data abort and
prefetch abort exceptions in userspace as well as undefined exceptions
in userspace (which is where FP emulation and VFP are handled.)
For syscalls, the slow return path is covered by instrumenting the
ret_to_user path. In addition, the syscall entry point is
instrumented which covers the user->kernel transition for both fast
and slow syscalls, and an additional instrumentation point is added
for the fast syscall return path (ret_fast_syscall).
Cc: Mats Liljegren <mats.liljegren(a)enea.com>
Cc: Frederic Weisbecker <fweisbec(a)gmail.com>
Signed-off-by: Kevin Hilman <khilman(a)linaro.org>
---
Updates from v1:
- instrument entry/exit points directly in assembly, instead of C code
- combined exceptions and syscalls into a single patch
- covers VFP and FP emulation now (v1 limitation pointed out by Russell)
Depends on the previously posted prerequistes series:
[PATCH 0/3] ARM: context tracking support prerequisites
http://marc.info/?l=linux-kernel&m=136382248131438&w=2
Both of which are combined on top of Frederic's 3.9-rc1-nohz1 branch
and available here:
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux.git arm-nohz-v2/context-tracking
arch/arm/Kconfig | 1 +
arch/arm/include/asm/thread_info.h | 1 +
arch/arm/kernel/entry-armv.S | 1 +
arch/arm/kernel/entry-common.S | 3 +++
arch/arm/kernel/entry-header.S | 20 ++++++++++++++++++++
5 files changed, 26 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ba8bf89..0b13689 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -59,6 +59,7 @@ config ARM
select OLD_SIGSUSPEND3
select OLD_SIGACTION
select HAVE_VIRT_CPU_ACCOUNTING
+ select HAVE_CONTEXT_TRACKING
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
index cddda1f..1995d1a 100644
--- a/arch/arm/include/asm/thread_info.h
+++ b/arch/arm/include/asm/thread_info.h
@@ -152,6 +152,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
#define TIF_SYSCALL_AUDIT 9
#define TIF_SYSCALL_TRACEPOINT 10
#define TIF_SECCOMP 11 /* seccomp syscall filtering active */
+#define TIF_NOHZ 12 /* in adaptive nohz mode */
#define TIF_USING_IWMMXT 17
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
#define TIF_RESTORE_SIGMASK 20
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 0f82098..1034d40 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -396,6 +396,7 @@ ENDPROC(__pabt_svc)
#ifdef CONFIG_IRQSOFF_TRACER
bl trace_hardirqs_off
#endif
+ ct_user_exit
.endm
.macro kuser_cmpxchg_check
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 3248cde..5c2b27a 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -38,6 +38,7 @@ ret_fast_syscall:
#if defined(CONFIG_IRQSOFF_TRACER)
asm_trace_hardirqs_on
#endif
+ ct_user_enter
/* perform architecture specific actions before user return */
arch_ret_to_user r1, lr
@@ -74,6 +75,7 @@ no_work_pending:
#if defined(CONFIG_IRQSOFF_TRACER)
asm_trace_hardirqs_on
#endif
+ ct_user_enter
/* perform architecture specific actions before user return */
arch_ret_to_user r1, lr
@@ -394,6 +396,7 @@ ENTRY(vector_swi)
mcr p15, 0, ip, c1, c0 @ update control register
#endif
enable_irq
+ ct_user_exit
get_thread_info tsk
adr tbl, sys_call_table @ load syscall table pointer
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index 9a8531e..d65b86c 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -164,6 +164,26 @@
#endif /* !CONFIG_THUMB2_KERNEL */
/*
+ * Context tracking subsystem. Used to instrument transitions
+ * between user and kernel mode.
+ */
+ .macro ct_user_exit
+#ifdef CONFIG_CONTEXT_TRACKING
+ stmdb sp!, {r0-r3, ip, lr}
+ bl user_exit
+ ldmia sp!, {r0-r3, ip, lr}
+#endif
+ .endm
+
+ .macro ct_user_enter
+#ifdef CONFIG_CONTEXT_TRACKING
+ stmdb sp!, {r0-r3, ip, lr}
+ bl user_enter
+ ldmia sp!, {r0-r3, ip, lr}
+#endif
+ .endm
+
+/*
* These are the registers used in the syscall handler, and allow us to
* have in theory up to 7 arguments to a function - r0 to r6.
*
--
1.8.2
The flag CPUIDLE_FLAG_TIMER_STOP has been introduced in the commit
89878baa73f0f1c679355006bd8632e5d78f96c2.
The flag tells the cpuidle framework the local timer will stop in the
idle state.
It is now easy to know if the cpuidle driver will use or not the broadcast
timer by looking at the different states for this flag and then setup
the broadcast timer consequently.
When we remove the timer initialization duplicated code in the different
drivers, we have most of the drivers with the same init function. This
init function is changed to be generic and moved in the ARM cpuidle driver
and used from the drivers. That cleanups code and removes a lot of annoying
duplicated code.
There is still some modification in OMAP4, tegra2, tegra3 and imx, especially
around the coupled idle states, but we are more and more closer to a common
squeleton for all the ARM drivers.
Daniel Lezcano (15):
timer: move enum definition out of ifdef section
cpuidle: initialize the broadcast timer framework
cpuidle: ux500: remove timer broadcast initialization
cpuidle: OMAP4: remove timer broadcast initialization
cpuidle: imx6: remove timer broadcast initialization
ARM: cpuidle: remove useless declaration
ARM: cpuidle: add init/exit routine
ARM: ux500: cpuidle: use init/exit common routine
ARM: at91: cpuidle: use init/exit common routine
ARM: OMAP3: cpuidle: use init/exit common routine
ARM: s3c64xx: cpuidle: use init/exit common routine
ARM: tegra1: cpuidle: use init/exit common routine
ARM: shmobile: pm: fix init sections
ARM: shmobile: cpuidle: remove useless WFI function
ARM: shmobile: cpuidle: use init/exit common routine
arch/arm/include/asm/cpuidle.h | 11 +++---
arch/arm/kernel/cpuidle.c | 57 +++++++++++++++++++++++++++++++-
arch/arm/mach-at91/cpuidle.c | 17 ++--------
arch/arm/mach-imx/cpuidle-imx6q.c | 15 ---------
arch/arm/mach-omap2/cpuidle34xx.c | 18 ++--------
arch/arm/mach-omap2/cpuidle44xx.c | 14 --------
arch/arm/mach-s3c64xx/cpuidle.c | 15 ++-------
arch/arm/mach-shmobile/cpuidle.c | 22 ++----------
arch/arm/mach-shmobile/pm-sh7372.c | 4 +--
arch/arm/mach-tegra/cpuidle-tegra114.c | 27 +--------------
arch/arm/mach-ux500/cpuidle.c | 50 +---------------------------
drivers/cpuidle/driver.c | 35 ++++++++++++++++++--
include/linux/clockchips.h | 22 ++++++------
include/linux/cpuidle.h | 2 ++
14 files changed, 120 insertions(+), 189 deletions(-)
--
1.7.9.5
This is targetted for 3.10-rc1 or linux-next just after the merge window.
All patches are pushed here for others to apply:
http://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/h…
Currently, there can't be multiple instances of single governor_type. If we have
a multi-package system, where we have multiple instances of struct policy (per
package), we can't have multiple instances of same governor. i.e. We can't have
multiple instances of ondemand governor for multiple packages.
Governors directory in sysfs is created at /sys/devices/system/cpu/cpufreq/
governor-name/. Which again reflects that there can be only one instance of a
governor_type in the system.
This is a bottleneck for multicluster system, where we want different packages
to use same governor type, but with different tunables.
This patchset is inclined towards fixing this issue. Now we will create
governors directory in cpu/cpu*/cpufreq/<gov> for platforms which have multiple
struct policy alive at any moment. For others the interface is kept same:
cpu/cpufreq/<gov>.
@Rafael: Clearly, I don't want to have following patch: "cpufreq: Add Kconfig
option to enable/disable have_multiple_policies" and added it because of comment
from Borislov against which nobody else replied :)
So, please drop it if you agree over my comments with earlier version.
V2->V3:
- Fixed value of CPUFREQ_GOV_POLICY_EXIT in the correct patch
- Drop indentation fixes from intel_pstate.c
V1->V2:
- Few patches from V1 are already picked up by Rafael for 3.9-rc1
- Last two patches are new
- Added dbs_data->exit() routines to free up memory used for struct tuners.
Viresh Kumar (4):
cpufreq: Add per policy governor-init/exit infrastructure
cpufreq: governor: Implement per policy instances of governors
cpufreq: Get rid of "struct global_attr"
cpufreq: Add Kconfig option to enable/disable have_multiple_policies
drivers/cpufreq/Kconfig | 3 +
drivers/cpufreq/acpi-cpufreq.c | 9 +-
drivers/cpufreq/cpufreq.c | 27 +++--
drivers/cpufreq/cpufreq_conservative.c | 148 +++++++++++++---------
drivers/cpufreq/cpufreq_governor.c | 159 ++++++++++++++----------
drivers/cpufreq/cpufreq_governor.h | 43 +++++--
drivers/cpufreq/cpufreq_ondemand.c | 216 +++++++++++++++++++--------------
drivers/cpufreq/intel_pstate.c | 20 +--
include/linux/cpufreq.h | 44 ++++---
9 files changed, 397 insertions(+), 272 deletions(-)
--
1.7.12.rc2.18.g61b472e
Cpufreq core checks the range of target_freq before calling driver->target() and
so we don't need to do it again.
Remove it.
Cc: Sekhar Nori <nsekhar(a)ti.com>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
arch/arm/mach-davinci/cpufreq.c | 9 ---------
drivers/cpufreq/dbx500-cpufreq.c | 6 ------
2 files changed, 15 deletions(-)
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
index 55eb870..8fb0c2a 100644
--- a/arch/arm/mach-davinci/cpufreq.c
+++ b/arch/arm/mach-davinci/cpufreq.c
@@ -79,15 +79,6 @@ static int davinci_target(struct cpufreq_policy *policy,
struct davinci_cpufreq_config *pdata = cpufreq.dev->platform_data;
struct clk *armclk = cpufreq.armclk;
- /*
- * Ensure desired rate is within allowed range. Some govenors
- * (ondemand) will just pass target_freq=0 to get the minimum.
- */
- if (target_freq < policy->cpuinfo.min_freq)
- target_freq = policy->cpuinfo.min_freq;
- if (target_freq > policy->cpuinfo.max_freq)
- target_freq = policy->cpuinfo.max_freq;
-
freqs.old = davinci_getspeed(0);
freqs.new = clk_round_rate(armclk, target_freq * 1000) / 1000;
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 7192a6d..15ed367 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -37,12 +37,6 @@ static int dbx500_cpufreq_target(struct cpufreq_policy *policy,
unsigned int idx;
int ret;
- /* scale the target frequency to one of the extremes supported */
- if (target_freq < policy->cpuinfo.min_freq)
- target_freq = policy->cpuinfo.min_freq;
- if (target_freq > policy->cpuinfo.max_freq)
- target_freq = policy->cpuinfo.max_freq;
-
/* Lookup the next frequency */
if (cpufreq_frequency_table_target(policy, freq_table, target_freq,
relation, &idx))
--
1.7.12.rc2.18.g61b472e
While migrating to common clock framework (CCF), found that the FIMD clocks
were pulled down by the CCF.
If CCF finds any clock(s) which has NOT been claimed by any of the
drivers, then such clock(s) are PULLed low by CCF.
By calling clk_prepare_enable() for FIMD clocks fixes the issue.
this patch also replaces clk_disable() with clk_disable_unprepare()
during exit.
Signed-off-by: Vikas Sajjan <vikas.sajjan(a)linaro.org>
---
Changes since v1:
- added error checking for clk_prepare_enable() and also replaced
clk_disable() with clk_disable_unprepare() during exit.
---
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9537761..014d750 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -934,6 +934,19 @@ static int fimd_probe(struct platform_device *pdev)
return ret;
}
+ ret = clk_prepare_enable(ctx->lcd_clk);
+ if (ret) {
+ dev_err(dev, "failed to enable 'sclk_fimd' clock\n");
+ return ret;
+ }
+
+ ret = clk_prepare_enable(ctx->bus_clk);
+ if (ret) {
+ clk_disable_unprepare(ctx->lcd_clk);
+ dev_err(dev, "failed to enable 'fimd' clock\n");
+ return ret;
+ }
+
ctx->vidcon0 = pdata->vidcon0;
ctx->vidcon1 = pdata->vidcon1;
ctx->default_win = pdata->default_win;
@@ -981,8 +994,8 @@ static int fimd_remove(struct platform_device *pdev)
if (ctx->suspended)
goto out;
- clk_disable(ctx->lcd_clk);
- clk_disable(ctx->bus_clk);
+ clk_disable_unprepare(ctx->lcd_clk);
+ clk_disable_unprepare(ctx->bus_clk);
pm_runtime_set_suspended(dev);
pm_runtime_put_sync(dev);
--
1.7.9.5
The patch series adds a much-missed support for debugfs to dma-buf framework.
Based on the feedback received on v1 of this patch series, support is also
added to allow exporters to provide name-strings that will prove useful
while debugging.
Some more magic can be added for more advanced debugging, but we'll leave that
for the time being.
Best regards,
~Sumit.
Sumit Semwal (2):
dma-buf: replace dma_buf_export() with dma_buf_export_named()
dma-buf: Add debugfs support
Documentation/dma-buf-sharing.txt | 13 ++-
drivers/base/dma-buf.c | 173 ++++++++++++++++++++++++++++++++++++-
include/linux/dma-buf.h | 16 +++-
3 files changed, 193 insertions(+), 9 deletions(-)
--
1.7.10.4
Guenter,
Please check this v6 patches,
thanks for all your reviews/comments for this patch set.
Anton Vorontsov, for this v5 and v6 patches:
I have add your Acked-by: into patch [1/5] (which was [1/3]); and split the
old [2/3] into new [2/5], [3/5] and [4/5] patches, so please have a look them
again, thank you.
v5 -> v6 changes:
- add depend on AB8500_BM in Kconfig
- fix wrong usage of clamp_val()
- export symbols for module compiling
v4 -> v5 changes:
- split the old [2/3]-ab8500-re-arrange-ab8500-power-and-temperature-data into
new three [2/5], [3/5] and [4/5] patches.
- hwmon driver minor coding style clean ups:
- {} usage in if-else statement in ab8500_read_sensor function
- index error fix in gpadc_monitor function
- fix issue of clamp_val() usage
- remove unnecessary else in function abx500_attrs_visible
- remove redundant print message about irq set up
- return the calling function return value directly in probe function
v3 -> v4 changes:
for patch [3/3]
- define delays in HZ
- update ab8500_read_sensor function, returning temp by parameter
- remove ab8500_is_visible function
- use clamp_val in set_min and set_max callback
- remove unnecessary locks in remove and suspend functions
- let abx500 and ab8500 use its own data structure
for patch [2/3]
- move the data tables from driver/power/ab8500_bmdata.c to
include/linux/power/ab8500.h
- rename driver/power/ab8500_bmdata.c to driver/power/ab8500_bm.c
- rename these variable names to eliminate CamelCase warnings
- add const attribute to these data
v2 -> v3 changes:
- Add interface for converting voltage to temperature
- Remove temp5 sensor since we cannot offer temperature read interface of it
- Update hyst to use absolute temperature instead of a difference
- Add the 3/3 patch
v1 -> v2 changes:
- Add Documentation/hwmon/abx500 and Documentation/hwmon/abx500
- Make devices which cannot report milli-Celsius invisible
- Add temp5_crit interface
- Re-work the old find_active_thresholds() to threshold_updated()
- Reset updated_min_alarm and updated_max_alarm at the end of each loop
- Update the hyst mechamisn to make it works as real hyst
- Remove non-stand attributes
- Re-order the operations sequence inside probe and remove functions
- Update all the lock usages to eliminate race conditions
- Make attibutes index starts from 0
also changes:
- Since the old [1/2] "ARM: ux500: rename ab8500 to abx500 for hwmon driver"
has been merged by Samuel, so won't send it again.
- Add another new patch "ab8500_btemp: export two symblols" as [2/2] of this
patch set.
Hongbo Zhang (5):
ab8500_btemp: make ab8500_btemp_get* interfaces public
ab8500: power: eliminate CamelCase warning of some variables
ab8500: power: add const attributes to some data arrays
ab8500: power: export abx500_res_to_temp tables for hwmon
hwmon: add ST-Ericsson ABX500 hwmon driver
Documentation/hwmon/ab8500 | 22 ++
Documentation/hwmon/abx500 | 28 ++
drivers/hwmon/Kconfig | 13 +
drivers/hwmon/Makefile | 1 +
drivers/hwmon/ab8500.c | 206 +++++++++++++++
drivers/hwmon/abx500.c | 491 +++++++++++++++++++++++++++++++++++
drivers/hwmon/abx500.h | 69 +++++
drivers/power/ab8500_bmdata.c | 42 +--
drivers/power/ab8500_btemp.c | 5 +-
drivers/power/ab8500_fg.c | 4 +-
include/linux/mfd/abx500.h | 6 +-
include/linux/mfd/abx500/ab8500-bm.h | 5 +
include/linux/power/ab8500.h | 16 ++
13 files changed, 885 insertions(+), 23 deletions(-)
create mode 100644 Documentation/hwmon/ab8500
create mode 100644 Documentation/hwmon/abx500
create mode 100644 drivers/hwmon/ab8500.c
create mode 100644 drivers/hwmon/abx500.c
create mode 100644 drivers/hwmon/abx500.h
create mode 100644 include/linux/power/ab8500.h
--
1.8.0
At the Linaro Connect Asia 2013, a status of the different cpuidle
drivers available upstream have been presented [1].
It was statued there is a lot of common code, especially in the
init routine, and code duplication (eg. ux500 vs imx6).
The following patchset is the first stone to a single ARM driver
consolidating all the common routine used in the different drivers.
The patchset has been tested on ux500 and at91, compiled on all the other
platforms.
[1] https://lca-13.zerista.com/event/member/72362
Daniel Lezcano (11):
cpuidle : handle clockevent notify from the cpuidle framework
cpuidle / arm : a single cpuidle driver
cpuidle / ux500 : use common ARM cpuidle driver
cpuidle / omap3 : use common ARM cpuidle driver
cpuidle / davinci : use common ARM driver
cpuidle / at91 : use common ARM cpuidle driver
cpuidle / shmobile : use common ARM cpuidle driver
cpuidle / imx : use common ARM cpuidle driver
cpuidle / s3c64xx : use common ARM cpuidle driver
cpuidle / calxeda : use common ARM cpuidle driver
cpuidle / kirkwood : use common ARM cpuidle driver
MAINTAINERS | 6 ++
arch/arm/include/asm/cpuidle.h | 3 +
arch/arm/mach-at91/cpuidle.c | 15 +----
arch/arm/mach-davinci/cpuidle.c | 20 +------
arch/arm/mach-imx/Makefile | 1 -
arch/arm/mach-imx/cpuidle-imx6q.c | 18 +-----
arch/arm/mach-imx/cpuidle.c | 80 --------------------------
arch/arm/mach-imx/cpuidle.h | 6 +-
arch/arm/mach-imx/pm-imx5.c | 3 +-
arch/arm/mach-omap2/cpuidle34xx.c | 18 +-----
arch/arm/mach-s3c64xx/cpuidle.c | 15 +----
arch/arm/mach-shmobile/cpuidle.c | 10 +---
arch/arm/mach-ux500/cpuidle.c | 56 +-----------------
drivers/cpuidle/Makefile | 1 +
drivers/cpuidle/arm-idle.c | 112 ++++++++++++++++++++++++++++++++++++
drivers/cpuidle/cpuidle-calxeda.c | 52 +----------------
drivers/cpuidle/cpuidle-kirkwood.c | 17 +-----
drivers/cpuidle/cpuidle.c | 9 +++
include/linux/cpuidle.h | 1 +
19 files changed, 149 insertions(+), 294 deletions(-)
delete mode 100644 arch/arm/mach-imx/cpuidle.c
create mode 100644 drivers/cpuidle/arm-idle.c
--
1.7.9.5
When a cpu enters a deep idle state, the local timers are stopped and
the time framework falls back to the timer device used as a broadcast
timer.
The different cpuidle drivers are calling clockevents_notify ENTER/EXIT
when the idle state stops the local timer.
Add a new flag CPUIDLE_FLAG_TIMER_STOP which can be set by the cpuidle
drivers. If the flag is set, the cpuidle core code takes care of the
notification on behalf of the driver to avoid pointless code duplication.
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
Reviewed-by: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Len Brown <lenb(a)kernel.org>
Cc: Linus Walleij <linus.walleij(a)linaro.org>
Cc: Santosh Shilimkar <santosh.shilimkar(a)ti.com>
Cc: Rajendra Nayak <rnayak(a)ti.com>
Cc: Sascha Hauer <kernel(a)pengutronix.de>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
---
drivers/cpuidle/cpuidle.c | 9 +++++++++
include/linux/cpuidle.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index eba6929..c500370 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -8,6 +8,7 @@
* This code is licenced under the GPL.
*/
+#include <linux/clockchips.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/sched.h>
@@ -146,12 +147,20 @@ int cpuidle_idle_call(void)
trace_cpu_idle_rcuidle(next_state, dev->cpu);
+ if (drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP)
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
+ &dev->cpu);
+
if (cpuidle_state_is_coupled(dev, drv, next_state))
entered_state = cpuidle_enter_state_coupled(dev, drv,
next_state);
else
entered_state = cpuidle_enter_state(dev, drv, next_state);
+ if (drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP)
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
+ &dev->cpu);
+
trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
/* give the governor an opportunity to reflect on the outcome */
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 480c14d..a837b33 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -57,6 +57,7 @@ struct cpuidle_state {
/* Idle State Flags */
#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */
+#define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */
#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
--
1.7.9.5