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: 767, name: 
systemd-udevd
preempt_count: 10002, expected: 0
RCU nest depth: 0, expected: 0
Preemption disabled at:
[<ffff8000082319bc>] create_object.isra.0+0xfc/0x300
CPU: 0 PID: 767 Comm: systemd-udevd Tainted: G        W         
5.15.124-rt61-yocto-preempt-rt #2
Hardware name: Marvell OcteonTX CN96XX board (DT)
Call trace:
 dump_backtrace+0x0/0x1c0
 show_stack+0x20/0x30
 dump_stack_lvl+0x68/0x84
 dump_stack+0x18/0x34
 __might_resched+0x154/0x1b0
 rt_spin_lock+0x38/0xd0
 free_iova_fast+0x9c/0x27c
 __iommu_dma_unmap+0x164/0x174
 iommu_dma_unmap_sg+0xb0/0x140
 dma_unmap_sg_attrs+0x30/0x54
 cvm_mmc_interrupt+0x2a4/0x5f0
 __handle_irq_event_percpu+0x64/0x28c
 handle_irq_event_percpu+0x68/0xc0
 handle_irq_event+0x84/0xe0
 handle_fasteoi_irq+0xc4/0x234
 handle_domain_irq+0xa0/0xf0
 gic_handle_irq+0x60/0x154
 call_on_irq_stack+0x20/0x2c
 do_interrupt_handler+0x5c/0x68
 el1_interrupt+0x30/0x80
 el1h_64_irq_handler+0x18/0x24
 el1h_64_irq+0x78/0x7c
 _raw_spin_unlock_irqrestore+0x20/0x6c
 create_object.isra.0+0x19c/0x300
 kmemleak_alloc+0x38/0x4c
 kmem_cache_alloc+0x1e8/0x320
 anon_vma_clone+0x74/0x1e0
 anon_vma_fork+0x34/0x1e0
 dup_mm+0x38c/0x5ac
 copy_process+0x1594/0x16a0
 kernel_clone+0x94/0x490
 __do_sys_clone+0x70/0xac
 __arm64_sys_clone+0x28/0x3c
 invoke_syscall.constprop.0+0x58/0xf0
 do_el0_svc+0x144/0x160
 el0_svc+0x28/0xe0
 el0t_64_sync_handler+0xa4/0x130
 el0t_64_sync+0x1a0/0x1a4

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 (#12952): 
https://lists.yoctoproject.org/g/linux-yocto/message/12952
Mute This Topic: https://lists.yoctoproject.org/mt/100639428/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