* [PATCH] Avoid calling get_irq_server() with a real, not virtual irq.
@ 2006-12-14 4:35 Michal Ostrowski
2006-12-14 5:40 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Michal Ostrowski @ 2006-12-14 4:35 UTC (permalink / raw)
To: linuxppc-dev
We can use default_server when masking an interrupt vector.
get_irq_server() assumes a virtual irq, so badness may happen if we
give it a real one.
Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
---
arch/powerpc/platforms/pseries/xics.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index d071abe..7223595 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -224,7 +224,6 @@ static void xics_unmask_irq(unsigned int
static void xics_mask_real_irq(unsigned int irq)
{
int call_status;
- unsigned int server;
if (irq == XICS_IPI)
return;
@@ -236,9 +235,9 @@ static void xics_mask_real_irq(unsigned
return;
}
- server = get_irq_server(irq);
/* Have to set XIVE to 0xff to be able to remove a slot */
- call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, 0xff);
+ call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq,
+ default_server, 0xff);
if (call_status != 0) {
printk(KERN_ERR "xics_disable_irq: irq=%u: ibm_set_xive(0xff)"
" returned %d\n", irq, call_status);
--
1.4.1.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Avoid calling get_irq_server() with a real, not virtual irq.
2006-12-14 4:35 [PATCH] Avoid calling get_irq_server() with a real, not virtual irq Michal Ostrowski
@ 2006-12-14 5:40 ` Benjamin Herrenschmidt
2006-12-14 12:46 ` Michal Ostrowski
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2006-12-14 5:40 UTC (permalink / raw)
To: Michal Ostrowski; +Cc: linuxppc-dev
On Wed, 2006-12-13 at 22:35 -0600, Michal Ostrowski wrote:
> We can use default_server when masking an interrupt vector.
Is that guaranteed by PAPR ?
Ben.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Avoid calling get_irq_server() with a real, not virtual irq.
2006-12-14 5:40 ` Benjamin Herrenschmidt
@ 2006-12-14 12:46 ` Michal Ostrowski
0 siblings, 0 replies; 3+ messages in thread
From: Michal Ostrowski @ 2006-12-14 12:46 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
If you set the priority level to 0xff, you've disabled the interrupt:
the XICS model prohibits it from being delivered.
On the other hand, calling get_irq_server() is obviously wrong.
xics_remap_irq() calls xics_mask_real_irq() in the case that it was not
able to convert real->virt. That being the case, how can we expect
xics_mask_real_irq to be able to do so in order to call
get_irq_server()?
--
Michal Ostrowski <mostrows@watson.ibm.com>
On Thu, 2006-12-14 at 16:40 +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2006-12-13 at 22:35 -0600, Michal Ostrowski wrote:
>
> > We can use default_server when masking an interrupt vector.
>
> Is that guaranteed by PAPR ?
>
> Ben.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-14 12:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-14 4:35 [PATCH] Avoid calling get_irq_server() with a real, not virtual irq Michal Ostrowski
2006-12-14 5:40 ` Benjamin Herrenschmidt
2006-12-14 12:46 ` Michal Ostrowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).