This looks interesting. I suspect it is going to blow up in
quite a few places, so maybe at least for now it might make sense
to have a separate config option?
On Tue, Apr 24, 2018 at 05:12:19PM +0100, Robin Murphy wrote:
> Drivers/subsystems creating scatterlists for DMA should be taking care
>
The following changes since commit 6d08b06e67cd117f6992c46611dfb4ce267cd71e:
Linux 4.17-rc2 (2018-04-22 19:20:09 -0700)
are available in the Git repository at:
git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-4.17-3
for you to fetch changes up to 60695be2bb6b0623f8e53bd994
Only mips and unicore32 select CONFIG_NEED_SG_DMA_LENGTH when building
swiotlb. swiotlb itself never merges segements and doesn't accesses the
dma_length field directly, so drop the dependency.
Signed-off-by: Christoph Hellwig
---
arch/mips/cavium-octeon/Kconfig | 1 -
arch/mips/loongson64/Kcon
This way we have one central definition of it, and user can select it as
needed. The new option is not user visible, which is the behavior
it had in most architectures, with a few notable exceptions:
- On x86_64 and mips/loongson3 it used to be user selectable, but
defaulted to y. It now is
This way we have one central definition of it, and user can select it as
needed.
Signed-off-by: Christoph Hellwig
Reviewed-by: Anshuman Khandual
---
arch/alpha/Kconfig | 4 +---
arch/arm/Kconfig| 3 ---
arch/arm64/Kconfig | 4 +---
arch/hexagon/Kconfig
Instead select the PHYS_ADDR_T_64BIT for 32-bit architectures that need a
64-bit phys_addr_t type directly.
Signed-off-by: Christoph Hellwig
---
arch/arc/Kconfig | 4 +---
arch/arm/kernel/setup.c| 2 +-
arch/arm/mm/Kconfig| 4 +---
arc
Define this symbol if the architecture either uses 64-bit pointers or the
PHYS_ADDR_T_64BIT is set. This covers 95% of the old arch magic. We only
need an additional select for Xen on ARM (why anyway?), and we now always
set ARCH_DMA_ADDR_T_64BIT on mips boards with 64-bit physical addressing
ins
swiotlb now selects the DMA_DIRECT_OPS config symbol, so this will
always be true.
Signed-off-by: Christoph Hellwig
---
lib/swiotlb.c | 4
1 file changed, 4 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index fece57566d45..6954f7ad200a 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb
This symbol is now always identical to CONFIG_ARCH_DMA_ADDR_T_64BIT, so
remove it.
Signed-off-by: Christoph Hellwig
Acked-by: Bjorn Helgaas
---
drivers/pci/Kconfig | 4
drivers/pci/bus.c | 4 ++--
include/linux/pci.h | 2 +-
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/
swiotlb is only used as a library of helper for xen-swiotlb if Xen support
is enabled on arm, so don't build it by default.
Signed-off-by: Christoph Hellwig
---
arch/arm/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index aa1c18
This way we have one central definition of it, and user can select it as
needed. Note that we now also always select it when CONFIG_DMA_API_DEBUG
is select, which fixes some incorrect checks in a few network drivers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Anshuman Khandual
---
arch/alph
This code is only used by sparc, and all new iommu drivers should use the
drivers/iommu/ framework. Also remove the unused exports.
Signed-off-by: Christoph Hellwig
Reviewed-by: Anshuman Khandual
---
{include/linux => arch/sparc/include/asm}/iommu-common.h | 0
arch/sparc/include/asm/iommu_64.
Hi all,
this seris aims for a single defintion of the Kconfig symbol. To get
there various cleanups, mostly about config symbols are included as well.
Changes since V2:
- swiotlb doesn't need the dma_length field by itself, so don't select it
- don't offer a user visible SWIOTLB choice
Chages
This way we have one central definition of it, and user can select it as
needed.
Signed-off-by: Christoph Hellwig
Reviewed-by: Anshuman Khandual
---
arch/powerpc/Kconfig | 4 +---
arch/s390/Kconfig| 5 ++---
arch/sparc/Kconfig | 5 +
arch/x86/Kconfig | 6 ++
lib/Kconfig
This avoids selecting IOMMU_HELPER just for this function. And we only
use it once or twice in normal builds so this often even is a size
reduction.
Signed-off-by: Christoph Hellwig
---
arch/alpha/Kconfig | 3 ---
arch/arm/Kconfig| 3 ---
arch/arm64/Kconfig
This function is only used by built-in code.
Signed-off-by: Christoph Hellwig
Reviewed-by: Anshuman Khandual
---
lib/iommu-helper.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
index 23633c0fda4a..ded1703e7e64 100644
--- a/lib/iommu-helper.c
+++ b
Hi Robin,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc2 next-20180424]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux
On Tue, 24 Apr 2018 11:16:25 PDT (-0700), Christoph Hellwig wrote:
This was used by the ide, scsi and networking code in the past to
determine if they should bounce payloads. Now that the dma mapping
always have to support dma to all physical memory (thanks to swiotlb
for non-iommu systems) ther
On 24/04/18 18:17, Sinan Kaya wrote:
> On 4/24/2018 5:33 AM, Jean-Philippe Brucker wrote:
>>> Please return pasid when you find an io_mm that is already bound. Something
>>> like
>>> *pasid = io_mm->pasid should do the work here when bond is true.
>> Right. I think we should also keep returning 0,
On Mon, 23 Apr 2018 12:30:13 +0100
Jean-Philippe Brucker wrote:
> On Mon, Apr 16, 2018 at 10:49:01PM +0100, Jacob Pan wrote:
> [...]
> > +int iommu_register_device_fault_handler(struct device *dev,
> > + iommu_dev_fault_handler_t
> > handler,
> > +
These days the dma mapping routines must be able to handle any address
supported by the device, be that using an iommu, or swiotlb if none is
supported. With that the PCI_DMA_BUS_IS_PHYS check in illegal_highdma
is not needed and can be removed.
Signed-off-by: Christoph Hellwig
---
net/core/dev
We now have ways to deal with drainage in the block layer, and libata has
been using it for ages. We also want to get rid of PCI_DMA_BUS_IS_PHYS
now, so just reduce the PCI transfer size for ide - anyone who cares for
performance on PCI controllers should have switched to libata long ago.
Signed-
ide_toggle_bounce did select various strange block bounce limits, including
not bouncing at all as soon as an iommu is present in the system. Given
that the dma_map routines now handle any required bounce buffering except
for ISA DMA, and the ide code already must handle either ISA DMA or highmem
This was used by the ide, scsi and networking code in the past to
determine if they should bounce payloads. Now that the dma mapping
always have to support dma to all physical memory (thanks to swiotlb
for non-iommu systems) there is no need to this crude hack any more.
Signed-off-by: Christoph H
Hi all,
this series tries to get rid of the global and PCI_DMA_BUS_IS_PHYS flag,
which causes the block layer and networking code to bounce buffer memory
above the dma mask in some cases. It is a leftover from i386 + highmem
days and is obsolete now that we have swiotlb or iommus so that the
dma
We can rely on the dma-mapping code to handle any DMA limits that is
bigger than the ISA DMA mask for us (either using an iommu or swiotlb),
so remove setting the block layer bounce limit for anything but the
unchecked_isa_dma case, or the bouncing for highmem pages.
Signed-off-by: Christoph Hellw
On 4/24/2018 5:33 AM, Jean-Philippe Brucker wrote:
>> Please return pasid when you find an io_mm that is already bound. Something
>> like
>> *pasid = io_mm->pasid should do the work here when bond is true.
> Right. I think we should also keep returning 0, not switch to -EEXIST or
> similar. So in
Drivers/subsystems creating scatterlists for DMA should be taking care
to respect the scatter-gather limitations of the appropriate device, as
described by dma_parms. A DMA API implementation cannot feasibly split
a scatterlist into *more* entries than originally passed, so it is not
well defined w
Only used by the AMD GART driver, which must be built in.
Signed-off-by: Christoph Hellwig
---
lib/dma-debug.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 075253cb613b..6a1ebaa83623 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -444,7 +444
Most mainstream architectures are using 65536 entries, so lets stick to
that. If someone is really desperate to override it that can still be
done through , but I'd rather see a really good
rationale for that.
dma_debug_init is now called as a core_initcall, which for many
architectures means muc
Just keep a single variable with a descriptive name instead of two
with confusing names.
Signed-off-by: Christoph Hellwig
---
lib/dma-debug.c | 20
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 712a897174e4..075253cb61
Hi all,
this series has a few dma-debug cleanups, most notably removing the need
for architectures to explicitly initialize dma-debug.
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi Joerg,
Could you please take a look at this patch and let me know.
I have rebased this to 4.17-rc1 and added Robin's R-by.
This series[1] is now pending on this patch as without this it will break few
ARM platforms[2].
Please take a look and let me know.
Thanks,
Shameer
[1] https://lkml.
Hi Robin,
Thanks for your comment!
On 2018/4/24 0:07, Robin Murphy wrote:
> On 23/04/18 12:45, Yisheng Xie wrote:
>> Add a bypass parameter in arm_smmu_device to keep whether smmu device
>> should pypass or not, so parameter bypass in arm_smmu_reset_device can
>> be removed.
>
> Given that the GB
Hi Robin,
Thanks for your comment.
On 2018/4/24 0:14, Robin Murphy wrote:
> On 23/04/18 12:45, Yisheng Xie wrote:
>> When system suspend, hisilicon's smmu will do power gating for smmu,
>> this time smmu's reg will be set to default value for not having
>> hardware retention, which means need soft
On 24/04/18 02:32, Sinan Kaya wrote:
> On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote:
>> /**
>> * iommu_sva_device_init() - Initialize Shared Virtual Addressing for a
>> device
>> * @dev: the device
>> @@ -129,7 +439,10 @@ EXPORT_SYMBOL_GPL(iommu_sva_device_shutdown);
>> int iommu_sva_bin
On Tue, Apr 24, 2018 at 08:47:27AM +0100, Russell King - ARM Linux wrote:
> Therefore, the default state for SWIOTLB and hence NEED_SG_DMA_LENGTH
> becomes 'y' on ARM, and any defconfig file that does not mention SWIOTLB
> explicitly ends up with both these enabled.
Indeed, sorry.
> It does look
On Tue, Apr 24, 2018 at 08:55:49AM +0200, Christoph Hellwig wrote:
> On Tue, Apr 24, 2018 at 12:52:05AM +0100, Russell King - ARM Linux wrote:
> > On Mon, Apr 23, 2018 at 07:04:18PM +0200, Christoph Hellwig wrote:
> > > This way we have one central definition of it, and user can select it as
> > >
38 matches
Mail list logo