While hunting an issue in swiotlb-xen I stumbled over a wrong test
and found some areas for improvement.
Juergen Gross (3):
xen/swiotlb: fix condition for calling xen_destroy_contiguous_region()
xen/swiotlb: simplify range_straddles_page_boundary()
xen/swiotlb: remember having called
The condition in xen_swiotlb_free_coherent() for deciding whether to
call xen_destroy_contiguous_region() is wrong: in case the region to
be freed is not contiguous calling xen_destroy_contiguous_region() is
the wrong thing to do: it would result in inconsistent mappings of
multiple PFNs to the
range_straddles_page_boundary() is open coding several macros from
include/xen/page.h. Use those instead. Additionally there is no need
to have check_pages_physically_contiguous() as a separate function as
it is used only once, so merge it into range_straddles_page_boundary().
Signed-off-by:
Instead of always calling xen_destroy_contiguous_region() in case the
memory is DMA-able for the used device, do so only in case it has been
made DMA-able via xen_create_contiguous_region() before.
This will avoid a lot of xen_destroy_contiguous_region() calls for
64-bit capable devices.
As the
On Fri, Jun 14, 2019 at 09:40:34AM +0800, Ley Foon Tan wrote:
> Hi Christoph
>
> Can this patch in http://git.infradead.org/users/hch/dma-mapping.git/sh
> ortlog/refs/heads/for-next
>
> [PATCH 1/2] nios2: use the generic uncached segment support in dma-
> direct
Hi Ley Foon,
I don't understand
On Wed 12 Jun 00:15 PDT 2019, Vivek Gautam wrote:
> Indicate on MTP SDM845 that firmware implements handler to
> TLB invalidate erratum SCM call where SAFE sequence is toggled
> to achieve optimum performance on real-time clients, such as
> display and camera.
>
> Signed-off-by: Vivek Gautam
On Wed 12 Jun 00:15 PDT 2019, Vivek Gautam wrote:
> Qcom's implementation of arm,mmu-500 adds a WAIT-FOR-SAFE logic
> to address under-performance issues in real-time clients, such as
> Display, and Camera.
> On receiving an invalidation requests, the SMMU forwards SAFE request
> to these clients
On Mon, 2019-06-03 at 08:53 +0200, Christoph Hellwig wrote:
> Hi all,
>
> can you take a look at this series? It switches niops2 and
> microblaze to
> use the generic dma layer support for uncached segements.
>
> The dma mapping for-next git tree that includes the support is
> available
> here:
On Tue, Jun 11, 2019 at 09:54:25PM +0200, Thomas Gleixner wrote:
> On Thu, 23 May 2019, Ricardo Neri wrote:
>
> > HPET timer 2 will be used to drive the HPET-based hardlockup detector.
> > Reserve such timer to ensure it cannot be used by user space programs or
> > for clock events.
> >
> > When
On 6/13/19 11:16 AM, Alan Stern wrote:
On Thu, 13 Jun 2019, Christoph Hellwig wrote:
On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote:
Would it be okay to rely on the assumption that USB block devices never
have block size < 512? (We could even add code to the driver to
enforce
On Thu 13 Jun 04:23 PDT 2019, Robin Murphy wrote:
> On 05/06/2019 22:08, Bjorn Andersson wrote:
> > Boot splash screen or EFI framebuffer requires the display hardware to
> > operate while the Linux iommu driver probes. Therefore, we cannot simply
> > wipe out the SMR register settings programmed
Convert the AMD iommu driver to the dma-iommu api. Remove the iova
handling and reserve region code from the AMD iommu driver.
Signed-off-by: Tom Murphy
---
drivers/iommu/Kconfig | 1 +
drivers/iommu/amd_iommu.c | 677 --
2 files changed, 68
Convert the AMD iommu driver to the dma-iommu api. Remove the iova
handling and reserve region code from the AMD iommu driver.
Change-log:
V4:
-Rebase on top of linux-next
-Split the removing of the unnecessary locking in the amd iommu driver into a
seperate patch
-refactor the "iommu/dma-iommu:
Use the dev->coherent_dma_mask when allocating in the dma-iommu ops api.
Signed-off-by: Tom Murphy
---
drivers/iommu/dma-iommu.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index
Handle devices which defer their attach to the iommu in the dma-iommu api
Signed-off-by: Tom Murphy
---
drivers/iommu/dma-iommu.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index
We can remove the mutex lock from amd_iommu_map and amd_iommu_unmap.
iommu_map doesn’t lock while mapping and so no two calls should touch
the same iova range. The AMD driver already handles the page table page
allocations without locks so we can safely remove the locks.
Signed-off-by: Tom Murphy
Add a gfp_t parameter to the iommu_ops::map function.
Remove the needless locking in the AMD iommu driver.
The iommu_ops::map function (or the iommu_map function which calls it)
was always supposed to be sleepable (according to Joerg's comment in
this thread:
check if there is a not-present cache present and flush it if there is.
Signed-off-by: Tom Murphy
---
v3:
--applied Qian Cai's "iommu/amd: fix a null-ptr-deref in map_sg()" fix
drivers/iommu/amd_iommu.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git
Hi Shimoda-san,
On Thu, Jun 13, 2019 at 5:37 PM Yoshihiro Shimoda
wrote:
> Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()")
> provides a helper function to get the max mapping size, we can use
> the function instead of the workaround code for swiotlb.
>
> Signed-off-by:
> - blk_queue_max_segments(mq->queue, host->max_segs);
> + /* blk_queue_can_use_iommu_merging() should succeed if can_merge = 1 */
> + if (host->can_merge &&
> + !blk_queue_can_use_iommu_merging(mq->queue, mmc_dev(host)))
> + WARN_ON(1);
> +
On Thu, Jun 13, 2019 at 07:20:14PM +0900, Yoshihiro Shimoda wrote:
> Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()")
> provides a helper function to get the max mapping size, we can use
> the function instead of the workaround code for swiotlb.
>
> Signed-off-by: Yoshihiro
On Thu, Jun 13, 2019 at 07:20:12PM +0900, Yoshihiro Shimoda wrote:
> This patch sorts the headers in alphabetic order to ease
> the maintenance for this part.
>
> Signed-off-by: Yoshihiro Shimoda
Yup, I got the same result :)
Reviewed-by: Wolfram Sang
signature.asc
Description: PGP
On Thu, Jun 13, 2019 at 07:20:11PM +0900, Yoshihiro Shimoda wrote:
> This patch adds an exported function to get minimum page size for
> a domain. This patch also modifies similar codes on the iommu.c.
>
> Signed-off-by: Yoshihiro Shimoda
> ---
> drivers/iommu/iommu.c | 18 +++---
>
On Thu, Jun 13, 2019 at 07:20:10PM +0900, Yoshihiro Shimoda wrote:
> This patch series is based on iommu.git / next branch.
>
> Since SDHI host internal DMAC of the R-Car Gen3 cannot handle two or
> more segments, the performance rate (especially, eMMC HS400 reading)
> is not good. However, if
Am Donnerstag, 13. Juni 2019, 18:27:02 CEST schrieb Yangtao Li:
> Updates license to use SPDX-License-Identifier.
>
> Signed-off-by: Yangtao Li
Acked-by: Heiko Stuebner
On Thu, Jun 13, 2019 at 01:16:32PM -0400, Alan Stern wrote:
> On Thu, 13 Jun 2019, Christoph Hellwig wrote:
>
> > On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote:
> > > Would it be okay to rely on the assumption that USB block devices never
> > > have block size < 512? (We could even
Hi Yangtao,
On 6/13/19 11:26 AM, Yangtao Li wrote:
> Updates license to use SPDX-License-Identifier.
>
> Signed-off-by: Yangtao Li
Thanks for the patch. Can you also update another related file
while at this. Will leave it to Joerg if he prefers it as a separate
patch, or folded into this
On Thu, 13 Jun 2019, Christoph Hellwig wrote:
> On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote:
> > Would it be okay to rely on the assumption that USB block devices never
> > have block size < 512? (We could even add code to the driver to
> > enforce this, although refusing to
On Thu, Jun 13, 2019 at 11:00 AM Thierry Reding
wrote:
>
> From: Thierry Reding
>
> Some subsystems, such as pinctrl, allow continuing to defer probe
> indefinitely. This is useful for devices that depend on resources
> provided by devices that are only probed after the init stage.
>
> One
From: Thierry Reding
Some subsystems, such as pinctrl, allow continuing to defer probe
indefinitely. This is useful for devices that depend on resources
provided by devices that are only probed after the init stage.
One example of this can be seen on Tegra, where the DPAUX hardware
contains
Christoph,
> sd.c only supports a few specific sector size, and none of them is
> < 512 bytes:
Yep, while sd.c in theory supported 256-byte logical blocks a while
back, that code was removed since the block layer always operates on
units of 512 bytes.
--
Martin K. Petersen Oracle Linux
On Fri, Jun 14, 2019 at 12:39 AM Suman Anna wrote:
>
> Hi Yangtao,
>
> On 6/13/19 11:26 AM, Yangtao Li wrote:
> > Updates license to use SPDX-License-Identifier.
> >
> > Signed-off-by: Yangtao Li
>
> Thanks for the patch. Can you also update another related file
> while at this. Will leave it to
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
Acked-by: Suman Anna
---
v2:
-add include/linux/platform_data/iommu-omap.h
---
drivers/iommu/omap-iommu-debug.c | 5 +
drivers/iommu/omap-iommu.c | 5 +
drivers/iommu/omap-iommu.h
On 13/06/2019 17:26, Yangtao Li wrote:
Updates license to use SPDX-License-Identifier.
A more complete version of this (which also covers the header) is
already queued in -next.
Robin.
Signed-off-by: Yangtao Li
---
drivers/iommu/dma-iommu.c | 13 +
1 file changed, 1
On Thu, Jun 13, 2019 at 12:27:00PM -0400, Yangtao Li wrote:
> Updates license to use SPDX-License-Identifier.
>
> Signed-off-by: Yangtao Li
> ---
> drivers/iommu/io-pgtable-arm.c | 13 +
> 1 file changed, 1 insertion(+), 12 deletions(-)
Acked-by: Will Deacon
Will
On Thu, Jun 13, 2019 at 12:26:55PM -0400, Yangtao Li wrote:
> Updates license to use SPDX-License-Identifier.
>
> Signed-off-by: Yangtao Li
> ---
> drivers/iommu/io-pgtable.c | 13 +
> 1 file changed, 1 insertion(+), 12 deletions(-)
Acked-by: Will Deacon
Will
On Thu, Jun 13, 2019 at 12:27:03PM -0400, Yangtao Li wrote:
> Updates license to use SPDX-License-Identifier.
>
> Signed-off-by: Yangtao Li
> ---
> drivers/iommu/tegra-smmu.c | 5 +
> 1 file changed, 1 insertion(+), 4 deletions(-)
Acked-by: Thierry Reding
signature.asc
Description: PGP
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/iommu-sysfs.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c
index 44127d54e943..a193758c8122 100644
---
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/io-pgtable-arm.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
index 4e21efbc4459..6282c45eefaa 100644
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/tegra-smmu.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 463ee08f7d3a..9a50ca4ec65c 100644
---
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/rockchip-iommu.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 77d4bd93fe4b..9c4c6eb7d42b 100644
---
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/io-pgtable-arm-v7s.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c
b/drivers/iommu/io-pgtable-arm-v7s.c
index
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/dma-iommu.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 129c4badf9ae..2d76bac43b82 100644
---
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/qcom_iommu.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c
index 8cdd3f059513..ad913720d7dd 100644
---
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/omap-iommu-debug.c | 5 +
drivers/iommu/omap-iommu.c | 5 +
drivers/iommu/omap-iommu.h | 5 +
drivers/iommu/omap-iopgtable.h | 5 +
4 files changed, 4 insertions(+), 16
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/exynos-iommu.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 05c6bc099d62..938a33d2f89d 100644
---
Updates license to use SPDX-License-Identifier.
Signed-off-by: Yangtao Li
---
drivers/iommu/io-pgtable.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/iommu/io-pgtable.c b/drivers/iommu/io-pgtable.c
index 5227cfdbb65b..3c84ff1901ea 100644
---
Hi,
On 5/30/19 7:09 PM, Jean-Philippe Brucker wrote:
> Implement the virtio-iommu driver, following specification v0.12 [1].
> Since last version [2] we've worked on improving the specification,
> which resulted in the following changes to the interface:
> * Remove the EXEC flag.
> * Add feature
On 2019-06-13 7:30 a.m., Jon Mason wrote:
> On Thu, May 23, 2019 at 04:30:50PM -0600, Logan Gunthorpe wrote:
>> This is another resend as there has been no feedback since v4.
>> Seems Jon has been MIA this past cycle so hopefully he appears on the
>> list soon.
>>
>> I've addressed the feedback
On Thu, May 23, 2019 at 04:30:50PM -0600, Logan Gunthorpe wrote:
> This is another resend as there has been no feedback since v4.
> Seems Jon has been MIA this past cycle so hopefully he appears on the
> list soon.
>
> I've addressed the feedback so far and rebased on the latest kernel
> and
On 05/06/2019 22:08, Bjorn Andersson wrote:
Boot splash screen or EFI framebuffer requires the display hardware to
operate while the Linux iommu driver probes. Therefore, we cannot simply
wipe out the SMR register settings programmed by the bootloader.
Detect which SMR registers are in use
This patch sorts the headers in alphabetic order to ease
the maintenance for this part.
Signed-off-by: Yoshihiro Shimoda
---
block/blk-settings.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 2ae348c..45f2c52
This patch adds a helper function whether a queue can merge
the segments by an IOMMU.
Signed-off-by: Yoshihiro Shimoda
---
block/blk-settings.c | 28
include/linux/blkdev.h | 2 ++
2 files changed, 30 insertions(+)
diff --git a/block/blk-settings.c
If max_segs of a mmc host is smaller than BLK_MAX_SEGMENTS,
the mmc subsystem tries to use such bigger segments by using
IOMMU subsystem, and then the mmc subsystem exposes such information
to the block layer by using blk_queue_can_use_iommu_merging().
Signed-off-by: Yoshihiro Shimoda
---
Since the commit 133d624b1cee ("dma: Introduce dma_max_mapping_size()")
provides a helper function to get the max mapping size, we can use
the function instead of the workaround code for swiotlb.
Signed-off-by: Yoshihiro Shimoda
---
drivers/mmc/host/tmio_mmc_core.c | 17 -
1
This patch adds an exported function to get minimum page size for
a domain. This patch also modifies similar codes on the iommu.c.
Signed-off-by: Yoshihiro Shimoda
---
drivers/iommu/iommu.c | 18 +++---
include/linux/iommu.h | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
This patch series is based on iommu.git / next branch.
Since SDHI host internal DMAC of the R-Car Gen3 cannot handle two or
more segments, the performance rate (especially, eMMC HS400 reading)
is not good. However, if IOMMU is enabled on the DMAC, since IOMMU will
map multiple scatter gather
The default DMA mode of INTEL IOMMU is LAZY, this patch make it can be
set to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
drivers/iommu/intel-iommu.c | 2 +-
2 files changed, 2
The DMA mode PASSTHROUGH is not used on ia64.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 70741fd73b07785..63506f1cad3d149 100644
--- a/drivers/iommu/Kconfig
+++
The default DMA mode is LAZY on s390, this patch make it can be set to
STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
Acked-by: Sebastian Ott
---
arch/s390/pci/pci_dma.c | 2 +-
drivers/iommu/Kconfig | 2 ++
2 files changed,
Remove the ifdefs around CONFIG_IOMMU_DEFAULT_PASSTHROUGH to improve
readablity.
Signed-off-by: Zhen Lei
---
arch/x86/kernel/pci-dma.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index
The default DMA mode of AMD IOMMU is LAZY, this patch make it can be set
to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
drivers/iommu/amd_iommu_init.c | 2 +-
2 files changed, 2
First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the
opportunity to set {lazy|strict} mode as default at build time. Then put
the three config options in an choice, make people can only choose one of
the three at a time.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 44
The default DMA mode is PASSTHROUGH on powernv, this patch make it can be
set to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++-
drivers/iommu/Kconfig |
v8--> v9
1. Fix some text editing errors
v7--> v8
1. Split into multiple small patches base on ARCHs or IOMMU drivers.
2. Hide the unsupported build options on the related ARCH or IOMMU.
v6 --> v7:
1. Fix some text editing errors
v5 --> v6:
1. give up adding boot option iommu.dma_mode
v4 -->
On 2019/5/31 18:42, John Garry wrote:
>
-config IOMMU_DEFAULT_PASSTHROUGH
- bool "IOMMU passthrough by default"
+choice
+ prompt "IOMMU default DMA mode"
depends on IOMMU_API
- help
- Enable passthrough by default, removing the need to
(Sorry for the possibly double-posting, my last mail got rejected by
some mailing lists.)
Hi,
When I tested this patch series (Based on linux 5.2.0-rc2, and with
various other patch series about MT8183) with lockdep enabled, and I'm
seeing the following lockdep warning on boot.
By bisecting the
Hi,
When I tested this patch series (Based on linux 5.2.0-rc2, and with
various other patch series about MT8183) with lockdep enabled, and I'm
seeing the following lockdep warning on boot.
By bisecting the commits, the first commit that introduce this warning
is this patch. The warning also
On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote:
> Would it be okay to rely on the assumption that USB block devices never
> have block size < 512? (We could even add code to the driver to
> enforce this, although refusing to handle such devices at all might be
> worse than getting
69 matches
Mail list logo