Lines Matching full:devid

106 	u16 devid;  member
124 u16 devid; member
144 u16 devid; member
296 PCI_BUS_NUM(iommu->devid), PCI_SLOT(iommu->devid), in get_global_efr()
297 PCI_FUNC(iommu->devid)); in get_global_efr()
581 if (dev->devid > last_devid) in find_last_devid_from_ivhd()
582 last_devid = dev->devid; in find_last_devid_from_ivhd()
997 u16 devid, u8 bit) in __set_dev_entry_bit() argument
1002 dev_table[devid].data[i] |= (1UL << _bit); in __set_dev_entry_bit()
1005 static void set_dev_entry_bit(struct amd_iommu *iommu, u16 devid, u8 bit) in set_dev_entry_bit() argument
1009 return __set_dev_entry_bit(dev_table, devid, bit); in set_dev_entry_bit()
1013 u16 devid, u8 bit) in __get_dev_entry_bit() argument
1018 return (dev_table[devid].data[i] & (1UL << _bit)) >> _bit; in __get_dev_entry_bit()
1021 static int get_dev_entry_bit(struct amd_iommu *iommu, u16 devid, u8 bit) in get_dev_entry_bit() argument
1025 return __get_dev_entry_bit(dev_table, devid, bit); in get_dev_entry_bit()
1033 u32 lo, hi, devid, old_devtb_size; in __copy_device_table() local
1077 for (devid = 0; devid <= pci_seg->last_bdf; ++devid) { in __copy_device_table()
1078 pci_seg->old_dev_tbl_cpy[devid] = old_devtb[devid]; in __copy_device_table()
1079 dom_id = old_devtb[devid].data[1] & DEV_DOMID_MASK; in __copy_device_table()
1080 dte_v = old_devtb[devid].data[0] & DTE_FLAG_V; in __copy_device_table()
1083 pci_seg->old_dev_tbl_cpy[devid].data[0] = old_devtb[devid].data[0]; in __copy_device_table()
1084 pci_seg->old_dev_tbl_cpy[devid].data[1] = old_devtb[devid].data[1]; in __copy_device_table()
1087 if (old_devtb[devid].data[0] & DTE_FLAG_GV) { in __copy_device_table()
1090 pci_seg->old_dev_tbl_cpy[devid].data[1] &= ~tmp; in __copy_device_table()
1093 pci_seg->old_dev_tbl_cpy[devid].data[0] &= ~tmp; in __copy_device_table()
1097 irq_v = old_devtb[devid].data[2] & DTE_IRQ_REMAP_ENABLE; in __copy_device_table()
1098 int_ctl = old_devtb[devid].data[2] & DTE_IRQ_REMAP_INTCTL_MASK; in __copy_device_table()
1099 int_tab_len = old_devtb[devid].data[2] & DTE_INTTABLEN_MASK; in __copy_device_table()
1103 pr_err("Wrong old irq remapping flag: %#x\n", devid); in __copy_device_table()
1108 pci_seg->old_dev_tbl_cpy[devid].data[2] = old_devtb[devid].data[2]; in __copy_device_table()
1143 void amd_iommu_apply_erratum_63(struct amd_iommu *iommu, u16 devid) in amd_iommu_apply_erratum_63() argument
1147 sysmgt = get_dev_entry_bit(iommu, devid, DEV_ENTRY_SYSMGT1) | in amd_iommu_apply_erratum_63()
1148 (get_dev_entry_bit(iommu, devid, DEV_ENTRY_SYSMGT2) << 1); in amd_iommu_apply_erratum_63()
1151 set_dev_entry_bit(iommu, devid, DEV_ENTRY_IW); in amd_iommu_apply_erratum_63()
1159 u16 devid, u32 flags, u32 ext_flags) in set_dev_entry_from_acpi() argument
1162 set_dev_entry_bit(iommu, devid, DEV_ENTRY_INIT_PASS); in set_dev_entry_from_acpi()
1164 set_dev_entry_bit(iommu, devid, DEV_ENTRY_EINT_PASS); in set_dev_entry_from_acpi()
1166 set_dev_entry_bit(iommu, devid, DEV_ENTRY_NMI_PASS); in set_dev_entry_from_acpi()
1168 set_dev_entry_bit(iommu, devid, DEV_ENTRY_SYSMGT1); in set_dev_entry_from_acpi()
1170 set_dev_entry_bit(iommu, devid, DEV_ENTRY_SYSMGT2); in set_dev_entry_from_acpi()
1172 set_dev_entry_bit(iommu, devid, DEV_ENTRY_LINT0_PASS); in set_dev_entry_from_acpi()
1174 set_dev_entry_bit(iommu, devid, DEV_ENTRY_LINT1_PASS); in set_dev_entry_from_acpi()
1176 amd_iommu_apply_erratum_63(iommu, devid); in set_dev_entry_from_acpi()
1178 amd_iommu_set_rlookup_table(iommu, devid); in set_dev_entry_from_acpi()
1181 int __init add_special_device(u8 type, u8 id, u32 *devid, bool cmd_line) in add_special_device() argument
1200 *devid = entry->devid; in add_special_device()
1210 entry->devid = *devid; in add_special_device()
1218 static int __init add_acpi_hid_device(u8 *hid, u8 *uid, u32 *devid, in add_acpi_hid_device() argument
1232 *devid = entry->devid; in add_acpi_hid_device()
1242 entry->devid = *devid; in add_acpi_hid_device()
1244 entry->root_devid = (entry->devid & (~0x7)); in add_acpi_hid_device()
1261 &early_ioapic_map[i].devid, in add_early_maps()
1270 &early_hpet_map[i].devid, in add_early_maps()
1279 &early_acpihid_map[i].devid, in add_early_maps()
1297 u16 devid = 0, devid_start = 0, devid_to = 0, seg_id; in init_iommu_from_acpi() local
1345 DUMP_printk(" DEV_SELECT\t\t\t devid: %04x:%02x:%02x.%x " in init_iommu_from_acpi()
1347 seg_id, PCI_BUS_NUM(e->devid), in init_iommu_from_acpi()
1348 PCI_SLOT(e->devid), in init_iommu_from_acpi()
1349 PCI_FUNC(e->devid), in init_iommu_from_acpi()
1352 devid = e->devid; in init_iommu_from_acpi()
1353 set_dev_entry_from_acpi(iommu, devid, e->flags, 0); in init_iommu_from_acpi()
1358 "devid: %04x:%02x:%02x.%x flags: %02x\n", in init_iommu_from_acpi()
1359 seg_id, PCI_BUS_NUM(e->devid), in init_iommu_from_acpi()
1360 PCI_SLOT(e->devid), in init_iommu_from_acpi()
1361 PCI_FUNC(e->devid), in init_iommu_from_acpi()
1364 devid_start = e->devid; in init_iommu_from_acpi()
1371 DUMP_printk(" DEV_ALIAS\t\t\t devid: %04x:%02x:%02x.%x " in init_iommu_from_acpi()
1373 seg_id, PCI_BUS_NUM(e->devid), in init_iommu_from_acpi()
1374 PCI_SLOT(e->devid), in init_iommu_from_acpi()
1375 PCI_FUNC(e->devid), in init_iommu_from_acpi()
1381 devid = e->devid; in init_iommu_from_acpi()
1383 set_dev_entry_from_acpi(iommu, devid , e->flags, 0); in init_iommu_from_acpi()
1385 pci_seg->alias_table[devid] = devid_to; in init_iommu_from_acpi()
1390 "devid: %04x:%02x:%02x.%x flags: %02x " in init_iommu_from_acpi()
1392 seg_id, PCI_BUS_NUM(e->devid), in init_iommu_from_acpi()
1393 PCI_SLOT(e->devid), in init_iommu_from_acpi()
1394 PCI_FUNC(e->devid), in init_iommu_from_acpi()
1400 devid_start = e->devid; in init_iommu_from_acpi()
1408 DUMP_printk(" DEV_EXT_SELECT\t\t devid: %04x:%02x:%02x.%x " in init_iommu_from_acpi()
1410 seg_id, PCI_BUS_NUM(e->devid), in init_iommu_from_acpi()
1411 PCI_SLOT(e->devid), in init_iommu_from_acpi()
1412 PCI_FUNC(e->devid), in init_iommu_from_acpi()
1415 devid = e->devid; in init_iommu_from_acpi()
1416 set_dev_entry_from_acpi(iommu, devid, e->flags, in init_iommu_from_acpi()
1421 DUMP_printk(" DEV_EXT_SELECT_RANGE\t devid: " in init_iommu_from_acpi()
1423 seg_id, PCI_BUS_NUM(e->devid), in init_iommu_from_acpi()
1424 PCI_SLOT(e->devid), in init_iommu_from_acpi()
1425 PCI_FUNC(e->devid), in init_iommu_from_acpi()
1428 devid_start = e->devid; in init_iommu_from_acpi()
1435 DUMP_printk(" DEV_RANGE_END\t\t devid: %04x:%02x:%02x.%x\n", in init_iommu_from_acpi()
1436 seg_id, PCI_BUS_NUM(e->devid), in init_iommu_from_acpi()
1437 PCI_SLOT(e->devid), in init_iommu_from_acpi()
1438 PCI_FUNC(e->devid)); in init_iommu_from_acpi()
1440 devid = e->devid; in init_iommu_from_acpi()
1441 for (dev_i = devid_start; dev_i <= devid; ++dev_i) { in init_iommu_from_acpi()
1454 u32 devid; in init_iommu_from_acpi() local
1458 devid = PCI_SEG_DEVID_TO_SBDF(seg_id, (e->ext >> 8)); in init_iommu_from_acpi()
1470 seg_id, PCI_BUS_NUM(devid), in init_iommu_from_acpi()
1471 PCI_SLOT(devid), in init_iommu_from_acpi()
1472 PCI_FUNC(devid)); in init_iommu_from_acpi()
1474 ret = add_special_device(type, handle, &devid, false); in init_iommu_from_acpi()
1479 * add_special_device might update the devid in case a in init_iommu_from_acpi()
1483 set_dev_entry_from_acpi(iommu, devid, e->flags, 0); in init_iommu_from_acpi()
1488 u32 devid; in init_iommu_from_acpi() local
1531 devid = PCI_SEG_DEVID_TO_SBDF(seg_id, e->devid); in init_iommu_from_acpi()
1534 PCI_BUS_NUM(devid), in init_iommu_from_acpi()
1535 PCI_SLOT(devid), in init_iommu_from_acpi()
1536 PCI_FUNC(devid)); in init_iommu_from_acpi()
1540 ret = add_acpi_hid_device(hid, uid, &devid, false); in init_iommu_from_acpi()
1545 * add_special_device might update the devid in case a in init_iommu_from_acpi()
1549 set_dev_entry_from_acpi(iommu, devid, e->flags, 0); in init_iommu_from_acpi()
1753 iommu->devid = h->devid; in init_iommu_one()
1847 iommu->pci_seg->rlookup_table[iommu->devid] = NULL; in init_iommu_one_late()
1864 u16 devid = ivhd->devid; in get_highest_supported_ivhd_type() local
1870 if (ivhd->devid == devid) in get_highest_supported_ivhd_type()
1899 h->pci_seg, PCI_BUS_NUM(h->devid), in init_iommu_all()
1900 PCI_SLOT(h->devid), PCI_FUNC(h->devid), in init_iommu_all()
2024 PCI_BUS_NUM(iommu->devid), in iommu_init_pci()
2025 iommu->devid & 0xff); in iommu_init_pci()
2517 e->devid_start = e->devid_end = m->devid; in init_unity_map_range()
2526 e->devid_start = m->devid; in init_unity_map_range()
2583 u32 devid; in init_device_table_dma() local
2589 for (devid = 0; devid <= pci_seg->last_bdf; ++devid) { in init_device_table_dma()
2590 __set_dev_entry_bit(dev_table, devid, DEV_ENTRY_VALID); in init_device_table_dma()
2592 __set_dev_entry_bit(dev_table, devid, DEV_ENTRY_TRANSLATION); in init_device_table_dma()
2598 u32 devid; in uninit_device_table_dma() local
2604 for (devid = 0; devid <= pci_seg->last_bdf; ++devid) { in uninit_device_table_dma()
2605 dev_table[devid].data[0] = 0ULL; in uninit_device_table_dma()
2606 dev_table[devid].data[1] = 0ULL; in uninit_device_table_dma()
2613 u32 devid; in init_device_table() local
2619 for (devid = 0; devid <= pci_seg->last_bdf; ++devid) in init_device_table()
2621 devid, DEV_ENTRY_IRQ_TBL_EN); in init_device_table()
2734 iommu->index, iommu->devid, in iommu_enable_irtcachedis()
2964 int devid, id = mpc_ioapic_id(idx); in check_ioapic_information() local
2966 devid = get_ioapic_devid(id); in check_ioapic_information()
2967 if (devid < 0) { in check_ioapic_information()
2971 } else if (devid == IOAPIC_SB_DEVID) { in check_ioapic_information()
3519 u32 devid; in parse_ivrs_ioapic() local
3542 devid = IVRS_GET_SBDF_ID(seg, bus, dev, fn); in parse_ivrs_ioapic()
3547 early_ioapic_map[i].devid = devid; in parse_ivrs_ioapic()
3557 u32 devid; in parse_ivrs_hpet() local
3580 devid = IVRS_GET_SBDF_ID(seg, bus, dev, fn); in parse_ivrs_hpet()
3585 early_hpet_map[i].devid = devid; in parse_ivrs_hpet()
3657 early_acpihid_map[i].devid = IVRS_GET_SBDF_ID(seg, bus, dev, fn); in parse_ivrs_acpihid()