1. 08 2月, 2017 1 次提交
  2. 28 1月, 2017 1 次提交
    • V
      ARC: [arcompact] handle unaligned access delay slot corner case · 9aed02fe
      Vineet Gupta 提交于
      After emulating an unaligned access in delay slot of a branch, we
      pretend as the delay slot never happened - so return back to actual
      branch target (or next PC if branch was not taken).
      
      Curently we did this by handling STATUS32.DE, we also need to clear the
      BTA.T bit, which is disregarded when returning from original misaligned
      exception, but could cause weirdness if it took the interrupt return
      path (in case interrupt was acive too)
      
      One ARC700 customer ran into this when enabling unaligned access fixup
      for kernel mode accesses as well
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      9aed02fe
  3. 20 8月, 2015 1 次提交
    • Y
      ARC: change some branchs to jumps to resolve linkage errors · 6de6066c
      Yuriy Kolerov 提交于
      When kernel's binary becomes large enough (32M and more) errors
      may occur during the final linkage stage. It happens because
      the build system uses short relocations for ARC  by default.
      This problem may be easily resolved by passing -mlong-calls
      option to GCC to use long absolute jumps (j) instead of short
      relative branchs (b).
      
      But there are fragments of pure assembler code exist which use
      branchs in inappropriate places and cause a linkage error because
      of relocations overflow.
      
      First of these fragments is .fixup insertion in futex.h and
      unaligned.c. It inserts a code in the separate section (.fixup)
      with branch instruction. It leads to the linkage error when
      kernel becomes large.
      
      Second of these fragments is calling scheduler's functions
      (common kernel code) from entry.S of ARC's code. When kernel's
      binary becomes large it may lead to the linkage error because
      scheduler may occur far enough from ARC's code in the final
      binary.
      Signed-off-by: NYuriy Kolerov <yuriy.kolerov@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      6de6066c
  4. 27 2月, 2015 1 次提交
  5. 27 9月, 2013 1 次提交
  6. 05 9月, 2013 1 次提交
  7. 26 6月, 2013 1 次提交
  8. 16 2月, 2013 1 次提交
    • V
      ARC: Unaligned access emulation · 2e651ea1
      Vineet Gupta 提交于
      ARC700 doesn't natively support unaligned access, but can be emulated
      -Unaligned Access Exception
      -Disassembly at the Fault address to find the exact insn (long/short)
      
      Also per Arnd's comment, we runtime control it using 2 sysctl knobs:
      * SYSCTL_ARCH_UNALIGN_ALLOW: Runtime enable/disble
      * SYSCTL_ARCH_UNALIGN_NO_WARN: Warn on each emulation attempt
      
      Originally contributed by Tim Yao <tim.yao@amlogic.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Tim Yao <tim.yao@amlogic.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      2e651ea1