1. 04 8月, 2009 6 次提交
  2. 29 7月, 2009 5 次提交
    • P
      sh: Add romImage target to archhelp. · fdeb076f
      Paul Mundt 提交于
      Adds an archhelp blurb for the romImage target so it is reflected in
      'make help'.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      fdeb076f
    • M
      sh: kfr2r09 romImage support V2 · d162300e
      Magnus Damm 提交于
      This patch is romImage support for the kfr2r09 board V2.
      
      The partner-jet-setup.txt file is converted into assembly code
      which becomes the first code to execute from the reset vector.
      
      The file partner-jet-setup.txt can also be used to setup
      the hardware using a JTAG debugger so booting from RAM can
      be done without burning the code to flash.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d162300e
    • M
      sh: romImage support V2 · 3c928320
      Magnus Damm 提交于
      This patch contains support for the romImage build target V2.
      
      The resulting romImage file should be burned to rom
      or flash and could be used as small boot loader.
      
      Board code should keep their setup code in the file
      romimage.h located in their mach include directory.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      3c928320
    • S
      sh: Rework irqflags tracing to fix up CONFIG_PROVE_LOCKING. · fd78a76a
      Stuart Menefy 提交于
      This cleans up the irqflags tracing code quite a bit and ties it
      in to various missing callsites that caused an imbalance when
      CONFIG_PROVE_LOCKING was enabled.
      
      Previously this was catching on:
      
       987 #ifdef CONFIG_PROVE_LOCKING
       988     DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
       989     DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
       990 #endif
       991     retval = -EAGAIN;
      
      with hardirqs being doubly enabled, and subsequently bailing out
      with the following call trace:
      
      	Call trace:
      	[<88035224>] __lock_acquire+0x616/0x6a6
      	[<88015a8c>] do_fork+0xf8/0x2b0
      	[<880331ec>] trace_hardirqs_on_caller+0xd4/0x114
      	[<88241074>] _spin_unlock_irq+0x20/0x64
      	[<88035224>] __lock_acquire+0x616/0x6a6
      	[<8800386c>] kernel_thread+0x48/0x70
      	[<88024ecc>] ____call_usermodehelper+0x0/0x110
      	[<88024ecc>] ____call_usermodehelper+0x0/0x110
      	[<88003894>] kernel_thread_helper+0x0/0x14
      	[<88024bac>] __call_usermodehelper+0x38/0x70
      	[<88025dc0>] worker_thread+0x150/0x274
      	[<88035b9c>] lock_release+0x0/0x198
      	[<88024b74>] __call_usermodehelper+0x0/0x70
      	[<88028cf0>] autoremove_wake_function+0x0/0x30
      	[<88028bf2>] kthread+0x3e/0x70
      	[<88025c70>] worker_thread+0x0/0x274
      	[<8800389c>] kernel_thread_helper+0x8/0x14
      	[<88028bb4>] kthread+0x0/0x70
      	[<88003894>] kernel_thread_helper+0x0/0x14
      Reported-by: NNobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      fd78a76a
    • P
      Revert "sh: Bump the earlytimer bits back to time_init()." · 82b24221
      Paul Mundt 提交于
      This reverts commit 1d29ebeb.
      
      Bumping up the earlytimer initialization causes IRQs to be enabled too
      early, which blows up lockdep:
      
      ...
      NR_IRQS:256 nr_irqs:256
      ------------[ cut here ]------------
      Badness at kernel/lockdep.c:2128
      
      Pid : 0, Comm:          swapper
      CPU : 0                 Not tainted  (2.6.31-rc3-00205-g3ed6e129-dirty #2443)
      
      PC is at trace_hardirqs_on_caller+0x48/0x10c
      PR is at trace_hardirqs_on_caller+0x3c/0x10c
      ...
      
      Revert it back to late_time_init time, which fixes up lockdep.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      82b24221
  3. 23 7月, 2009 6 次提交
  4. 22 7月, 2009 1 次提交
  5. 21 7月, 2009 1 次提交
  6. 20 7月, 2009 4 次提交
  7. 14 7月, 2009 2 次提交
  8. 13 7月, 2009 1 次提交
  9. 12 7月, 2009 5 次提交
  10. 11 7月, 2009 9 次提交
    • P
      sh: Fix up stack overflow check with ftrace disabled. · e460ab27
      Paul Mundt 提交于
      Presently the STACK_CHECK() code is called in to multiple times, although
      it's only necessary from the mcount entry. The code still attempts to
      treat the nop case as an ftrace path resulting in superfluous code flow
      for the case where ftrace is disabled. And finally, this also fixes up
      references to a few undefined symbols when FUNCTION_TRACER=n.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      e460ab27
    • P
      sh: Fix up ftrace build error when STACK_DEBUG=n. · a470b95e
      Paul Mundt 提交于
      Presently the closest reference to function_trace_stop is within a
      CONFIG_STACK_DEBUG block. When this is turned off, the build bails out
      with a pcrel too far error. Reorder things a bit to handle the various
      combinations.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      a470b95e
    • P
      sh: Use DECLARE_EXPORT() for mcount symbol export. · fe279320
      Paul Mundt 提交于
      The function prototype for mcount is not defined if we are not building
      with ftrace support enabled, so use DECLARE_EXPORT() to stub one in.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      fe279320
    • P
      sh: Replace DEBUG_STACKOVERFLOW with STACK_DEBUG. · 9f14b84a
      Paul Mundt 提交于
      STACK_DEBUG ties in to mcount in order to do function-granular stack
      overflow checks as opposed to lazily checking from IRQ context. As the
      default is nohz, the frequency of overflow checking is too irregular to
      catch much useful information, and so the mcount approach employed by
      sparc64 is adopted instead.
      
      This kills off the old check entirely from the do_IRQ() path and now
      adopts CONFIG_MCOUNT instead.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      9f14b84a
    • P
      sh: Decouple mcount from ftrace. · 473d1cf4
      Paul Mundt 提交于
      This adds a general CONFIG_MCOUNT in order to permit mcount generation
      without ftrace support. This is primarily for allowing platforms to
      enable aggressive stack overflow checking without having to enable ftrace
      support. Based on the sparc64 implementation.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      473d1cf4
    • M
      sh: Mark __switch_to() as __notrace_funcgraph · 7816fecd
      Matt Fleming 提交于
      Annotate __switch_to() so that the function graph tracer does not try to
      trace it. Use __notrace_funcgraph, as opposed to notrace, so that other
      tracers can continue to trace __switch_to().
      
      The reason that we don't want to trace __switch_to() with the function
      graph tracer is because of how the return address stack in task_struct
      is implemented. When we enter __switch_to we store the real return
      address on prev's ret_stack. When we return from __switch_to() we've
      patched the return address on the kernel stack to be
      return_to_handler. Calling return_to_handler we do,
      
             -> ftrace_return_to_handler()
             	  -> ftrace_pop_return_ftrace()
      
      Which tries to pop the real return address from current->ret_stack. The
      problem being that we stored the return address on prev->ret_stack, but
      current now points to next, and next->ret_stack doesn't contain the
      correct return address (and is possibly even empty).
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      7816fecd
    • M
      sh: Function graph tracer support · 327933f5
      Matt Fleming 提交于
      Add both dynamic and static function graph tracer support for sh.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      327933f5
    • M
      sh: Provide diagnostic kernel stack checks · b99610fb
      Matt Fleming 提交于
      Enable kernel stack checking code in both the dynamic ftrace and mcount
      code paths. Check the stack to see if it's overflowing and make sure
      that the stack pointer contains an address that's either in init_stack
      or after the bss.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      b99610fb
    • P
      sched: INIT_PREEMPT_COUNT · c99e6efe
      Peter Zijlstra 提交于
      Pull the initial preempt_count value into a single
      definition site.
      
      Maintainers for: alpha, ia64 and m68k, please have a look,
      your arch code is funny.
      
      The header magic is a bit odd, but similar to the KERNEL_DS
      one, CPP waits with expanding these macros until the
      INIT_THREAD_INFO macro itself is expanded, which is in
      arch/*/kernel/init_task.c where we've already included
      sched.h so we're good.
      
      Cc: tony.luck@intel.com
      Cc: rth@twiddle.net
      Cc: geert@linux-m68k.org
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NMatt Mackall <mpm@selenic.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c99e6efe