1. 12 3月, 2016 2 次提交
    • V
      ARC: build: Better way to detect ISA compatible toolchain · 20d78037
      Vineet Gupta 提交于
      ARC architecture has 2 instruction sets: ARCompact/ARCv2.
      While same gcc supports compiling for either (using appropriate toggles),
      we can't use the same toolchain to build kernel because libgcc needs
      to be unique and the toolchian (uClibc based) is not multilibed.
      
      uClibc toolchain is convenient since it allows all userspace and
      kernel to be built with a single install for an ISA.
      
      This however means 2 gnu installs (with same triplet prefix) are needed
      for building for 2 ISA and need to be in PATH.
      As developers we keep switching the builds, but would occassionally fail
      to update the PATH leading to usage of wrong tools. And this would only
      show up at the end of kernel build when linking incompatible libgcc.
      
      So the initial solution was to have gcc define a special preprocessor macro
      DEFAULT_CPU_xxx which is unique for default toolchain configuration.
      Claudiu proposed using grep for an existing preprocessor macro which is
      again uniquely defined per ISA.
      
      Cc: Michal Marek <mmarek@suse.cz>
      Suggested-by: NClaudiu Zissulescu <claziss@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      20d78037
    • L
      ARC: [BE] readl()/writel() to work in Big Endian CPU configuration · f778cc65
      Lada Trimasova 提交于
      read{l,w}() write{l,w}() primitives should use le{16,32}_to_cpu() and
      cpu_to_le{16,32}() respectively to ensure device registers are read
      correctly in Big Endian CPU configuration.
      
      Per Arnd Bergmann
      | Most drivers using readl() or readl_relaxed() expect those to perform byte
      | swaps on big-endian architectures, as the registers tend to be fixed endian
      
      This was needed for getting UART to work correctly on a Big Endian ARC.
      
      The ARC accessors originally were fine, and the bug got introduced
      inadventently by commit b8a03302 ("ARCv2: barriers")
      
      Fixes: b8a03302 ("ARCv2: barriers")
      Link: http://lkml.kernel.org/r/201603100845.30602.arnd@arndb.de
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: stable@vger.kernel.org  [4.2+]
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLada Trimasova <ltrimas@synopsys.com>
      [vgupta: beefed up changelog, added Fixes/stable tags]
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      f778cc65
  2. 11 3月, 2016 2 次提交
  3. 24 2月, 2016 3 次提交
    • V
      ARCv2: SMP: Push IPI_IRQ into IPI provider · 96817879
      Vineet Gupta 提交于
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      96817879
    • V
      ARC: [intc-compact] Remove IPI setup from ARCompact port · dbcbc7e7
      Vineet Gupta 提交于
      There is no real ARC700 based SMP SoC so remove IPI definition.
      EZChip's SMP ARC700 is going to use a different intc and IPI provider
      anyways.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      dbcbc7e7
    • V
      ARCv2: SMP: Emulate IPI to self using software triggered interrupt · bb143f81
      Vineet Gupta 提交于
      ARConnect/MCIP Inter-Core-Interrupt module can't send interrupt to
      local core. So use core intc capability to trigger software
      interrupt to self, using an unsued IRQ #21.
      
      This showed up as csd deadlock with LTP trace_sched on a dual core
      system. This test acts as scheduler fuzzer, triggering all sorts of
      schedulting activity. Trouble starts with IPI to self, which doesn't get
      delivered (effectively lost due to H/w capability), but the msg intended
      to be sent remain enqueued in per-cpu @ipi_data.
      
      All subsequent IPIs to this core from other cores get elided due to the
      IPI coalescing optimization in ipi_send_msg_one() where a pending msg
      implies an IPI already sent and assumes other core is yet to ack it.
      After the elided IPI, other core simply goes into csd_lock_wait()
      but never comes out as this core never sees the interrupt.
      
      Fixes STAR 9001008624
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: <stable@vger.kernel.org>        [4.2]
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      bb143f81
  4. 18 2月, 2016 1 次提交
  5. 12 2月, 2016 1 次提交
    • V
      ARC: mm: Introduce explicit super page size support · 37eda9df
      Vineet Gupta 提交于
      MMUv4 supports 2 concurrent page sizes: Normal and Super [4K to 16M]
      
      So far Linux supported a single super page size for a given Normal page,
      depending on the software page walking address split.
      e.g. we had 11:8:13 address split for 8K page, which meant super page
      was 2 ^(8+13) = 2M (given that THP size has to be PMD_SHIFT)
      
      Now we turn this around, by allowing multiple Super Pages in Kconfig
      (currently 2M and 16M only) and forcing page walker address split to
      PGDIR_SHIFT and PAGE_SHIFT
      
      For configs without Super page, things are same as before and
      PGDIR_SHIFT can be hacked to get non default address split
      
      The motivation for this change is a customer who needs 16M super page
      and a 8K Normal page combo.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      37eda9df
  6. 10 2月, 2016 1 次提交
    • V
      ARCv2: intc: Allow interruption by lowest priority interrupt · dec2b284
      Vineet Gupta 提交于
      ARC HS Cores support configurable multiple interrupt priorities of upto
      16 levels.
      
      There is processor "interrupt preemption threshhold" in STATUS32.E[4:1]
      And several places need to set this up:
      1. seed value as kernel is booting
      2. seed value for user space programs
      3. Arg to SLEEP instruction in idle task (what interrupt prio can wake)
      4. Per-IRQ line prioirty (i.e. what is the priority of interrupt
         raised by a peripheral or timer or perf counter...
      
      Currently above sites use the highest priority 0. This can be potential
      problem when multiple priorities are supported. e.g. user space could
      only be interrupted by P0 interrupt, not others...
      So turn this over and instead make default interruption level to be
      the lowest priority possible 15. This should be fine even if there are
      fewer priority levels configured (say two: P0 HIGH, P1 LOW)
      
      This feature also effectively disables FIRQ feature if present in
      hardware config. With old code, a P0 interrupt would be FIRQ, needing
      special handling (ISR or Register Banks) which is NOT supported yet.
      Now it not be P0 (P15 or whatever is lowest prio) so FIRQ is not
      triggered.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      dec2b284
  7. 29 1月, 2016 2 次提交
  8. 21 1月, 2016 2 次提交
  9. 21 12月, 2015 1 次提交
    • A
      ARC: mm: fix building for MMU v2 · 4b32e89a
      Alexey Brodkin 提交于
      ARC700 cores with MMU v2 don't have IC_PTAG AUX register and so we only
      define ARC_REG_IC_PTAG for MMU versions >= 3.
      
      But current implementation of cache_line_loop_vX() routines assumes
      availability of all of them (v2, v3 and v4) simultaneously.
      
      And given undefined ARC_REG_IC_PTAG if CONFIG_MMU_VER=2 we're seeing
      compilation problem:
      ---------------------------------->8-------------------------------
        CC      arch/arc/mm/cache.o
      arch/arc/mm/cache.c: In function '__cache_line_loop_v3':
      arch/arc/mm/cache.c:270:13: error: 'ARC_REG_IC_PTAG' undeclared (first use in this function)
         aux_tag = ARC_REG_IC_PTAG;
                   ^
      arch/arc/mm/cache.c:270:13: note: each undeclared identifier is reported only once for each function it appears in
      scripts/Makefile.build:258: recipe for target 'arch/arc/mm/cache.o' failed
      ---------------------------------->8-------------------------------
      
      The simples fix is to have ARC_REG_IC_PTAG defined regardless MMU
      version being used.
      
      We don't use it in cache_line_loop_v2() anyways so who cares.
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      4b32e89a
  10. 17 12月, 2015 3 次提交
  11. 16 11月, 2015 2 次提交
  12. 14 11月, 2015 1 次提交
  13. 29 10月, 2015 1 次提交
  14. 28 10月, 2015 11 次提交
  15. 17 10月, 2015 7 次提交