11 Jan, 2006

5 commits

  • Currently arch_remove_kprobes() is only implemented/required for x86_64 and
    powerpc. All other architecture like IA64, i386 and sparc64 implementes a
    dummy function which is being called from arch independent kprobes.c file.

    This patch removes the dummy functions and replaces it with
    #define arch_remove_kprobe(p, s) do { } while(0)

    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anil S Keshavamurthy
     
  • Since Kprobes runtime exception handlers is now lock free as this code path is
    now using RCU to walk through the list, there is no need for the
    register/unregister{_kprobe} to use spin_{lock/unlock}_isr{save/restore}. The
    serialization during registration/unregistration is now possible using just a
    mutex.

    In the above process, this patch also fixes a minor memory leak for x86_64 and
    powerpc.

    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anil S Keshavamurthy
     
  • Now that all these entries in the arch ioctl32.c files are gone [1], we can
    build fs/compat_ioctl.c as a normal object and kill tons of cruft. We need a
    special do_ioctl32_pointer handler for s390 so the compat_ptr call is done.
    This is not needed but harmless on all other architectures. Also remove some
    superflous includes in fs/compat_ioctl.c

    Tested on ppc64.

    [1] parisc still had it's PPP handler left, which is not fully correct
    for ppp and besides that ppp uses the generic SIOCPRIV ioctl so it'd
    kick in for all netdevice users. We can introduce a proper handler
    in one of the next patch series by adding a compat_ioctl method to
    struct net_device but for now let's just kill it - parisc doesn't
    compile in mainline anyway and I don't want this to block this
    patchset.

    Signed-off-by: Christoph Hellwig
    Cc: Matthew Wilcox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • The comment in compat.c is wrong, every architecture provides a
    get_compat_sigevent() for the IPC compat code already.

    This basically moves the x86_64 version to common code and removes all the
    others.

    Signed-off-by: Christoph Hellwig
    Acked-by: Paul Mackerras
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • )

    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
     

10 Jan, 2006

5 commits


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
     

21 Dec, 2005

1 commit

  • It was a stupid workaround for the "static inline" vs.
    "extern inline" issues of long ago, and it is what causes
    schedule() to be inlined like crazy into kernel/sched.c
    when -Os is specified.

    MIPS and S390 should probably do the same.

    Now CC_OPTIMIZE_FOR_SIZE can be safely used on sparc64
    once more.

    Signed-off-by: David S. Miller

    David S. Miller
     

13 Dec, 2005

1 commit

  • When multiple probes are registered at the same address and if due to some
    recursion (probe getting triggered within a probe handler), we skip calling
    pre_handlers and just increment nmissed field.

    The below patch make sure it walks the list for multiple probes case.
    Without the below patch we get incorrect results of nmissed count for
    multiple probe case.

    Signed-off-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Keshavamurthy Anil S
     

30 Nov, 2005

1 commit


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
     

13 Nov, 2005

1 commit

  • This patch adds a new function, sbusfb_compat_ioctl() to
    drivers/video/sbuslib.c and uses it as compat_ioctl in all sbus fb
    drivers

    This remove the last per-arch compat ioctl bits in
    arch/sparc64/kernel/ioctl32.c so it would be nice if people could test
    if this actually copiles and works and if yes apply it :)

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David S. Miller

    Christoph Hellwig
     

12 Nov, 2005

1 commit

  • Noticed by Tom 'spot' Callaway.

    Even on uniprocessor we always reported the number of physical
    cpus in the system via /proc/cpuinfo. But when this got changed
    to use num_possible_cpus() it always reads as "1" on uniprocessor.
    This change was unintentional.

    So scan the firmware device tree and count the number of cpu
    nodes, and report that, as we always did.

    Signed-off-by: David S. Miller

    David S. Miller
     

10 Nov, 2005

2 commits


09 Nov, 2005

4 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
     
  • Some architectures define and use this type in their compat_ioctl code, but
    all of them can easily use the identical ioctl_trans_handler_t type that is
    defined in common code.

    Signed-off-by: Christoph Hellwig
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Update comment on get_user_insn to the more general "pte lock", which may
    or may not be the page_table_lock. Note vmtruncate handled like kswapd.

    Signed-off-by: Hugh Dickins
    Signed-off-by: David S. Miller

    Hugh Dickins
     

08 Nov, 2005

11 commits