From: Sebastien Dugue <sebastien.dugue@bull.net>
To: Linux-rt <linux-rt-users@vger.kernel.org>
Cc: linux-ppc <linuxppc-dev@ozlabs.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <michael@ellerman.id.au>,
Tim Chavez <tinytim@us.ibm.com>,
Jean Pierre Dion <jean-pierre.dion@bull.net>,
Gilles Carry <Gilles.Carry@ext.bull.net>
Subject: [PATCH 1/2][RT] powerpc - XICS: move the call to irq_radix_revmap from xics_startup to xics_host_map
Date: Thu, 24 Jul 2008 12:48:53 +0200 [thread overview]
Message-ID: <20080724124853.43a1157c@bull.net> (raw)
In-Reply-To: <20080724122352.3bc76bda@bull.net>
From: Sebastien Dugue <sebastien.dugue@bull.net>
Date: Tue, 22 Jul 2008 13:05:24 +0200
Subject: [PATCH][RT] powerpc - XICS: move the call to irq_radix_revmap from xics_startup to xics_host_map
This patch moves the insertion of an irq into the reverse mapping radix tree
from xics_startup() into xics_host_map().
The reason for this change is that xics_startup() is called with preemption
disabled (which is not the case for xics_host_map()) which is a problem under a
preempt-rt kernel as we cannot even allocate GFP_ATOMIC memory for the radix tree
nodes.
Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/platforms/pseries/xics.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
Index: linux-2.6.25.8-rt7/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-2.6.25.8-rt7.orig/arch/powerpc/platforms/pseries/xics.c
+++ linux-2.6.25.8-rt7/arch/powerpc/platforms/pseries/xics.c
@@ -311,12 +311,6 @@ static void xics_mask_irq(unsigned int v
static unsigned int xics_startup(unsigned int virq)
{
- unsigned int irq;
-
- /* force a reverse mapping of the interrupt so it gets in the cache */
- irq = (unsigned int)irq_map[virq].hwirq;
- irq_radix_revmap(xics_host, irq);
-
/* unmask it */
xics_unmask_irq(virq);
return 0;
@@ -529,8 +523,14 @@ static int xics_host_match(struct irq_ho
static int xics_host_map_direct(struct irq_host *h, unsigned int virq,
irq_hw_number_t hw)
{
+ unsigned int irq;
+
pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw);
+ /* force a reverse mapping of the interrupt so it gets in the cache */
+ irq = (unsigned int)irq_map[virq].hwirq;
+ irq_radix_revmap(xics_host, irq);
+
get_irq_desc(virq)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(virq, &xics_pic_direct, handle_fasteoi_irq);
return 0;
@@ -539,8 +539,14 @@ static int xics_host_map_direct(struct i
static int xics_host_map_lpar(struct irq_host *h, unsigned int virq,
irq_hw_number_t hw)
{
+ unsigned int irq;
+
pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw);
+ /* force a reverse mapping of the interrupt so it gets in the cache */
+ irq = (unsigned int)irq_map[virq].hwirq;
+ irq_radix_revmap(xics_host, irq);
+
get_irq_desc(virq)->status |= IRQ_LEVEL;
set_irq_chip_and_handler(virq, &xics_pic_lpar, handle_fasteoi_irq);
return 0;
next prev parent reply other threads:[~2008-07-24 10:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 10:23 [PATCH 0/2][RT] powerpc - fix bug in irq reverse mapping radix tree (Resend) Sebastien Dugue
2008-07-24 10:48 ` Sebastien Dugue [this message]
2008-07-24 10:50 ` [PATCH 2/2][RT] powerpc - Make the irq reverse mapping radix tree lockless Sebastien Dugue
2008-07-24 11:11 ` Nick Piggin
2008-07-24 12:18 ` Sebastien Dugue
2008-07-25 7:49 ` Peter Zijlstra
2008-07-25 8:27 ` Benjamin Herrenschmidt
2008-07-25 8:36 ` Sebastien Dugue
2008-07-25 8:40 ` Benjamin Herrenschmidt
2008-07-25 8:47 ` Sebastien Dugue
2008-07-25 8:34 ` Sebastien Dugue
2008-07-25 5:13 ` Benjamin Herrenschmidt
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=20080724124853.43a1157c@bull.net \
--to=sebastien.dugue@bull.net \
--cc=Gilles.Carry@ext.bull.net \
--cc=benh@kernel.crashing.org \
--cc=jean-pierre.dion@bull.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.org \
--cc=tinytim@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox