]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/powernv: Return for invalid IMC domain
authorAnju T Sudhakar <anju@linux.vnet.ibm.com>
Mon, 20 May 2019 08:57:53 +0000 (14:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:15:16 +0000 (08:15 +0200)
commit930d31a6f34401ff47e11755e9e3ef55cbfcffe9
tree731cf0ffa3b908f59a46d5672948dc01e3faf656
parent00ed897d618ef0777ca126f8698dff6bf08f7979
powerpc/powernv: Return for invalid IMC domain

[ Upstream commit b59bd3527fe3c1939340df558d7f9d568fc9f882 ]

Currently init_imc_pmu() can fail either because we try to register an
IMC unit with an invalid domain (i.e an IMC node not supported by the
kernel) or something went wrong while registering a valid IMC unit. In
both the cases kernel provides a 'Register failed' error message.

For example when trace-imc node is not supported by the kernel, but
skiboot advertises a trace-imc node we print:

  IMC Unknown Device type
  IMC PMU (null) Register failed

To avoid confusion just print the unknown device type message, before
attempting PMU registration, so the second message isn't printed.

Fixes: 8f95faaac56c ("powerpc/powernv: Detect and create IMC device")
Reported-by: Pavaman Subramaniyam <pavsubra@in.ibm.com>
Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
[mpe: Reword change log a bit]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powernv/opal-imc.c