powerpc/powernv: Rate limit opal-elog read failure message
PATCH 1/1 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 <[email protected]>
--- arch/powerpc/platforms/powernv/opal-elog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powernv/opal-elog.c +2 -2
@@ -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 ;
Signature · 1 line
2.20.1
Michael Ellerman
AppliedQuoted 5 lines · Andrew Donnellan
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()topr_err_ratelimited()to help with this.
Applied to powerpc/next.
[1/1] powerpc/powernv: Rate limit opal-elog read failure message
https://git.kernel.org/powerpc/c/c88017cf2af614409da69934c1738ed5ff2f7022
cheers