hsmp_acpi_p...lure_cleanup(9)
πΈ NAME πΈ
hsmp_acpi_probe_failure_cleanup β bestie, this is the function that undoes a failed ACPI socket probe π
β¨ SYNOPSIS β¨
void hsmp_acpi_probe_failure_cleanup (struct device *dev );
π ARGUMENTS π
devβ the ACPI companion device whose probe failed π like, the one that didn't slay.
π¦ DESCRIPTION π¦
Okay so picture this: this device already took a reference when it entered hsmp_acpi_probe, so what we're doing here is clearing its sock->dev and dropping that reference. The shared state gets released if it was the last one holding on π₯
Now the part that really matters, and ngl it's giving main character energy on multi-socket systems: when a non-first socket fails, the array stays alive (it's owned by an already-probed socket) and remove is never called for this device β yet devres unmaps its mailbox once probe returns. So if we didn't clear dev, a later message to this index would pass every single gate in hsmp_send_message and reach the unmapped mailbox π that's the whole reason we're here.
Also important: sock is NULL if probe failed before hsmp_parse_acpi_table set the drvdata. So like, don't come for it π
And jsyk, this is called from hsmp_acpi_probe, which already holds hsmp_sock_rwsem for write. Periodt.
π SEE ALSO π
- Kernel file
./drivers/platform/x86/amd/hsmp/acpi.c
That's the whole vibe bestie, hope it ate π«Ά β this icon of a page lives at ./drivers/platform/x86/amd/hsmp, dated October 2026, and it's out here being part of the Kernel API Manual like the star it is βπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms