Skip to content

Commit 9ee2b2d

Browse files
Liang Chenrkhuangtao
authored andcommitted
usb: typec: fusb302: remove invalid flag IRQF_ONESHOT for request_irq()
The flag IRQF_ONESHOT is only for irq thread, so remove IRQF_ONESHOT for request_irq(). And with IRQF_ONESHOT, when enable CONFIG_PREEMPT_RT, kernel will report bug: [ 789.709834][ C0] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:970 [ 789.709862][ C0] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0 [ 789.709879][ C0] INFO: lockdep is turned off. [ 789.709885][ C0] irq event stamp: 25194 [ 789.709892][ C0] hardirqs last enabled at (25193): [<ffffffc01139bd30>] exit_el1_irq_or_nmi+0x20/0x54 [ 789.709929][ C0] hardirqs last disabled at (25194): [<ffffffc0100a236c>] do_idle+0x94/0x10c [ 789.709954][ C0] softirqs last enabled at (2818): [<ffffffc010056c20>] __local_bh_enable_ip+0x1f4/0x258 [ 789.709982][ C0] softirqs last disabled at (2812): [<ffffffc01015f6ac>] local_bh_disable+0x4/0x30 [ 789.710009][ C0] Preemption disabled at: [ 789.710014][ C0] [<ffffffc0113a05e8>] schedule_preempt_disabled+0x20/0x2c [ 789.710042][ C0] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.10.66-rt53 #7 [ 789.710061][ C0] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT) [ 789.710070][ C0] Call trace: [ 789.710075][ C0] dump_backtrace+0x0/0x1c4 [ 789.710099][ C0] show_stack+0x18/0x24 [ 789.710119][ C0] dump_stack_lvl+0xec/0x148 [ 789.710135][ C0] dump_stack+0x18/0x64 [ 789.710150][ C0] ___might_sleep+0x1b4/0x1c4 [ 789.710172][ C0] rt_spin_lock+0x70/0xd8 [ 789.710188][ C0] fusb302_irq_intn+0x28/0x6c [ 789.710210][ C0] __handle_irq_event_percpu+0xa8/0x1b4 [ 789.710234][ C0] handle_irq_event+0x8c/0x180 [ 789.710255][ C0] handle_level_irq+0x148/0x1e4 [ 789.710272][ C0] generic_handle_irq+0x30/0x48 [ 789.710293][ C0] rockchip_irq_demux+0x154/0x224 [ 789.710316][ C0] __handle_domain_irq+0xb0/0x11c [ 789.710336][ C0] gic_handle_irq+0x74/0x14c [ 789.710354][ C0] el1_irq+0xd0/0x1c0 [ 789.710369][ C0] cpuidle_enter_state+0x184/0x2d0 [ 789.710386][ C0] cpuidle_enter+0x38/0x50 [ 789.710401][ C0] cpuidle_idle_call+0x188/0x278 [ 789.710419][ C0] do_idle+0xb8/0x10c [ 789.710436][ C0] cpu_startup_entry+0x24/0x28 [ 789.710453][ C0] rest_init+0x1ec/0x1fc [ 789.710471][ C0] arch_call_rest_init+0x10/0x1c [ 789.710492][ C0] start_kernel+0x3f0/0x524 Signed-off-by: Liang Chen <[email protected]> Change-Id: Ifb3bf4e6f20a705b4a13beaa3f0fee9be8709ac9
1 parent cdc6257 commit 9ee2b2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/tcpm/fusb302.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ static int fusb302_probe(struct i2c_client *client,
17471747
}
17481748

17491749
ret = request_irq(chip->gpio_int_n_irq, fusb302_irq_intn,
1750-
IRQF_ONESHOT | IRQF_TRIGGER_LOW,
1750+
IRQF_TRIGGER_LOW,
17511751
"fsc_interrupt_int_n", chip);
17521752
if (ret < 0) {
17531753
dev_err(dev, "cannot request IRQ for GPIO Int_N, ret=%d", ret);

0 commit comments

Comments
 (0)