blob: d0b1476490a725fa7da40a8348efef9694cefb05 [file] [log] [blame]
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -03001#include <linux/kernel.h>
2#include <linux/module.h>
3#include <linux/init.h>
4#include <linux/bootmem.h>
5#include <linux/percpu.h>
Bernhard Walle1ecd2762008-06-20 15:38:22 +02006#include <linux/kexec.h>
Yinghai Lu17b4cce2008-06-21 21:02:20 -07007#include <linux/crash_dump.h>
Jaswinder Singh Rajput8a87dd92009-01-04 17:04:26 +05308#include <linux/smp.h>
9#include <linux/topology.h>
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -030010#include <asm/sections.h>
11#include <asm/processor.h>
12#include <asm/setup.h>
Alexey Starikovskiy0fc09062008-04-04 23:40:48 +040013#include <asm/mpspec.h>
Alexey Starikovskiy76eb4132008-04-04 23:40:41 +040014#include <asm/apicdef.h>
Bernhard Walle1ecd2762008-06-20 15:38:22 +020015#include <asm/highmem.h>
Tejun Heo1a51e3a2009-01-13 20:41:35 +090016#include <asm/proto.h>
Jaswinder Singh Rajput06879032009-01-10 12:17:37 +053017#include <asm/cpumask.h>
Alexey Starikovskiy76eb4132008-04-04 23:40:41 +040018
Mike Travisc90aa892009-01-13 20:41:34 +090019#ifdef CONFIG_DEBUG_PER_CPU_MAPS
20# define DBG(x...) printk(KERN_DEBUG x)
21#else
22# define DBG(x...)
23#endif
24
Brian Gerstea927902009-01-19 00:38:58 +090025/*
26 * Could be inside CONFIG_HAVE_SETUP_PER_CPU_AREA with other stuff but
27 * voyager wants cpu_number too.
28 */
29#ifdef CONFIG_SMP
30DEFINE_PER_CPU(int, cpu_number);
31EXPORT_PER_CPU_SYMBOL(cpu_number);
32#endif
33
James Bottomleyf8955eb2008-05-10 09:01:48 -050034#ifdef CONFIG_X86_LOCAL_APIC
Alexey Starikovskiy2fe60142008-04-04 23:41:44 +040035unsigned int num_processors;
36unsigned disabled_cpus __cpuinitdata;
37/* Processor that is doing the boot up */
38unsigned int boot_cpu_physical_apicid = -1U;
39EXPORT_SYMBOL(boot_cpu_physical_apicid);
Jaswinder Singh Rajput8a87dd92009-01-04 17:04:26 +053040unsigned int max_physical_apicid;
Alexey Starikovskiy2fe60142008-04-04 23:41:44 +040041
Alexey Starikovskiy0fc09062008-04-04 23:40:48 +040042/* Bitmask of physically existing CPUs */
43physid_mask_t phys_cpu_present_map;
James Bottomleyf8955eb2008-05-10 09:01:48 -050044#endif
Alexey Starikovskiy0fc09062008-04-04 23:40:48 +040045
Mike Travisc90aa892009-01-13 20:41:34 +090046/*
47 * Map cpu index to physical APIC ID
48 */
Mike Travis23ca4bb2008-05-12 21:21:12 +020049DEFINE_EARLY_PER_CPU(u16, x86_cpu_to_apicid, BAD_APICID);
50DEFINE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid, BAD_APICID);
51EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid);
52EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
53
54#if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
Mike Travisc90aa892009-01-13 20:41:34 +090055#define X86_64_NUMA 1 /* (used later) */
Brian Gerste7a22c12009-01-19 00:38:59 +090056DEFINE_PER_CPU(int, node_number) = 0;
57EXPORT_PER_CPU_SYMBOL(node_number);
Mike Travis23ca4bb2008-05-12 21:21:12 +020058
Mike Travisc90aa892009-01-13 20:41:34 +090059/*
60 * Map cpu index to node index
61 */
Mike Travis23ca4bb2008-05-12 21:21:12 +020062DEFINE_EARLY_PER_CPU(int, x86_cpu_to_node_map, NUMA_NO_NODE);
63EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_node_map);
Mike Travis9f248bd2008-05-12 21:21:12 +020064
Mike Travisc90aa892009-01-13 20:41:34 +090065/*
66 * Which logical CPUs are on which nodes
67 */
Mike Travis9f248bd2008-05-12 21:21:12 +020068cpumask_t *node_to_cpumask_map;
69EXPORT_SYMBOL(node_to_cpumask_map);
70
Mike Travisc90aa892009-01-13 20:41:34 +090071/*
72 * Setup node_to_cpumask_map
73 */
Mike Travis9f248bd2008-05-12 21:21:12 +020074static void __init setup_node_to_cpumask_map(void);
75
76#else
77static inline void setup_node_to_cpumask_map(void) { }
Mike Travis23ca4bb2008-05-12 21:21:12 +020078#endif
79
Tejun Heo1a51e3a2009-01-13 20:41:35 +090080#ifdef CONFIG_X86_64
81
82/* correctly size the local cpu masks */
83static void setup_cpu_local_masks(void)
84{
85 alloc_bootmem_cpumask_var(&cpu_initialized_mask);
86 alloc_bootmem_cpumask_var(&cpu_callin_mask);
87 alloc_bootmem_cpumask_var(&cpu_callout_mask);
88 alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask);
89}
90
91#else /* CONFIG_X86_32 */
92
93static inline void setup_cpu_local_masks(void)
94{
95}
96
97#endif /* CONFIG_X86_32 */
98
Mike Travisc90aa892009-01-13 20:41:34 +090099#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300100
Tejun Heo9939dda2009-01-13 20:41:35 +0900101#ifdef CONFIG_X86_64
102unsigned long __per_cpu_offset[NR_CPUS] __read_mostly = {
103 [0] = (unsigned long)__per_cpu_load,
104};
105#else
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300106unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
Tejun Heo1a51e3a2009-01-13 20:41:35 +0900107#endif
Tejun Heo9939dda2009-01-13 20:41:35 +0900108EXPORT_SYMBOL(__per_cpu_offset);
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300109
110/*
111 * Great future plan:
112 * Declare PDA itself and support (irqstack,tss,pgd) as per cpu data.
113 * Always point %gs to its beginning
114 */
115void __init setup_per_cpu_areas(void)
116{
Thomas Gleixnerd6c88a52008-10-15 15:27:23 +0200117 ssize_t size, old_size;
Mike Travis3461b0a2008-05-12 21:21:13 +0200118 char *ptr;
119 int cpu;
Yinghai Lu1f8ff032008-08-19 20:49:45 -0700120 unsigned long align = 1;
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300121
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300122 /* Copy section for each CPU (we discard the original) */
Yinghai Lu1f3fcd42008-08-19 20:49:44 -0700123 old_size = PERCPU_ENOUGH_ROOM;
Yinghai Lu1f8ff032008-08-19 20:49:45 -0700124 align = max_t(unsigned long, PAGE_SIZE, align);
Thomas Gleixnerd6c88a52008-10-15 15:27:23 +0200125 size = roundup(old_size, align);
Mike Travisa1681962008-12-16 17:33:53 -0800126
Cyrill Gorcunovab143982009-01-02 21:51:32 +0300127 pr_info("NR_CPUS:%d nr_cpumask_bits:%d nr_cpu_ids:%d nr_node_ids:%d\n",
Mike Travisa1681962008-12-16 17:33:53 -0800128 NR_CPUS, nr_cpumask_bits, nr_cpu_ids, nr_node_ids);
129
Cyrill Gorcunovab143982009-01-02 21:51:32 +0300130 pr_info("PERCPU: Allocating %zd bytes of per cpu data\n", size);
Mike Travisb447a462008-03-25 15:06:51 -0700131
Mike Travis3461b0a2008-05-12 21:21:13 +0200132 for_each_possible_cpu(cpu) {
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300133#ifndef CONFIG_NEED_MULTIPLE_NODES
Yinghai Lu1f8ff032008-08-19 20:49:45 -0700134 ptr = __alloc_bootmem(size, align,
135 __pa(MAX_DMA_ADDRESS));
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300136#else
Mike Travis3461b0a2008-05-12 21:21:13 +0200137 int node = early_cpu_to_node(cpu);
Mike Travisb447a462008-03-25 15:06:51 -0700138 if (!node_online(node) || !NODE_DATA(node)) {
Yinghai Lu1f8ff032008-08-19 20:49:45 -0700139 ptr = __alloc_bootmem(size, align,
140 __pa(MAX_DMA_ADDRESS));
Cyrill Gorcunovab143982009-01-02 21:51:32 +0300141 pr_info("cpu %d has no node %d or node-local memory\n",
Mike Travis3461b0a2008-05-12 21:21:13 +0200142 cpu, node);
Cyrill Gorcunovab143982009-01-02 21:51:32 +0300143 pr_debug("per cpu data for cpu%d at %016lx\n",
144 cpu, __pa(ptr));
145 } else {
Yinghai Lu1f8ff032008-08-19 20:49:45 -0700146 ptr = __alloc_bootmem_node(NODE_DATA(node), size, align,
147 __pa(MAX_DMA_ADDRESS));
Cyrill Gorcunovab143982009-01-02 21:51:32 +0300148 pr_debug("per cpu data for cpu%d on node%d at %016lx\n",
149 cpu, node, __pa(ptr));
Yinghai Lua677f582008-07-29 00:37:10 -0700150 }
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300151#endif
Tejun Heo1a51e3a2009-01-13 20:41:35 +0900152
Tejun Heo3e5d8f92009-01-13 20:41:35 +0900153 memcpy(ptr, __per_cpu_load, __per_cpu_end - __per_cpu_start);
Tejun Heo9939dda2009-01-13 20:41:35 +0900154 per_cpu_offset(cpu) = ptr - __per_cpu_start;
Brian Gerst26f80bd2009-01-19 00:38:58 +0900155 per_cpu(this_cpu_off, cpu) = per_cpu_offset(cpu);
Brian Gerstea927902009-01-19 00:38:58 +0900156 per_cpu(cpu_number, cpu) = cpu;
Brian Gerst0d77e7f2009-01-27 12:56:47 +0900157 /*
158 * Copy data used in early init routines from the initial arrays to the
159 * per cpu data areas. These arrays then become expendable and the
160 * *_early_ptr's are zeroed indicating that the static arrays are gone.
161 */
162 per_cpu(x86_cpu_to_apicid, cpu) =
163 early_per_cpu_map(x86_cpu_to_apicid, cpu);
164 per_cpu(x86_bios_cpu_apicid, cpu) =
165 early_per_cpu_map(x86_bios_cpu_apicid, cpu);
166#ifdef X86_64_NUMA
167 per_cpu(x86_cpu_to_node_map, cpu) =
168 early_per_cpu_map(x86_cpu_to_node_map, cpu);
169#endif
Tejun Heo1a51e3a2009-01-13 20:41:35 +0900170#ifdef CONFIG_X86_64
Brian Gerst26f80bd2009-01-19 00:38:58 +0900171 per_cpu(irq_stack_ptr, cpu) =
Brian Gerst947e76c2009-01-19 12:21:28 +0900172 per_cpu(irq_stack_union.irq_stack, cpu) + IRQ_STACK_SIZE - 64;
Tejun Heo1a51e3a2009-01-13 20:41:35 +0900173 /*
Brian Gerst947e76c2009-01-19 12:21:28 +0900174 * Up to this point, CPU0 has been using .data.init
175 * area. Reload %gs offset for CPU0.
Tejun Heo1a51e3a2009-01-13 20:41:35 +0900176 */
177 if (cpu == 0)
Brian Gerst947e76c2009-01-19 12:21:28 +0900178 load_gs_base(cpu);
Tejun Heo1a51e3a2009-01-13 20:41:35 +0900179#endif
Mike Travisc90aa892009-01-13 20:41:34 +0900180
181 DBG("PERCPU: cpu %4d %p\n", cpu, ptr);
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300182 }
183
Brian Gerst0d77e7f2009-01-27 12:56:47 +0900184 /* indicate the early static arrays will soon be gone */
185 early_per_cpu_ptr(x86_cpu_to_apicid) = NULL;
186 early_per_cpu_ptr(x86_bios_cpu_apicid) = NULL;
187#ifdef X86_64_NUMA
188 early_per_cpu_ptr(x86_cpu_to_node_map) = NULL;
189#endif
Mike Travis9f0e8d02008-04-04 18:11:01 -0700190
Mike Travis9f248bd2008-05-12 21:21:12 +0200191 /* Setup node to cpumask map */
192 setup_node_to_cpumask_map();
Mike Travisc2d1cec2009-01-04 05:18:03 -0800193
194 /* Setup cpu initialized, callin, callout masks */
195 setup_cpu_local_masks();
Glauber de Oliveira Costa4fe29a82008-03-19 14:25:23 -0300196}
197
198#endif
Huang, Yingc45a7072008-06-02 14:26:25 +0800199
Mike Travis23ca4bb2008-05-12 21:21:12 +0200200#ifdef X86_64_NUMA
Mike Travis9f248bd2008-05-12 21:21:12 +0200201
202/*
203 * Allocate node_to_cpumask_map based on number of available nodes
204 * Requires node_possible_map to be valid.
205 *
206 * Note: node_to_cpumask() is not valid until after this is done.
Mike Travisc90aa892009-01-13 20:41:34 +0900207 * (Use CONFIG_DEBUG_PER_CPU_MAPS to check this.)
Mike Travis9f248bd2008-05-12 21:21:12 +0200208 */
209static void __init setup_node_to_cpumask_map(void)
210{
211 unsigned int node, num = 0;
212 cpumask_t *map;
213
214 /* setup nr_node_ids if not done yet */
215 if (nr_node_ids == MAX_NUMNODES) {
216 for_each_node_mask(node, node_possible_map)
217 num = node;
218 nr_node_ids = num + 1;
219 }
220
221 /* allocate the map */
222 map = alloc_bootmem_low(nr_node_ids * sizeof(cpumask_t));
Mike Travisc90aa892009-01-13 20:41:34 +0900223 DBG("node_to_cpumask_map at %p for %d nodes\n", map, nr_node_ids);
Mike Travis9f248bd2008-05-12 21:21:12 +0200224
Gustavo F. Padovan55410792008-10-15 10:37:04 -0300225 pr_debug("Node to cpumask map at %p for %d nodes\n",
Thomas Gleixnercfc1b9a2008-07-21 21:35:38 +0200226 map, nr_node_ids);
Mike Travis9f248bd2008-05-12 21:21:12 +0200227
228 /* node_to_cpumask() will now work */
229 node_to_cpumask_map = map;
230}
231
Mike Travis23ca4bb2008-05-12 21:21:12 +0200232void __cpuinit numa_set_node(int cpu, int node)
233{
234 int *cpu_to_node_map = early_per_cpu_ptr(x86_cpu_to_node_map);
235
Mike Travisc90aa892009-01-13 20:41:34 +0900236 /* early setting, no percpu area yet */
237 if (cpu_to_node_map) {
Mike Travis23ca4bb2008-05-12 21:21:12 +0200238 cpu_to_node_map[cpu] = node;
Mike Travisc90aa892009-01-13 20:41:34 +0900239 return;
240 }
Mike Travis23ca4bb2008-05-12 21:21:12 +0200241
Mike Travisc90aa892009-01-13 20:41:34 +0900242#ifdef CONFIG_DEBUG_PER_CPU_MAPS
243 if (cpu >= nr_cpu_ids || !per_cpu_offset(cpu)) {
244 printk(KERN_ERR "numa_set_node: invalid cpu# (%d)\n", cpu);
245 dump_stack();
246 return;
247 }
248#endif
249 per_cpu(x86_cpu_to_node_map, cpu) = node;
Mike Travis23ca4bb2008-05-12 21:21:12 +0200250
Mike Travisc90aa892009-01-13 20:41:34 +0900251 if (node != NUMA_NO_NODE)
Brian Gerste7a22c12009-01-19 00:38:59 +0900252 per_cpu(node_number, cpu) = node;
Mike Travis23ca4bb2008-05-12 21:21:12 +0200253}
254
255void __cpuinit numa_clear_node(int cpu)
256{
257 numa_set_node(cpu, NUMA_NO_NODE);
258}
259
Mike Travis9f248bd2008-05-12 21:21:12 +0200260#ifndef CONFIG_DEBUG_PER_CPU_MAPS
261
Mike Travis23ca4bb2008-05-12 21:21:12 +0200262void __cpuinit numa_add_cpu(int cpu)
263{
264 cpu_set(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]);
265}
266
267void __cpuinit numa_remove_cpu(int cpu)
268{
Mike Travisc90aa892009-01-13 20:41:34 +0900269 cpu_clear(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]);
Mike Travis23ca4bb2008-05-12 21:21:12 +0200270}
Mike Travis23ca4bb2008-05-12 21:21:12 +0200271
Mike Travis9f248bd2008-05-12 21:21:12 +0200272#else /* CONFIG_DEBUG_PER_CPU_MAPS */
273
274/*
275 * --------- debug versions of the numa functions ---------
276 */
277static void __cpuinit numa_set_cpumask(int cpu, int enable)
278{
Mike Travisc90aa892009-01-13 20:41:34 +0900279 int node = early_cpu_to_node(cpu);
Mike Travis9f248bd2008-05-12 21:21:12 +0200280 cpumask_t *mask;
281 char buf[64];
282
283 if (node_to_cpumask_map == NULL) {
284 printk(KERN_ERR "node_to_cpumask_map NULL\n");
285 dump_stack();
286 return;
287 }
288
289 mask = &node_to_cpumask_map[node];
290 if (enable)
291 cpu_set(cpu, *mask);
292 else
293 cpu_clear(cpu, *mask);
294
Rusty Russell29c01772008-12-13 21:20:25 +1030295 cpulist_scnprintf(buf, sizeof(buf), mask);
Mike Travis9f248bd2008-05-12 21:21:12 +0200296 printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n",
Jaswinder Singh Rajput8a87dd92009-01-04 17:04:26 +0530297 enable ? "numa_add_cpu" : "numa_remove_cpu", cpu, node, buf);
298}
Mike Travis9f248bd2008-05-12 21:21:12 +0200299
300void __cpuinit numa_add_cpu(int cpu)
301{
302 numa_set_cpumask(cpu, 1);
303}
304
305void __cpuinit numa_remove_cpu(int cpu)
306{
307 numa_set_cpumask(cpu, 0);
308}
Mike Travis23ca4bb2008-05-12 21:21:12 +0200309
310int cpu_to_node(int cpu)
311{
312 if (early_per_cpu_ptr(x86_cpu_to_node_map)) {
313 printk(KERN_WARNING
314 "cpu_to_node(%d): usage too early!\n", cpu);
315 dump_stack();
316 return early_per_cpu_ptr(x86_cpu_to_node_map)[cpu];
317 }
318 return per_cpu(x86_cpu_to_node_map, cpu);
319}
320EXPORT_SYMBOL(cpu_to_node);
321
Mike Travis9f248bd2008-05-12 21:21:12 +0200322/*
323 * Same function as cpu_to_node() but used if called before the
324 * per_cpu areas are setup.
325 */
Mike Travis23ca4bb2008-05-12 21:21:12 +0200326int early_cpu_to_node(int cpu)
327{
328 if (early_per_cpu_ptr(x86_cpu_to_node_map))
329 return early_per_cpu_ptr(x86_cpu_to_node_map)[cpu];
330
331 if (!per_cpu_offset(cpu)) {
332 printk(KERN_WARNING
333 "early_cpu_to_node(%d): no per_cpu area!\n", cpu);
Mike Travis9f248bd2008-05-12 21:21:12 +0200334 dump_stack();
Mike Travis23ca4bb2008-05-12 21:21:12 +0200335 return NUMA_NO_NODE;
336 }
337 return per_cpu(x86_cpu_to_node_map, cpu);
338}
Mike Travis9f248bd2008-05-12 21:21:12 +0200339
Mike Travis6a2f47c2008-06-27 10:10:13 -0700340
341/* empty cpumask */
342static const cpumask_t cpu_mask_none;
343
Mike Travis9f248bd2008-05-12 21:21:12 +0200344/*
345 * Returns a pointer to the bitmask of CPUs on Node 'node'.
346 */
Rusty Russell393d68f2008-12-26 22:23:38 +1030347const cpumask_t *cpumask_of_node(int node)
Mike Travis9f248bd2008-05-12 21:21:12 +0200348{
349 if (node_to_cpumask_map == NULL) {
350 printk(KERN_WARNING
Rusty Russell393d68f2008-12-26 22:23:38 +1030351 "cpumask_of_node(%d): no node_to_cpumask_map!\n",
Mike Travis9f248bd2008-05-12 21:21:12 +0200352 node);
353 dump_stack();
Mike Travis11369f352008-07-08 14:35:21 -0700354 return (const cpumask_t *)&cpu_online_map;
Mike Travis9f248bd2008-05-12 21:21:12 +0200355 }
Mike Travis6a2f47c2008-06-27 10:10:13 -0700356 if (node >= nr_node_ids) {
357 printk(KERN_WARNING
Rusty Russell393d68f2008-12-26 22:23:38 +1030358 "cpumask_of_node(%d): node > nr_node_ids(%d)\n",
Mike Travis6a2f47c2008-06-27 10:10:13 -0700359 node, nr_node_ids);
360 dump_stack();
Mike Travis11369f352008-07-08 14:35:21 -0700361 return &cpu_mask_none;
Mike Travis6a2f47c2008-06-27 10:10:13 -0700362 }
Mike Travis11369f352008-07-08 14:35:21 -0700363 return &node_to_cpumask_map[node];
Mike Travis9f248bd2008-05-12 21:21:12 +0200364}
Rusty Russell393d68f2008-12-26 22:23:38 +1030365EXPORT_SYMBOL(cpumask_of_node);
Mike Travis9f248bd2008-05-12 21:21:12 +0200366
367/*
368 * Returns a bitmask of CPUs on Node 'node'.
Mike Travis6a2f47c2008-06-27 10:10:13 -0700369 *
370 * Side note: this function creates the returned cpumask on the stack
371 * so with a high NR_CPUS count, excessive stack space is used. The
372 * node_to_cpumask_ptr function should be used whenever possible.
Mike Travis9f248bd2008-05-12 21:21:12 +0200373 */
374cpumask_t node_to_cpumask(int node)
375{
376 if (node_to_cpumask_map == NULL) {
377 printk(KERN_WARNING
378 "node_to_cpumask(%d): no node_to_cpumask_map!\n", node);
379 dump_stack();
380 return cpu_online_map;
381 }
Mike Travis6a2f47c2008-06-27 10:10:13 -0700382 if (node >= nr_node_ids) {
383 printk(KERN_WARNING
384 "node_to_cpumask(%d): node > nr_node_ids(%d)\n",
385 node, nr_node_ids);
386 dump_stack();
387 return cpu_mask_none;
388 }
Mike Travis9f248bd2008-05-12 21:21:12 +0200389 return node_to_cpumask_map[node];
390}
391EXPORT_SYMBOL(node_to_cpumask);
392
393/*
394 * --------- end of debug versions of the numa functions ---------
395 */
396
397#endif /* CONFIG_DEBUG_PER_CPU_MAPS */
398
399#endif /* X86_64_NUMA */
Bernhard Walle1ecd2762008-06-20 15:38:22 +0200400