Lines Matching defs:devfn

223 static inline bool context_copied(struct intel_iommu *iommu, u8 bus, u8 devfn)
228 return test_bit(((long)bus << 8) | devfn, iommu->copied_tables);
232 set_context_copied(struct intel_iommu *iommu, u8 bus, u8 devfn)
234 set_bit(((long)bus << 8) | devfn, iommu->copied_tables);
238 clear_context_copied(struct intel_iommu *iommu, u8 bus, u8 devfn)
240 clear_bit(((long)bus << 8) | devfn, iommu->copied_tables);
592 u8 devfn, int alloc)
602 if (!alloc && context_copied(iommu, bus, devfn))
607 if (devfn >= 0x80) {
608 devfn -= 0x80;
611 devfn *= 2;
629 return &context[devfn];
706 struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn)
746 if (bus && devfn) {
748 *devfn = drhd->devices[i].devfn;
759 if (bus && devfn) {
761 *devfn = pdev->devfn;
810 u8 bus, u8 devfn, struct dma_pte *parent, int level)
841 u8 devfn = source_id & 0xff;
861 ctx_entry = iommu_context_addr(iommu, bus, devfn, 0);
911 pgtable_walk(iommu, addr >> VTD_PAGE_SHIFT, bus, devfn, pgtable, level);
1347 struct intel_iommu *iommu, u8 bus, u8 devfn)
1355 info->devfn == devfn) {
1462 sid = info->bus << 8 | info->devfn;
1490 PCI_DEVID(info->bus, info->devfn),
1929 u8 bus, u8 devfn)
1932 domain_lookup_dev_info(domain, iommu, bus, devfn);
1942 bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
1946 context = iommu_context_addr(iommu, bus, devfn, 1);
1951 if (context_present(context) && !context_copied(iommu, bus, devfn))
1963 if (context_copied(iommu, bus, devfn)) {
1968 (((u16)bus) << 8) | devfn,
1975 clear_context_copied(iommu, bus, devfn);
2051 (((u16)bus) << 8) | devfn,
2089 u8 bus, devfn;
2091 iommu = device_to_iommu(dev, &bus, &devfn);
2099 bus, devfn);
2285 static void domain_context_clear_one(struct device_domain_info *info, u8 bus, u8 devfn)
2295 context = iommu_context_addr(iommu, bus, devfn, 0);
2315 (((u16)bus) << 8) | devfn,
2451 u8 bus, devfn;
2454 iommu = device_to_iommu(dev, &bus, &devfn);
2593 int tbl_idx, pos = 0, idx, devfn, ret = 0, did;
2602 for (devfn = 0; devfn < 256; devfn++) {
2604 idx = (ext ? devfn * 2 : devfn) % 256;
2619 if (devfn < 0x80)
2625 if (ext && devfn == 0) {
2627 devfn = 0x7f;
2657 set_context_copied(iommu, bus, devfn);
3929 domain_context_clear_one(info, info->bus, info->devfn);
4349 u8 bus, devfn;
4352 iommu = device_to_iommu(dev, &bus, &devfn);
4362 info->devfn = pdev->devfn;
4366 info->devfn = devfn;
4736 if (context_copied(iommu, info->bus, info->devfn))
5050 sid = PCI_DEVID(info->bus, info->devfn);