Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc16e884 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents f94d4fe0 689dfa89
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -439,6 +439,8 @@ ret_from_fork:
ret_from_kernel_thread:
ret_from_kernel_thread:
	REST_NVGPRS(r1)
	REST_NVGPRS(r1)
	bl	schedule_tail
	bl	schedule_tail
	li	r3,0
	stw	r3,0(r1)
	mtlr	r14
	mtlr	r14
	mr	r3,r15
	mr	r3,r15
	PPC440EP_ERR42
	PPC440EP_ERR42
+13 −0
Original line number Original line Diff line number Diff line
@@ -664,6 +664,19 @@ resume_kernel:
	ld	r4,TI_FLAGS(r9)
	ld	r4,TI_FLAGS(r9)
	andi.	r0,r4,_TIF_NEED_RESCHED
	andi.	r0,r4,_TIF_NEED_RESCHED
	bne	1b
	bne	1b

	/*
	 * arch_local_irq_restore() from preempt_schedule_irq above may
	 * enable hard interrupt but we really should disable interrupts
	 * when we return from the interrupt, and so that we don't get
	 * interrupted after loading SRR0/1.
	 */
#ifdef CONFIG_PPC_BOOK3E
	wrteei	0
#else
	ld	r10,PACAKMSR(r13) /* Get kernel MSR without EE */
	mtmsrd	r10,1		  /* Update machine state */
#endif /* CONFIG_PPC_BOOK3E */
#endif /* CONFIG_PREEMPT */
#endif /* CONFIG_PREEMPT */


	.globl	fast_exc_return_irq
	.globl	fast_exc_return_irq
+3 −2
Original line number Original line Diff line number Diff line
@@ -154,12 +154,12 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs)
static int kgdb_singlestep(struct pt_regs *regs)
static int kgdb_singlestep(struct pt_regs *regs)
{
{
	struct thread_info *thread_info, *exception_thread_info;
	struct thread_info *thread_info, *exception_thread_info;
	struct thread_info *backup_current_thread_info = \
	struct thread_info *backup_current_thread_info;
		(struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL);


	if (user_mode(regs))
	if (user_mode(regs))
		return 0;
		return 0;


	backup_current_thread_info = (struct thread_info *)kmalloc(sizeof(struct thread_info), GFP_KERNEL);
	/*
	/*
	 * On Book E and perhaps other processors, singlestep is handled on
	 * On Book E and perhaps other processors, singlestep is handled on
	 * the critical exception stack.  This causes current_thread_info()
	 * the critical exception stack.  This causes current_thread_info()
@@ -185,6 +185,7 @@ static int kgdb_singlestep(struct pt_regs *regs)
		/* Restore current_thread_info lastly. */
		/* Restore current_thread_info lastly. */
		memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info);
		memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info);


	kfree(backup_current_thread_info);
	return 1;
	return 1;
}
}


+7 −2
Original line number Original line Diff line number Diff line
@@ -494,10 +494,15 @@ void timer_interrupt(struct pt_regs * regs)
	set_dec(DECREMENTER_MAX);
	set_dec(DECREMENTER_MAX);


	/* Some implementations of hotplug will get timer interrupts while
	/* Some implementations of hotplug will get timer interrupts while
	 * offline, just ignore these
	 * offline, just ignore these and we also need to set
	 * decrementers_next_tb as MAX to make sure __check_irq_replay
	 * don't replay timer interrupt when return, otherwise we'll trap
	 * here infinitely :(
	 */
	 */
	if (!cpu_online(smp_processor_id()))
	if (!cpu_online(smp_processor_id())) {
		*next_tb = ~(u64)0;
		return;
		return;
	}


	/* Conditionally hard-enable interrupts now that the DEC has been
	/* Conditionally hard-enable interrupts now that the DEC has been
	 * bumped to its maximum value
	 * bumped to its maximum value
+1 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ static int power7_marked_instr_event(u64 mmcr1)
	for (pmc = 0; pmc < 4; pmc++) {
	for (pmc = 0; pmc < 4; pmc++) {
		psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK
		psel = mmcr1 & (OPROFILE_PM_PMCSEL_MSK
				<< (OPROFILE_MAX_PMC_NUM - pmc)
				<< (OPROFILE_MAX_PMC_NUM - pmc)
				* OPROFILE_MAX_PMC_NUM);
				* OPROFILE_PMSEL_FIELD_WIDTH);
		psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc)
		psel = (psel >> ((OPROFILE_MAX_PMC_NUM - pmc)
				 * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL;
				 * OPROFILE_PMSEL_FIELD_WIDTH)) & ~1ULL;
		unit = mmcr1 & (OPROFILE_PM_UNIT_MSK
		unit = mmcr1 & (OPROFILE_PM_UNIT_MSK
Loading