diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-18 04:16:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-18 04:16:10 -0500 |
commit | 148b00b63a3f747141207e7a409f14bd26d0820f (patch) | |
tree | e88b52035d193517536087692583a5ec194d5ee0 /arch/powerpc/kernel | |
parent | e36d5058dbf85aacf2fadf508f275afd37c58576 (diff) | |
parent | a313f4c55d4952f2105fe33a4957ed858e998359 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/signal32: Fix sigset_t conversion when copying to user
powerpc: Fix atomic_xxx_return barrier semantics
powerpc: Remove buggy 9-year-old test for binutils < 2.12.1
powerpc/book3e-64: Fix debug support for userspace
powerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS define
powerpc: Revert show_regs() define for readability
powerpc/ps3: Fix SMP lockdep boot warning
powerpc/ps3: Fix lost SMP IPIs
powerpc: Add hvcall.h include to book3s_hv.c
powerpc/trace: Add a dummy stack frame for trace_hardirqs_off
powerpc: Copy down exception vectors after feature fixups
powerpc: panic if we can't instantiate RTAS
powerpc/4xx: Fix typos in kexec config dependencies
powerpc/fsl: MCU_MPC8349EMITX wants I2C built-in, modular won't do...
powerpc/fsl_udc_core: Fix dumb typo
carma-fpga: Missed switch from of_register_platform_driver()
powerpc: Fix build breakage in jump_label.c
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/jump_label.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/kvm.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 24 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 2 |
10 files changed, 25 insertions, 32 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 56212bc0ab08..4f80cf1ce77b 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -215,7 +215,22 @@ reenable_mmu: /* re-enable mmu so we can */ | |||
215 | stw r9,8(r1) | 215 | stw r9,8(r1) |
216 | stw r11,12(r1) | 216 | stw r11,12(r1) |
217 | stw r3,ORIG_GPR3(r1) | 217 | stw r3,ORIG_GPR3(r1) |
218 | /* | ||
219 | * The trace_hardirqs_off will use CALLER_ADDR0 and CALLER_ADDR1. | ||
220 | * If from user mode there is only one stack frame on the stack, and | ||
221 | * accessing CALLER_ADDR1 will cause oops. So we need create a dummy | ||
222 | * stack frame to make trace_hardirqs_off happy. | ||
223 | */ | ||
224 | andi. r12,r12,MSR_PR | ||
225 | beq 11f | ||
226 | stwu r1,-16(r1) | ||
227 | bl trace_hardirqs_off | ||
228 | addi r1,r1,16 | ||
229 | b 12f | ||
230 | |||
231 | 11: | ||
218 | bl trace_hardirqs_off | 232 | bl trace_hardirqs_off |
233 | 12: | ||
219 | lwz r0,GPR0(r1) | 234 | lwz r0,GPR0(r1) |
220 | lwz r3,ORIG_GPR3(r1) | 235 | lwz r3,ORIG_GPR3(r1) |
221 | lwz r4,GPR4(r1) | 236 | lwz r4,GPR4(r1) |
diff --git a/arch/powerpc/kernel/jump_label.c b/arch/powerpc/kernel/jump_label.c index 368d158d665d..a1ed8a8c7cb4 100644 --- a/arch/powerpc/kernel/jump_label.c +++ b/arch/powerpc/kernel/jump_label.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/jump_label.h> | 11 | #include <linux/jump_label.h> |
12 | #include <asm/code-patching.h> | 12 | #include <asm/code-patching.h> |
13 | 13 | ||
14 | #ifdef HAVE_JUMP_LABEL | ||
14 | void arch_jump_label_transform(struct jump_entry *entry, | 15 | void arch_jump_label_transform(struct jump_entry *entry, |
15 | enum jump_label_type type) | 16 | enum jump_label_type type) |
16 | { | 17 | { |
@@ -21,3 +22,4 @@ void arch_jump_label_transform(struct jump_entry *entry, | |||
21 | else | 22 | else |
22 | patch_instruction(addr, PPC_INST_NOP); | 23 | patch_instruction(addr, PPC_INST_NOP); |
23 | } | 24 | } |
25 | #endif | ||
diff --git a/arch/powerpc/kernel/kvm.c b/arch/powerpc/kernel/kvm.c index 35f27646c4ff..2985338d0e10 100644 --- a/arch/powerpc/kernel/kvm.c +++ b/arch/powerpc/kernel/kvm.c | |||
@@ -132,7 +132,6 @@ static void kvm_patch_ins_b(u32 *inst, int addr) | |||
132 | /* On relocatable kernels interrupts handlers and our code | 132 | /* On relocatable kernels interrupts handlers and our code |
133 | can be in different regions, so we don't patch them */ | 133 | can be in different regions, so we don't patch them */ |
134 | 134 | ||
135 | extern u32 __end_interrupts; | ||
136 | if ((ulong)inst < (ulong)&__end_interrupts) | 135 | if ((ulong)inst < (ulong)&__end_interrupts) |
137 | return; | 136 | return; |
138 | #endif | 137 | #endif |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index f7d760ab5ca1..7cd07b42ca1a 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -738,7 +738,7 @@ relocate_new_kernel: | |||
738 | mr r5, r31 | 738 | mr r5, r31 |
739 | 739 | ||
740 | li r0, 0 | 740 | li r0, 0 |
741 | #elif defined(CONFIG_44x) && !defined(CONFIG_47x) | 741 | #elif defined(CONFIG_44x) && !defined(CONFIG_PPC_47x) |
742 | 742 | ||
743 | /* | 743 | /* |
744 | * Code for setting up 1:1 mapping for PPC440x for KEXEC | 744 | * Code for setting up 1:1 mapping for PPC440x for KEXEC |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 9054ca9ab4f9..6457574c0b2f 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -486,28 +486,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
486 | new_thread = &new->thread; | 486 | new_thread = &new->thread; |
487 | old_thread = ¤t->thread; | 487 | old_thread = ¤t->thread; |
488 | 488 | ||
489 | #if defined(CONFIG_PPC_BOOK3E_64) | ||
490 | /* XXX Current Book3E code doesn't deal with kernel side DBCR0, | ||
491 | * we always hold the user values, so we set it now. | ||
492 | * | ||
493 | * However, we ensure the kernel MSR:DE is appropriately cleared too | ||
494 | * to avoid spurrious single step exceptions in the kernel. | ||
495 | * | ||
496 | * This will have to change to merge with the ppc32 code at some point, | ||
497 | * but I don't like much what ppc32 is doing today so there's some | ||
498 | * thinking needed there | ||
499 | */ | ||
500 | if ((new_thread->dbcr0 | old_thread->dbcr0) & DBCR0_IDM) { | ||
501 | u32 dbcr0; | ||
502 | |||
503 | mtmsr(mfmsr() & ~MSR_DE); | ||
504 | isync(); | ||
505 | dbcr0 = mfspr(SPRN_DBCR0); | ||
506 | dbcr0 = (dbcr0 & DBCR0_EDM) | new_thread->dbcr0; | ||
507 | mtspr(SPRN_DBCR0, dbcr0); | ||
508 | } | ||
509 | #endif /* CONFIG_PPC64_BOOK3E */ | ||
510 | |||
511 | #ifdef CONFIG_PPC64 | 489 | #ifdef CONFIG_PPC64 |
512 | /* | 490 | /* |
513 | * Collect processor utilization data per process | 491 | * Collect processor utilization data per process |
@@ -657,7 +635,7 @@ void show_regs(struct pt_regs * regs) | |||
657 | if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR)) | 635 | if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR)) |
658 | printk("CFAR: "REG"\n", regs->orig_gpr3); | 636 | printk("CFAR: "REG"\n", regs->orig_gpr3); |
659 | if (trap == 0x300 || trap == 0x600) | 637 | if (trap == 0x300 || trap == 0x600) |
660 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | 638 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) |
661 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); | 639 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); |
662 | #else | 640 | #else |
663 | printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr); | 641 | printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr); |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index b4fa66127495..cc584865b3df 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -1579,10 +1579,8 @@ static void __init prom_instantiate_rtas(void) | |||
1579 | return; | 1579 | return; |
1580 | 1580 | ||
1581 | base = alloc_down(size, PAGE_SIZE, 0); | 1581 | base = alloc_down(size, PAGE_SIZE, 0); |
1582 | if (base == 0) { | 1582 | if (base == 0) |
1583 | prom_printf("RTAS allocation failed !\n"); | 1583 | prom_panic("Could not allocate memory for RTAS\n"); |
1584 | return; | ||
1585 | } | ||
1586 | 1584 | ||
1587 | rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); | 1585 | rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); |
1588 | if (!IHANDLE_VALID(rtas_inst)) { | 1586 | if (!IHANDLE_VALID(rtas_inst)) { |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index c1ce86357ecb..ac7610815113 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -107,6 +107,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr) | |||
107 | PTRRELOC(&__start___lwsync_fixup), | 107 | PTRRELOC(&__start___lwsync_fixup), |
108 | PTRRELOC(&__stop___lwsync_fixup)); | 108 | PTRRELOC(&__stop___lwsync_fixup)); |
109 | 109 | ||
110 | do_final_fixups(); | ||
111 | |||
110 | return KERNELBASE + offset; | 112 | return KERNELBASE + offset; |
111 | } | 113 | } |
112 | 114 | ||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 1a9dea80a69b..fb9bb46e7e88 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -359,6 +359,7 @@ void __init setup_system(void) | |||
359 | &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup); | 359 | &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup); |
360 | do_lwsync_fixups(cur_cpu_spec->cpu_features, | 360 | do_lwsync_fixups(cur_cpu_spec->cpu_features, |
361 | &__start___lwsync_fixup, &__stop___lwsync_fixup); | 361 | &__start___lwsync_fixup, &__stop___lwsync_fixup); |
362 | do_final_fixups(); | ||
362 | 363 | ||
363 | /* | 364 | /* |
364 | * Unflatten the device-tree passed by prom_init or kexec | 365 | * Unflatten the device-tree passed by prom_init or kexec |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 78b76dc54dfb..836a5a19eb2c 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -97,7 +97,7 @@ static inline int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set) | |||
97 | compat_sigset_t cset; | 97 | compat_sigset_t cset; |
98 | 98 | ||
99 | switch (_NSIG_WORDS) { | 99 | switch (_NSIG_WORDS) { |
100 | case 4: cset.sig[5] = set->sig[3] & 0xffffffffull; | 100 | case 4: cset.sig[6] = set->sig[3] & 0xffffffffull; |
101 | cset.sig[7] = set->sig[3] >> 32; | 101 | cset.sig[7] = set->sig[3] >> 32; |
102 | case 3: cset.sig[4] = set->sig[2] & 0xffffffffull; | 102 | case 3: cset.sig[4] = set->sig[2] & 0xffffffffull; |
103 | cset.sig[5] = set->sig[2] >> 32; | 103 | cset.sig[5] = set->sig[2] >> 32; |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 4e5908264d1a..5459d148a0f6 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -1298,14 +1298,12 @@ void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) | |||
1298 | 1298 | ||
1299 | if (user_mode(regs)) { | 1299 | if (user_mode(regs)) { |
1300 | current->thread.dbcr0 &= ~DBCR0_IC; | 1300 | current->thread.dbcr0 &= ~DBCR0_IC; |
1301 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | ||
1302 | if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0, | 1301 | if (DBCR_ACTIVE_EVENTS(current->thread.dbcr0, |
1303 | current->thread.dbcr1)) | 1302 | current->thread.dbcr1)) |
1304 | regs->msr |= MSR_DE; | 1303 | regs->msr |= MSR_DE; |
1305 | else | 1304 | else |
1306 | /* Make sure the IDM bit is off */ | 1305 | /* Make sure the IDM bit is off */ |
1307 | current->thread.dbcr0 &= ~DBCR0_IDM; | 1306 | current->thread.dbcr0 &= ~DBCR0_IDM; |
1308 | #endif | ||
1309 | } | 1307 | } |
1310 | 1308 | ||
1311 | _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); | 1309 | _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); |