Re: [PATCH] media: staging: tegra-vde: Fix build error
From: Arnd Bergmann
Date: Fri Sep 20 2019 - 15:33:13 EST
On Thu, Jul 25, 2019 at 2:24 PM Dmitry Osipenko <digetx@xxxxxxxxx> wrote:
>
> 25.07.2019 5:41, YueHaibing ÐÐÑÐÑ:
> > If IOMMU_SUPPORT is not set, and COMPILE_TEST is y,
> > IOMMU_IOVA may be set to m. So building will fails:
> >
> > drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map':
> > iommu.c:(.text+0x41): undefined reference to `alloc_iova'
> > iommu.c:(.text+0x56): undefined reference to `__free_iova'
> >
> > Select IOMMU_IOVA while COMPILE_TEST is set to fix this.
> > @@ -3,7 +3,7 @@ config TEGRA_VDE
> > tristate "NVIDIA Tegra Video Decoder Engine driver"
> > depends on ARCH_TEGRA || COMPILE_TEST
> > select DMA_SHARED_BUFFER
> > - select IOMMU_IOVA if IOMMU_SUPPORT
> > + select IOMMU_IOVA if (IOMMU_SUPPORT || COMPILE_TEST)
> > select SRAM
> > help
> > Say Y here to enable support for the NVIDIA Tegra video decoder
> >
>
> This results in missing the case of compile-testing !IOMMU_IOVA for the
> driver, but probably that's not a big deal.
>
> Acked-by: Dmitry Osipenko <digetx@xxxxxxxxx>
I don't know what happened here, but the patch from YueHaibing caused this
error for me, which is very much like the problem it was meant to fix:
drivers/gpu/host1x/dev.o: In function `host1x_probe':
dev.c:(.text+0x1734): undefined reference to `put_iova_domain'
dev.c:(.text+0x1744): undefined reference to `iova_cache_put'
drivers/gpu/host1x/dev.o: In function `host1x_remove':
dev.c:(.text+0x1894): undefined reference to `put_iova_domain'
dev.c:(.text+0x1898): undefined reference to `iova_cache_put'
drivers/gpu/host1x/cdma.o: In function `host1x_cdma_init':
cdma.c:(.text+0x5d0): undefined reference to `alloc_iova'
cdma.c:(.text+0x61c): undefined reference to `__free_iova'
drivers/gpu/host1x/cdma.o: In function `host1x_cdma_deinit':
cdma.c:(.text+0x6c8): undefined reference to `free_iova'
drivers/gpu/host1x/job.o: In function `host1x_job_pin':
job.c:(.text+0x514): undefined reference to `alloc_iova'
job.c:(.text+0x528): undefined reference to `__free_iova'
drivers/gpu/host1x/job.o: In function `host1x_job_unpin':
job.c:(.text+0x5bc): undefined reference to `free_iova'
After reverthing commit 6b2265975239 ("media: staging:
tegra-vde: Fix build error"), I can no longer reproduce the
issue.
Arnd