Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199276
b: refs/heads/master
c: 02cf4f9
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed May 28, 2010
1 parent 5c58d27 commit 0d5a785
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7d27c37533524e23bbdc9ba1d78e3241b7483ea
refs/heads/master: 02cf4f9808382af7265cafc33dc86ec5875526aa
28 changes: 16 additions & 12 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,19 +881,20 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
return(acpi_idle_enter_c1(dev, state));

local_irq_disable();

if (cx->entry_method != ACPI_CSTATE_FFH) {
current_thread_info()->status &= ~TS_POLLING;
/*
* TS_POLLING-cleared state must be visible before we test
* NEED_RESCHED:
*/
smp_mb();
}

if (unlikely(need_resched())) {
current_thread_info()->status |= TS_POLLING;
local_irq_enable();
return 0;
if (unlikely(need_resched())) {
current_thread_info()->status |= TS_POLLING;
local_irq_enable();
return 0;
}
}

/*
Expand All @@ -918,7 +919,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);

local_irq_enable();
current_thread_info()->status |= TS_POLLING;
if (cx->entry_method != ACPI_CSTATE_FFH)
current_thread_info()->status |= TS_POLLING;

cx->usage++;

Expand Down Expand Up @@ -968,19 +970,20 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
}

local_irq_disable();

if (cx->entry_method != ACPI_CSTATE_FFH) {
current_thread_info()->status &= ~TS_POLLING;
/*
* TS_POLLING-cleared state must be visible before we test
* NEED_RESCHED:
*/
smp_mb();
}

if (unlikely(need_resched())) {
current_thread_info()->status |= TS_POLLING;
local_irq_enable();
return 0;
if (unlikely(need_resched())) {
current_thread_info()->status |= TS_POLLING;
local_irq_enable();
return 0;
}
}

acpi_unlazy_tlb(smp_processor_id());
Expand Down Expand Up @@ -1032,7 +1035,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);

local_irq_enable();
current_thread_info()->status |= TS_POLLING;
if (cx->entry_method != ACPI_CSTATE_FFH)
current_thread_info()->status |= TS_POLLING;

cx->usage++;

Expand Down

0 comments on commit 0d5a785

Please sign in to comment.