smpboot.c 16 KB

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