From: "bumyong.lee" <bumyong.lee@samsung.com>
To: "'karthikeyan'" <karthikeyan@linumiz.com>, <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<parthiban@linumiz.com>, <saravanan@linumiz.com>
Subject: RE: dmaengine: CPU stalls while loading bluetooth module
Date: Tue, 5 Mar 2024 16:13:52 +0900 [thread overview]
Message-ID: <000001da6ecc$adb25420$0916fc60$@samsung.com> (raw)
In-Reply-To: <1553a526-6f28-4a68-88a8-f35bd22d9894@linumiz.com>
Hello.
> we have encountered CPU stalls in mainline kernel while loading the
> bluetooth module. We have custom board based on rockchip rv1109 soc and
> there is bluetooth chipset of relatek 8821cs. CPU is stalls while realtek
> 8821cs module.
>
> Bug/Regression:
> In current mainline, we found CPU is stalls when we load bluetooth module.
> git bisect shows commit 22a9d9585812440211b0b34a6bc02ade62314be4
> as a bad, which produce CPU stalls.
>
> git show 22a9d9585812440211b0b34a6bc02ade62314be4
> commit 22a9d9585812440211b0b34a6bc02ade62314be4
> Author: Bumyong Lee <bumyong.lee@samsung.com>
> Date: Tue Dec 19 14:50:26 2023 +0900
>
> dmaengine: pl330: issue_pending waits until WFP state
>
> According to DMA-330 errata notice[1] 71930, DMAKILL
> cannot clear internal signal, named pipeline_req_active.
> it makes that pl330 would wait forever in WFP state
> although dma already send dma request if pl330 gets
> dma request before entering WFP state.
>
> The errata suggests that polling until entering WFP state
> as workaround and then peripherals allows to issue dma request.
>
> [1]: https://developer.arm.com/documentation/genc008428/latest
>
> Signed-off-by: Bumyong Lee <bumyong.lee@samsung.com>
> Link:
> https://lore.kernel.org/r/20231219055026.118695-1-bumyong.lee@samsung.com
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
>
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index
> 3cf0b38387ae..c29744bfdf2c 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -1053,6 +1053,9 @@ static bool _trigger(struct pl330_thread *thrd)
>
> thrd->req_running = idx;
>
> + if (desc->rqtype == DMA_MEM_TO_DEV || desc->rqtype ==
> DMA_DEV_TO_MEM)
> + UNTIL(thrd, PL330_STATE_WFP);
> +
> return true;
> }
>
> By reverting this commit, we have success in loading of bluetooth module.
>
>
> Output of CPU stalls:
> # modprobe hci_uart
> [ 27.024749] Bluetooth: HCI UART driver ver 2.3
> [ 27.025284] Bluetooth: HCI UART protocol Three-wire (H5) registered
> # [ 28.125338] dwmmc_rockchip ffc70000.mmc: Unexpected interrupt latency
> [ 33.245339] dwmmc_rockchip ffc50000.mmc: Unexpected interrupt latency
> [ 326.195321] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
> [ 326.195880] rcu: 0-...0: (3 ticks this GP) idle=e5f4/1/0x40000000
> softirq=551/552 fqs=420
> [ 326.196621] rcu: hardirqs softirqs csw/system
> [ 326.197115] rcu: number: 0 0 0
> [ 326.197612] rcu: cputime: 0 0 0 ==>
> 10500(ms)
> [ 326.198231] rcu: (detected by 1, t=2105 jiffies, g=-455, q=17
> ncpus=2)
> [ 326.198823] Sending NMI from CPU 1 to CPUs 0:
>
> Expected Output:
> # modprobe hci_uart
> [ 30.690321] Bluetooth: HCI UART driver ver 2.3
> [ 30.690852] Bluetooth: HCI UART protocol Three-wire (H5) registered
> # [ 31.453586] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c
> lmp_ver=08 lmp_subver=8821
> [ 31.458061] Bluetooth: hci0: RTL: rom_version status=0 version=1
> [ 31.458608] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821cs_fw.bin
> [ 31.465029] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821cs_config.bin
> [ 31.483926] Bluetooth: hci0: RTL: cfg_sz 25, total sz 36953
> [ 32.213105] Bluetooth: hci0: RTL: fw version 0x75b8f098
> [ 32.274216] Bluetooth: MGMT ver 1.22
> [ 32.285376] NET: Registered PF_ALG protocol family
I discussed this issue. Could you refer to this[1]?
I haven't received anymore reply from him after that.
If you have any more opinion, please let me know.
[1]: https://lore.kernel.org/lkml/000001da3869$ca643fa0$5f2cbee0$@samsung.com/T/
Best Regards
next prev parent reply other threads:[~2024-03-05 7:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240305062038epcas2p143c5e1e725d8a934b0208266a2f78ccb@epcas2p1.samsung.com>
2024-03-05 6:20 ` dmaengine: CPU stalls while loading bluetooth module karthikeyan
2024-03-05 7:13 ` bumyong.lee [this message]
2024-03-08 8:51 ` Linux regression tracking (Thorsten Leemhuis)
2024-03-08 10:07 ` bumyong.lee
2024-03-19 9:07 ` Linux regression tracking (Thorsten Leemhuis)
2024-03-20 0:49 ` bumyong.lee
2024-03-20 6:28 ` Linux regression tracking (Thorsten Leemhuis)
2024-03-26 13:50 ` Linux regression tracking (Thorsten Leemhuis)
2024-03-28 6:51 ` Vinod Koul
2024-03-28 15:06 ` Linux regression tracking (Thorsten Leemhuis)
2024-04-25 10:03 ` Thorsten Leemhuis
2024-04-29 4:49 ` Vinod Koul
2024-04-29 4:58 ` Linux regression tracking (Thorsten Leemhuis)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001da6ecc$adb25420$0916fc60$@samsung.com' \
--to=bumyong.lee@samsung.com \
--cc=dmaengine@vger.kernel.org \
--cc=karthikeyan@linumiz.com \
--cc=linux-kernel@vger.kernel.org \
--cc=parthiban@linumiz.com \
--cc=saravanan@linumiz.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox