pci.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. /*
  2. * Support PCI/PCIe on PowerNV platforms
  3. *
  4. * Currently supports only P5IOC2
  5. *
  6. * Copyright 2011 Benjamin Herrenschmidt, IBM Corp.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version
  11. * 2 of the License, or (at your option) any later version.
  12. */
  13. #include <linux/kernel.h>
  14. #include <linux/pci.h>
  15. #include <linux/delay.h>
  16. #include <linux/string.h>
  17. #include <linux/init.h>
  18. #include <linux/bootmem.h>
  19. #include <linux/irq.h>
  20. #include <linux/io.h>
  21. #include <linux/msi.h>
  22. #include <asm/sections.h>
  23. #include <asm/io.h>
  24. #include <asm/prom.h>
  25. #include <asm/pci-bridge.h>
  26. #include <asm/machdep.h>
  27. #include <asm/msi_bitmap.h>
  28. #include <asm/ppc-pci.h>
  29. #include <asm/opal.h>
  30. #include <asm/iommu.h>
  31. #include <asm/tce.h>
  32. #include <asm/firmware.h>
  33. #include "powernv.h"
  34. #include "pci.h"
  35. /* Delay in usec */
  36. #define PCI_RESET_DELAY_US 3000000
  37. #define cfg_dbg(fmt...) do { } while(0)
  38. //#define cfg_dbg(fmt...) printk(fmt)
  39. #ifdef CONFIG_PCI_MSI
  40. static int pnv_msi_check_device(struct pci_dev* pdev, int nvec, int type)
  41. {
  42. struct pci_controller *hose = pci_bus_to_host(pdev->bus);
  43. struct pnv_phb *phb = hose->private_data;
  44. return (phb && phb->msi_bmp.bitmap) ? 0 : -ENODEV;
  45. }
  46. static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
  47. {
  48. struct pci_controller *hose = pci_bus_to_host(pdev->bus);
  49. struct pnv_phb *phb = hose->private_data;
  50. struct msi_desc *entry;
  51. struct msi_msg msg;
  52. int hwirq;
  53. unsigned int virq;
  54. int rc;
  55. if (WARN_ON(!phb))
  56. return -ENODEV;
  57. list_for_each_entry(entry, &pdev->msi_list, list) {
  58. if (!entry->msi_attrib.is_64 && !phb->msi32_support) {
  59. pr_warn("%s: Supports only 64-bit MSIs\n",
  60. pci_name(pdev));
  61. return -ENXIO;
  62. }
  63. hwirq = msi_bitmap_alloc_hwirqs(&phb->msi_bmp, 1);
  64. if (hwirq < 0) {
  65. pr_warn("%s: Failed to find a free MSI\n",
  66. pci_name(pdev));
  67. return -ENOSPC;
  68. }
  69. virq = irq_create_mapping(NULL, phb->msi_base + hwirq);
  70. if (virq == NO_IRQ) {
  71. pr_warn("%s: Failed to map MSI to linux irq\n",
  72. pci_name(pdev));
  73. msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, 1);
  74. return -ENOMEM;
  75. }
  76. rc = phb->msi_setup(phb, pdev, phb->msi_base + hwirq,
  77. virq, entry->msi_attrib.is_64, &msg);
  78. if (rc) {
  79. pr_warn("%s: Failed to setup MSI\n", pci_name(pdev));
  80. irq_dispose_mapping(virq);
  81. msi_bitmap_free_hwirqs(&phb->msi_bmp, hwirq, 1);
  82. return rc;
  83. }
  84. irq_set_msi_desc(virq, entry);
  85. write_msi_msg(virq, &msg);
  86. }
  87. return 0;
  88. }
  89. static void pnv_teardown_msi_irqs(struct pci_dev *pdev)
  90. {
  91. struct pci_controller *hose = pci_bus_to_host(pdev->bus);
  92. struct pnv_phb *phb = hose->private_data;
  93. struct msi_desc *entry;
  94. if (WARN_ON(!phb))
  95. return;
  96. list_for_each_entry(entry, &pdev->msi_list, list) {
  97. if (entry->irq == NO_IRQ)
  98. continue;
  99. irq_set_msi_desc(entry->irq, NULL);
  100. msi_bitmap_free_hwirqs(&phb->msi_bmp,
  101. virq_to_hw(entry->irq) - phb->msi_base, 1);
  102. irq_dispose_mapping(entry->irq);
  103. }
  104. }
  105. #endif /* CONFIG_PCI_MSI */
  106. static void pnv_pci_dump_p7ioc_diag_data(struct pnv_phb *phb)
  107. {
  108. struct OpalIoP7IOCPhbErrorData *data = &phb->diag.p7ioc;
  109. int i;
  110. pr_info("PHB %d diagnostic data:\n", phb->hose->global_number);
  111. pr_info(" brdgCtl = 0x%08x\n", data->brdgCtl);
  112. pr_info(" portStatusReg = 0x%08x\n", data->portStatusReg);
  113. pr_info(" rootCmplxStatus = 0x%08x\n", data->rootCmplxStatus);
  114. pr_info(" busAgentStatus = 0x%08x\n", data->busAgentStatus);
  115. pr_info(" deviceStatus = 0x%08x\n", data->deviceStatus);
  116. pr_info(" slotStatus = 0x%08x\n", data->slotStatus);
  117. pr_info(" linkStatus = 0x%08x\n", data->linkStatus);
  118. pr_info(" devCmdStatus = 0x%08x\n", data->devCmdStatus);
  119. pr_info(" devSecStatus = 0x%08x\n", data->devSecStatus);
  120. pr_info(" rootErrorStatus = 0x%08x\n", data->rootErrorStatus);
  121. pr_info(" uncorrErrorStatus = 0x%08x\n", data->uncorrErrorStatus);
  122. pr_info(" corrErrorStatus = 0x%08x\n", data->corrErrorStatus);
  123. pr_info(" tlpHdr1 = 0x%08x\n", data->tlpHdr1);
  124. pr_info(" tlpHdr2 = 0x%08x\n", data->tlpHdr2);
  125. pr_info(" tlpHdr3 = 0x%08x\n", data->tlpHdr3);
  126. pr_info(" tlpHdr4 = 0x%08x\n", data->tlpHdr4);
  127. pr_info(" sourceId = 0x%08x\n", data->sourceId);
  128. pr_info(" errorClass = 0x%016llx\n", data->errorClass);
  129. pr_info(" correlator = 0x%016llx\n", data->correlator);
  130. pr_info(" p7iocPlssr = 0x%016llx\n", data->p7iocPlssr);
  131. pr_info(" p7iocCsr = 0x%016llx\n", data->p7iocCsr);
  132. pr_info(" lemFir = 0x%016llx\n", data->lemFir);
  133. pr_info(" lemErrorMask = 0x%016llx\n", data->lemErrorMask);
  134. pr_info(" lemWOF = 0x%016llx\n", data->lemWOF);
  135. pr_info(" phbErrorStatus = 0x%016llx\n", data->phbErrorStatus);
  136. pr_info(" phbFirstErrorStatus = 0x%016llx\n", data->phbFirstErrorStatus);
  137. pr_info(" phbErrorLog0 = 0x%016llx\n", data->phbErrorLog0);
  138. pr_info(" phbErrorLog1 = 0x%016llx\n", data->phbErrorLog1);
  139. pr_info(" mmioErrorStatus = 0x%016llx\n", data->mmioErrorStatus);
  140. pr_info(" mmioFirstErrorStatus = 0x%016llx\n", data->mmioFirstErrorStatus);
  141. pr_info(" mmioErrorLog0 = 0x%016llx\n", data->mmioErrorLog0);
  142. pr_info(" mmioErrorLog1 = 0x%016llx\n", data->mmioErrorLog1);
  143. pr_info(" dma0ErrorStatus = 0x%016llx\n", data->dma0ErrorStatus);
  144. pr_info(" dma0FirstErrorStatus = 0x%016llx\n", data->dma0FirstErrorStatus);
  145. pr_info(" dma0ErrorLog0 = 0x%016llx\n", data->dma0ErrorLog0);
  146. pr_info(" dma0ErrorLog1 = 0x%016llx\n", data->dma0ErrorLog1);
  147. pr_info(" dma1ErrorStatus = 0x%016llx\n", data->dma1ErrorStatus);
  148. pr_info(" dma1FirstErrorStatus = 0x%016llx\n", data->dma1FirstErrorStatus);
  149. pr_info(" dma1ErrorLog0 = 0x%016llx\n", data->dma1ErrorLog0);
  150. pr_info(" dma1ErrorLog1 = 0x%016llx\n", data->dma1ErrorLog1);
  151. for (i = 0; i < OPAL_P7IOC_NUM_PEST_REGS; i++) {
  152. if ((data->pestA[i] >> 63) == 0 &&
  153. (data->pestB[i] >> 63) == 0)
  154. continue;
  155. pr_info(" PE[%3d] PESTA = 0x%016llx\n", i, data->pestA[i]);
  156. pr_info(" PESTB = 0x%016llx\n", data->pestB[i]);
  157. }
  158. }
  159. static void pnv_pci_dump_phb_diag_data(struct pnv_phb *phb)
  160. {
  161. switch(phb->model) {
  162. case PNV_PHB_MODEL_P7IOC:
  163. pnv_pci_dump_p7ioc_diag_data(phb);
  164. break;
  165. default:
  166. pr_warning("PCI %d: Can't decode this PHB diag data\n",
  167. phb->hose->global_number);
  168. }
  169. }
  170. static void pnv_pci_handle_eeh_config(struct pnv_phb *phb, u32 pe_no)
  171. {
  172. unsigned long flags, rc;
  173. int has_diag;
  174. spin_lock_irqsave(&phb->lock, flags);
  175. rc = opal_pci_get_phb_diag_data(phb->opal_id, phb->diag.blob, PNV_PCI_DIAG_BUF_SIZE);
  176. has_diag = (rc == OPAL_SUCCESS);
  177. rc = opal_pci_eeh_freeze_clear(phb->opal_id, pe_no,
  178. OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
  179. if (rc) {
  180. pr_warning("PCI %d: Failed to clear EEH freeze state"
  181. " for PE#%d, err %ld\n",
  182. phb->hose->global_number, pe_no, rc);
  183. /* For now, let's only display the diag buffer when we fail to clear
  184. * the EEH status. We'll do more sensible things later when we have
  185. * proper EEH support. We need to make sure we don't pollute ourselves
  186. * with the normal errors generated when probing empty slots
  187. */
  188. if (has_diag)
  189. pnv_pci_dump_phb_diag_data(phb);
  190. else
  191. pr_warning("PCI %d: No diag data available\n",
  192. phb->hose->global_number);
  193. }
  194. spin_unlock_irqrestore(&phb->lock, flags);
  195. }
  196. static void pnv_pci_config_check_eeh(struct pnv_phb *phb, struct pci_bus *bus,
  197. u32 bdfn)
  198. {
  199. s64 rc;
  200. u8 fstate;
  201. u16 pcierr;
  202. u32 pe_no;
  203. /* Get PE# if we support IODA */
  204. pe_no = phb->bdfn_to_pe ? phb->bdfn_to_pe(phb, bus, bdfn & 0xff) : 0;
  205. /* Read freeze status */
  206. rc = opal_pci_eeh_freeze_status(phb->opal_id, pe_no, &fstate, &pcierr,
  207. NULL);
  208. if (rc) {
  209. pr_warning("PCI %d: Failed to read EEH status for PE#%d,"
  210. " err %lld\n", phb->hose->global_number, pe_no, rc);
  211. return;
  212. }
  213. cfg_dbg(" -> EEH check, bdfn=%04x PE%d fstate=%x\n",
  214. bdfn, pe_no, fstate);
  215. if (fstate != 0)
  216. pnv_pci_handle_eeh_config(phb, pe_no);
  217. }
  218. static int pnv_pci_read_config(struct pci_bus *bus,
  219. unsigned int devfn,
  220. int where, int size, u32 *val)
  221. {
  222. struct pci_controller *hose = pci_bus_to_host(bus);
  223. struct pnv_phb *phb = hose->private_data;
  224. u32 bdfn = (((uint64_t)bus->number) << 8) | devfn;
  225. s64 rc;
  226. if (hose == NULL)
  227. return PCIBIOS_DEVICE_NOT_FOUND;
  228. switch (size) {
  229. case 1: {
  230. u8 v8;
  231. rc = opal_pci_config_read_byte(phb->opal_id, bdfn, where, &v8);
  232. *val = (rc == OPAL_SUCCESS) ? v8 : 0xff;
  233. break;
  234. }
  235. case 2: {
  236. u16 v16;
  237. rc = opal_pci_config_read_half_word(phb->opal_id, bdfn, where,
  238. &v16);
  239. *val = (rc == OPAL_SUCCESS) ? v16 : 0xffff;
  240. break;
  241. }
  242. case 4: {
  243. u32 v32;
  244. rc = opal_pci_config_read_word(phb->opal_id, bdfn, where, &v32);
  245. *val = (rc == OPAL_SUCCESS) ? v32 : 0xffffffff;
  246. break;
  247. }
  248. default:
  249. return PCIBIOS_FUNC_NOT_SUPPORTED;
  250. }
  251. cfg_dbg("pnv_pci_read_config bus: %x devfn: %x +%x/%x -> %08x\n",
  252. bus->number, devfn, where, size, *val);
  253. /* Check if the PHB got frozen due to an error (no response) */
  254. pnv_pci_config_check_eeh(phb, bus, bdfn);
  255. return PCIBIOS_SUCCESSFUL;
  256. }
  257. static int pnv_pci_write_config(struct pci_bus *bus,
  258. unsigned int devfn,
  259. int where, int size, u32 val)
  260. {
  261. struct pci_controller *hose = pci_bus_to_host(bus);
  262. struct pnv_phb *phb = hose->private_data;
  263. u32 bdfn = (((uint64_t)bus->number) << 8) | devfn;
  264. if (hose == NULL)
  265. return PCIBIOS_DEVICE_NOT_FOUND;
  266. cfg_dbg("pnv_pci_write_config bus: %x devfn: %x +%x/%x -> %08x\n",
  267. bus->number, devfn, where, size, val);
  268. switch (size) {
  269. case 1:
  270. opal_pci_config_write_byte(phb->opal_id, bdfn, where, val);
  271. break;
  272. case 2:
  273. opal_pci_config_write_half_word(phb->opal_id, bdfn, where, val);
  274. break;
  275. case 4:
  276. opal_pci_config_write_word(phb->opal_id, bdfn, where, val);
  277. break;
  278. default:
  279. return PCIBIOS_FUNC_NOT_SUPPORTED;
  280. }
  281. /* Check if the PHB got frozen due to an error (no response) */
  282. pnv_pci_config_check_eeh(phb, bus, bdfn);
  283. return PCIBIOS_SUCCESSFUL;
  284. }
  285. struct pci_ops pnv_pci_ops = {
  286. .read = pnv_pci_read_config,
  287. .write = pnv_pci_write_config,
  288. };
  289. static int pnv_tce_build(struct iommu_table *tbl, long index, long npages,
  290. unsigned long uaddr, enum dma_data_direction direction,
  291. struct dma_attrs *attrs)
  292. {
  293. u64 proto_tce;
  294. u64 *tcep, *tces;
  295. u64 rpn;
  296. proto_tce = TCE_PCI_READ; // Read allowed
  297. if (direction != DMA_TO_DEVICE)
  298. proto_tce |= TCE_PCI_WRITE;
  299. tces = tcep = ((u64 *)tbl->it_base) + index - tbl->it_offset;
  300. rpn = __pa(uaddr) >> TCE_SHIFT;
  301. while (npages--)
  302. *(tcep++) = proto_tce | (rpn++ << TCE_RPN_SHIFT);
  303. /* Some implementations won't cache invalid TCEs and thus may not
  304. * need that flush. We'll probably turn it_type into a bit mask
  305. * of flags if that becomes the case
  306. */
  307. if (tbl->it_type & TCE_PCI_SWINV_CREATE)
  308. pnv_pci_ioda_tce_invalidate(tbl, tces, tcep - 1);
  309. return 0;
  310. }
  311. static void pnv_tce_free(struct iommu_table *tbl, long index, long npages)
  312. {
  313. u64 *tcep, *tces;
  314. tces = tcep = ((u64 *)tbl->it_base) + index - tbl->it_offset;
  315. while (npages--)
  316. *(tcep++) = 0;
  317. if (tbl->it_type & TCE_PCI_SWINV_CREATE)
  318. pnv_pci_ioda_tce_invalidate(tbl, tces, tcep - 1);
  319. }
  320. static unsigned long pnv_tce_get(struct iommu_table *tbl, long index)
  321. {
  322. return ((u64 *)tbl->it_base)[index - tbl->it_offset];
  323. }
  324. void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
  325. void *tce_mem, u64 tce_size,
  326. u64 dma_offset)
  327. {
  328. tbl->it_blocksize = 16;
  329. tbl->it_base = (unsigned long)tce_mem;
  330. tbl->it_offset = dma_offset >> IOMMU_PAGE_SHIFT;
  331. tbl->it_index = 0;
  332. tbl->it_size = tce_size >> 3;
  333. tbl->it_busno = 0;
  334. tbl->it_type = TCE_PCI;
  335. }
  336. static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose)
  337. {
  338. struct iommu_table *tbl;
  339. const __be64 *basep, *swinvp;
  340. const __be32 *sizep;
  341. basep = of_get_property(hose->dn, "linux,tce-base", NULL);
  342. sizep = of_get_property(hose->dn, "linux,tce-size", NULL);
  343. if (basep == NULL || sizep == NULL) {
  344. pr_err("PCI: %s has missing tce entries !\n",
  345. hose->dn->full_name);
  346. return NULL;
  347. }
  348. tbl = kzalloc_node(sizeof(struct iommu_table), GFP_KERNEL, hose->node);
  349. if (WARN_ON(!tbl))
  350. return NULL;
  351. pnv_pci_setup_iommu_table(tbl, __va(be64_to_cpup(basep)),
  352. be32_to_cpup(sizep), 0);
  353. iommu_init_table(tbl, hose->node);
  354. /* Deal with SW invalidated TCEs when needed (BML way) */
  355. swinvp = of_get_property(hose->dn, "linux,tce-sw-invalidate-info",
  356. NULL);
  357. if (swinvp) {
  358. tbl->it_busno = swinvp[1];
  359. tbl->it_index = (unsigned long)ioremap(swinvp[0], 8);
  360. tbl->it_type = TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE;
  361. }
  362. return tbl;
  363. }
  364. static void pnv_pci_dma_fallback_setup(struct pci_controller *hose,
  365. struct pci_dev *pdev)
  366. {
  367. struct device_node *np = pci_bus_to_OF_node(hose->bus);
  368. struct pci_dn *pdn;
  369. if (np == NULL)
  370. return;
  371. pdn = PCI_DN(np);
  372. if (!pdn->iommu_table)
  373. pdn->iommu_table = pnv_pci_setup_bml_iommu(hose);
  374. if (!pdn->iommu_table)
  375. return;
  376. set_iommu_table_base(&pdev->dev, pdn->iommu_table);
  377. }
  378. static void pnv_pci_dma_dev_setup(struct pci_dev *pdev)
  379. {
  380. struct pci_controller *hose = pci_bus_to_host(pdev->bus);
  381. struct pnv_phb *phb = hose->private_data;
  382. /* If we have no phb structure, try to setup a fallback based on
  383. * the device-tree (RTAS PCI for example)
  384. */
  385. if (phb && phb->dma_dev_setup)
  386. phb->dma_dev_setup(phb, pdev);
  387. else
  388. pnv_pci_dma_fallback_setup(hose, pdev);
  389. }
  390. /* Fixup wrong class code in p7ioc and p8 root complex */
  391. static void pnv_p7ioc_rc_quirk(struct pci_dev *dev)
  392. {
  393. dev->class = PCI_CLASS_BRIDGE_PCI << 8;
  394. }
  395. DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IBM, 0x3b9, pnv_p7ioc_rc_quirk);
  396. static int pnv_pci_probe_mode(struct pci_bus *bus)
  397. {
  398. struct pci_controller *hose = pci_bus_to_host(bus);
  399. const __be64 *tstamp;
  400. u64 now, target;
  401. /* We hijack this as a way to ensure we have waited long
  402. * enough since the reset was lifted on the PCI bus
  403. */
  404. if (bus != hose->bus)
  405. return PCI_PROBE_NORMAL;
  406. tstamp = of_get_property(hose->dn, "reset-clear-timestamp", NULL);
  407. if (!tstamp || !*tstamp)
  408. return PCI_PROBE_NORMAL;
  409. now = mftb() / tb_ticks_per_usec;
  410. target = (be64_to_cpup(tstamp) / tb_ticks_per_usec)
  411. + PCI_RESET_DELAY_US;
  412. pr_devel("pci %04d: Reset target: 0x%llx now: 0x%llx\n",
  413. hose->global_number, target, now);
  414. if (now < target)
  415. msleep((target - now + 999) / 1000);
  416. return PCI_PROBE_NORMAL;
  417. }
  418. void __init pnv_pci_init(void)
  419. {
  420. struct device_node *np;
  421. pci_add_flags(PCI_CAN_SKIP_ISA_ALIGN);
  422. /* OPAL absent, try POPAL first then RTAS detection of PHBs */
  423. if (!firmware_has_feature(FW_FEATURE_OPAL)) {
  424. #ifdef CONFIG_PPC_POWERNV_RTAS
  425. init_pci_config_tokens();
  426. find_and_init_phbs();
  427. #endif /* CONFIG_PPC_POWERNV_RTAS */
  428. }
  429. /* OPAL is here, do our normal stuff */
  430. else {
  431. int found_ioda = 0;
  432. /* Look for IODA IO-Hubs. We don't support mixing IODA
  433. * and p5ioc2 due to the need to change some global
  434. * probing flags
  435. */
  436. for_each_compatible_node(np, NULL, "ibm,ioda-hub") {
  437. pnv_pci_init_ioda_hub(np);
  438. found_ioda = 1;
  439. }
  440. /* Look for p5ioc2 IO-Hubs */
  441. if (!found_ioda)
  442. for_each_compatible_node(np, NULL, "ibm,p5ioc2")
  443. pnv_pci_init_p5ioc2_hub(np);
  444. /* Look for ioda2 built-in PHB3's */
  445. for_each_compatible_node(np, NULL, "ibm,ioda2-phb")
  446. pnv_pci_init_ioda2_phb(np);
  447. }
  448. /* Setup the linkage between OF nodes and PHBs */
  449. pci_devs_phb_init();
  450. /* Configure IOMMU DMA hooks */
  451. ppc_md.pci_dma_dev_setup = pnv_pci_dma_dev_setup;
  452. ppc_md.tce_build = pnv_tce_build;
  453. ppc_md.tce_free = pnv_tce_free;
  454. ppc_md.tce_get = pnv_tce_get;
  455. ppc_md.pci_probe_mode = pnv_pci_probe_mode;
  456. set_pci_dma_ops(&dma_iommu_ops);
  457. /* Configure MSIs */
  458. #ifdef CONFIG_PCI_MSI
  459. ppc_md.msi_check_device = pnv_msi_check_device;
  460. ppc_md.setup_msi_irqs = pnv_setup_msi_irqs;
  461. ppc_md.teardown_msi_irqs = pnv_teardown_msi_irqs;
  462. #endif
  463. }