On Monday, June 29, 2015 at 12:39:37 AM UTC+5:30, carosso...@gmail.com wrote:
> Hello all,
> I'm trying to have a minimally functional mainline RT_PREEMPT_FULL on a 
> olinuxino-A10-lime. Unfortunately there is an issue with the mmc driver. (The 
> crash dump is at bottom). The driver seems to work in the RT_PREEMPT_BASE 
> mode. I've very little knowledge of kernel internals, but after some search 
> and tests I've understood that the problem arises because the 
> mmc_request_done call (which eventually ends up with a re-schedule) is made 
> from interrupt context, instead of from a threaded context. In the 
> linux-sunxi kernel, in fact, a tasklet is used. In the mainline, on top of 
> the sunxi_mmc_finalize_request there's a comment:
> * Called in interrupt context! */
> that makes me think of some issues related to interrupt/non interrupt context.
> What is the relation between mainline driver and linux-sunxi one? Who is the 
> person who wrote the mainline driver? Even without the RT_PREEMPT_FULL, 
> shouln't be the bottom-half run on a threaded context, to avoid latencies?
> Any idea on how to solve the problem, even in un unclean manner?
> Thank you!
> 
> 
> 
> 
> 
> Kernel with default sunxi configuration and RT Patch patch-4.0.5-rt4.patch
> 
> 4.191698] BUG: scheduling while atomic: mountkernfs.sh/94/0x00010001
> [    4.191710] CPU: 0 PID: 94 Comm: mountkernfs.sh Not tainted 4.0.5-rt4 #2
> [    4.191713] Hardware name: Allwinner A1X (Device Tree)
> [    4.191751] [<c0013630>] (unwind_backtrace) from [<c00110a4>] 
> (show_stack+0x10/0x14)
> [    4.191765] [<c00110a4>] (show_stack) from [<c039ecd4>] 
> (dump_stack+0x80/0xd8)
> [    4.191775] [<c039ecd4>] (dump_stack) from [<c039c778>] 
> (__schedule_bug+0x44/0x5c)
> [    4.191785] [<c039c778>] (__schedule_bug) from [<c039f9e8>] 
> (__schedule+0x388/0x424)
> [    4.191793] [<c039f9e8>] (__schedule) from [<c039fb1c>] 
> (schedule+0x40/0xdc)
> [    4.191803] [<c039fb1c>] (schedule) from [<c03a0f30>] 
> (rt_spin_lock_slowlock+0x178/0x2cc)
> [    4.191814] [<c03a0f30>] (rt_spin_lock_slowlock) from [<c004e620>] 
> (__wake_up+0x24/0x50)
> [    4.191829] [<c004e620>] (__wake_up) from [<c02bb62c>] 
> (mmc_request_done+0x44/0x88)
> [    4.191846] [<c02bb62c>] (mmc_request_done) from [<c02cd45c>] 
> (sunxi_mmc_irq+0x4e4/0x520)
> [    4.191863] [<c02cd45c>] (sunxi_mmc_irq) from [<c0055d8c>] 
> (handle_irq_event_percpu+0x60/0x14c)
> [    4.191875] [<c0055d8c>] (handle_irq_event_percpu) from [<c0055ef0>] 
> (handle_irq_event+0x78/0xac)
> [    4.191885] [<c0055ef0>] (handle_irq_event) from [<c0058dec>] 
> (handle_fasteoi_irq+0xa8/0x224)
> [    4.191895] [<c0058dec>] (handle_fasteoi_irq) from [<c00556d4>] 
> (generic_handle_irq+0x20/0x30)
> [    4.191906] [<c00556d4>] (generic_handle_irq) from [<c0055738>] 
> (__handle_domain_irq+0x54/0xb4)
> [    4.191915] [<c0055738>] (__handle_domain_irq) from [<c0008620>] 
> (sun4i_handle_irq+0x44/0x60)
> [    4.191925] [<c0008620>] (sun4i_handle_irq) from [<c0011c00>] 
> (__irq_svc+0x40/0x88)
> [    4.191930] Exception stack(0xde81bda8 to 0xde81bdf0)
> [    4.191938] bda0:                   df8c8b40 df89cb50 00000009 ffffffff 
> 00000000 df8c8000
> [    4.191946] bdc0: b6fd1000 dffeb900 de828744 c04d02c4 0005f89c c0522180 
> b6fcfef8 de81bdf0
> [    4.191951] bde0: 00000000 c01dbbfc 20000113 ffffffff
> [    4.191965] [<c0011c00>] (__irq_svc) from [<c01dbbfc>] 
> (copy_page+0x3c/0x80)
> [    4.192809] ------------[ cut here ]------------
> [    4.192831] WARNING: CPU: 0 PID: 94 at kernel/irq/handle.c:149 
> handle_irq_event_percpu+0x128/0x14c()
> [    4.192841] irq 19 handler sunxi_mmc_irq+0x0/0x520 enabled interrupts
> [    4.192851] CPU: 0 PID: 94 Comm: mountkernfs.sh Tainted: G        W       
> 4.0.5-rt4 #2
> [    4.192853] Hardware name: Allwinner A1X (Device Tree)
> [    4.192869] [<c0013630>] (unwind_backtrace) from [<c00110a4>] 
> (show_stack+0x10/0x14)
> [    4.192879] [<c00110a4>] (show_stack) from [<c039ecd4>] 
> (dump_stack+0x80/0xd8)
> [    4.192894] [<c039ecd4>] (dump_stack) from [<c00201e4>] 
> (warn_slowpath_common+0x70/0xac)
> [    4.192904] [<c00201e4>] (warn_slowpath_common) from [<c002027c>] 
> (warn_slowpath_fmt+0x30/0x40)
> [    4.192915] [<c002027c>] (warn_slowpath_fmt) from [<c0055e54>] 
> (handle_irq_event_percpu+0x128/0x14c)
> [    4.192926] [<c0055e54>] (handle_irq_event_percpu) from [<c0055ef0>] 
> (handle_irq_event+0x78/0xac)
> [    4.192937] [<c0055ef0>] (handle_irq_event) from [<c0058dec>] 
> (handle_fasteoi_irq+0xa8/0x224)
> [    4.192946] [<c0058dec>] (handle_fasteoi_irq) from [<c00556d4>] 
> (generic_handle_irq+0x20/0x30)
> [    4.192957] [<c00556d4>] (generic_handle_irq) from [<c0055738>] 
> (__handle_domain_irq+0x54/0xb4)
> [    4.192966] [<c0055738>] (__handle_domain_irq) from [<c0008620>] 
> (sun4i_handle_irq+0x44/0x60)
> [    4.192976] [<c0008620>] (sun4i_handle_irq) from [<c0011c00>] 
> (__irq_svc+0x40/0x88)
> [    4.192980] Exception stack(0xde81bda8 to 0xde81bdf0)
> [    4.192987] bda0:                   df8c8b40 df89cb50 00000009 ffffffff 
> 00000000 df8c8000
> [    4.192995] bdc0: b6fd1000 dffeb900 de828744 c04d02c4 0005f89c c0522180 
> b6fcfef8 de81bdf0
> [    4.193000] bde0: 00000000 c01dbbfc 20000113 ffffffff
> [    4.193011] [<c0011c00>] (__irq_svc) from [<c01dbbfc>] 
> (copy_page+0x3c/0x80)
> [    4.193015] ---[ end trace 0000000000000002 ]---
> [    4.224639] ------------[ cut here ]------------

I was trying the mainline kernel 3.18.22 with rt patch 3.18.24-rt22 on 
A13-Olinuxino-Micro, and facing the same issue of crash during kernel startup.
I looked for the solution of the crash but didn't find it. Have you resolved it.
[    1.129390] vcc3v0: disabling
[    1.134980] EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4 
subsystem
[    1.161224] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. 
Opts: (null)
[    1.169370] VFS: Mounted root (ext3 filesystem) readonly on device 179:2.
[    1.179459] devtmpfs: mounted
[    1.182789] Freeing unused kernel memory: 212K (c0489000 - c04be000)
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
Starting the hotplug events dispatcher: udevd[    2.032860] udevd[119]: 
starting version 175
[    2.061654] ------------[ cut here ]------------
[    2.061668] kernel BUG at kernel/locking/rtmutex.c:998!
[    2.061674] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[    2.061687] CPU: 0 PID: 120 Comm: tput Not tainted 3.18.24-rt22 #3
[    2.061694] task: cf01cb00 ti: cf000000 task.ti: cf000000
[    2.061718] PC is at rt_spin_lock_slowlock+0xb4/0x2d8
[    2.061724] LR is at rt_spin_lock_slowlock+0x54/0x2d8
[    2.061730] pc : [<c039fd78>]    lr : [<c039fd18>]    psr: 60000193
[    2.061730] sp : cf001a18  ip : cf01cb01  fp : 80000014
[    2.061733] r10: cf01cb00  r9 : cf001a18  r8 : 00000000
[    2.061737] r7 : 00000000  r6 : 00000000  r5 : cf000000  r4 : cfb2eaf8
[    2.061740] r3 : cf01cb00  r2 : 00000000  r1 : cf01cb00  r0 : 00000000
[    2.061746] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
user
[    2.061751] Control: 10c5387d  Table: 4f030019  DAC: 00000015
[    2.061754] Process tput (pid: 120, stack limit = 0xcf000240)
[    2.061758] Stack: (0xcf001a18 to 0xcf002000)
[    2.061764] 1a00:                                                       
cf001a18 00000000
[    2.061771] 1a20: cffd4be0 cf001a24 c051a2c0 00001000 00000000 00000002 
80000001 c0018908
[    2.061778] 1a40: c001c1cc cfb2eaf8 00000001 00000001 00000000 00000000 
80000016 cfb7010c
[    2.061785] 1a60: 80000014 c004d680 cfb70048 c02d1098 cfb70048 cfb70048 
c04c88c4 cfb2eb54
[    2.061792] 1a80: cfb70048 c02bd9f4 cfb2eb40 c02cf800 00000000 0f928000 
00000000 cf844bb0
[    2.061799] 1aa0: cfde5680 c004a8b8 c03a43c4 c03a43c4 cf001acc c003be08 
00000001 c03a13d8
[    2.061806] 1ac0: 00000000 cfb27c80 00000000 00000013 c04f0741 cf82d480 
cf001bdc c00562c4
[    2.061813] 1ae0: cfde5680 60000193 cf001b24 cf82d480 cfb27c80 00000000 
00000001 cf803200
[    2.061820] 1b00: 00000001 c04bd680 cf001bdc c0056428 00020000 cf82d480 
c04d6ac0 c00592e4
[    2.061827] 1b20: c005923c 00000013 c04bd050 c0055c30 00000000 c0055c94 
c051f100 cf001b60
[    2.061834] 1b40: ffffffff cf001b94 80000013 c00085dc c003fc50 c03a13d8 
20000013 c0011ac0
[    2.061840] 1b60: cfb4a57c 80000013 00000001 000001c8 cfb4a100 cfb4a57c 
00000001 cfde5680
[    2.061847] 1b80: 80000013 00000001 c04bd680 cf001bdc 00000000 cf001ba8 
c003fc50 c03a13d8
[    2.061854] 1ba0: 20000013 ffffffff cfb614e0 00000000 cfbcbd80 00000001 
cf897e80 cfb73e4c
[    2.061861] 1bc0: 00000000 cfb2eb10 00000000 00000000 00000001 00000001 
c004d44c c004d458
[    2.061867] 1be0: cfb2eb04 c004d418 00000000 cfb2eaf8 00000001 00000001 
00000000 cfb614e0
[    2.061874] 1c00: 00000000 cfb74000 00000001 c004d698 00000000 24410060 
00000001 00000000
[    2.061881] 1c20: cfb2e800 cfb2eb18 00000000 c02ce2c4 cfb74000 00000000 
00000000 c01bfb3c
[    2.061887] 1c40: 24400060 c01be3ac 00000001 00000001 cf01cb00 cfb74000 
cfb614e0 00000003
[    2.061894] 1c60: 00000008 00000060 f0000001 c01c2884 00000fff cfbcbd80 
cfb614e0 00000000
[    2.061901] 1c80: cfbcbd80 cf000000 00000000 c01c09a4 00000000 00000000 
00302200 00000000
[    2.061908] 1ca0: cfbcbd80 c01c0a44 00060440 ffffffe0 cf4b3e58 cf8b3280 
00000001 00000010
[    2.061915] 1cc0: 00000060 c01bb630 cfbcbd80 c01bb75c 00000008 0000000f 
00302200 00000000
[    2.061923] 1ce0: cfbcbd80 cf4b3e58 00000060 00000000 f0000001 c00f2c40 
cf4b3e58 00000001
[    2.061929] 1d00: cf001d64 00000060 00000001 c00f19c8 c00f1768 c00f2d24 
00000001 00000000
[    2.061936] 1d20: 00000001 cf001d78 cf4dc9e0 00000001 00000001 c0134530 
00000001 c04efbc0
[    2.061943] 1d40: cf480098 c04f0640 00000001 00000000 cfb70c00 cf4b55b8 
cf001dd4 00000000
[    2.061950] 1d60: c04c8a08 cf4b3e58 00000002 00000141 c04efbc0 00000000 
cf4b3e58 cf47d770
[    2.061956] 1d80: cf041011 00000003 00000000 c00dcea8 cf4b5500 c04c8c88 
cf001ef0 cf4b55a0
[    2.061963] 1da0: cf4b5500 cf4dc9e0 00000001 ffffff9c cf000000 cf000000 
cf001ee8 c01349b4
[    2.061971] 1dc0: cf001ee8 c00dc8b4 00000000 cf001ef0 cf4b5500 00000000 
cf4b55a0 cf4b5500
[    2.061977] 1de0: cf4b5500 c00cfd38 00000011 c00d00f0 00000001 010d1024 
cf001e40 cf001ee8
[    2.061984] 1e00: cf001e40 c00d110c cfda4000 cf041020 00000000 cf001e40 
00000001 c00d1744
[    2.061991] 1e20: 00000000 cf000000 00000000 00000001 00000000 c00d22a8 
0000013e cf4dc9e0
[    2.061998] 1e40: cf9d99d0 cf4b5500 cf032fa8 cf4dc9e0 cf9d99d0 cf000000 
cf001fb0 00000041
[    2.062005] 1e60: cf041010 cf000000 00000000 ffffff9c cf000000 cf001ee8 
00000000 c00d2238
[    2.062011] 1e80: cf001e90 cf001ea0 cf001f28 ffffff9c 00000000 000000a9 
00000800 00000000
[    2.062018] 1ea0: cf001f50 beb40ba8 00000001 00000001 cf041000 cf001ee8 
ffffff9c ffffff9c
[    2.062025] 1ec0: cf000000 00000000 00000000 c00d2954 cf041000 00000001 
ffffff9c cf001f78
[    2.062032] 1ee0: ffffff9c c00d2e0c cf9d99d0 cf4b5500 0000006c 00000001 
cf04101e cf001fb0
[    2.062039] 1f00: cf9d99d0 cf471960 cf4dc9e0 00000011 00000002 00000044 
00000000 00000000
[    2.062046] 1f20: 00017a35 00000000 cf9d99d0 beb40ba8 beb40c54 00013008 
000000c3 c000e664
[    2.062052] 1f40: b6f3af10 cf01cb00 00000001 cfbcb200 ffffff9c beb40c54 
00000014 c00d2e4c
[    2.062059] 1f60: 00000000 b6f3af10 beb40c54 c00c6cc4 00000004 cfbcb800 
55f501d9 0ba07d36
[    2.062066] 1f80: 55f501d9 b6f3af10 beb40c54 00000004 00000021 c000e664 
cf000000 00000000
[    2.062073] 1fa0: 00000000 c000e4e0 b6f3af10 beb40c54 beb40c54 00000004 
beb3fbe4 4d406f00
[    2.062080] 1fc0: b6f3af10 beb40c54 00000004 00000021 b6f11ce0 00000001 
b6f3b000 00000000
[    2.062087] 1fe0: 00000000 beb3ebe0 b6f02493 b6ea076c 80000010 beb40c54 
00000000 00000000
[    2.062111] [<c039fd78>] (rt_spin_lock_slowlock) from [<c004d680>] 
(__wake_up+0x24/0x50)
[    2.062127] [<c004d680>] (__wake_up) from [<c02bd9f4>] 
(mmc_request_done+0x44/0x88)
[    2.062143] [<c02bd9f4>] (mmc_request_done) from [<c02cf800>] 
(sunxi_mmc_irq+0x4e4/0x52c)
[    2.062163] [<c02cf800>] (sunxi_mmc_irq) from [<c00562c4>] 
(handle_irq_event_percpu+0x60/0x14c)
[    2.062174] [<c00562c4>] (handle_irq_event_percpu) from [<c0056428>] 
(handle_irq_event+0x78/0xac)
[    2.062186] [<c0056428>] (handle_irq_event) from [<c00592e4>] 
(handle_fasteoi_irq+0xa8/0x224)
[    2.062196] [<c00592e4>] (handle_fasteoi_irq) from [<c0055c30>] 
(generic_handle_irq+0x20/0x30)
[    2.062207] [<c0055c30>] (generic_handle_irq) from [<c0055c94>] 
(__handle_domain_irq+0x54/0xa4)
[    2.062217] [<c0055c94>] (__handle_domain_irq) from [<c00085dc>] 
(sun4i_handle_irq+0x44/0x60)
[    2.062234] [<c00085dc>] (sun4i_handle_irq) from [<c0011ac0>] 
(__irq_svc+0x40/0x88)
[    2.062237] Exception stack(0xcf001b60 to 0xcf001ba8)
[    2.062244] 1b60: cfb4a57c 80000013 00000001 000001c8 cfb4a100 cfb4a57c 
00000001 cfde5680
[    2.062251] 1b80: 80000013 00000001 c04bd680 cf001bdc 00000000 cf001ba8 
c003fc50 c03a13d8
[    2.062255] 1ba0: 20000013 ffffffff
[    2.062268] [<c0011ac0>] (__irq_svc) from [<c03a13d8>] 
(_raw_spin_unlock_irqrestore+0x1c/0x5c)
[    2.062280] [<c03a13d8>] (_raw_spin_unlock_irqrestore) from [<c003fc50>] 
(try_to_wake_up+0x64/0x330)
[    2.062289] [<c003fc50>] (try_to_wake_up) from [<c004d458>] 
(autoremove_wake_function+0xc/0x34)
[    2.062296] [<c004d458>] (autoremove_wake_function) from [<c004d418>] 
(__wake_up_common+0x4c/0x80)
[    2.062303] [<c004d418>] (__wake_up_common) from [<c004d698>] 
(__wake_up+0x3c/0x50)
[    2.062310] [<c004d698>] (__wake_up) from [<c02ce2c4>] 
(mmc_request_fn+0x70/0xc4)
[    2.062322] [<c02ce2c4>] (mmc_request_fn) from [<c01bfb3c>] 
(__blk_run_queue+0x34/0x44)
[    2.062331] [<c01bfb3c>] (__blk_run_queue) from [<c01be3ac>] 
(__elv_add_request+0x1a8/0x2d8)
[    2.062341] [<c01be3ac>] (__elv_add_request) from [<c01c2884>] 
(blk_queue_bio+0x218/0x23c)
[    2.062350] [<c01c2884>] (blk_queue_bio) from [<c01c09a4>] 
(generic_make_request+0xa8/0xc8)
[    2.062357] [<c01c09a4>] (generic_make_request) from [<c01c0a44>] 
(submit_bio+0x80/0x12c)
[    2.062374] [<c01c0a44>] (submit_bio) from [<c00f2c40>] 
(_submit_bh+0x13c/0x184)
[    2.062385] [<c00f2c40>] (_submit_bh) from [<c00f2d24>] 
(ll_rw_block+0x94/0xec)
[    2.062403] [<c00f2d24>] (ll_rw_block) from [<c0134530>] 
(ext4_find_entry+0x18c/0x5d4)
[    2.062413] [<c0134530>] (ext4_find_entry) from [<c01349b4>] 
(ext4_lookup+0x3c/0x164)
[    2.062427] [<c01349b4>] (ext4_lookup) from [<c00cfd38>] 
(lookup_real+0x20/0x50)
[    2.062437] [<c00cfd38>] (lookup_real) from [<c00d00f0>] 
(__lookup_hash+0x34/0x44)
[    2.062446] [<c00d00f0>] (__lookup_hash) from [<c00d110c>] 
(lookup_slow+0x38/0x98)
[    2.062455] [<c00d110c>] (lookup_slow) from [<c00d1744>] 
(link_path_walk+0x31c/0x840)
[    2.062464] [<c00d1744>] (link_path_walk) from [<c00d2238>] 
(path_lookupat+0x54/0x750)
[    2.062473] [<c00d2238>] (path_lookupat) from [<c00d2954>] 
(filename_lookup+0x20/0x60)
[    2.062482] [<c00d2954>] (filename_lookup) from [<c00d2e0c>] 
(user_path_at_empty+0x50/0x7c)
[    2.062490] [<c00d2e0c>] (user_path_at_empty) from [<c00d2e4c>] 
(user_path_at+0x14/0x1c)
[    2.062504] [<c00d2e4c>] (user_path_at) from [<c00c6cc4>] 
(SyS_faccessat+0x8c/0x1c4)
[    2.062514] [<c00c6cc4>] (SyS_faccessat) from [<c000e4e0>] 
(ret_fast_syscall+0x0/0x38)
[    2.062523] Code: e594300c e3c33001 e15a0003 1a000000 (e7f001f2) 
[    2.858483] ---[ end trace 0000000000000002 ]---
[    2.858488] Kernel panic - not syncing: Fatal exception in interrupt

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to