All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weili Qian <qianweili@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
	<wangzhou1@hisilicon.com>, <liulongfang@huawei.com>,
	Weili Qian <qianweili@huawei.com>
Subject: [PATCH 3/6] crypto: hisilicon/qm - modify the handling method after abnormal interruption
Date: Sat, 11 Dec 2021 19:25:16 +0800	[thread overview]
Message-ID: <20211211112519.21201-4-qianweili@huawei.com> (raw)
In-Reply-To: <20211211112519.21201-1-qianweili@huawei.com>

After processing an interrupt event and the interrupt function is
enabled by writing the QM_DOORBELL_CMD_AEQ register, the hardware
may generate new interrupt events due to processing other user's task
when the subsequent interrupt events have not been processed. The new
interrupt event will disrupt the current normal processing flow and
cause other problems.

Therefore, the operation of writing the QM_DOORBELL_CMD_AEQ doorbell
register needs to be placed after all interrupt events processing
are completed.

Signed-off-by: Weili Qian <qianweili@huawei.com>
---
 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 d124800b67e6..beea3a0fd0a5 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -1015,10 +1015,10 @@ static irqreturn_t qm_aeq_irq(int irq, void *data)
 			aeqe++;
 			qm->status.aeq_head++;
 		}
-
-		qm_db(qm, 0, QM_DOORBELL_CMD_AEQ, qm->status.aeq_head, 0);
 	}
 
+	qm_db(qm, 0, QM_DOORBELL_CMD_AEQ, qm->status.aeq_head, 0);
+
 	return IRQ_HANDLED;
 }
 
-- 
2.33.0


  parent reply	other threads:[~2021-12-11 11:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-11 11:25 [PATCH 0/6] crypto: hisilicon/qm - handling abnormal interrupts event Weili Qian
2021-12-11 11:25 ` [PATCH 1/6] crypto: hisilicon/qm - remove unnecessary device memory reset Weili Qian
2021-12-11 11:25 ` [PATCH 2/6] crypto: hisilicon/qm - code movement Weili Qian
2021-12-11 11:25 ` Weili Qian [this message]
2021-12-11 11:25 ` [PATCH 4/6] crypto: hisilicon/qm - use request_threaded_irq instead Weili Qian
2021-12-11 11:25 ` [PATCH 5/6] crypto: hisilicon/qm - reset function if event queue overflows Weili Qian
2021-12-11 11:25 ` [PATCH 6/6] crypto: hisilicon/qm - disable queue when 'CQ' error Weili Qian
2021-12-17  8:40 ` [PATCH 0/6] crypto: hisilicon/qm - handling abnormal interrupts event Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211211112519.21201-4-qianweili@huawei.com \
    --to=qianweili@huawei.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liulongfang@huawei.com \
    --cc=wangzhou1@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.