mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 09:32:36 -04:00
parisc: Add support for CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
Allow users to disable kernel warnings for unaligned memory accesses from kernel via the /proc/sys/kernel/ignore-unaligned-usertrap procfs entry. That way users can disable those warnings in case they happen too often. Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
@@ -104,6 +104,7 @@
|
||||
#define ERR_NOTHANDLED -1
|
||||
|
||||
int unaligned_enabled __read_mostly = 1;
|
||||
int no_unaligned_warning __read_mostly;
|
||||
|
||||
static int emulate_ldh(struct pt_regs *regs, int toreg)
|
||||
{
|
||||
@@ -399,6 +400,7 @@ void handle_unaligned(struct pt_regs *regs)
|
||||
} else {
|
||||
static DEFINE_RATELIMIT_STATE(kernel_ratelimit, 5 * HZ, 5);
|
||||
if (!(current->thread.flags & PARISC_UAC_NOPRINT) &&
|
||||
!no_unaligned_warning &&
|
||||
__ratelimit(&kernel_ratelimit))
|
||||
pr_warn("Kernel: unaligned access to " RFMT " in %pS "
|
||||
"(iir " RFMT ")\n",
|
||||
|
||||
Reference in New Issue
Block a user