soc/qbman: fix implicit header dependency now causing build fails
Subsystems (2)
PATCH 1/1 soc/qbman: fix implicit header dependency now causing build fails
In commit 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h") that header shuffle uncovered an implicit include in this driver, manifesting as:
CC drivers/soc/fsl/qbman/qman_portal.o
drivers/soc/fsl/qbman/qman_portal.c: In function 'qman_portal_probe':
drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'dma_set_mask' drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'DMA_BIT_MASK'
if (dma_set_mask(dev, DMA_BIT_MASK(40))) {
^
on the corenet32_smp_defconfig (and 64 bit respectively.) The above commit was singled out via git bisect.
The header it was implictly relying on getting was dma-mapping.h - so we explicitly add it here.
--- drivers/soc/fsl/qbman/qman_portal.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/soc/fsl/qbman/qman_portal.c +2 -0
@@ -30,6 +30,8 @@#include "qman_priv.h" +#include <linux/dma-mapping.h> +struct qman_portal *qman_dma_portal;EXPORT_SYMBOL (qman_dma_portal);
Signature · 1 line
2.11.0
Hi all,
Quoted 42 lines · On Tue, 2 May 2017 18:21:12 -0400 Paul Gortmaker…
In commit
461a6946b1f9("iommu: Removepci.hinclude fromtrace/events/iommu.h") that header shuffle uncovered an implicit include in this driver, manifesting as:CC
drivers/soc/fsl/qbman/qman_portal.o
drivers/soc/fsl/qbman/qman_portal.c: In function 'qman_portal_probe':
drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'dma_set_mask'drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'DMA_BIT_MASK'
if (dma_set_mask(dev, DMA_BIT_MASK(40))) {
^on the
corenet32_smp_defconfig(and 64 bit respectively.) The above commit was singled out via git bisect.The header it was implictly relying on getting was
dma-mapping.h- so we explicitly add it here.Fixes 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h")Cc Joerg Roedel <[email protected]>Cc Scott Wood <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- drivers/soc/fsl/qbman/qman_portal.c | 2 ++ 1 file changed, 2 insertions(+)drivers/soc/fsl/qbman/qman_portal.c +2
-0@@ -30,6 +30,8 @@#include "qman_priv.h" +#include <linux/dma-mapping.h> +struct qman_portal *qman_dma_portal;EXPORT_SYMBOL (qman_dma_portal);Signature · 1 line
2.11.0
Thanks, Paul, I was just getting around to looking into that build failure. I will add this to linux-next as a merge fix patch for the merge of the iommu tree until Joerg gets around to including it in his tree.
Signature · 2 lines
Cheers, Stephen Rothwell
Joerg Roedel
AppliedHi Paul,
Quoted 14 lines · Paul Gortmaker
In commit
461a6946b1f9("iommu: Removepci.hinclude fromtrace/events/iommu.h") that header shuffle uncovered an implicit include in this driver, manifesting as:CC
drivers/soc/fsl/qbman/qman_portal.o
drivers/soc/fsl/qbman/qman_portal.c: In function 'qman_portal_probe':
drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'dma_set_mask'drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'DMA_BIT_MASK'
if (dma_set_mask(dev, DMA_BIT_MASK(40))) {
^on the
corenet32_smp_defconfig(and 64 bit respectively.) The above commit was singled out via git bisect.
Quoted 8 lines
The header it was implictly relying on getting was
dma-mapping.h- so we explicitly add it here.Fixes 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h")Cc Joerg Roedel <[email protected]>Cc Scott Wood <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Thanks for catching that, I though I found all breakages caused by removing this include. Obviously this wasn't true :)
I applied the fix to the iommu/core branch.
Joerg
Hi Joerg,
Quoted 25 lines · On Wed, 3 May 2017 10:42:40 +0200 Joerg Roedel <[email protected]> wrote:
Quoted 14 lines · Paul Gortmaker
In commit
461a6946b1f9("iommu: Removepci.hinclude fromtrace/events/iommu.h") that header shuffle uncovered an implicit include in this driver, manifesting as:CC
drivers/soc/fsl/qbman/qman_portal.o
drivers/soc/fsl/qbman/qman_portal.c: In function 'qman_portal_probe':
drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'dma_set_mask'drivers/soc/fsl/qbman/qman_portal.c:299:2: error: implicit declaration of function 'DMA_BIT_MASK'
if (dma_set_mask(dev, DMA_BIT_MASK(40))) {
^on the
corenet32_smp_defconfig(and 64 bit respectively.) The above commit was singled out via git bisect.Quoted 8 lines
The header it was implictly relying on getting was
dma-mapping.h- so we explicitly add it here.Fixes 461a6946b1f9 ("iommu: Remove pci.h include from trace/events/iommu.h")Cc Joerg Roedel <[email protected]>Cc Scott Wood <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Quoted 4 lines
Thanks for catching that, I though I found all breakages caused by removing this include. Obviously this wasn't true :)
I applied the fix to the iommu/core branch.
Thanks.
It looks like there is at least one more:
drivers/soc/fsl/qbman/qman.c: In function 'qman_init_fq':drivers/soc/fsl/qbman/qman.c:1787:4: error: implicit declaration of function 'dma_map_single' [-Werror=implicit-function-declaration] drivers/soc/fsl/qbman/qman.c:1788:21: error: 'DMA_TO_DEVICE' undeclared (first use in this function) drivers/soc/fsl/qbman/qman.c:1789:4: error: implicit declaration of function 'dma_mapping_error' [-Werror=implicit-function-declaration]
This is from a powerpc orenet64_smp_defconfig build of today's linux-next.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Stephen,
Quoted 9 lines · Stephen Rothwell
It looks like there is at least one more:
drivers/soc/fsl/qbman/qman.c: In function 'qman_init_fq':drivers/soc/fsl/qbman/qman.c:1787:4: error: implicit declaration of function 'dma_map_single' [-Werror=implicit-function-declaration]drivers/soc/fsl/qbman/qman.c:1788:21: error: 'DMA_TO_DEVICE' undeclared (first use in this function)drivers/soc/fsl/qbman/qman.c:1789:4: error: implicit declaration of function 'dma_mapping_error' [-Werror=implicit-function-declaration]This is from a powerpc
orenet64_smp_defconfigbuild of today's linux-next.
Thanks, I'll fix that up too later today. Please let me know if you find more of that in your compile-testing.
Joerg