Skip to content

mailbox: synchronize NPCM channel shutdown - #576

Open
helloxiling wants to merge 1 commit into
Nuvoton-Israel:NPCM-6.12-OpenBMCfrom
helloxiling:xsun/npcm-mailbox-shutdown
Open

mailbox: synchronize NPCM channel shutdown#576
helloxiling wants to merge 1 commit into
Nuvoton-Israel:NPCM-6.12-OpenBMCfrom
helloxiling:xsun/npcm-mailbox-shutdown

Conversation

@helloxiling

Copy link
Copy Markdown

Summary

NPCM mailbox clients can be removed while the threaded controller IRQ is handling a response. The previous shutdown path could release client state while a late callback was still running.

  • retain per-channel metadata for the controller lifetime
  • mark the channel inactive before shutdown
  • clear its doorbell and synchronize the threaded IRQ
  • acknowledge inactive doorbells without invoking an absent client

Motivation

This is a standalone mailbox lifetime fix. It is also required before the NPCM Composite EAT mailbox client can safely support unbind and late responses.

Validation

  • scripts/checkpatch.pl --strict: 0 errors, warnings, or checks
  • git diff --check: pass
  • focused ARM64 W=1 mailbox/client directory build: pass

The pre-existing probe error-path double-unregister is outside this change and should be handled separately.

NPCM clients can be removed while the threaded mailbox IRQ is
handling a response. The existing shutdown path frees channel
metadata before the mailbox core clears the client pointer. This can
race the controller handler and client callback.

Keep channel metadata for the controller lifetime, mark it inactive
before shutdown, and synchronize the IRQ. Also acknowledge inactive
doorbells so the shared IRQ cannot retrigger indefinitely.

Signed-off-by: xilingsun <xilingsun@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant