Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release
authorLen Brown <len.brown@intel.com>
Thu, 7 Feb 2008 08:11:05 +0000 (03:11 -0500)
committerLen Brown <len.brown@intel.com>
Thu, 7 Feb 2008 08:11:05 +0000 (03:11 -0500)
1  2  3 
arch/x86/Kconfig
drivers/acpi/processor_idle.c
drivers/cpuidle/cpuidle.c
include/linux/cpuidle.h

index e6728bd61cc106fdd71f0ce7a4a025db020a1348,37d1297e6787928920d4effad20ece4067bf9697,fd426500705370d607a5a5e2d6ddbc2f5992df11..3954ae96b0c7723dfb52a8f32e790f6c3e73a9da
@@@@ -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
index 199ea21461534cf835cefdafd641b5194bc8a1d1,bc99b7b9094fac9d862d7c1d0bf5b557ce5259ed,32488e6f76ab11c284f9e49fe97e47fcddd1ad16..32003fdc91e8a4b0205f3fbf2bedfbfc91260399
@@@@ -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:
index 2a98d99cbd46075707c15572dff6ace4e6c602c3,794962d9f48b9e8e952b8c10a1bf6ec421237a08,2c4b2d47973e195cbb0422a9b539400a2ad5ef5e..d868d737742f5d005786926581d2d9cde82fc94c
   #include <linux/mutex.h>
   #include <linux/sched.h>
   #include <linux/notifier.h>
 - #include <linux/latency.h>
 + #include <linux/pm_qos_params.h>
   #include <linux/cpu.h>
   #include <linux/cpuidle.h>
++ #include <linux/ktime.h>
   
   #include "cpuidle.h"
   
Simple merge