aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel/traps.c
diff options
context:
space:
mode:
authorAkira Takeuchi <takeuchi.akr@jp.panasonic.com>2010-10-27 12:28:55 -0400
committerDavid Howells <dhowells@redhat.com>2010-10-27 12:28:55 -0400
commit368dd5acd154b09c043cc4392a74da01599b37d5 (patch)
treedd94ae3d044f6e774dec2437613515bd6b46dacb /arch/mn10300/kernel/traps.c
parent04157a6e7df99fd5ed64955233d6e00ab6613614 (diff)
MN10300: And Panasonic AM34 subarch and implement SMP
Implement the Panasonic MN10300 AM34 CPU subarch and implement SMP support for MN10300. Also implement support for the MN2WS0060 processor and the ASB2364 evaluation board which are AM34 based. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/kernel/traps.c')
-rw-r--r--arch/mn10300/kernel/traps.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c
index 716a221df2f9..c924a1dd3323 100644
--- a/arch/mn10300/kernel/traps.c
+++ b/arch/mn10300/kernel/traps.c
@@ -45,8 +45,13 @@
45#error "INTERRUPT_VECTOR_BASE not aligned to 16MiB boundary!" 45#error "INTERRUPT_VECTOR_BASE not aligned to 16MiB boundary!"
46#endif 46#endif
47 47
48#ifdef CONFIG_SMP
49struct pt_regs *___frame[NR_CPUS]; /* current frame pointer */
50EXPORT_SYMBOL(___frame);
51#else /* CONFIG_SMP */
48struct pt_regs *__frame; /* current frame pointer */ 52struct pt_regs *__frame; /* current frame pointer */
49EXPORT_SYMBOL(__frame); 53EXPORT_SYMBOL(__frame);
54#endif /* CONFIG_SMP */
50 55
51int kstack_depth_to_print = 24; 56int kstack_depth_to_print = 24;
52 57
@@ -221,11 +226,14 @@ void show_registers_only(struct pt_regs *regs)
221 printk(KERN_EMERG "threadinfo=%p task=%p)\n", 226 printk(KERN_EMERG "threadinfo=%p task=%p)\n",
222 current_thread_info(), current); 227 current_thread_info(), current);
223 228
224 if ((unsigned long) current >= 0x90000000UL && 229 if ((unsigned long) current >= PAGE_OFFSET &&
225 (unsigned long) current < 0x94000000UL) 230 (unsigned long) current < (unsigned long)high_memory)
226 printk(KERN_EMERG "Process %s (pid: %d)\n", 231 printk(KERN_EMERG "Process %s (pid: %d)\n",
227 current->comm, current->pid); 232 current->comm, current->pid);
228 233
234#ifdef CONFIG_SMP
235 printk(KERN_EMERG "CPUID: %08x\n", CPUID);
236#endif
229 printk(KERN_EMERG "CPUP: %04hx\n", CPUP); 237 printk(KERN_EMERG "CPUP: %04hx\n", CPUP);
230 printk(KERN_EMERG "TBR: %08x\n", TBR); 238 printk(KERN_EMERG "TBR: %08x\n", TBR);
231 printk(KERN_EMERG "DEAR: %08x\n", DEAR); 239 printk(KERN_EMERG "DEAR: %08x\n", DEAR);
@@ -521,8 +529,12 @@ void __init set_intr_stub(enum exception_code code, void *handler)
521{ 529{
522 unsigned long addr; 530 unsigned long addr;
523 u8 *vector = (u8 *)(CONFIG_INTERRUPT_VECTOR_BASE + code); 531 u8 *vector = (u8 *)(CONFIG_INTERRUPT_VECTOR_BASE + code);
532 unsigned long flags;
524 533
525 addr = (unsigned long) handler - (unsigned long) vector; 534 addr = (unsigned long) handler - (unsigned long) vector;
535
536 flags = arch_local_cli_save();
537
526 vector[0] = 0xdc; /* JMP handler */ 538 vector[0] = 0xdc; /* JMP handler */
527 vector[1] = addr; 539 vector[1] = addr;
528 vector[2] = addr >> 8; 540 vector[2] = addr >> 8;
@@ -532,6 +544,8 @@ void __init set_intr_stub(enum exception_code code, void *handler)
532 vector[6] = 0xcb; 544 vector[6] = 0xcb;
533 vector[7] = 0xcb; 545 vector[7] = 0xcb;
534 546
547 arch_local_irq_restore(flags);
548
535#ifndef CONFIG_MN10300_CACHE_SNOOP 549#ifndef CONFIG_MN10300_CACHE_SNOOP
536 mn10300_dcache_flush_inv(); 550 mn10300_dcache_flush_inv();
537 mn10300_icache_inv(); 551 mn10300_icache_inv();