LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: <dayu@datangmobile.cn>
To: <olof@lixom.net>
Cc: linuxppc-dev@ozlabs.org, leoli@freescale.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix the interrupt loss problem on powerpc IPIC(2.6.25-2.6.28)
Date: Wed, 18 Feb 2009 13:47:42 +0800	[thread overview]
Message-ID: <D728AD1FA2543948B89DE29C5BF4CD0716AF9623@bjmail1.bj.datangmobile.com> (raw)

renew description in  the patch,  with this change the 'temp'  is still =
used to make code clear.

___________________________________________

From: Da Yu <dayu@datangmobile.cn>
Date: Wed, 18 Feb 2009 19:58:20 +0800
Subject: [PATCH] fix the interrupt loss problem on powerpc IPIC =
(2.6.25-2.6.28)

Description: The interrupt pending register is write 1 clear.  If there =
are more than one external interrupts pending at the same time, acking =
the first interrupt by reading pending register then OR the =
corresponding bit and write back to pending register will also clear =
other interrupt pending bits.  That will cause loss of interrupt.

Signed-off-by: Da Yu <dayu@datangmobile.cn>
---

--- a/arch/powerpc/sysdev/ipic.c	2009-02-18 09:47:04.000000000 +0800
+++ b/arch/powerpc/sysdev/ipic.c	2009-02-18 09:46:34.000000000 +0800
@@ -568,8 +568,7 @@ static void ipic_ack_irq(unsigned int vi

 	spin_lock_irqsave(&ipic_lock, flags);

-	temp =3D ipic_read(ipic->regs, ipic_info[src].ack);
-	temp |=3D (1 << (31 - ipic_info[src].bit));
+	temp =3D 1 << (31 - ipic_info[src].bit);
 	ipic_write(ipic->regs, ipic_info[src].ack, temp);

 	/* mb() can't guarantee that ack is finished.  But it does finish
@@ -592,8 +591,7 @@ static void ipic_mask_irq_and_ack(unsign
 	temp &=3D ~(1 << (31 - ipic_info[src].bit));
 	ipic_write(ipic->regs, ipic_info[src].mask, temp);

-	temp =3D ipic_read(ipic->regs, ipic_info[src].ack);
-	temp |=3D (1 << (31 - ipic_info[src].bit));
+	temp =3D 1 << (31 - ipic_info[src].bit);
 	ipic_write(ipic->regs, ipic_info[src].ack, temp);

 	/* mb() can't guarantee that ack is finished.  But it does finish



=20
=20

-----=D3=CA=BC=FE=D4=AD=BC=FE-----
=B7=A2=BC=FE=C8=CB: Olof Johansson [mailto:olof@lixom.net]=20
=B7=A2=CB=CD=CA=B1=BC=E4: 2009=C4=EA2=D4=C218=C8=D5 10:43
=CA=D5=BC=FE=C8=CB: =F3=CE=D3=ED
=B3=AD=CB=CD: leoli@freescale.com; galak@kernel.crashing.org; =
linuxppc-dev@ozlabs.org; linux-kernel@vger.kernel.org
=D6=F7=CC=E2: Re: [PATCH] fix the interrupt loss problem on powerpc =
IPIC(2.6.25-2.6.28)

On Wed, Feb 18, 2009 at 10:16:07AM +0800, dayu@datangmobile.cn wrote:
> From: Da Yu <dayu@datangmobile.cn>
> Date: Wed, 18 Feb 2009 19:58:20 +0800
> Subject: [PATCH] fix the interrupt loss problem on powerpc IPIC=20
> (2.6.25-2.6.28)
>=20
> Signed-off-by: Da Yu <dayu@datangmobile.cn>

Still no proper explanation in the patch.

Also, with this change, is 'temp' really needed, or can you just pass in =
the mask by hand?


-Olof

> ---
>=20
> --- a/arch/powerpc/sysdev/ipic.c	2009-02-18 09:47:04.000000000 +0800
> +++ b/arch/powerpc/sysdev/ipic.c	2009-02-18 09:46:34.000000000 +0800
> @@ -568,8 +568,7 @@ static void ipic_ack_irq(unsigned int vi
>=20
>  	spin_lock_irqsave(&ipic_lock, flags);
>=20
> -	temp =3D ipic_read(ipic->regs, ipic_info[src].ack);
> -	temp |=3D (1 << (31 - ipic_info[src].bit));
> +	temp =3D 1 << (31 - ipic_info[src].bit);
>  	ipic_write(ipic->regs, ipic_info[src].ack, temp);
>=20
>  	/* mb() can't guarantee that ack is finished.  But it does finish

             reply	other threads:[~2009-02-18  5:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18  5:47 dayu [this message]
2009-02-19 16:41 ` [PATCH] fix the interrupt loss problem on powerpc IPIC(2.6.25-2.6.28) Kumar Gala
  -- strict thread matches above, loose matches on Subject: below --
2009-02-18  2:16 [PATCH] fix the interrupt loss problem on powerpc IPIC (2.6.25-2.6.28) dayu
2009-02-18  2:43 ` Olof Johansson

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=D728AD1FA2543948B89DE29C5BF4CD0716AF9623@bjmail1.bj.datangmobile.com \
    --to=dayu@datangmobile.cn \
    --cc=leoli@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    /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