]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Merge branches 'idle-fix' and 'misc' into release
authorLen Brown <len.brown@intel.com>
Sat, 7 Apr 2012 01:48:59 +0000 (21:48 -0400)
committerLen Brown <len.brown@intel.com>
Sat, 7 Apr 2012 01:48:59 +0000 (21:48 -0400)
1  2 
drivers/acpi/processor_idle.c
drivers/cpuidle/cpuidle.c

index 784f9a7beb1731cda846e3256b6bc85f378982a8,b3447f63e46b4f77a7e5edc7dc3bd5d0a7b3d33c..f3decb30223fd1b376775310ae25dec63424f920
@@@ -786,7 -786,7 +786,7 @@@ static int acpi_idle_play_dead(struct c
        while (1) {
  
                if (cx->entry_method == ACPI_CSTATE_HALT)
 -                      halt();
 +                      safe_halt();
                else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) {
                        inb(cx->address);
                        /* See comment in acpi_idle_do_entry() */
@@@ -1190,8 -1190,7 +1190,7 @@@ int acpi_processor_cst_has_changed(stru
         * to make the code that updates C-States be called once.
         */
  
-       if (smp_processor_id() == 0 &&
-                       cpuidle_get_driver() == &acpi_idle_driver) {
+       if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) {
  
                cpuidle_pause_and_lock();
                /* Protect against cpu-hotplug */
index a71376a45d8e685a44146fe55f757fa7f3f11863,87411cebc57725223a994eb6467ad0aa209d3515..2f0083a51a9aeb5979e145eca98b686f4dd3c196
@@@ -74,7 -74,7 +74,7 @@@ static cpuidle_enter_t cpuidle_enter_op
  /**
   * cpuidle_play_dead - cpu off-lining
   *
 - * Only returns in case of an error
 + * Returns in case of an error or no driver
   */
  int cpuidle_play_dead(void)
  {
@@@ -83,9 -83,6 +83,9 @@@
        int i, dead_state = -1;
        int power_usage = -1;
  
 +      if (!drv)
 +              return -ENODEV;
 +
        /* Find lowest-power state that supports long-term idle */
        for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) {
                struct cpuidle_state *s = &drv->states[i];
@@@ -140,13 -137,13 +140,13 @@@ int cpuidle_idle_call(void
                return 0;
        }
  
-       trace_power_start(POWER_CSTATE, next_state, dev->cpu);
-       trace_cpu_idle(next_state, dev->cpu);
+       trace_power_start_rcuidle(POWER_CSTATE, next_state, dev->cpu);
+       trace_cpu_idle_rcuidle(next_state, dev->cpu);
  
        entered_state = cpuidle_enter_ops(dev, drv, next_state);
  
-       trace_power_end(dev->cpu);
-       trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu);
+       trace_power_end_rcuidle(dev->cpu);
+       trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
  
        if (entered_state >= 0) {
                /* Update cpuidle counters */