On 19.07.2025 00:03, dm...@proton.me wrote: > On Thu, Jul 17, 2025 at 08:31:27AM +0100, Andrii Sultanov wrote: >> @@ -756,16 +755,16 @@ static u16 __init parse_ivhd_device_special( >> return 0; >> } >> >> - bdf = special->used_id; >> - if ( bdf >= ivrs_bdf_entries ) >> + sbdf = PCI_SBDF(seg, special->used_id); >> + if ( sbdf.bdf >= ivrs_bdf_entries ) >> { >> - AMD_IOMMU_ERROR("IVHD: invalid Device_Entry Dev_Id %#x\n", bdf); >> + AMD_IOMMU_ERROR("IVHD: invalid Device_Entry Dev_Id %#x\n", >> sbdf.bdf); > > ^^ > Suggest using %pp as a formatter (similar to modification below).
Here using %pp may be okay, albeit I'm not sure even for this one. >> @@ -335,20 +336,19 @@ void cf_check amd_iommu_ioapic_update_ire( >> new_rte.raw = rte; >> >> /* get device id of ioapic devices */ >> - bdf = ioapic_sbdf[idx].bdf; >> - seg = ioapic_sbdf[idx].seg; >> - iommu = find_iommu_for_device(PCI_SBDF(seg, bdf)); >> + sbdf = ioapic_sbdf[idx].sbdf; >> + iommu = find_iommu_for_device(sbdf); >> if ( !iommu ) >> { >> AMD_IOMMU_WARN("failed to find IOMMU for IO-APIC @ %04x:%04x\n", > > ^^ > Use %pp ? Here I'm pretty firmly against. We're talking of an IO-APIC here, not really a PCI device (and that's irrespective of AMD often(?) representing IO-APICs also as PCI devices). Jan