Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Lee Nipper <lee.nipper@freescale.com>
To: linux-crypto <linux-crypto@vger.kernel.org>
Cc: Kim Phillips <kim.phillips@freescale.com>
Subject: [PATCH] crypto: talitos - ack done interrupt in isr instead of tasklet
Date: Thu, 18 Dec 2008 12:35:05 -0600	[thread overview]
Message-ID: <1229625305.26363.190.camel@al08linux99> (raw)

Previous commit for interrupt mitigation moved the done interrupt
acknowlegement from the isr to the talitos_done tasklet.
This patch moves the done interrupt acknowledgement back
into the isr so that done interrupts will always be acknowledged.
This covers the case for acknowledging interrupts for channel done processing
that has actually already been completed by the tasklet prior to fielding
a pending interrupt.

Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
This patch applies to
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git

 drivers/crypto/talitos.c |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index c2294f2..d14c68d 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -330,11 +330,9 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch)
 
 		/* descriptors with their done bits set don't get the error */
 		rmb();
-		if ((request->desc->hdr & DESC_HDR_DONE) == DESC_HDR_DONE) {
+		if ((request->desc->hdr & DESC_HDR_DONE) == DESC_HDR_DONE)
 			status = 0;
-			/* Ack each pkt completed on channel */
-			out_be32(priv->reg + TALITOS_ICR, (1 << (ch * 2)));
-		} else
+		else
 			if (!error)
 				break;
 			else
@@ -575,17 +573,13 @@ static irqreturn_t talitos_interrupt(int irq, void *data)
 
 	isr = in_be32(priv->reg + TALITOS_ISR);
 	isr_lo = in_be32(priv->reg + TALITOS_ISR_LO);
+	/* Acknowledge interrupt */
+	out_be32(priv->reg + TALITOS_ICR, isr);
+	out_be32(priv->reg + TALITOS_ICR_LO, isr_lo);
 
-	if (unlikely((isr & ~TALITOS_ISR_CHDONE) || isr_lo)) {
-		/*
-		 * Acknowledge error interrupts here.
-		 * Done interrupts are ack'ed as part of done_task.
-		 */
-		out_be32(priv->reg + TALITOS_ICR, isr);
-		out_be32(priv->reg + TALITOS_ICR_LO, isr_lo);

             reply	other threads:[~2008-12-18 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18 18:35 Lee Nipper [this message]
2008-12-20  6:10 ` [PATCH] crypto: talitos - ack done interrupt in isr instead of tasklet 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=1229625305.26363.190.camel@al08linux99 \
    --to=lee.nipper@freescale.com \
    --cc=kim.phillips@freescale.com \
    --cc=linux-crypto@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox