diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:53:26 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:53:26 -0400 |
| commit | bdab225015fbbb45ccd8913f5d7c01b2bf67d8b2 (patch) | |
| tree | 5ef62301face958977a084bf2b6c5300296a25f2 /arch/mn10300/kernel/gdb-io-serial.c | |
| parent | 7c5814c7199851c5fe9395d08fc1ab3c8c1531ea (diff) | |
| parent | 7c7fcf762e405eb040ee10d22d656a791f616122 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300
* git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300: (44 commits)
MN10300: Save frame pointer in thread_info struct rather than global var
MN10300: Change "Matsushita" to "Panasonic".
MN10300: Create a defconfig for the ASB2364 board
MN10300: Update the ASB2303 defconfig
MN10300: ASB2364: Add support for SMSC911X and SMC911X
MN10300: ASB2364: Handle the IRQ multiplexer in the FPGA
MN10300: Generic time support
MN10300: Specify an ELF HWCAP flag for MN10300 Atomic Operations Unit support
MN10300: Map userspace atomic op regs as a vmalloc page
MN10300: And Panasonic AM34 subarch and implement SMP
MN10300: Delete idle_timestamp from irq_cpustat_t
MN10300: Make various interrupt priority settings configurable
MN10300: Optimise do_csum()
MN10300: Implement atomic ops using atomic ops unit
MN10300: Make the FPU operate in non-lazy mode under SMP
MN10300: SMP TLB flushing
MN10300: Use the [ID]PTEL2 registers rather than [ID]PTEL for TLB control
MN10300: Make the use of PIDR to mark TLB entries controllable
MN10300: Rename __flush_tlb*() to local_flush_tlb*()
MN10300: AM34 erratum requires MMUCTR read and write on exception entry
...
Diffstat (limited to 'arch/mn10300/kernel/gdb-io-serial.c')
| -rw-r--r-- | arch/mn10300/kernel/gdb-io-serial.c | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/arch/mn10300/kernel/gdb-io-serial.c b/arch/mn10300/kernel/gdb-io-serial.c index ae663dc717e9..0d5d63c91dc3 100644 --- a/arch/mn10300/kernel/gdb-io-serial.c +++ b/arch/mn10300/kernel/gdb-io-serial.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <asm/exceptions.h> | 23 | #include <asm/exceptions.h> |
| 24 | #include <asm/serial-regs.h> | 24 | #include <asm/serial-regs.h> |
| 25 | #include <unit/serial.h> | 25 | #include <unit/serial.h> |
| 26 | #include <asm/smp.h> | ||
| 26 | 27 | ||
| 27 | /* | 28 | /* |
| 28 | * initialise the GDB stub | 29 | * initialise the GDB stub |
| @@ -45,22 +46,34 @@ void gdbstub_io_init(void) | |||
| 45 | XIRQxICR(GDBPORT_SERIAL_IRQ) = 0; | 46 | XIRQxICR(GDBPORT_SERIAL_IRQ) = 0; |
| 46 | tmp = XIRQxICR(GDBPORT_SERIAL_IRQ); | 47 | tmp = XIRQxICR(GDBPORT_SERIAL_IRQ); |
| 47 | 48 | ||
| 49 | #if CONFIG_GDBSTUB_IRQ_LEVEL == 0 | ||
| 48 | IVAR0 = EXCEP_IRQ_LEVEL0; | 50 | IVAR0 = EXCEP_IRQ_LEVEL0; |
| 49 | set_intr_stub(EXCEP_IRQ_LEVEL0, gdbstub_io_rx_handler); | 51 | #elif CONFIG_GDBSTUB_IRQ_LEVEL == 1 |
| 52 | IVAR1 = EXCEP_IRQ_LEVEL1; | ||
| 53 | #elif CONFIG_GDBSTUB_IRQ_LEVEL == 2 | ||
| 54 | IVAR2 = EXCEP_IRQ_LEVEL2; | ||
| 55 | #elif CONFIG_GDBSTUB_IRQ_LEVEL == 3 | ||
| 56 | IVAR3 = EXCEP_IRQ_LEVEL3; | ||
| 57 | #elif CONFIG_GDBSTUB_IRQ_LEVEL == 4 | ||
| 58 | IVAR4 = EXCEP_IRQ_LEVEL4; | ||
| 59 | #elif CONFIG_GDBSTUB_IRQ_LEVEL == 5 | ||
| 60 | IVAR5 = EXCEP_IRQ_LEVEL5; | ||
| 61 | #else | ||
| 62 | #error "Unknown irq level for gdbstub." | ||
| 63 | #endif | ||
| 64 | |||
| 65 | set_intr_stub(NUM2EXCEP_IRQ_LEVEL(CONFIG_GDBSTUB_IRQ_LEVEL), | ||
| 66 | gdbstub_io_rx_handler); | ||
| 50 | 67 | ||
| 51 | XIRQxICR(GDBPORT_SERIAL_IRQ) &= ~GxICR_REQUEST; | 68 | XIRQxICR(GDBPORT_SERIAL_IRQ) &= ~GxICR_REQUEST; |
| 52 | XIRQxICR(GDBPORT_SERIAL_IRQ) = GxICR_ENABLE | GxICR_LEVEL_0; | 69 | XIRQxICR(GDBPORT_SERIAL_IRQ) = |
| 70 | GxICR_ENABLE | NUM2GxICR_LEVEL(CONFIG_GDBSTUB_IRQ_LEVEL); | ||
| 53 | tmp = XIRQxICR(GDBPORT_SERIAL_IRQ); | 71 | tmp = XIRQxICR(GDBPORT_SERIAL_IRQ); |
| 54 | 72 | ||
| 55 | GDBPORT_SERIAL_IER = UART_IER_RDI | UART_IER_RLSI; | 73 | GDBPORT_SERIAL_IER = UART_IER_RDI | UART_IER_RLSI; |
| 56 | 74 | ||
| 57 | /* permit level 0 IRQs to take place */ | 75 | /* permit level 0 IRQs to take place */ |
| 58 | asm volatile( | 76 | local_change_intr_mask_level(NUM2EPSW_IM(CONFIG_GDBSTUB_IRQ_LEVEL + 1)); |
| 59 | " and %0,epsw \n" | ||
| 60 | " or %1,epsw \n" | ||
| 61 | : | ||
| 62 | : "i"(~EPSW_IM), "i"(EPSW_IE | EPSW_IM_1) | ||
| 63 | ); | ||
| 64 | } | 77 | } |
| 65 | 78 | ||
| 66 | /* | 79 | /* |
| @@ -87,6 +100,9 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock) | |||
| 87 | { | 100 | { |
| 88 | unsigned ix; | 101 | unsigned ix; |
| 89 | u8 ch, st; | 102 | u8 ch, st; |
| 103 | #if defined(CONFIG_MN10300_WD_TIMER) | ||
| 104 | int cpu; | ||
| 105 | #endif | ||
| 90 | 106 | ||
| 91 | *_ch = 0xff; | 107 | *_ch = 0xff; |
| 92 | 108 | ||
| @@ -104,8 +120,9 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock) | |||
| 104 | if (nonblock) | 120 | if (nonblock) |
| 105 | return -EAGAIN; | 121 | return -EAGAIN; |
| 106 | #ifdef CONFIG_MN10300_WD_TIMER | 122 | #ifdef CONFIG_MN10300_WD_TIMER |
| 107 | watchdog_alert_counter = 0; | 123 | for (cpu = 0; cpu < NR_CPUS; cpu++) |
| 108 | #endif /* CONFIG_MN10300_WD_TIMER */ | 124 | watchdog_alert_counter[cpu] = 0; |
| 125 | #endif | ||
| 109 | goto try_again; | 126 | goto try_again; |
| 110 | } | 127 | } |
| 111 | 128 | ||
