Commit 65471d76 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/pseries: Use pr_xxx() in lpar.c

Switch from printk to pr_fmt() / pr_xxx().
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
[mpe: Split out of larger patch]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 27d8959d
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
/* Enables debugging of low-level hash table routines - careful! */ /* Enables debugging of low-level hash table routines - careful! */
#undef DEBUG #undef DEBUG
#define pr_fmt(fmt) "lpar: " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
...@@ -612,8 +613,8 @@ static int __init disable_bulk_remove(char *str) ...@@ -612,8 +613,8 @@ static int __init disable_bulk_remove(char *str)
{ {
if (strcmp(str, "off") == 0 && if (strcmp(str, "off") == 0 &&
firmware_has_feature(FW_FEATURE_BULK_REMOVE)) { firmware_has_feature(FW_FEATURE_BULK_REMOVE)) {
printk(KERN_INFO "Disabling BULK_REMOVE firmware feature"); pr_info("Disabling BULK_REMOVE firmware feature");
powerpc_firmware_features &= ~FW_FEATURE_BULK_REMOVE; powerpc_firmware_features &= ~FW_FEATURE_BULK_REMOVE;
} }
return 1; return 1;
} }
...@@ -659,8 +660,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift) ...@@ -659,8 +660,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
if (!firmware_has_feature(FW_FEATURE_HPT_RESIZE)) if (!firmware_has_feature(FW_FEATURE_HPT_RESIZE))
return -ENODEV; return -ENODEV;
printk(KERN_INFO "lpar: Attempting to resize HPT to shift %lu\n", pr_info("Attempting to resize HPT to shift %lu\n", shift);
shift);
t0 = ktime_get(); t0 = ktime_get();
...@@ -672,8 +672,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift) ...@@ -672,8 +672,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
/* prepare with shift==0 cancels an in-progress resize */ /* prepare with shift==0 cancels an in-progress resize */
rc = plpar_resize_hpt_prepare(0, 0); rc = plpar_resize_hpt_prepare(0, 0);
if (rc != H_SUCCESS) if (rc != H_SUCCESS)
printk(KERN_WARNING pr_warn("Unexpected error %d cancelling timed out HPT resize\n",
"lpar: Unexpected error %d cancelling timed out HPT resize\n",
rc); rc);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -691,9 +690,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift) ...@@ -691,9 +690,7 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
case H_RESOURCE: case H_RESOURCE:
return -EPERM; return -EPERM;
default: default:
printk(KERN_WARNING pr_warn("Unexpected error %d from H_RESIZE_HPT_PREPARE\n", rc);
"lpar: Unexpected error %d from H_RESIZE_HPT_PREPARE\n",
rc);
return -EIO; return -EIO;
} }
...@@ -706,22 +703,19 @@ static int pseries_lpar_resize_hpt(unsigned long shift) ...@@ -706,22 +703,19 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
if (rc != 0) { if (rc != 0) {
switch (state.commit_rc) { switch (state.commit_rc) {
case H_PTEG_FULL: case H_PTEG_FULL:
printk(KERN_WARNING pr_warn("Hash collision while resizing HPT\n");
"lpar: Hash collision while resizing HPT\n");
return -ENOSPC; return -ENOSPC;
default: default:
printk(KERN_WARNING pr_warn("Unexpected error %d from H_RESIZE_HPT_COMMIT\n",
"lpar: Unexpected error %d from H_RESIZE_HPT_COMMIT\n", state.commit_rc);
state.commit_rc);
return -EIO; return -EIO;
}; };
} }
printk(KERN_INFO pr_info("HPT resize to shift %lu complete (%lld ms / %lld ms)\n",
"lpar: HPT resize to shift %lu complete (%lld ms / %lld ms)\n", shift, (long long) ktime_ms_delta(t1, t0),
shift, (long long) ktime_ms_delta(t1, t0), (long long) ktime_ms_delta(t2, t1));
(long long) ktime_ms_delta(t2, t1));
return 0; return 0;
} }
...@@ -785,13 +779,13 @@ static int __init cmo_free_hint(char *str) ...@@ -785,13 +779,13 @@ static int __init cmo_free_hint(char *str)
parm = strstrip(str); parm = strstrip(str);
if (strcasecmp(parm, "no") == 0 || strcasecmp(parm, "off") == 0) { if (strcasecmp(parm, "no") == 0 || strcasecmp(parm, "off") == 0) {
printk(KERN_INFO "cmo_free_hint: CMO free page hinting is not active.\n"); pr_info("%s: CMO free page hinting is not active.\n", __func__);
cmo_free_hint_flag = 0; cmo_free_hint_flag = 0;
return 1; return 1;
} }
cmo_free_hint_flag = 1; cmo_free_hint_flag = 1;
printk(KERN_INFO "cmo_free_hint: CMO free page hinting is active.\n"); pr_info("%s: CMO free page hinting is active.\n", __func__);
if (strcasecmp(parm, "yes") == 0 || strcasecmp(parm, "on") == 0) if (strcasecmp(parm, "yes") == 0 || strcasecmp(parm, "on") == 0)
return 1; return 1;
......
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