diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-28 19:23:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-28 19:23:07 -0500 |
commit | fc16e884a2320198b8cb7bc2fdcf6b4485e79709 (patch) | |
tree | d98d1938ab0fb7bcc02193772936f8dec6c22661 /arch/powerpc | |
parent | f94d4fe0b5bbe8385245a1d9ef11d785c05df0da (diff) | |
parent | 689dfa894c57842a05bf6dc9f97e6bb71ec5f386 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
"Whenever you have a chance between two dives, you might want to
consider pulling my merge branch to pickup a few fixes for 3.8 that
have been accumulating for the last couple of weeks (I was myself
travelling then on vacation).
Nothing major, just a handful of powerpc bug fixes that I consider
worth getting in before 3.8 goes final."
And I'll have everybody know that I'm not diving for several days yet.
Snif.
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: Max next_tb to prevent from replaying timer interrupt
powerpc: kernel/kgdb.c: Fix memory leakage
powerpc/book3e: Disable interrupt after preempt_schedule_irq
powerpc/oprofile: Fix error in oprofile power7_marked_instr_event() function
powerpc/pasemi: Fix crash on reboot
powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning for ppc32
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/kgdb.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 9 | ||||
-rw-r--r-- | arch/powerpc/oprofile/op_model_power4.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/cpufreq.c | 7 |
6 files changed, 33 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index d22e73e4618b..e514de57a125 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -439,6 +439,8 @@ ret_from_fork: | |||
439 | ret_from_kernel_thread: | 439 | ret_from_kernel_thread: |
440 | REST_NVGPRS(r1) | 440 | REST_NVGPRS(r1) |
441 | bl schedule_tail | 441 | bl schedule_tail |
442 | li r3,0 | ||
443 | stw r3,0(r1) | ||
442 | mtlr r14 | 444 | mtlr r14 |
443 | mr r3,r15 | 445 | mr r3,r15 |
444 | PPC440EP_ERR42 | 446 | PPC440EP_ERR42 |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index b310a0573625..3d990d3bd8ba 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -664,6 +664,19 @@ resume_kernel: | |||
664 | ld r4,TI_FLAGS(r9) | 664 | ld r4,TI_FLAGS(r9) |
665 | andi. r0,r4,_TIF_NEED_RESCHED | 665 | andi. r0,r4,_TIF_NEED_RESCHED |
666 | bne 1b | 666 | bne 1b |
667 | |||
668 | /* | ||
669 | * arch_local_irq_restore() from preempt_schedule_irq above may | ||
670 | * enable hard interrupt but we really should disable interrupts | ||
671 | * when we return from the interrupt, and so that we don't get | ||
672 | * interrupted after loading SRR0/1. | ||
673 | */ | ||
674 | #ifdef CONFIG_PPC_BOOK3E | ||
675 | wrteei 0 | ||
676 | #else | ||
677 | ld r10,PACAKMSR(r13) /* Get kernel MSR without EE */ | ||
678 | mtmsrd r10,1 /* Update machine state */ | ||
679 | #endif /* CONFIG_PPC_BOOK3E */ | ||
667 | #endif /* CONFIG_PREEMPT */ | 680 | #endif /* CONFIG_PREEMPT */ |
668 | 681 | ||
669 | .globl fast_exc_return_irq | 682 | .globl fast_exc_return_irq |
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index c470a40b29f5..a7bc7521c064 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c | |||
@@ -154,12 +154,12 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs) | |||
154 | static int kgdb_singlestep(struct pt_regs *regs) | 154 | static int kgdb_singlestep(struct pt_regs *regs) |
155 | { | 155 | { |
156 | struct thread_info *thread_info, *exception_thread_info; | 156 | struct thread_info *thread_info, *exception_thread_info; |
157 | struct thread_info *backup_current_thread_info = \ | 157 | struct thread_info *backup_current_thread_info; |
158 | (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL); | ||
159 | 158 | ||
160 | if (user_mode(regs)) | 159 | if (user_mode(regs)) |
161 | return 0; | 160 | return 0; |
162 | 161 | ||
162 | backup_current_thread_info = (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL); | ||
163 | /* | 163 | /* |
164 | * On Book E and perhaps other processors, singlestep is handled on | 164 | * On Book E and perhaps other processors, singlestep is handled on |
165 | * the critical exception stack. This causes current_thread_info() | 165 | * the critical exception stack. This causes current_thread_info() |
@@ -185,6 +185,7 @@ static int kgdb_singlestep(struct pt_regs *regs) | |||
185 | /* Restore current_thread_info lastly. */ | 185 | /* Restore current_thread_info lastly. */ |
186 | memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info); | 186 | memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info); |
187 | 187 | ||
188 | kfree(backup_current_thread_info); | ||
188 | return 1; | 189 | return 1; |
189 | } | 190 | } |
190 | 191 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 6f6b1cccc916..127361e093f4 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -494,10 +494,15 @@ void timer_interrupt(struct pt_regs * regs) | |||
494 | set_dec(DECREMENTER_MAX); | 494 | set_dec(DECREMENTER_MAX); |
495 | 495 | ||
496 | /* Some implementations of hotplug will get timer interrupts while | 496 | /* Some implementations of hotplug will get timer interrupts while |
497 | * offline, just ignore these | 497 | * offline, just ignore these and we also need to set |
498 | * decrementers_next_tb as MAX to make sure __check_irq_replay | ||
499 | * don't replay timer interrupt when return, otherwise we'll trap | ||
500 | * here infinitely :( | ||
498 | */ | 501 | */ |
499 | if (!cpu_online(smp_processor_id())) | 502 | if (!cpu_online(smp_processor_id())) { |
503 | *next_tb = ~(u64)0; | ||
500 | return; | 504 | return; |
505 | } | ||
501 | 506 | ||
502 | /* Conditionally hard-enable interrupts now that the DEC has been | 507 | /* Conditionally hard-enable interrupts now that the DEC has been |
503 | * bumped to its maximum value | 508 | * bumped to its maximum value |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 315f9495e9b2..f444b94935f5 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -52,7 +52,7 @@ static int power7_marked_instr_event(u64 mmcr1) | |||
52 | for (pmc = 0; pmc < 4; pmc++) { | 52 | for (pmc = 0; pmc < 4; pmc++) { |
53 | psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK | 53 | psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK |
54 | << (OPROFILE_MAX_PMC_NUM - pmc) | 54 | << (OPROFILE_MAX_PMC_NUM - pmc) |
55 | * OPROFILE_MAX_PMC_NUM); | 55 | * OPROFILE_PMSEL_FIELD_WIDTH); |
56 | psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc) | 56 | psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc) |
57 | * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL; | 57 | * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL; |
58 | unit = mmcr1 & (OPROFILE_PM_UNIT_MSK | 58 | unit = mmcr1 & (OPROFILE_PM_UNIT_MSK |
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c index 95d00173029f..890f30e70f98 100644 --- a/arch/powerpc/platforms/pasemi/cpufreq.c +++ b/arch/powerpc/platforms/pasemi/cpufreq.c | |||
@@ -236,6 +236,13 @@ out: | |||
236 | 236 | ||
237 | static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) | 237 | static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) |
238 | { | 238 | { |
239 | /* | ||
240 | * We don't support CPU hotplug. Don't unmap after the system | ||
241 | * has already made it to a running state. | ||
242 | */ | ||
243 | if (system_state != SYSTEM_BOOTING) | ||
244 | return 0; | ||
245 | |||
239 | if (sdcasr_mapbase) | 246 | if (sdcasr_mapbase) |
240 | iounmap(sdcasr_mapbase); | 247 | iounmap(sdcasr_mapbase); |
241 | if (sdcpwr_mapbase) | 248 | if (sdcpwr_mapbase) |