Page MenuHomeFreeBSD

linuxkpi: Acquire giant when adding/removing i2c adapters
ClosedPublic

Authored by manu on Jun 14 2022, 11:25 AM.
Tags
None
Referenced Files
F102933328: D35478.diff
Mon, Nov 18, 10:30 PM
F102868234: D35478.id.diff
Mon, Nov 18, 5:18 AM
Unknown Object (File)
Oct 1 2024, 5:24 PM
Unknown Object (File)
Oct 1 2024, 12:30 PM
Unknown Object (File)
Sep 29 2024, 1:27 AM
Unknown Object (File)
Sep 28 2024, 3:17 AM
Unknown Object (File)
Sep 24 2024, 7:45 AM
Unknown Object (File)
Sep 21 2024, 11:50 PM

Details

Summary

We need Giant as we run in a taskqueue_thread via linux_work.
This fix detaching amdgpu and i915kms.

Sponsored by: Beckhoff Automation GmbH & Co. KG

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45965
Build 42853: arc lint + arc unit

Event Timeline

manu requested review of this revision.Jun 14 2022, 11:25 AM

I don't know why I don't need this but looking at the device_delete_child and bus_generic_attach code we need giant.
There is a report of this function failing https://github.com/freebsd/drm-kmod/issues/154 .

If I'm not mistaken you should just bus_topo_lock() and bus_topo_unlock() instead of referring Giant directly!

If I'm not mistaken you should just bus_topo_lock() and bus_topo_unlock() instead of referring Giant directly!

Indeed, fixed now.

This revision is now accepted and ready to land.Jun 14 2022, 11:58 AM

Nothing new in the tree should refer to Giant... I'll have to see if we can poison that to keep it from proliferating.
The bus_topo_* functions were a part of that work, and appear to be used here correctly.