diff options
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/cpu_setup_6xx.S | 9 | ||||
-rw-r--r-- | arch/ppc/kernel/cputable.c | 76 | ||||
-rw-r--r-- | arch/ppc/kernel/find_name.c | 48 | ||||
-rw-r--r-- | arch/ppc/kernel/head_44x.S | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/head_4xx.S | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/head_fsl_booke.S | 5 | ||||
-rw-r--r-- | arch/ppc/kernel/l2cr.S | 31 | ||||
-rw-r--r-- | arch/ppc/kernel/ppc_ksyms.c | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/setup.c | 28 | ||||
-rw-r--r-- | arch/ppc/kernel/traps.c | 19 |
10 files changed, 158 insertions, 70 deletions
diff --git a/arch/ppc/kernel/cpu_setup_6xx.S b/arch/ppc/kernel/cpu_setup_6xx.S index 468721d9ebd2..bd037caa4055 100644 --- a/arch/ppc/kernel/cpu_setup_6xx.S +++ b/arch/ppc/kernel/cpu_setup_6xx.S | |||
@@ -249,8 +249,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_NO_DPM) | |||
249 | sync | 249 | sync |
250 | isync | 250 | isync |
251 | 251 | ||
252 | /* Enable L2 HW prefetch | 252 | /* Enable L2 HW prefetch, if L2 is enabled |
253 | */ | 253 | */ |
254 | mfspr r3,SPRN_L2CR | ||
255 | andis. r3,r3,L2CR_L2E@h | ||
256 | beqlr | ||
254 | mfspr r3,SPRN_MSSCR0 | 257 | mfspr r3,SPRN_MSSCR0 |
255 | ori r3,r3,3 | 258 | ori r3,r3,3 |
256 | sync | 259 | sync |
@@ -324,6 +327,7 @@ _GLOBAL(__save_cpu_setup) | |||
324 | cmplwi cr4,r3,0x8002 /* 7457 */ | 327 | cmplwi cr4,r3,0x8002 /* 7457 */ |
325 | cmplwi cr5,r3,0x8003 /* 7447A */ | 328 | cmplwi cr5,r3,0x8003 /* 7447A */ |
326 | cmplwi cr6,r3,0x7000 /* 750FX */ | 329 | cmplwi cr6,r3,0x7000 /* 750FX */ |
330 | cmplwi cr7,r3,0x8004 /* 7448 */ | ||
327 | /* cr1 is 7400 || 7410 */ | 331 | /* cr1 is 7400 || 7410 */ |
328 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq | 332 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq |
329 | /* cr0 is 74xx */ | 333 | /* cr0 is 74xx */ |
@@ -331,6 +335,7 @@ _GLOBAL(__save_cpu_setup) | |||
331 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq | 335 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq |
332 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 336 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq |
333 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq | 337 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq |
338 | cror 4*cr0+eq,4*cr0+eq,4*cr7+eq | ||
334 | bne 1f | 339 | bne 1f |
335 | /* Backup 74xx specific regs */ | 340 | /* Backup 74xx specific regs */ |
336 | mfspr r4,SPRN_MSSCR0 | 341 | mfspr r4,SPRN_MSSCR0 |
@@ -393,6 +398,7 @@ _GLOBAL(__restore_cpu_setup) | |||
393 | cmplwi cr4,r3,0x8002 /* 7457 */ | 398 | cmplwi cr4,r3,0x8002 /* 7457 */ |
394 | cmplwi cr5,r3,0x8003 /* 7447A */ | 399 | cmplwi cr5,r3,0x8003 /* 7447A */ |
395 | cmplwi cr6,r3,0x7000 /* 750FX */ | 400 | cmplwi cr6,r3,0x7000 /* 750FX */ |
401 | cmplwi cr7,r3,0x8004 /* 7448 */ | ||
396 | /* cr1 is 7400 || 7410 */ | 402 | /* cr1 is 7400 || 7410 */ |
397 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq | 403 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq |
398 | /* cr0 is 74xx */ | 404 | /* cr0 is 74xx */ |
@@ -400,6 +406,7 @@ _GLOBAL(__restore_cpu_setup) | |||
400 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq | 406 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq |
401 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 407 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq |
402 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq | 408 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq |
409 | cror 4*cr0+eq,4*cr0+eq,4*cr7+eq | ||
403 | bne 2f | 410 | bne 2f |
404 | /* Restore 74xx specific regs */ | 411 | /* Restore 74xx specific regs */ |
405 | lwz r4,CS_MSSCR0(r5) | 412 | lwz r4,CS_MSSCR0(r5) |
diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c index 8a3d74f2531e..546e1ea4cafa 100644 --- a/arch/ppc/kernel/cputable.c +++ b/arch/ppc/kernel/cputable.c | |||
@@ -198,10 +198,10 @@ struct cpu_spec cpu_specs[] = { | |||
198 | .num_pmcs = 4, | 198 | .num_pmcs = 4, |
199 | .cpu_setup = __setup_cpu_750 | 199 | .cpu_setup = __setup_cpu_750 |
200 | }, | 200 | }, |
201 | { /* 745/755 */ | 201 | { /* 750CX (80100 and 8010x?) */ |
202 | .pvr_mask = 0xfffff000, | 202 | .pvr_mask = 0xfffffff0, |
203 | .pvr_value = 0x00083000, | 203 | .pvr_value = 0x00080100, |
204 | .cpu_name = "745/755", | 204 | .cpu_name = "750CX", |
205 | .cpu_features = CPU_FTR_COMMON | | 205 | .cpu_features = CPU_FTR_COMMON | |
206 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 206 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
207 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | | 207 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | |
@@ -210,11 +210,11 @@ struct cpu_spec cpu_specs[] = { | |||
210 | .icache_bsize = 32, | 210 | .icache_bsize = 32, |
211 | .dcache_bsize = 32, | 211 | .dcache_bsize = 32, |
212 | .num_pmcs = 4, | 212 | .num_pmcs = 4, |
213 | .cpu_setup = __setup_cpu_750 | 213 | .cpu_setup = __setup_cpu_750cx |
214 | }, | 214 | }, |
215 | { /* 750CX (80100 and 8010x?) */ | 215 | { /* 750CX (82201 and 82202) */ |
216 | .pvr_mask = 0xfffffff0, | 216 | .pvr_mask = 0xfffffff0, |
217 | .pvr_value = 0x00080100, | 217 | .pvr_value = 0x00082200, |
218 | .cpu_name = "750CX", | 218 | .cpu_name = "750CX", |
219 | .cpu_features = CPU_FTR_COMMON | | 219 | .cpu_features = CPU_FTR_COMMON | |
220 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 220 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
@@ -226,10 +226,10 @@ struct cpu_spec cpu_specs[] = { | |||
226 | .num_pmcs = 4, | 226 | .num_pmcs = 4, |
227 | .cpu_setup = __setup_cpu_750cx | 227 | .cpu_setup = __setup_cpu_750cx |
228 | }, | 228 | }, |
229 | { /* 750CX (82201 and 82202) */ | 229 | { /* 750CXe (82214) */ |
230 | .pvr_mask = 0xfffffff0, | 230 | .pvr_mask = 0xfffffff0, |
231 | .pvr_value = 0x00082200, | 231 | .pvr_value = 0x00082210, |
232 | .cpu_name = "750CX", | 232 | .cpu_name = "750CXe", |
233 | .cpu_features = CPU_FTR_COMMON | | 233 | .cpu_features = CPU_FTR_COMMON | |
234 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 234 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
235 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | | 235 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | |
@@ -240,9 +240,9 @@ struct cpu_spec cpu_specs[] = { | |||
240 | .num_pmcs = 4, | 240 | .num_pmcs = 4, |
241 | .cpu_setup = __setup_cpu_750cx | 241 | .cpu_setup = __setup_cpu_750cx |
242 | }, | 242 | }, |
243 | { /* 750CXe (82214) */ | 243 | { /* 750CXe "Gekko" (83214) */ |
244 | .pvr_mask = 0xfffffff0, | 244 | .pvr_mask = 0xffffffff, |
245 | .pvr_value = 0x00082210, | 245 | .pvr_value = 0x00083214, |
246 | .cpu_name = "750CXe", | 246 | .cpu_name = "750CXe", |
247 | .cpu_features = CPU_FTR_COMMON | | 247 | .cpu_features = CPU_FTR_COMMON | |
248 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 248 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
@@ -254,6 +254,20 @@ struct cpu_spec cpu_specs[] = { | |||
254 | .num_pmcs = 4, | 254 | .num_pmcs = 4, |
255 | .cpu_setup = __setup_cpu_750cx | 255 | .cpu_setup = __setup_cpu_750cx |
256 | }, | 256 | }, |
257 | { /* 745/755 */ | ||
258 | .pvr_mask = 0xfffff000, | ||
259 | .pvr_value = 0x00083000, | ||
260 | .cpu_name = "745/755", | ||
261 | .cpu_features = CPU_FTR_COMMON | | ||
262 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | ||
263 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | | ||
264 | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, | ||
265 | .cpu_user_features = COMMON_PPC, | ||
266 | .icache_bsize = 32, | ||
267 | .dcache_bsize = 32, | ||
268 | .num_pmcs = 4, | ||
269 | .cpu_setup = __setup_cpu_750 | ||
270 | }, | ||
257 | { /* 750FX rev 1.x */ | 271 | { /* 750FX rev 1.x */ |
258 | .pvr_mask = 0xffffff00, | 272 | .pvr_mask = 0xffffff00, |
259 | .pvr_value = 0x70000100, | 273 | .pvr_value = 0x70000100, |
@@ -536,6 +550,22 @@ struct cpu_spec cpu_specs[] = { | |||
536 | .num_pmcs = 6, | 550 | .num_pmcs = 6, |
537 | .cpu_setup = __setup_cpu_745x | 551 | .cpu_setup = __setup_cpu_745x |
538 | }, | 552 | }, |
553 | { /* 7448 */ | ||
554 | .pvr_mask = 0xffff0000, | ||
555 | .pvr_value = 0x80040000, | ||
556 | .cpu_name = "7448", | ||
557 | .cpu_features = CPU_FTR_COMMON | | ||
558 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | | ||
559 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | | ||
560 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | | ||
561 | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | | ||
562 | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT, | ||
563 | .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, | ||
564 | .icache_bsize = 32, | ||
565 | .dcache_bsize = 32, | ||
566 | .num_pmcs = 6, | ||
567 | .cpu_setup = __setup_cpu_745x | ||
568 | }, | ||
539 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ | 569 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ |
540 | .pvr_mask = 0x7fff0000, | 570 | .pvr_mask = 0x7fff0000, |
541 | .pvr_value = 0x00810000, | 571 | .pvr_value = 0x00810000, |
@@ -922,6 +952,26 @@ struct cpu_spec cpu_specs[] = { | |||
922 | .icache_bsize = 32, | 952 | .icache_bsize = 32, |
923 | .dcache_bsize = 32, | 953 | .dcache_bsize = 32, |
924 | }, | 954 | }, |
955 | { /* 440GX Rev. F */ | ||
956 | .pvr_mask = 0xf0000fff, | ||
957 | .pvr_value = 0x50000894, | ||
958 | .cpu_name = "440GX Rev. F", | ||
959 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
960 | CPU_FTR_USE_TB, | ||
961 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, | ||
962 | .icache_bsize = 32, | ||
963 | .dcache_bsize = 32, | ||
964 | }, | ||
965 | { /* 440SP Rev. A */ | ||
966 | .pvr_mask = 0xff000fff, | ||
967 | .pvr_value = 0x53000891, | ||
968 | .cpu_name = "440SP Rev. A", | ||
969 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
970 | CPU_FTR_USE_TB, | ||
971 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, | ||
972 | .icache_bsize = 32, | ||
973 | .dcache_bsize = 32, | ||
974 | }, | ||
925 | #endif /* CONFIG_44x */ | 975 | #endif /* CONFIG_44x */ |
926 | #ifdef CONFIG_FSL_BOOKE | 976 | #ifdef CONFIG_FSL_BOOKE |
927 | { /* e200z5 */ | 977 | { /* e200z5 */ |
diff --git a/arch/ppc/kernel/find_name.c b/arch/ppc/kernel/find_name.c deleted file mode 100644 index 3c0fa8e0c077..000000000000 --- a/arch/ppc/kernel/find_name.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <asm/page.h> | ||
3 | #include <sys/mman.h> | ||
4 | #include <strings.h> | ||
5 | /* | ||
6 | * Finds a given address in the System.map and prints it out | ||
7 | * with its neighbors. -- Cort | ||
8 | */ | ||
9 | |||
10 | int main(int argc, char **argv) | ||
11 | { | ||
12 | unsigned long addr, cmp, i; | ||
13 | FILE *f; | ||
14 | char s[256], last[256]; | ||
15 | |||
16 | if ( argc < 2 ) | ||
17 | { | ||
18 | fprintf(stderr, "Usage: %s <address>\n", argv[0]); | ||
19 | return -1; | ||
20 | } | ||
21 | |||
22 | for ( i = 1 ; argv[i] ; i++ ) | ||
23 | { | ||
24 | sscanf( argv[i], "%0lx", &addr ); | ||
25 | /* adjust if addr is relative to kernelbase */ | ||
26 | if ( addr < PAGE_OFFSET ) | ||
27 | addr += PAGE_OFFSET; | ||
28 | |||
29 | if ( (f = fopen( "System.map", "r" )) == NULL ) | ||
30 | { | ||
31 | perror("fopen()\n"); | ||
32 | exit(-1); | ||
33 | } | ||
34 | |||
35 | while ( !feof(f) ) | ||
36 | { | ||
37 | fgets(s, 255 , f); | ||
38 | sscanf( s, "%0lx", &cmp ); | ||
39 | if ( addr < cmp ) | ||
40 | break; | ||
41 | strcpy( last, s); | ||
42 | } | ||
43 | |||
44 | printf( "%s%s", last, s ); | ||
45 | } | ||
46 | fclose(f); | ||
47 | return 0; | ||
48 | } | ||
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 69ff3a9961e8..9e68e32edb60 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -462,7 +462,11 @@ interrupt_base: | |||
462 | 462 | ||
463 | /* Watchdog Timer Interrupt */ | 463 | /* Watchdog Timer Interrupt */ |
464 | /* TODO: Add watchdog support */ | 464 | /* TODO: Add watchdog support */ |
465 | #ifdef CONFIG_BOOKE_WDT | ||
466 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, WatchdogException) | ||
467 | #else | ||
465 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException) | 468 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException) |
469 | #endif | ||
466 | 470 | ||
467 | /* Data TLB Error Interrupt */ | 471 | /* Data TLB Error Interrupt */ |
468 | START_EXCEPTION(DataTLBError) | 472 | START_EXCEPTION(DataTLBError) |
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 23fb51819ba5..0a5e723d3be6 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S | |||
@@ -448,7 +448,9 @@ label: | |||
448 | 448 | ||
449 | /* 0x1020 - Watchdog Timer (WDT) Exception | 449 | /* 0x1020 - Watchdog Timer (WDT) Exception |
450 | */ | 450 | */ |
451 | 451 | #ifdef CONFIG_BOOKE_WDT | |
452 | CRITICAL_EXCEPTION(0x1020, WDTException, WatchdogException) | ||
453 | #else | ||
452 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) | 454 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) |
453 | #endif | 455 | #endif |
454 | 456 | ||
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index eb804b7a3cb2..4028f4c7d978 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -564,8 +564,11 @@ interrupt_base: | |||
564 | EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE) | 564 | EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE) |
565 | 565 | ||
566 | /* Watchdog Timer Interrupt */ | 566 | /* Watchdog Timer Interrupt */ |
567 | /* TODO: Add watchdog support */ | 567 | #ifdef CONFIG_BOOKE_WDT |
568 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, WatchdogException) | ||
569 | #else | ||
568 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException) | 570 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException) |
571 | #endif | ||
569 | 572 | ||
570 | /* Data TLB Error Interrupt */ | 573 | /* Data TLB Error Interrupt */ |
571 | START_EXCEPTION(DataTLBError) | 574 | START_EXCEPTION(DataTLBError) |
diff --git a/arch/ppc/kernel/l2cr.S b/arch/ppc/kernel/l2cr.S index c39441048266..861115249b35 100644 --- a/arch/ppc/kernel/l2cr.S +++ b/arch/ppc/kernel/l2cr.S | |||
@@ -156,6 +156,26 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
156 | The bit moved on the 7450..... | 156 | The bit moved on the 7450..... |
157 | ****/ | 157 | ****/ |
158 | 158 | ||
159 | BEGIN_FTR_SECTION | ||
160 | /* Disable L2 prefetch on some 745x and try to ensure | ||
161 | * L2 prefetch engines are idle. As explained by errata | ||
162 | * text, we can't be sure they are, we just hope very hard | ||
163 | * that well be enough (sic !). At least I noticed Apple | ||
164 | * doesn't even bother doing the dcbf's here... | ||
165 | */ | ||
166 | mfspr r4,SPRN_MSSCR0 | ||
167 | rlwinm r4,r4,0,0,29 | ||
168 | sync | ||
169 | mtspr SPRN_MSSCR0,r4 | ||
170 | sync | ||
171 | isync | ||
172 | lis r4,KERNELBASE@h | ||
173 | dcbf 0,r4 | ||
174 | dcbf 0,r4 | ||
175 | dcbf 0,r4 | ||
176 | dcbf 0,r4 | ||
177 | END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450) | ||
178 | |||
159 | /* TODO: use HW flush assist when available */ | 179 | /* TODO: use HW flush assist when available */ |
160 | 180 | ||
161 | lis r4,0x0002 | 181 | lis r4,0x0002 |
@@ -230,7 +250,16 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450) | |||
230 | oris r3,r3,0x8000 | 250 | oris r3,r3,0x8000 |
231 | mtspr SPRN_L2CR,r3 | 251 | mtspr SPRN_L2CR,r3 |
232 | sync | 252 | sync |
233 | 253 | ||
254 | /* Enable L2 HW prefetch on 744x/745x */ | ||
255 | BEGIN_FTR_SECTION | ||
256 | mfspr r3,SPRN_MSSCR0 | ||
257 | ori r3,r3,3 | ||
258 | sync | ||
259 | mtspr SPRN_MSSCR0,r3 | ||
260 | sync | ||
261 | isync | ||
262 | END_FTR_SECTION_IFSET(CPU_FTR_SPEC7450) | ||
234 | 4: | 263 | 4: |
235 | 264 | ||
236 | /* Restore HID0[DPM] to whatever it was before */ | 265 | /* Restore HID0[DPM] to whatever it was before */ |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index e7d40cc6c1b6..88f6bb7b6964 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -51,9 +51,6 @@ | |||
51 | #include <asm/commproc.h> | 51 | #include <asm/commproc.h> |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | /* Tell string.h we don't want memcpy etc. as cpp defines */ | ||
55 | #define EXPORT_SYMTAB_STROPS | ||
56 | |||
57 | extern void transfer_to_handler(void); | 54 | extern void transfer_to_handler(void); |
58 | extern void do_IRQ(struct pt_regs *regs); | 55 | extern void do_IRQ(struct pt_regs *regs); |
59 | extern void MachineCheckException(struct pt_regs *regs); | 56 | extern void MachineCheckException(struct pt_regs *regs); |
@@ -263,6 +260,7 @@ EXPORT_SYMBOL(__ashrdi3); | |||
263 | EXPORT_SYMBOL(__ashldi3); | 260 | EXPORT_SYMBOL(__ashldi3); |
264 | EXPORT_SYMBOL(__lshrdi3); | 261 | EXPORT_SYMBOL(__lshrdi3); |
265 | EXPORT_SYMBOL(memcpy); | 262 | EXPORT_SYMBOL(memcpy); |
263 | EXPORT_SYMBOL(cacheable_memcpy); | ||
266 | EXPORT_SYMBOL(memset); | 264 | EXPORT_SYMBOL(memset); |
267 | EXPORT_SYMBOL(memmove); | 265 | EXPORT_SYMBOL(memmove); |
268 | EXPORT_SYMBOL(memscan); | 266 | EXPORT_SYMBOL(memscan); |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index 929e5d1cc7fe..545cfd0fab59 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -41,7 +41,11 @@ | |||
41 | #include <asm/xmon.h> | 41 | #include <asm/xmon.h> |
42 | #include <asm/ocp.h> | 42 | #include <asm/ocp.h> |
43 | 43 | ||
44 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) || defined(CONFIG_MPC10X_BRIDGE) | 44 | #define USES_PPC_SYS (defined(CONFIG_85xx) || defined(CONFIG_83xx) || \ |
45 | defined(CONFIG_MPC10X_BRIDGE) || defined(CONFIG_8260) || \ | ||
46 | defined(CONFIG_PPC_MPC52xx)) | ||
47 | |||
48 | #if USES_PPC_SYS | ||
45 | #include <asm/ppc_sys.h> | 49 | #include <asm/ppc_sys.h> |
46 | #endif | 50 | #endif |
47 | 51 | ||
@@ -241,7 +245,7 @@ int show_cpuinfo(struct seq_file *m, void *v) | |||
241 | seq_printf(m, "bogomips\t: %lu.%02lu\n", | 245 | seq_printf(m, "bogomips\t: %lu.%02lu\n", |
242 | lpj / (500000/HZ), (lpj / (5000/HZ)) % 100); | 246 | lpj / (500000/HZ), (lpj / (5000/HZ)) % 100); |
243 | 247 | ||
244 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) || defined(CONFIG_MPC10X_BRIDGE) | 248 | #if USES_PPC_SYS |
245 | if (cur_ppc_sys_spec->ppc_sys_name) | 249 | if (cur_ppc_sys_spec->ppc_sys_name) |
246 | seq_printf(m, "chipset\t\t: %s\n", | 250 | seq_printf(m, "chipset\t\t: %s\n", |
247 | cur_ppc_sys_spec->ppc_sys_name); | 251 | cur_ppc_sys_spec->ppc_sys_name); |
@@ -615,6 +619,26 @@ machine_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
615 | if (ppc_md.progress) | 619 | if (ppc_md.progress) |
616 | ppc_md.progress("id mach(): done", 0x200); | 620 | ppc_md.progress("id mach(): done", 0x200); |
617 | } | 621 | } |
622 | #ifdef CONFIG_BOOKE_WDT | ||
623 | /* Checks wdt=x and wdt_period=xx command-line option */ | ||
624 | int __init early_parse_wdt(char *p) | ||
625 | { | ||
626 | if (p && strncmp(p, "0", 1) != 0) | ||
627 | booke_wdt_enabled = 1; | ||
628 | |||
629 | return 0; | ||
630 | } | ||
631 | early_param("wdt", early_parse_wdt); | ||
632 | |||
633 | int __init early_parse_wdt_period (char *p) | ||
634 | { | ||
635 | if (p) | ||
636 | booke_wdt_period = simple_strtoul(p, NULL, 0); | ||
637 | |||
638 | return 0; | ||
639 | } | ||
640 | early_param("wdt_period", early_parse_wdt_period); | ||
641 | #endif /* CONFIG_BOOKE_WDT */ | ||
618 | 642 | ||
619 | /* Checks "l2cr=xxxx" command-line option */ | 643 | /* Checks "l2cr=xxxx" command-line option */ |
620 | int __init ppc_setup_l2cr(char *str) | 644 | int __init ppc_setup_l2cr(char *str) |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 9e6ae5696650..d87423d1003a 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -904,6 +904,25 @@ void SPEFloatingPointException(struct pt_regs *regs) | |||
904 | } | 904 | } |
905 | #endif | 905 | #endif |
906 | 906 | ||
907 | #ifdef CONFIG_BOOKE_WDT | ||
908 | /* | ||
909 | * Default handler for a Watchdog exception, | ||
910 | * spins until a reboot occurs | ||
911 | */ | ||
912 | void __attribute__ ((weak)) WatchdogHandler(struct pt_regs *regs) | ||
913 | { | ||
914 | /* Generic WatchdogHandler, implement your own */ | ||
915 | mtspr(SPRN_TCR, mfspr(SPRN_TCR)&(~TCR_WIE)); | ||
916 | return; | ||
917 | } | ||
918 | |||
919 | void WatchdogException(struct pt_regs *regs) | ||
920 | { | ||
921 | printk (KERN_EMERG "PowerPC Book-E Watchdog Exception\n"); | ||
922 | WatchdogHandler(regs); | ||
923 | } | ||
924 | #endif | ||
925 | |||
907 | void __init trap_init(void) | 926 | void __init trap_init(void) |
908 | { | 927 | { |
909 | } | 928 | } |