Skip to content

Commit 8c0956a

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
cpuidle, OMAP3: Push RCU-idle into omap_sram_idle()
OMAP3 uses full SoC suspend modes as idle states, as such it needs the whole power-domain and clock-domain code from the idle path. All that code is not suitable to run with RCU disabled, as such push RCU-idle deeper still. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Tested-by: Tony Lindgren <[email protected]> Tested-by: Ulf Hansson <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 40dbea9 commit 8c0956a

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

arch/arm/mach-omap2/cpuidle34xx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev,
133133
}
134134

135135
/* Execute ARM wfi */
136-
ct_cpuidle_enter();
137-
omap_sram_idle();
138-
ct_cpuidle_exit();
136+
omap_sram_idle(true);
139137

140138
/*
141139
* Call idle CPU PM enter notifier chain to restore

arch/arm/mach-omap2/pm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static inline int omap4_idle_init(void)
2929

3030
extern void *omap3_secure_ram_storage;
3131
extern void omap3_pm_off_mode_enable(int);
32-
extern void omap_sram_idle(void);
32+
extern void omap_sram_idle(bool rcuidle);
3333
extern int omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused);
3434

3535
#if defined(CONFIG_PM_OPP)

arch/arm/mach-omap2/pm34xx.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/delay.h>
2727
#include <linux/slab.h>
2828
#include <linux/of.h>
29+
#include <linux/cpuidle.h>
2930

3031
#include <trace/events/power.h>
3132

@@ -174,7 +175,7 @@ static int omap34xx_do_sram_idle(unsigned long save_state)
174175
return 0;
175176
}
176177

177-
void omap_sram_idle(void)
178+
void omap_sram_idle(bool rcuidle)
178179
{
179180
/* Variable to tell what needs to be saved and restored
180181
* in omap_sram_idle*/
@@ -254,11 +255,18 @@ void omap_sram_idle(void)
254255
*/
255256
if (save_state)
256257
omap34xx_save_context(omap3_arm_context);
258+
259+
if (rcuidle)
260+
ct_cpuidle_enter();
261+
257262
if (save_state == 1 || save_state == 3)
258263
cpu_suspend(save_state, omap34xx_do_sram_idle);
259264
else
260265
omap34xx_do_sram_idle(save_state);
261266

267+
if (rcuidle)
268+
ct_cpuidle_exit();
269+
262270
/* Restore normal SDRC POWER settings */
263271
if (cpu_is_omap3430() && omap_rev() >= OMAP3430_REV_ES3_0 &&
264272
(omap_type() == OMAP2_DEVICE_TYPE_EMU ||
@@ -316,7 +324,7 @@ static int omap3_pm_suspend(void)
316324

317325
omap3_intc_suspend();
318326

319-
omap_sram_idle();
327+
omap_sram_idle(false);
320328

321329
restore:
322330
/* Restore next_pwrsts */

0 commit comments

Comments
 (0)