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 a
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 doesn'
(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 c
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 pa
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 --> v5
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 | 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
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 dcd272dbd0a9330..8c82b2e28a0
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 inse
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,
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 insertio
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
+++ b/driver
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 buffe
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
---
driver
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 file
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 b/block/blk-se
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 10
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 durin
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 would
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
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 b
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
--- a/drivers
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
--- a/drivers/iom
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 delet
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
--- a/drivers
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 9a8a8870e267..fd0c8f2d
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
--- a/drivers/io
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
--- a/drivers/iommu/teg
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
--- a/drive
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/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
--- a/drivers/iommu/
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 s
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: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 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 inserti
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 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
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 E
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 pinm
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 exampl
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 hand
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 patch
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
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 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 IOM
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: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 signatur
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
> - 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);
> + blk_queue_max_segmen
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: Yos
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 a/dr
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: https://lore.kernel.org/patchwork/patc
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 e64dbbcde6
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 f303bbe20e51..082fb789e3
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 insertions(+
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
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 this
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 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 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 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
Re
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
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 sam
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: Juerg
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 xen_cre
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 m
On Fri, 2019-06-14 at 07:44 +0200, Christoph Hellwig wrote:
> 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.gi
> > t/sh
> > ortlog/refs/heads/for-next
> >
> > [PATCH 1/2] nios2: use the
On Thu, 13 Jun 2019 at 18:27, Yangtao Li wrote:
>
> 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(-)
Splitting this per driver is too much... it is not necessary. Such
c
On Fri, Jun 14, 2019 at 06:11:00AM +, Tan, Ley Foon wrote:
> On Fri, 2019-06-14 at 07:44 +0200, Christoph Hellwig wrote:
> > 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.gi
>
72 matches
Mail list logo