RE: Latency traces I cannot interpret (sa1100, 2.6.15-rc7-rt1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2006-01-03 at 09:00 +0100, kus Kusche Klaus wrote:
> > From: Daniel Walker
> > Here's a more updated patch, the should replace the other 
> > patch I sent.
> > I think the tracing error is the result of a missed interrupt 
> > enable in
> > the ARM assembly code. I've only compile tested this.  
> 
> Compiles, but BUGs immediately after uncompressing (second line of
> console output) and then runs into an infinite Oops loop...
> Reproducible.

Ok, yet another patch. This one uses the correct lowlevel calls, and I
fixed the call ordering.

Daniel
Index: linux-2.6.14/arch/arm/kernel/process.c
===================================================================
--- linux-2.6.14.orig/arch/arm/kernel/process.c
+++ linux-2.6.14/arch/arm/kernel/process.c
@@ -89,12 +89,12 @@ void default_idle(void)
 	if (hlt_counter)
 		cpu_relax();
 	else {
-		raw_local_irq_disable();
+		__raw_local_irq_disable();
 		if (!need_resched()) {
 			timer_dyn_reprogram();
 			arch_idle();
 		}
-		raw_local_irq_enable();
+		__raw_local_irq_enable();
 	}
 }
 
@@ -121,8 +121,10 @@ void cpu_idle(void)
 		if (!idle)
 			idle = default_idle;
 		leds_event(led_idle_start);
+		__preempt_enable_no_resched();
 		while (!need_resched())
 			idle();
+		preempt_disable();
 		leds_event(led_idle_end);
 		__preempt_enable_no_resched();
 		__schedule();
Index: linux-2.6.14/arch/arm/kernel/entry-header.S
===================================================================
--- linux-2.6.14.orig/arch/arm/kernel/entry-header.S
+++ linux-2.6.14/arch/arm/kernel/entry-header.S
@@ -39,17 +39,29 @@
 #if __LINUX_ARM_ARCH__ >= 6
 	.macro	disable_irq
 	cpsid	i
+#ifdef CONFIG_CRITICAL_IRQSOFF_TIMING
+	b	trace_irqs_off_lowlevel
+#endif
 	.endm
 
 	.macro	enable_irq
+#ifdef CONFIG_CRITICAL_IRQSOFF_TIMING
+	b	trace_irqs_on
+#endif
 	cpsie	i
 	.endm
 #else
 	.macro	disable_irq
 	msr	cpsr_c, #PSR_I_BIT | SVC_MODE
+#ifdef CONFIG_CRITICAL_IRQSOFF_TIMING
+	b	trace_irqs_off_lowlevel
+#endif
 	.endm
 
 	.macro	enable_irq
+#ifdef CONFIG_CRITICAL_IRQSOFF_TIMING
+	b	trace_irqs_on
+#endif
 	msr	cpsr_c, #SVC_MODE
 	.endm
 #endif

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux