[PATCH 1/3] iommu: fix compilation when CONFIG_PCI disabled
Tom Rini
trini at konsulko.com
Mon Dec 11 20:17:26 CET 2023
On Mon, Dec 11, 2023 at 08:08:32PM +0100, Dragan Simic wrote:
> On 2023-12-11 19:41, Caleb Connolly wrote:
> > The dev_pci_iommu_enable() function is only available when CONFIG_PCI is
> > enabled, replace the runtime check with a preprocessor one to fix
> > compilation with pci disabled.
> >
> > Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
> > ---
> > drivers/iommu/iommu-uclass.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/iommu/iommu-uclass.c b/drivers/iommu/iommu-uclass.c
> > index 72f123df55a5..98731d5e2c44 100644
> > --- a/drivers/iommu/iommu-uclass.c
> > +++ b/drivers/iommu/iommu-uclass.c
> > @@ -100,9 +100,10 @@ int dev_iommu_enable(struct udevice *dev)
> > dev->iommu = dev_iommu;
> > }
> >
> > - if (CONFIG_IS_ENABLED(PCI) && count < 0 &&
> > - device_is_on_pci_bus(dev))
> > +#if CONFIG_IS_ENABLED(PCI)
> > + if (count < 0 && device_is_on_pci_bus(dev))
> > return dev_pci_iommu_enable(dev);
> > +#endif
> >
> > return 0;
> > }
>
> Perhaps there's no need to introduce an ifdef here.
Yes, how exactly are you getting a build failure? dev_pci_iommu_enable
should be available and return false with CONFIG_PCI=n.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231211/2ae8ef95/attachment.sig>
More information about the U-Boot
mailing list