I didn't build the kernel with tracer support, also doesn't -f need -b?tom.k.cook wrote:Any luck with cyclictest -W or-f?
Yes it does. I've got 3.6rt kernels to this point but they crash when tracers are enabled .aaa801 wrote:I didn't build the kernel with tracer support, also doesn't -f need -b?tom.k.cook wrote:Any luck with cyclictest -W or-f?
Il recompile the kernel in a sec
what do i need to change in .config to enable tracerstom.k.cook wrote:Yes it does. I've got 3.6rt kernels to this point but they crash when tracers are enabled .aaa801 wrote:I didn't build the kernel with tracer support, also doesn't -f need -b?tom.k.cook wrote:Any luck with cyclictest -W or-f?
Il recompile the kernel in a sec
Code: Select all
> sudo -s
> mount -t debugfs none /sys/kernel/debug
> echo dwc_otg_hcd_handle_fiq > /sys/kernel/debug/tracing/set_ftrace_notrace
> ./cyclictest -p95 -m -f -b 1000Code: Select all
[ 27.320291] mmc0: final write to SD card still running
[ 37.351983] mmc0: Timeout waiting for hardware interrupt - cmd12.
[ 37.368209] mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900
[ 38.177536] mmc0: final write to SD card still running
[ 48.211981] mmc0: Timeout waiting for hardware interrupt - cmd12.
Code: Select all
3.214878]
[ 3.214883] =============================================
[ 3.214886] [ INFO: possible recursive locking detected ]
[ 3.214900] 3.8.13-rt12+ #6 Not tainted
[ 3.214903] ---------------------------------------------
[ 3.214914] khubd/17 is trying to acquire lock:
[ 3.214973] (sl){+.+...}, at: [<c02ca878>] DWC_SPINLOCK_IRQSAVE+0x14/0x20
[ 3.214976]
[ 3.214976] but task is already holding lock:
[ 3.214999] (sl){+.+...}, at: [<c02ca878>] DWC_SPINLOCK_IRQSAVE+0x14/0x20
[ 3.215002]
[ 3.215002] other info that might help us debug this:
[ 3.215006] Possible unsafe locking scenario:
[ 3.215006]
[ 3.215009] CPU0
[ 3.215011] ----
[ 3.215016] lock(sl);
[ 3.215022] lock(sl);
[ 3.215024]
[ 3.215024] *** DEADLOCK ***
[ 3.215024]
[ 3.215026] May be due to missing lock nesting notation
[ 3.215026]
[ 3.215034] 3 locks held by khubd/17:
[ 3.215067] #0: (&__lockdep_no_validate__){......}, at: [<c0297f30>] hub_thread+0x9c/0x11b8
[ 3.215092] #1: (usb_address0_mutex){+.+.+.}, at: [<c0295ec0>] hub_port_init+0x58/0x998
[ 3.215115] #2: (sl){+.+...}, at: [<c02ca878>] DWC_SPINLOCK_IRQSAVE+0x14/0x20
[ 3.215118]
[ 3.215118] stack backtrace:
[ 3.215125] Backtrace:
[ 3.215178] [<c00111ac>] (dump_backtrace+0x0/0x10c) from [<c03d4b30>] (dump_stack+0x18/0x1c)
[ 3.215196] r6:da8ea7b8 r5:c0c63e64 r4:c07e756c r3:da8ea220
[ 3.215235] [<c03d4b18>] (dump_stack+0x0/0x1c) from [<c005fca8>] (__lock_acquire+0x1614/0x1bbc)
[ 3.215256] [<c005e694>] (__lock_acquire+0x0/0x1bbc) from [<c0060750>] (lock_acquire+0x68/0x7c)
[ 3.215277] [<c00606e8>] (lock_acquire+0x0/0x7c) from [<c03da668>] (rt_spin_lock+0x4c/0x5c)
[ 3.215294] r7:c0cb0544 r6:c06e8711 r5:c02ca878 r4:da9e6440
[ 3.215319] [<c03da61c>] (rt_spin_lock+0x0/0x5c) from [<c02ca878>] (DWC_SPINLOCK_IRQSAVE+0x14/0x20)
[ 3.215329] r5:da8edc34 r4:da8edc34
[ 3.215351] [<c02ca864>] (DWC_SPINLOCK_IRQSAVE+0x0/0x20) from [<c02c205c>] (dwc_otg_hcd_select_transactions+0x168/0x30c)
[ 3.215361] r4:da9e6440 r3:daa91b40
[ 3.215379] [<c02c1ef4>] (dwc_otg_hcd_select_transactions+0x0/0x30c) from [<c02c22fc>] (dwc_otg_hcd_urb_enqueue+0xfc/0x198)
[ 3.215397] [<c02c2200>] (dwc_otg_hcd_urb_enqueue+0x0/0x198) from [<c02c3060>] (dwc_otg_urb_enqueue+0x228/0x300)
[ 3.215415] r8:daa69400 r7:da928bc0 r6:daa7d920 r5:00000040 r4:00000000
[ 3.215440] [<c02c2e38>] (dwc_otg_urb_enqueue+0x0/0x300) from [<c029b2f0>] (usb_hcd_submit_urb+0xb8/0x6e4)
[ 3.215465] [<c029b238>] (usb_hcd_submit_urb+0x0/0x6e4) from [<c029ca6c>] (usb_submit_urb+0xfc/0x320)
[ 3.215486] [<c029c970>] (usb_submit_urb+0x0/0x320) from [<c029d724>] (usb_start_wait_urb+0x48/0xbc)
[ 3.215506] [<c029d6dc>] (usb_start_wait_urb+0x0/0xbc) from [<c029d984>] (usb_control_msg+0xc4/0xf8)
[ 3.215525] r8:80000080 r7:00000100 r6:00000000 r5:00000040 r4:daa90c20
[ 3.215544] [<c029d8c0>] (usb_control_msg+0x0/0xf8) from [<c02961c0>] (hub_port_init+0x358/0x998)
[ 3.215562] [<c0295e68>] (hub_port_init+0x0/0x998) from [<c0298208>] (hub_thread+0x374/0x11b8)
[ 3.215590] [<c0297e94>] (hub_thread+0x0/0x11b8) from [<c003c130>] (kthread+0xa4/0xac)
[ 3.215612] [<c003c08c>] (kthread+0x0/0xac) from [<c000e0d0>] (ret_from_fork+0x14/0x24)
Code: Select all
--- linux/drivers/mmc/host/sdhci.c 2013-07-03 11:54:06.306455988 +0200
+++ linux-rt/drivers/mmc/host/sdhci.c 2013-07-03 16:49:33.298601044 +0200
@@ -162,9 +162,17 @@
preempt_schedule();
}
spin_lock_irqsave(&host->lock,*flags);
+#ifdef CONFIG_PREEMPT_RT_FULL
+ disable_irq_nosync(host->irq);
+#else
disable_irq(host->irq);
+#endif
if(host->second_irq)
+#ifdef CONFIG_PREEMPT_RT_FULL
+ disable_irq_nosync(host->second_irq);
+#else
disable_irq(host->second_irq);
+#endif
local_irq_enable();
}
else
@@ -1834,7 +1842,11 @@
host = mmc_priv(mmc);
sdhci_runtime_pm_get(host);
+#ifdef CONFIG_PREEMPT_RT_FULL
+ disable_irq_nosync(host->irq);
+#else
disable_irq(host->irq);
+#endif
spin_lock(&host->lock);
ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
@@ -1935,7 +1947,11 @@
wait_event_interruptible_timeout(host->buf_ready_int,
(host->tuning_done == 1),
msecs_to_jiffies(50));
+#ifdef CONFIG_PREEMPT_RT_FULL
+ disable_irq_nosync(host->irq);
+#else
disable_irq(host->irq);
+#endif
spin_lock(&host->lock);
if (!host->tuning_done) {Code: Select all
pi@jj-rpi:~$ uname -a
Linux jj-rpi 3.6.11-rt31 #1 PREEMPT RT Wed Jul 3 16:56:33 CEST 2013 armv6l GNU/Linux
pi@jj-rpi:~$ cat /sys/module/sdhci_bcm2708/parameters/enable_llm
YCode: Select all
include/linux/spinlock_rt.h:106:2: error: implicit declaration of function ‘migrate_disable’ [-Werror=implicit-function-declaration]
In file included from include/linux/time.h:8:0,
from include/linux/timex.h:56,
from include/linux/sched.h:57,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/seqlock.h: In function ‘write_seqcount_begin’:
include/linux/seqlock.h:157:2: error: implicit declaration of function ‘preempt_disable_rt’ [-Werror=implicit-function-declaration]
include/linux/seqlock.h: In function ‘write_seqcount_end’:
include/linux/seqlock.h:170:2: error: implicit declaration of function ‘preempt_enable_rt’ [-Werror=implicit-function-declaration]
include/linux/seqlock.h: In function ‘read_seqbegin’:
include/linux/seqlock.h:234:3: error: implicit declaration of function ‘migrate_enable’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
/home/emil/src/RPi/linux-rpi-3.6.y/./Kbuild:81: recipe for target 'arch/arm/kernel/asm-offsets.s' failed
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
Makefile:815: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2Code: Select all
include/linux/sched.h:1671:2: error: implicit declaration of function 'in_atomic' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
HOSTLD scripts/mod/modpostthanks tom,tom.k.cook wrote:You could try reading the rest of the thread. The problem is that the SDHCI driver doesn't work in RT. The solution is to put the root partition on a USB stick or use AutoStatic's patch above: http://www.raspberrypi.org/phpBB3/viewt ... 80#p381480