27 Mar, 2006

1 commit

  • - remove __{,test_and_}{set,clear,change}_bit() and test_bit()
    - remove ffz()
    - remove __ffs()
    - remove sched_find_first_bit()
    - remove ffs()
    - remove generic_fls()
    - remove generic_fls64()
    - remove generic_hweight{32,16,8}()
    - remove find_{next,first}{,_zero}_bit()
    - remove ext2_{set,clear,test,find_first_zero,find_next_zero}_bit()
    - remove ext2_{set,clear}_bit_atomic()
    - remove minix_{test,set,test_and_clear,test,find_first_zero}_bit()

    Signed-off-by: Akinobu Mita
    Cc: William Lee Irwin III
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

24 Mar, 2006

1 commit

  • Todo items:
    - IRQ_INPROGRESS flag - use sparc64 irq buckets, or generic irq_desc?
    - sun4d
    - re-indent large chunks of sun4m_smp.c
    - some places assume sequential cpu numbering (i.e. 0,1 instead of 0,2)

    Last I checked (with 2.6.14), random programs segfault with dual
    HyperSPARC. And with SuperSPARC II's, it seems stable but will
    eventually die from a write lock error (wrong lock owner or something).

    I haven't tried the HyperSPARC + highmem combination recently, so that
    may still be a problem.

    Signed-off-by: David S. Miller

    Bob Breuer
     

23 Mar, 2006

2 commits

  • When we stop allocating percpu memory for not-possible CPUs we must not touch
    the percpu data for not-possible CPUs at all. The correct way of doing this
    is to test cpu_possible() or to use for_each_cpu().

    This patch is a kernel-wide sweep of all instances of NR_CPUS. I found very
    few instances of this bug, if any. But the patch converts lots of open-coded
    test to use the preferred helper macros.

    Cc: Mikael Starvik
    Cc: David Howells
    Acked-by: Kyle McMartin
    Cc: Anton Blanchard
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: William Lee Irwin III
    Cc: Andi Kleen
    Cc: Christian Zankel
    Cc: Philippe Elie
    Cc: Nathan Scott
    Cc: Jens Axboe
    Cc: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Add a secondary TSB for hugepage mappings.
    [SPARC]: Respect vm_page_prot in io_remap_page_range().

    Linus Torvalds
     

22 Mar, 2006

2 commits


20 Mar, 2006

1 commit


13 Feb, 2006

1 commit


08 Feb, 2006

3 commits


31 Jan, 2006

1 commit


23 Jan, 2006

1 commit


19 Jan, 2006

1 commit


18 Jan, 2006

1 commit


13 Jan, 2006

2 commits


12 Jan, 2006

1 commit


11 Jan, 2006

1 commit

  • )

    From: Adrian Bunk

    - create one common dump_thread() prototype in kernel.h

    - dump_thread() is only used in fs/binfmt_aout.c and can therefore be
    removed on all architectures where CONFIG_BINFMT_AOUT is not
    available

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    akpm@osdl.org
     

09 Jan, 2006

2 commits

  • Configurable 16-bit UID and friends support

    This allows turning off the legacy 16 bit UID interfaces on embedded platforms.

    text data bss dec hex filename
    3330172 529036 190556 4049764 3dcb64 vmlinux-baseline
    3328268 529040 190556 4047864 3dc3f8 vmlinux

    From: Adrian Bunk

    UID16 was accidentially disabled for !EMBEDDED.

    Signed-off-by: Matt Mackall
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Mackall
     
  • The ptrace_get_task_struct() helper that I added as part of the ptrace
    consolidation is useful in variety of places that currently opencode it.
    Switch them to the common helpers.

    Add a ptrace_traceme() helper that needs to be explicitly called, and simplify
    the ptrace_get_task_struct() interface. We don't need the request argument
    now, and we return the task_struct directly, using ERR_PTR() for error
    returns. It's a bit more code in the callers, but we have two sane routines
    that do one thing well now.

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

    Christoph Hellwig
     

29 Dec, 2005

1 commit


23 Dec, 2005

2 commits

  • It's definition is wrong (-1 means "no limit" not 999),
    only the Sparc SunOS/Solaris compat code uses it, so
    let's just kill it off completely from limits.h and
    all referencing code.

    Noticed by Ulrich Drepper.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Introduce a Kconfig symbol SPARC that is defined on both the sparc and
    sparc64 architectures.

    This symbol makes some dependencies more readable.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     

16 Dec, 2005

5 commits


13 Dec, 2005

2 commits

  • With this fix, sparc links vmlinuz again using crosstool. Without this
    fix, the final link fails missing several dozen dozen symbols, beginning
    with:

    kernel/built-in.o(.text+0x6fd0): In function `do_exit':
    : undefined reference to `exit_io_context'

    (exit_io_context is defined in block/ll_rw_blk.c).

    Signed-off-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Paul Jackson
     
  • This fixes one build error introduced in sparc with the patch of Oct 30,
    resent Nov 4 "[patch 3/5] atomic: atomic_inc_not_zero" I still can't get
    sparc to build, but at least it gets further after I remove this line.
    Apparently, this change was agreed to by Andrew and Nick on Nov 14, but
    everyone thought someone else was doing it.

    Signed-off-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Paul Jackson
     

29 Nov, 2005

1 commit


23 Nov, 2005

2 commits

  • Earlier I unifdefed PageCompound, so that snd_pcm_mmap_control_nopage and
    others can give out a 0-order component of a higher-order page, which won't
    be mistakenly freed when zap_pte_range unmaps it. But many Bad page states
    reported a PG_reserved was freed after all: I had missed that we need to
    say __GFP_COMP to get compound page behaviour.

    Some of these higher-order pages are allocated by snd_malloc_pages, some by
    snd_malloc_dev_pages; or if SBUS, by sbus_alloc_consistent - but that has
    no gfp arg, so add __GFP_COMP into its sparc32/64 implementations.

    I'm still rather puzzled that DRM seems not to need a similar change.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Although we tend to associate VM_RESERVED with remap_pfn_range, quite a few
    drivers set VM_RESERVED on areas which are then populated by nopage. The
    PageReserved removal in 2.6.15-rc1 changed VM_RESERVED not to free pages in
    zap_pte_range, without changing those drivers not to set it: so their pages
    just leak away.

    Let's not change miscellaneous drivers now: introduce VM_UNPAGED at the core,
    to flag the special areas where the ptes may have no struct page, or if they
    have then it's not to be touched. Replace most instances of VM_RESERVED in
    core mm by VM_UNPAGED. Force it on in remap_pfn_range, and the sparc and
    sparc64 io_remap_pfn_range.

    Revert addition of VM_RESERVED to powerpc vdso, it's not needed there. Is it
    needed anywhere? It still governs the mm->reserved_vm statistic, and special
    vmas not to be merged, and areas not to be core dumped; but could probably be
    eliminated later (the drivers are probably specifying it because in 2.4 it
    kept swapout off the vma, but in 2.6 we work from the LRU, which these pages
    don't get on).

    Use the VM_SHM slot for VM_UNPAGED, and define VM_SHM to 0: it serves no
    purpose whatsoever, and should be removed from drivers when we clean up.

    Signed-off-by: Hugh Dickins
    Acked-by: William Irwin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

14 Nov, 2005

3 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
     
  • a) in smp_lock.h #include of sched.h and spinlock.h moved under #ifdef
    CONFIG_LOCK_KERNEL.

    b) interrupt.h now explicitly pulls sched.h (not via smp_lock.h from
    hardirq.h as it used to)

    c) in three more places we need changes to compensate for (a) - one place
    in arch/sparc needs string.h now, hardirq.h needs forward declaration of
    task_struct and preempt.h needs direct include of thread_info.h.

    d) thread_info-related helpers in sched.h and thread_info.h put under
    ifndef __HAVE_THREAD_FUNCTIONS. Obviously safe.

    Signed-off-by: Al Viro
    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

10 Nov, 2005

1 commit


09 Nov, 2005

2 commits

  • Make some changes to the NEED_RESCHED and POLLING_NRFLAG to reduce
    confusion, and make their semantics rigid. Improves efficiency of
    resched_task and some cpu_idle routines.

    * In resched_task:
    - TIF_NEED_RESCHED is only cleared with the task's runqueue lock held,
    and as we hold it during resched_task, then there is no need for an
    atomic test and set there. The only other time this should be set is
    when the task's quantum expires, in the timer interrupt - this is
    protected against because the rq lock is irq-safe.

    - If TIF_NEED_RESCHED is set, then we don't need to do anything. It
    won't get unset until the task get's schedule()d off.

    - If we are running on the same CPU as the task we resched, then set
    TIF_NEED_RESCHED and no further action is required.

    - If we are running on another CPU, and TIF_POLLING_NRFLAG is *not* set
    after TIF_NEED_RESCHED has been set, then we need to send an IPI.

    Using these rules, we are able to remove the test and set operation in
    resched_task, and make clear the previously vague semantics of
    POLLING_NRFLAG.

    * In idle routines:
    - Enter cpu_idle with preempt disabled. When the need_resched() condition
    becomes true, explicitly call schedule(). This makes things a bit clearer
    (IMO), but haven't updated all architectures yet.

    - Many do a test and clear of TIF_NEED_RESCHED for some reason. According
    to the resched_task rules, this isn't needed (and actually breaks the
    assumption that TIF_NEED_RESCHED is only cleared with the runqueue lock
    held). So remove that. Generally one less locked memory op when switching
    to the idle thread.

    - Many idle routines clear TIF_POLLING_NRFLAG, and only set it in the inner
    most polling idle loops. The above resched_task semantics allow it to be
    set until before the last time need_resched() is checked before going into
    a halt requiring interrupt wakeup.

    Many idle routines simply never enter such a halt, and so POLLING_NRFLAG
    can be always left set, completely eliminating resched IPIs when rescheduling
    the idle task.

    POLLING_NRFLAG width can be increased, to reduce the chance of resched IPIs.

    Signed-off-by: Nick Piggin
    Cc: Ingo Molnar
    Cc: Con Kolivas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Run idle threads with preempt disabled.

    Also corrected a bugs in arm26's cpu_idle (make it actually call schedule()).
    How did it ever work before?

    Might fix the CPU hotplugging hang which Nigel Cunningham noted.

    We think the bug hits if the idle thread is preempted after checking
    need_resched() and before going to sleep, then the CPU offlined.

    After calling stop_machine_run, the CPU eventually returns from preemption and
    into the idle thread and goes to sleep. The CPU will continue executing
    previous idle and have no chance to call play_dead.

    By disabling preemption until we are ready to explicitly schedule, this bug is
    fixed and the idle threads generally become more robust.

    From: alexs

    PPC build fix

    From: Yoichi Yuasa

    MIPS build fix

    Signed-off-by: Nick Piggin
    Signed-off-by: Yoichi Yuasa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin