26 Apr, 2006

1 commit


20 Apr, 2006

1 commit


23 Mar, 2006

2 commits

  • Without branch hints, the very unlikely chance of the loop repeating due to
    cmpxchg failure is unrolled with gcc-4 that I have tested.

    Improve this for architectures with a native cas/cmpxchg. llsc archs
    should try to implement this natively.

    Signed-off-by: Nick Piggin
    Cc: Andi Kleen
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: "David S. Miller"
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Implement SMP alternatives, i.e. switching at runtime between different
    code versions for UP and SMP. The code can patch both SMP->UP and UP->SMP.
    The UP->SMP case is useful for CPU hotplug.

    With CONFIG_CPU_HOTPLUG enabled the code switches to UP at boot time and
    when the number of CPUs goes down to 1, and switches to SMP when the number
    of CPUs goes up to 2.

    Without CONFIG_CPU_HOTPLUG or on non-SMP-capable systems the code is
    patched once at boot time (if needed) and the tables are released
    afterwards.

    The changes in detail:

    * The current alternatives bits are moved to a separate file,
    the SMP alternatives code is added there.

    * The patch adds some new elf sections to the kernel:
    .smp_altinstructions
    like .altinstructions, also contains a list
    of alt_instr structs.
    .smp_altinstr_replacement
    like .altinstr_replacement, but also has some space to
    save original instruction before replaving it.
    .smp_locks
    list of pointers to lock prefixes which can be nop'ed
    out on UP.
    The first two are used to replace more complex instruction
    sequences such as spinlocks and semaphores. It would be possible
    to deal with the lock prefixes with that as well, but by handling
    them as special case the table sizes become much smaller.

    * The sections are page-aligned and padded up to page size, so they
    can be free if they are not needed.

    * Splitted the code to release init pages to a separate function and
    use it to release the elf sections if they are unused.

    Signed-off-by: Gerd Hoffmann
    Signed-off-by: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     

19 Jan, 2006

2 commits

  • This is a subset of the bluesmoke project core code, stripped of the NMI work
    which isn't ready to merge and some of the "interesting" proc functionality
    that needs reworking or just has no place in kernel. It requires no core
    kernel changes except the added scrub functions already posted.

    The goal is to merge further functionality only after the core code is
    accepted and proven in the base kernel, and only at the point the upstream
    extras are really ready to merge.

    From: doug thompson

    This converts EDAC to sysfs and is the final chunk neccessary before EDAC
    has a stable user space API and can be considered for submission into the
    base kernel.

    Signed-off-by: Alan Cox
    Signed-off-by: Adrian Bunk
    Signed-off-by: Jesper Juhl
    Signed-off-by: doug thompson
    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • EDAC requires a way to scrub memory if an ECC error is found and the chipset
    does not do the work automatically. That means rewriting memory locations
    atomically with respect to all CPUs _and_ bus masters. That means we can't
    use atomic_add(foo, 0) as it gets optimised for non-SMP

    This adds a function to include/asm-foo/atomic.h for the platforms currently
    supported which implements a scrub of a mapped block.

    It also adjusts a few other files include order where atomic.h is included
    before types.h as this now causes an error as atomic_scrub uses u32.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

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
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds