1. 09 4月, 2013 3 次提交
    • S
      ARC: Use <linux/*> headers instead of <asm/*> · 1ec9db10
      Sachin Kamat 提交于
      Silences the following checkpatch warnings:
      WARNING: Use #include <linux/ptrace.h> instead of <asm/ptrace.h>
      WARNING: Use #include <linux/kprobes.h> instead of <asm/kprobes.h>
      WARNING: Use #include <linux/kgdb.h> instead of <asm/kgdb.h>
      WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
      WARNING: Use #include <linux/cache.h> instead of <asm/cache.h>
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      1ec9db10
    • S
      ARC: Remove unneeded version.h header include · 39d0c30d
      Sachin Kamat 提交于
      version.h header file inclusion is not necessary as detected by
      versioncheck script.
      Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      39d0c30d
    • C
      ARC: Add implicit compiler barrier to raw_local_irq* functions · 79e5f05e
      Christian Ruppert 提交于
      ARC irqsave/restore macros were missing the compiler barrier, causing a
      stale load in irq-enabled region be used in irq-safe region, despite
      being changed, because the register holding the value was still live.
      
      The problem manifested as random crashes in timer code when stress
      testing ARCLinux (3.9-rc3) on a !SMP && !PREEMPT_COUNT
      
      Here's the exact sequence which caused this:
       (0). tv1[x] <----> t1 <---> t2
       (1). mod_timer(t1) interrupted after it calls timer_pending()
       (2). mod_timer(t2) completes
       (3). mod_timer(t1) resumes but messes up the list
       (4). __runt_timers( ) uses bogus timer_list entry / crashes in
            timer->function
      
      Essentially mod_timer() was racing against itself and while the spinlock
      serialized the tv1[] timer link list, timer_pending() called outside the
      spinlock, cached timer link list element in a register.
      With low register pressure (and a deep register file), lack of barrier
      in raw_local_irqsave() as well as preempt_disable (!PREEMPT_COUNT
      version), there was nothing to force gcc to reload across the spinlock,
      causing a stale value in reg be used for link list manipulation - ensuing
      a corruption.
      
      ARcompact disassembly which shows the culprit generated code:
      
      mod_timer:
          push_s blink
          mov_s r13,r0	# timer, timer
      ..
          ###### timer_pending( )
          ld_s r3,[r13]       # <------ <variable>.entry.next LOADED
          brne r3, 0, @.L163
      
      .L163:
      ..
          ###### spin_lock_irq( )
          lr  r5, [status32]  # flags
          bic r4, r5, 6       # temp, flags,
          and.f 0, r5, 6      # flags,
          flag.nz r4
      
          ###### detach_if_pending( ) begins
      
          tst_s r3,r3  <--------------
      			# timer_pending( ) checks timer->entry.next
                              # r3 is NOT reloaded by gcc, using stale value
          beq.d @.L169
          mov.eq r0,0
      
          #####  detach_timer( ): __list_del( )
      
          ld r4,[r13,4]    	# <variable>.entry.prev, D.31439
          st r4,[r3,4]     	# <variable>.prev, D.31439
          st r3,[r4]       	# <variable>.next, D.30246
      
      We initially tried to fix this by adding barrier() to preempt_* macros
      for !PREEMPT_COUNT but Linus clarified that it was anything but wrong.
      http://www.spinics.net/lists/kernel/msg1512709.html
      
      [vgupta: updated commitlog]
      
      Reported-by/Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
      Cc: Christian Ruppert <christian.ruppert@abilis.com>
      Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
      Debugged-by/Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      79e5f05e
  2. 20 3月, 2013 1 次提交
    • V
      ARC: Fix the typo in event identifier flags used by ptrace · 367f3fcd
      Vineet Gupta 提交于
      orig_r8_IS_EXCPN and orig_r8_IS_BRKPT were same values due to a
      copy/paste error. Although it looks bad and is wrong, it really doesn't
      affect gdb working.
      
      orig_r8_IS_BRKPT is the one relevant to debugging (breakpoints), since
      it is used to provide EFA vs. ERET to a ptrace "stop_pc" request.
      
      So when gdb has inserted a breakpoint, orig_r8_IS_BRKPT is already set,
      and anything else (i.e. orig_r8_IS_EXCPN) becoming same as it, really
      doesn't hurt gdb. The corollary case, could be nasty but nobody uses the
      ptrace "stop_pc" request in that case
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      367f3fcd
  3. 19 3月, 2013 1 次提交
  4. 18 3月, 2013 1 次提交
  5. 11 3月, 2013 3 次提交
    • V
      ARC: ABIv3: fork/vfork wrappers not needed in "no-legacy-syscall" ABI · 180d406e
      Vineet Gupta 提交于
      When switching to clone() only ABI - I missed out pruning the low level
      asm syscall wrappers
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      180d406e
    • V
      ARC: ABIv3: Print the correct ABI ver · 8ff14bbc
      Vineet Gupta 提交于
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      8ff14bbc
    • V
      ARC: make allyesconfig build breakages · 1540c85b
      Vineet Gupta 提交于
        CC      drivers/mmc/host/mmc_spi.o
      drivers/mmc/host/mmc_spi.c:118: error: redefinition of 'struct scratch'
      make[3]: *** [drivers/mmc/host/mmc_spi.o] Error 1
      make[2]: *** [drivers/mmc/host] Error 2
      make[1]: *** [drivers/mmc] Error 2
      make: *** [drivers] Error 2
      
        CC      arch/arc/kernel/kgdb.o
      In file included from include/linux/kgdb.h:20,
                       from arch/arc/kernel/kgdb.c:11:
      /home/vineetg/arc/k.org/arc-port/arch/arc/include/asm/kgdb.h:34:
      warning: 'struct pt_regs' declared inside parameter list
      /home/vineetg/arc/k.org/arc-port/arch/arc/include/asm/kgdb.h:34:
      warning: its scope is only this definition or declaration, which is
      probably not what you want
      arch/arc/kernel/kgdb.c:172: error: conflicting types for 'kgdb_trap'
      
        CC      arch/arc/kernel/kgdb.o
      arch/arc/kernel/kgdb.c: In function 'pt_regs_to_gdb_regs':
      arch/arc/kernel/kgdb.c:62: error: dereferencing pointer to incomplete
      type
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      1540c85b
  6. 27 2月, 2013 3 次提交
  7. 26 2月, 2013 2 次提交
  8. 16 2月, 2013 26 次提交