From e4a3cb7256682f9f2e0fd2b3c5e06441052a9822 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Tue, 27 Sep 2022 16:21:35 +0200 Subject: [PATCH 43/96] arc: enable unaligned access in kernel mode This enables misaligned access handling even in kernel mode. Some wireless drivers (ath9k-htc and mt7601u) use misaligned accesses here and there and to cope with that without fixing stuff in the drivers we're just gracefully handling it on ARC. Signed-off-by: Alexey Brodkin --- arch/arc/kernel/unaligned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c index 99a9b92ed98d..a4da2cbcac97 100644 --- a/arch/arc/kernel/unaligned.c +++ b/arch/arc/kernel/unaligned.c @@ -202,7 +202,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, char buf[TASK_COMM_LEN]; /* handle user mode only and only if enabled by sysadmin */ - if (!user_mode(regs) || !unaligned_enabled) + if (!unaligned_enabled) return 1; if (no_unaligned_warning) { -- 2.37.2