13 Jan, 2006

2 commits

  • It makes my eyes hurt.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Paul Mackerras

    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: Anton Blanchard
    Signed-off-by: Paul Mackerras

    Anton Blanchard
     

10 Jan, 2006

1 commit


07 Jan, 2006

1 commit

  • Several counters already have the need to use 64 atomic variables on 64 bit
    platforms (see mm_counter_t in sched.h). We have to do ugly ifdefs to fall
    back to 32 bit atomic on 32 bit platforms.

    The VM statistics patch that I am working on will also make more extensive
    use of atomic64.

    This patch introduces a new type atomic_long_t by providing definitions in
    asm-generic/atomic.h that works similar to the c "long" type. Its 32 bits
    on 32 bit platforms and 64 bits on 64 bit platforms.

    Also cleans up the determination of the mm_counter_t in sched.h.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

14 Nov, 2005

2 commits

  • Introduce an atomic_inc_not_zero operation. Make this a special case of
    atomic_add_unless because lockless pagecache actually wants
    atomic_inc_not_negativeone due to its offset refcount.

    Signed-off-by: Nick Piggin
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Introduce an atomic_cmpxchg operation.

    Signed-off-by: Nick Piggin
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

10 Nov, 2005

2 commits

  • Signed-off-by: Stephen Rothwell

    Stephen Rothwell
     
  • 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: David Gibson
    Signed-off-by: Paul Mackerras

    David Gibson
     

25 Sep, 2005

1 commit

  • powerpc: Merge atomic.h and memory.h into powerpc

    Merged atomic.h into include/powerpc. Moved asm-style HMT_ defines from
    memory.h into ppc_asm.h, where there were already HMT_defines; moved c-style
    HMT_ defines to processor.h. Renamed memory.h to synch.h to better reflect
    its contents.

    Signed-off-by: Kumar Gala
    Signed-off-by: Becky Bruce
    Signed-off-by: Jon Loeliger
    Signed-off-by: Paul Mackerras

    Becky Bruce