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)
Dec 13 2024, 5:56 AM
Unknown Object (File)
Nov 19 2024, 3:51 AM
Unknown Object (File)
Nov 19 2024, 12:48 AM
Unknown Object (File)
Nov 19 2024, 12:34 AM
Unknown Object (File)
Nov 19 2024, 12:21 AM
Unknown Object (File)
Nov 18 2024, 10:30 PM
Unknown Object (File)
Nov 18 2024, 5:18 AM
Unknown Object (File)
Oct 1 2024, 5:24 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.