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

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