[PATCH] iommu: fix second argument of trace_map() to report correct paddr

2016-02-09 Thread Yoshihiro Shimoda
Since iommu_map() code added pgsize value to the paddr, trace_map() used wrong paddr. So, this patch adds "orig_paddr" value in the iommu_map() to use for the trace_map(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> --- drivers/iommu/iommu.c | 3 ++- 1

RE: [PATCH/RFC] iommu/dma: Per-domain flag to control size-alignment

2017-01-29 Thread Yoshihiro Shimoda
g patch at last April: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/iommu?id=809eac54cdd62c67afea1e17080e681dfa33dc09 So, no one needs this patch anymore. Best regards, Yoshihiro Shimoda ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH/RFC 3/4] iommu: dma: iommu iova domain reset

2017-01-25 Thread Yoshihiro Shimoda
om an empty iova space. Signed-off-by: Magnus Damm <damm+rene...@opensource.se> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> --- drivers/iommu/dma-iommu.c | 42 +- drivers/iommu/iova.c | 9 + include/linux/

[PATCH/RFC 4/4] iommu: ipmmu-vmsa: enable force_reset_when_empty

2017-01-25 Thread Yoshihiro Shimoda
The IPMMU of R-Car Gen3 will mistake an address translation if IMCTR.FLUSH is set while some related devices that on the same doamin are running. To avoid this, this patch uses the force_reset_when_empty feature. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> --- d

[PATCH/RFC 2/4] iommu: iova: use __alloc_percpu_gfp() with GFP_NOWAIT in init_iova_rcaches()

2017-01-25 Thread Yoshihiro Shimoda
In the future, the init_iova_rcaches will be called in atomic. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda...@renesas.com> --- drivers/iommu/iova.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index b7268a1..8

RE: [PATCH 1/2] mmc: renesas_sdhi: fix swiotlb buffer is full

2017-11-01 Thread Yoshihiro Shimoda
Hi, > From: Konrad Rzeszutek, Sent: Wednesday, November 1, 2017 10:27 PM > > On Fri, Oct 20, 2017 at 03:18:55AM +, Yoshihiro Shimoda wrote: > > Hi again! > > > > > From: Yoshihiro Shimoda, Sent: Thursday, October 19, 2017 8:39 PM > > > > > &

RE: [PATCH 1/2] mmc: renesas_sdhi: fix swiotlb buffer is full

2017-10-19 Thread Yoshihiro Shimoda
Hi again! > From: Yoshihiro Shimoda, Sent: Thursday, October 19, 2017 8:39 PM > > Hi Geert-san, Konrad-san, > > > From: Geert Uytterhoeven, Sent: Thursday, October 19, 2017 5:34 PM > > > > Hi Konrad, > > > > On Thu, Oct 19, 2017 at 2:24 AM, Konrad Rz

RE: [PATCH 1/2] mmc: renesas_sdhi: fix swiotlb buffer is full

2017-10-19 Thread Yoshihiro Shimoda
ote: > >> On Tue, Oct 17, 2017 at 9:30 AM, Yoshihiro Shimoda > >> <yoshihiro.shimoda...@renesas.com> wrote: > >> > Since the commit de3ee99b097d ("mmc: Delete bounce buffer handling") > >> > deletes the bounce buffer handling, a request da

[PATCH] iommu/ipmmu-vmsa: IMUCTRn.TTSEL needs a special usage on R-Car Gen3

2018-07-08 Thread Yoshihiro Shimoda
MU context number 0 as the unused MMU context. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index 6a0e714..6cbd2bd 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++

RE: [PATCH 1/2] iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() to check SoC revisions

2018-11-28 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Wednesday, November 28, 2018 5:47 PM > > Hi Shimoda-san, > > On Wed, Nov 28, 2018 at 7:10 AM Yoshihiro Shimoda > wrote: > > Some R-Car Gen3 SoCs has hardware restrictions on the IPMMU. So, > > to check wheth

[PATCH v2 2/2] iommu/ipmmu-vmsa: add an array of slave devices whitelist

2018-11-28 Thread Yoshihiro Shimoda
To avoid adding copy and pasted strcmp codes in the future, this patch adds an array "rcar_gen3_slave_whitelist" to check whether the device can work with the IPMMU or not. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven --- drivers/iommu/ipmmu-vmsa.c | 13 ++

[PATCH v2 1/2] iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() to check SoC revisions

2018-11-28 Thread Yoshihiro Shimoda
Some R-Car Gen3 SoCs has hardware restrictions on the IPMMU. So, to check whether this R-Car Gen3 SoC can use the IPMMU correctly, this patch modifies the ipmmu_slave_whitelist(). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven --- drivers/iommu/ipmmu-vmsa.c | 34

[PATCH 0/2] iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist()

2018-11-28 Thread Yoshihiro Shimoda
nt" instead of "int" in patch 2. - Add Geert-san's Reviewed-by. Yoshihiro Shimoda (2): iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() to check SoC revisions iommu/ipmmu-vmsa: add an array of slave devices whitelist drivers/iommu/ipmmu-vmsa.c | 45 ++

RE: [PATCH 2/2] iommu/ipmmu-vmsa: add an array of slave devices whitelist

2018-11-28 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Wednesday, November 28, 2018 5:48 PM > > Hi Shimoda-san, > > On Wed, Nov 28, 2018 at 7:10 AM Yoshihiro Shimoda > wrote: > > To avoid adding copy and pasted strcmp codes in the future, > > this patch adds an ar

[PATCH 0/2] iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist()

2018-11-27 Thread Yoshihiro Shimoda
rcar_gen3_slave_whitelist[] = { + "e670.dma-controller", + "e730.dma-controller" }; static bool ipmmu_slave_whitelist(struct device *dev) Yoshihiro Shimoda (2): iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() to check SoC revisions iommu/ipmm

[PATCH 1/2] iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() to check SoC revisions

2018-11-27 Thread Yoshihiro Shimoda
Some R-Car Gen3 SoCs has hardware restrictions on the IPMMU. So, to check whether this R-Car Gen3 SoC can use the IPMMU correctly, this patch modifies the ipmmu_slave_whitelist(). Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 34 ++ 1 file

[PATCH 2/2] iommu/ipmmu-vmsa: add an array of slave devices whitelist

2018-11-27 Thread Yoshihiro Shimoda
To avoid adding copy and pasted strcmp codes in the future, this patch adds an array "rcar_gen3_slave_whitelist" to check whether the device can work with the IPMMU or not. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 13 - 1 file changed, 12 insert

RE: [PATCH v3 0/6] iommu/ipmmu-vmsa: Suspend/resume support and assorted cleanups

2019-05-13 Thread Yoshihiro Shimoda
peration has also > been tested on R-Car M2-W. Thank you for the patch! I reviewed this patch series and tested it on R-Car H3 ES3.0 with IPMMU support for USB3.0 host and SDHI. So, Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Best regards, Yoshihiro Shimoda

How to resolve an issue in swiotlb environment?

2019-06-03 Thread Yoshihiro Shimoda
swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 1338 (slots) [ 37.078676] xhci-hcd ee00.usb: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 1338 (slots) [ 41.745471] swiotlb_tbl_map_single: 22211 callbacks suppresse

[RFC PATCH v5 0/8] treewide: improve R-Car SDHI performance

2019-06-05 Thread Yoshihiro Shimoda
s into struct tmio_mmc_dma_ops and tmio_mmc_host and just set init_card on renesas_sdhi_core.c. - Revise typos on "mmc: tmio: No memory size limitation if runs on IOMMU". - Add Simon-san's Reviewed-by on a tmio patch. https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=110485

[RFC PATCH v5 4/8] iommu/ipmmu-vmsa: add capable ops

2019-06-05 Thread Yoshihiro Shimoda
This patch adds the .capable into iommu_ops that can merge scatter gather segments. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index 408ad0b..81170b8

[RFC PATCH v5 6/8] mmc: tmio: Add a definition for default max_segs

2019-06-05 Thread Yoshihiro Shimoda
This patch adds a definition for default max_segs to be used by other driver (renesas_sdhi) in the future. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Wolfram Sang --- drivers/mmc/host/tmio_mmc.h | 1 + drivers/mmc/host/tmio_mmc_core.c | 2 +- 2 files changed, 2 insertions(+), 1

[RFC PATCH v5 3/8] iommu: add a new capable IOMMU_CAP_MERGING

2019-06-05 Thread Yoshihiro Shimoda
This patch adds a new capable IOMMU_CAP_MERGING to check whether the IOVA would be contiguous strictly if a device requires and the IOMMU driver has the capable. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/dma-iommu.c | 26 -- include/linux/iommu.h | 1 + 2

[RFC PATCH v5 5/8] mmc: tmio: No memory size limitation if runs on IOMMU

2019-06-05 Thread Yoshihiro Shimoda
This patch adds a condition to avoid a memory size limitation of swiotlb if the driver runs on IOMMU. Tested-by: Takeshi Saito Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Wolfram Sang --- drivers/mmc/host/tmio_mmc_core.c | 5 +++-- 1 file changed, 3 insertions

[RFC PATCH v5 8/8] mmc: renesas_sdhi: use multiple segments if possible

2019-06-05 Thread Yoshihiro Shimoda
C_MIN_RCAR2" environment. Signed-off-by: Yoshihiro Shimoda --- drivers/mmc/host/renesas_sdhi_core.c | 27 +++ drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 2 files changed, 31 insertions(+) diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/

[RFC PATCH v5 2/8] iommu/dma: move iommu_dma_unmap_sg() place

2019-06-05 Thread Yoshihiro Shimoda
iommu_dma_map_sg() will use the unmap function in the future. To avoid a forward declaration, this patch move the function place. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/dma-iommu.c | 48 +++ 1 file changed, 24 insertions(+), 24 deletions

[RFC PATCH v5 7/8] mmc: renesas_sdhi: sort headers

2019-06-05 Thread Yoshihiro Shimoda
This patch ports the headers in alphabetic order to ease the maintenance for this part. Signed-off-by: Yoshihiro Shimoda --- drivers/mmc/host/renesas_sdhi_core.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers

[RFC PATCH v5 1/8] dma-mapping: add a device driver helper for iova contiguous

2019-06-05 Thread Yoshihiro Shimoda
This API can set a flag whether a device requires iova contiguous strictly. Signed-off-by: Yoshihiro Shimoda --- include/linux/device.h | 1 + include/linux/dma-mapping.h | 16 2 files changed, 17 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h

RE: [PATCH] Documentation: DMA-API: fix a function name of max_mapping_size

2019-06-07 Thread Yoshihiro Shimoda
API is related to my problem, but I don't have any actual solution (a patch) for now. So, I'll wait for your patch! Best regards, Yoshihiro Shimoda

RE: [RFC PATCH v5 3/8] iommu: add a new capable IOMMU_CAP_MERGING

2019-06-07 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Friday, June 7, 2019 2:50 PM > > On Fri, Jun 07, 2019 at 05:41:56AM +, Yoshihiro Shimoda wrote: > > > bool blk_can_use_iommu_merging(struct request_queue *q, struct device > > > *dev) > > > { >

RE: [RFC PATCH v5 3/8] iommu: add a new capable IOMMU_CAP_MERGING

2019-06-06 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Thursday, June 6, 2019 4:01 PM > > On Thu, Jun 06, 2019 at 06:28:47AM +, Yoshihiro Shimoda wrote: > > > The problem is that we need a way to communicate to the block layer > > > that more than a single segment is

[PATCH] Documentation: DMA-API: fix a function name of max_mapping_size

2019-06-07 Thread Yoshihiro Shimoda
The exported function name is dma_max_mapping_size(), not dma_direct_max_mapping_size() so that this patch fixes the function name in the documentation. Fixes: 133d624b1cee ("dma: Introduce dma_max_mapping_size()") Signed-off-by: Yoshihiro Shimoda --- Documentation/DMA-API.txt | 2

RE: [PATCH] Documentation: DMA-API: fix a function name of max_mapping_size

2019-06-07 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Friday, June 7, 2019 5:35 PM > > On Fri, Jun 07, 2019 at 08:19:08AM +, Yoshihiro Shimoda wrote: > > Hi Christoph, > > > > > From: Christoph Hellwig, Sent: Friday, June 7, 2019 5:08 PM > > > > > >

RE: How to resolve an issue in swiotlb environment?

2019-06-07 Thread Yoshihiro Shimoda
Hi Christoph, I think we should continue to discuss on this email thread instead of the fixed DMA-API.txt patch [1] [1] https://marc.info/?t=15598941221=1=2 > From: Yoshihiro Shimoda, Sent: Monday, June 3, 2019 3:42 PM > > Hi linux-block and iommu mailing lists, > >

RE: [RFC PATCH v5 3/8] iommu: add a new capable IOMMU_CAP_MERGING

2019-06-06 Thread Yoshihiro Shimoda
when reaching the > segement limit. The block layer already has a limit "max_segment_size" for each device so that regardless it can/cannot merge the segments, we can use the limit. Is my understanding incorrect? Best regards, Yoshihiro Shimoda ___

RE: [RFC PATCH v5 3/8] iommu: add a new capable IOMMU_CAP_MERGING

2019-06-05 Thread Yoshihiro Shimoda
eems I have to modify a block layer so that such a new DMA API is not needed though. > And if the problem is really that you're not getting merging because of > exposing the wrong parameters to the DMA API and/or the block layer, or > that you just can't quite express your requirement to th

[RFC PATCH v6 3/5] block: add a helper function to merge the segments by an IOMMU

2019-06-13 Thread Yoshihiro Shimoda
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

[RFC PATCH v6 2/5] block: sort headers on blk-setting.c

2019-06-13 Thread Yoshihiro Shimoda
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

[RFC PATCH v6 1/5] iommu: add an exported function to get minimum page size for a domain

2019-06-13 Thread Yoshihiro Shimoda
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

[RFC PATCH v6 0/5] treewide: improve R-Car SDHI performance

2019-06-13 Thread Yoshihiro Shimoda
mc: tmio: No memory size limitation if runs on IOMMU". - Add Simon-san's Reviewed-by on a tmio patch. https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=110485 Yoshihiro Shimoda (5): iommu: add an exported function to get minimum page size for a domain block: sort header

[RFC PATCH v6 5/5] mmc: queue: Use bigger segments if IOMMU can merge the segments

2019-06-13 Thread Yoshihiro Shimoda
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

[RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-13 Thread 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 --

RE: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Yoshihiro Shimoda
ping_size(dev) << SECTOR_SHIFT); it should be: + dma_max_mapping_size(dev) >> SECTOR_SHIFT); But, if we fix the slave_configure(), we don't need this patch, IIUC. Best regards, Yoshihiro Shimoda

RE: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-16 Thread Yoshihiro Shimoda
Hi Wolfram-san, > From: Wolfram Sang, Sent: Friday, June 14, 2019 4:46 AM > > 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 t

RE: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-16 Thread Yoshihiro Shimoda
owed by another min() to make it fit in mmc->max_req_size, which is > unsigned int. Geert-san: I'm afraid, but I cannot understand this means. Is this patch is possible to be upstream? Or, do you have any concern? Best regards, Yoshihiro Shimoda

RE: [RFC PATCH v6 1/5] iommu: add an exported function to get minimum page size for a domain

2019-06-16 Thread Yoshihiro Shimoda
Hi Wolfram-san, > From: Wolfram Sang, Sent: Friday, June 14, 2019 4:38 AM > > 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

RE: [RFC PATCH v6 1/5] iommu: add an exported function to get minimum page size for a domain

2019-06-16 Thread Yoshihiro Shimoda
Hi Robin, > From: Robin Murphy, Sent: Friday, June 14, 2019 6:41 PM > > On 13/06/2019 11:20, 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. > > Heh, se

RE: How to resolve an issue in swiotlb environment?

2019-06-11 Thread Yoshihiro Shimoda
t working much over the long weekend. To Christoph: No worries. > > On Mon, Jun 10, 2019 at 11:13:07AM +, Yoshihiro Shimoda wrote: > > > I have another way to avoid the issue. But it doesn't seem that a good > > > way though... > > > According to the commit that ad

RE: How to resolve an issue in swiotlb environment?

2019-06-10 Thread Yoshihiro Shimoda
Hi Christoph, Alan, (add linux-usb ML on CC.) > From: Yoshihiro Shimoda, Sent: Friday, June 7, 2019 9:00 PM > > Hi Christoph, > > I think we should continue to discuss on this email thread instead of the > fixed DMA-API.txt patch [1] > > [1] > https://marc.

[RFC PATCH v7 1/5] dma: Introduce dma_get_merge_boundary()

2019-06-20 Thread Yoshihiro Shimoda
This patch adds a new DMA API "dma_get_merge_boundary". This function returns the DMA merge boundary if the DMA layer can merge the segments. This patch also adds the implementation for a new dma_map_ops pointer. Signed-off-by: Yoshihiro Shimoda --- Documentation/DMA-API.

[RFC PATCH v7 3/5] block: sort headers on blk-setting.c

2019-06-20 Thread Yoshihiro Shimoda
This patch sorts the headers in alphabetic order to ease the maintenance for this part. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Wolfram Sang --- block/blk-settings.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/blk-settings.c b/block/blk

[RFC PATCH v7 5/5] mmc: queue: Use bigger segments if DMA MAP layer can merge the segments

2019-06-20 Thread Yoshihiro Shimoda
When the max_segs of a mmc host is smaller than 512, the mmc subsystem tries to use 512 segments if DMA MAP layer can merge the segments, and then the mmc subsystem exposes such information to the block layer by using blk_queue_can_use_dma_map_merging(). Signed-off-by: Yoshihiro Shimoda

[RFC PATCH v7 2/5] iommu/dma: Add a new dma_map_ops of get_merge_boundary()

2019-06-20 Thread Yoshihiro Shimoda
This patch adds a new dma_map_ops of get_merge_boundary() to expose the DMA merge boundary if the domain type is IOMMU_DOMAIN_DMA. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/dma-iommu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/dma-iommu.c b/drivers

[RFC PATCH v7 4/5] block: add a helper function to merge the segments

2019-06-20 Thread Yoshihiro Shimoda
This patch adds a helper function whether a queue can merge the segments by the DMA MAP layer (e.g. via IOMMU). Signed-off-by: Yoshihiro Shimoda --- block/blk-settings.c | 22 ++ include/linux/blkdev.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/block/blk

[RFC PATCH v7 0/5] treewide: improve R-Car SDHI performance

2019-06-20 Thread Yoshihiro Shimoda
mc_host and just set init_card on renesas_sdhi_core.c. - Revise typos on "mmc: tmio: No memory size limitation if runs on IOMMU". - Add Simon-san's Reviewed-by on a tmio patch. https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=110485 Yoshihiro Shimoda (5): dma: Introduce dma_get

RE: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Wednesday, June 12, 2019 8:31 PM > > On Wed, Jun 12, 2019 at 08:52:21AM +, Yoshihiro Shimoda wrote: > > Hi Christoph, > > > > > From: Christoph Hellwig, Sent: Wednesday, June 12, 2019 4:31 PM > > > > >

RE: [RFC PATCH v6 5/5] mmc: queue: Use bigger segments if IOMMU can merge the segments

2019-06-17 Thread Yoshihiro Shimoda
mq->queue, mmc_get_max_segments(host)); Thank you for the suggestion. It's a good idea! I'll fix the patch. Best regards, Yoshihiro Shimoda

RE: [RFC PATCH v6 5/5] mmc: queue: Use bigger segments if IOMMU can merge the segments

2019-06-17 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Friday, June 14, 2019 4:25 PM > > On Thu, Jun 13, 2019 at 07:20:15PM +0900, Yoshihiro Shimoda wrote: > > +static unsigned int mmc_get_max_segments(struct mmc_host *host) > > +{ > > + return host->can_merge ? BLK

RE: [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround

2019-06-17 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Monday, June 17, 2019 3:23 PM > > Hi Shimoda-san, > > On Mon, Jun 17, 2019 at 6:54 AM Yoshihiro Shimoda > wrote: > > > From: Geert Uytterhoeven, Sent: Friday, June 14, 2019 4:27 PM > > > On Fri, Jun 14, 201

RE: [RFC PATCH v6 3/5] block: add a helper function to merge the segments by an IOMMU

2019-06-17 Thread Yoshihiro Shimoda
Hi Robin, > From: Robin Murphy, Sent: Friday, June 14, 2019 6:55 PM > > On 13/06/2019 11:20, Yoshihiro Shimoda wrote: > > +bool blk_queue_can_use_iommu_merging(struct request_queue *q, > > +struct device *dev) > > +{ > >

RE: [RFC PATCH v6 5/5] mmc: queue: Use bigger segments if IOMMU can merge the segments

2019-06-17 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Monday, June 17, 2019 3:54 PM > > On Mon, Jun 17, 2019 at 06:46:33AM +, Yoshihiro Shimoda wrote: > > > can_merge seems a little too generic a name to me. Maybe can_iommu_merge? > > > > I'll fix the name. Also

RE: [PATCH v3 3/3] mmc: renesas_sdhi: use multiple segments if possible

2019-05-22 Thread Yoshihiro Shimoda
Hi Christoph, Thank you for your review! > From: Christoph Hellwig, Sent: Wednesday, May 22, 2019 9:29 PM > > On Wed, May 22, 2019 at 07:18:39PM +0900, Yoshihiro Shimoda wrote: > > In IOMMU environment, since it's possible to merge scatter gather > > buffers of memory

RE: [PATCH v9 2/5] iommu/dma: Add a new dma_map_ops of get_merge_boundary()

2019-08-19 Thread Yoshihiro Shimoda
Hi Robin, > From: Robin Murphy, Sent: Monday, August 19, 2019 9:55 PM > > On 26/07/2019 09:31, Yoshihiro Shimoda wrote: > > This patch adds a new dma_map_ops of get_merge_boundary() to > > expose the DMA merge boundary if the domain type is IOMMU_DOMAIN_DMA. > > &

RE: [PATCH v9 3/5] block: sort headers on blk-setting.c

2019-08-19 Thread Yoshihiro Shimoda
Hi Jens, > From: Jens Axboe, Sent: Monday, August 19, 2019 11:54 PM > > On 8/16/19 1:50 PM, Wolfram Sang wrote: > > On Fri, Jul 26, 2019 at 05:31:14PM +0900, Yoshihiro Shimoda wrote: > >> This patch sorts the headers in alphabetic order to ease > >&

RE: [PATCH v10 3/4] block: add a helper function to merge the segments

2019-09-02 Thread Yoshihiro Shimoda
AM > > On 8/28/19 6:35 AM, Yoshihiro Shimoda wrote: > > This patch adds a helper function whether a queue can merge > > the segments by the DMA MAP layer (e.g. via IOMMU). > > Reviewed-by: Jens Axboe Jens, thank you for your review! Best regards, Yoshihiro Shimoda

RE: [PATCH v10 3/4] block: add a helper function to merge the segments

2019-09-03 Thread Yoshihiro Shimoda
ied it to the dma-mapping tree for 5.4 now, thanks a lot! Thank you very much for your support! Best regards, Yoshihiro Shimoda ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH v10 4/4] mmc: queue: Use bigger segments if DMA MAP layer can merge the segments

2019-08-28 Thread Yoshihiro Shimoda
When the max_segs of a mmc host is smaller than 512, the mmc subsystem tries to use 512 segments if DMA MAP layer can merge the segments, and then the mmc subsystem exposes such information to the block layer by using blk_queue_can_use_dma_map_merging(). Signed-off-by: Yoshihiro Shimoda Reviewed

[PATCH v10 1/4] dma: Introduce dma_get_merge_boundary()

2019-08-28 Thread Yoshihiro Shimoda
This patch adds a new DMA API "dma_get_merge_boundary". This function returns the DMA merge boundary if the DMA layer can merge the segments. This patch also adds the implementation for a new dma_map_ops pointer. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Christoph Hellwig Reviewed

[PATCH v10 3/4] block: add a helper function to merge the segments

2019-08-28 Thread Yoshihiro Shimoda
This patch adds a helper function whether a queue can merge the segments by the DMA MAP layer (e.g. via IOMMU). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Christoph Hellwig Reviewed-by: Simon Horman #include #include +#include #include "blk.h" #include "blk-wbt.h&quo

[PATCH v10 2/4] iommu/dma: Add a new dma_map_ops of get_merge_boundary()

2019-08-28 Thread Yoshihiro Shimoda
This patch adds a new dma_map_ops of get_merge_boundary() to expose the DMA merge boundary if the domain type is IOMMU_DOMAIN_DMA. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Acked-by: Joerg Roedel --- drivers/iommu/dma-iommu.c | 8 1 file changed, 8 insertions

[PATCH v10 0/4] treewide: improve R-Car SDHI performance

2019-08-28 Thread Yoshihiro Shimoda
hanges from v3: - Use a helper function device_iommu_mapped on patch 1 and 3. - Check if R-Car Gen3 IPMMU is used or not on patch 3. Yoshihiro Shimoda (4): dma: Introduce dma_get_merge_boundary() iommu/dma: Add a new dma_map_ops of get_merge_boundary() block: add a helper function to merge the se

[PATCH v8 0/5] treewide: improve R-Car SDHI performance

2019-07-22 Thread Yoshihiro Shimoda
se a helper function device_iommu_mapped on patch 1 and 3. - Check if R-Car Gen3 IPMMU is used or not on patch 3. Yoshihiro Shimoda (5): dma: Introduce dma_get_merge_boundary() iommu/dma: Add a new dma_map_ops of get_merge_boundary() block: sort headers on blk-setting.c block: add a help

[PATCH v8 3/5] block: sort headers on blk-setting.c

2019-07-22 Thread Yoshihiro Shimoda
This patch sorts the headers in alphabetic order to ease the maintenance for this part. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Wolfram Sang --- block/blk-settings.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/blk-settings.c b/block/blk

[PATCH v8 1/5] dma: Introduce dma_get_merge_boundary()

2019-07-22 Thread Yoshihiro Shimoda
This patch adds a new DMA API "dma_get_merge_boundary". This function returns the DMA merge boundary if the DMA layer can merge the segments. This patch also adds the implementation for a new dma_map_ops pointer. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Christoph Hellwig --- Doc

[PATCH v8 4/5] block: add a helper function to merge the segments

2019-07-22 Thread Yoshihiro Shimoda
This patch adds a helper function whether a queue can merge the segments by the DMA MAP layer (e.g. via IOMMU). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Christoph Hellwig --- block/blk-settings.c | 22 ++ include/linux/blkdev.h | 2 ++ 2 files changed, 24 insertions

[PATCH v8 2/5] iommu/dma: Add a new dma_map_ops of get_merge_boundary()

2019-07-22 Thread Yoshihiro Shimoda
This patch adds a new dma_map_ops of get_merge_boundary() to expose the DMA merge boundary if the domain type is IOMMU_DOMAIN_DMA. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/dma-iommu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/dma-iommu.c b/drivers

[PATCH v8 5/5] mmc: queue: Use bigger segments if DMA MAP layer can merge the segments

2019-07-22 Thread Yoshihiro Shimoda
When the max_segs of a mmc host is smaller than 512, the mmc subsystem tries to use 512 segments if DMA MAP layer can merge the segments, and then the mmc subsystem exposes such information to the block layer by using blk_queue_can_use_dma_map_merging(). Signed-off-by: Yoshihiro Shimoda Reviewed

[PATCH v9 1/5] dma: Introduce dma_get_merge_boundary()

2019-07-26 Thread Yoshihiro Shimoda
This patch adds a new DMA API "dma_get_merge_boundary". This function returns the DMA merge boundary if the DMA layer can merge the segments. This patch also adds the implementation for a new dma_map_ops pointer. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Christoph Hellwig Reviewed

[PATCH v9 2/5] iommu/dma: Add a new dma_map_ops of get_merge_boundary()

2019-07-26 Thread Yoshihiro Shimoda
This patch adds a new dma_map_ops of get_merge_boundary() to expose the DMA merge boundary if the domain type is IOMMU_DOMAIN_DMA. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/iommu/dma-iommu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers

[PATCH v9 0/5] treewide: improve R-Car SDHI performance

2019-07-26 Thread Yoshihiro Shimoda
on patch 1 and 3. - Check if R-Car Gen3 IPMMU is used or not on patch 3. Yoshihiro Shimoda (5): dma: Introduce dma_get_merge_boundary() iommu/dma: Add a new dma_map_ops of get_merge_boundary() block: sort headers on blk-setting.c block: add a helper function to merge the segments mmc: queue:

[PATCH v9 5/5] mmc: queue: Use bigger segments if DMA MAP layer can merge the segments

2019-07-26 Thread Yoshihiro Shimoda
When the max_segs of a mmc host is smaller than 512, the mmc subsystem tries to use 512 segments if DMA MAP layer can merge the segments, and then the mmc subsystem exposes such information to the block layer by using blk_queue_can_use_dma_map_merging(). Signed-off-by: Yoshihiro Shimoda Reviewed

[PATCH v9 4/5] block: add a helper function to merge the segments

2019-07-26 Thread Yoshihiro Shimoda
This patch adds a helper function whether a queue can merge the segments by the DMA MAP layer (e.g. via IOMMU). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Christoph Hellwig Reviewed-by: Simon Horman --- block/blk-settings.c | 22 ++ include/linux/blkdev.h | 2 ++ 2

[PATCH v9 3/5] block: sort headers on blk-setting.c

2019-07-26 Thread Yoshihiro Shimoda
This patch sorts the headers in alphabetic order to ease the maintenance for this part. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman --- block/blk-settings.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/blk

RE: [PATCH v8 2/5] iommu/dma: Add a new dma_map_ops of get_merge_boundary()

2019-07-26 Thread Yoshihiro Shimoda
Hello! > From: Sergei Shtylyov, Sent: Tuesday, July 23, 2019 5:17 PM > > Hello! > > On 23.07.2019 8:26, Yoshihiro Shimoda wrote: > > > This patch adds a new dma_map_ops of get_merge_boundary() to > > expose the DMA merge boundary if the domain type is IOMMU_

RE: [PATCH] iommu/ipmmu-vmsa: Only call platform_get_irq() when interrupt is mandatory

2019-10-01 Thread Yoshihiro Shimoda
s is a fix for v5.4-rc1. > --- Thank you for the patch! Reviewed-by: Yoshihiro Shimoda And, I tested this patch on R-Car H3. So, Tested-by: Yoshihiro Shimoda Best regards, Yoshihiro Shimoda ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH v3 6/6] iommu/ipmmu-vmsa: Add utlb_offset_base

2019-11-05 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, this patch adds a utlb_offset_base into struct ipmmu_features for IMUCTR and IMUASID registers. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH v3 5/6] iommu/ipmmu-vmsa: Add helper functions for "uTLB" registers

2019-11-05 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_utlb_reg() and ipmmu_imu{asid,ctr}_write() for "uTLB" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven --- drivers/iommu/ipmmu-v

[PATCH v3 2/6] iommu/ipmmu-vmsa: tidyup register definitions

2019-11-05 Thread Yoshihiro Shimoda
Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 58 -- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index c4ec166..79975e1 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++

[PATCH v3 0/6] iommu/ipmmu-vmsa: minor updates

2019-11-05 Thread Yoshihiro Shimoda
/project/linux-renesas-soc/list/?series=184741 Yoshihiro Shimoda (6): iommu/ipmmu-vmsa: Remove all unused register definitions iommu/ipmmu-vmsa: tidyup register definitions iommu/ipmmu-vmsa: Add helper functions for MMU "context" registers iommu/ipmmu-vmsa: Calculate context registe

[PATCH v3 1/6] iommu/ipmmu-vmsa: Remove all unused register definitions

2019-11-05 Thread Yoshihiro Shimoda
To support different registers memory mapping hardware easily in the future, this patch removes all unused register definitions. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 76 -- 1 file changed, 76 deletions(-) diff --git

[PATCH v3 3/6] iommu/ipmmu-vmsa: Add helper functions for MMU "context" registers

2019-11-05 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_ctx_{reg,read,write}() for MMU "context" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven --- drivers/iommu/ipmmu-v

[PATCH v3 4/6] iommu/ipmmu-vmsa: Calculate context registers' offset instead of a macro

2019-11-05 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, this patch uses ipmmu_features values instead of a macro to calculate context registers offset. No behavior change. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven --- drivers/iommu/ipmmu-vmsa.c | 11

RE: [PATCH 1/3] iommu/ipmmu-vmsa: Remove some unused register declarations

2019-10-14 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Friday, October 11, 2019 9:11 PM > > Hi Shimoda-san, > > Thanks for your patch! > > On Wed, Oct 9, 2019 at 10:27 AM Yoshihiro Shimoda > wrote: > > To support different registers memory mapping hardware easily

RE: [PATCH 3/3] iommu/ipmmu-vmsa: Add utlb_offset_base

2019-10-14 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Friday, October 11, 2019 9:32 PM > > Hi Shimoda-san, > > On Wed, Oct 9, 2019 at 10:27 AM Yoshihiro Shimoda > wrote: > > Since we will have changed memory mapping of the IPMMU in the future, > > this patch adds

RE: [PATCH 2/3] iommu/ipmmu-vmsa: Calculate context registers' offset instead of a macro

2019-10-14 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Friday, October 11, 2019 9:29 PM > > Hi Shimoda-san, > > On Wed, Oct 9, 2019 at 10:27 AM Yoshihiro Shimoda > wrote: > > Since we will have changed memory mapping of the IPMMU in the future, > > this patch uses

[PATCH v2 6/6] iommu/ipmmu-vmsa: Add utlb_offset_base

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, this patch adds a utlb_offset_base into struct ipmmu_features for IMUCTR and IMUASID registers. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH v2 1/6] iommu/ipmmu-vmsa: Remove all unused register definitions

2019-10-15 Thread Yoshihiro Shimoda
To support different registers memory mapping hardware easily in the future, this patch removes all unused register definitions. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 76 -- 1 file changed, 76 deletions(-) diff --git

[PATCH v2 4/6] iommu/ipmmu-vmsa: Calculate context registers' offset instead of a macro

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, this patch uses ipmmu_features values instead of a macro to calculate context registers offset. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 11 --- 1 file changed, 8

[PATCH v2 3/6] iommu/ipmmu-vmsa: Add helper functions for MMU "context" registers

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_ctx_{reg,read,write}() for MMU "context" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 32 +++---

[PATCH v2 5/6] iommu/ipmmu-vmsa: Add helper functions for "uTLB" registers

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_utlb_reg() and ipmmu_imu{asid,ctr}_write() for "uTLB" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 26 +++

  1   2   >