es7000_32.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. /*
  2. * Written by: Garry Forsgren, Unisys Corporation
  3. * Natalie Protasevich, Unisys Corporation
  4. *
  5. * This file contains the code to configure and interface
  6. * with Unisys ES7000 series hardware system manager.
  7. *
  8. * Copyright (c) 2003 Unisys Corporation.
  9. * Copyright (C) 2009, Red Hat, Inc., Ingo Molnar
  10. *
  11. * All Rights Reserved.
  12. *
  13. * This program is free software; you can redistribute it and/or modify it
  14. * under the terms of version 2 of the GNU General Public License as
  15. * published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it would be useful, but
  18. * WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  20. *
  21. * You should have received a copy of the GNU General Public License along
  22. * with this program; if not, write the Free Software Foundation, Inc., 59
  23. * Temple Place - Suite 330, Boston MA 02111-1307, USA.
  24. *
  25. * Contact information: Unisys Corporation, Township Line & Union Meeting
  26. * Roads-A, Unisys Way, Blue Bell, Pennsylvania, 19424, or:
  27. *
  28. * http://www.unisys.com
  29. */
  30. #include <linux/notifier.h>
  31. #include <linux/spinlock.h>
  32. #include <linux/cpumask.h>
  33. #include <linux/threads.h>
  34. #include <linux/kernel.h>
  35. #include <linux/module.h>
  36. #include <linux/reboot.h>
  37. #include <linux/string.h>
  38. #include <linux/types.h>
  39. #include <linux/errno.h>
  40. #include <linux/acpi.h>
  41. #include <linux/init.h>
  42. #include <linux/nmi.h>
  43. #include <linux/smp.h>
  44. #include <linux/io.h>
  45. #include <asm/apicdef.h>
  46. #include <asm/atomic.h>
  47. #include <asm/fixmap.h>
  48. #include <asm/mpspec.h>
  49. #include <asm/setup.h>
  50. #include <asm/apic.h>
  51. #include <asm/ipi.h>
  52. /*
  53. * ES7000 chipsets
  54. */
  55. #define NON_UNISYS 0
  56. #define ES7000_CLASSIC 1
  57. #define ES7000_ZORRO 2
  58. #define MIP_REG 1
  59. #define MIP_PSAI_REG 4
  60. #define MIP_BUSY 1
  61. #define MIP_SPIN 0xf0000
  62. #define MIP_VALID 0x0100000000000000ULL
  63. #define MIP_SW_APIC 0x1020b
  64. #define MIP_PORT(val) ((val >> 32) & 0xffff)
  65. #define MIP_RD_LO(val) (val & 0xffffffff)
  66. struct mip_reg {
  67. unsigned long long off_0x00;
  68. unsigned long long off_0x08;
  69. unsigned long long off_0x10;
  70. unsigned long long off_0x18;
  71. unsigned long long off_0x20;
  72. unsigned long long off_0x28;
  73. unsigned long long off_0x30;
  74. unsigned long long off_0x38;
  75. };
  76. struct mip_reg_info {
  77. unsigned long long mip_info;
  78. unsigned long long delivery_info;
  79. unsigned long long host_reg;
  80. unsigned long long mip_reg;
  81. };
  82. struct psai {
  83. unsigned long long entry_type;
  84. unsigned long long addr;
  85. unsigned long long bep_addr;
  86. };
  87. #ifdef CONFIG_ACPI
  88. struct es7000_oem_table {
  89. struct acpi_table_header Header;
  90. u32 OEMTableAddr;
  91. u32 OEMTableSize;
  92. };
  93. static unsigned long oem_addrX;
  94. static unsigned long oem_size;
  95. #endif
  96. /*
  97. * ES7000 Globals
  98. */
  99. static volatile unsigned long *psai;
  100. static struct mip_reg *mip_reg;
  101. static struct mip_reg *host_reg;
  102. static int mip_port;
  103. static unsigned long mip_addr;
  104. static unsigned long host_addr;
  105. int es7000_plat;
  106. /*
  107. * GSI override for ES7000 platforms.
  108. */
  109. static unsigned int base;
  110. static int
  111. es7000_rename_gsi(int ioapic, int gsi)
  112. {
  113. if (es7000_plat == ES7000_ZORRO)
  114. return gsi;
  115. if (!base) {
  116. int i;
  117. for (i = 0; i < nr_ioapics; i++)
  118. base += nr_ioapic_registers[i];
  119. }
  120. if (!ioapic && (gsi < 16))
  121. gsi += base;
  122. return gsi;
  123. }
  124. static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
  125. {
  126. unsigned long vect = 0, psaival = 0;
  127. if (psai == NULL)
  128. return -1;
  129. vect = ((unsigned long)__pa(eip)/0x1000) << 16;
  130. psaival = (0x1000000 | vect | cpu);
  131. while (*psai & 0x1000000)
  132. ;
  133. *psai = psaival;
  134. return 0;
  135. }
  136. static int __init es7000_update_apic(void)
  137. {
  138. apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
  139. /* MPENTIUMIII */
  140. if (boot_cpu_data.x86 == 6 &&
  141. (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) {
  142. es7000_update_apic_to_cluster();
  143. apic->wait_for_init_deassert = NULL;
  144. apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
  145. }
  146. return 0;
  147. }
  148. static void __init setup_unisys(void)
  149. {
  150. /*
  151. * Determine the generation of the ES7000 currently running.
  152. *
  153. * es7000_plat = 1 if the machine is a 5xx ES7000 box
  154. * es7000_plat = 2 if the machine is a x86_64 ES7000 box
  155. *
  156. */
  157. if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
  158. es7000_plat = ES7000_ZORRO;
  159. else
  160. es7000_plat = ES7000_CLASSIC;
  161. ioapic_renumber_irq = es7000_rename_gsi;
  162. x86_quirks->update_apic = es7000_update_apic;
  163. }
  164. /*
  165. * Parse the OEM Table:
  166. */
  167. static int __init parse_unisys_oem(char *oemptr)
  168. {
  169. int i;
  170. int success = 0;
  171. unsigned char type, size;
  172. unsigned long val;
  173. char *tp = NULL;
  174. struct psai *psaip = NULL;
  175. struct mip_reg_info *mi;
  176. struct mip_reg *host, *mip;
  177. tp = oemptr;
  178. tp += 8;
  179. for (i = 0; i <= 6; i++) {
  180. type = *tp++;
  181. size = *tp++;
  182. tp -= 2;
  183. switch (type) {
  184. case MIP_REG:
  185. mi = (struct mip_reg_info *)tp;
  186. val = MIP_RD_LO(mi->host_reg);
  187. host_addr = val;
  188. host = (struct mip_reg *)val;
  189. host_reg = __va(host);
  190. val = MIP_RD_LO(mi->mip_reg);
  191. mip_port = MIP_PORT(mi->mip_info);
  192. mip_addr = val;
  193. mip = (struct mip_reg *)val;
  194. mip_reg = __va(mip);
  195. pr_debug("es7000_mipcfg: host_reg = 0x%lx \n",
  196. (unsigned long)host_reg);
  197. pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n",
  198. (unsigned long)mip_reg);
  199. success++;
  200. break;
  201. case MIP_PSAI_REG:
  202. psaip = (struct psai *)tp;
  203. if (tp != NULL) {
  204. if (psaip->addr)
  205. psai = __va(psaip->addr);
  206. else
  207. psai = NULL;
  208. success++;
  209. }
  210. break;
  211. default:
  212. break;
  213. }
  214. tp += size;
  215. }
  216. if (success < 2)
  217. es7000_plat = NON_UNISYS;
  218. else
  219. setup_unisys();
  220. return es7000_plat;
  221. }
  222. #ifdef CONFIG_ACPI
  223. static int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
  224. {
  225. struct acpi_table_header *header = NULL;
  226. struct es7000_oem_table *table;
  227. acpi_size tbl_size;
  228. acpi_status ret;
  229. int i = 0;
  230. for (;;) {
  231. ret = acpi_get_table_with_size("OEM1", i++, &header, &tbl_size);
  232. if (!ACPI_SUCCESS(ret))
  233. return -1;
  234. if (!memcmp((char *) &header->oem_id, "UNISYS", 6))
  235. break;
  236. early_acpi_os_unmap_memory(header, tbl_size);
  237. }
  238. table = (void *)header;
  239. oem_addrX = table->OEMTableAddr;
  240. oem_size = table->OEMTableSize;
  241. early_acpi_os_unmap_memory(header, tbl_size);
  242. *oem_addr = (unsigned long)__acpi_map_table(oem_addrX, oem_size);
  243. return 0;
  244. }
  245. static void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr)
  246. {
  247. if (!oem_addr)
  248. return;
  249. __acpi_unmap_table((char *)oem_addr, oem_size);
  250. }
  251. static int es7000_check_dsdt(void)
  252. {
  253. struct acpi_table_header header;
  254. if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) &&
  255. !strncmp(header.oem_id, "UNISYS", 6))
  256. return 1;
  257. return 0;
  258. }
  259. /* Hook from generic ACPI tables.c */
  260. static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  261. {
  262. unsigned long oem_addr = 0;
  263. int check_dsdt;
  264. int ret = 0;
  265. /* check dsdt at first to avoid clear fix_map for oem_addr */
  266. check_dsdt = es7000_check_dsdt();
  267. if (!find_unisys_acpi_oem_table(&oem_addr)) {
  268. if (check_dsdt) {
  269. ret = parse_unisys_oem((char *)oem_addr);
  270. } else {
  271. setup_unisys();
  272. ret = 1;
  273. }
  274. /*
  275. * we need to unmap it
  276. */
  277. unmap_unisys_acpi_oem_table(oem_addr);
  278. }
  279. return ret;
  280. }
  281. #else /* !CONFIG_ACPI: */
  282. static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  283. {
  284. return 0;
  285. }
  286. #endif /* !CONFIG_ACPI */
  287. static void es7000_spin(int n)
  288. {
  289. int i = 0;
  290. while (i++ < n)
  291. rep_nop();
  292. }
  293. static int __init
  294. es7000_mip_write(struct mip_reg *mip_reg)
  295. {
  296. int status = 0;
  297. int spin;
  298. spin = MIP_SPIN;
  299. while ((host_reg->off_0x38 & MIP_VALID) != 0) {
  300. if (--spin <= 0) {
  301. WARN(1, "Timeout waiting for Host Valid Flag\n");
  302. return -1;
  303. }
  304. es7000_spin(MIP_SPIN);
  305. }
  306. memcpy(host_reg, mip_reg, sizeof(struct mip_reg));
  307. outb(1, mip_port);
  308. spin = MIP_SPIN;
  309. while ((mip_reg->off_0x38 & MIP_VALID) == 0) {
  310. if (--spin <= 0) {
  311. WARN(1, "Timeout waiting for MIP Valid Flag\n");
  312. return -1;
  313. }
  314. es7000_spin(MIP_SPIN);
  315. }
  316. status = (mip_reg->off_0x00 & 0xffff0000000000ULL) >> 48;
  317. mip_reg->off_0x38 &= ~MIP_VALID;
  318. return status;
  319. }
  320. static void __init es7000_enable_apic_mode(void)
  321. {
  322. struct mip_reg es7000_mip_reg;
  323. int mip_status;
  324. if (!es7000_plat)
  325. return;
  326. printk(KERN_INFO "ES7000: Enabling APIC mode.\n");
  327. memset(&es7000_mip_reg, 0, sizeof(struct mip_reg));
  328. es7000_mip_reg.off_0x00 = MIP_SW_APIC;
  329. es7000_mip_reg.off_0x38 = MIP_VALID;
  330. while ((mip_status = es7000_mip_write(&es7000_mip_reg)) != 0)
  331. WARN(1, "Command failed, status = %x\n", mip_status);
  332. }
  333. static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask)
  334. {
  335. /* Careful. Some cpus do not strictly honor the set of cpus
  336. * specified in the interrupt destination when using lowest
  337. * priority interrupt delivery mode.
  338. *
  339. * In particular there was a hyperthreading cpu observed to
  340. * deliver interrupts to the wrong hyperthread when only one
  341. * hyperthread was specified in the interrupt desitination.
  342. */
  343. *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
  344. }
  345. static void es7000_wait_for_init_deassert(atomic_t *deassert)
  346. {
  347. #ifndef CONFIG_ES7000_CLUSTERED_APIC
  348. while (!atomic_read(deassert))
  349. cpu_relax();
  350. #endif
  351. return;
  352. }
  353. static unsigned int es7000_get_apic_id(unsigned long x)
  354. {
  355. return (x >> 24) & 0xFF;
  356. }
  357. static void es7000_send_IPI_mask(const struct cpumask *mask, int vector)
  358. {
  359. default_send_IPI_mask_sequence_phys(mask, vector);
  360. }
  361. static void es7000_send_IPI_allbutself(int vector)
  362. {
  363. default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
  364. }
  365. static void es7000_send_IPI_all(int vector)
  366. {
  367. es7000_send_IPI_mask(cpu_online_mask, vector);
  368. }
  369. static int es7000_apic_id_registered(void)
  370. {
  371. return 1;
  372. }
  373. static const cpumask_t *target_cpus_cluster(void)
  374. {
  375. return &CPU_MASK_ALL;
  376. }
  377. static const cpumask_t *es7000_target_cpus(void)
  378. {
  379. return &cpumask_of_cpu(smp_processor_id());
  380. }
  381. static unsigned long
  382. es7000_check_apicid_used(physid_mask_t bitmap, int apicid)
  383. {
  384. return 0;
  385. }
  386. static unsigned long es7000_check_apicid_present(int bit)
  387. {
  388. return physid_isset(bit, phys_cpu_present_map);
  389. }
  390. static unsigned long calculate_ldr(int cpu)
  391. {
  392. unsigned long id = per_cpu(x86_bios_cpu_apicid, cpu);
  393. return SET_APIC_LOGICAL_ID(id);
  394. }
  395. /*
  396. * Set up the logical destination ID.
  397. *
  398. * Intel recommends to set DFR, LdR and TPR before enabling
  399. * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
  400. * document number 292116). So here it goes...
  401. */
  402. static void es7000_init_apic_ldr_cluster(void)
  403. {
  404. unsigned long val;
  405. int cpu = smp_processor_id();
  406. apic_write(APIC_DFR, APIC_DFR_CLUSTER);
  407. val = calculate_ldr(cpu);
  408. apic_write(APIC_LDR, val);
  409. }
  410. static void es7000_init_apic_ldr(void)
  411. {
  412. unsigned long val;
  413. int cpu = smp_processor_id();
  414. apic_write(APIC_DFR, APIC_DFR_FLAT);
  415. val = calculate_ldr(cpu);
  416. apic_write(APIC_LDR, val);
  417. }
  418. static void es7000_setup_apic_routing(void)
  419. {
  420. int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id());
  421. printk(KERN_INFO
  422. "Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n",
  423. (apic_version[apic] == 0x14) ?
  424. "Physical Cluster" : "Logical Cluster",
  425. nr_ioapics, cpus_addr(*es7000_target_cpus())[0]);
  426. }
  427. static int es7000_apicid_to_node(int logical_apicid)
  428. {
  429. return 0;
  430. }
  431. static int es7000_cpu_present_to_apicid(int mps_cpu)
  432. {
  433. if (!mps_cpu)
  434. return boot_cpu_physical_apicid;
  435. else if (mps_cpu < nr_cpu_ids)
  436. return per_cpu(x86_bios_cpu_apicid, mps_cpu);
  437. else
  438. return BAD_APICID;
  439. }
  440. static int cpu_id;
  441. static physid_mask_t es7000_apicid_to_cpu_present(int phys_apicid)
  442. {
  443. physid_mask_t mask;
  444. mask = physid_mask_of_physid(cpu_id);
  445. ++cpu_id;
  446. return mask;
  447. }
  448. /* Mapping from cpu number to logical apicid */
  449. static int es7000_cpu_to_logical_apicid(int cpu)
  450. {
  451. #ifdef CONFIG_SMP
  452. if (cpu >= nr_cpu_ids)
  453. return BAD_APICID;
  454. return cpu_2_logical_apicid[cpu];
  455. #else
  456. return logical_smp_processor_id();
  457. #endif
  458. }
  459. static physid_mask_t es7000_ioapic_phys_id_map(physid_mask_t phys_map)
  460. {
  461. /* For clustered we don't have a good way to do this yet - hack */
  462. return physids_promote(0xff);
  463. }
  464. static int es7000_check_phys_apicid_present(int cpu_physical_apicid)
  465. {
  466. boot_cpu_physical_apicid = read_apic_id();
  467. return 1;
  468. }
  469. static unsigned int
  470. es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
  471. {
  472. int cpus_found = 0;
  473. int num_bits_set;
  474. int apicid;
  475. int cpu;
  476. num_bits_set = cpumask_weight(cpumask);
  477. /* Return id to all */
  478. if (num_bits_set == nr_cpu_ids)
  479. return 0xFF;
  480. /*
  481. * The cpus in the mask must all be on the apic cluster. If are not
  482. * on the same apicid cluster return default value of target_cpus():
  483. */
  484. cpu = cpumask_first(cpumask);
  485. apicid = es7000_cpu_to_logical_apicid(cpu);
  486. while (cpus_found < num_bits_set) {
  487. if (cpumask_test_cpu(cpu, cpumask)) {
  488. int new_apicid = es7000_cpu_to_logical_apicid(cpu);
  489. if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
  490. WARN(1, "Not a valid mask!");
  491. return 0xFF;
  492. }
  493. apicid = new_apicid;
  494. cpus_found++;
  495. }
  496. cpu++;
  497. }
  498. return apicid;
  499. }
  500. static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask)
  501. {
  502. int cpus_found = 0;
  503. int num_bits_set;
  504. int apicid;
  505. int cpu;
  506. num_bits_set = cpus_weight(*cpumask);
  507. /* Return id to all */
  508. if (num_bits_set == nr_cpu_ids)
  509. return es7000_cpu_to_logical_apicid(0);
  510. /*
  511. * The cpus in the mask must all be on the apic cluster. If are not
  512. * on the same apicid cluster return default value of target_cpus():
  513. */
  514. cpu = first_cpu(*cpumask);
  515. apicid = es7000_cpu_to_logical_apicid(cpu);
  516. while (cpus_found < num_bits_set) {
  517. if (cpu_isset(cpu, *cpumask)) {
  518. int new_apicid = es7000_cpu_to_logical_apicid(cpu);
  519. if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
  520. printk("%s: Not a valid mask!\n", __func__);
  521. return es7000_cpu_to_logical_apicid(0);
  522. }
  523. apicid = new_apicid;
  524. cpus_found++;
  525. }
  526. cpu++;
  527. }
  528. return apicid;
  529. }
  530. static unsigned int
  531. es7000_cpu_mask_to_apicid_and(const struct cpumask *inmask,
  532. const struct cpumask *andmask)
  533. {
  534. int apicid = es7000_cpu_to_logical_apicid(0);
  535. cpumask_var_t cpumask;
  536. if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC))
  537. return apicid;
  538. cpumask_and(cpumask, inmask, andmask);
  539. cpumask_and(cpumask, cpumask, cpu_online_mask);
  540. apicid = es7000_cpu_mask_to_apicid(cpumask);
  541. free_cpumask_var(cpumask);
  542. return apicid;
  543. }
  544. static int es7000_phys_pkg_id(int cpuid_apic, int index_msb)
  545. {
  546. return cpuid_apic >> index_msb;
  547. }
  548. void __init es7000_update_apic_to_cluster(void)
  549. {
  550. apic->target_cpus = target_cpus_cluster;
  551. apic->irq_delivery_mode = dest_LowestPrio;
  552. /* logical delivery broadcast to all procs: */
  553. apic->irq_dest_mode = 1;
  554. apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
  555. apic->cpu_mask_to_apicid = es7000_cpu_mask_to_apicid_cluster;
  556. }
  557. static int probe_es7000(void)
  558. {
  559. /* probed later in mptable/ACPI hooks */
  560. return 0;
  561. }
  562. static __init int
  563. es7000_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
  564. {
  565. if (mpc->oemptr) {
  566. struct mpc_oemtable *oem_table =
  567. (struct mpc_oemtable *)mpc->oemptr;
  568. if (!strncmp(oem, "UNISYS", 6))
  569. return parse_unisys_oem((char *)oem_table);
  570. }
  571. return 0;
  572. }
  573. struct apic apic_es7000 = {
  574. .name = "es7000",
  575. .probe = probe_es7000,
  576. .acpi_madt_oem_check = es7000_acpi_madt_oem_check,
  577. .apic_id_registered = es7000_apic_id_registered,
  578. .irq_delivery_mode = dest_Fixed,
  579. /* phys delivery to target CPUs: */
  580. .irq_dest_mode = 0,
  581. .target_cpus = es7000_target_cpus,
  582. .disable_esr = 1,
  583. .dest_logical = 0,
  584. .check_apicid_used = es7000_check_apicid_used,
  585. .check_apicid_present = es7000_check_apicid_present,
  586. .vector_allocation_domain = es7000_vector_allocation_domain,
  587. .init_apic_ldr = es7000_init_apic_ldr,
  588. .ioapic_phys_id_map = es7000_ioapic_phys_id_map,
  589. .setup_apic_routing = es7000_setup_apic_routing,
  590. .multi_timer_check = NULL,
  591. .apicid_to_node = es7000_apicid_to_node,
  592. .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid,
  593. .cpu_present_to_apicid = es7000_cpu_present_to_apicid,
  594. .apicid_to_cpu_present = es7000_apicid_to_cpu_present,
  595. .setup_portio_remap = NULL,
  596. .check_phys_apicid_present = es7000_check_phys_apicid_present,
  597. .enable_apic_mode = es7000_enable_apic_mode,
  598. .phys_pkg_id = es7000_phys_pkg_id,
  599. .mps_oem_check = es7000_mps_oem_check,
  600. .get_apic_id = es7000_get_apic_id,
  601. .set_apic_id = NULL,
  602. .apic_id_mask = 0xFF << 24,
  603. .cpu_mask_to_apicid = es7000_cpu_mask_to_apicid,
  604. .cpu_mask_to_apicid_and = es7000_cpu_mask_to_apicid_and,
  605. .send_IPI_mask = es7000_send_IPI_mask,
  606. .send_IPI_mask_allbutself = NULL,
  607. .send_IPI_allbutself = es7000_send_IPI_allbutself,
  608. .send_IPI_all = es7000_send_IPI_all,
  609. .send_IPI_self = default_send_IPI_self,
  610. .wakeup_cpu = NULL,
  611. .trampoline_phys_low = 0x467,
  612. .trampoline_phys_high = 0x469,
  613. .wait_for_init_deassert = es7000_wait_for_init_deassert,
  614. /* Nothing to do for most platforms, since cleared by the INIT cycle: */
  615. .smp_callin_clear_local_apic = NULL,
  616. .inquire_remote_apic = default_inquire_remote_apic,
  617. .read = native_apic_mem_read,
  618. .write = native_apic_mem_write,
  619. .icr_read = native_apic_icr_read,
  620. .icr_write = native_apic_icr_write,
  621. .wait_icr_idle = native_apic_wait_icr_idle,
  622. .safe_wait_icr_idle = native_safe_apic_wait_icr_idle,
  623. };