aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r--arch/mn10300/kernel/entry.S3
-rw-r--r--arch/mn10300/kernel/gdb-io-serial.c2
-rw-r--r--arch/mn10300/kernel/mn10300-serial.c5
-rw-r--r--arch/mn10300/kernel/setup.c2
-rw-r--r--arch/mn10300/kernel/vmlinux.lds.S22
5 files changed, 20 insertions, 14 deletions
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S
index b7cbb1487af4..62fba8aa9b6e 100644
--- a/arch/mn10300/kernel/entry.S
+++ b/arch/mn10300/kernel/entry.S
@@ -180,6 +180,7 @@ ENTRY(resume_userspace)
180 180
181#ifdef CONFIG_PREEMPT 181#ifdef CONFIG_PREEMPT
182ENTRY(resume_kernel) 182ENTRY(resume_kernel)
183 __cli
183 mov (TI_preempt_count,a2),d0 # non-zero preempt_count ? 184 mov (TI_preempt_count,a2),d0 # non-zero preempt_count ?
184 cmp 0,d0 185 cmp 0,d0
185 bne restore_all 186 bne restore_all
@@ -190,7 +191,7 @@ need_resched:
190 mov (REG_EPSW,fp),d0 191 mov (REG_EPSW,fp),d0
191 and EPSW_IM,d0 192 and EPSW_IM,d0
192 cmp EPSW_IM_7,d0 # interrupts off (exception path) ? 193 cmp EPSW_IM_7,d0 # interrupts off (exception path) ?
193 beq restore_all 194 bne restore_all
194 call preempt_schedule_irq[],0 195 call preempt_schedule_irq[],0
195 jmp need_resched 196 jmp need_resched
196#endif 197#endif
diff --git a/arch/mn10300/kernel/gdb-io-serial.c b/arch/mn10300/kernel/gdb-io-serial.c
index 9a6d4e8ebe73..11584c51acd9 100644
--- a/arch/mn10300/kernel/gdb-io-serial.c
+++ b/arch/mn10300/kernel/gdb-io-serial.c
@@ -99,6 +99,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
99 try_again: 99 try_again:
100 /* pull chars out of the buffer */ 100 /* pull chars out of the buffer */
101 ix = gdbstub_rx_outp; 101 ix = gdbstub_rx_outp;
102 barrier();
102 if (ix == gdbstub_rx_inp) { 103 if (ix == gdbstub_rx_inp) {
103 if (nonblock) 104 if (nonblock)
104 return -EAGAIN; 105 return -EAGAIN;
@@ -110,6 +111,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
110 111
111 ch = gdbstub_rx_buffer[ix++]; 112 ch = gdbstub_rx_buffer[ix++];
112 st = gdbstub_rx_buffer[ix++]; 113 st = gdbstub_rx_buffer[ix++];
114 barrier();
113 gdbstub_rx_outp = ix & 0x00000fff; 115 gdbstub_rx_outp = ix & 0x00000fff;
114 116
115 if (st & UART_LSR_BI) { 117 if (st & UART_LSR_BI) {
diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c
index aa07d0cd1905..59b9c4bf9583 100644
--- a/arch/mn10300/kernel/mn10300-serial.c
+++ b/arch/mn10300/kernel/mn10300-serial.c
@@ -566,6 +566,11 @@ static void mn10300_serial_transmit_interrupt(struct mn10300_serial_port *port)
566{ 566{
567 _enter("%s", port->name); 567 _enter("%s", port->name);
568 568
569 if (!port->uart.info || !port->uart.info->port.tty) {
570 mn10300_serial_dis_tx_intr(port);
571 return;
572 }
573
569 if (uart_tx_stopped(&port->uart) || 574 if (uart_tx_stopped(&port->uart) ||
570 uart_circ_empty(&port->uart.info->xmit)) 575 uart_circ_empty(&port->uart.info->xmit))
571 mn10300_serial_dis_tx_intr(port); 576 mn10300_serial_dis_tx_intr(port);
diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c
index 017121ce896f..e1d88ab51008 100644
--- a/arch/mn10300/kernel/setup.c
+++ b/arch/mn10300/kernel/setup.c
@@ -161,7 +161,7 @@ void __init setup_arch(char **cmdline_p)
161 reserve the page it is occupying. */ 161 reserve the page it is occupying. */
162 if (CONFIG_INTERRUPT_VECTOR_BASE >= CONFIG_KERNEL_RAM_BASE_ADDRESS && 162 if (CONFIG_INTERRUPT_VECTOR_BASE >= CONFIG_KERNEL_RAM_BASE_ADDRESS &&
163 CONFIG_INTERRUPT_VECTOR_BASE < memory_end) 163 CONFIG_INTERRUPT_VECTOR_BASE < memory_end)
164 reserve_bootmem(CONFIG_INTERRUPT_VECTOR_BASE, 1, 164 reserve_bootmem(CONFIG_INTERRUPT_VECTOR_BASE, PAGE_SIZE,
165 BOOTMEM_DEFAULT); 165 BOOTMEM_DEFAULT);
166 166
167 reserve_bootmem(PAGE_ALIGN(PFN_PHYS(free_pfn)), bootmap_size, 167 reserve_bootmem(PAGE_ALIGN(PFN_PHYS(free_pfn)), bootmap_size,
diff --git a/arch/mn10300/kernel/vmlinux.lds.S b/arch/mn10300/kernel/vmlinux.lds.S
index a3e80f444f55..b8259668f7dc 100644
--- a/arch/mn10300/kernel/vmlinux.lds.S
+++ b/arch/mn10300/kernel/vmlinux.lds.S
@@ -11,6 +11,7 @@
11#define __VMLINUX_LDS__ 11#define __VMLINUX_LDS__
12#include <asm-generic/vmlinux.lds.h> 12#include <asm-generic/vmlinux.lds.h>
13#include <asm/thread_info.h> 13#include <asm/thread_info.h>
14#include <asm/page.h>
14 15
15OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") 16OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
16OUTPUT_ARCH(mn10300) 17OUTPUT_ARCH(mn10300)
@@ -55,13 +56,13 @@ SECTIONS
55 CONSTRUCTORS 56 CONSTRUCTORS
56 } 57 }
57 58
58 . = ALIGN(4096); 59 . = ALIGN(PAGE_SIZE);
59 __nosave_begin = .; 60 __nosave_begin = .;
60 .data_nosave : { *(.data.nosave) } 61 .data_nosave : { *(.data.nosave) }
61 . = ALIGN(4096); 62 . = ALIGN(PAGE_SIZE);
62 __nosave_end = .; 63 __nosave_end = .;
63 64
64 . = ALIGN(4096); 65 . = ALIGN(PAGE_SIZE);
65 .data.page_aligned : { *(.data.idt) } 66 .data.page_aligned : { *(.data.idt) }
66 67
67 . = ALIGN(32); 68 . = ALIGN(32);
@@ -78,7 +79,7 @@ SECTIONS
78 .data.init_task : { *(.data.init_task) } 79 .data.init_task : { *(.data.init_task) }
79 80
80 /* might get freed after init */ 81 /* might get freed after init */
81 . = ALIGN(4096); 82 . = ALIGN(PAGE_SIZE);
82 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { 83 .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
83 __smp_locks = .; 84 __smp_locks = .;
84 *(.smp_locks) 85 *(.smp_locks)
@@ -86,7 +87,7 @@ SECTIONS
86 } 87 }
87 88
88 /* will be freed after init */ 89 /* will be freed after init */
89 . = ALIGN(4096); /* Init code and data */ 90 . = ALIGN(PAGE_SIZE); /* Init code and data */
90 __init_begin = .; 91 __init_begin = .;
91 .init.text : { 92 .init.text : {
92 _sinittext = .; 93 _sinittext = .;
@@ -120,17 +121,14 @@ SECTIONS
120 .exit.data : { *(.exit.data) } 121 .exit.data : { *(.exit.data) }
121 122
122#ifdef CONFIG_BLK_DEV_INITRD 123#ifdef CONFIG_BLK_DEV_INITRD
123 . = ALIGN(4096); 124 . = ALIGN(PAGE_SIZE);
124 __initramfs_start = .; 125 __initramfs_start = .;
125 .init.ramfs : { *(.init.ramfs) } 126 .init.ramfs : { *(.init.ramfs) }
126 __initramfs_end = .; 127 __initramfs_end = .;
127#endif 128#endif
128 129
129 . = ALIGN(32); 130 PERCPU(32)
130 __per_cpu_start = .; 131 . = ALIGN(PAGE_SIZE);
131 .data.percpu : { *(.data.percpu) }
132 __per_cpu_end = .;
133 . = ALIGN(4096);
134 __init_end = .; 132 __init_end = .;
135 /* freed after init ends here */ 133 /* freed after init ends here */
136 134
@@ -145,7 +143,7 @@ SECTIONS
145 _end = . ; 143 _end = . ;
146 144
147 /* This is where the kernel creates the early boot page tables */ 145 /* This is where the kernel creates the early boot page tables */
148 . = ALIGN(4096); 146 . = ALIGN(PAGE_SIZE);
149 pg0 = .; 147 pg0 = .;
150 148
151 /* Sections to be discarded */ 149 /* Sections to be discarded */