07 Nov, 2005

40 commits

  • Use schedule_timeout_interruptible() instead of
    set_current_state()/schedule_timeout() to reduce kernel size.

    Signed-off-by: Nishanth Aravamudan
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     
  • Use schedule_timeout_interruptible() instead of
    set_current_state()/schedule_timeout() to reduce kernel size. Also use
    human-time conversion functions instead of hard-coded HZ division to avoid
    rounding errors.

    Signed-off-by: Nishanth Aravamudan
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     
  • Use schedule_timeout_interruptible() instead of
    set_current_state()/schedule_timeout() to reduce kernel size.

    Signed-off-by: Nishanth Aravamudan
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     
  • Use schedule_timeout_interruptible() instead of
    set_current_state()/schedule_timeout() to reduce kernel size.

    Signed-off-by: Nishanth Aravamudan
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     
  • Updates the RIO messaging interface to pass a device instance into the
    event registeration and callbacks.

    Signed-off-by: Matt Porter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Porter
     
  • Adds PPC32 RIO support. Init code for the MPC85xx RIO ports and glue for the
    STx GP3 board to use it.

    Signed-off-by: Matt Porter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Porter
     
  • Reorganize the preempt_disable/enable calls to eliminate the extra preempt
    depth. Changes based on Paul McKenney's review suggestions for the kprobes
    RCU changeset.

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

    Ananth N Mavinakayanahalli
     
  • Changes to the arch kprobes infrastructure to take advantage of the locking
    changes introduced by usage of RCU for synchronization. All handlers are now
    run without any locks held, so they have to be re-entrant or provide their own
    synchronization.

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

    Ananth N Mavinakayanahalli
     
  • x86_64 changes to track kprobe execution on a per-cpu basis. We now track the
    kprobe state machine independently on each cpu using a arch specific kprobe
    control block.

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

    Ananth N Mavinakayanahalli
     
  • Sparc64 changes to track kprobe execution on a per-cpu basis. We now track
    the kprobe state machine independently on each cpu using an arch specific
    kprobe control block.

    Signed-off-by: Ananth N Mavinakayanahalli
    Signed-off-by: Anil S Keshavamurthy
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ananth N Mavinakayanahalli
     
  • PPC64 changes to track kprobe execution on a per-cpu basis. We now track the
    kprobe state machine independently on each cpu using an arch specific kprobe
    control block.

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

    Ananth N Mavinakayanahalli
     
  • IA64 changes to track kprobe execution on a per-cpu basis. We now track the
    kprobe state machine independently on each cpu using an arch specific kprobe
    control block.

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

    Ananth N Mavinakayanahalli
     
  • I386 changes to track kprobe execution on a per-cpu basis. We now track the
    kprobe state machine independently on each cpu, using an arch specific kprobe
    control block.

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

    Ananth N Mavinakayanahalli
     
  • The following set of patches are aimed at improving kprobes scalability. We
    currently serialize kprobe registration, unregistration and handler execution
    using a single spinlock - kprobe_lock.

    With these changes, kprobe handlers can run without any locks held. It also
    allows for simultaneous kprobe handler executions on different processors as
    we now track kprobe execution on a per processor basis. It is now necessary
    that the handlers be re-entrant since handlers can run concurrently on
    multiple processors.

    All changes have been tested on i386, ia64, ppc64 and x86_64, while sparc64
    has been compile tested only.

    The patches can be viewed as 3 logical chunks:

    patch 1: Reorder preempt_(dis/en)able calls
    patches 2-7: Introduce per_cpu data areas to track kprobe execution
    patches 8-9: Use RCU to synchronize kprobe (un)registration and handler
    execution.

    Thanks to Maneesh Soni, James Keniston and Anil Keshavamurthy for their
    review and suggestions. Thanks again to Anil, Hien Nguyen and Kevin Stafford
    for testing the patches.

    This patch:

    Reorder preempt_disable/enable() calls in arch kprobes files in preparation to
    introduce locking changes. No functional changes introduced by this patch.

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

    Ananth N Mavinakayanahalli
     
  • The sys_ptrace boilerplate code (everything outside the big switch
    statement for the arch-specific requests) is shared by most architectures.
    This patch moves it to kernel/ptrace.c and leaves the arch-specific code as
    arch_ptrace.

    Some architectures have a too different ptrace so we have to exclude them.
    They continue to keep their implementations. For sh64 I had to add a
    sh64_ptrace wrapper because it does some initialization on the first call.
    For um I removed an ifdefed SUBARCH_PTRACE_SPECIAL block, but
    SUBARCH_PTRACE_SPECIAL isn't defined anywhere in the tree.

    Signed-off-by: Christoph Hellwig
    Acked-by: Paul Mackerras
    Acked-by: Ralf Baechle
    Acked-By: David Howells
    Acked-by: Russell King
    Acked-by: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Fix more include file problems that surfaced since I submitted the previous
    fix-missing-includes.patch. This should now allow not to include sched.h
    from module.h, which is done by a followup patch.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     
  • Andrew Morton suggested to move kprobes from kernel hacking menu, since
    kernel hacking menu is in-appropriate for the Kprobes. This patch moves
    Kprobes and Oprofile under instrumentation menu.

    (akpm: it's not a natural fit, but things like djprobes and the s390 guys'
    statistics library need a home)

    Signed-of-by: Prasanna S Panchamukhi
    Cc: Philippe Elie
    Cc: John Levon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prasanna S Panchamukhi
     
  • Merge common parts of head.S and head64.S into head.S and move architecture
    specific parts to head31.S and head64.S respectively. Saves us ~500 lines
    of duplicated assembly code.

    Acked-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Remove pagex pseudo page fault code. It does not work together with the
    system call speedup that makes the complete system call path enabled for
    interrupts. To make pagex and the syscall speedup code work together we would
    have to add code to the program check handler to do a critical section cleanup
    like the asynchronous interrupt code. This would make program checks slower.
    Not what we want.

    Newer versions of z/VM have the improved pfault pseudo page fault interface.
    This replaces the old pagex interface and does not have the problem. So its
    better to just rip out the pagex code.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     
  • Don't switch back to 24 bit addressing mode when waiting for an external
    interrupt and set the correct bit in wait PSW (external mask instead of I/O
    mask).

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • The calculation of the value return by next_timer_interrupt from jiffies to
    jiffies_64 is racy against xtime updates. We need to protect the calculation
    with read_seqbegin/read_seqretry.

    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     
  • Always create all signal frames for pending signals before returning to
    userspace, not just a single one.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • This patch reverts back the changes to HOSTCFLAGS and HOSTLDFLAGS

    When we were building complete binaries to get constants (such as ptrace
    register layout on stack) from host userspace headers, we needed to make the
    arch for building HOST binaries match our one: i.e. on a 64bit system
    compiling 32bit binaries, we compile 32-bit hostprogs and need, say, 32-bit
    ncurses. Now we can revert that - that avoids problem with, say, menuconfig
    and ncurses, on a system which can't compile well 32-bit programs.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Remove usage of hardcoded constants in paging_init().

    By chance I spotted a bug in zones_setup involving a change to ZONE_*
    constants, due to the ZONE_DMA32 patch from Andi Kleen (which is in -mm).
    So, possibly, instead of zones_size[2] you will find zones_size[3] in the
    code, but that change is wrong and this patch is still correct.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • This makes some of the tt-specific options actually depend on CONFIG_MODE_TT.

    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • A number of fixes to improve behavior when large physical memory sizes
    are specified:

    - libc files need -D_FILE_OFFSET_BITS=64 because there are unavoidable uses
    of non-64 interfaces in libc

    - some %d need to be %u

    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Patch imlements full LDT handling in SKAS:
    * UML holds it's own LDT table, used to deliver data on
    modify_ldt(READ)
    * UML disables the default_ldt, inherited from the host (SKAS3)
    or resets LDT entries, set by host's clib and inherited in
    SKAS0
    * A new global variable skas_needs_stub is inserted, that
    can be used to decide, whether stub-pages must be supported
    or not.
    * Uses the syscall-stub to replace missing PTRACE_LDT (therefore,
    write_ldt_entry needs to be modified)

    Signed-off-by: Bodo Stroesser
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bodo Stroesser
     
  • The serial UML OS-abstraction layer patch (um/kernel dir).

    This moves all systemcalls from helper.c file under os-Linux dir

    Signed-off-by: Gennady Sharapov
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • The serial UML OS-abstraction layer patch (um/kernel dir).

    This moves all systemcalls from main.c file under os-Linux dir and joins mem.c
    and um_arch.c files.

    Signed-off-by: Gennady Sharapov
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • The serial UML OS-abstraction layer patch (um/kernel dir).

    This moves all systemcalls from uaccess_user.c file under os-Linux dir

    Signed-off-by: Gennady Sharapov
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gennady Sharapov
     
  • ifa->ifa_address and ifa->ifa_mask are defined as __u32, but used as if they
    were char[4].

    Network code uses htons() to convert it. So UML's method to access these
    fields is wrong for bigendians (e.g. s390)

    I replaced bytewise copying by memcpy(), maybe even that might be removed, if
    ifa->ifa_address/mask may be used immediately.

    Signed-off-by: Bodo Stroesser
    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bodo Stroesser
     
  • Jeff Dike noted that the assembly code for syscall stubs is misassembled with
    GCC 3.2.3: the values copied in registers weren't preserved between one asm()
    and the following one.

    So I fixed the thing by rewriting the __asm__ constraints more like unistd.h
    ones.

    Note: in syscall6 case I had to add one more instruction (i.e. moving arg6 in
    eax and shuffling things around) - it's needed for the function to be valid in
    general (we can't load the value from the stack, relative to ebp, because we
    change it), but could be avoided since we actually use a constant as param 6.

    The only fix would be to turn stub_syscall6 to a macro and use a "i"
    constraint for arg6 (i.e., specify it's a constant value).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Add some more debugging information when a stub does something unexpected,
    usually segfaulting. Now, it dumps out the stub's registers as well as the
    signal.

    Signed-off-by: Jeff Dike
    Cc: Paolo Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • "extern inline" doesn't make much sense.

    Signed-off-by: Adrian Bunk
    Acked-by: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • It's widely seen a MCE non-fatal error reported after resume. It seems MCE
    resume is lacked under ia32. This patch tries to fix the gap.

    Signed-off-by: Shaohua Li
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • Every file should #include the header files containing the prototypes of
    its global functions

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

    Adrian Bunk
     
  • Every file should #include the header files containing the prototypes of
    its global functions

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

    Adrian Bunk
     
  • Every file should #include the header files containing the prototypes of
    its global functions

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

    Adrian Bunk
     
  • Excerpt from bugzilla entry

    http://bugzilla.kernel.org/show_bug.cgi?id=5518

    "i386 version of Reboot-through-BIOS is unsafe: it forgets to mask APIC LVT
    interrupts before jumping to a BIOS entry point. As a result, BIOS ends up
    bombarded with interrupts early on boot. The BIOS does not expect it since
    following a "normal" hardware cpu reset, all APIC LVT registers have the
    Mask bit (16) set and can't generate interrupts.

    For example, the version of Phoenix BIOS used by VMware enables interrupts
    for the first time before masking/clearing APIC LVT. The APIC Timer LVT
    register is still set up for a timer interrupt delivery with a high vector
    from the previous Linux incarnation (0xef in our case). The BIOS has not
    fully initialized its IDT at this point and the real mode gate for 0xef
    remains all zeros. Vector 0xef dispatches BIOS to address 0:0, BIOS takes
    a #GP and eventually hangs.

    machine_shutdown() does attempt to shut down APIC before jumping to BIOS,
    but it is ineffective"

    Signed-off-by: Zwane Mwaikambo
    Cc: "Seth, Rohit"
    Cc: Zachary Amsden
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zwane Mwaikambo
     
  • Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0])

    Signed-off-by: Tobias Klauser
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser