linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: EOI and clear IPI fix in xics_teardown_cpu()
@ 2006-07-09  1:28 Haren Myneni
  2006-07-09  1:37 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Haren Myneni @ 2006-07-09  1:28 UTC (permalink / raw)
  To: Paul Mackerras, benh; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

If OK, please sent this patch to upstream.

Thanks
Haren

When invoked kdump boot, plpar_eoi() call is getting failed and calling 
panic().
Kernel panic - not syncing: bad return code EOI - rc = -4, value=ff000000

The issue is with the desc->chip->eoi(XICS_IPI) in xics_teardown_cpu(). 
Instead of passing the virq to desc->chip->eoi(), XICS_IPI is used. 
Also, clear IPI in xics_teardown_cpu() got removed recently (in 
2.6.17-git25).  Noticed in some crash dump cases (Ex: initiate kdump 
boot using soft-reset and xmon is enabled), IPI is not cleared for some 
CPU(s) before starting the kdump boot. Hence, causing the kdump boot 
failure.

Signed-off-by: Haren Myneni <haren@us.ibm.com>


 


[-- Attachment #2: ppc64-kdump-fix-eoi-IPI.patch --]
[-- Type: text/x-patch, Size: 802 bytes --]

--- 2618-rc1/arch/powerpc/platforms/pseries/xics.c.orig	2006-07-08 11:47:58.000000000 -0700
+++ 2618-rc1/arch/powerpc/platforms/pseries/xics.c	2006-07-08 11:47:07.000000000 -0700
@@ -783,6 +783,14 @@ void xics_teardown_cpu(int secondary)
 	xics_set_cpu_priority(cpu, 0);
 
 	/*
+	 * Clear IPI
+	 */
+	if (firmware_has_feature(FW_FEATURE_LPAR))
+		lpar_qirr_info(cpu, 0xff);
+	else
+		direct_qirr_info(cpu, 0xff);
+
+	/*
 	 * we need to EOI the IPI if we got here from kexec down IPI
 	 *
 	 * probably need to check all the other interrupts too
@@ -795,7 +803,7 @@ void xics_teardown_cpu(int secondary)
 		return;
 	desc = get_irq_desc(ipi);
 	if (desc->chip && desc->chip->eoi)
-		desc->chip->eoi(XICS_IPI);
+		desc->chip->eoi(ipi);
 
 	/*
 	 * Some machines need to have at least one cpu in the GIQ,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: EOI and clear IPI fix in xics_teardown_cpu()
  2006-07-09  1:28 [PATCH] powerpc: EOI and clear IPI fix in xics_teardown_cpu() Haren Myneni
@ 2006-07-09  1:37 ` Benjamin Herrenschmidt
  2006-07-09  2:17   ` Haren Myneni
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-07-09  1:37 UTC (permalink / raw)
  To: Haren Myneni; +Cc: linuxppc-dev, Paul Mackerras

On Sat, 2006-07-08 at 18:28 -0700, Haren Myneni wrote:
> If OK, please sent this patch to upstream.
> 
> Thanks
> Haren
> 
> When invoked kdump boot, plpar_eoi() call is getting failed and calling 
> panic().
> Kernel panic - not syncing: bad return code EOI - rc = -4, value=ff000000
> 
> The issue is with the desc->chip->eoi(XICS_IPI) in xics_teardown_cpu(). 
> Instead of passing the virq to desc->chip->eoi(), XICS_IPI is used. 
> Also, clear IPI in xics_teardown_cpu() got removed recently (in 
> 2.6.17-git25).  Noticed in some crash dump cases (Ex: initiate kdump 
> boot using soft-reset and xmon is enabled), IPI is not cleared for some 
> CPU(s) before starting the kdump boot. Hence, causing the kdump boot 
> failure.

It's already fixed in my latest patch that fixes some issues with the
new irq rework. Hopefully, paul will send the patch upstream tomorrow
after we had a chance to test it a bit more.

Cheers,
Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: EOI and clear IPI fix in xics_teardown_cpu()
  2006-07-09  1:37 ` Benjamin Herrenschmidt
@ 2006-07-09  2:17   ` Haren Myneni
  2006-07-09  4:08     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Haren Myneni @ 2006-07-09  2:17 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

Benjamin Herrenschmidt wrote:

>On Sat, 2006-07-08 at 18:28 -0700, Haren Myneni wrote:
>  
>
>>If OK, please sent this patch to upstream.
>>
>>Thanks
>>Haren
>>
>>When invoked kdump boot, plpar_eoi() call is getting failed and calling 
>>panic().
>>Kernel panic - not syncing: bad return code EOI - rc = -4, value=ff000000
>>
>>The issue is with the desc->chip->eoi(XICS_IPI) in xics_teardown_cpu(). 
>>Instead of passing the virq to desc->chip->eoi(), XICS_IPI is used. 
>>Also, clear IPI in xics_teardown_cpu() got removed recently (in 
>>2.6.17-git25).  Noticed in some crash dump cases (Ex: initiate kdump 
>>boot using soft-reset and xmon is enabled), IPI is not cleared for some 
>>CPU(s) before starting the kdump boot. Hence, causing the kdump boot 
>>failure.
>>    
>>
>
>It's already fixed in my latest patch that fixes some issues with the
>new irq rework. Hopefully, paul will send the patch upstream tomorrow
>after we had a chance to test it a bit more.
>
>Cheers,
>Ben
>
>  
>
Ok, Are you talking about the patch posted 
http://ozlabs.org/pipermail/linuxppc-dev/2006-July/024350.html? Sorry, I 
did not notice it before I posted. Yes, it is fixed passing proper ipi 
value to desc->chip->eoi(). But, we also to need to clear IPI  in 
xics_teardown_cpu(). 
 
Thanks
Haren





[-- Attachment #2: ppc64-kdump-clear-IPI-fix.patch --]
[-- Type: text/x-patch, Size: 545 bytes --]

--- 2618-rc1/arch/powerpc/platforms/pseries/xics.c.orig	2006-07-08 13:14:29.000000000 -0700
+++ 2618-rc1/arch/powerpc/platforms/pseries/xics.c	2006-07-08 11:47:07.000000000 -0700
@@ -783,6 +783,14 @@ void xics_teardown_cpu(int secondary)
 	xics_set_cpu_priority(cpu, 0);
 
 	/*
+	 * Clear IPI
+	 */
+	if (firmware_has_feature(FW_FEATURE_LPAR))
+		lpar_qirr_info(cpu, 0xff);
+	else
+		direct_qirr_info(cpu, 0xff);
+
+	/*
 	 * we need to EOI the IPI if we got here from kexec down IPI
 	 *
 	 * probably need to check all the other interrupts too

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: EOI and clear IPI fix in xics_teardown_cpu()
  2006-07-09  2:17   ` Haren Myneni
@ 2006-07-09  4:08     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-07-09  4:08 UTC (permalink / raw)
  To: Haren Myneni; +Cc: linuxppc-dev, Paul Mackerras


> Ok, Are you talking about the patch posted 
> http://ozlabs.org/pipermail/linuxppc-dev/2006-July/024350.html? Sorry, I 
> did not notice it before I posted. Yes, it is fixed passing proper ipi 
> value to desc->chip->eoi(). But, we also to need to clear IPI  in 
> xics_teardown_cpu(). 

Ok, I'll fix that too.

Ben.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-09  4:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-09  1:28 [PATCH] powerpc: EOI and clear IPI fix in xics_teardown_cpu() Haren Myneni
2006-07-09  1:37 ` Benjamin Herrenschmidt
2006-07-09  2:17   ` Haren Myneni
2006-07-09  4:08     ` Benjamin Herrenschmidt

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).