1. 18 9月, 2012 1 次提交
  2. 10 1月, 2012 1 次提交
    • P
      sh: Ensure IRQs are enabled across do_notify_resume(). · 6330c04b
      Paul Mundt 提交于
      do_notify_resume() can trigger the freezer via the try_to_freeze() path
      (both explicitly through a redundant call in do_signal() or via
      get_signal_to_deliver()). That IRQs were disabled across this callsite
      became apparent with the might_sleep() introduction in try_to_freeze() by
      Tejun in a0acae0e, resulting in:
      
      	BUG: sleeping function called from invalid context at include/linux/freezer.h:45
      	in_atomic(): 0, irqs_disabled(): 1, pid: 819, name: ntpd
      	no locks held by ntpd/819.
      	Stack: (0x9c81be80 to 0x9c81c000)
      	...
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      6330c04b
  3. 08 2月, 2010 1 次提交
  4. 14 10月, 2009 2 次提交
    • P
      sh: TS_RESTORE_SIGMASK conversion. · 56bfc42f
      Paul Mundt 提交于
      Replace TIF_RESTORE_SIGMASK with TS_RESTORE_SIGMASK and define our own
      set_restore_sigmask() function.  This saves the costly SMP-safe set_bit
      operation, which we do not need for the sigmask flag since TIF_SIGPENDING
      always has to be set too.
      
      Based on the x86 and powerpc change.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      56bfc42f
    • P
      sh: Fix a TRACE_IRQS_OFF typo. · 457b6461
      Paul Mundt 提交于
      The resume_userspace path had TRACE_IRQS_OFF written incorrectly and so
      never handled the transition properly. This was fixed once before but
      seems to have made it back in the tree. Fix it for good.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      457b6461
  5. 24 8月, 2009 1 次提交
    • S
      sh: Remove implicit sign extension from assembler immediates · fea966f7
      Stuart Menefy 提交于
      The SH instruction set has several instructions which accept an 8 bit
      immediate operand. For logical instructions this operand is zero extended,
      for arithmetic instructions the operand is sign extended. After adding an
      option to the assembler to check this, it was found that several pieces
      of assembly code were assuming this behaviour, and in one case
      getting it wrong.
      
      So this patch explicitly sign extends any immediate operands, which makes
      it obvious what is happening, and fixes the one case which got it wrong.
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      fea966f7
  6. 18 8月, 2009 1 次提交
    • M
      sh: Add a few missing irqflags tracing markers. · f3a83088
      Matt Fleming 提交于
      save_regs contains an SR modification without an irqflags annotation,
      which resulted in a missing TRACE_IRQS_OFF in the interrupt exception
      path on SH-3/SH4.
      
      I've also moved the TRACE_IRQS_OFF/ON annotation when returning from the
      interrupt to just before we call __restore_all. This seems like the most
      logical place to put this because the annotation is for when we restore
      the SR register so we should delay the annotation until as last as
      possible.
      
      We were also missing a TRACE_IRQS_OFF in resume_kernel when
      CONFIG_PREEMPT is enabled.
      
      The end result is that this fixes up the lockdep engine debugging support
      with CONFIG_PREEMPT enabled on all SH-3/4 parts.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      f3a83088
  7. 14 8月, 2009 2 次提交
  8. 29 7月, 2009 1 次提交
    • 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
  9. 06 7月, 2009 1 次提交
  10. 22 12月, 2008 2 次提交
  11. 31 10月, 2008 1 次提交
  12. 21 9月, 2008 1 次提交
  13. 05 9月, 2008 1 次提交
  14. 02 8月, 2008 2 次提交
  15. 28 7月, 2008 1 次提交
  16. 19 5月, 2008 1 次提交
    • P
      sh: Fix up restorer in debug_trap exception return path. · 336f1d32
      Paul Mundt 提交于
      There are a few different types of debug trap exceptions, though now
      that they are all going through a special jump table, the restorer needs
      to be unified as well.
      
      Presently this is falling through the ret_from_fork path, which more or
      less does the right thing on SH-3/4 whilst being completely unsuitable on
      MMU-less targets.
      
      Ultimately what we want here is a branch through the platform's
      restore_all directly, without worrying about the retval being clobbered.
      We can accomplish that through a branch to __restore_all directly, so
      switch it so we come back from the jump table and branch to the restorer.
      
      This fixes up a recursion in the nommu WARN_ON() path, as well as some
      other userspace nastiness where said recursion caused serious stack
      corruption.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      336f1d32
  17. 16 5月, 2008 1 次提交
  18. 28 1月, 2008 2 次提交
  19. 28 9月, 2007 1 次提交
    • P
      sh: Conditionalize gUSA support. · 83662461
      Paul Mundt 提交于
      This conditionalizes gUSA support. gUSA is not supported on
      SMP configurations, and it's not necessary there anyways due
      to having other atomicity options (ie, movli.l/movco.l).
      
      Anything implementing the LL/SC semantics (all SH-4A CPUs)
      can switch to userspace atomicity implementations without
      requiring gUSA. This is left default-enabled on all UP so
      that glibc doesn't break.
      
      Those that know what they are doing can disable this explicitly.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      83662461
  20. 05 3月, 2007 1 次提交
  21. 13 2月, 2007 1 次提交
    • P
      sh: Use a jump call table for debug trap handlers. · f413d0d9
      Paul Mundt 提交于
      This rips out most of the needlessly complicated sh_bios and kgdb
      trap handling, and forces it all through a common fast dispatch path.
      As more debug traps are inserted, it's important to keep them in sync
      for all of the parts, not just SH-3/4.
      
      As the SH-2 parts are unable to do traps in the >= 0x40 range, we
      restrict the debug traps to the 0x30-0x3f range on all parts, and
      also bump the kgdb breakpoint trap down in to this range (from 0xff
      to 0x3c) so it's possible to use for nommu.
      
      Optionally, this table can be padded out to catch spurious traps for
      SH-3/4, but we don't do that yet..
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      f413d0d9
  22. 12 12月, 2006 1 次提交
  23. 06 12月, 2006 3 次提交