|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v5 3/3] drivers: Make ioapic_sbdf and hpet_sbdf contain pci_sbdf_t
On 19.07.2025 00:03, dmkhn@xxxxxxxxx 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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |