diff options
author | Will Deacon <will.deacon@arm.com> | 2010-03-12 05:03:58 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-15 10:33:04 -0400 |
commit | 5d8614cc5d6c5c02b7995ed97303481d4e3a8cc7 (patch) | |
tree | ee5015f229e3ef7e519e01585725a6301d49e609 /arch/arm/kernel | |
parent | 75216859d96f66856a0ee78c2de5b02115ff65f3 (diff) |
ARM: 5989/1: ARM: KGDB: add support for SMP platforms
To support SMP platforms, KGDB requires the architecture backend to
implement the kgdb_roundup_cpus function.
This patch, taken against 2.6.33, implements the function for ARM based
on the MIPS port.
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Jean-Michel Hautbois <jhautbois@gmail.com>
Cc: KGDB Mailing List <kgdb-bugreport@lists.sourceforge.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/kgdb.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c index ba8ccfede964..a5b846b9895d 100644 --- a/arch/arm/kernel/kgdb.c +++ b/arch/arm/kernel/kgdb.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * Authors: George Davis <davis_g@mvista.com> | 9 | * Authors: George Davis <davis_g@mvista.com> |
10 | * Deepak Saxena <dsaxena@plexity.net> | 10 | * Deepak Saxena <dsaxena@plexity.net> |
11 | */ | 11 | */ |
12 | #include <linux/irq.h> | ||
12 | #include <linux/kgdb.h> | 13 | #include <linux/kgdb.h> |
13 | #include <asm/traps.h> | 14 | #include <asm/traps.h> |
14 | 15 | ||
@@ -158,6 +159,18 @@ static struct undef_hook kgdb_compiled_brkpt_hook = { | |||
158 | .fn = kgdb_compiled_brk_fn | 159 | .fn = kgdb_compiled_brk_fn |
159 | }; | 160 | }; |
160 | 161 | ||
162 | static void kgdb_call_nmi_hook(void *ignored) | ||
163 | { | ||
164 | kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); | ||
165 | } | ||
166 | |||
167 | void kgdb_roundup_cpus(unsigned long flags) | ||
168 | { | ||
169 | local_irq_enable(); | ||
170 | smp_call_function(kgdb_call_nmi_hook, NULL, 0); | ||
171 | local_irq_disable(); | ||
172 | } | ||
173 | |||
161 | /** | 174 | /** |
162 | * kgdb_arch_init - Perform any architecture specific initalization. | 175 | * kgdb_arch_init - Perform any architecture specific initalization. |
163 | * | 176 | * |