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

Commit 7d2bd30f authored by Kumar Gala's avatar Kumar Gala Committed by Paul Mackerras
Browse files

[POWERPC] ppc: Add missing calls to set_irq_regs



In the timer_interrupt we were not calling set_irq_regs() and if we are
profiling we will end up calling get_irq_regs().  This causes bad things to
happen.

Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent bb579cf1
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,7 @@
#include <asm/cache.h>
#include <asm/cache.h>
#include <asm/8xx_immap.h>
#include <asm/8xx_immap.h>
#include <asm/machdep.h>
#include <asm/machdep.h>
#include <asm/irq_regs.h>


#include <asm/time.h>
#include <asm/time.h>


@@ -129,6 +130,7 @@ void wakeup_decrementer(void)
 */
 */
void timer_interrupt(struct pt_regs * regs)
void timer_interrupt(struct pt_regs * regs)
{
{
	struct pt_regs *old_regs;
	int next_dec;
	int next_dec;
	unsigned long cpu = smp_processor_id();
	unsigned long cpu = smp_processor_id();
	unsigned jiffy_stamp = last_jiffy_stamp(cpu);
	unsigned jiffy_stamp = last_jiffy_stamp(cpu);
@@ -137,6 +139,7 @@ void timer_interrupt(struct pt_regs * regs)
	if (atomic_read(&ppc_n_lost_interrupts) != 0)
	if (atomic_read(&ppc_n_lost_interrupts) != 0)
		do_IRQ(regs);
		do_IRQ(regs);


	old_regs = set_irq_regs(regs);
	irq_enter();
	irq_enter();


	while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
	while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
@@ -188,6 +191,7 @@ void timer_interrupt(struct pt_regs * regs)
		ppc_md.heartbeat();
		ppc_md.heartbeat();


	irq_exit();
	irq_exit();
	set_irq_regs(old_regs);
}
}


/*
/*