* [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA
@ 2026-11-27 11:31 Qianhui Xu
2026-11-27 11:31 ` [PATCH 1/2] coresight: ctcu: add missing MODULE_DEVICE_TABLE() Qianhui Xu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Qianhui Xu @ 2026-11-27 11:31 UTC (permalink / raw)
To: suzuki.poulose
Cc: mike.leach, james.clark, leo.yan, alexander.shishkin, coresight,
linux-arm-kernel, linux-kernel
Hi,
both the CTCU and the TPDA driver are matched through an ID table, but
neither exports that table, so building them as modules produces a
module without an "of:" / "amba:" modalias. udev cannot autoload such a
module, and the device stays unbound until somebody loads it by hand.
This was found on an SM8750 based phone (mainline v7.3.1,
CONFIG_CORESIGHT_CTCU=m and CONFIG_CORESIGHT_TPDA=m):
# lsmod | grep -c coresight_ctcu
0
# modinfo -F alias coresight-ctcu
(empty)
# modprobe coresight-ctcu && readlink -f /sys/bus/platform/devices/10001000.ctcu/driver
.../drivers/coresight-ctcu
Five tpda devices behave the same way. With this series applied the
modules carry "of:N*T*Cqcom,sa8775p-ctcu" and "amba:d???F0F??" aliases,
and on the next boot both autoload with no modules-load.d help at all:
# lsmod | grep -E 'coresight_(ctcu|tpda)'
coresight_ctcu 16384 0
coresight_tpda 24576 0
# for f in /sys/bus/amba/devices/*; do [ -e $f/driver ] || n=$((n+1)); done; echo $n
0
There is no functional change for built-in builds; MODULE_DEVICE_TABLE()
is only used for module aliases.
*** AI-assistance disclosure ***
This series was prepared with the help of an LLM coding assistant. The
author reviewed every line, reproduced the before/after behaviour on
hardware and is responsible for the content.
Signed-off-by: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
Qianhui Xu (2):
coresight: ctcu: add missing MODULE_DEVICE_TABLE()
coresight: tpda: add missing MODULE_DEVICE_TABLE()
drivers/hwtracing/coresight/coresight-ctcu-core.c | 1 +
drivers/hwtracing/coresight/coresight-tpda.c | 1 +
2 files changed, 2 insertions(+)
--
2.51.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] coresight: ctcu: add missing MODULE_DEVICE_TABLE()
2026-11-27 11:31 [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA Qianhui Xu
@ 2026-11-27 11:31 ` Qianhui Xu
2026-11-27 11:31 ` [PATCH 2/2] coresight: tpda: " Qianhui Xu
2026-11-27 13:02 ` [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA James Clark
2 siblings, 0 replies; 4+ messages in thread
From: Qianhui Xu @ 2026-11-27 11:31 UTC (permalink / raw)
To: suzuki.poulose
Cc: mike.leach, james.clark, leo.yan, alexander.shishkin, coresight,
linux-arm-kernel, linux-kernel
The CTCU driver matches "qcom,sa8775p-ctcu", which SM8750 also falls back
to, but it never exports its OF match table. Built as a module the driver
therefore carries no "of:" modalias, so udev cannot autoload it when the
CTCU device is registered and the device stays unbound until someone runs
modprobe by hand.
Seen on SM8750 with CONFIG_CORESIGHT_CTCU=m: "modinfo -F alias
coresight-ctcu" prints nothing, while a manual modprobe binds
10001000.ctcu immediately. Add the missing MODULE_DEVICE_TABLE(of,
ctcu_match) so the module is autoloaded like the other Coresight drivers.
*** AI-assistance disclosure ***
This patch was prepared with the help of an LLM coding assistant. The
author reviewed every line and ran the commands quoted above.
Signed-off-by: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
---
drivers/hwtracing/coresight/coresight-ctcu-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hwtracing/coresight/coresight-ctcu-core.c b/drivers/hwtracing/coresight/coresight-ctcu-core.c
index 9043cad42f01e..a7caa5b00b6d1 100644
--- a/drivers/hwtracing/coresight/coresight-ctcu-core.c
+++ b/drivers/hwtracing/coresight/coresight-ctcu-core.c
@@ -295,6 +295,7 @@ static const struct of_device_id ctcu_match[] = {
{.compatible = "qcom,sa8775p-ctcu", .data = &sa8775p_cfgs},
{}
};
+MODULE_DEVICE_TABLE(of, ctcu_match);
static struct platform_driver ctcu_driver = {
.probe = ctcu_platform_probe,
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] coresight: tpda: add missing MODULE_DEVICE_TABLE()
2026-11-27 11:31 [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA Qianhui Xu
2026-11-27 11:31 ` [PATCH 1/2] coresight: ctcu: add missing MODULE_DEVICE_TABLE() Qianhui Xu
@ 2026-11-27 11:31 ` Qianhui Xu
2026-11-27 13:02 ` [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA James Clark
2 siblings, 0 replies; 4+ messages in thread
From: Qianhui Xu @ 2026-11-27 11:31 UTC (permalink / raw)
To: suzuki.poulose
Cc: mike.leach, james.clark, leo.yan, alexander.shishkin, coresight,
linux-arm-kernel, linux-kernel
TPDA is an AMBA driver, but its ID table is not exported either, so the
module has no "amba:" modalias and udev never autoloads it. On SM8750
five tpda devices stay unbound until coresight-tpda is loaded by hand,
even though the IDs in tpda_ids match.
*** AI-assistance disclosure ***
This patch was prepared with the help of an LLM coding assistant. The
author reviewed every line and ran the commands quoted in the cover
letter.
Signed-off-by: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
---
drivers/hwtracing/coresight/coresight-tpda.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c
index 89c8f71f0aff0..5d622d7b88f8a 100644
--- a/drivers/hwtracing/coresight/coresight-tpda.c
+++ b/drivers/hwtracing/coresight/coresight-tpda.c
@@ -622,6 +622,7 @@ static const struct amba_id tpda_ids[] = {
},
{ 0, 0, NULL },
};
+MODULE_DEVICE_TABLE(amba, tpda_ids);
static struct amba_driver tpda_driver = {
.drv = {
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA
2026-11-27 11:31 [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA Qianhui Xu
2026-11-27 11:31 ` [PATCH 1/2] coresight: ctcu: add missing MODULE_DEVICE_TABLE() Qianhui Xu
2026-11-27 11:31 ` [PATCH 2/2] coresight: tpda: " Qianhui Xu
@ 2026-11-27 13:02 ` James Clark
2 siblings, 0 replies; 4+ messages in thread
From: James Clark @ 2026-11-27 13:02 UTC (permalink / raw)
To: Qianhui Xu, suzuki.poulose
Cc: mike.leach, leo.yan, alexander.shishkin, coresight,
linux-arm-kernel, linux-kernel
On 27/11/2026 11:31, Qianhui Xu wrote:
> Hi,
>
> both the CTCU and the TPDA driver are matched through an ID table, but
> neither exports that table, so building them as modules produces a
> module without an "of:" / "amba:" modalias. udev cannot autoload such a
> module, and the device stays unbound until somebody loads it by hand.
>
> This was found on an SM8750 based phone (mainline v7.3.1,
> CONFIG_CORESIGHT_CTCU=m and CONFIG_CORESIGHT_TPDA=m):
>
> # lsmod | grep -c coresight_ctcu
> 0
> # modinfo -F alias coresight-ctcu
> (empty)
> # modprobe coresight-ctcu && readlink -f /sys/bus/platform/devices/10001000.ctcu/driver
> .../drivers/coresight-ctcu
>
> Five tpda devices behave the same way. With this series applied the
> modules carry "of:N*T*Cqcom,sa8775p-ctcu" and "amba:d???F0F??" aliases,
> and on the next boot both autoload with no modules-load.d help at all:
>
> # lsmod | grep -E 'coresight_(ctcu|tpda)'
> coresight_ctcu 16384 0
> coresight_tpda 24576 0
> # for f in /sys/bus/amba/devices/*; do [ -e $f/driver ] || n=$((n+1)); done; echo $n
> 0
>
> There is no functional change for built-in builds; MODULE_DEVICE_TABLE()
> is only used for module aliases.
>
> *** AI-assistance disclosure ***
> This series was prepared with the help of an LLM coding assistant. The
> author reviewed every line, reproduced the before/after behaviour on
> hardware and is responsible for the content.
>
> Signed-off-by: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
>
> Qianhui Xu (2):
> coresight: ctcu: add missing MODULE_DEVICE_TABLE()
> coresight: tpda: add missing MODULE_DEVICE_TABLE()
>
> drivers/hwtracing/coresight/coresight-ctcu-core.c | 1 +
> drivers/hwtracing/coresight/coresight-tpda.c | 1 +
> 2 files changed, 2 insertions(+)
>
Could probably do with fixes: tags for both commits, but:
Reviewed-by: James Clark <james.clark@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-27 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 11:31 [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA Qianhui Xu
2026-11-27 11:31 ` [PATCH 1/2] coresight: ctcu: add missing MODULE_DEVICE_TABLE() Qianhui Xu
2026-11-27 11:31 ` [PATCH 2/2] coresight: tpda: " Qianhui Xu
2026-11-27 13:02 ` [PATCH 0/2] coresight: add missing MODULE_DEVICE_TABLE() for CTCU and TPDA James Clark
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®