333-arc-enable-unaligned-access-in-kernel-mode.patch 825 B

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