Skip to content

Commit 768d70e

Browse files
nathanlynchmpe
authored andcommitted
powerpc/pseries/dlpar: handle ibm, configure-connector delay status
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: ab519a0 ("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
1 parent 3cb1aa7 commit 768d70e

File tree

1 file changed

+3
-4
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+3
-4
lines changed

arch/powerpc/platforms/pseries/dlpar.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ void dlpar_free_cc_nodes(struct device_node *dn)
127127
#define NEXT_PROPERTY 3
128128
#define PREV_PARENT 4
129129
#define MORE_MEMORY 5
130-
#define CALL_AGAIN -2
131130
#define ERR_CFG_USE -9003
132131

133132
struct device_node *dlpar_configure_connector(__be32 drc_index,
@@ -168,6 +167,9 @@ struct device_node *dlpar_configure_connector(__be32 drc_index,
168167

169168
spin_unlock(&rtas_data_buf_lock);
170169

170+
if (rtas_busy_delay(rc))
171+
continue;
172+
171173
switch (rc) {
172174
case COMPLETE:
173175
break;
@@ -216,9 +218,6 @@ struct device_node *dlpar_configure_connector(__be32 drc_index,
216218
last_dn = last_dn->parent;
217219
break;
218220

219-
case CALL_AGAIN:
220-
break;
221-
222221
case MORE_MEMORY:
223222
case ERR_CFG_USE:
224223
default:

0 commit comments

Comments
 (0)