Message ID | 20210903083347.131786-2-andr2000@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | PCI devices passthrough on Arm, part 2 | expand |
Hi Oleksandr, On 03/09/2021 09:33, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > > Add new device type (DEV_PCI) to distinguish PCI devices from platform > DT devices, so some drivers, like IOMMU, can handle PCI devices > differently. I think it would be better to fold this change in the next patch as this is where you add all the helpers for converting dev to PCI. > > While at it fix dev_is_dt macro. I would keep this change separate. It also needs an explanation of what's the problem and mention it is a latent bug because no-one use it (so we know this doesn't require a backport). Cheers,
Hi, Julien! On 09.09.21 20:19, Julien Grall wrote: > Hi Oleksandr, > > On 03/09/2021 09:33, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> >> >> Add new device type (DEV_PCI) to distinguish PCI devices from platform >> DT devices, so some drivers, like IOMMU, can handle PCI devices >> differently. > > I think it would be better to fold this change in the next patch as this is where you add all the helpers for converting dev to PCI. Ok, I will > >> >> While at it fix dev_is_dt macro. > > I would keep this change separate. It also needs an explanation of what's the problem and mention it is a latent bug because no-one use it (so we know this doesn't require a backport). Sure, will create a dedicated patch for that > > Cheers, > Thank you, Oleksandr
diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h index 5ecd5e7bd15e..7bf040560363 100644 --- a/xen/include/asm-arm/device.h +++ b/xen/include/asm-arm/device.h @@ -4,6 +4,7 @@ enum device_type { DEV_DT, + DEV_PCI, }; struct dev_archdata { @@ -25,9 +26,8 @@ typedef struct device device_t; #include <xen/device_tree.h> -/* TODO: Correctly implement dev_is_pci when PCI is supported on ARM */ -#define dev_is_pci(dev) ((void)(dev), 0) -#define dev_is_dt(dev) ((dev->type == DEV_DT) +#define dev_is_pci(dev) ((dev)->type == DEV_PCI) +#define dev_is_dt(dev) ((dev)->type == DEV_DT) enum device_class {