From: Len Brown Date: Thu, 7 Feb 2008 08:11:05 +0000 (-0500) Subject: Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=acf63867ae06ef95eea7bf445ded2f05528a81b1;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release --- acf63867ae06ef95eea7bf445ded2f05528a81b1 diff --cc arch/x86/Kconfig index e6728bd61cc1,37d1297e6787,fd4265007053..3954ae96b0c7 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@@@ -105,18 -115,9 -105,21 +108,21 @@@@ config GENERIC_TIME_VSYSCAL bool default X86_64 ++ config ARCH_HAS_CPU_RELAX ++ def_bool y ++ + config HAVE_SETUP_PER_CPU_AREA + def_bool X86_64 + select HAVE_KVM + config ARCH_HIBERNATION_POSSIBLE + def_bool y + depends on !SMP || !X86_VOYAGER + config ARCH_SUSPEND_POSSIBLE + def_bool y + depends on !X86_VOYAGER config ZONE_DMA32 bool diff --cc drivers/acpi/processor_idle.c index 199ea2146153,bc99b7b9094f,32488e6f76ab..32003fdc91e8 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@@@ -201,19 -200,6 -201,23 +204,23 @@@@ static inline u32 ticks_elapsed_in_us(u return PM_TIMER_TICKS_TO_US((0xFFFFFFFF - t1) + t2); } ++ /* ++ * Callers should disable interrupts before the call and enable ++ * interrupts after return. ++ */ + static void acpi_safe_halt(void) + { + current_thread_info()->status &= ~TS_POLLING; + /* + * TS_POLLING-cleared state must be visible before we + * test NEED_RESCHED: + */ + smp_mb(); + if (!need_resched()) + safe_halt(); + current_thread_info()->status |= TS_POLLING; + } + #ifndef CONFIG_CPU_IDLE static void @@@@ -1406,11 -1376,19 -1420,14 +1423,14 @@@@ static int acpi_idle_enter_c1(struct cp if (pr->flags.bm_check) acpi_idle_update_bm_rld(pr, cx); - acpi_safe_halt(); - current_thread_info()->status &= ~TS_POLLING; - /* - * TS_POLLING-cleared state must be visible before we test - * NEED_RESCHED: - */ - smp_mb(); - if (!need_resched()) - safe_halt(); - current_thread_info()->status |= TS_POLLING; ++ t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); ++ acpi_idle_do_entry(cx); ++ t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); ++ local_irq_enable(); cx->usage++; -- return 0; ++ return ticks_elapsed_in_us(t1, t2); } /** @@@@ -1513,15 -1474,6 -1530,17 +1533,17 @@@@ static int acpi_idle_enter_bm(struct cp if (acpi_idle_suspend) return(acpi_idle_enter_c1(dev, state)); + if (acpi_idle_bm_check()) { + if (dev->safe_state) { + return dev->safe_state->enter(dev, dev->safe_state); + } else { ++ local_irq_disable(); + acpi_safe_halt(); ++ local_irq_enable(); + return 0; + } + } + local_irq_disable(); current_thread_info()->status &= ~TS_POLLING; /* @@@@ -1645,8 -1586,7 -1664,9 +1667,9 @@@@ static int acpi_processor_setup_cpuidle switch (cx->type) { case ACPI_STATE_C1: state->flags |= CPUIDLE_FLAG_SHALLOW; ++ state->flags |= CPUIDLE_FLAG_TIME_VALID; state->enter = acpi_idle_enter_c1; + dev->safe_state = state; break; case ACPI_STATE_C2: diff --cc drivers/cpuidle/cpuidle.c index 2a98d99cbd46,794962d9f48b,2c4b2d47973e..d868d737742f --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@@@ -12,9 -12,9 -12,10 +12,10 @@@@ #include #include #include - #include + #include #include #include ++ #include #include "cpuidle.h"