From 1c366b24521ca529891ff1ca2b2eafb6b4632e18 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 7 Dec 2007 19:16:17 +0100 Subject: [PATCH] --- yaml --- r: 74711 b: refs/heads/master c: e17bcb43a26a7111f851b5ff6d1258ecd355de75 h: refs/heads/master i: 74709: a9d4fa8691fa7cb54cb2e2ba6df7f97db3f71119 74707: 42a583b233c658245c086e6a4598cc1e2bff240c 74703: 5897c4e820e5a0547e86db942ad7ee0af2525e9b v: v3 --- [refs] | 2 +- trunk/drivers/acpi/processor_idle.c | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index c961d1b0952b..14cc73fa50cc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 167b1de3ee4e50d65a2bd0a2667c9cd48faf54f3 +refs/heads/master: e17bcb43a26a7111f851b5ff6d1258ecd355de75 diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c index b1fbee3f7fe1..2fe34cc73c13 100644 --- a/trunk/drivers/acpi/processor_idle.c +++ b/trunk/drivers/acpi/processor_idle.c @@ -530,6 +530,11 @@ static void acpi_processor_idle(void) break; case ACPI_STATE_C3: + /* + * Must be done before busmaster disable as we might + * need to access HPET ! + */ + acpi_state_timer_broadcast(pr, cx, 1); /* * disable bus master * bm_check implies we need ARB_DIS @@ -557,7 +562,6 @@ static void acpi_processor_idle(void) /* Get start time (ticks) */ t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); /* Invoke C3 */ - acpi_state_timer_broadcast(pr, cx, 1); /* Tell the scheduler that we are going deep-idle: */ sched_clock_idle_sleep_event(); acpi_cstate_enter(cx); @@ -1401,9 +1405,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, if (acpi_idle_suspend) return(acpi_idle_enter_c1(dev, state)); - if (pr->flags.bm_check) - acpi_idle_update_bm_rld(pr, cx); - local_irq_disable(); current_thread_info()->status &= ~TS_POLLING; /* @@ -1418,13 +1419,21 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, return 0; } + /* + * Must be done before busmaster disable as we might need to + * access HPET ! + */ + acpi_state_timer_broadcast(pr, cx, 1); + + if (pr->flags.bm_check) + acpi_idle_update_bm_rld(pr, cx); + if (cx->type == ACPI_STATE_C3) ACPI_FLUSH_CPU_CACHE(); t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); /* Tell the scheduler that we are going deep-idle: */ sched_clock_idle_sleep_event(); - acpi_state_timer_broadcast(pr, cx, 1); acpi_idle_do_entry(cx); t2 = inl(acpi_gbl_FADT.xpm_timer_block.address);