diff options
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/head_44x.S | 15 | ||||
-rw-r--r-- | arch/ppc/kernel/head_fsl_booke.S | 15 | ||||
-rw-r--r-- | arch/ppc/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/traps.c | 7 |
4 files changed, 25 insertions, 14 deletions
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 9b6a8e513657..6c7ae6052464 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -330,8 +330,9 @@ interrupt_base: | |||
330 | /* If we are faulting a kernel address, we have to use the | 330 | /* If we are faulting a kernel address, we have to use the |
331 | * kernel page tables. | 331 | * kernel page tables. |
332 | */ | 332 | */ |
333 | andis. r11, r10, 0x8000 | 333 | lis r11, TASK_SIZE@h |
334 | beq 3f | 334 | cmplw r10, r11 |
335 | blt+ 3f | ||
335 | lis r11, swapper_pg_dir@h | 336 | lis r11, swapper_pg_dir@h |
336 | ori r11, r11, swapper_pg_dir@l | 337 | ori r11, r11, swapper_pg_dir@l |
337 | 338 | ||
@@ -464,8 +465,9 @@ interrupt_base: | |||
464 | /* If we are faulting a kernel address, we have to use the | 465 | /* If we are faulting a kernel address, we have to use the |
465 | * kernel page tables. | 466 | * kernel page tables. |
466 | */ | 467 | */ |
467 | andis. r11, r10, 0x8000 | 468 | lis r11, TASK_SIZE@h |
468 | beq 3f | 469 | cmplw r10, r11 |
470 | blt+ 3f | ||
469 | lis r11, swapper_pg_dir@h | 471 | lis r11, swapper_pg_dir@h |
470 | ori r11, r11, swapper_pg_dir@l | 472 | ori r11, r11, swapper_pg_dir@l |
471 | 473 | ||
@@ -533,8 +535,9 @@ interrupt_base: | |||
533 | /* If we are faulting a kernel address, we have to use the | 535 | /* If we are faulting a kernel address, we have to use the |
534 | * kernel page tables. | 536 | * kernel page tables. |
535 | */ | 537 | */ |
536 | andis. r11, r10, 0x8000 | 538 | lis r11, TASK_SIZE@h |
537 | beq 3f | 539 | cmplw r10, r11 |
540 | blt+ 3f | ||
538 | lis r11, swapper_pg_dir@h | 541 | lis r11, swapper_pg_dir@h |
539 | ori r11, r11, swapper_pg_dir@l | 542 | ori r11, r11, swapper_pg_dir@l |
540 | 543 | ||
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index f22ddce36135..ce36e88ba627 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -232,7 +232,8 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
232 | tlbwe | 232 | tlbwe |
233 | 233 | ||
234 | /* 7. Jump to KERNELBASE mapping */ | 234 | /* 7. Jump to KERNELBASE mapping */ |
235 | li r7,0 | 235 | lis r7,MSR_KERNEL@h |
236 | ori r7,r7,MSR_KERNEL@l | ||
236 | bl 1f /* Find our address */ | 237 | bl 1f /* Find our address */ |
237 | 1: mflr r9 | 238 | 1: mflr r9 |
238 | rlwimi r6,r9,0,20,31 | 239 | rlwimi r6,r9,0,20,31 |
@@ -293,6 +294,18 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
293 | mtspr SPRN_HID0, r2 | 294 | mtspr SPRN_HID0, r2 |
294 | #endif | 295 | #endif |
295 | 296 | ||
297 | #if !defined(CONFIG_BDI_SWITCH) | ||
298 | /* | ||
299 | * The Abatron BDI JTAG debugger does not tolerate others | ||
300 | * mucking with the debug registers. | ||
301 | */ | ||
302 | lis r2,DBCR0_IDM@h | ||
303 | mtspr SPRN_DBCR0,r2 | ||
304 | /* clear any residual debug events */ | ||
305 | li r2,-1 | ||
306 | mtspr SPRN_DBSR,r2 | ||
307 | #endif | ||
308 | |||
296 | /* | 309 | /* |
297 | * This is where the main kernel code starts. | 310 | * This is where the main kernel code starts. |
298 | */ | 311 | */ |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index 309797d7f96d..5c20266e3b1f 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -499,7 +499,7 @@ static int __init set_preferred_console(void) | |||
499 | { | 499 | { |
500 | struct device_node *prom_stdout; | 500 | struct device_node *prom_stdout; |
501 | char *name; | 501 | char *name; |
502 | int offset; | 502 | int offset = 0; |
503 | 503 | ||
504 | if (of_stdout_device == NULL) | 504 | if (of_stdout_device == NULL) |
505 | return -ENODEV; | 505 | return -ENODEV; |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index f8e7e324a173..c65731e8bc65 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -408,12 +408,7 @@ static int emulate_string_inst(struct pt_regs *regs, u32 instword) | |||
408 | 408 | ||
409 | /* Early out if we are an invalid form of lswx */ | 409 | /* Early out if we are an invalid form of lswx */ |
410 | if ((instword & INST_STRING_MASK) == INST_LSWX) | 410 | if ((instword & INST_STRING_MASK) == INST_LSWX) |
411 | if ((rA >= rT) || (NB_RB >= rT) || (rT == rA) || (rT == NB_RB)) | 411 | if ((rT == rA) || (rT == NB_RB)) |
412 | return -EINVAL; | ||
413 | |||
414 | /* Early out if we are an invalid form of lswi */ | ||
415 | if ((instword & INST_STRING_MASK) == INST_LSWI) | ||
416 | if ((rA >= rT) || (rT == rA)) | ||
417 | return -EINVAL; | 412 | return -EINVAL; |
418 | 413 | ||
419 | EA = (rA == 0) ? 0 : regs->gpr[rA]; | 414 | EA = (rA == 0) ? 0 : regs->gpr[rA]; |