diff options
| author | Vincent Jardin <vjardin@free.fr> | 2026-09-09 19:04:40 +0200 |
|---|---|---|
| committer | Christophe Leroy (CS GROUP) <chleroy@kernel.org> | 2026-09-10 16:04:13 +0200 |
| commit | 7e9023a18eec88b716d8d46a29c4207186fbd828 (patch) | |
| tree | 090b7587ffdb065509c12c246aaf9a612ec0de26 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | f85e5ec18eb104574433caec67f452dd6e02d5de (diff) | |
bus: fsl-mc: register the object drivers after misc_class exists
Unbinding and re-binding the root DPRC fails with:
sysfs: cannot create duplicate filename '/dev/char/10:256'
misc_register / fsl_mc_uapi_create_device_file /
dprc_setup / dprc_probe
It happens when the fsl-mc bus probe is not deferred, without SMMU:
- the dprc driver is registered at postcore_initcall,
- the DT node is populated at arch_initcall_sync,
- the root DPRC probes right there, before misc_init() has
registered misc_class at subsys_initcall.
misc_register() still succeeds but the device gets
no class, so misc_deregister() at unbind cannot find it:
the minor is freed while the device and its /sys/dev/char/ link leak,
and then the next bind collides on the same minor.
Let's move the dprc and allocator drivers registration, and
platform_driver_register(), to subsys_initcall_sync, after misc_init()
at subsys_initcall.
bus_register() and the platform-bus notifier stay at postcore_initcall
so that fsl_mc_bus_notifier() still pauses the MC before the SMMU is probed.
Cc: stable+noautosel@kernel.org # niche: root DPRC unbind/rebind only
Fixes: 2cf1e703f066 ("bus: fsl-mc: add fsl-mc userspace support")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20260909-for-upstream-fsl-mc-initcall-order-v2-1-b7a04634fcf1@free.fr
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions
