diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 22:46:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-26 22:46:23 -0500 |
commit | a9a07d40bc9c57881555b64fe8bf66fd28e2f13a (patch) | |
tree | 20c08b4e6756db92bf7720d5ca1af67b83430828 /arch/openrisc | |
parent | 2003cd90c473f66d34114bc61c49e7d74d370894 (diff) | |
parent | 160d83781a32e94a1e337efd6722939001e62398 (diff) |
Merge branch 'for-upstream' of git://openrisc.net/jonas/linux
Pull OpenRISC updates from Jonas Bonn:
"An equal number of bug fixes and trivial cleanups; no new features.
- Two patches to fix errors thrown by the updated toolchain.
- Three other bug fixes.
- Four trivial cleanups."
* 'for-upstream' of git://openrisc.net/jonas/linux:
openrisc: add missing header inclusion
openrisc: really pass correct arg to schedule_tail
Add bitops include needed for ext2 filesystem
openrisc: update DTLB-miss handler last
openrisc: fix up vmalloc page table loading
openrisc idle: delete pm_idle
openrisc: remove CONFIG_SYMBOL_PREFIX
openrisc: avoid using function parameter regs in reset vector
openrisc: remove unused current_regs
Diffstat (limited to 'arch/openrisc')
-rw-r--r-- | arch/openrisc/Kconfig | 4 | ||||
-rw-r--r-- | arch/openrisc/include/asm/bitops.h | 1 | ||||
-rw-r--r-- | arch/openrisc/include/asm/processor.h | 1 | ||||
-rw-r--r-- | arch/openrisc/kernel/entry.S | 16 | ||||
-rw-r--r-- | arch/openrisc/kernel/head.S | 13 | ||||
-rw-r--r-- | arch/openrisc/mm/init.c | 17 |
6 files changed, 34 insertions, 18 deletions
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 0ac66f67521f..35a4e5f6e71c 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig | |||
@@ -26,10 +26,6 @@ config OPENRISC | |||
26 | config MMU | 26 | config MMU |
27 | def_bool y | 27 | def_bool y |
28 | 28 | ||
29 | config SYMBOL_PREFIX | ||
30 | string | ||
31 | default "" | ||
32 | |||
33 | config HAVE_DMA_ATTRS | 29 | config HAVE_DMA_ATTRS |
34 | def_bool y | 30 | def_bool y |
35 | 31 | ||
diff --git a/arch/openrisc/include/asm/bitops.h b/arch/openrisc/include/asm/bitops.h index a9e11efae14d..2c64f2228dc7 100644 --- a/arch/openrisc/include/asm/bitops.h +++ b/arch/openrisc/include/asm/bitops.h | |||
@@ -54,6 +54,7 @@ | |||
54 | 54 | ||
55 | #include <asm-generic/bitops/atomic.h> | 55 | #include <asm-generic/bitops/atomic.h> |
56 | #include <asm-generic/bitops/non-atomic.h> | 56 | #include <asm-generic/bitops/non-atomic.h> |
57 | #include <asm-generic/bitops/le.h> | ||
57 | #include <asm-generic/bitops/ext2-atomic.h> | 58 | #include <asm-generic/bitops/ext2-atomic.h> |
58 | 59 | ||
59 | #endif /* __ASM_GENERIC_BITOPS_H */ | 60 | #endif /* __ASM_GENERIC_BITOPS_H */ |
diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h index 33691380608e..cab746fa9e87 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h | |||
@@ -70,7 +70,6 @@ struct thread_struct { | |||
70 | */ | 70 | */ |
71 | 71 | ||
72 | #define task_pt_regs(task) user_regs(task_thread_info(task)) | 72 | #define task_pt_regs(task) user_regs(task_thread_info(task)) |
73 | #define current_regs() user_regs(current_thread_info()) | ||
74 | 73 | ||
75 | #define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack) | 74 | #define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack) |
76 | 75 | ||
diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S index 54afd0a129fe..d8a455ede5a7 100644 --- a/arch/openrisc/kernel/entry.S +++ b/arch/openrisc/kernel/entry.S | |||
@@ -201,12 +201,17 @@ EXCEPTION_ENTRY(_bus_fault_handler) | |||
201 | l.nop | 201 | l.nop |
202 | 202 | ||
203 | /* ---[ 0x300: Data Page Fault exception ]------------------------------- */ | 203 | /* ---[ 0x300: Data Page Fault exception ]------------------------------- */ |
204 | EXCEPTION_ENTRY(_dtlb_miss_page_fault_handler) | ||
205 | l.and r5,r5,r0 | ||
206 | l.j 1f | ||
207 | l.nop | ||
204 | 208 | ||
205 | EXCEPTION_ENTRY(_data_page_fault_handler) | 209 | EXCEPTION_ENTRY(_data_page_fault_handler) |
206 | /* set up parameters for do_page_fault */ | 210 | /* set up parameters for do_page_fault */ |
211 | l.ori r5,r0,0x300 // exception vector | ||
212 | 1: | ||
207 | l.addi r3,r1,0 // pt_regs | 213 | l.addi r3,r1,0 // pt_regs |
208 | /* r4 set be EXCEPTION_HANDLE */ // effective address of fault | 214 | /* r4 set be EXCEPTION_HANDLE */ // effective address of fault |
209 | l.ori r5,r0,0x300 // exception vector | ||
210 | 215 | ||
211 | /* | 216 | /* |
212 | * __PHX__: TODO | 217 | * __PHX__: TODO |
@@ -276,12 +281,17 @@ EXCEPTION_ENTRY(_data_page_fault_handler) | |||
276 | l.nop | 281 | l.nop |
277 | 282 | ||
278 | /* ---[ 0x400: Insn Page Fault exception ]------------------------------- */ | 283 | /* ---[ 0x400: Insn Page Fault exception ]------------------------------- */ |
284 | EXCEPTION_ENTRY(_itlb_miss_page_fault_handler) | ||
285 | l.and r5,r5,r0 | ||
286 | l.j 1f | ||
287 | l.nop | ||
279 | 288 | ||
280 | EXCEPTION_ENTRY(_insn_page_fault_handler) | 289 | EXCEPTION_ENTRY(_insn_page_fault_handler) |
281 | /* set up parameters for do_page_fault */ | 290 | /* set up parameters for do_page_fault */ |
291 | l.ori r5,r0,0x400 // exception vector | ||
292 | 1: | ||
282 | l.addi r3,r1,0 // pt_regs | 293 | l.addi r3,r1,0 // pt_regs |
283 | /* r4 set be EXCEPTION_HANDLE */ // effective address of fault | 294 | /* r4 set be EXCEPTION_HANDLE */ // effective address of fault |
284 | l.ori r5,r0,0x400 // exception vector | ||
285 | l.ori r6,r0,0x0 // !write access | 295 | l.ori r6,r0,0x0 // !write access |
286 | 296 | ||
287 | /* call fault.c handler in or32/mm/fault.c */ | 297 | /* call fault.c handler in or32/mm/fault.c */ |
@@ -1040,7 +1050,7 @@ ENTRY(_switch) | |||
1040 | * we are expected to have set up the arg to schedule_tail already, | 1050 | * we are expected to have set up the arg to schedule_tail already, |
1041 | * hence we do so here unconditionally: | 1051 | * hence we do so here unconditionally: |
1042 | */ | 1052 | */ |
1043 | l.lwz r3,TI_STACK(r3) /* Load 'prev' as schedule_tail arg */ | 1053 | l.lwz r3,TI_TASK(r3) /* Load 'prev' as schedule_tail arg */ |
1044 | l.jr r9 | 1054 | l.jr r9 |
1045 | l.nop | 1055 | l.nop |
1046 | 1056 | ||
diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index 1088b5fca3bd..1d3c9c28ac25 100644 --- a/arch/openrisc/kernel/head.S +++ b/arch/openrisc/kernel/head.S | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/threads.h> | 19 | #include <linux/threads.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/serial_reg.h> | ||
22 | #include <asm/processor.h> | 23 | #include <asm/processor.h> |
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/mmu.h> | 25 | #include <asm/mmu.h> |
@@ -291,9 +292,9 @@ | |||
291 | /* Jump to .init code at _start which lives in the .head section | 292 | /* Jump to .init code at _start which lives in the .head section |
292 | * and will be discarded after boot. | 293 | * and will be discarded after boot. |
293 | */ | 294 | */ |
294 | LOAD_SYMBOL_2_GPR(r4, _start) | 295 | LOAD_SYMBOL_2_GPR(r15, _start) |
295 | tophys (r3,r4) /* MMU disabled */ | 296 | tophys (r13,r15) /* MMU disabled */ |
296 | l.jr r3 | 297 | l.jr r13 |
297 | l.nop | 298 | l.nop |
298 | 299 | ||
299 | /* ---[ 0x200: BUS exception ]------------------------------------------- */ | 300 | /* ---[ 0x200: BUS exception ]------------------------------------------- */ |
@@ -1069,8 +1070,7 @@ d_pte_not_present: | |||
1069 | EXCEPTION_LOAD_GPR4 | 1070 | EXCEPTION_LOAD_GPR4 |
1070 | EXCEPTION_LOAD_GPR5 | 1071 | EXCEPTION_LOAD_GPR5 |
1071 | EXCEPTION_LOAD_GPR6 | 1072 | EXCEPTION_LOAD_GPR6 |
1072 | l.j _dispatch_do_dpage_fault | 1073 | EXCEPTION_HANDLE(_dtlb_miss_page_fault_handler) |
1073 | l.nop | ||
1074 | 1074 | ||
1075 | /* ==============================================[ ITLB miss handler ]=== */ | 1075 | /* ==============================================[ ITLB miss handler ]=== */ |
1076 | ENTRY(itlb_miss_handler) | 1076 | ENTRY(itlb_miss_handler) |
@@ -1192,8 +1192,7 @@ i_pte_not_present: | |||
1192 | EXCEPTION_LOAD_GPR4 | 1192 | EXCEPTION_LOAD_GPR4 |
1193 | EXCEPTION_LOAD_GPR5 | 1193 | EXCEPTION_LOAD_GPR5 |
1194 | EXCEPTION_LOAD_GPR6 | 1194 | EXCEPTION_LOAD_GPR6 |
1195 | l.j _dispatch_do_ipage_fault | 1195 | EXCEPTION_HANDLE(_itlb_miss_page_fault_handler) |
1196 | l.nop | ||
1197 | 1196 | ||
1198 | /* ==============================================[ boot tlb handlers ]=== */ | 1197 | /* ==============================================[ boot tlb handlers ]=== */ |
1199 | 1198 | ||
diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c index 79dea9740a3c..e7fdc50c4bf0 100644 --- a/arch/openrisc/mm/init.c +++ b/arch/openrisc/mm/init.c | |||
@@ -167,15 +167,26 @@ void __init paging_init(void) | |||
167 | unsigned long *dtlb_vector = __va(0x900); | 167 | unsigned long *dtlb_vector = __va(0x900); |
168 | unsigned long *itlb_vector = __va(0xa00); | 168 | unsigned long *itlb_vector = __va(0xa00); |
169 | 169 | ||
170 | printk(KERN_INFO "itlb_miss_handler %p\n", &itlb_miss_handler); | ||
171 | *itlb_vector = ((unsigned long)&itlb_miss_handler - | ||
172 | (unsigned long)itlb_vector) >> 2; | ||
173 | |||
174 | /* Soft ordering constraint to ensure that dtlb_vector is | ||
175 | * the last thing updated | ||
176 | */ | ||
177 | barrier(); | ||
178 | |||
170 | printk(KERN_INFO "dtlb_miss_handler %p\n", &dtlb_miss_handler); | 179 | printk(KERN_INFO "dtlb_miss_handler %p\n", &dtlb_miss_handler); |
171 | *dtlb_vector = ((unsigned long)&dtlb_miss_handler - | 180 | *dtlb_vector = ((unsigned long)&dtlb_miss_handler - |
172 | (unsigned long)dtlb_vector) >> 2; | 181 | (unsigned long)dtlb_vector) >> 2; |
173 | 182 | ||
174 | printk(KERN_INFO "itlb_miss_handler %p\n", &itlb_miss_handler); | ||
175 | *itlb_vector = ((unsigned long)&itlb_miss_handler - | ||
176 | (unsigned long)itlb_vector) >> 2; | ||
177 | } | 183 | } |
178 | 184 | ||
185 | /* Soft ordering constraint to ensure that cache invalidation and | ||
186 | * TLB flush really happen _after_ code has been modified. | ||
187 | */ | ||
188 | barrier(); | ||
189 | |||
179 | /* Invalidate instruction caches after code modification */ | 190 | /* Invalidate instruction caches after code modification */ |
180 | mtspr(SPR_ICBIR, 0x900); | 191 | mtspr(SPR_ICBIR, 0x900); |
181 | mtspr(SPR_ICBIR, 0xa00); | 192 | mtspr(SPR_ICBIR, 0xa00); |