powerpc/pseries: Quieten relocation on exceptions warning
authorAnton Blanchard <anton@samba.org>
Sun, 2 Nov 2014 21:34:01 +0000 (08:34 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 9 Nov 2014 22:59:33 +0000 (09:59 +1100)
The H_SET_MODE hcall returns H_P2 if a function is not implemented
and all callers should handle this case.

The call to enable relocation on exceptions currently prints an error
message if the feature is not implemented. While H_SET_MODE was
first introduced on POWER8 (which has relocation on exceptions), it
has been now added on some POWER7 configurations (which does not).

Check for H_P2 and print an informational message instead.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/setup.c

index db0fc0c07568208c477bc4d590b19ebefbe238dd..8b8fb19a4097f5080a13fb0d0508a22e41199247 100644 (file)
@@ -499,7 +499,11 @@ static void __init pSeries_setup_arch(void)
 
        if (firmware_has_feature(FW_FEATURE_SET_MODE)) {
                long rc;
-               if ((rc = pSeries_enable_reloc_on_exc()) != H_SUCCESS) {
+
+               rc = pSeries_enable_reloc_on_exc();
+               if (rc == H_P2) {
+                       pr_info("Relocation on exceptions not supported\n");
+               } else if (rc != H_SUCCESS) {
                        pr_warn("Unable to enable relocation on exceptions: "
                                "%ld\n", rc);
                }