powerpc/opal: add warning for unimplemented OPAL message type
Hi Michael,
Quoted 4 lines · Michael Ellerman
Hi Wen,
Thanks for the patch.
Quoted 8 lines
Quoted 5 lines · On Tue, 2015-12-08 at 15:30 +0800, [email protected] wrote:
I found that there are unimplemented OPAL message types "
OPAL_MSG_EPOW" and
"OPAL_MSG_DPO" in PowerNV Platform. If skiboot send such messages to kernel, nothing willhappen(notifier_call_chain() will silently drop it). So I add a warning to inform what has happened, is it necessary?What kernel version are you using?
The kernel version is v4.2.1-openpower2, from the newest version at
https://github.com/open-power/linux.
Quoted 9 lines
Looking at mainline (4.4-rc4), I do see handlers registered for EPOW and DPO:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/p
owerpc/platforms/powernv/opal-power.c?#n82That code was merged in 4.3.
I do find that EPOW and DPO are registered in kernel 4.3. So maybe in the near future it will be merged into open-power/linux.
Quoted 10 lines
In general I don't think we want to warn for unhandled message types, because we support old kernels running on new skiboot. In that case if we warned on every unhandled message we'd potentially spam the console with warnings.
But perhaps we can come up with something smarter, that only warns once for each unhandled message type, or something like that? Did you have a bug that would have been easier to debug with a warning here?
Yes, I think it is a good idea that only warns once, or warns every a few seconds.
I found that EPOW and DPO only used in IBM FSP platform, not in Habanero platform that I had. So I modified the skiboot code and sent a EPOW/DPO message to kernel, and found that kernel warn nothing. I have no bug with a warning here, and just get a log message via dmesg.
Quoted 2 lines
cheers
Thanks!
Wen Pu
Quoted 6 lines · =E8=92=B2=E6=96=87 <[email protected]> writes:
Quoted 5 lines · Michael Ellerman
Quoted 4 lines · On Tue, 2015-12-08 at 15:30 +0800, [email protected] wrote:
I found that there are unimplemented OPAL message types "
OPAL_MSG_EPOW" and
"OPAL_MSG_DPO" in PowerNV Platform. If skiboot send such messages to kernel, nothing will happen(notifier_call_chain() will silently drop i=
t).
Quoted 12 lines
Quoted 3 lines
Quoted 1 line
So I add a warning to inform what has happened, is it necessary?
=20
What kernel version are you using?The kernel version is v4.2.1-openpower2, from the newest version at=20
https://github.com/open-power/linux.Quoted 6 lines
=20
Looking at mainline (4.4-rc4), I do see handlers registered for EPOW and DPO:
=20
=20=20
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arc=
h/p
Quoted 4 lines
Quoted 3 lines
owerpc/platforms/powernv/opal-power.c?#n82
=20
That code was merged in 4.3.I do find that EPOW and DPO are registered in kernel 4.3. So maybe in the=
near=20
Quoted 1 line
future it will be merged into open-power/linux.
Way back in 24366360035a9e0a9870ed7208aa2ba1948f844d where the opal_msg code was introduced there was a warning added for opal messages that were unknown... arguably this is actually a bad thing to have these days... I'll submit a patch to print it *once*.
Quoted 6 lines
Quoted 6 lines
In general I don't think we want to warn for unhandled message types, because we support old kernels running on new skiboot. In that case if we warned on every unhandled message we'd potentially spam the console with warnings.
=20
But perhaps we can come up with something smarter, that only warns once =
for
Quoted 1 line
Quoted 1 line
each unhandled message type, or something like that? Did you have a bug =
that
Quoted 2 lines
Quoted 1 line
would have been easier to debug with a warning here?
Yes, I think it is a good idea that only warns once, or warns every a few=
=20
Quoted 2 lines
seconds.=20
I found that EPOW and DPO only used in IBM FSP platform, not in Habanero=
=20
Quoted 1 line
platform that I had. So I modified the skiboot code and sent a EPOW/DPO m=
essage=20
Quoted 1 line
to kernel, and found that kernel warn nothing. I have no bug with a warni=
ng=20
Quoted 1 line
here, and just get a log message via dmesg.
Currently only FSP platform, yes. No real reason why a BMC based platform couldn't emit those though.