From: akpm@osdl.org
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, ebs@ebshome.net,
listmember@orkun.us
Subject: [patch 026/198] ppc32: ppc4xx_pic - add acknowledge when enabling level-sensitive IRQ
Date: Tue, 12 Apr 2005 03:30:56 -0700 [thread overview]
Message-ID: <200504121031.j3CAV3PW005218@shell0.pdx.osdl.net> (raw)
From: Eugene Surovegin <ebs@ebshome.net>
This patch adds interrupt acknowledge to the PPC4xx PIC enable_irq
implementation for level-sensitive IRQ sources. This helps in cases when
enable/disable_irq is used in interrupt handlers for hardware, which
requires IRQ acknowledge to be issued from non-interrupt context (e.g.
when actual ACK in device needs an I2C transaction). For such strange
hardware, interrupt handler disables IRQ and defers actual ACK to some
other context. When this happens, IRQ is enabled again. For
level-sensitive sources we get spurious triggering right after IRQ is
enabled. This patch fixes this.
Suggested by Tolunay Orkun <listmember@orkun.us>.
Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/arch/ppc/syslib/ppc4xx_pic.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
diff -puN arch/ppc/syslib/ppc4xx_pic.c~ppc32-ppc4xx_pic-add-acknowledge-when-enabling-level-sensitive-irq arch/ppc/syslib/ppc4xx_pic.c
--- 25/arch/ppc/syslib/ppc4xx_pic.c~ppc32-ppc4xx_pic-add-acknowledge-when-enabling-level-sensitive-irq 2005-04-12 03:21:09.737656552 -0700
+++ 25-akpm/arch/ppc/syslib/ppc4xx_pic.c 2005-04-12 03:21:09.740656096 -0700
@@ -41,7 +41,10 @@ extern unsigned char ppc4xx_uic_ext_irq_
#define UIC_HANDLERS(n) \
static void ppc4xx_uic##n##_enable(unsigned int irq) \
{ \
- ppc_cached_irq_mask[n] |= IRQ_MASK_UIC##n(irq); \
+ u32 mask = IRQ_MASK_UIC##n(irq); \
+ if (irq_desc[irq].status & IRQ_LEVEL) \
+ mtdcr(DCRN_UIC_SR(UIC##n), mask); \
+ ppc_cached_irq_mask[n] |= mask; \
mtdcr(DCRN_UIC_ER(UIC##n), ppc_cached_irq_mask[n]); \
} \
\
_
reply other threads:[~2005-04-12 17:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200504121031.j3CAV3PW005218@shell0.pdx.osdl.net \
--to=akpm@osdl.org \
--cc=ebs@ebshome.net \
--cc=linux-kernel@vger.kernel.org \
--cc=listmember@orkun.us \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®