* DECstation/DECsystem 5000/20, /25, /33 (KN02-CA), 5000/50
* (KN04-CA) systems.
*
- * Copyright (c) 2005 Maciej W. Rozycki
+ * Copyright (c) 2005, 2026 Maciej W. Rozycki
*/
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
+#include <linux/ratelimit.h>
#include <linux/types.h>
#include <asm/addrspace.h>
static const char paritystr[] = "parity error";
static const char lanestat[][4] = { " OK", "BAD" };
+ static DEFINE_RATELIMIT_STATE(rs,
+ DEFAULT_RATELIMIT_INTERVAL,
+ DEFAULT_RATELIMIT_BURST);
+
const char *kind, *agent, *cycle, *event;
unsigned long address;
if (is_fixup)
action = MIPS_BE_FIXUP;
- if (action != MIPS_BE_FIXUP)
+ if (action != MIPS_BE_FIXUP && __ratelimit(&rs)) {
printk(KERN_ALERT "Bus error %s: %s %s %s at %#010lx\n",
kind, agent, cycle, event, address);
- if (action != MIPS_BE_FIXUP && address < 0x10000000)
- printk(KERN_ALERT " Byte lane status %#3x -- "
- "#3: %s, #2: %s, #1: %s, #0: %s\n",
- (mer & KN02XA_MER_BYTERR) >> 8,
- lanestat[(mer & KN02XA_MER_BYTERR_3) != 0],
- lanestat[(mer & KN02XA_MER_BYTERR_2) != 0],
- lanestat[(mer & KN02XA_MER_BYTERR_1) != 0],
- lanestat[(mer & KN02XA_MER_BYTERR_0) != 0]);
+ if (address < 0x10000000)
+ printk(KERN_ALERT " Byte lane status %#3x -- "
+ "#3: %s, #2: %s, #1: %s, #0: %s\n",
+ (mer & KN02XA_MER_BYTERR) >> 8,
+ lanestat[(mer & KN02XA_MER_BYTERR_3) != 0],
+ lanestat[(mer & KN02XA_MER_BYTERR_2) != 0],
+ lanestat[(mer & KN02XA_MER_BYTERR_1) != 0],
+ lanestat[(mer & KN02XA_MER_BYTERR_0) != 0]);
+ }
return action;
}