smpboot.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. /*
  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. #include <linux/module.h>
  42. #include <linux/init.h>
  43. #include <linux/kernel.h>
  44. #include <linux/mm.h>
  45. #include <linux/irq.h>
  46. #include <linux/bootmem.h>
  47. #include <linux/delay.h>
  48. #include <asm/io.h>
  49. #include <asm/pgalloc.h>
  50. #include <asm/tlbflush.h>
  51. #define DEBUG_SMP
  52. #ifdef DEBUG_SMP
  53. #define Dprintk(x...) printk(x)
  54. #else
  55. #define Dprintk(x...)
  56. #endif
  57. extern cpumask_t cpu_initialized;
  58. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  59. /* Data structures and variables */
  60. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  61. /* Processor that is doing the boot up */
  62. static unsigned int bsp_phys_id = -1;
  63. /* Bitmask of physically existing CPUs */
  64. physid_mask_t phys_cpu_present_map;
  65. /* Bitmask of currently online CPUs */
  66. cpumask_t cpu_online_map;
  67. EXPORT_SYMBOL(cpu_online_map);
  68. cpumask_t cpu_bootout_map;
  69. cpumask_t cpu_bootin_map;
  70. static cpumask_t cpu_callin_map;
  71. cpumask_t cpu_callout_map;
  72. EXPORT_SYMBOL(cpu_callout_map);
  73. cpumask_t cpu_possible_map = CPU_MASK_ALL;
  74. EXPORT_SYMBOL(cpu_possible_map);
  75. /* Per CPU bogomips and other parameters */
  76. struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned;
  77. static int cpucount;
  78. static cpumask_t smp_commenced_mask;
  79. extern struct {
  80. void * spi;
  81. unsigned short ss;
  82. } stack_start;
  83. /* which physical physical ID maps to which logical CPU number */
  84. static volatile int physid_2_cpu[NR_CPUS];
  85. #define physid_to_cpu(physid) physid_2_cpu[physid]
  86. /* which logical CPU number maps to which physical ID */
  87. volatile int cpu_2_physid[NR_CPUS];
  88. DEFINE_PER_CPU(int, prof_multiplier) = 1;
  89. DEFINE_PER_CPU(int, prof_old_multiplier) = 1;
  90. DEFINE_PER_CPU(int, prof_counter) = 1;
  91. spinlock_t ipi_lock[NR_IPIS];
  92. static unsigned int calibration_result;
  93. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  94. /* Function Prototypes */
  95. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  96. void smp_prepare_boot_cpu(void);
  97. void smp_prepare_cpus(unsigned int);
  98. static void init_ipi_lock(void);
  99. static void do_boot_cpu(int);
  100. int __cpu_up(unsigned int);
  101. void smp_cpus_done(unsigned int);
  102. int start_secondary(void *);
  103. static void smp_callin(void);
  104. static void smp_online(void);
  105. static void show_mp_info(int);
  106. static void smp_store_cpu_info(int);
  107. static void show_cpu_info(int);
  108. int setup_profiling_timer(unsigned int);
  109. static void init_cpu_to_physid(void);
  110. static void map_cpu_to_physid(int, int);
  111. static void unmap_cpu_to_physid(int, int);
  112. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  113. /* Boot up APs Routins : BSP */
  114. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  115. void __devinit smp_prepare_boot_cpu(void)
  116. {
  117. bsp_phys_id = hard_smp_processor_id();
  118. physid_set(bsp_phys_id, phys_cpu_present_map);
  119. cpu_set(0, cpu_online_map); /* BSP's cpu_id == 0 */
  120. cpu_set(0, cpu_callout_map);
  121. cpu_set(0, cpu_callin_map);
  122. /*
  123. * Initialize the logical to physical CPU number mapping
  124. */
  125. init_cpu_to_physid();
  126. map_cpu_to_physid(0, bsp_phys_id);
  127. current_thread_info()->cpu = 0;
  128. }
  129. /*==========================================================================*
  130. * Name: smp_prepare_cpus (old smp_boot_cpus)
  131. *
  132. * Description: This routine boot up APs.
  133. *
  134. * Born on Date: 2002.02.05
  135. *
  136. * Arguments: NONE
  137. *
  138. * Returns: void (cannot fail)
  139. *
  140. * Modification log:
  141. * Date Who Description
  142. * ---------- --- --------------------------------------------------------
  143. * 2003-06-24 hy modify for linux-2.5.69
  144. *
  145. *==========================================================================*/
  146. void __init smp_prepare_cpus(unsigned int max_cpus)
  147. {
  148. int phys_id;
  149. unsigned long nr_cpu;
  150. nr_cpu = inl(M32R_FPGA_NUM_OF_CPUS_PORTL);
  151. if (nr_cpu > NR_CPUS) {
  152. printk(KERN_INFO "NUM_OF_CPUS reg. value [%ld] > NR_CPU [%d]",
  153. nr_cpu, NR_CPUS);
  154. goto smp_done;
  155. }
  156. for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++)
  157. physid_set(phys_id, phys_cpu_present_map);
  158. #ifndef CONFIG_HOTPLUG_CPU
  159. cpu_present_map = cpu_possible_map;
  160. #endif
  161. show_mp_info(nr_cpu);
  162. init_ipi_lock();
  163. /*
  164. * Setup boot CPU information
  165. */
  166. smp_store_cpu_info(0); /* Final full version of the data */
  167. /*
  168. * If SMP should be disabled, then really disable it!
  169. */
  170. if (!max_cpus) {
  171. printk(KERN_INFO "SMP mode deactivated by commandline.\n");
  172. goto smp_done;
  173. }
  174. /*
  175. * Now scan the CPU present map and fire up the other CPUs.
  176. */
  177. Dprintk("CPU present map : %lx\n", physids_coerce(phys_cpu_present_map));
  178. for (phys_id = 0 ; phys_id < NR_CPUS ; phys_id++) {
  179. /*
  180. * Don't even attempt to start the boot CPU!
  181. */
  182. if (phys_id == bsp_phys_id)
  183. continue;
  184. if (!physid_isset(phys_id, phys_cpu_present_map))
  185. continue;
  186. if ((max_cpus >= 0) && (max_cpus <= cpucount + 1))
  187. continue;
  188. do_boot_cpu(phys_id);
  189. /*
  190. * Make sure we unmap all failed CPUs
  191. */
  192. if (physid_to_cpu(phys_id) == -1) {
  193. physid_clear(phys_id, phys_cpu_present_map);
  194. printk("phys CPU#%d not responding - " \
  195. "cannot use it.\n", phys_id);
  196. }
  197. }
  198. smp_done:
  199. Dprintk("Boot done.\n");
  200. }
  201. /*
  202. * init_ipi_lock : Initialize IPI locks.
  203. */
  204. static void __init init_ipi_lock(void)
  205. {
  206. int ipi;
  207. for (ipi = 0 ; ipi < NR_IPIS ; ipi++)
  208. spin_lock_init(&ipi_lock[ipi]);
  209. }
  210. /*==========================================================================*
  211. * Name: do_boot_cpu
  212. *
  213. * Description: This routine boot up one AP.
  214. *
  215. * Born on Date: 2002.02.05
  216. *
  217. * Arguments: phys_id - Target CPU physical ID
  218. *
  219. * Returns: void (cannot fail)
  220. *
  221. * Modification log:
  222. * Date Who Description
  223. * ---------- --- --------------------------------------------------------
  224. * 2003-06-24 hy modify for linux-2.5.69
  225. *
  226. *==========================================================================*/
  227. static void __init do_boot_cpu(int phys_id)
  228. {
  229. struct task_struct *idle;
  230. unsigned long send_status, boot_status;
  231. int timeout, cpu_id;
  232. cpu_id = ++cpucount;
  233. /*
  234. * We can't use kernel_thread since we must avoid to
  235. * reschedule the child.
  236. */
  237. idle = fork_idle(cpu_id);
  238. if (IS_ERR(idle))
  239. panic("failed fork for CPU#%d.", cpu_id);
  240. idle->thread.lr = (unsigned long)start_secondary;
  241. map_cpu_to_physid(cpu_id, phys_id);
  242. /* So we see what's up */
  243. printk("Booting processor %d/%d\n", phys_id, cpu_id);
  244. stack_start.spi = (void *)idle->thread.sp;
  245. task_thread_info(idle)->cpu = cpu_id;
  246. /*
  247. * Send Startup IPI
  248. * 1.IPI received by CPU#(phys_id).
  249. * 2.CPU#(phys_id) enter startup_AP (arch/m32r/kernel/head.S)
  250. * 3.CPU#(phys_id) enter start_secondary()
  251. */
  252. send_status = 0;
  253. boot_status = 0;
  254. cpu_set(phys_id, cpu_bootout_map);
  255. /* Send Startup IPI */
  256. send_IPI_mask_phys(cpumask_of_cpu(phys_id), CPU_BOOT_IPI, 0);
  257. Dprintk("Waiting for send to finish...\n");
  258. timeout = 0;
  259. /* Wait 100[ms] */
  260. do {
  261. Dprintk("+");
  262. udelay(1000);
  263. send_status = !cpu_isset(phys_id, cpu_bootin_map);
  264. } while (send_status && (timeout++ < 100));
  265. Dprintk("After Startup.\n");
  266. if (!send_status) {
  267. /*
  268. * allow APs to start initializing.
  269. */
  270. Dprintk("Before Callout %d.\n", cpu_id);
  271. cpu_set(cpu_id, cpu_callout_map);
  272. Dprintk("After Callout %d.\n", cpu_id);
  273. /*
  274. * Wait 5s total for a response
  275. */
  276. for (timeout = 0; timeout < 5000; timeout++) {
  277. if (cpu_isset(cpu_id, cpu_callin_map))
  278. break; /* It has booted */
  279. udelay(1000);
  280. }
  281. if (cpu_isset(cpu_id, cpu_callin_map)) {
  282. /* number CPUs logically, starting from 1 (BSP is 0) */
  283. Dprintk("OK.\n");
  284. } else {
  285. boot_status = 1;
  286. printk("Not responding.\n");
  287. }
  288. } else
  289. printk("IPI never delivered???\n");
  290. if (send_status || boot_status) {
  291. unmap_cpu_to_physid(cpu_id, phys_id);
  292. cpu_clear(cpu_id, cpu_callout_map);
  293. cpu_clear(cpu_id, cpu_callin_map);
  294. cpu_clear(cpu_id, cpu_initialized);
  295. cpucount--;
  296. }
  297. }
  298. int __cpuinit __cpu_up(unsigned int cpu_id)
  299. {
  300. int timeout;
  301. cpu_set(cpu_id, smp_commenced_mask);
  302. /*
  303. * Wait 5s total for a response
  304. */
  305. for (timeout = 0; timeout < 5000; timeout++) {
  306. if (cpu_isset(cpu_id, cpu_online_map))
  307. break;
  308. udelay(1000);
  309. }
  310. if (!cpu_isset(cpu_id, cpu_online_map))
  311. BUG();
  312. return 0;
  313. }
  314. void __init smp_cpus_done(unsigned int max_cpus)
  315. {
  316. int cpu_id, timeout;
  317. unsigned long bogosum = 0;
  318. for (timeout = 0; timeout < 5000; timeout++) {
  319. if (cpus_equal(cpu_callin_map, cpu_online_map))
  320. break;
  321. udelay(1000);
  322. }
  323. if (!cpus_equal(cpu_callin_map, cpu_online_map))
  324. BUG();
  325. for (cpu_id = 0 ; cpu_id < num_online_cpus() ; cpu_id++)
  326. show_cpu_info(cpu_id);
  327. /*
  328. * Allow the user to impress friends.
  329. */
  330. Dprintk("Before bogomips.\n");
  331. if (cpucount) {
  332. for_each_cpu_mask(cpu_id, cpu_online_map)
  333. bogosum += cpu_data[cpu_id].loops_per_jiffy;
  334. printk(KERN_INFO "Total of %d processors activated " \
  335. "(%lu.%02lu BogoMIPS).\n", cpucount + 1,
  336. bogosum / (500000 / HZ),
  337. (bogosum / (5000 / HZ)) % 100);
  338. Dprintk("Before bogocount - setting activated=1.\n");
  339. }
  340. }
  341. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  342. /* Activate a secondary processor Routins */
  343. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  344. /*==========================================================================*
  345. * Name: start_secondary
  346. *
  347. * Description: This routine activate a secondary processor.
  348. *
  349. * Born on Date: 2002.02.05
  350. *
  351. * Arguments: *unused - currently unused.
  352. *
  353. * Returns: void (cannot fail)
  354. *
  355. * Modification log:
  356. * Date Who Description
  357. * ---------- --- --------------------------------------------------------
  358. * 2003-06-24 hy modify for linux-2.5.69
  359. *
  360. *==========================================================================*/
  361. int __init start_secondary(void *unused)
  362. {
  363. cpu_init();
  364. preempt_disable();
  365. smp_callin();
  366. while (!cpu_isset(smp_processor_id(), smp_commenced_mask))
  367. cpu_relax();
  368. smp_online();
  369. /*
  370. * low-memory mappings have been cleared, flush them from
  371. * the local TLBs too.
  372. */
  373. local_flush_tlb_all();
  374. cpu_idle();
  375. return 0;
  376. }
  377. /*==========================================================================*
  378. * Name: smp_callin
  379. *
  380. * Description: This routine activate a secondary processor.
  381. *
  382. * Born on Date: 2002.02.05
  383. *
  384. * Arguments: NONE
  385. *
  386. * Returns: void (cannot fail)
  387. *
  388. * Modification log:
  389. * Date Who Description
  390. * ---------- --- --------------------------------------------------------
  391. * 2003-06-24 hy modify for linux-2.5.69
  392. *
  393. *==========================================================================*/
  394. static void __init smp_callin(void)
  395. {
  396. int phys_id = hard_smp_processor_id();
  397. int cpu_id = smp_processor_id();
  398. unsigned long timeout;
  399. if (cpu_isset(cpu_id, cpu_callin_map)) {
  400. printk("huh, phys CPU#%d, CPU#%d already present??\n",
  401. phys_id, cpu_id);
  402. BUG();
  403. }
  404. Dprintk("CPU#%d (phys ID: %d) waiting for CALLOUT\n", cpu_id, phys_id);
  405. /* Waiting 2s total for startup (udelay is not yet working) */
  406. timeout = jiffies + (2 * HZ);
  407. while (time_before(jiffies, timeout)) {
  408. /* Has the boot CPU finished it's STARTUP sequence ? */
  409. if (cpu_isset(cpu_id, cpu_callout_map))
  410. break;
  411. cpu_relax();
  412. }
  413. if (!time_before(jiffies, timeout)) {
  414. printk("BUG: CPU#%d started up but did not get a callout!\n",
  415. cpu_id);
  416. BUG();
  417. }
  418. /* Allow the master to continue. */
  419. cpu_set(cpu_id, cpu_callin_map);
  420. }
  421. static void __init smp_online(void)
  422. {
  423. int cpu_id = smp_processor_id();
  424. local_irq_enable();
  425. /* Get our bogomips. */
  426. calibrate_delay();
  427. /* Save our processor parameters */
  428. smp_store_cpu_info(cpu_id);
  429. cpu_set(cpu_id, cpu_online_map);
  430. }
  431. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  432. /* Boot up CPUs common Routins */
  433. /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
  434. static void __init show_mp_info(int nr_cpu)
  435. {
  436. int i;
  437. char cpu_model0[17], cpu_model1[17], cpu_ver[9];
  438. strncpy(cpu_model0, (char *)M32R_FPGA_CPU_NAME_ADDR, 16);
  439. strncpy(cpu_model1, (char *)M32R_FPGA_MODEL_ID_ADDR, 16);
  440. strncpy(cpu_ver, (char *)M32R_FPGA_VERSION_ADDR, 8);
  441. cpu_model0[16] = '\0';
  442. for (i = 15 ; i >= 0 ; i--) {
  443. if (cpu_model0[i] != ' ')
  444. break;
  445. cpu_model0[i] = '\0';
  446. }
  447. cpu_model1[16] = '\0';
  448. for (i = 15 ; i >= 0 ; i--) {
  449. if (cpu_model1[i] != ' ')
  450. break;
  451. cpu_model1[i] = '\0';
  452. }
  453. cpu_ver[8] = '\0';
  454. for (i = 7 ; i >= 0 ; i--) {
  455. if (cpu_ver[i] != ' ')
  456. break;
  457. cpu_ver[i] = '\0';
  458. }
  459. printk(KERN_INFO "M32R-mp information\n");
  460. printk(KERN_INFO " On-chip CPUs : %d\n", nr_cpu);
  461. printk(KERN_INFO " CPU model : %s/%s(%s)\n", cpu_model0,
  462. cpu_model1, cpu_ver);
  463. }
  464. /*
  465. * The bootstrap kernel entry code has set these up. Save them for
  466. * a given CPU
  467. */
  468. static void __init smp_store_cpu_info(int cpu_id)
  469. {
  470. struct cpuinfo_m32r *ci = cpu_data + cpu_id;
  471. *ci = boot_cpu_data;
  472. ci->loops_per_jiffy = loops_per_jiffy;
  473. }
  474. static void __init show_cpu_info(int cpu_id)
  475. {
  476. struct cpuinfo_m32r *ci = &cpu_data[cpu_id];
  477. printk("CPU#%d : ", cpu_id);
  478. #define PRINT_CLOCK(name, value) \
  479. printk(name " clock %d.%02dMHz", \
  480. ((value) / 1000000), ((value) % 1000000) / 10000)
  481. PRINT_CLOCK("CPU", (int)ci->cpu_clock);
  482. PRINT_CLOCK(", Bus", (int)ci->bus_clock);
  483. printk(", loops_per_jiffy[%ld]\n", ci->loops_per_jiffy);
  484. }
  485. /*
  486. * the frequency of the profiling timer can be changed
  487. * by writing a multiplier value into /proc/profile.
  488. */
  489. int setup_profiling_timer(unsigned int multiplier)
  490. {
  491. int i;
  492. /*
  493. * Sanity check. [at least 500 APIC cycles should be
  494. * between APIC interrupts as a rule of thumb, to avoid
  495. * irqs flooding us]
  496. */
  497. if ( (!multiplier) || (calibration_result / multiplier < 500))
  498. return -EINVAL;
  499. /*
  500. * Set the new multiplier for each CPU. CPUs don't start using the
  501. * new values until the next timer interrupt in which they do process
  502. * accounting. At that time they also adjust their APIC timers
  503. * accordingly.
  504. */
  505. for (i = 0; i < NR_CPUS; ++i)
  506. per_cpu(prof_multiplier, i) = multiplier;
  507. return 0;
  508. }
  509. /* Initialize all maps between cpu number and apicids */
  510. static void __init init_cpu_to_physid(void)
  511. {
  512. int i;
  513. for (i = 0 ; i < NR_CPUS ; i++) {
  514. cpu_2_physid[i] = -1;
  515. physid_2_cpu[i] = -1;
  516. }
  517. }
  518. /*
  519. * set up a mapping between cpu and apicid. Uses logical apicids for multiquad,
  520. * else physical apic ids
  521. */
  522. static void __init map_cpu_to_physid(int cpu_id, int phys_id)
  523. {
  524. physid_2_cpu[phys_id] = cpu_id;
  525. cpu_2_physid[cpu_id] = phys_id;
  526. }
  527. /*
  528. * undo a mapping between cpu and apicid. Uses logical apicids for multiquad,
  529. * else physical apic ids
  530. */
  531. static void __init unmap_cpu_to_physid(int cpu_id, int phys_id)
  532. {
  533. physid_2_cpu[phys_id] = -1;
  534. cpu_2_physid[cpu_id] = -1;
  535. }