All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@sgi.com>
To: linux-arch@vger.kernel.org
Cc: Keith Owens <kaos@sgi.com>
Subject: [patch 2.6.19-rc5 8/12] crash_stop: ia64 interrupt handlers
Date: Thu, 09 Nov 2006 15:05:03 +1100	[thread overview]
Message-ID: <20061109040503.17391.66138.sendpatchset@chook.melbourne.sgi.com> (raw)
In-Reply-To: <20061109040418.17391.16362.sendpatchset@chook.melbourne.sgi.com>

Define the ia64 crash_stop() interrupt handler and associated routines.

IPI_CRASH_STOP conflicts with the KDB vector.  This is deliberate, one
aim of the crash_stop() API is to remove all the interrupt code from
the various kernel debug patches and use the common crash_stop code
instead.

Signed-off-by: Keith Owens <kaos@sgi.com>
---
 arch/ia64/kernel/smp.c |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

Index: linux/arch/ia64/kernel/smp.c
===================================================================
--- linux.orig/arch/ia64/kernel/smp.c
+++ linux/arch/ia64/kernel/smp.c
@@ -30,6 +30,7 @@
 #include <linux/delay.h>
 #include <linux/efi.h>
 #include <linux/bitops.h>
+#include <linux/crash_stop.h>
 
 #include <asm/atomic.h>
 #include <asm/current.h>
@@ -66,6 +67,7 @@ static volatile struct call_data_struct 
 
 #define IPI_CALL_FUNC		0
 #define IPI_CPU_STOP		1
+#define IPI_CRASH_STOP		2
 
 /* This needs to be cacheline aligned because it is written to by *other* CPUs.  */
 static DEFINE_PER_CPU(u64, ipi_operation) ____cacheline_aligned;
@@ -156,6 +158,16 @@ handle_IPI (int irq, void *dev_id)
 				stop_this_cpu();
 				break;
 
+#ifdef	CONFIG_CRASH_STOP_SUPPORTED
+			      case IPI_CRASH_STOP:
+				{
+					extern void smp_crash_stop_interrupt(
+						    struct pt_regs *regs);
+					smp_crash_stop_interrupt(get_irq_regs());
+				}
+				break;
+#endif	/* CONFIG_CRASH_STOP_SUPPORTED */
+
 			      default:
 				printk(KERN_CRIT "Unknown IPI on CPU %d: %lu\n", this_cpu, which);
 				break;
@@ -379,3 +391,26 @@ setup_profiling_timer (unsigned int mult
 {
 	return -EINVAL;
 }
+
+#ifdef	CONFIG_CRASH_STOP_SUPPORTED
+void
+cs_arch_send_ipi(int cpu)
+{
+	send_IPI_single(cpu, IPI_CRASH_STOP);
+}
+
+void
+cs_arch_send_nmi(int cpu)
+{
+	set_mb(cs_arch_monarch_cpu, smp_processor_id());
+	platform_send_ipi(cpu, 0, IA64_IPI_DM_INIT, 0);
+}
+
+void
+smp_crash_stop_interrupt(struct pt_regs *regs)
+{
+	struct pt_regs *old_regs = set_irq_regs(regs);
+	cs_common_ipi();
+	set_irq_regs(old_regs);
+}
+#endif	/* CONFIG_CRASH_STOP_SUPPORTED */

  parent reply	other threads:[~2006-11-09  4:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09  4:04 [patch 2.6.19-rc5 0/12] crash_stop: Summary Keith Owens
2006-11-09  4:04 ` [patch 2.6.19-rc5 1/12] crash_stop: common header Keith Owens
2006-11-09  4:04 ` [patch 2.6.19-rc5 2/12] crash_stop: common code Keith Owens
2006-11-09  4:04 ` [patch 2.6.19-rc5 3/12] crash_stop: i386 interrupt handlers Keith Owens
2006-11-09  4:04 ` [patch 2.6.19-rc5 4/12] crash_stop: i386 specific code Keith Owens
2006-11-09  4:04 ` [patch 2.6.19-rc5 5/12] crash_stop: add DIE_NMIWATCHDOG to x86_64 Keith Owens
2006-11-09  4:04 ` [patch 2.6.19-rc5 6/12] crash_stop: x86_64 interrupt handlers Keith Owens
2006-11-09  4:04 ` [patch 2.6.19-rc5 7/12] crash_stop: x86_64 specific code Keith Owens
2006-11-09  4:05 ` Keith Owens [this message]
2006-11-09  4:05 ` [patch 2.6.19-rc5 9/12] crash_stop: ia64 " Keith Owens
2006-11-09  4:05 ` [patch 2.6.19-rc5 10/12] crash_stop: add to config system Keith Owens
2006-11-09  4:05 ` [patch 2.6.19-rc5 11/12] crash_stop: demonstration code Keith Owens
2006-11-09  4:05 ` [patch 2.6.19-rc5 12/12] crash_stop: test code Keith Owens
2006-11-11  1:45 ` [patch 2.6.19-rc5 0/12] crash_stop: Summary Vivek Goyal
2006-11-13  2:08   ` Keith Owens

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=20061109040503.17391.66138.sendpatchset@chook.melbourne.sgi.com \
    --to=kaos@sgi.com \
    --cc=linux-arch@vger.kernel.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 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.