* Register a MSI/MSI-X interrupt controller */
| 1304 | * Register a MSI/MSI-X interrupt controller |
| 1305 | */ |
| 1306 | int |
| 1307 | intr_msi_register(device_t dev, intptr_t xref) |
| 1308 | { |
| 1309 | struct intr_pic *pic; |
| 1310 | |
| 1311 | if (dev == NULL) |
| 1312 | return (EINVAL); |
| 1313 | pic = pic_create(dev, xref, FLAG_MSI); |
| 1314 | if (pic == NULL) |
| 1315 | return (ENOMEM); |
| 1316 | |
| 1317 | debugf("PIC %p registered for %s <dev %p, xref %jx>\n", pic, |
| 1318 | device_get_nameunit(dev), dev, (uintmax_t)xref); |
| 1319 | return (0); |
| 1320 | } |
| 1321 | |
| 1322 | int |
| 1323 | intr_alloc_msi(device_t pci, device_t child, intptr_t xref, int count, |
no test coverage detected