linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: ccp: Fix DMA operations when IOMMU is enabled
@ 2017-01-27 21:28 Gary R Hook
  2017-02-02 17:14 ` Gary R Hook
  2017-02-03 10:21 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Gary R Hook @ 2017-01-27 21:28 UTC (permalink / raw)
  To: linux-crypto; +Cc: thomas.lendacky, herbert, davem

An I/O page fault occurs when the IOMMU is enabled on a
system that supports the v5 CCP.  DMA operations use a
Request ID value that does not match what is expected by
the IOMMU, resulting in the I/O page fault.  Setting the
Request ID value to 0 corrects this issue.

Signed-off-by: Gary R Hook <gary.hook@amd.com>
---
 drivers/crypto/ccp/ccp-dev-v5.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index e2ce819..612898b 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -959,7 +959,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data)
 static void ccp5_config(struct ccp_device *ccp)
 {
 	/* Public side */
-	iowrite32(0x00001249, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET);
+	iowrite32(0x0, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET);
 }
 
 static void ccp5other_config(struct ccp_device *ccp)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: ccp: Fix DMA operations when IOMMU is enabled
  2017-01-27 21:28 [PATCH] crypto: ccp: Fix DMA operations when IOMMU is enabled Gary R Hook
@ 2017-02-02 17:14 ` Gary R Hook
  2017-02-03 10:21 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Gary R Hook @ 2017-02-02 17:14 UTC (permalink / raw)
  To: linux-crypto; +Cc: herbert, davem

On 01/27/2017 03:28 PM, Gary R Hook wrote:
> An I/O page fault occurs when the IOMMU is enabled on a
> system that supports the v5 CCP.  DMA operations use a
> Request ID value that does not match what is expected by
> the IOMMU, resulting in the I/O page fault.  Setting the
> Request ID value to 0 corrects this issue.

Herbert,

Hoping to get some 4.10 love on this patch, plus one other. Do we see
a possibility at this late date?

>
> Signed-off-by: Gary R Hook <gary.hook@amd.com>
> ---
>  drivers/crypto/ccp/ccp-dev-v5.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
> index e2ce819..612898b 100644
> --- a/drivers/crypto/ccp/ccp-dev-v5.c
> +++ b/drivers/crypto/ccp/ccp-dev-v5.c
> @@ -959,7 +959,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data)
>  static void ccp5_config(struct ccp_device *ccp)
>  {
>  	/* Public side */
> -	iowrite32(0x00001249, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET);
> +	iowrite32(0x0, ccp->io_regs + CMD5_REQID_CONFIG_OFFSET);
>  }
>
>  static void ccp5other_config(struct ccp_device *ccp)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
This is my day job. Follow me at:
IG/Twitter/Facebook: @grhookphoto
IG/Twitter/Facebook: @grhphotographer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: ccp: Fix DMA operations when IOMMU is enabled
  2017-01-27 21:28 [PATCH] crypto: ccp: Fix DMA operations when IOMMU is enabled Gary R Hook
  2017-02-02 17:14 ` Gary R Hook
@ 2017-02-03 10:21 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2017-02-03 10:21 UTC (permalink / raw)
  To: Gary R Hook; +Cc: linux-crypto, thomas.lendacky, davem

On Fri, Jan 27, 2017 at 03:28:45PM -0600, Gary R Hook wrote:
> An I/O page fault occurs when the IOMMU is enabled on a
> system that supports the v5 CCP.  DMA operations use a
> Request ID value that does not match what is expected by
> the IOMMU, resulting in the I/O page fault.  Setting the
> Request ID value to 0 corrects this issue.
> 
> Signed-off-by: Gary R Hook <gary.hook@amd.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] 3+ messages in thread

end of thread, other threads:[~2017-02-03 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 21:28 [PATCH] crypto: ccp: Fix DMA operations when IOMMU is enabled Gary R Hook
2017-02-02 17:14 ` Gary R Hook
2017-02-03 10:21 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).