]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'release' and 'bugzilla-9910' into release
authorLen Brown <len.brown@intel.com>
Sat, 9 Feb 2008 09:32:47 +0000 (04:32 -0500)
committerLen Brown <len.brown@intel.com>
Sat, 9 Feb 2008 09:32:47 +0000 (04:32 -0500)
arch/x86/Kconfig
drivers/cpuidle/cpuidle.c
include/linux/thermal.h

index 65a70b777c12e149d14c95a9775896abbe720964..a64d532dff4c707f3374c819148fbb627df7781c 100644 (file)
@@ -102,6 +102,9 @@ config ARCH_HAS_ILOG2_U32
 config ARCH_HAS_ILOG2_U64
        def_bool n
 
+config ARCH_HAS_CPU_IDLE_WAIT
+       def_bool y
+
 config GENERIC_CALIBRATE_DELAY
        def_bool y
 
index 2c4b2d47973e195cbb0422a9b539400a2ad5ef5e..60f71e6345e32ac11747d1dbd608349650172189 100644 (file)
@@ -27,6 +27,17 @@ static void (*pm_idle_old)(void);
 
 static int enabled_devices;
 
+#if defined(CONFIG_ARCH_HAS_CPU_IDLE_WAIT)
+static void cpuidle_kick_cpus(void)
+{
+       cpu_idle_wait();
+}
+#elif defined(CONFIG_SMP)
+# error "Arch needs cpu_idle_wait() equivalent here"
+#else /* !CONFIG_ARCH_HAS_CPU_IDLE_WAIT && !CONFIG_SMP */
+static void cpuidle_kick_cpus(void) {}
+#endif
+
 /**
  * cpuidle_idle_call - the main idle loop
  *
@@ -83,7 +94,7 @@ void cpuidle_uninstall_idle_handler(void)
 {
        if (enabled_devices && (pm_idle != pm_idle_old)) {
                pm_idle = pm_idle_old;
-               cpu_idle_wait();
+               cpuidle_kick_cpus();
        }
 }
 
index bba7712cadc749cc63513c583cce475dce899888..818ca1cf0b6d81d4f74faebcbdb6eef9123d90a7 100644 (file)
@@ -79,7 +79,9 @@ struct thermal_zone_device {
 };
 
 struct thermal_zone_device *thermal_zone_device_register(char *, int, void *,
-                                       struct thermal_zone_device_ops *);
+                                                        struct
+                                                        thermal_zone_device_ops
+                                                        *);
 void thermal_zone_device_unregister(struct thermal_zone_device *);
 
 int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
@@ -87,8 +89,23 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
                                       struct thermal_cooling_device *);
 
+#ifdef CONFIG_THERMAL
 struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
-                                       struct thermal_cooling_device_ops *);
+                                                              struct
+                                                              thermal_cooling_device_ops
+                                                              *);
 void thermal_cooling_device_unregister(struct thermal_cooling_device *);
+#else
+static inline struct thermal_cooling_device
+*thermal_cooling_device_register(char *c, void *v,
+                                struct thermal_cooling_device_ops *t)
+{
+       return NULL;
+}
+static inline
+    void thermal_cooling_device_unregister(struct thermal_cooling_device *t)
+{
+};
+#endif
 
-#endif                         /* __THERMAL_H__ */
+#endif /* __THERMAL_H__ */