1. 20 10月, 2007 1 次提交
  2. 19 10月, 2007 2 次提交
    • N
      powerpc: lock bitops · 66ffb04c
      Nick Piggin 提交于
      Add non-trivial lock bitops implementation for powerpc.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      66ffb04c
    • N
      bitops: introduce lock ops · 26333576
      Nick Piggin 提交于
      Introduce test_and_set_bit_lock / clear_bit_unlock bitops with lock semantics.
      Convert all architectures to use the generic implementation.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-By: NDavid Howells <dhowells@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Bryan Wu <bryan.wu@analog.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Matthew Wilcox <willy@debian.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26333576
  3. 09 5月, 2007 1 次提交
  4. 12 12月, 2006 1 次提交
  5. 09 12月, 2006 1 次提交
  6. 09 7月, 2006 1 次提交
  7. 24 5月, 2006 1 次提交
  8. 27 3月, 2006 1 次提交
  9. 13 1月, 2006 1 次提交
    • A
      [PATCH] powerpc: use lwsync in atomics, bitops, lock functions · 144b9c13
      Anton Blanchard 提交于
      eieio is only a store - store ordering. When used to order an unlock
      operation loads may leak out of the critical region. This is potentially
      buggy, one example is if a user wants to atomically read a couple of
      values.
      
      We can solve this with an lwsync which orders everything except store - load.
      
      I removed the (now unused) EIEIO_ON_SMP macros and the c versions
      isync_on_smp and eieio_on_smp now we dont use them. I also removed some
      old comments that were used to identify inline spinlocks in assembly,
      they dont make sense now our locks are out of line.
      
      Another interesting thing was that read_unlock was using an eieio even
      though the rest of the spinlock code had already been converted to
      use lwsync.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      144b9c13
  10. 04 1月, 2006 1 次提交
  11. 10 11月, 2005 1 次提交
    • D
      [PATCH] powerpc: Consolidate asm compatibility macros · 3ddfbcf1
      David Gibson 提交于
      This patch consolidates macros used to generate assembly for
      compatibility across different CPUs or configs.  A new header,
      asm-powerpc/asm-compat.h contains the main compatibility macros.  It
      uses some preprocessor magic to make the macros suitable both for use
      in .S files, and in inline asm in .c files.  Headers (bitops.h,
      uaccess.h, atomic.h, bug.h) which had their own such compatibility
      macros are changed to use asm-compat.h.
      
      ppc_asm.h is now for use in .S files *only*, and a #error enforces
      that.  As such, we're a lot more careless about namespace pollution
      here than in asm-compat.h.
      
      While we're at it, this patch adds a call to the PPC405_ERR77 macro in
      futex.h which should have had it already, but didn't.
      
      Built and booted on pSeries, Maple and iSeries (ARCH=powerpc).  Built
      for 32-bit powermac (ARCH=powerpc) and Walnut (ARCH=ppc).
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3ddfbcf1
  12. 01 11月, 2005 1 次提交
    • D
      [PATCH] powerpc: Merge bitops.h · a0e60b20
      David Gibson 提交于
      Here's a revised version.  This re-introduces the set_bits() function
      from ppc64, which I removed because I thought it was unused (it exists
      on no other arch).  In fact it is used in the powermac interrupt code
      (but not on pSeries).
      
      - We use LARXL/STCXL macros to generate the right (32 or 64 bit)
        instructions, similar to LDL/STL from ppc_asm.h, used in fpu.S
      
      - ppc32 previously used a full "sync" barrier at the end of
        test_and_*_bit(), whereas ppc64 used an "isync".  The merged version
        uses "isync", since I believe that's sufficient.
      
      - The ppc64 versions of then minix_*() bitmap functions have changed
        semantics.  Previously on ppc64, these functions were big-endian
        (that is bit 0 was the LSB in the first 64-bit, big-endian word).
        On ppc32 (and x86, for that matter, they were little-endian.  As far
        as I can tell, the big-endian usage was simply wrong - I guess
        no-one ever tried to use minixfs on ppc64.
      
      - On ppc32 find_next_bit() and find_next_zero_bit() are no longer
        inline (they were already out-of-line on ppc64).
      
      - For ppc64, sched_find_first_bit() has moved from mmu_context.h to
        the merged bitops.  What it was doing in mmu_context.h in the first
        place, I have no idea.
      
      - The fls() function is now implemented using the cntlzw instruction
        on ppc64, instead of generic_fls(), as it already was on ppc32.
      
      - For ARCH=ppc, this patch requires adding arch/powerpc/lib to the
        arch/ppc/Makefile.  This in turn requires some changes to
        arch/powerpc/lib/Makefile which didn't correctly handle ARCH=ppc.
      
      Built and running on G5.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a0e60b20