diff options
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/acpi.h | 33 | ||||
-rw-r--r-- | include/asm-ia64/numa.h | 2 |
2 files changed, 35 insertions, 0 deletions
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index cd1cc39b5599..fcfad326f4c7 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/numa.h> | 36 | #include <linux/numa.h> |
37 | #include <asm/system.h> | 37 | #include <asm/system.h> |
38 | #include <asm/numa.h> | ||
38 | 39 | ||
39 | #define COMPILER_DEPENDENT_INT64 long | 40 | #define COMPILER_DEPENDENT_INT64 long |
40 | #define COMPILER_DEPENDENT_UINT64 unsigned long | 41 | #define COMPILER_DEPENDENT_UINT64 unsigned long |
@@ -115,7 +116,11 @@ extern unsigned int is_cpu_cpei_target(unsigned int cpu); | |||
115 | extern void set_cpei_target_cpu(unsigned int cpu); | 116 | extern void set_cpei_target_cpu(unsigned int cpu); |
116 | extern unsigned int get_cpei_target_cpu(void); | 117 | extern unsigned int get_cpei_target_cpu(void); |
117 | extern void prefill_possible_map(void); | 118 | extern void prefill_possible_map(void); |
119 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | ||
118 | extern int additional_cpus; | 120 | extern int additional_cpus; |
121 | #else | ||
122 | #define additional_cpus 0 | ||
123 | #endif | ||
119 | 124 | ||
120 | #ifdef CONFIG_ACPI_NUMA | 125 | #ifdef CONFIG_ACPI_NUMA |
121 | #if MAX_NUMNODES > 256 | 126 | #if MAX_NUMNODES > 256 |
@@ -129,6 +134,34 @@ extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; | |||
129 | 134 | ||
130 | #define acpi_unlazy_tlb(x) | 135 | #define acpi_unlazy_tlb(x) |
131 | 136 | ||
137 | #ifdef CONFIG_ACPI_NUMA | ||
138 | extern cpumask_t early_cpu_possible_map; | ||
139 | #define for_each_possible_early_cpu(cpu) \ | ||
140 | for_each_cpu_mask((cpu), early_cpu_possible_map) | ||
141 | |||
142 | static inline void per_cpu_scan_finalize(int min_cpus, int reserve_cpus) | ||
143 | { | ||
144 | int low_cpu, high_cpu; | ||
145 | int cpu; | ||
146 | int next_nid = 0; | ||
147 | |||
148 | low_cpu = cpus_weight(early_cpu_possible_map); | ||
149 | |||
150 | high_cpu = max(low_cpu, min_cpus); | ||
151 | high_cpu = min(high_cpu + reserve_cpus, NR_CPUS); | ||
152 | |||
153 | for (cpu = low_cpu; cpu < high_cpu; cpu++) { | ||
154 | cpu_set(cpu, early_cpu_possible_map); | ||
155 | if (node_cpuid[cpu].nid == NUMA_NO_NODE) { | ||
156 | node_cpuid[cpu].nid = next_nid; | ||
157 | next_nid++; | ||
158 | if (next_nid >= num_online_nodes()) | ||
159 | next_nid = 0; | ||
160 | } | ||
161 | } | ||
162 | } | ||
163 | #endif /* CONFIG_ACPI_NUMA */ | ||
164 | |||
132 | #endif /*__KERNEL__*/ | 165 | #endif /*__KERNEL__*/ |
133 | 166 | ||
134 | #endif /*_ASM_ACPI_H*/ | 167 | #endif /*_ASM_ACPI_H*/ |
diff --git a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h index 6a8a27cfae3e..3499ff57bf42 100644 --- a/include/asm-ia64/numa.h +++ b/include/asm-ia64/numa.h | |||
@@ -22,6 +22,8 @@ | |||
22 | 22 | ||
23 | #include <asm/mmzone.h> | 23 | #include <asm/mmzone.h> |
24 | 24 | ||
25 | #define NUMA_NO_NODE -1 | ||
26 | |||
25 | extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned; | 27 | extern u16 cpu_to_node_map[NR_CPUS] __cacheline_aligned; |
26 | extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; | 28 | extern cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; |
27 | extern pg_data_t *pgdat_list[MAX_NUMNODES]; | 29 | extern pg_data_t *pgdat_list[MAX_NUMNODES]; |