diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-28 19:14:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-28 19:14:17 -0400 |
commit | e4f2e5eaac8f5f903ca4a8cc944d26e68745d6bb (patch) | |
tree | 1a8d89561fa5b231202d5287acc2683eccadee7f /drivers/acpi/processor_idle.c | |
parent | 9a90e09854a3c7cc603ab8fc9163f77bb1f66cfa (diff) | |
parent | 2671717265ae6e720a9ba5f13fbec3a718983b65 (diff) |
Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6
* 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
intel_idle: native hardware cpuidle driver for latest Intel processors
ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case
acpi_pad: uses MONITOR/MWAIT, so it doesn't need to clear TS_POLLING
sched: clarify commment for TS_POLLING
ACPI: allow a native cpuidle driver to displace ACPI
cpuidle: make cpuidle_curr_driver static
cpuidle: add cpuidle_unregister_driver() error check
cpuidle: fail to register if !CONFIG_CPU_IDLE
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 13c6cb703f1d..2e8c27d48f2b 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -872,6 +872,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
872 | return(acpi_idle_enter_c1(dev, state)); | 872 | return(acpi_idle_enter_c1(dev, state)); |
873 | 873 | ||
874 | local_irq_disable(); | 874 | local_irq_disable(); |
875 | |||
875 | if (cx->entry_method != ACPI_CSTATE_FFH) { | 876 | if (cx->entry_method != ACPI_CSTATE_FFH) { |
876 | current_thread_info()->status &= ~TS_POLLING; | 877 | current_thread_info()->status &= ~TS_POLLING; |
877 | /* | 878 | /* |
@@ -879,12 +880,12 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
879 | * NEED_RESCHED: | 880 | * NEED_RESCHED: |
880 | */ | 881 | */ |
881 | smp_mb(); | 882 | smp_mb(); |
882 | } | ||
883 | 883 | ||
884 | if (unlikely(need_resched())) { | 884 | if (unlikely(need_resched())) { |
885 | current_thread_info()->status |= TS_POLLING; | 885 | current_thread_info()->status |= TS_POLLING; |
886 | local_irq_enable(); | 886 | local_irq_enable(); |
887 | return 0; | 887 | return 0; |
888 | } | ||
888 | } | 889 | } |
889 | 890 | ||
890 | /* | 891 | /* |
@@ -911,7 +912,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
911 | sched_clock_idle_wakeup_event(idle_time_ns); | 912 | sched_clock_idle_wakeup_event(idle_time_ns); |
912 | 913 | ||
913 | local_irq_enable(); | 914 | local_irq_enable(); |
914 | current_thread_info()->status |= TS_POLLING; | 915 | if (cx->entry_method != ACPI_CSTATE_FFH) |
916 | current_thread_info()->status |= TS_POLLING; | ||
915 | 917 | ||
916 | cx->usage++; | 918 | cx->usage++; |
917 | 919 | ||
@@ -962,6 +964,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
962 | } | 964 | } |
963 | 965 | ||
964 | local_irq_disable(); | 966 | local_irq_disable(); |
967 | |||
965 | if (cx->entry_method != ACPI_CSTATE_FFH) { | 968 | if (cx->entry_method != ACPI_CSTATE_FFH) { |
966 | current_thread_info()->status &= ~TS_POLLING; | 969 | current_thread_info()->status &= ~TS_POLLING; |
967 | /* | 970 | /* |
@@ -969,12 +972,12 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
969 | * NEED_RESCHED: | 972 | * NEED_RESCHED: |
970 | */ | 973 | */ |
971 | smp_mb(); | 974 | smp_mb(); |
972 | } | ||
973 | 975 | ||
974 | if (unlikely(need_resched())) { | 976 | if (unlikely(need_resched())) { |
975 | current_thread_info()->status |= TS_POLLING; | 977 | current_thread_info()->status |= TS_POLLING; |
976 | local_irq_enable(); | 978 | local_irq_enable(); |
977 | return 0; | 979 | return 0; |
980 | } | ||
978 | } | 981 | } |
979 | 982 | ||
980 | acpi_unlazy_tlb(smp_processor_id()); | 983 | acpi_unlazy_tlb(smp_processor_id()); |
@@ -1028,7 +1031,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1028 | sched_clock_idle_wakeup_event(idle_time_ns); | 1031 | sched_clock_idle_wakeup_event(idle_time_ns); |
1029 | 1032 | ||
1030 | local_irq_enable(); | 1033 | local_irq_enable(); |
1031 | current_thread_info()->status |= TS_POLLING; | 1034 | if (cx->entry_method != ACPI_CSTATE_FFH) |
1035 | current_thread_info()->status |= TS_POLLING; | ||
1032 | 1036 | ||
1033 | cx->usage++; | 1037 | cx->usage++; |
1034 | 1038 | ||