From: Ruiqiang Hao <ruiqiang....@windriver.com>

The IRQF_NO_THREAD is added by a Marvell SDK12 patch commit 65549eba1b08
("mmc: octeontx2: fix swiotlb buffer is full") in order to get back some
of the performance loss. But in some cases (such as rt kernel), we need
the capability to thread irq handler. Otherwise we would get following
warnings because the normal spin lock is used in the irq handler. So drop
this constraint.

BUG: sleeping function called from invalid context at 
kernel/locking/spinlock_rt.c:46
in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0
preempt_count: 10001, expected: 0
RCU nest depth: 0, expected: 0
Preemption disabled at:
[<ffff800008d3b858>] schedule_preempt_disabled+0x28/0x34
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W          
6.1.90-rt18-yocto-preempt-rt #1
Hardware name: Marvell OcteonTX CN96XX board (DT)
Call trace:
 dump_backtrace.part.0+0xe8/0xf4
 show_stack+0x20/0x30
 dump_stack_lvl+0x64/0x80
 dump_stack+0x18/0x34
 __might_resched+0x160/0x1c0
 rt_spin_lock+0x38/0xd0
 cvm_mmc_interrupt+0x290/0x5b4
 __handle_irq_event_percpu+0x60/0x270
 handle_irq_event+0x70/0x120
 handle_fasteoi_irq+0xc4/0x234
 generic_handle_domain_irq+0x34/0x50
 gic_handle_irq+0x5c/0x160
 call_on_irq_stack+0x24/0x30
 do_interrupt_handler+0xdc/0xec
 el1_interrupt+0x34/0x70
 el1h_64_irq_handler+0x18/0x2c
 el1h_64_irq+0x64/0x68
 arch_cpu_idle+0x18/0x2c
 default_idle_call+0x40/0x1d0
 do_idle+0x230/0x2a0
 cpu_startup_entry+0x3c/0x4c
 kernel_init+0x0/0x13c
 arch_post_acpi_subsys_init+0x0/0x28
 start_kernel+0x70c/0x750
 __primary_switched+0xb4/0xbc

Signed-off-by: Ruiqiang Hao <ruiqiang....@windriver.com>
---
 drivers/mmc/host/cavium-thunderx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/cavium-thunderx.c 
b/drivers/mmc/host/cavium-thunderx.c
index 8b8b45a43b75..5795dc7c2bb3 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -61,7 +61,7 @@ static int thunder_mmc_register_interrupts(struct 
cvm_mmc_host *host,
        /* register interrupts */
        for (i = 0; i < nvec; i++) {
                ret = devm_request_irq(&pdev->dev, pci_irq_vector(pdev, i),
-                                      cvm_mmc_interrupt, IRQF_NO_THREAD,
+                                      cvm_mmc_interrupt, 0,
                                       cvm_mmc_irq_names[i], host);
                if (ret)
                        return ret;
-- 
2.35.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13923): 
https://lists.yoctoproject.org/g/linux-yocto/message/13923
Mute This Topic: https://lists.yoctoproject.org/mt/105994194/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to