diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-18 12:12:14 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-18 12:12:14 -0400 |
commit | fac56c2df51bc29b07b3c2dcfabf32a015a0522c (patch) | |
tree | 1ff5d84ecf4ea0bcbd42e2ef9624b5ade3810890 /arch/blackfin/kernel | |
parent | 6caa15d0b84d2ea688fd31f4f172c8353463e109 (diff) | |
parent | a6360dd37e1a144ed11e6548371bade559a1e4df (diff) |
Merge commit 'v2.6.39-rc3' into for-2.6.39
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/kgdb.c | 2 | ||||
-rw-r--r-- | arch/blackfin/kernel/module.c | 45 | ||||
-rw-r--r-- | arch/blackfin/kernel/traps.c | 2 |
3 files changed, 20 insertions, 29 deletions
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c index b8cfe34989e4..9b80b152435e 100644 --- a/arch/blackfin/kernel/kgdb.c +++ b/arch/blackfin/kernel/kgdb.c | |||
@@ -181,7 +181,7 @@ static int bfin_set_hw_break(unsigned long addr, int len, enum kgdb_bptype type) | |||
181 | return -ENOSPC; | 181 | return -ENOSPC; |
182 | } | 182 | } |
183 | 183 | ||
184 | /* Becasue hardware data watchpoint impelemented in current | 184 | /* Because hardware data watchpoint impelemented in current |
185 | * Blackfin can not trigger an exception event as the hardware | 185 | * Blackfin can not trigger an exception event as the hardware |
186 | * instrction watchpoint does, we ignaore all data watch point here. | 186 | * instrction watchpoint does, we ignaore all data watch point here. |
187 | * They can be turned on easily after future blackfin design | 187 | * They can be turned on easily after future blackfin design |
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c index a6dfa6b71e63..35e350cad9d9 100644 --- a/arch/blackfin/kernel/module.c +++ b/arch/blackfin/kernel/module.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Licensed under the GPL-2 or later | 4 | * Licensed under the GPL-2 or later |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define pr_fmt(fmt) "module %s: " fmt | 7 | #define pr_fmt(fmt) "module %s: " fmt, mod->name |
8 | 8 | ||
9 | #include <linux/moduleloader.h> | 9 | #include <linux/moduleloader.h> |
10 | #include <linux/elf.h> | 10 | #include <linux/elf.h> |
@@ -57,8 +57,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
57 | dest = l1_inst_sram_alloc(s->sh_size); | 57 | dest = l1_inst_sram_alloc(s->sh_size); |
58 | mod->arch.text_l1 = dest; | 58 | mod->arch.text_l1 = dest; |
59 | if (dest == NULL) { | 59 | if (dest == NULL) { |
60 | pr_err("L1 inst memory allocation failed\n", | 60 | pr_err("L1 inst memory allocation failed\n"); |
61 | mod->name); | ||
62 | return -1; | 61 | return -1; |
63 | } | 62 | } |
64 | dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); | 63 | dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -70,8 +69,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
70 | dest = l1_data_sram_alloc(s->sh_size); | 69 | dest = l1_data_sram_alloc(s->sh_size); |
71 | mod->arch.data_a_l1 = dest; | 70 | mod->arch.data_a_l1 = dest; |
72 | if (dest == NULL) { | 71 | if (dest == NULL) { |
73 | pr_err("L1 data memory allocation failed\n", | 72 | pr_err("L1 data memory allocation failed\n"); |
74 | mod->name); | ||
75 | return -1; | 73 | return -1; |
76 | } | 74 | } |
77 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 75 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -83,8 +81,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
83 | dest = l1_data_sram_zalloc(s->sh_size); | 81 | dest = l1_data_sram_zalloc(s->sh_size); |
84 | mod->arch.bss_a_l1 = dest; | 82 | mod->arch.bss_a_l1 = dest; |
85 | if (dest == NULL) { | 83 | if (dest == NULL) { |
86 | pr_err("L1 data memory allocation failed\n", | 84 | pr_err("L1 data memory allocation failed\n"); |
87 | mod->name); | ||
88 | return -1; | 85 | return -1; |
89 | } | 86 | } |
90 | 87 | ||
@@ -93,8 +90,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
93 | dest = l1_data_B_sram_alloc(s->sh_size); | 90 | dest = l1_data_B_sram_alloc(s->sh_size); |
94 | mod->arch.data_b_l1 = dest; | 91 | mod->arch.data_b_l1 = dest; |
95 | if (dest == NULL) { | 92 | if (dest == NULL) { |
96 | pr_err("L1 data memory allocation failed\n", | 93 | pr_err("L1 data memory allocation failed\n"); |
97 | mod->name); | ||
98 | return -1; | 94 | return -1; |
99 | } | 95 | } |
100 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 96 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -104,8 +100,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
104 | dest = l1_data_B_sram_alloc(s->sh_size); | 100 | dest = l1_data_B_sram_alloc(s->sh_size); |
105 | mod->arch.bss_b_l1 = dest; | 101 | mod->arch.bss_b_l1 = dest; |
106 | if (dest == NULL) { | 102 | if (dest == NULL) { |
107 | pr_err("L1 data memory allocation failed\n", | 103 | pr_err("L1 data memory allocation failed\n"); |
108 | mod->name); | ||
109 | return -1; | 104 | return -1; |
110 | } | 105 | } |
111 | memset(dest, 0, s->sh_size); | 106 | memset(dest, 0, s->sh_size); |
@@ -117,8 +112,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
117 | dest = l2_sram_alloc(s->sh_size); | 112 | dest = l2_sram_alloc(s->sh_size); |
118 | mod->arch.text_l2 = dest; | 113 | mod->arch.text_l2 = dest; |
119 | if (dest == NULL) { | 114 | if (dest == NULL) { |
120 | pr_err("L2 SRAM allocation failed\n", | 115 | pr_err("L2 SRAM allocation failed\n"); |
121 | mod->name); | ||
122 | return -1; | 116 | return -1; |
123 | } | 117 | } |
124 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 118 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -130,8 +124,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
130 | dest = l2_sram_alloc(s->sh_size); | 124 | dest = l2_sram_alloc(s->sh_size); |
131 | mod->arch.data_l2 = dest; | 125 | mod->arch.data_l2 = dest; |
132 | if (dest == NULL) { | 126 | if (dest == NULL) { |
133 | pr_err("L2 SRAM allocation failed\n", | 127 | pr_err("L2 SRAM allocation failed\n"); |
134 | mod->name); | ||
135 | return -1; | 128 | return -1; |
136 | } | 129 | } |
137 | memcpy(dest, (void *)s->sh_addr, s->sh_size); | 130 | memcpy(dest, (void *)s->sh_addr, s->sh_size); |
@@ -143,8 +136,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
143 | dest = l2_sram_zalloc(s->sh_size); | 136 | dest = l2_sram_zalloc(s->sh_size); |
144 | mod->arch.bss_l2 = dest; | 137 | mod->arch.bss_l2 = dest; |
145 | if (dest == NULL) { | 138 | if (dest == NULL) { |
146 | pr_err("L2 SRAM allocation failed\n", | 139 | pr_err("L2 SRAM allocation failed\n"); |
147 | mod->name); | ||
148 | return -1; | 140 | return -1; |
149 | } | 141 | } |
150 | 142 | ||
@@ -160,9 +152,9 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
160 | 152 | ||
161 | int | 153 | int |
162 | apply_relocate(Elf_Shdr * sechdrs, const char *strtab, | 154 | apply_relocate(Elf_Shdr * sechdrs, const char *strtab, |
163 | unsigned int symindex, unsigned int relsec, struct module *me) | 155 | unsigned int symindex, unsigned int relsec, struct module *mod) |
164 | { | 156 | { |
165 | pr_err(".rel unsupported\n", me->name); | 157 | pr_err(".rel unsupported\n"); |
166 | return -ENOEXEC; | 158 | return -ENOEXEC; |
167 | } | 159 | } |
168 | 160 | ||
@@ -186,7 +178,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
186 | Elf32_Sym *sym; | 178 | Elf32_Sym *sym; |
187 | unsigned long location, value, size; | 179 | unsigned long location, value, size; |
188 | 180 | ||
189 | pr_debug("applying relocate section %u to %u\n", mod->name, | 181 | pr_debug("applying relocate section %u to %u\n", |
190 | relsec, sechdrs[relsec].sh_info); | 182 | relsec, sechdrs[relsec].sh_info); |
191 | 183 | ||
192 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { | 184 | for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { |
@@ -203,14 +195,14 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
203 | 195 | ||
204 | #ifdef CONFIG_SMP | 196 | #ifdef CONFIG_SMP |
205 | if (location >= COREB_L1_DATA_A_START) { | 197 | if (location >= COREB_L1_DATA_A_START) { |
206 | pr_err("cannot relocate in L1: %u (SMP kernel)", | 198 | pr_err("cannot relocate in L1: %u (SMP kernel)\n", |
207 | mod->name, ELF32_R_TYPE(rel[i].r_info)); | 199 | ELF32_R_TYPE(rel[i].r_info)); |
208 | return -ENOEXEC; | 200 | return -ENOEXEC; |
209 | } | 201 | } |
210 | #endif | 202 | #endif |
211 | 203 | ||
212 | pr_debug("location is %lx, value is %lx type is %d\n", | 204 | pr_debug("location is %lx, value is %lx type is %d\n", |
213 | mod->name, location, value, ELF32_R_TYPE(rel[i].r_info)); | 205 | location, value, ELF32_R_TYPE(rel[i].r_info)); |
214 | 206 | ||
215 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 207 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
216 | 208 | ||
@@ -230,11 +222,11 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
230 | case R_BFIN_PCREL12_JUMP_S: | 222 | case R_BFIN_PCREL12_JUMP_S: |
231 | case R_BFIN_PCREL10: | 223 | case R_BFIN_PCREL10: |
232 | pr_err("unsupported relocation: %u (no -mlong-calls?)\n", | 224 | pr_err("unsupported relocation: %u (no -mlong-calls?)\n", |
233 | mod->name, ELF32_R_TYPE(rel[i].r_info)); | 225 | ELF32_R_TYPE(rel[i].r_info)); |
234 | return -ENOEXEC; | 226 | return -ENOEXEC; |
235 | 227 | ||
236 | default: | 228 | default: |
237 | pr_err("unknown relocation: %u\n", mod->name, | 229 | pr_err("unknown relocation: %u\n", |
238 | ELF32_R_TYPE(rel[i].r_info)); | 230 | ELF32_R_TYPE(rel[i].r_info)); |
239 | return -ENOEXEC; | 231 | return -ENOEXEC; |
240 | } | 232 | } |
@@ -251,8 +243,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, | |||
251 | isram_memcpy((void *)location, &value, size); | 243 | isram_memcpy((void *)location, &value, size); |
252 | break; | 244 | break; |
253 | default: | 245 | default: |
254 | pr_err("invalid relocation for %#lx\n", | 246 | pr_err("invalid relocation for %#lx\n", location); |
255 | mod->name, location); | ||
256 | return -ENOEXEC; | 247 | return -ENOEXEC; |
257 | } | 248 | } |
258 | } | 249 | } |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 59c1df75e4de..655f25d139a7 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -98,7 +98,7 @@ asmlinkage notrace void trap_c(struct pt_regs *fp) | |||
98 | /* send the appropriate signal to the user program */ | 98 | /* send the appropriate signal to the user program */ |
99 | switch (trapnr) { | 99 | switch (trapnr) { |
100 | 100 | ||
101 | /* This table works in conjuction with the one in ./mach-common/entry.S | 101 | /* This table works in conjunction with the one in ./mach-common/entry.S |
102 | * Some exceptions are handled there (in assembly, in exception space) | 102 | * Some exceptions are handled there (in assembly, in exception space) |
103 | * Some are handled here, (in C, in interrupt space) | 103 | * Some are handled here, (in C, in interrupt space) |
104 | * Some, like CPLB, are handled in both, where the normal path is | 104 | * Some, like CPLB, are handled in both, where the normal path is |