Skip to contentSkip to conversation

powerpc/pseries: Quieten relocation on exceptions warning

PATCH New Anton Blanchard 1 participant 1 message Nov 2, 2014 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/pseries: Quieten relocation on exceptions warning

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.

---
 arch/powerpc/platforms/pseries/setup.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/setup.c +5 -1
index 125c589..fcc9227 100644
@@ -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);
 		}
Signature · 1 line
1.9.1