aloksinha2001 / Linux3188

Linux Source - RK3188 - PicUntu
Other
99 stars 98 forks source link

ttyFIQ0 console #13

Closed micsuka closed 10 years ago

micsuka commented 10 years ago

I have a mk908 device (I'm not sure if it's original, but whatever) and I'm trying to use it as a linux server (I'm running Archlinux on it).

I'm trying to use the ttyFIQ0 device as the serial console device (console=ttyFIQ0 kernel parameter). (I've made the hardware hack of the rx/tx pins).

It works, it boots, but when the system (systemd) reaches a point in the boot process, it crashes. (I guess it uses it in a multi-threaded environment).

So, I have a kernel callstack here: [ 2.764919] ov2659 write reg(0x103, val:0x1) failed, try to write again! [ 24.665130] 1ee0: 0000fe00 00000000 00000000 00000000 00000000 00000000 00001000 00000000 [ 24.673314] 1f00: 00000000 00000001 ef0118c8 ef0118c0 00000001 ef0118c0 f007c430 00000000 [ 24.681501] 1f20: 00000000 00000000 ffffffff ef0118c0 c082d000 f007c430 efc02770 ef575000 [ 24.689687] 1f40: 00000000 00000008 ef0118c8 c090ae70 00000000 00000000 00000005 ef0118c0 [ 24.697871] 1f60: 00000000 c240f460 ef0118c0 c0833484 c26a0000 00000000 00000000 c0907438 [ 24.706059] 1f80: 00000003 c240f460 c240f4a0 c0907504 00000000 bea8bf5f bea89cfc 00000106 [ 24.714245] 1fa0: 00000006 c0833300 bea8bf5f bea89cfc 00000003 0000540e 00000001 00000000 [ 24.722428] 1fc0: bea8bf5f bea89cfc 00000106 00000006 00000000 00000002 400e04d0 00000000 [ 24.730610] 1fe0: 00000000 bea8969c 0000b04c 402a9bec 400b0010 00000003 adb5b5f2 c3cbefbf [ 24.738807] from [ 24.747352] from [ 24.755281] from [ 24.762949] from [ 24.770966] from [ 24.779410] Code: 0583057c e3a00000 e12fff1e e5903128 (e5932580) [ 24.785586] ---[ end trace 9e102f68ee9fa529 ]--- [ 24.790615] ------------[ cut here ]------------ [ 24.795294] WARNING: at drivers/tty/tty_mutex.c:28 tty_lock+0x54/0x68() [ 24.802058] from [ 24.811633] from [ 24.821428] from [ 24.830179] from [ 24.838616] from [ 24.847822] from [ 24.856587] from [ 24.864252] from [ 24.873246] from [ 24.883154] from [ 24.891988] from [ 24.900344] Exception stack(0xc26a1e78 to 0xc26a1ec0) [ 24.905423] 1e60: c2610800 ef0118c0 [ 24.913629] 1e80: ef573d80 00000000 c2610800 00000000 ef0118c0 c082d000 00000000 c2610800 [ 24.921849] 1ea0: f007c430 ef0118c8 00005401 c26a1ec0 c0a45280 c084073c a00b0013 ffffffff [ 24.930070] from [ 24.938380] from [ 24.946923] from [ 24.954869] from [ 24.962565] from [ 24.970603] from [ 24.979072] ---[ end trace 9e102f68ee9fa52a ]---

I'm almost sure that the fiq_debugger driver can't be used in a multi-core environment and this crash is a race condition problem. So actually this issue is a question for you guys: do you know anything more-in-depth about using the ttyFIQ0 device as a serial console?

Or should I use another serial device for serial console? I don't need the fiq debugging itself.

thanks

micsuka commented 10 years ago

sorry for pasting the trace in my previous post. Here is it: http://pastebin.com/zfiifKs3

micsuka commented 10 years ago

Sorry for the delay - I haven't had time :)

So, I removed the camera driver - I think it has no relation to this problem.

The full boot log is here: http://pastebin.com/EP13GUBr The kernel config is here: http://pastebin.com/EaC78HfB

What I saw: the fiq driver (arm/common/fiq_debugger.c) has spinlocks in the 3.4 kernel but it doesn't in the 3.0. (spin_lock_irq(&state->console_lock);..)

So, the 3.0 implementation is probably is not a multiprocessor-safe implementation.

ArsBinarii commented 10 years ago

Same problem. T428 running Picuntu boots on with no debug, crashes with console=/dev/ttyS2,115200. As far as I can see I initializes the boot disk and then just crashes Log:http://pastebin.com/sZPFHMdK