smpboot.c 16 KB

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