Tool/software: Linux
Dear Team
One of my csutomer is working on AM3359 SOM on their targer board. They had an issue with GSM module using AT command. They want to use the GSM multiplexing feauture to use internet, sms and AT command set at the same time. They enabled the feaute in Kernel, but had attached error. They tried some pacth but did not achive. They are working on mainline kernel instaed of using TI SDK. Could you please comment on this issue? How can they enable GSM mux?
[ 138.940095]
[ 138.941685] =============================================
[ 138.947320] [ INFO: possible recursive locking detected ]
[ 138.952956] 4.6.0 #66 Tainted: G W
[ 138.957678] ---------------------------------------------
[ 138.963307] interpreter/380 is trying to acquire lock:
[ 138.968662] (&port_lock_key){-.-...}, at: [<c04bb29c>] uart_write_room+0x10/0x3c
[ 138.976525]
[ 138.976525] but task is already holding lock:
[ 138.982611] (&port_lock_key){-.-...}, at: [<c04c7538>] serial_omap_irq+0x14/0x3c4
[ 138.990546]
[ 138.990546] other info that might help us debug this:
[ 138.997354] Possible unsafe locking scenario:
[ 138.997354]
[ 139.003526] CPU0
[ 139.006075] ----
[ 139.008623] lock(&port_lock_key);
[ 139.012267] lock(&port_lock_key);
[ 139.015919]
[ 139.015919] *** DEADLOCK ***
[ 139.015919]
[ 139.022092] May be due to missing lock nesting notation
[ 139.022092]
[ 139.029179] 2 locks held by interpreter/380:
[ 139.033627] #0: (&port_lock_key){-.-...}, at: [<c04c7538>] serial_omap_irq+0x14/0x3c4
[ 139.042010] #1: (&tty->ldisc_sem){++++++}, at: [<c04a855c>] tty_ldisc_ref+0x14/0x48
[ 139.050213]
[ 139.050213] stack backtrace:
[ 139.054765] CPU: 0 PID: 380 Comm: interpreter Tainted: G W 4.6.0 #66
[ 139.062565] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 139.068953] [<c010d4e0>] (unwind_backtrace) from [<c010b968>] (show_stack+0x10/0x14)
[ 139.077051] [<c010b968>] (show_stack) from [<c0167398>] (__lock_acquire+0x920/0x1ce8)
[ 139.085227] [<c0167398>] (__lock_acquire) from [<c016901c>] (lock_acquire+0xa8/0x12c)
[ 139.093406] [<c016901c>] (lock_acquire) from [<c081e0c4>] (_raw_spin_lock_irqsave+0x38/0x4c)
[ 139.102213] [<c081e0c4>] (_raw_spin_lock_irqsave) from [<c04bb29c>] (uart_write_room+0x10/0x3c)
[ 139.111329] [<c04bb29c>] (uart_write_room) from [<bf05b324>] (gsmld_output+0x18/0x98 [n_gsm])
[ 139.120251] [<bf05b324>] (gsmld_output [n_gsm]) from [<bf05a2a4>] (gsm_data_kick+0x88/0x168 [n_gsm])
[ 139.129802] [<bf05a2a4>] (gsm_data_kick [n_gsm]) from [<bf05b6e4>] (gsmld_write_wakeup+0x28/0x5c [n_gsm])
[ 139.139820] [<bf05b6e4>] (gsmld_write_wakeup [n_gsm]) from [<c049eb34>] (tty_wakeup+0x50/0x5c)
[ 139.148812] [<c049eb34>] (tty_wakeup) from [<c04c7840>] (serial_omap_irq+0x31c/0x3c4)
[ 139.157007] [<c04c7840>] (serial_omap_irq) from [<c017a470>] (handle_irq_event_percpu+0x54/0x204)
[ 139.166270] [<c017a470>] (handle_irq_event_percpu) from [<c017a658>] (handle_irq_event+0x38/0x5c)
[ 139.175534] [<c017a658>] (handle_irq_event) from [<c017cfc8>] (handle_level_irq+0xa0/0x130)
[ 139.184256] [<c017cfc8>] (handle_level_irq) from [<c0179c50>] (generic_handle_irq+0x20/0x34)
[ 139.193059] [<c0179c50>] (generic_handle_irq) from [<c0179ed8>] (__handle_domain_irq+0x48/0xa8)
[ 139.202138] [<c0179ed8>] (__handle_domain_irq) from [<c081e8f8>] (__irq_svc+0x58/0x78)
[ 139.210407] [<c081e8f8>] (__irq_svc) from [<c081e234>] (_raw_spin_unlock_irq+0x28/0x2c)
[ 139.218771] [<c081e234>] (_raw_spin_unlock_irq) from [<c014ef70>] (finish_task_switch+0xb8/0x23c)
[ 139.228030] [<c014ef70>] (finish_task_switch) from [<c081a270>] (schedule+0x48/0xa0)
[ 139.236110] [<c081a270>] (schedule) from [<c081db84>] (do_nanosleep+0x84/0x140)
[ 139.243748] [<c081db84>] (do_nanosleep) from [<c0186ca8>] (hrtimer_nanosleep+0xa0/0x12c)
[ 139.252200] [<c0186ca8>] (hrtimer_nanosleep) from [<c0186dc8>] (SyS_nanosleep+0x94/0xcc)
[ 139.260649] [<c0186dc8>] (SyS_nanosleep) from [<c0107540>] (ret_fast_syscall+0x0/0x1c)
[ 145.245792] BUG: spinlock lockup suspected on CPU#0, interpreter/380
[ 145.252426] lock: 0xce353418, .magic: dead4ead, .owner: interpreter/380, .owner_cpu: 0
[ 145.260783] CPU: 0 PID: 380 Comm: interpreter Tainted: G W 4.6.0 #66
[ 145.268590] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 145.274962] [<c010d4e0>] (unwind_backtrace) from [<c010b968>] (show_stack+0x10/0x14)
[ 145.283057] [<c010b968>] (show_stack) from [<c016bd38>] (do_raw_spin_lock+0x144/0x16c)
[ 145.291328] [<c016bd38>] (do_raw_spin_lock) from [<c081e0cc>] (_raw_spin_lock_irqsave+0x40/0x4c)
[ 145.300500] [<c081e0cc>] (_raw_spin_lock_irqsave) from [<c04bb29c>] (uart_write_room+0x10/0x3c)
[ 145.309594] [<c04bb29c>] (uart_write_room) from [<bf05b324>] (gsmld_output+0x18/0x98 [n_gsm])
[ 145.318518] [<bf05b324>] (gsmld_output [n_gsm]) from [<bf05a2a4>] (gsm_data_kick+0x88/0x168 [n_gsm])
[ 145.328073] [<bf05a2a4>] (gsm_data_kick [n_gsm]) from [<bf05b6e4>] (gsmld_write_wakeup+0x28/0x5c [n_gsm])
[ 145.338070] [<bf05b6e4>] (gsmld_write_wakeup [n_gsm]) from [<c049eb34>] (tty_wakeup+0x50/0x5c)
[ 145.347065] [<c049eb34>] (tty_wakeup) from [<c04c7840>] (serial_omap_irq+0x31c/0x3c4)
[ 145.355242] [<c04c7840>] (serial_omap_irq) from [<c017a470>] (handle_irq_event_percpu+0x54/0x204)
[ 145.364499] [<c017a470>] (handle_irq_event_percpu) from [<c017a658>] (handle_irq_event+0x38/0x5c)
[ 145.373762] [<c017a658>] (handle_irq_event) from [<c017cfc8>] (handle_level_irq+0xa0/0x130)
[ 145.382482] [<c017cfc8>] (handle_level_irq) from [<c0179c50>] (generic_handle_irq+0x20/0x34)
[ 145.391290] [<c0179c50>] (generic_handle_irq) from [<c0179ed8>] (__handle_domain_irq+0x48/0xa8)
[ 145.400381] [<c0179ed8>] (__handle_domain_irq) from [<c081e8f8>] (__irq_svc+0x58/0x78)
[ 145.408648] [<c081e8f8>] (__irq_svc) from [<c081e234>] (_raw_spin_unlock_irq+0x28/0x2c)
[ 145.417003] [<c081e234>] (_raw_spin_unlock_irq) from [<c014ef70>] (finish_task_switch+0xb8/0x23c)
[ 145.426265] [<c014ef70>] (finish_task_switch) from [<c081a270>] (schedule+0x48/0xa0)
[ 145.434343] [<c081a270>] (schedule) from [<c081db84>] (do_nanosleep+0x84/0x140)
[ 145.441973] [<c081db84>] (do_nanosleep) from [<c0186ca8>] (hrtimer_nanosleep+0xa0/0x12c)
[ 145.450417] [<c0186ca8>] (hrtimer_nanosleep) from [<c0186dc8>] (SyS_nanosleep+0x94/0xcc)
[ 145.458865] [<c0186dc8>] (SyS_nanosleep) from [<c0107540>] (ret_fast_syscall+0x0/0x1c)
[ 152.423669] BUG: spinlock lockup suspected on CPU#0, swapper/0
[ 152.429789] lock: 0xce353418, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0
[ 152.437602] CPU: 0 PID: 0 Comm: swapper Tainted: G W 4.6.0 #66
[ 152.444864] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 152.451258] [<c010d4e0>] (unwind_backtrace) from [<c010b968>] (show_stack+0x10/0x14)
[ 152.459356] [<c010b968>] (show_stack) from [<c016bd38>] (do_raw_spin_lock+0x144/0x16c)
[ 152.467626] [<c016bd38>] (do_raw_spin_lock) from [<c081e0cc>] (_raw_spin_lock_irqsave+0x40/0x4c)
[ 152.476812] [<c081e0cc>] (_raw_spin_lock_irqsave) from [<c04bb29c>] (uart_write_room+0x10/0x3c)
[ 152.485925] [<c04bb29c>] (uart_write_room) from [<bf05b324>] (gsmld_output+0x18/0x98 [n_gsm])
[ 152.494842] [<bf05b324>] (gsmld_output [n_gsm]) from [<bf05a2a4>] (gsm_data_kick+0x88/0x168 [n_gsm])
[ 152.504391] [<bf05a2a4>] (gsm_data_kick [n_gsm]) from [<bf05b6e4>] (gsmld_write_wakeup+0x28/0x5c [n_gsm])
[ 152.514402] [<bf05b6e4>] (gsmld_write_wakeup [n_gsm]) from [<c049eb34>] (tty_wakeup+0x50/0x5c)
[ 152.523409] [<c049eb34>] (tty_wakeup) from [<c04c7840>] (serial_omap_irq+0x31c/0x3c4)
[ 152.531596] [<c04c7840>] (serial_omap_irq) from [<c017a470>] (handle_irq_event_percpu+0x54/0x204)
[ 152.540857] [<c017a470>] (handle_irq_event_percpu) from [<c017a658>] (handle_irq_event+0x38/0x5c)
[ 152.550119] [<c017a658>] (handle_irq_event) from [<c017cfc8>] (handle_level_irq+0xa0/0x130)
[ 152.558836] [<c017cfc8>] (handle_level_irq) from [<c0179c50>] (generic_handle_irq+0x20/0x34)
[ 152.567642] [<c0179c50>] (generic_handle_irq) from [<c0179ed8>] (__handle_domain_irq+0x48/0xa8)
[ 152.576722] [<c0179ed8>] (__handle_domain_irq) from [<c081e8f8>] (__irq_svc+0x58/0x78)
[ 152.584989] [<c081e8f8>] (__irq_svc) from [<c0107e4c>] (arch_cpu_idle+0x20/0x3c)
[ 152.592710] [<c0107e4c>] (arch_cpu_idle) from [<c015d04c>] (cpu_startup_entry+0x1b0/0x220)
[ 152.601341] [<c015d04c>] (cpu_startup_entry) from [<c0c00c14>] (start_kernel+0x334/0x3ac)
Best Regards
Yunus