1. 31 Aug, 2009 7 commits
    • Heiko Carstens's avatar
      locking: Allow arch-inlined spinlocks · 892a7c67
      Heiko Carstens authored
      This allows an architecture to specify per lock variant if the
      locking code should be kept out-of-line or inlined.
      
      If an architecure wants out-of-line locking code no change is
      needed. To force inlining of e.g. spin_lock() the line:
      
        #define __always_inline__spin_lock
      
      needs to be added to arch/<...>/include/asm/spinlock.h
      
      If CONFIG_DEBUG_SPINLOCK or CONFIG_GENERIC_LOCKBREAK are
      defined the per architecture defines are (partly) ignored and
      still out-of-line spinlock code will be generated.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
      Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <20090831124418.375299024@de.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      892a7c67
    • Heiko Carstens's avatar
      locking: Move spinlock function bodies to header file · 69d0ee73
      Heiko Carstens authored
      Move spinlock function bodies to header file by creating a
      static inline version of each variant. Use the inline version
      on the out-of-line code.
      
      This shouldn't make any difference besides that the spinlock
      code can now be used to generate inlined spinlock code.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
      Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <20090831124417.859022429@de.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      69d0ee73
    • Heiko Carstens's avatar
      locking, m68k: Calculate thread_info offset with asm offset · 0ee000e5
      Heiko Carstens authored
      m68k has the thread_info structure embedded in its task struct.
      Therefore its not possible to implement current_thread_info()
      by looking at the stack pointer and do some simple calculations
      like most other architectures do it.
      
      To return the thread_info pointer for a task two defines are
      used. This works until the spinlock function bodies get moved
      into an own header file and CONFIG_SPINLOCK_DEBUG is turned on.
      That results into this compile error:
      
        In file included from include/linux/spinlock.h:378,
                         from include/linux/seqlock.h:29,
                         from include/linux/time.h:8,
                         from include/linux/timex.h:56,
                         from include/linux/sched.h:54,
                         from arch/m68k/kernel/asm-offsets.c:12:
        include/linux/spinlock_api_smp.h: In function '__spin_unlock_irq':
        include/linux/spinlock_api_smp.h:371: error: 'current' undeclared (first use in this function)
        include/linux/spinlock_api_smp.h:371: error: (Each undeclared identifier is reported only once
        include/linux/spinlock_api_smp.h:371: error: for each function it appears in.)
      
      Including asm/current.h to asm-offsets.c wouldn't help since
      the definition of struct task is needed. So we end up with ugly
      header file include dependencies.
      
      To solve this calculate the offset of the thread_info structure
      into the task struct in asm-offsets.h and use the offset in
      task_thread_info(). This works just like it does for IA64 as
      well.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
      Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <20090831124417.329662275@de.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0ee000e5
    • Heiko Carstens's avatar
      locking, m68k/asm-offsets: Rename pt_regs offset defines · f159ee78
      Heiko Carstens authored
      In order to be able to use asm-offsets.h in C files the
      existing namespace conflicts must be solved first. In
      asm-offsets.h e.g. PT_D0 gets defined which is the offset of
      the d0 member of the pt_regs structure. However a same define
      (with a different meaning) exists in asm/ptregs.h.
      
      So rename the defines created with the asm-offset mechanism to
      PT_OFF_D0 etc. There also already exist a few defines with
      these names that have the same meaning. So remove the existing
      defines and use the asm-offset generated ones.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
      Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <20090831124416.666403991@de.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f159ee78
    • Heiko Carstens's avatar
      locking, sparc: Rename __spin_try_lock() and friends · 9f34ceb6
      Heiko Carstens authored
      Needed to avoid namespace conflicts when the common code
      function bodies of _spin_try_lock() etc. are moved to a header
      file where the function name would be __spin_try_lock().
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
      Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <20090831124416.306495811@de.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9f34ceb6
    • Heiko Carstens's avatar
      locking, powerpc: Rename __spin_try_lock() and friends · 8307a980
      Heiko Carstens authored
      Needed to avoid namespace conflicts when the common code
      function bodies of _spin_try_lock() etc. are moved to a header
      file where the function name would be __spin_try_lock().
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
      Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: <linux-arch@vger.kernel.org>
      LKML-Reference: <20090831124415.918799705@de.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8307a980
    • Ingo Molnar's avatar
      Merge commit 'v2.6.31-rc8' into core/locking · bbe69aa5
      Ingo Molnar authored
      Merge reason: we were on -rc4, move to -rc8 before applying
                    a new batch of locking infrastructure changes.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bbe69aa5
  2. 29 Aug, 2009 1 commit
  3. 28 Aug, 2009 1 commit
  4. 27 Aug, 2009 31 commits