Linu Cherian
bd2767ec3d
coresight: Fix run time warnings while reusing ETR buffer
...
Fix the below warning by avoding calls to tmc_etr_enable_hw,
if we are reusing the ETR buffer for multiple sources in sysfs mode.
echo 1 > /sys/bus/coresight/devices/tmc_etr0/enable_sink
echo 1 > /sys/bus/coresight/devices/ete1/enable_source
echo 1 > /sys/bus/coresight/devices/ete2/enable_source
[ 166.918290] ------------[ cut here ]------------
[ 166.922905] WARNING: CPU: 4 PID: 2288 at
drivers/hwtracing/coresight/coresight-tmc-etr.c:1037
tmc_etr_enable_hw+0xb0/0xc8
[ 166.933862] Modules linked in:
[ 166.936911] CPU: 4 PID: 2288 Comm: bash Not tainted 6.5.0-rc7 #132
[ 166.943084] Hardware name: Marvell CN106XX board (DT)
[ 166.948127] pstate: 834000c9 (Nzcv daIF +PAN -UAO +TCO +DIT -SSBS
BTYPE=--)
[ 166.955083] pc : tmc_etr_enable_hw+0xb0/0xc8
[ 166.959345] lr : tmc_enable_etr_sink+0x134/0x210
snip..
167.038545] Call trace:
[ 167.040982] tmc_etr_enable_hw+0xb0/0xc8
[ 167.044897] tmc_enable_etr_sink+0x134/0x210
[ 167.049160] coresight_enable_path+0x160/0x278
[ 167.053596] coresight_enable+0xd4/0x298
[ 167.057510] enable_source_store+0x54/0xa0
[ 167.061598] dev_attr_store+0x20/0x40
[ 167.065254] sysfs_kf_write+0x4c/0x68
[ 167.068909] kernfs_fop_write_iter+0x128/0x200
[ 167.073345] vfs_write+0x1ac/0x2f8
[ 167.076739] ksys_write+0x74/0x110
[ 167.080132] __arm64_sys_write+0x24/0x38
[ 167.084045] invoke_syscall.constprop.0+0x58/0xf8
[ 167.088744] do_el0_svc+0x60/0x160
[ 167.092137] el0_svc+0x40/0x170
[ 167.095273] el0t_64_sync_handler+0x100/0x130
[ 167.099621] el0t_64_sync+0x190/0x198
[ 167.103277] ---[ end trace 0000000000000000 ]---
-bash: echo: write error: Device or resource busy
Fixes: 296b01fd106e ("coresight: Refactor out buffer allocation function for ETR")
Signed-off-by: Linu Cherian <lcherian@marvell.com>
Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230823042948.12879-1-lcherian@marvell.com
2023-09-15 16:09:18 +01:00
..
2023-06-05 15:46:47 +01:00
2022-08-31 10:56:36 -06:00
2021-08-18 22:33:28 +02:00
2021-11-26 11:27:21 -07:00
2021-08-18 22:33:28 +02:00
2021-08-18 22:33:27 +02:00
2022-06-29 09:35:58 -06:00
2023-07-26 16:46:24 +01:00
2022-05-09 16:03:24 +01:00
2023-07-26 18:01:52 +01:00
2021-02-04 17:00:32 +01:00
2023-06-05 15:46:47 +01:00
2023-06-05 15:46:47 +01:00
2023-08-04 14:17:30 +01:00
2023-06-05 15:46:46 +01:00
2023-06-05 15:46:45 +01:00
2023-01-19 10:16:47 +00:00
2023-07-26 18:01:52 +01:00
2021-08-18 22:33:28 +02:00
2023-08-17 11:49:21 +01:00
2023-06-06 10:39:15 +01:00
2023-07-26 16:46:25 +01:00
2018-05-14 16:19:59 +02:00
2023-06-05 15:46:47 +01:00
2023-01-24 10:41:46 +00:00
2023-01-19 10:16:47 +00:00
2023-06-05 15:46:46 +01:00
2023-08-18 11:23:47 +01:00
2023-06-07 12:07:10 +01:00
2023-06-05 15:46:46 +01:00
2021-10-27 11:45:33 -06:00
2023-06-05 15:46:45 +01:00
2021-11-26 11:34:27 -07:00
2021-11-26 11:34:27 -07:00
2022-06-29 09:35:58 -06:00
2022-06-29 09:35:58 -06:00
2023-06-05 15:46:47 +01:00
2023-01-30 11:45:32 +00:00
2023-08-04 10:52:32 +01:00
2023-09-15 16:09:18 +01:00
2023-08-04 10:52:32 +01:00
2023-06-05 15:46:46 +01:00
2023-01-20 11:39:03 +00:00
2023-06-05 15:46:45 +01:00
2023-01-20 11:39:03 +00:00
2023-06-05 15:46:46 +01:00
2023-01-19 10:16:47 +00:00
2023-01-19 10:16:46 +00:00
2023-08-18 16:42:26 +01:00
2023-08-02 12:53:28 +01:00
2023-06-15 08:50:23 +01:00
2023-06-15 08:50:23 +01:00
2023-06-05 15:46:46 +01:00
2023-06-05 15:46:45 +01:00