blob: 1848a84cc4970f0f60983e1f45d5580b00c27c49 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From: Alexey Brodkin <abrodkin@synopsys.com>
2Subject: arc: enable unaligned access in kernel mode
3
4This enables misaligned access handling even in kernel mode.
5Some wireless drivers (ath9k-htc and mt7601u) use misaligned accesses
6here and there and to cope with that without fixing stuff in the drivers
7we're just gracefully handling it on ARC.
8
9Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
10---
11 arch/arc/kernel/unaligned.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14--- a/arch/arc/kernel/unaligned.c
15+++ b/arch/arc/kernel/unaligned.c
16@@ -202,7 +202,7 @@ int misaligned_fixup(unsigned long addre
17 char buf[TASK_COMM_LEN];
18
19 /* handle user mode only and only if enabled by sysadmin */
20- if (!user_mode(regs) || !unaligned_enabled)
21+ if (!unaligned_enabled)
22 return 1;
23
24 if (no_unaligned_warning) {