* [PATCH] crypto: ixp4xx - Use sg_virt()
@ 2017-03-23 13:16 Geliang Tang
2017-03-23 13:16 ` [PATCH] iommu: use sg_phys() Geliang Tang
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Geliang Tang @ 2017-03-23 13:16 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: Geliang Tang, linux-crypto, linux-kernel
Use sg_virt() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
drivers/crypto/ixp4xx_crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 7868765..771dd26 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -806,7 +806,7 @@ static struct buffer_desc *chainup_buffers(struct device *dev,
void *ptr;
nbytes -= len;
- ptr = page_address(sg_page(sg)) + sg->offset;
+ ptr = sg_virt(sg);
next_buf = dma_pool_alloc(buffer_pool, flags, &next_buf_phys);
if (!next_buf) {
buf = NULL;
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] iommu: use sg_phys()
2017-03-23 13:16 [PATCH] crypto: ixp4xx - Use sg_virt() Geliang Tang
@ 2017-03-23 13:16 ` Geliang Tang
2017-03-23 13:16 ` [PATCH] microblaze: " Geliang Tang
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2017-03-23 13:16 UTC (permalink / raw)
To: David Woodhouse, Joerg Roedel; +Cc: Geliang Tang, iommu, linux-kernel
Use sg_phys() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
drivers/iommu/intel-iommu.c | 2 +-
drivers/iommu/iommu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index d412a31..9d09a9e 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3892,7 +3892,7 @@ static int intel_nontranslate_map_sg(struct device *hddev,
for_each_sg(sglist, sg, nelems, i) {
BUG_ON(!sg_page(sg));
- sg->dma_address = page_to_phys(sg_page(sg)) + sg->offset;
+ sg->dma_address = sg_phys(sg);
sg->dma_length = sg->length;
}
return nelems;
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 3b67144..26f57b3 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1603,7 +1603,7 @@ size_t default_iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
min_pagesz = 1 << __ffs(domain->pgsize_bitmap);
for_each_sg(sg, s, nents, i) {
- phys_addr_t phys = page_to_phys(sg_page(s)) + s->offset;
+ phys_addr_t phys = sg_phys(s);
/*
* We are mapping on IOMMU page boundaries, so offset within
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] microblaze: use sg_phys()
2017-03-23 13:16 [PATCH] crypto: ixp4xx - Use sg_virt() Geliang Tang
2017-03-23 13:16 ` [PATCH] iommu: use sg_phys() Geliang Tang
@ 2017-03-23 13:16 ` Geliang Tang
2017-05-29 9:00 ` Michal Simek
2017-03-23 13:16 ` [PATCH] qla2xxx: use sg_virt() Geliang Tang
` (2 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Geliang Tang @ 2017-03-23 13:16 UTC (permalink / raw)
To: Michal Simek, Andrew Morton, Robin Murphy,
Hans-Christian Noren Egtvedt, Joerg Roedel, Bart Van Assche,
Alexander Duyck, Krzysztof Kozlowski
Cc: Geliang Tang, linux-kernel
Use sg_phys() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
arch/microblaze/kernel/dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
index 12e093a..e45ada8 100644
--- a/arch/microblaze/kernel/dma.c
+++ b/arch/microblaze/kernel/dma.c
@@ -65,8 +65,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
if (attrs & DMA_ATTR_SKIP_CPU_SYNC)
continue;
- __dma_sync(page_to_phys(sg_page(sg)) + sg->offset,
- sg->length, direction);
+ __dma_sync(sg_phys(sg), sg->length, direction);
}
return nents;
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] qla2xxx: use sg_virt()
2017-03-23 13:16 [PATCH] crypto: ixp4xx - Use sg_virt() Geliang Tang
2017-03-23 13:16 ` [PATCH] iommu: use sg_phys() Geliang Tang
2017-03-23 13:16 ` [PATCH] microblaze: " Geliang Tang
@ 2017-03-23 13:16 ` Geliang Tang
2017-03-23 17:48 ` [PATCH] crypto: ixp4xx - Use sg_virt() David Miller
2017-03-24 14:17 ` Herbert Xu
4 siblings, 0 replies; 7+ messages in thread
From: Geliang Tang @ 2017-03-23 13:16 UTC (permalink / raw)
To: qla2xxx-upstream, James E.J. Bottomley, Martin K. Petersen
Cc: Geliang Tang, linux-scsi, linux-kernel
Use sg_virt() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
drivers/scsi/qla2xxx/qla_isr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 3203367..9610d85 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1991,7 +1991,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
return 1;
}
- spt = page_address(sg_page(sg)) + sg->offset;
+ spt = sg_virt(sg);
spt += j;
spt->app_tag = 0xffff;
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] crypto: ixp4xx - Use sg_virt()
2017-03-23 13:16 [PATCH] crypto: ixp4xx - Use sg_virt() Geliang Tang
` (2 preceding siblings ...)
2017-03-23 13:16 ` [PATCH] qla2xxx: use sg_virt() Geliang Tang
@ 2017-03-23 17:48 ` David Miller
2017-03-24 14:17 ` Herbert Xu
4 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2017-03-23 17:48 UTC (permalink / raw)
To: geliangtang; +Cc: herbert, linux-crypto, linux-kernel
From: Geliang Tang <geliangtang@gmail.com>
Date: Thu, 23 Mar 2017 21:16:30 +0800
> Use sg_virt() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] crypto: ixp4xx - Use sg_virt()
2017-03-23 13:16 [PATCH] crypto: ixp4xx - Use sg_virt() Geliang Tang
` (3 preceding siblings ...)
2017-03-23 17:48 ` [PATCH] crypto: ixp4xx - Use sg_virt() David Miller
@ 2017-03-24 14:17 ` Herbert Xu
4 siblings, 0 replies; 7+ messages in thread
From: Herbert Xu @ 2017-03-24 14:17 UTC (permalink / raw)
To: Geliang Tang; +Cc: David S. Miller, linux-crypto, linux-kernel
On Thu, Mar 23, 2017 at 09:16:30PM +0800, Geliang Tang wrote:
> Use sg_virt() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] microblaze: use sg_phys()
2017-03-23 13:16 ` [PATCH] microblaze: " Geliang Tang
@ 2017-05-29 9:00 ` Michal Simek
0 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2017-05-29 9:00 UTC (permalink / raw)
To: Geliang Tang, Andrew Morton, Robin Murphy,
Hans-Christian Noren Egtvedt, Joerg Roedel, Bart Van Assche,
Alexander Duyck, Krzysztof Kozlowski
Cc: linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1078 bytes --]
On 23.3.2017 14:16, Geliang Tang wrote:
> Use sg_phys() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> arch/microblaze/kernel/dma.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
> index 12e093a..e45ada8 100644
> --- a/arch/microblaze/kernel/dma.c
> +++ b/arch/microblaze/kernel/dma.c
> @@ -65,8 +65,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
> if (attrs & DMA_ATTR_SKIP_CPU_SYNC)
> continue;
>
> - __dma_sync(page_to_phys(sg_page(sg)) + sg->offset,
> - sg->length, direction);
> + __dma_sync(sg_phys(sg), sg->length, direction);
> }
>
> return nents;
>
Applied.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-05-29 9:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 13:16 [PATCH] crypto: ixp4xx - Use sg_virt() Geliang Tang
2017-03-23 13:16 ` [PATCH] iommu: use sg_phys() Geliang Tang
2017-03-23 13:16 ` [PATCH] microblaze: " Geliang Tang
2017-05-29 9:00 ` Michal Simek
2017-03-23 13:16 ` [PATCH] qla2xxx: use sg_virt() Geliang Tang
2017-03-23 17:48 ` [PATCH] crypto: ixp4xx - Use sg_virt() David Miller
2017-03-24 14:17 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.