Linux-Crypto Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] crypto: hisilicon/qm: Change type of pasid to u32
@ 2020-06-25 20:07 Fenghua Yu
  2020-07-01 11:36 ` Zhou Wang
  2020-07-03  4:49 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Fenghua Yu @ 2020-06-25 20:07 UTC (permalink / raw)
  To: Zhou Wang, Tony Luck, Ashok Raj, Joerg Roedel, Thomas Gleixner,
	Ravi V Shankar
  Cc: linux-crypto, Fenghua Yu

PASID is defined as "int" although it's a 20-bit value and shouldn't be
negative int. To be consistent with PASID type in iommu, define PASID
as "u32".

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
PASID type will be changed consistently as u32:
https://lore.kernel.org/patchwork/patch/1257770/

 drivers/crypto/hisilicon/qm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index 9bb263cec6c3..8697dacf926d 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -1741,7 +1741,7 @@ void hisi_qm_release_qp(struct hisi_qp *qp)
 }
 EXPORT_SYMBOL_GPL(hisi_qm_release_qp);
 
-static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, int pasid)
+static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
 {
 	struct hisi_qm *qm = qp->qm;
 	struct device *dev = &qm->pdev->dev;
@@ -1813,7 +1813,7 @@ static int qm_start_qp_nolock(struct hisi_qp *qp, unsigned long arg)
 	struct hisi_qm *qm = qp->qm;
 	struct device *dev = &qm->pdev->dev;
 	int qp_id = qp->qp_id;
-	int pasid = arg;
+	u32 pasid = arg;
 	int ret;
 
 	if (!qm_qp_avail_state(qm, qp, QP_START))
-- 
2.19.1


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

* Re: [PATCH] crypto: hisilicon/qm: Change type of pasid to u32
  2020-06-25 20:07 [PATCH] crypto: hisilicon/qm: Change type of pasid to u32 Fenghua Yu
@ 2020-07-01 11:36 ` Zhou Wang
  2020-07-03  4:49 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Zhou Wang @ 2020-07-01 11:36 UTC (permalink / raw)
  To: Fenghua Yu, Tony Luck, Ashok Raj, Joerg Roedel, Thomas Gleixner,
	Ravi V Shankar
  Cc: linux-crypto

On 2020/6/26 4:07, Fenghua Yu wrote:
> PASID is defined as "int" although it's a 20-bit value and shouldn't be
> negative int. To be consistent with PASID type in iommu, define PASID
> as "u32".
> 
> Suggested-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>

Hi Fenghua,

Looks good to me, thanks for fixing this.

Zhou

> ---
> PASID type will be changed consistently as u32:
> https://lore.kernel.org/patchwork/patch/1257770/
> 
>  drivers/crypto/hisilicon/qm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
> index 9bb263cec6c3..8697dacf926d 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -1741,7 +1741,7 @@ void hisi_qm_release_qp(struct hisi_qp *qp)
>  }
>  EXPORT_SYMBOL_GPL(hisi_qm_release_qp);
>  
> -static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, int pasid)
> +static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
>  {
>  	struct hisi_qm *qm = qp->qm;
>  	struct device *dev = &qm->pdev->dev;
> @@ -1813,7 +1813,7 @@ static int qm_start_qp_nolock(struct hisi_qp *qp, unsigned long arg)
>  	struct hisi_qm *qm = qp->qm;
>  	struct device *dev = &qm->pdev->dev;
>  	int qp_id = qp->qp_id;
> -	int pasid = arg;
> +	u32 pasid = arg;
>  	int ret;
>  
>  	if (!qm_qp_avail_state(qm, qp, QP_START))
> 

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

* Re: [PATCH] crypto: hisilicon/qm: Change type of pasid to u32
  2020-06-25 20:07 [PATCH] crypto: hisilicon/qm: Change type of pasid to u32 Fenghua Yu
  2020-07-01 11:36 ` Zhou Wang
@ 2020-07-03  4:49 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2020-07-03  4:49 UTC (permalink / raw)
  To: Fenghua Yu
  Cc: wangzhou1, tony.luck, ashok.raj, joro, tglx, ravi.v.shankar,
	linux-crypto, fenghua.yu

Fenghua Yu <fenghua.yu@intel.com> wrote:
> PASID is defined as "int" although it's a 20-bit value and shouldn't be
> negative int. To be consistent with PASID type in iommu, define PASID
> as "u32".
> 
> Suggested-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> ---
> PASID type will be changed consistently as u32:
> https://lore.kernel.org/patchwork/patch/1257770/
> 
> drivers/crypto/hisilicon/qm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

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, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 20:07 [PATCH] crypto: hisilicon/qm: Change type of pasid to u32 Fenghua Yu
2020-07-01 11:36 ` Zhou Wang
2020-07-03  4:49 ` Herbert Xu

Linux-Crypto Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-crypto/0 linux-crypto/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-crypto linux-crypto/ https://lore.kernel.org/linux-crypto \
		linux-crypto@vger.kernel.org
	public-inbox-index linux-crypto

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-crypto


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git