EXP PCI/AER: Rate-limit output from aer_print_error()

Devices that report memory errors can generate large quantities of
output via the aer_print_error() function, enough to result in various
lockup and stall-warning messages.  At the same time, it is important
for uncorrectable errors to be reported even if there is a flood of
correctable errors.  Therefore, add a PCIEAER_RATELIMIT Kconfig option
that rate-limits aer_print_error() output on a per-device basis, and
separately for correctable, uncorrectable, and unknown ("Inaccessible")
errors.

Reported-by: Sargun Dhillon <sargun@meta.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
Cc: "Oliver O'Halloran" <oohall@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Kyle McMartin <jkkm@meta.com>
Cc: Chris Mason <clm@meta.com>
Cc: <linuxppc-dev@lists.ozlabs.org>
Cc: <linux-pci@vger.kernel.org>
3 files changed