summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAndrew Donnellan <ajd@linux.ibm.com>2020-12-11 05:11:41 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2020-12-15 14:53:27 +0300
commitc88017cf2af614409da69934c1738ed5ff2f7022 (patch)
tree5f618dd50eccc232522a0bc34bdda0a6f04f92c7 /arch/powerpc
parent20e9de85edae3a5866f29b6cce87c9ec66d62a1b (diff)
downloadlinux-c88017cf2af614409da69934c1738ed5ff2f7022.tar.xz
powerpc/powernv: Rate limit opal-elog read failure message
Sometimes we can't read an error log from OPAL, and we print an error message accordingly. But the OPAL userspace tools seem to like retrying a lot, in which case we flood the kernel log with a lot of messages. Change pr_err() to pr_err_ratelimited() to help with this. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201211021140.28402-1-ajd@linux.ibm.com
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/powernv/opal-elog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index 37b380eef41a..5821b0fa8614 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -171,8 +171,8 @@ static ssize_t raw_attr_read(struct file *filep, struct kobject *kobj,
opal_rc = opal_read_elog(__pa(elog->buffer),
elog->size, elog->id);
if (opal_rc != OPAL_SUCCESS) {
- pr_err("ELOG: log read failed for log-id=%llx\n",
- elog->id);
+ pr_err_ratelimited("ELOG: log read failed for log-id=%llx\n",
+ elog->id);
kfree(elog->buffer);
elog->buffer = NULL;
return -EIO;