blob: 39cb6da72dcbef3358d04e2b419a150f88c299ba [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/arch/m32r/kernel/smpboot.c
3 * orig : i386 2.4.10
4 *
5 * M32R SMP booting functions
6 *
7 * Copyright (c) 2001, 2002, 2003 Hitoshi Yamamoto
8 *
9 * Taken from i386 version.
10 * (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
11 * (c) 1998, 1999, 2000 Ingo Molnar <mingo@redhat.com>
12 *
13 * Much of the core SMP work is based on previous work by Thomas Radke, to
14 * whom a great many thanks are extended.
15 *
16 * Thanks to Intel for making available several different Pentium,
17 * Pentium Pro and Pentium-II/Xeon MP machines.
18 * Original development of Linux SMP code supported by Caldera.
19 *
20 * This code is released under the GNU General Public License version 2 or
21 * later.
22 *
23 * Fixes
24 * Felix Koop : NR_CPUS used properly
25 * Jose Renau : Handle single CPU case.
26 * Alan Cox : By repeated request
27 * 8) - Total BogoMIP report.
28 * Greg Wright : Fix for kernel stacks panic.
29 * Erich Boleyn : MP v1.4 and additional changes.
30 * Matthias Sattler : Changes for 2.1 kernel map.
31 * Michel Lespinasse : Changes for 2.1 kernel map.
32 * Michael Chastain : Change trampoline.S to gnu as.
33 * Alan Cox : Dumb bug: 'B' step PPro's are fine
34 * Ingo Molnar : Added APIC timers, based on code
35 * from Jose Renau
36 * Ingo Molnar : various cleanups and rewrites
37 * Tigran Aivazian : fixed "0.00 in /proc/uptime on SMP" bug.
38 * Maciej W. Rozycki : Bits for genuine 82489DX APICs
39 * Martin J. Bligh : Added support for multi-quad systems
40 */
41
Hirokazu Takata7c1c4e52006-04-10 22:53:18 -070042#include <linux/module.h>
Ingo Molnar3baf63a2008-10-16 19:00:57 +020043#include <linux/cpu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070044#include <linux/init.h>
Hirokazu Takata7c1c4e52006-04-10 22:53:18 -070045#include <linux/kernel.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070046#include <linux/mm.h>
Mathieu Desnoyersdf0f65f2008-02-07 00:16:18 -080047#include <linux/sched.h>
Hirokazu Takatacfcd8c42007-07-30 22:00:47 +090048#include <linux/err.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070049#include <linux/irq.h>
50#include <linux/bootmem.h>
51#include <linux/delay.h>
52
53#include <asm/io.h>
54#include <asm/pgalloc.h>
55#include <asm/tlbflush.h>
56
57#define DEBUG_SMP
58#ifdef DEBUG_SMP
59#define Dprintk(x...) printk(x)
60#else
61#define Dprintk(x...)
62#endif
63
64extern cpumask_t cpu_initialized;
65
66/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
67/* Data structures and variables */
68/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
69
70/* Processor that is doing the boot up */
71static unsigned int bsp_phys_id = -1;
72
73/* Bitmask of physically existing CPUs */
74physid_mask_t phys_cpu_present_map;
75
76/* Bitmask of currently online CPUs */
77cpumask_t cpu_online_map;
Hirokazu Takata7c1c4e52006-04-10 22:53:18 -070078EXPORT_SYMBOL(cpu_online_map);
Linus Torvalds1da177e2005-04-16 15:20:36 -070079
80cpumask_t cpu_bootout_map;
81cpumask_t cpu_bootin_map;
Linus Torvalds1da177e2005-04-16 15:20:36 -070082static cpumask_t cpu_callin_map;
Hirokazu Takata7c1c4e52006-04-10 22:53:18 -070083cpumask_t cpu_callout_map;
84EXPORT_SYMBOL(cpu_callout_map);
85cpumask_t cpu_possible_map = CPU_MASK_ALL;
86EXPORT_SYMBOL(cpu_possible_map);
Linus Torvalds1da177e2005-04-16 15:20:36 -070087
88/* Per CPU bogomips and other parameters */
89struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned;
90
91static int cpucount;
92static cpumask_t smp_commenced_mask;
93
94extern struct {
95 void * spi;
96 unsigned short ss;
97} stack_start;
98
99/* which physical physical ID maps to which logical CPU number */
100static volatile int physid_2_cpu[NR_CPUS];
Al Viroe231a9c2005-08-23 22:47:17 +0100101#define physid_to_cpu(physid) physid_2_cpu[physid]
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102
103/* which logical CPU number maps to which physical ID */
104volatile int cpu_2_physid[NR_CPUS];
105
106DEFINE_PER_CPU(int, prof_multiplier) = 1;
107DEFINE_PER_CPU(int, prof_old_multiplier) = 1;
108DEFINE_PER_CPU(int, prof_counter) = 1;
109
110spinlock_t ipi_lock[NR_IPIS];
111
112static unsigned int calibration_result;
113
114/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
115/* Function Prototypes */
116/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
117
118void smp_prepare_boot_cpu(void);
119void smp_prepare_cpus(unsigned int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120static void init_ipi_lock(void);
121static void do_boot_cpu(int);
122int __cpu_up(unsigned int);
123void smp_cpus_done(unsigned int);
124
125int start_secondary(void *);
126static void smp_callin(void);
127static void smp_online(void);
128
129static void show_mp_info(int);
130static void smp_store_cpu_info(int);
131static void show_cpu_info(int);
132int setup_profiling_timer(unsigned int);
133static void init_cpu_to_physid(void);
134static void map_cpu_to_physid(int, int);
135static void unmap_cpu_to_physid(int, int);
136
137/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
Simon Arlott5aa8b6c2007-10-20 01:14:39 +0200138/* Boot up APs Routines : BSP */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
140void __devinit smp_prepare_boot_cpu(void)
141{
142 bsp_phys_id = hard_smp_processor_id();
143 physid_set(bsp_phys_id, phys_cpu_present_map);
144 cpu_set(0, cpu_online_map); /* BSP's cpu_id == 0 */
145 cpu_set(0, cpu_callout_map);
146 cpu_set(0, cpu_callin_map);
147
148 /*
149 * Initialize the logical to physical CPU number mapping
150 */
151 init_cpu_to_physid();
152 map_cpu_to_physid(0, bsp_phys_id);
153 current_thread_info()->cpu = 0;
154}
155
156/*==========================================================================*
157 * Name: smp_prepare_cpus (old smp_boot_cpus)
158 *
159 * Description: This routine boot up APs.
160 *
161 * Born on Date: 2002.02.05
162 *
163 * Arguments: NONE
164 *
165 * Returns: void (cannot fail)
166 *
167 * Modification log:
168 * Date Who Description
169 * ---------- --- --------------------------------------------------------
170 * 2003-06-24 hy modify for linux-2.5.69
171 *
172 *==========================================================================*/
173void __init smp_prepare_cpus(unsigned int max_cpus)
174{
175 int phys_id;
176 unsigned long nr_cpu;
177
178 nr_cpu = inl(M32R_FPGA_NUM_OF_CPUS_PORTL);
179 if (nr_cpu > NR_CPUS) {
180 printk(KERN_INFO "NUM_OF_CPUS reg. value [%ld] > NR_CPU [%d]",
181 nr_cpu, NR_CPUS);
182 goto smp_done;
183 }
184 for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++)
185 physid_set(phys_id, phys_cpu_present_map);
Hirokazu Takata7c1c4e52006-04-10 22:53:18 -0700186#ifndef CONFIG_HOTPLUG_CPU
187 cpu_present_map = cpu_possible_map;
188#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -0700189
190 show_mp_info(nr_cpu);
191
192 init_ipi_lock();
193
194 /*
195 * Setup boot CPU information
196 */
197 smp_store_cpu_info(0); /* Final full version of the data */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700198
199 /*
200 * If SMP should be disabled, then really disable it!
201 */
202 if (!max_cpus) {
203 printk(KERN_INFO "SMP mode deactivated by commandline.\n");
204 goto smp_done;
205 }
206
207 /*
208 * Now scan the CPU present map and fire up the other CPUs.
209 */
210 Dprintk("CPU present map : %lx\n", physids_coerce(phys_cpu_present_map));
211
212 for (phys_id = 0 ; phys_id < NR_CPUS ; phys_id++) {
213 /*
214 * Don't even attempt to start the boot CPU!
215 */
216 if (phys_id == bsp_phys_id)
217 continue;
218
219 if (!physid_isset(phys_id, phys_cpu_present_map))
220 continue;
221
222 if ((max_cpus >= 0) && (max_cpus <= cpucount + 1))
223 continue;
224
225 do_boot_cpu(phys_id);
226
227 /*
228 * Make sure we unmap all failed CPUs
229 */
230 if (physid_to_cpu(phys_id) == -1) {
231 physid_clear(phys_id, phys_cpu_present_map);
232 printk("phys CPU#%d not responding - " \
233 "cannot use it.\n", phys_id);
234 }
235 }
236
237smp_done:
238 Dprintk("Boot done.\n");
239}
240
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241/*
242 * init_ipi_lock : Initialize IPI locks.
243 */
244static void __init init_ipi_lock(void)
245{
246 int ipi;
247
248 for (ipi = 0 ; ipi < NR_IPIS ; ipi++)
249 spin_lock_init(&ipi_lock[ipi]);
250}
251
252/*==========================================================================*
253 * Name: do_boot_cpu
254 *
255 * Description: This routine boot up one AP.
256 *
257 * Born on Date: 2002.02.05
258 *
259 * Arguments: phys_id - Target CPU physical ID
260 *
261 * Returns: void (cannot fail)
262 *
263 * Modification log:
264 * Date Who Description
265 * ---------- --- --------------------------------------------------------
266 * 2003-06-24 hy modify for linux-2.5.69
267 *
268 *==========================================================================*/
269static void __init do_boot_cpu(int phys_id)
270{
271 struct task_struct *idle;
272 unsigned long send_status, boot_status;
273 int timeout, cpu_id;
274
275 cpu_id = ++cpucount;
276
277 /*
278 * We can't use kernel_thread since we must avoid to
279 * reschedule the child.
280 */
281 idle = fork_idle(cpu_id);
282 if (IS_ERR(idle))
283 panic("failed fork for CPU#%d.", cpu_id);
284
285 idle->thread.lr = (unsigned long)start_secondary;
286
287 map_cpu_to_physid(cpu_id, phys_id);
288
289 /* So we see what's up */
290 printk("Booting processor %d/%d\n", phys_id, cpu_id);
291 stack_start.spi = (void *)idle->thread.sp;
Al Viro6c3559fc2006-01-12 01:05:52 -0800292 task_thread_info(idle)->cpu = cpu_id;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700293
294 /*
295 * Send Startup IPI
296 * 1.IPI received by CPU#(phys_id).
297 * 2.CPU#(phys_id) enter startup_AP (arch/m32r/kernel/head.S)
298 * 3.CPU#(phys_id) enter start_secondary()
299 */
300 send_status = 0;
301 boot_status = 0;
302
303 cpu_set(phys_id, cpu_bootout_map);
304
305 /* Send Startup IPI */
306 send_IPI_mask_phys(cpumask_of_cpu(phys_id), CPU_BOOT_IPI, 0);
307
308 Dprintk("Waiting for send to finish...\n");
309 timeout = 0;
310
311 /* Wait 100[ms] */
312 do {
313 Dprintk("+");
314 udelay(1000);
315 send_status = !cpu_isset(phys_id, cpu_bootin_map);
316 } while (send_status && (timeout++ < 100));
317
318 Dprintk("After Startup.\n");
319
320 if (!send_status) {
321 /*
322 * allow APs to start initializing.
323 */
324 Dprintk("Before Callout %d.\n", cpu_id);
325 cpu_set(cpu_id, cpu_callout_map);
326 Dprintk("After Callout %d.\n", cpu_id);
327
328 /*
329 * Wait 5s total for a response
330 */
331 for (timeout = 0; timeout < 5000; timeout++) {
332 if (cpu_isset(cpu_id, cpu_callin_map))
333 break; /* It has booted */
334 udelay(1000);
335 }
336
337 if (cpu_isset(cpu_id, cpu_callin_map)) {
338 /* number CPUs logically, starting from 1 (BSP is 0) */
339 Dprintk("OK.\n");
340 } else {
341 boot_status = 1;
342 printk("Not responding.\n");
343 }
344 } else
345 printk("IPI never delivered???\n");
346
347 if (send_status || boot_status) {
348 unmap_cpu_to_physid(cpu_id, phys_id);
349 cpu_clear(cpu_id, cpu_callout_map);
350 cpu_clear(cpu_id, cpu_callin_map);
351 cpu_clear(cpu_id, cpu_initialized);
352 cpucount--;
353 }
354}
355
Gautham R Shenoyb282b6f2007-01-10 23:15:34 -0800356int __cpuinit __cpu_up(unsigned int cpu_id)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700357{
358 int timeout;
359
360 cpu_set(cpu_id, smp_commenced_mask);
361
362 /*
363 * Wait 5s total for a response
364 */
365 for (timeout = 0; timeout < 5000; timeout++) {
366 if (cpu_isset(cpu_id, cpu_online_map))
367 break;
368 udelay(1000);
369 }
370 if (!cpu_isset(cpu_id, cpu_online_map))
371 BUG();
372
373 return 0;
374}
375
376void __init smp_cpus_done(unsigned int max_cpus)
377{
378 int cpu_id, timeout;
379 unsigned long bogosum = 0;
380
381 for (timeout = 0; timeout < 5000; timeout++) {
382 if (cpus_equal(cpu_callin_map, cpu_online_map))
383 break;
384 udelay(1000);
385 }
386 if (!cpus_equal(cpu_callin_map, cpu_online_map))
387 BUG();
388
389 for (cpu_id = 0 ; cpu_id < num_online_cpus() ; cpu_id++)
390 show_cpu_info(cpu_id);
391
392 /*
393 * Allow the user to impress friends.
394 */
395 Dprintk("Before bogomips.\n");
396 if (cpucount) {
397 for_each_cpu_mask(cpu_id, cpu_online_map)
398 bogosum += cpu_data[cpu_id].loops_per_jiffy;
399
400 printk(KERN_INFO "Total of %d processors activated " \
401 "(%lu.%02lu BogoMIPS).\n", cpucount + 1,
402 bogosum / (500000 / HZ),
403 (bogosum / (5000 / HZ)) % 100);
404 Dprintk("Before bogocount - setting activated=1.\n");
405 }
406}
407
408/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
Simon Arlott5aa8b6c2007-10-20 01:14:39 +0200409/* Activate a secondary processor Routines */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700410/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
411
412/*==========================================================================*
413 * Name: start_secondary
414 *
415 * Description: This routine activate a secondary processor.
416 *
417 * Born on Date: 2002.02.05
418 *
419 * Arguments: *unused - currently unused.
420 *
421 * Returns: void (cannot fail)
422 *
423 * Modification log:
424 * Date Who Description
425 * ---------- --- --------------------------------------------------------
426 * 2003-06-24 hy modify for linux-2.5.69
427 *
428 *==========================================================================*/
429int __init start_secondary(void *unused)
430{
431 cpu_init();
Nick Piggin5bfb5d62005-11-08 21:39:01 -0800432 preempt_disable();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433 smp_callin();
434 while (!cpu_isset(smp_processor_id(), smp_commenced_mask))
435 cpu_relax();
436
437 smp_online();
438
439 /*
440 * low-memory mappings have been cleared, flush them from
441 * the local TLBs too.
442 */
443 local_flush_tlb_all();
444
445 cpu_idle();
446 return 0;
447}
448
449/*==========================================================================*
450 * Name: smp_callin
451 *
452 * Description: This routine activate a secondary processor.
453 *
454 * Born on Date: 2002.02.05
455 *
456 * Arguments: NONE
457 *
458 * Returns: void (cannot fail)
459 *
460 * Modification log:
461 * Date Who Description
462 * ---------- --- --------------------------------------------------------
463 * 2003-06-24 hy modify for linux-2.5.69
464 *
465 *==========================================================================*/
466static void __init smp_callin(void)
467{
468 int phys_id = hard_smp_processor_id();
469 int cpu_id = smp_processor_id();
470 unsigned long timeout;
471
472 if (cpu_isset(cpu_id, cpu_callin_map)) {
473 printk("huh, phys CPU#%d, CPU#%d already present??\n",
474 phys_id, cpu_id);
475 BUG();
476 }
477 Dprintk("CPU#%d (phys ID: %d) waiting for CALLOUT\n", cpu_id, phys_id);
478
479 /* Waiting 2s total for startup (udelay is not yet working) */
480 timeout = jiffies + (2 * HZ);
481 while (time_before(jiffies, timeout)) {
482 /* Has the boot CPU finished it's STARTUP sequence ? */
483 if (cpu_isset(cpu_id, cpu_callout_map))
484 break;
485 cpu_relax();
486 }
487
488 if (!time_before(jiffies, timeout)) {
489 printk("BUG: CPU#%d started up but did not get a callout!\n",
490 cpu_id);
491 BUG();
492 }
493
494 /* Allow the master to continue. */
495 cpu_set(cpu_id, cpu_callin_map);
496}
497
498static void __init smp_online(void)
499{
500 int cpu_id = smp_processor_id();
501
Manfred Spraule545a612008-09-07 16:57:22 +0200502 notify_cpu_starting(cpu_id);
503
Linus Torvalds1da177e2005-04-16 15:20:36 -0700504 local_irq_enable();
505
506 /* Get our bogomips. */
507 calibrate_delay();
508
509 /* Save our processor parameters */
510 smp_store_cpu_info(cpu_id);
511
512 cpu_set(cpu_id, cpu_online_map);
513}
514
515/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
Simon Arlott5aa8b6c2007-10-20 01:14:39 +0200516/* Boot up CPUs common Routines */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
518static void __init show_mp_info(int nr_cpu)
519{
520 int i;
521 char cpu_model0[17], cpu_model1[17], cpu_ver[9];
522
523 strncpy(cpu_model0, (char *)M32R_FPGA_CPU_NAME_ADDR, 16);
524 strncpy(cpu_model1, (char *)M32R_FPGA_MODEL_ID_ADDR, 16);
525 strncpy(cpu_ver, (char *)M32R_FPGA_VERSION_ADDR, 8);
526
527 cpu_model0[16] = '\0';
528 for (i = 15 ; i >= 0 ; i--) {
529 if (cpu_model0[i] != ' ')
530 break;
531 cpu_model0[i] = '\0';
532 }
533 cpu_model1[16] = '\0';
534 for (i = 15 ; i >= 0 ; i--) {
535 if (cpu_model1[i] != ' ')
536 break;
537 cpu_model1[i] = '\0';
538 }
539 cpu_ver[8] = '\0';
540 for (i = 7 ; i >= 0 ; i--) {
541 if (cpu_ver[i] != ' ')
542 break;
543 cpu_ver[i] = '\0';
544 }
545
546 printk(KERN_INFO "M32R-mp information\n");
547 printk(KERN_INFO " On-chip CPUs : %d\n", nr_cpu);
548 printk(KERN_INFO " CPU model : %s/%s(%s)\n", cpu_model0,
549 cpu_model1, cpu_ver);
550}
551
552/*
553 * The bootstrap kernel entry code has set these up. Save them for
554 * a given CPU
555 */
556static void __init smp_store_cpu_info(int cpu_id)
557{
558 struct cpuinfo_m32r *ci = cpu_data + cpu_id;
559
560 *ci = boot_cpu_data;
561 ci->loops_per_jiffy = loops_per_jiffy;
562}
563
564static void __init show_cpu_info(int cpu_id)
565{
566 struct cpuinfo_m32r *ci = &cpu_data[cpu_id];
567
568 printk("CPU#%d : ", cpu_id);
569
570#define PRINT_CLOCK(name, value) \
571 printk(name " clock %d.%02dMHz", \
572 ((value) / 1000000), ((value) % 1000000) / 10000)
573
574 PRINT_CLOCK("CPU", (int)ci->cpu_clock);
575 PRINT_CLOCK(", Bus", (int)ci->bus_clock);
576 printk(", loops_per_jiffy[%ld]\n", ci->loops_per_jiffy);
577}
578
579/*
580 * the frequency of the profiling timer can be changed
581 * by writing a multiplier value into /proc/profile.
582 */
583int setup_profiling_timer(unsigned int multiplier)
584{
585 int i;
586
587 /*
588 * Sanity check. [at least 500 APIC cycles should be
589 * between APIC interrupts as a rule of thumb, to avoid
590 * irqs flooding us]
591 */
592 if ( (!multiplier) || (calibration_result / multiplier < 500))
593 return -EINVAL;
594
595 /*
596 * Set the new multiplier for each CPU. CPUs don't start using the
597 * new values until the next timer interrupt in which they do process
598 * accounting. At that time they also adjust their APIC timers
599 * accordingly.
600 */
601 for (i = 0; i < NR_CPUS; ++i)
602 per_cpu(prof_multiplier, i) = multiplier;
603
604 return 0;
605}
606
607/* Initialize all maps between cpu number and apicids */
608static void __init init_cpu_to_physid(void)
609{
610 int i;
611
612 for (i = 0 ; i < NR_CPUS ; i++) {
613 cpu_2_physid[i] = -1;
614 physid_2_cpu[i] = -1;
615 }
616}
617
618/*
619 * set up a mapping between cpu and apicid. Uses logical apicids for multiquad,
620 * else physical apic ids
621 */
622static void __init map_cpu_to_physid(int cpu_id, int phys_id)
623{
624 physid_2_cpu[phys_id] = cpu_id;
625 cpu_2_physid[cpu_id] = phys_id;
626}
627
628/*
629 * undo a mapping between cpu and apicid. Uses logical apicids for multiquad,
630 * else physical apic ids
631 */
632static void __init unmap_cpu_to_physid(int cpu_id, int phys_id)
633{
634 physid_2_cpu[phys_id] = -1;
635 cpu_2_physid[cpu_id] = -1;
636}