1. 21 8月, 2009 2 次提交
    • M
      sh: unwinder: Set the flags for DW_CFA_val_offset ops as DWARF_VAL_OFFSET · 97efbbd5
      Matt Fleming 提交于
      The handling of DW_CFA_val_offset ops was incorrectly using the
      DWARF_REG_OFFSET flag but the register's value cannot be calculated
      using the DWARF_REG_OFFSET method. Create a new flag to indicate that a
      different method must be used to calculate the register's value even
      though there is no implementation for DWARF_VAL_OFFSET yet; it's mainly
      just a place holder.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      97efbbd5
    • M
      sh: unwinder: Fix memory leak and create our own kmem cache · fb3f3e7f
      Matt Fleming 提交于
      Plug a memory leak in dwarf_unwinder_dump() where we didn't free the
      memory that we had previously allocated for the DWARF frames and DWARF
      registers.
      
      Now is also a opportune time to implement our own mempool and kmem
      cache. It's a good idea to have a certain number of frame and register
      objects in reserve at all times, so that we are guaranteed to have our
      allocation satisfied even when memory is scarce. Since we have pools to
      allocate from we can implement the registers for each frame as a linked
      list as opposed to a sparsely populated array. Whilst it's true that the
      lookup time for a linked list is larger than for arrays, there's only
      usually a maximum of 8 registers per frame. So the overhead isn't that
      much of a concern.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      fb3f3e7f
  2. 17 8月, 2009 1 次提交
  3. 16 8月, 2009 3 次提交
    • M
      sh: Add support for DWARF GNU extensions · cd7246f0
      Matt Fleming 提交于
      Also, remove the "fix" to DW_CFA_def_cfa_register where we reset the
      frame's cfa_offset to 0. This action is incorrect when handling
      DW_CFA_def_cfa_register as the DWARF spec specifically states that the
      previous contents of cfa_offset should be used with the new
      register. The reason that I thought cfa_offset should be reset to 0 was
      because it was being assigned a bogus value prior to executing the
      DW_CFA_def_cfa_register op. It turns out that the bogus cfa_offset value
      came from interpreting .cfi_escape pseudo-ops (those used by the GNU
      extensions) as CFA_DW_def_cfa ops.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      cd7246f0
    • M
      sh: Try again at getting the initial return address for an unwind · b955873b
      Matt Fleming 提交于
      The previous hack for calculating the return address for the first frame
      we unwind (dwarf_unwinder_dump) didn't always work. The problem was that
      it assumed once it read the rule for calculating the return address,
      there would be no new rules for calculating it. This isn't true because
      the way in which the CFA is calculated can change as you progress
      through a function and the return address is figured out using the
      CFA. Therefore, the way to calculate the return address can change.
      
      So, instead of using some offset from the beginning of
      dwarf_unwind_stack which is just a flakey approach, and instead of
      executing instructions from the FDE until the return address is setup,
      we now figure out the pc in dwarf_unwind_stack() just before we call
      dwarf_cfa_execute_insns().
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      b955873b
    • P
      sh: Merge the _32/_64 variants of arch/sh/kernel/Makefile. · 38f9ddf4
      Paul Mundt 提交于
      This uses the BITS export as per x86 in order to allow the same Makefile
      to be used.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      38f9ddf4
  4. 15 8月, 2009 7 次提交
  5. 14 8月, 2009 7 次提交
  6. 13 8月, 2009 4 次提交
  7. 04 8月, 2009 4 次提交
  8. 29 7月, 2009 2 次提交
    • 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
  9. 23 7月, 2009 2 次提交
    • M
      sh: convert processor device setup functions to arch_initcall() · 955c9863
      Magnus Damm 提交于
      Convert the processor platform device setup
      functions from __initcall() and sometimes
      device_initcall() to arch_initcall().
      
      This makes sure that the platform devices are
      registered a bit earlier so the devices are
      available when drivers register using initcall
      levels earlier than device_initcall().
      
      A good example is platform devices needed by
      i2c-sh_mobile.c which registers a bit earlier
      using subsys_initcall().
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      955c9863
    • M
      usb: m66592-udc platform data on_chip support · 2c59b0b7
      Magnus Damm 提交于
      Convert the m66592-udc driver to use the on_chip flag
      from platform data to enable on chip behaviour instead
      of relying on CONFIG_SUPERH_BUILT_IN_M66592 ugliness.
      
      This makes the code cleaner and also allows us to support
      both external and internal m66592 with the same kernel.
      
      It also makes the Kconfig part more future proof since
      we with this patch can add support for new processors
      with on-chip m66592 without modifying the Kconfig.
      
      The patch adds a m66592 header file for platform data
      and ties in platform data to the existing m66592 devices.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2c59b0b7
  10. 20 7月, 2009 4 次提交
  11. 14 7月, 2009 1 次提交
  12. 11 7月, 2009 3 次提交
    • 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