From 2440a415690f80dedd821583a664aad4fe23c516 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Wed, 22 Jun 2011 18:10:30 -0500 Subject: [PATCH] --- yaml --- r: 259111 b: refs/heads/master c: ebf714ff37561331eb39963945d80bfc2a59e00f h: refs/heads/master i: 259109: 994d21a9a0a8a0075e69a59364ad39c72368238f 259107: deff23c7bdeb02526b581b149acf90d65f4583da 259103: 6a5d924689243efdd94628502bc39bb07bd43bfc v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/idle_e500.S | 12 ++++++++++++ trunk/arch/powerpc/platforms/85xx/p3041_ds.c | 1 + trunk/arch/powerpc/platforms/85xx/p4080_ds.c | 1 + trunk/arch/powerpc/platforms/85xx/p5020_ds.c | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1b1617092eb3..0d80f8a297bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f340fe69f5e87c9f630b077cf52142ec15964a41 +refs/heads/master: ebf714ff37561331eb39963945d80bfc2a59e00f diff --git a/trunk/arch/powerpc/kernel/idle_e500.S b/trunk/arch/powerpc/kernel/idle_e500.S index 47a1a983ff88..3e2b95c6ae67 100644 --- a/trunk/arch/powerpc/kernel/idle_e500.S +++ b/trunk/arch/powerpc/kernel/idle_e500.S @@ -26,6 +26,17 @@ _GLOBAL(e500_idle) ori r4,r4,_TLF_NAPPING /* so when we take an exception */ stw r4,TI_LOCAL_FLAGS(r3) /* it will return to our caller */ +#ifdef CONFIG_E500MC + wrteei 1 +1: wait + + /* + * Guard against spurious wakeups (e.g. from a hypervisor) -- + * any real interrupt will cause us to return to LR due to + * _TLF_NAPPING. + */ + b 1b +#else /* Check if we can nap or doze, put HID0 mask in r3 */ lis r3,0 BEGIN_FTR_SECTION @@ -72,6 +83,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_L2CSR|CPU_FTR_CAN_NAP) mtmsr r7 isync 2: b 2b +#endif /* !E500MC */ /* * Return from NAP/DOZE mode, restore some CPU specific registers, diff --git a/trunk/arch/powerpc/platforms/85xx/p3041_ds.c b/trunk/arch/powerpc/platforms/85xx/p3041_ds.c index e2cfb6b6fb25..1fcd233a9167 100644 --- a/trunk/arch/powerpc/platforms/85xx/p3041_ds.c +++ b/trunk/arch/powerpc/platforms/85xx/p3041_ds.c @@ -69,6 +69,7 @@ define_machine(p3041_ds) { .restart = fsl_rstcr_restart, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, + .power_save = e500_idle, }; machine_device_initcall(p3041_ds, corenet_ds_publish_devices); diff --git a/trunk/arch/powerpc/platforms/85xx/p4080_ds.c b/trunk/arch/powerpc/platforms/85xx/p4080_ds.c index eed4b01deff7..430c8f969177 100644 --- a/trunk/arch/powerpc/platforms/85xx/p4080_ds.c +++ b/trunk/arch/powerpc/platforms/85xx/p4080_ds.c @@ -68,6 +68,7 @@ define_machine(p4080_ds) { .restart = fsl_rstcr_restart, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, + .power_save = e500_idle, }; machine_device_initcall(p4080_ds, corenet_ds_publish_devices); diff --git a/trunk/arch/powerpc/platforms/85xx/p5020_ds.c b/trunk/arch/powerpc/platforms/85xx/p5020_ds.c index 94348c9b5dc6..f7220d47ddcb 100644 --- a/trunk/arch/powerpc/platforms/85xx/p5020_ds.c +++ b/trunk/arch/powerpc/platforms/85xx/p5020_ds.c @@ -74,6 +74,11 @@ define_machine(p5020_ds) { .restart = fsl_rstcr_restart, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, +#ifdef CONFIG_PPC64 + .power_save = book3e_idle, +#else + .power_save = e500_idle, +#endif }; machine_device_initcall(p5020_ds, corenet_ds_publish_devices);