Merge commit 'upstream/master'
[pandora-kernel.git] / include / asm-ia64 / acpi.h
index 49730ff..fcfad32 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/init.h>
 #include <linux/numa.h>
 #include <asm/system.h>
+#include <asm/numa.h>
 
 #define COMPILER_DEPENDENT_INT64       long
 #define COMPILER_DEPENDENT_UINT64      unsigned long
@@ -94,6 +95,7 @@ ia64_acpi_release_global_lock (unsigned int *lock)
 #define acpi_noirq 0   /* ACPI always enabled on IA64 */
 #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
 #define acpi_strict 1  /* no ACPI spec workarounds on IA64 */
+#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
 static inline void disable_acpi(void) { }
 
 const char *acpi_get_sysname (void);
@@ -114,7 +116,11 @@ extern unsigned int is_cpu_cpei_target(unsigned int cpu);
 extern void set_cpei_target_cpu(unsigned int cpu);
 extern unsigned int get_cpei_target_cpu(void);
 extern void prefill_possible_map(void);
+#ifdef CONFIG_ACPI_HOTPLUG_CPU
 extern int additional_cpus;
+#else
+#define additional_cpus 0
+#endif
 
 #ifdef CONFIG_ACPI_NUMA
 #if MAX_NUMNODES > 256
@@ -126,6 +132,36 @@ extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
 extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
 #endif
 
+#define acpi_unlazy_tlb(x)
+
+#ifdef CONFIG_ACPI_NUMA
+extern cpumask_t early_cpu_possible_map;
+#define for_each_possible_early_cpu(cpu)  \
+       for_each_cpu_mask((cpu), early_cpu_possible_map)
+
+static inline void per_cpu_scan_finalize(int min_cpus, int reserve_cpus)
+{
+       int low_cpu, high_cpu;
+       int cpu;
+       int next_nid = 0;
+
+       low_cpu = cpus_weight(early_cpu_possible_map);
+
+       high_cpu = max(low_cpu, min_cpus);
+       high_cpu = min(high_cpu + reserve_cpus, NR_CPUS);
+
+       for (cpu = low_cpu; cpu < high_cpu; cpu++) {
+               cpu_set(cpu, early_cpu_possible_map);
+               if (node_cpuid[cpu].nid == NUMA_NO_NODE) {
+                       node_cpuid[cpu].nid = next_nid;
+                       next_nid++;
+                       if (next_nid >= num_online_nodes())
+                               next_nid = 0;
+               }
+       }
+}
+#endif /* CONFIG_ACPI_NUMA */
+
 #endif /*__KERNEL__*/
 
 #endif /*_ASM_ACPI_H*/