diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-25 07:51:46 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-25 07:51:46 -0500 |
commit | 0b271ef4521756010675b1611bef20fd3096790d (patch) | |
tree | 2c9d22a2c74122a9904e533df27f41d63ffef394 /arch/mn10300/kernel | |
parent | b19b3c74c7bbec45a848631b8f970ac110665a01 (diff) | |
parent | 4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff) |
Merge commit 'v2.6.28' into core/core
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r-- | arch/mn10300/kernel/entry.S | 3 | ||||
-rw-r--r-- | arch/mn10300/kernel/gdb-io-serial.c | 2 | ||||
-rw-r--r-- | arch/mn10300/kernel/gdb-stub.c | 24 | ||||
-rw-r--r-- | arch/mn10300/kernel/mn10300-serial.c | 5 | ||||
-rw-r--r-- | arch/mn10300/kernel/module.c | 35 | ||||
-rw-r--r-- | arch/mn10300/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/mn10300/kernel/vmlinux.lds.S | 22 |
7 files changed, 29 insertions, 64 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 |
182 | ENTRY(resume_kernel) | 182 | ENTRY(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/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c index 54be6afb5555..0ea7482c1522 100644 --- a/arch/mn10300/kernel/gdb-stub.c +++ b/arch/mn10300/kernel/gdb-stub.c | |||
@@ -522,17 +522,7 @@ static int gdbstub_single_step(struct pt_regs *regs) | |||
522 | } else { | 522 | } else { |
523 | switch (cur) { | 523 | switch (cur) { |
524 | /* Bxx (d8,PC) */ | 524 | /* Bxx (d8,PC) */ |
525 | case 0xc0: | 525 | case 0xc0 ... 0xca: |
526 | case 0xc1: | ||
527 | case 0xc2: | ||
528 | case 0xc3: | ||
529 | case 0xc4: | ||
530 | case 0xc5: | ||
531 | case 0xc6: | ||
532 | case 0xc7: | ||
533 | case 0xc8: | ||
534 | case 0xc9: | ||
535 | case 0xca: | ||
536 | if (gdbstub_read_byte(pc + 1, (u8 *) &x) < 0) | 526 | if (gdbstub_read_byte(pc + 1, (u8 *) &x) < 0) |
537 | goto fault; | 527 | goto fault; |
538 | if (!__gdbstub_mark_bp(pc + 2, 0)) | 528 | if (!__gdbstub_mark_bp(pc + 2, 0)) |
@@ -543,17 +533,7 @@ static int gdbstub_single_step(struct pt_regs *regs) | |||
543 | break; | 533 | break; |
544 | 534 | ||
545 | /* LXX (d8,PC) */ | 535 | /* LXX (d8,PC) */ |
546 | case 0xd0: | 536 | case 0xd0 ... 0xda: |
547 | case 0xd1: | ||
548 | case 0xd2: | ||
549 | case 0xd3: | ||
550 | case 0xd4: | ||
551 | case 0xd5: | ||
552 | case 0xd6: | ||
553 | case 0xd7: | ||
554 | case 0xd8: | ||
555 | case 0xd9: | ||
556 | case 0xda: | ||
557 | if (!__gdbstub_mark_bp(pc + 1, 0)) | 537 | if (!__gdbstub_mark_bp(pc + 1, 0)) |
558 | goto fault; | 538 | goto fault; |
559 | if (regs->pc != regs->lar && | 539 | if (regs->pc != regs->lar && |
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/module.c b/arch/mn10300/kernel/module.c index 8fa36893df7a..6b287f2e8e84 100644 --- a/arch/mn10300/kernel/module.c +++ b/arch/mn10300/kernel/module.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* MN10300 Kernel module helper routines | 1 | /* MN10300 Kernel module helper routines |
2 | * | 2 | * |
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2007, 2008 Red Hat, Inc. All Rights Reserved. |
4 | * Written by Mark Salter (msalter@redhat.com) | 4 | * Written by Mark Salter (msalter@redhat.com) |
5 | * - Derived from arch/i386/kernel/module.c | 5 | * - Derived from arch/i386/kernel/module.c |
6 | * | 6 | * |
@@ -64,21 +64,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, | |||
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
66 | 66 | ||
67 | static uint32_t reloc_get16(uint8_t *p) | ||
68 | { | ||
69 | return p[0] | (p[1] << 8); | ||
70 | } | ||
71 | |||
72 | static uint32_t reloc_get24(uint8_t *p) | ||
73 | { | ||
74 | return reloc_get16(p) | (p[2] << 16); | ||
75 | } | ||
76 | |||
77 | static uint32_t reloc_get32(uint8_t *p) | ||
78 | { | ||
79 | return reloc_get16(p) | (reloc_get16(p+2) << 16); | ||
80 | } | ||
81 | |||
82 | static void reloc_put16(uint8_t *p, uint32_t val) | 67 | static void reloc_put16(uint8_t *p, uint32_t val) |
83 | { | 68 | { |
84 | p[0] = val & 0xff; | 69 | p[0] = val & 0xff; |
@@ -144,25 +129,19 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
144 | relocation = sym->st_value + rel[i].r_addend; | 129 | relocation = sym->st_value + rel[i].r_addend; |
145 | 130 | ||
146 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 131 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
147 | /* for the first four relocation types, we add the | 132 | /* for the first four relocation types, we simply |
148 | * adjustment into the value at the location given */ | 133 | * store the adjustment at the location given */ |
149 | case R_MN10300_32: | 134 | case R_MN10300_32: |
150 | value = reloc_get32(location); | 135 | reloc_put32(location, relocation); |
151 | value += relocation; | ||
152 | reloc_put32(location, value); | ||
153 | break; | 136 | break; |
154 | case R_MN10300_24: | 137 | case R_MN10300_24: |
155 | value = reloc_get24(location); | 138 | reloc_put24(location, relocation); |
156 | value += relocation; | ||
157 | reloc_put24(location, value); | ||
158 | break; | 139 | break; |
159 | case R_MN10300_16: | 140 | case R_MN10300_16: |
160 | value = reloc_get16(location); | 141 | reloc_put16(location, relocation); |
161 | value += relocation; | ||
162 | reloc_put16(location, value); | ||
163 | break; | 142 | break; |
164 | case R_MN10300_8: | 143 | case R_MN10300_8: |
165 | *location += relocation; | 144 | *location = relocation; |
166 | break; | 145 | break; |
167 | 146 | ||
168 | /* for the next three relocation types, we write the | 147 | /* for the next three relocation types, we write the |
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 | ||
15 | OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") | 16 | OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") |
16 | OUTPUT_ARCH(mn10300) | 17 | OUTPUT_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 */ |