public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] C2 could be mapped to C3 so need a flush cache
@ 2009-09-08  2:26 Luming Yu
  2009-09-08  3:49 ` Arjan van de Ven
  2009-09-08 15:38 ` Len Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Luming Yu @ 2009-09-08  2:26 UTC (permalink / raw)
  To: LKML, Len Brown, Pallipadi, Venkatesh, Siddha, Suresh B

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

Hi there,

I came across acpi_idle_enter_simple, noticed it looks like a bug if
we don't flush cache for C2.
Because some platforms just map C2 to C3.

Please review. If make sense, please apply.

Ps. The patch is enclosed in attachment. The inlined one
is c&p of it for reading.


Thanks,
Luming

Signed-off-by: Yu Luming <luming.yu@intel.com>

 processor_idle.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 0efa59e..4fa9582 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -893,7 +893,7 @@ static int acpi_idle_enter_simple(struct
cpuidle_device *dev,
 	 */
 	lapic_timer_state_broadcast(pr, cx, 1);

-	if (cx->type == ACPI_STATE_C3)
+	if (cx->type == ACPI_STATE_C3 || cx->type == ACPI_STATE_C2)
 		ACPI_FLUSH_CPU_CACHE();

 	kt1 = ktime_get_real();

[-- Attachment #2: 8.patch --]
[-- Type: application/octet-stream, Size: 459 bytes --]

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 0efa59e..4fa9582 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -893,7 +893,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
 	 */
 	lapic_timer_state_broadcast(pr, cx, 1);
 
-	if (cx->type == ACPI_STATE_C3)
+	if (cx->type == ACPI_STATE_C3 || cx->type == ACPI_STATE_C2)
 		ACPI_FLUSH_CPU_CACHE();
 
 	kt1 = ktime_get_real();

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-08 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-08  2:26 [RFC PATCH] C2 could be mapped to C3 so need a flush cache Luming Yu
2009-09-08  3:49 ` Arjan van de Ven
2009-09-08  5:09   ` Luming Yu
2009-09-08  7:52     ` Arjan van de Ven
2009-09-08  8:20       ` Luming Yu
2009-09-08  8:32         ` Arjan van de Ven
2009-09-08 15:38 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox