Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Arnd Bergmann
On Tue, Feb 6, 2018 at 2:05 PM, Robin Murphy wrote: > > It looks like we have only one real arch (score) without IOMEM, and two > (s390 and tile) where it is possible to configure out, so it does seem like > a reasonable feature to assume. Maybe we could have something like

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Arnd Bergmann
On Tue, Feb 6, 2018 at 11:14 AM, Geert Uytterhoeven wrote: > Hi all, > > If NO_DMA=y, get_dma_ops() returns a reference to the non-existing > symbol bad_dma_ops, thus causing a link failure if it is ever used. > > The intention of this is twofold: > 1. To catch

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Robin Murphy
On 06/02/18 10:14, Geert Uytterhoeven wrote: Hi all, If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. The intention of this is twofold: 1. To catch users of the DMA API on systems that do no

Re: [PATCH RFC 1/1] iommu/arm-smmu: Fix context fault message considering non-NTS

2018-02-06 Thread Vivek Gautam
Hi Robin, On Tue, Feb 6, 2018 at 5:22 PM, Robin Murphy wrote: > Hi Vivek, > > On 06/02/18 10:16, Vivek Gautam wrote: >> >> SMMU_CBn_FSYNR0 definition from SMMU v2 architecture document >> says that, the S1CBNDX[23:16] field is only valid if SMMU_IDR0.NTS==1. >> So, update

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Mark Brown
On Tue, Feb 06, 2018 at 11:14:46AM +0100, Geert Uytterhoeven wrote: > The intention of this is twofold: > 1. To catch users of the DMA API on systems that do no support the DMA > mapping API, > 2. To avoid building drivers that cannot work on such systems anyway. > > However, the

Re: [PATCH RFC 1/1] iommu/arm-smmu: Fix context fault message considering non-NTS

2018-02-06 Thread Robin Murphy
Hi Vivek, On 06/02/18 10:16, Vivek Gautam wrote: SMMU_CBn_FSYNR0 definition from SMMU v2 architecture document says that, the S1CBNDX[23:16] field is only valid if SMMU_IDR0.NTS==1. So, update the fsynr in context bank fault handler, so that the fault message displays cbndx only when we have

[PATCH/RFC 2/6] dma-coherent: Add NO_DMA dummies for managed DMA API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for dmam_{alloc,free}_coherent(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/arc/arc_emac.ko] undefined! ERROR: "dmam_free_coherent"

[PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Geert Uytterhoeven
Hi all, If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. The intention of this is twofold: 1. To catch users of the DMA API on systems that do no support the DMA mapping API, 2. To avoid

[PATCH RFC 1/1] iommu/arm-smmu: Fix context fault message considering non-NTS

2018-02-06 Thread Vivek Gautam
SMMU_CBn_FSYNR0 definition from SMMU v2 architecture document says that, the S1CBNDX[23:16] field is only valid if SMMU_IDR0.NTS==1. So, update the fsynr in context bank fault handler, so that the fault message displays cbndx only when we have nested translations enabled. Otherwise, it is

[PATCH/RFC 6/6] Treewide: Remove depends on HAS_DMA in case of platform dependency

2018-02-06 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH/RFC 1/6] dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy

2018-02-06 Thread Geert Uytterhoeven
If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. Make get_dma_ops() return NULL instead, to avoid the link failure. This allows to improve compile-testing, and limits the need to keep on sprinkling dependencies

[PATCH/RFC 3/6] usb: gadget: Add NO_DMA dummies for DMA mapping API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for usb_gadget_{,un}map_request{,_by_dev}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "usb_gadget_unmap_request_by_dev" [drivers/usb/renesas_usbhs/renesas_usbhs.ko] undefined! ERROR: "usb_gadget_map_request_by_dev"

[PATCH/RFC 5/6] scsi: Add NO_DMA dummies for SCSI DMA mapping API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for scsi_dma_{,un}map(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "scsi_dma_unmap" [drivers/firewire/firewire-sbp2.ko] undefined! ERROR: "scsi_dma_map" [drivers/firewire/firewire-sbp2.ko] undefined! Signed-off-by: Geert

[PATCH/RFC 4/6] mm: Add NO_DMA dummies for DMA pool API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for dma{,m}_pool_{create,destroy,alloc,free}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dma_pool_destroy" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: