powerpc/pseries/dlpar: handle ibm, configure-connector delay status
authorNathan Lynch <nathanl@linux.ibm.com>
Thu, 7 Jan 2021 02:59:00 +0000 (20:59 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:04 +0000 (11:38 +0100)
commitc035dcae0bcc18b63db5be534d7bf676427469f4
treeecf9904840794c8401f3db7f5e7301a883e9164a
parentb1b904813755d825eff31222d2d24b05638c0c52
powerpc/pseries/dlpar: handle ibm, configure-connector delay status

[ Upstream commit 768d70e19ba525debd571b36e6d0ab19956c63d7 ]

dlpar_configure_connector() has two problems in its handling of
ibm,configure-connector's return status:

1. When the status is -2 (busy, call again), we call
   ibm,configure-connector again immediately without checking whether
   to schedule, which can result in monopolizing the CPU.
2. Extended delay status (9900..9905) goes completely unhandled,
   causing the configuration to unnecessarily terminate.

Fix both of these issues by using rtas_busy_delay().

Fixes: ab519a011caa ("powerpc/pseries: Kernel DLPAR Infrastructure")
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210107025900.410369-1-nathanl@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/pseries/dlpar.c