hsmp_acpi_p...lure_cleanup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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