public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix call to profile_tick() for non-SMP SPARC64
@ 2006-10-09  2:43 Horst von Brand
  2006-10-09 10:51 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Horst von Brand @ 2006-10-09  2:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Horst von Brand


Signed-off-by: Horst von Brand <vonbrand@pincoya.inf.utfsm.cl>
---
 arch/sparc64/kernel/time.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 00f6fc4..36c74cf 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -460,7 +460,7 @@ irqreturn_t timer_interrupt(int irq, voi
 
 	do {
 #ifndef CONFIG_SMP
-		profile_tick(CPU_PROFILING, regs);
+		profile_tick(CPU_PROFILING);
 		update_process_times(user_mode(regs));
 #endif
 		do_timer(1);
-- 
1.4.2.3.g7a0cf

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix call to profile_tick() for non-SMP SPARC64
  2006-10-09  2:43 [PATCH] Fix call to profile_tick() for non-SMP SPARC64 Horst von Brand
@ 2006-10-09 10:51 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2006-10-09 10:51 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: davem, linux-kernel, Horst von Brand

On Sun, Oct 08, 2006 at 10:43:14PM -0400, Horst von Brand wrote:
> 
> Signed-off-by: Horst von Brand <vonbrand@pincoya.inf.utfsm.cl>

NAK.  That gives you junk data used by profile_tick().  Real fix
follows:

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
----
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index ce05deb..d64b1ea 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -522,12 +522,13 @@ void ack_bad_irq(unsigned int virt_irq)
 }
 
 #ifndef CONFIG_SMP
-extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t timer_interrupt(int, void *);
 
 void timer_irq(int irq, struct pt_regs *regs)
 {
 	unsigned long clr_mask = 1 << irq;
 	unsigned long tick_mask = tick_ops->softint_mask;
+	struct pt_regs *old_regs;
 
 	if (get_softint() & tick_mask) {
 		irq = 0;
@@ -535,12 +536,14 @@ void timer_irq(int irq, struct pt_regs *
 	}
 	clear_softint(clr_mask);
 
+	old_regs = set_irq_regs(regs);
 	irq_enter();
 
 	kstat_this_cpu.irqs[0]++;
-	timer_interrupt(irq, NULL, regs);
+	timer_interrupt(irq, NULL);
 
 	irq_exit();
+	set_irq_regs(old_regs);
 }
 #endif
 
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 00f6fc4..061e1b1 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -45,6 +45,7 @@ #include <asm/sections.h>
 #include <asm/cpudata.h>
 #include <asm/uaccess.h>
 #include <asm/prom.h>
+#include <asm/irq_regs.h>
 
 DEFINE_SPINLOCK(mostek_lock);
 DEFINE_SPINLOCK(rtc_lock);
@@ -452,7 +453,7 @@ static inline void timer_check_rtc(void)
 	}
 }
 
-irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+irqreturn_t timer_interrupt(int irq, void *dev_id)
 {
 	unsigned long ticks, compare, pstate;
 
@@ -460,8 +461,8 @@ irqreturn_t timer_interrupt(int irq, voi
 
 	do {
 #ifndef CONFIG_SMP
-		profile_tick(CPU_PROFILING, regs);
-		update_process_times(user_mode(regs));
+		profile_tick(CPU_PROFILING);
+		update_process_times(user_mode(get_irq_regs()));
 #endif
 		do_timer(1);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-09 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09  2:43 [PATCH] Fix call to profile_tick() for non-SMP SPARC64 Horst von Brand
2006-10-09 10:51 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox