All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: Avoid migration of already disabled irqs (ia64)
@ 2007-02-01 13:08 Magnus Damm
  0 siblings, 0 replies; 3+ messages in thread
From: Magnus Damm @ 2007-02-01 13:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, jlan, nanhai.zou, magnus.damm, Magnus Damm, horms

kexec: Avoid migration of already disabled irqs (ia64)

This patch fixes up ia64 kexec support for HP rx2620 hardware. It does this 
by skipping migration of already disabled irqs. This is most likely a problem
on other ia64 platforms as well, but I've only been able to reproduce it on
one machine so far.

The full story is that handle_bad_irq() gets invoked before starting the new 
kernel without this patch. This seems to happen when fixup_irqs() calls 
generic_handle_irq() on already migrated (and disabled) irqs. So by avoiding
migration of disabled irqs we stay away of handle_bad_irq().

The code has been tested on three different ia64 machines, all with good 
results. It is possible to trigger the same bug by offlining a processor
using echo 0 > /sys/devices/system/cpu/cpuX/online.

More detailed information is available in the following mail thread:
http://lists.osdl.org/pipermail/fastboot/2007-January/thread.html#5774

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
Acked-by: Zou, Nanhai <nanhai.zou@intel.com>
Acked-by: Jay Lan <jlan@sgi.com>
---

 Tested using kexec-tools-testing 7792798a79b78a5d566f70c9f00237d050b01350
 on HP rx2620 hardware.

 Applies on top of 2.6.20-rc7.

 arch/ia64/kernel/irq.c |    3 +++
 1 file changed, 3 insertions(+)

--- 0001/arch/ia64/kernel/irq.c
+++ 0004/arch/ia64/kernel/irq.c	2007-01-30 12:35:10.000000000 +0900
@@ -122,6 +122,9 @@ static void migrate_irqs(void)
 	for (irq=0; irq < NR_IRQS; irq++) {
 		desc = irq_desc + irq;
 
+		if (desc->status == IRQ_DISABLED)
+			continue;
+
 		/*
 		 * No handling for now.
 		 * TBD: Implement a disable function so we can now

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

* Re: [PATCH] kexec: Avoid migration of already disabled irqs (ia64)
  2007-01-30  8:19 Magnus Damm
@ 2007-01-31  3:05 ` Horms
  0 siblings, 0 replies; 3+ messages in thread
From: Horms @ 2007-01-31  3:05 UTC (permalink / raw)
  To: linux-ia64

On Tue, Jan 30, 2007 at 05:19:51PM +0900, Magnus Damm wrote:
> kexec: Avoid migration of already disabled irqs (ia64)
> 
> This patch fixes up ia64 kexec support for HP rx2620 hardware. It does this 
> by skipping migration of already disabled irqs. This is most likely a problem
> on other ia64 platforms as well, but I've only tested this on one machine
> so far.
> 
> The full story is that handle_bad_irq() gets invoked before starting the new 
> kernel without this patch. This seems to happen when fixup_irqs() calls 
> generic_handle_irq() on already migrated (and disabled) irqs. So by avoiding
> migration of disabled irqs we stay away of handle_bad_irq().
> 
> Signed-off-by: Magnus Damm <magnus@valinux.co.jp>

Although I was not seing this problem on my Tiger2, your change
doesn't seem to break kexec on that patform :)

Acked-by: Simon Horman <horms@verge.net.au>

> ---
> 
>  Tested using kexec-tools-testing 7792798a79b78a5d566f70c9f00237d050b01350
>  on HP rx2620 hardware.
> 
>  Applies on top of 2.6.20-rc6.
> 
>  arch/ia64/kernel/irq.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- 0001/arch/ia64/kernel/irq.c
> +++ 0004/arch/ia64/kernel/irq.c	2007-01-30 12:35:10.000000000 +0900
> @@ -122,6 +122,9 @@ static void migrate_irqs(void)
>  	for (irq=0; irq < NR_IRQS; irq++) {
>  		desc = irq_desc + irq;
>  
> +		if (desc->status = IRQ_DISABLED)
> +			continue;
> +
>  		/*
>  		 * No handling for now.
>  		 * TBD: Implement a disable function so we can now

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

* [PATCH] kexec: Avoid migration of already disabled irqs (ia64)
@ 2007-01-30  8:19 Magnus Damm
  2007-01-31  3:05 ` Horms
  0 siblings, 1 reply; 3+ messages in thread
From: Magnus Damm @ 2007-01-30  8:19 UTC (permalink / raw)
  To: linux-ia64

kexec: Avoid migration of already disabled irqs (ia64)

This patch fixes up ia64 kexec support for HP rx2620 hardware. It does this 
by skipping migration of already disabled irqs. This is most likely a problem
on other ia64 platforms as well, but I've only tested this on one machine
so far.

The full story is that handle_bad_irq() gets invoked before starting the new 
kernel without this patch. This seems to happen when fixup_irqs() calls 
generic_handle_irq() on already migrated (and disabled) irqs. So by avoiding
migration of disabled irqs we stay away of handle_bad_irq().

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---

 Tested using kexec-tools-testing 7792798a79b78a5d566f70c9f00237d050b01350
 on HP rx2620 hardware.

 Applies on top of 2.6.20-rc6.

 arch/ia64/kernel/irq.c |    3 +++
 1 file changed, 3 insertions(+)

--- 0001/arch/ia64/kernel/irq.c
+++ 0004/arch/ia64/kernel/irq.c	2007-01-30 12:35:10.000000000 +0900
@@ -122,6 +122,9 @@ static void migrate_irqs(void)
 	for (irq=0; irq < NR_IRQS; irq++) {
 		desc = irq_desc + irq;
 
+		if (desc->status = IRQ_DISABLED)
+			continue;
+
 		/*
 		 * No handling for now.
 		 * TBD: Implement a disable function so we can now

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

end of thread, other threads:[~2007-02-01 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-01 13:08 [PATCH] kexec: Avoid migration of already disabled irqs (ia64) Magnus Damm
  -- strict thread matches above, loose matches on Subject: below --
2007-01-30  8:19 Magnus Damm
2007-01-31  3:05 ` Horms

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.