1. 05 Jun, 2014 2 commits
  2. 02 Jun, 2014 8 commits
  3. 01 Jun, 2014 3 commits
  4. 30 May, 2014 4 commits
    • Lin Yongting's avatar
      ARM: 8049/1: ftrace/add save_stack_trace_regs() implementation · 9c986661
      Lin Yongting authored
      When configure kprobe events of ftrace with "stacktrace" option enabled
      in arm, there is no stacktrace was recorded after the kprobe event was
      triggered. The root cause is no save_stack_trace_regs() function implemented.
      
      Implement the save_stack_trace_regs() function in arm, then ftrace will
      call this architecture-related function to record the stacktrace into
      ring buffer.
      
      After this fix, stacktrace can be recorded, for example:
      
       # mount -t debugfs nodev /sys/kernel/debug
       # echo "p:netrx net_rx_action" >> /sys/kernel/debug/tracing/kprobe_events
       # echo 1 > /sys/kernel/debug/tracing/events/kprobes/netrx/enable
       # echo 1 > /sys/kernel/debug/tracing/options/stacktrace
       # echo 1 > /sys/kernel/debug/tracing/tracing_on
       # ping 127.0.0.1 -c 1
       # echo 0 > /sys/kernel/debug/tracing/tracing_on
      
       # cat /sys/kernel/debug/tracing/trace
       # tracer: nop
       #
       # entries-in-buffer/entries-written: 12/12   #P:1
       #
       #                              _-----=> irqs-off
       #                             / _----=> need-resched
       #                            | / _---=> hardirq/softirq
       #                            || / _--=> preempt-depth
       #                            ||| /     delay
       #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
       #              | |       |   ||||       |         |
                   <------ missing some entries ---------------->
                   ping-1200  [000] dNs1   667.603250: netrx: (net_rx_action+0x0/0x1f8)
                   ping-1200  [000] dNs1   667.604738: <stack trace>
        => net_rx_action
        => do_softirq
        => local_bh_enable
        => ip_finish_output
        => ip_output
        => ip_local_out
        => ip_send_skb
        => ip_push_pending_frames
        => raw_sendmsg
        => inet_sendmsg
        => sock_sendmsg
        => SyS_sendto
        => ret_fast_syscall
      Signed-off-by: default avatarLin Yongting <linyongting@gmail.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      9c986661
    • Paul Bolle's avatar
      ARM: 8065/1: remove last use of CONFIG_CPU_ARM710 · 2961b4bf
      Paul Bolle authored
      Support for ARM710 CPUs was removed in v3.5. Now remove the last code
      depending on its Kconfig macro.
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      2961b4bf
    • Arun K S's avatar
      ARM: 8062/1: Modify ldrt fixup handler to re-execute the userspace instruction · 3780f7ab
      Arun K S authored
      We will reach fixup handler when one thread(say cpu0) caused an undefined exception, while another thread(say cpu1) is unmmaping the page.
      
      Fixup handler returns to the next userspace instruction which has caused the undef execption, rather than going to the same instruction.
      
      ARM ARM says that after undefined exception, the PC will be pointing
      to the next instruction. ie +4 offset in case of ARM and +2 in case of Thumb
      
      And there is no correction offset passed to vector_stub in case of
      undef exception.
      
      File: arch/arm/kernel/entry-armv.S +1085
      vector_stub     und, UND_MODE
      
      During an undefined exception, in normal scenario(ie when ldrt
      instruction does not cause an abort) after resorting the context in
      VFP hardware, the PC is modified as show below before jumping to
      ret_from_exception which is in r9.
      
      File: arch/arm/vfp/vfphw.S +169
      @ The context stored in the VFP hardware is up to date with this thread
      vfp_hw_state_valid:
         tst     r1, #FPEXC_EX
         bne     process_exception     @ might as well handle the pending
                                       @ exception before retrying branch
                                       @ out before setting an FPEXC that
                                       @ stops us reading stuff
              VFPFMXR FPEXC, r1        @ Restore FPEXC last
              sub     r2, r2, #4       @ Retry current instruction - if Thumb
              str     r2, [sp, #S_PC]  @ mode it's two 16-bit instructions,
                                       @ else it's one 32-bit instruction, so
                                       @ always subtract 4 from the following
                                       @ instruction address.
      
      But if ldrt results in an abort, we reach the fixup handler and return
      to ret_from_execption without correcting the pc.
      
      This patch modifes the fixup handler to re-execute the same instruction which caused undefined execption.
      Signed-off-by: default avatarVinayak Menon <vinayakm.list@gmail.com>
      Signed-off-by: default avatarArun KS <getarunks@gmail.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      3780f7ab
    • Will Deacon's avatar
      ARM: 8047/1: rwsem: use asm-generic rwsem implementation · 8a87411b
      Will Deacon authored
      asm-generic offers an atomic-add based rwsem implementation, which
      can avoid the need for heavier, spinlock-based synchronisation on the
      fast path.
      
      This patch makes use of the optimised implementation for ARM CPUs.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      8a87411b
  5. 29 May, 2014 23 commits