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
Unknown Object (File)
Mar 9 2024, 11:52 PM
Unknown Object (File)
Feb 3 2024, 9:19 PM
Unknown Object (File)
Jan 14 2024, 9:51 AM
Unknown Object (File)
Jan 11 2024, 4:49 PM
Unknown Object (File)
Dec 29 2023, 6:55 AM
Unknown Object (File)
Dec 26 2023, 2:38 AM
Unknown Object (File)
Dec 20 2023, 3:50 AM
Unknown Object (File)
Sep 1 2023, 5:58 AM

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.