Revert "UPSTREAM: pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip"
This reverts commit
a8b4e18cf1e98ed3b36175cb4e3ef422c03ac01c.
Which will cause such error:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620
in_atomic(): 1, irqs_disabled(): 128, pid: 141, name: irq/95-fusb302
1 lock held by irq/95-fusb302/141:
#0: (&(&chip->irq_lock)->rlock){......}, at: [<
ffffff800859e3a0>] fusb_irq_disable+0x20/0x68
irq event stamp: 52
hardirqs last enabled at (51): [<
ffffff80080bcc30>] queue_work_on+0x68/0x80
hardirqs last disabled at (52): [<
ffffff8008c6f41c>] _raw_spin_lock_irqsave+0x20/0x60
softirqs last enabled at (0): [<
ffffff800809e9ec>] copy_process.isra.54+0x390/0x1728
softirqs last disabled at (0): [< (null)>] (null)
Preemption disabled at:[<
ffffff800859e3a0>] fusb_irq_disable+0x20/0x68
CPU: 5 PID: 141 Comm: irq/95-fusb302 Not tainted 4.4.70 #30
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Call trace:
[<
ffffff800808a82c>] dump_backtrace+0x0/0x1c4
[<
ffffff800808aa04>] show_stack+0x14/0x1c
[<
ffffff80083c3b90>] dump_stack+0xa8/0xe0
[<
ffffff80080cf560>] ___might_sleep+0x214/0x224
[<
ffffff80080cf5e4>] __might_sleep+0x74/0x84
[<
ffffff8008c6c1ac>] mutex_lock_nested+0x48/0x3cc
[<
ffffff80083fe2b0>] rockchip_irq_bus_lock+0x28/0x34
[<
ffffff800810b680>] __irq_get_desc_lock+0x68/0x88
[<
ffffff800810d558>] __disable_irq_nosync+0x28/0x70
[<
ffffff800810d5ac>] disable_irq_nosync+0xc/0x14
[<
ffffff800859e3b4>] fusb_irq_disable+0x34/0x68
[<
ffffff800859e410>] cc_interrupt_handler+0x28/0x38
[<
ffffff800810cd48>] irq_thread_fn+0x28/0x68
[<
ffffff800810cf80>] irq_thread+0x130/0x234
[<
ffffff80080c58e8>] kthread+0x104/0x10c
[<
ffffff8008083080>] ret_from_fork+0x10/0x50
or
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
INFO: lockdep is turned off.
irq event stamp: 111558
hardirqs last enabled at (111557): [<
ffffff8008116cdc>] rcu_idle_exit+0x70/0x80
hardirqs last disabled at (111558): [<
ffffff80080f1078>] cpu_startup_entry+0xc0/0x42c
softirqs last enabled at (111554): [<
ffffff80080a6794>] _local_bh_enable+0x3c/0x44
softirqs last disabled at (111553): [<
ffffff80080a7000>] irq_enter+0x28/0x64
Preemption disabled at:[<
ffffff80080f1308>] cpu_startup_entry+0x350/0x42c
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.70 #30
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Call trace:
[<
ffffff800808a82c>] dump_backtrace+0x0/0x1c4
[<
ffffff800808aa04>] show_stack+0x14/0x1c
[<
ffffff80083c3b90>] dump_stack+0xa8/0xe0
[<
ffffff80080cf560>] ___might_sleep+0x214/0x224
[<
ffffff80080cf5e4>] __might_sleep+0x74/0x84
[<
ffffff8008c6c1ac>] mutex_lock_nested+0x48/0x3cc
[<
ffffff80083fe2b0>] rockchip_irq_bus_lock+0x28/0x34
[<
ffffff800810b680>] __irq_get_desc_lock+0x68/0x88
[<
ffffff800810d558>] __disable_irq_nosync+0x28/0x70
[<
ffffff800810d5ac>] disable_irq_nosync+0xc/0x14
[<
ffffff8008621f20>] bcmsdh_oob_intr_set+0x4c/0x6c
[<
ffffff8008621f5c>] wlan_oob_irq+0x1c/0x38
[<
ffffff800810bd28>] handle_irq_event_percpu+0x150/0x3e8
[<
ffffff800810c004>] handle_irq_event+0x44/0x74
[<
ffffff800810f53c>] handle_level_irq+0xe4/0x11c
[<
ffffff800810b228>] generic_handle_irq+0x1c/0x2c
[<
ffffff80083fe068>] rockchip_irq_demux+0xe0/0x188
[<
ffffff800810b228>] generic_handle_irq+0x1c/0x2c
[<
ffffff800810b5b0>] __handle_domain_irq+0xb0/0xec
[<
ffffff8008080f70>] gic_handle_irq+0xbc/0x154
Change-Id: I7cfbeaf7df17fc4e923e89917199b7f1c773455a
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>