]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Add queue mechanism for early messages
authorDeb McLemore <debmc@linux.vnet.ibm.com>
Mon, 21 May 2018 02:04:38 +0000 (21:04 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 11 Oct 2019 08:42:06 +0000 (19:42 +1100)
commit58e0b807007db1508ea09c623ae2608dae8c6f65
tree2402d97e43add5b95dc10166ada0a4d6d8fced11
parentd8381282ce4e03ec6b620dca74aa88ce97946ec4
powerpc/powernv: Add queue mechanism for early messages

When issuing a BMC soft poweroff during IPL, the poweroff can be lost
so the machine would not poweroff.

This is because opal messages can be received before the opal-power
code registered its notifiers.

Fix it by buffering messages. If we receive a message and do not yet
have a handler for that type, store the message and replay when a
handler for that type is registered.

Signed-off-by: Deb McLemore <debmc@linux.vnet.ibm.com>
[mpe: Single unlock path in opal_message_notifier_register(), tweak
      comments/formatting and change log.]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1526868278-4204-1-git-send-email-debmc@linux.vnet.ibm.com
arch/powerpc/platforms/powernv/opal.c