Where to submit patch for linux-imx?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where to submit patch for linux-imx?

Jump to solution
1,649 Views
mogenslauridsen
Contributor III

Hi,

I have found a bug in the sdma driver: imx-sdma.c

Git repo: https://source.codeaurora.org/external/imx/linux-imx.git

Branch/tag: lf-5.10.72-2.2.0

I can't figure where to submit the patch? Could you help me please?

Kind regards,

Mogens

 

0 Kudos
Reply
1 Solution
1,638 Views
josephzhou1
Contributor V

you can post it here let us trying it and discuss , if good , nxp will take into nxt version?

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore

View solution in original post

0 Kudos
Reply
2 Replies
1,639 Views
josephzhou1
Contributor V

you can post it here let us trying it and discuss , if good , nxp will take into nxt version?

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
Reply
1,633 Views
mogenslauridsen
Contributor III

Here is a description of the problem and the fix.


In the end of sdma_probe the driver is set "active" (autosuspend/resume), but it's actually not ready. sdma->bp0 and clk isn't initialized and will only be initialized by sdma_runtime_resume (and sdma_request_channel0, which is called from sdma_runtime_resume). Since autosuspend has a timeout of 8000ms (pm_runtime_set_autosuspend_delay), sdma will be in a broken state from sdma driver load time and the next 8000ms. If sdma is used in this 8000ms time window, the kernel will panic. See below.
After that time window sdma_runtime_resume will be called when sdma is needed.

[ 6.548779] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 6.557578] Mem abort info:
[ 6.560376] ESR = 0x96000044
[ 6.563444] EC = 0x25: DABT (current EL), IL = 32 bits
[ 6.568773] SET = 0, FnV = 0
[ 6.571845] EA = 0, S1PTW = 0
[ 6.574997] Data abort info:
[ 6.577892] ISV = 0, ISS = 0x00000044
[ 6.581728] CM = 0, WnR = 1
[ 6.584706] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000106246000
[ 6.591167] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[ 6.597982] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[ 6.603567] Modules linked in: g_ffs fsl_jr_uio caam_jr caamkeyblob_desc caamhash_desc caamalg_desc crypto_engine rng_core authenc libdes crct10dif_ce tmp117 tmp103 ina2xx caam secvio error fuse
[ 6.620914] CPU: 3 PID: 450 Comm: b_audio_stream Not tainted 5.10.72-lts-5.10.y #3
[ 6.628492] Hardware name: NXP i.MX8MPlus Blackbird board (DT)
[ 6.634342] pstate: 80000085 (Nzcv daIf -PAN -UAO -TCO BTYPE=--)
[ 6.640357] pc : sdma_transfer_init+0x140/0x350
[ 6.644887] lr : sdma_transfer_init+0xf4/0x350
[ 6.649326] sp : ffff8000128b3ab0
[ 6.652640] x29: ffff8000128b3ab0 x28: 0000000000020002
[ 6.657954] x27: ffff0000c185c6a8 x26: ffff800011d2d200
[ 6.663270] x25: 0000000000000000 x24: 0000000000000002
[ 6.668582] x23: 0000000000000080 x22: 000000000000037d
[ 6.673894] x21: ffff0000c1858080 x20: ffff0000c6a0a100
[ 6.679205] x19: ffff0000c18584a8 x18: 0000000000000000
[ 6.684520] x17: 0000000000000000 x16: 0000000000000000
[ 6.689830] x15: 0000000000000000 x14: 0000000000000000
[ 6.695140] x13: 0000000000000000 x12: 0000000000000000
[ 6.700452] x11: 0000000000000000 x10: 00000000ffffffff
[ 6.705765] x9 : 0000000000000000 x8 : ffff800011d2d280
[ 6.711075] x7 : 0000000000000000 x6 : 000000000000003f
[ 6.716387] x5 : 0000000000000040 x4 : 0000000000000000
[ 6.721699] x3 : 0000000000000004 x2 : 0000000000000040
[ 6.727023] x1 : 0000000000000000 x0 : 0000000001830020
[ 6.732343] Call trace:
[ 6.734793] sdma_transfer_init+0x140/0x350
[ 6.738975] sdma_prep_dma_cyclic+0x8c/0x340
[ 6.743248] snd_dmaengine_pcm_trigger+0xec/0x1c0
[ 6.747952] dmaengine_pcm_trigger+0x18/0x24
[ 6.752220] snd_soc_pcm_component_trigger+0x48/0xf0
[ 6.757184] soc_pcm_trigger+0xa8/0xd0
[ 6.760933] snd_pcm_do_start+0x38/0x44
[ 6.764767] snd_pcm_action_single+0x48/0xac
[ 6.769036] snd_pcm_action+0x7c/0x9c
[ 6.772698] snd_pcm_start+0x24/0x30
[ 6.776273] __snd_pcm_lib_xfer+0x694/0x7a0
[ 6.780456] snd_pcm_common_ioctl+0xf60/0x1220
[ 6.784898] snd_pcm_ioctl+0x34/0x50
[ 6.788474] __arm64_sys_ioctl+0xa8/0xf0
[ 6.792398] el0_svc_common.constprop.0+0x78/0x1c4
[ 6.797188] do_el0_svc+0x28/0x9c
[ 6.800503] el0_svc+0x14/0x20
[ 6.803556] el0_sync_handler+0xa4/0x130
[ 6.807479] el0_sync+0x180/0x1c0
[ 6.810797] Code: b9002740 52800400 531b6b02 72a03060 (b9000320)
[ 6.816895] ---[ end trace 738ced21fe29585e ]---
[ 6.821511] Kernel panic - not syncing: Oops: Fatal exception
[ 6.827255] SMP: stopping secondary CPUs
[ 6.831180] Kernel Offset: disabled
[ 6.834668] CPU features: 0x0240002,2000200c
[ 6.838935] Memory Limit: none
[ 6.841991] Rebooting in 1 seconds..

 

+--- a/drivers/dma/imx-sdma.c
++++ b/drivers/dma/imx-sdma.c
+@@ -2610,7 +2610,6 @@ static int sdma_probe(struct platform_device *pdev)
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 8000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_mark_last_busy(&pdev->dev);
+- pm_runtime_set_active(&pdev->dev);
+ }
+
+ pm_runtime_enable(&pdev->dev);

Kind regards,

Mogens

0 Kudos
Reply