1. 17 5月, 2010 4 次提交
    • M
      [S390] add breaking event address for user space · 86f2552b
      Martin Schwidefsky 提交于
      Copy the last breaking event address from the lowcore to a new
      field in the thread_struct on each system entry. Add a new
      ptrace request PTRACE_GET_LAST_BREAK and a new utrace regset
      REGSET_LAST_BREAK to query the last breaking event.
      
      This is useful for debugging wild branches in user space code.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      86f2552b
    • M
      [S390] idle time accounting vs. machine checks · 6377981f
      Martin Schwidefsky 提交于
      A machine check can interrupt the i/o and external interrupt handler
      anytime. If the machine check occurs while the interrupt handler is
      waking up from idle vtime_start_cpu can get executed a second time
      and the int_clock / async_enter_timer values in the lowcore get
      clobbered. This can confuse the cpu time accounting.
      To fix this problem two changes are needed. First the machine check
      handler has to use its own copies of int_clock and async_enter_timer,
      named mcck_clock and mcck_enter_timer. Second the nested execution
      of vtime_start_cpu has to be prevented. This is done in s390_idle_check
      by checking the wait bit in the program status word.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6377981f
    • M
      [S390] improve irq tracing code in entry[64].S · 6a2df3a8
      Martin Schwidefsky 提交于
      The system call path in entry[64].S is run with interrupts enabled.
      Remove the irq tracing check from the system call exit code. If a
      program check interrupted a context enabled for interrupts do a
      call to trace_irq_off_caller in the program check handler before
      branching to the system call exit code.
      Restructure the system call and io interrupt return code to avoid
      avoid the lpsw[e] to disable machine checks.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6a2df3a8
    • M
      [S390] cleanup sysc_work and io_work code · 43d399d2
      Martin Schwidefsky 提交于
      Cleanup the #ifdef mess at io_work in entry[64].S and streamline the
      TIF work code of the system call and io exit path.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      43d399d2
  2. 09 4月, 2010 1 次提交
    • M
      [S390] fix io_return critical section cleanup · 176b1803
      Martin Schwidefsky 提交于
      If a machine check interrupts the io interrupt handler on one of the
      instructions between io_return and io_leave the critical section
      cleanup code will move the return psw to io_work_loop. By doing that
      the switch from the asynchronous interrupt stack to the process stack
      is skipped. If e.g. TIF_NEED_RESCHED is set things break because
      the scheduler is called with the asynchronous interrupts stack.
      Moving the psw back to io_return instead fixes the problem.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      176b1803
  3. 27 2月, 2010 1 次提交
  4. 27 1月, 2010 1 次提交
  5. 13 11月, 2009 1 次提交
    • C
      [S390] s390: fix single stepping on svc0 · bcc6525f
      Christian Borntraeger 提交于
      On s390 there are two ways of specifying the system call number for
      the svc instruction. The standard way is to use the immediate field
      in the instruction (or to use EXecute for values unknown during
      assemble time). This can encode 256 system calls.
      The kernel ABI also allows to put the system call number in r1 and
      then execute svc 0 to enable system call numbers > 255.
      
      It turns out that single stepping svc 0 is broken, since the PER
      program check handler uses r1. We have to use a different register.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      bcc6525f
  6. 11 9月, 2009 1 次提交
  7. 26 8月, 2009 1 次提交
    • J
      tracing: Rename FTRACE_SYSCALLS for tracepoints · 66700001
      Josh Stone 提交于
      s/HAVE_FTRACE_SYSCALLS/HAVE_SYSCALL_TRACEPOINTS/g
      s/TIF_SYSCALL_FTRACE/TIF_SYSCALL_TRACEPOINT/g
      
      The syscall enter/exit tracing is no longer specific to just ftrace, so
      they now have names that reflect their tie to tracepoints instead.
      Signed-off-by: NJosh Stone <jistone@redhat.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Jiaying Zhang <jiayingz@google.com>
      Cc: Martin Bligh <mbligh@google.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      LKML-Reference: <1251150194-1713-2-git-send-email-jistone@redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      66700001
  8. 12 6月, 2009 2 次提交
  9. 14 4月, 2009 1 次提交
  10. 31 12月, 2008 1 次提交
  11. 25 12月, 2008 2 次提交
    • M
      [S390] Remove config options. · c185b783
      Martin Schwidefsky 提交于
      On s390 we always want to run with precise cputime accounting.
      Remove the config options VIRT_TIMER and VIRT_CPU_ACCOUNTING.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      c185b783
    • A
      [S390] audit: get s390 ret_from_fork in sync with other architectures · 8f2961c3
      Al Viro 提交于
      	On s390 we have ret_from_fork jump not to the "do all work we
      normally do on return from syscall" as on x86, ppc, etc., but to the
      "do all such work except audit".  Historical reasons - the codepath
      triggered when we have AUDIT process flag set is separated from the
      normall one and they converge at sysc_return, which is the common
      part of post-syscall work.  And does not include calling audit_syscall_exit() -
      that's done in the end of sysc_tracesys path, just before that path jumps
      to sysc_return.
      
      	IOW, the child returning from fork()/clone()/vfork() doesn't
      call audit_syscall_exit() at all, so no matter what we do with its
      audit context, we are not going to see the audit entry.
      
      	The fix is simple: have ret_from_fork go to the point just past
      the call of sys_.... in the 'we have AUDIT flag set' path.  There we
      have (64bit variant; for 31bit the situation is the same):
      sysc_tracenogo:
              tm      __TI_flags+7(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
              jz      sysc_return
              la      %r2,SP_PTREGS(%r15)     # load pt_regs
              larl    %r14,sysc_return        # return point is sysc_return
              jg      do_syscall_trace_exit
      which is precisely what we need - check the flag, bugger off to sysc_return
      if not set, otherwise call do_syscall_trace_exit() and bugger off to
      sysc_return.  r9 has just been properly set by ret_from_fork itself,
      so we are fine.
      
      	Tested on s390x, seems to work fine.  WARNING: it's been about
      16 years since my last contact with 3X0 assembler[1], so additional
      review would be very welcome.  I don't think I've managed to screw it
      up, but...
      
      [1] that *was* in another country and besides, the box is dead...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8f2961c3
  12. 27 11月, 2008 1 次提交
    • M
      [S390] fix system call parameter functions. · 59da2139
      Martin Schwidefsky 提交于
      syscall_get_nr() currently returns a valid result only if the call
      chain of the traced process includes do_syscall_trace_enter(). But
      collect_syscall() can be called for any sleeping task, the result of
      syscall_get_nr() in general is completely bogus.
      
      To make syscall_get_nr() work for any sleeping task the traps field
      in pt_regs is replace with svcnr - the system call number the process
      is executing. If svcnr == 0 the process is not on a system call path.
      
      The syscall_get_arguments and syscall_set_arguments use regs->gprs[2]
      for the first system call parameter. This is incorrect since gprs[2]
      may have been overwritten with the system call number if the call
      chain includes do_syscall_trace_enter. Use regs->orig_gprs2 instead.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      59da2139
  13. 15 11月, 2008 2 次提交
  14. 11 10月, 2008 1 次提交
  15. 07 5月, 2008 1 次提交
    • M
      [S390] s390: Optimize user and work TIF check · 2688905e
      Martin Schwidefsky 提交于
      On return from syscall or interrupt, we have to check if we return to
      userspace (likely) and if there is work todo (less likely) to decide
      if we handle the work. We can optimize this check: we first check for
      the less likely work case and then check for userspace.
      
      This patch is also a preparation for an additional patch, that fixes a bug
      in KVM dealing with cpu bound guests.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      2688905e
  16. 30 4月, 2008 1 次提交
  17. 05 2月, 2008 1 次提交
  18. 04 12月, 2007 1 次提交
  19. 20 11月, 2007 2 次提交
  20. 12 10月, 2007 1 次提交
  21. 27 7月, 2007 1 次提交
    • H
      [S390] Fix IRQ tracing. · b771aeac
      Heiko Carstens 提交于
      If a machine check is pending and the external or I/O interrupt handler
      returns to userspace io_mcck_pending is going to call s390_handle_mcck.
      Before this happens a call to TRACE_IRQS_ON was already made since we
      know that we are going back to userspace and hence interrupts will be
      enabled. So there was an indication that interrupts are enabled while
      in reality they are still disabled.
      s390_handle_mcck will do a local_irq_save/restore pair and confuse
      lockdep which later complains about inconsistent irq tracing.
      To solve this just call trace_hardirqs_off before calling
      s390_handle_mcck and trace_hardirqs_on afterwards.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b771aeac
  22. 10 7月, 2007 1 次提交
  23. 19 6月, 2007 1 次提交
  24. 27 4月, 2007 1 次提交
  25. 28 9月, 2006 1 次提交
  26. 20 9月, 2006 1 次提交
  27. 04 7月, 2006 1 次提交
  28. 02 7月, 2006 1 次提交
  29. 01 7月, 2006 1 次提交
  30. 29 6月, 2006 2 次提交
    • M
      [S390] remove export of sys_call_table · 8f27766a
      Martin Schwidefsky 提交于
      Remove export of the sys_call_table symbol to prevent the misuse of it.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8f27766a
    • M
      [S390] virtual cpu accounting vs. machine checks. · 63b12246
      Martin Schwidefsky 提交于
      If a machine checks interrupts the external or the i/o interrupt
      handler before they have completed the cpu time calculations, the
      accounting goes wrong. After the cpu returned from the machine check
      handler to the interrupted interrupt handler, a negative cpu time delta
      can occur.  If the accumulated cpu time in lowcore is small enough
      this value can get negative as well. The next jiffy interrupt will pick
      up that negative value, shift it by 12 and add the now huge positive
      value to the cpu time of the process.
      To solve this the machine check handler is modified not to change any
      of the timestamps in the lowcore if the machine check interrupted kernel
      context.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      63b12246
  31. 02 2月, 2006 1 次提交
  32. 07 11月, 2005 1 次提交