* Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
@ 2019-08-19 18:37 Stefan Wahren
2019-08-19 19:02 ` Robin Murphy
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Wahren @ 2019-08-19 18:37 UTC (permalink / raw)
To: Christoph Hellwig, Marek Szyprowski, Robin Murphy; +Cc: iommu, linux-arm-kernel
Hi,
i tried to cross compile arm/multi_v7_defconfig with CONFIG_XEN=y with
Linux 5.3-rc5 and i'm getting this:
arch/arm/mm/dma-mapping.c: In function ‘arch_setup_dma_ops’:
arch/arm/mm/dma-mapping.c:2347:5: error: ‘struct device’ has no member
named ‘dma_coherent’
dev->dma_coherent = coherent;
^~
arch/arm/mm/dma-mapping.c: At top level:
arch/arm/mm/dma-mapping.c:2385:6: error: redefinition of
‘arch_sync_dma_for_device’
void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm/mm/dma-mapping.c:18:0:
./include/linux/dma-noncoherent.h:67:20: note: previous definition of
‘arch_sync_dma_for_device’ was here
static inline void arch_sync_dma_for_device(struct device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mm/dma-mapping.c:2392:6: error: redefinition of
‘arch_sync_dma_for_cpu’
void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
^~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm/mm/dma-mapping.c:18:0:
./include/linux/dma-noncoherent.h:77:20: note: previous definition of
‘arch_sync_dma_for_cpu’ was here
static inline void arch_sync_dma_for_cpu(struct device *dev,
^~~~~~~~~~~~~~~~~~~~~
In file included from ./arch/arm/include/asm/page.h:149:0,
from ./arch/arm/include/asm/thread_info.h:14,
from ./include/linux/thread_info.h:38,
from ./include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from ./include/linux/preempt.h:78,
from ./include/linux/spinlock.h:51,
from ./include/linux/seqlock.h:36,
from ./include/linux/time.h:6,
from ./include/linux/stat.h:19,
from ./include/linux/module.h:10,
from arch/arm/mm/dma-mapping.c:9:
There is no build issue with Linux 5.2, so this must be introduced with
5.3-rc. I hope you have a clue without bisecting this.
Regards
Stefan
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
2019-08-19 18:37 Build regression in Linux 5.3-rc5 with CONFIG_XEN=y Stefan Wahren
@ 2019-08-19 19:02 ` Robin Murphy
2019-08-19 19:12 ` Stefan Wahren
0 siblings, 1 reply; 8+ messages in thread
From: Robin Murphy @ 2019-08-19 19:02 UTC (permalink / raw)
To: Stefan Wahren, Christoph Hellwig, Marek Szyprowski
Cc: iommu, linux-arm-kernel
On 19/08/2019 19:37, Stefan Wahren wrote:
> Hi,
>
> i tried to cross compile arm/multi_v7_defconfig with CONFIG_XEN=y with
> Linux 5.3-rc5 and i'm getting this:
>
> arch/arm/mm/dma-mapping.c: In function ‘arch_setup_dma_ops’:
> arch/arm/mm/dma-mapping.c:2347:5: error: ‘struct device’ has no member
> named ‘dma_coherent’
> dev->dma_coherent = coherent;
> ^~
> arch/arm/mm/dma-mapping.c: At top level:
> arch/arm/mm/dma-mapping.c:2385:6: error: redefinition of
> ‘arch_sync_dma_for_device’
> void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr,
> ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from arch/arm/mm/dma-mapping.c:18:0:
> ./include/linux/dma-noncoherent.h:67:20: note: previous definition of
> ‘arch_sync_dma_for_device’ was here
> static inline void arch_sync_dma_for_device(struct device *dev,
> ^~~~~~~~~~~~~~~~~~~~~~~~
> arch/arm/mm/dma-mapping.c:2392:6: error: redefinition of
> ‘arch_sync_dma_for_cpu’
> void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
> ^~~~~~~~~~~~~~~~~~~~~
> In file included from arch/arm/mm/dma-mapping.c:18:0:
> ./include/linux/dma-noncoherent.h:77:20: note: previous definition of
> ‘arch_sync_dma_for_cpu’ was here
> static inline void arch_sync_dma_for_cpu(struct device *dev,
> ^~~~~~~~~~~~~~~~~~~~~
> In file included from ./arch/arm/include/asm/page.h:149:0,
> from ./arch/arm/include/asm/thread_info.h:14,
> from ./include/linux/thread_info.h:38,
> from ./include/asm-generic/preempt.h:5,
> from ./arch/arm/include/generated/asm/preempt.h:1,
> from ./include/linux/preempt.h:78,
> from ./include/linux/spinlock.h:51,
> from ./include/linux/seqlock.h:36,
> from ./include/linux/time.h:6,
> from ./include/linux/stat.h:19,
> from ./include/linux/module.h:10,
> from arch/arm/mm/dma-mapping.c:9:
>
> There is no build issue with Linux 5.2, so this must be introduced with
> 5.3-rc. I hope you have a clue without bisecting this.
Oh, that must be ad3c7b18c5b, since the dma-noncoherent stuff is only
selected by CONFIG_ARM_LPAE, but the references to it are guarded by
CONFIG_SWIOTLB, and CONFIG_XEN brings in the latter without the former.
Robin.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
2019-08-19 19:02 ` Robin Murphy
@ 2019-08-19 19:12 ` Stefan Wahren
2019-08-20 1:24 ` Christoph Hellwig
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Wahren @ 2019-08-19 19:12 UTC (permalink / raw)
To: Robin Murphy, Christoph Hellwig, Marek Szyprowski; +Cc: iommu, linux-arm-kernel
Am 19.08.19 um 21:02 schrieb Robin Murphy:
> On 19/08/2019 19:37, Stefan Wahren wrote:
>> Hi,
>>
>> i tried to cross compile arm/multi_v7_defconfig with CONFIG_XEN=y with
>> Linux 5.3-rc5 and i'm getting this:
>>
>> arch/arm/mm/dma-mapping.c: In function ‘arch_setup_dma_ops’:
>> arch/arm/mm/dma-mapping.c:2347:5: error: ‘struct device’ has no member
>> named ‘dma_coherent’
>> dev->dma_coherent = coherent;
>> ^~
>> arch/arm/mm/dma-mapping.c: At top level:
>> arch/arm/mm/dma-mapping.c:2385:6: error: redefinition of
>> ‘arch_sync_dma_for_device’
>> void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr,
>> ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from arch/arm/mm/dma-mapping.c:18:0:
>> ./include/linux/dma-noncoherent.h:67:20: note: previous definition of
>> ‘arch_sync_dma_for_device’ was here
>> static inline void arch_sync_dma_for_device(struct device *dev,
>> ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/mm/dma-mapping.c:2392:6: error: redefinition of
>> ‘arch_sync_dma_for_cpu’
>> void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
>> ^~~~~~~~~~~~~~~~~~~~~
>> In file included from arch/arm/mm/dma-mapping.c:18:0:
>> ./include/linux/dma-noncoherent.h:77:20: note: previous definition of
>> ‘arch_sync_dma_for_cpu’ was here
>> static inline void arch_sync_dma_for_cpu(struct device *dev,
>> ^~~~~~~~~~~~~~~~~~~~~
>> In file included from ./arch/arm/include/asm/page.h:149:0,
>> from ./arch/arm/include/asm/thread_info.h:14,
>> from ./include/linux/thread_info.h:38,
>> from ./include/asm-generic/preempt.h:5,
>> from ./arch/arm/include/generated/asm/preempt.h:1,
>> from ./include/linux/preempt.h:78,
>> from ./include/linux/spinlock.h:51,
>> from ./include/linux/seqlock.h:36,
>> from ./include/linux/time.h:6,
>> from ./include/linux/stat.h:19,
>> from ./include/linux/module.h:10,
>> from arch/arm/mm/dma-mapping.c:9:
>>
>> There is no build issue with Linux 5.2, so this must be introduced with
>> 5.3-rc. I hope you have a clue without bisecting this.
>
> Oh, that must be ad3c7b18c5b, since the dma-noncoherent stuff is only
> selected by CONFIG_ARM_LPAE, but the references to it are guarded by
> CONFIG_SWIOTLB, and CONFIG_XEN brings in the latter without the former.
Yes, reverting ad3c7b18c5b ("arm: use swiotlb for bounce buffering on
LPAE configs") avoid this build issue.
>
> Robin.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
2019-08-19 19:12 ` Stefan Wahren
@ 2019-08-20 1:24 ` Christoph Hellwig
2019-08-20 5:43 ` Stefan Wahren
2019-08-21 5:56 ` Stefan Wahren
0 siblings, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2019-08-20 1:24 UTC (permalink / raw)
To: Stefan Wahren; +Cc: iommu, Robin Murphy, Christoph Hellwig, linux-arm-kernel
Hi Stefan,
please try the patch below.
---
From e0570628d96faa50ebfc94ce8e545968336db225 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Tue, 20 Aug 2019 10:08:38 +0900
Subject: arm: select the dma-noncoherent symbols for all swiotlb builds
We need to provide the arch hooks for non-coherent dma-direct
and swiotlb for all swiotlb builds, not just when LPAS is enabled.
Without that the Xen build that selects SWIOTLB indirectly through
SWIOTLB_XEN fails to build.
Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs")
Reported-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/arm/Kconfig | 4 ++++
arch/arm/mm/Kconfig | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 33b00579beff..24360211534a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -7,6 +7,8 @@ config ARM
select ARCH_HAS_BINFMT_FLAT
select ARCH_HAS_DEBUG_VIRTUAL if MMU
select ARCH_HAS_DEVMEM_IS_ALLOWED
+ select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB
+ select ARCH_HAS_DMA_MMAP_PGPROT if SWIOTLB
select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_KEEPINITRD
@@ -18,6 +20,8 @@ config ARM
select ARCH_HAS_SET_MEMORY
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
select ARCH_HAS_STRICT_MODULE_RWX if MMU
+ select ARCH_HAS_SYNC_DMA_FOR_DEVICE if SWIOTLB
+ select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB
select ARCH_HAS_TEARDOWN_DMA_OPS if MMU
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_HAVE_CUSTOM_GPIO_H
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index c54cd7ed90ba..c1222c0e9fd3 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -664,10 +664,6 @@ config ARM_LPAE
!CPU_32v4 && !CPU_32v3
select PHYS_ADDR_T_64BIT
select SWIOTLB
- select ARCH_HAS_DMA_COHERENT_TO_PFN
- select ARCH_HAS_DMA_MMAP_PGPROT
- select ARCH_HAS_SYNC_DMA_FOR_DEVICE
- select ARCH_HAS_SYNC_DMA_FOR_CPU
help
Say Y if you have an ARMv7 processor supporting the LPAE page
table format and you would like to access memory beyond the
--
2.20.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
2019-08-20 1:24 ` Christoph Hellwig
@ 2019-08-20 5:43 ` Stefan Wahren
2019-08-20 5:46 ` Christoph Hellwig
2019-08-21 5:55 ` Stefan Wahren
2019-08-21 5:56 ` Stefan Wahren
1 sibling, 2 replies; 8+ messages in thread
From: Stefan Wahren @ 2019-08-20 5:43 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Avaneesh Kumar Dwivedi, Bjorn Andersson, iommu, Ian Jackson,
Stephen Boyd, Robin Murphy, linux-arm-kernel
Hi Christoph,
Am 20.08.19 um 03:24 schrieb Christoph Hellwig:
> Hi Stefan,
>
> please try the patch below.
>
> ---
> From e0570628d96faa50ebfc94ce8e545968336db225 Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> Date: Tue, 20 Aug 2019 10:08:38 +0900
> Subject: arm: select the dma-noncoherent symbols for all swiotlb builds
>
> We need to provide the arch hooks for non-coherent dma-direct
> and swiotlb for all swiotlb builds, not just when LPAS is enabled.
s/LPAS/LPAE/
> Without that the Xen build that selects SWIOTLB indirectly through
> SWIOTLB_XEN fails to build.
>
> Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs")
> Reported-by: Stefan Wahren <wahrenst@gmx.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
i applied this patch and it fixes the build issue i reported before. But
this seems to reveal another build issue in drivers/firmware/qcom_scm.c:
drivers/firmware/qcom_scm.c: In function ‘qcom_scm_assign_mem’:
drivers/firmware/qcom_scm.c:460:47: error: passing argument 3 of
‘dma_alloc_coherent’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_phys, GFP_KERNEL);
^
In file included from drivers/firmware/qcom_scm.c:12:0:
./include/linux/dma-mapping.h:636:21: note: expected ‘dma_addr_t * {aka
long long unsigned int *}’ but argument is of type ‘phys_addr_t * {aka
unsigned int *}’
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:280: die Regel für Ziel
„drivers/firmware/qcom_scm.o“ scheiterte
Luckily there is already a patch to fix this in linux-next:
firmware: qcom_scm: Use proper types for dma mappings
It seems that it misses the fixes tag.
Regards
Stefan
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
2019-08-20 5:43 ` Stefan Wahren
@ 2019-08-20 5:46 ` Christoph Hellwig
2019-08-21 5:55 ` Stefan Wahren
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2019-08-20 5:46 UTC (permalink / raw)
To: Stefan Wahren
Cc: Avaneesh Kumar Dwivedi, Bjorn Andersson, iommu, Ian Jackson,
Stephen Boyd, Robin Murphy, Christoph Hellwig, linux-arm-kernel
On Tue, Aug 20, 2019 at 07:43:52AM +0200, Stefan Wahren wrote:
> i applied this patch and it fixes the build issue i reported before. But
> this seems to reveal another build issue in drivers/firmware/qcom_scm.c:
Yes, I rean into this as well until I disabled the qcom platform. But
this is in no way related to the swiotlb changes.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
2019-08-20 5:43 ` Stefan Wahren
2019-08-20 5:46 ` Christoph Hellwig
@ 2019-08-21 5:55 ` Stefan Wahren
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2019-08-21 5:55 UTC (permalink / raw)
To: Stefan Wahren, Bjorn Andersson, Stephen Boyd
Cc: Avaneesh Kumar Dwivedi, iommu, Ian Jackson, Robin Murphy,
Christoph Hellwig, linux-arm-kernel
Hi Bjorn,
hi Stephen,
Am 20.08.19 um 07:43 schrieb Stefan Wahren:
> Hi Christoph,
>
> Am 20.08.19 um 03:24 schrieb Christoph Hellwig:
>> Hi Stefan,
>>
>> please try the patch below.
>>
>> ---
>> From e0570628d96faa50ebfc94ce8e545968336db225 Mon Sep 17 00:00:00 2001
>> From: Christoph Hellwig <hch@lst.de>
>> Date: Tue, 20 Aug 2019 10:08:38 +0900
>> Subject: arm: select the dma-noncoherent symbols for all swiotlb builds
>>
>> We need to provide the arch hooks for non-coherent dma-direct
>> and swiotlb for all swiotlb builds, not just when LPAS is enabled.
> s/LPAS/LPAE/
>> Without that the Xen build that selects SWIOTLB indirectly through
>> SWIOTLB_XEN fails to build.
>>
>> Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs")
>> Reported-by: Stefan Wahren <wahrenst@gmx.net>
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
> i applied this patch and it fixes the build issue i reported before. But
> this seems to reveal another build issue in drivers/firmware/qcom_scm.c:
>
> drivers/firmware/qcom_scm.c: In function ‘qcom_scm_assign_mem’:
> drivers/firmware/qcom_scm.c:460:47: error: passing argument 3 of
> ‘dma_alloc_coherent’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
> ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_phys, GFP_KERNEL);
> ^
> In file included from drivers/firmware/qcom_scm.c:12:0:
> ./include/linux/dma-mapping.h:636:21: note: expected ‘dma_addr_t * {aka
> long long unsigned int *}’ but argument is of type ‘phys_addr_t * {aka
> unsigned int *}’
> static inline void *dma_alloc_coherent(struct device *dev, size_t size,
> ^~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> scripts/Makefile.build:280: die Regel für Ziel
> „drivers/firmware/qcom_scm.o“ scheiterte
>
> Luckily there is already a patch to fix this in linux-next:
>
> firmware: qcom_scm: Use proper types for dma mappings
could you please take care that this patch is applied to 5.3-fixes?
>
> It seems that it misses the fixes tag.
>
> Regards
> Stefan
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Build regression in Linux 5.3-rc5 with CONFIG_XEN=y
2019-08-20 1:24 ` Christoph Hellwig
2019-08-20 5:43 ` Stefan Wahren
@ 2019-08-21 5:56 ` Stefan Wahren
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2019-08-21 5:56 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: iommu, Robin Murphy, linux-arm-kernel
Am 20.08.19 um 03:24 schrieb Christoph Hellwig:
> Hi Stefan,
>
> please try the patch below.
>
> ---
> From e0570628d96faa50ebfc94ce8e545968336db225 Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> Date: Tue, 20 Aug 2019 10:08:38 +0900
> Subject: arm: select the dma-noncoherent symbols for all swiotlb builds
>
> We need to provide the arch hooks for non-coherent dma-direct
> and swiotlb for all swiotlb builds, not just when LPAS is enabled.
> Without that the Xen build that selects SWIOTLB indirectly through
> SWIOTLB_XEN fails to build.
>
> Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs")
> Reported-by: Stefan Wahren <wahrenst@gmx.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Stefan Wahren <wahrenst@gmx.net>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-21 7:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 18:37 Build regression in Linux 5.3-rc5 with CONFIG_XEN=y Stefan Wahren
2019-08-19 19:02 ` Robin Murphy
2019-08-19 19:12 ` Stefan Wahren
2019-08-20 1:24 ` Christoph Hellwig
2019-08-20 5:43 ` Stefan Wahren
2019-08-20 5:46 ` Christoph Hellwig
2019-08-21 5:55 ` Stefan Wahren
2019-08-21 5:56 ` Stefan Wahren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).