|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 09/13] pci: switch pci_conf_read32 to use pci_sbdf_t
>>> On 07.06.19 at 11:22, <roger.pau@xxxxxxxxxx> wrote:
> @@ -817,7 +811,7 @@ static u64 read_pci_mem_bar(u16 seg, u8 bus, u8 slot, u8
> func, u8 bir, int vf)
> if ( ++bir >= limit )
> return 0;
> return addr + disp +
> - ((u64)pci_conf_read32(seg, bus, slot, func,
> + ((u64)pci_conf_read32(PCI_SBDF(seg, bus, slot, func),
> base + bir * 4) << 32);
Not taking the opportunity to switch to uint64_t here, like you do
elsewhere?
> @@ -750,7 +747,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
> for ( i = 0; i < PCI_SRIOV_NUM_BARS; )
> {
> unsigned int idx = pos + PCI_SRIOV_BAR + i * 4;
> - u32 bar = pci_conf_read32(seg, bus, slot, func, idx);
> + u32 bar = pci_conf_read32(pdev->sbdf, idx);
Similarly here.
> --- a/xen/drivers/passthrough/vtd/quirks.c
> +++ b/xen/drivers/passthrough/vtd/quirks.c
> @@ -128,9 +128,11 @@ static void __init map_igd_reg(void)
> if ( igd_reg_va )
> return;
>
> - igd_mmio = pci_conf_read32(0, 0, IGD_DEV, 0, PCI_BASE_ADDRESS_1);
> + igd_mmio = pci_conf_read32(PCI_SBDF(0, 0, IGD_DEV, 0),
Afaict at this point all uses of IGD_DEV are in constructs like this one.
As previously say, I think IGD_DEV itself would now better become an
invocation of PCI_SBDF(). Same for IOH_DEV then.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |