Commit 76b7bfb1 authored by Srikar Dronamraju's avatar Srikar Dronamraju Committed by Michael Ellerman

powerpc/numa: Handle extra hcall_vphn error cases

Currently code handles H_FUNCTION, H_SUCCESS, H_HARDWARE return codes.
However hcall_vphn can return other return codes. Now it also handles
H_PARAMETER return code.  Also the rest return codes are handled under the
default case.
Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Reported-by: default avatarAbdul Haleem <abdhalee@linux.vnet.ibm.com>
Reviewed-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200129135301.24739-3-srikar@linux.vnet.ibm.com
parent e7214ae9
......@@ -1191,23 +1191,30 @@ static long vphn_get_associativity(unsigned long cpu,
VPHN_FLAG_VCPU, associativity);
switch (rc) {
case H_SUCCESS:
dbg("VPHN hcall succeeded. Reset polling...\n");
timed_topology_update(0);
goto out;
case H_FUNCTION:
printk_once(KERN_INFO
"VPHN is not supported. Disabling polling...\n");
stop_topology_update();
pr_err_ratelimited("VPHN unsupported. Disabling polling...\n");
break;
case H_HARDWARE:
printk(KERN_ERR
"hcall_vphn() experienced a hardware fault "
pr_err_ratelimited("hcall_vphn() experienced a hardware fault "
"preventing VPHN. Disabling polling...\n");
stop_topology_update();
break;
case H_SUCCESS:
dbg("VPHN hcall succeeded. Reset polling...\n");
timed_topology_update(0);
case H_PARAMETER:
pr_err_ratelimited("hcall_vphn() was passed an invalid parameter. "
"Disabling polling...\n");
break;
default:
pr_err_ratelimited("hcall_vphn() returned %ld. Disabling polling...\n"
, rc);
break;
}
stop_topology_update();
out:
return rc;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment