07 May, 2005

14 commits

  • This fixes some x86_64 bugs -

    - maybe_map returns -1 on error instead of 0, which is interpreted as
    physical address 0

    - removed an include of ipc.h, which isn't needed

    - fixed the calculation of signal frame location

    - the signal delivery code is now immune to the stack expansion check

    - added a missing include

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

    Jeff Dike
     
  • tt-mode closes switch_pipes in exit_thread_tt and kills processes in
    switch_to_tt, if the exit_state is EXIT_DEAD or EXIT_ZOMBIE.

    In very rare cases the exiting process can be scheduled out after having set
    exit_state and closed switch_pipes (from release_task it calls proc_pid_flush,
    which might sleep). If this process is to be restarted, UML failes in
    switch_to_tt with:

    write of switch_pipe failed, err = 9

    We fix this by closing switch_pipes not in exit_thread_tt, but later in
    release_thread_tt. Additionally, we set switch_pipe[0] = 0 after closing.
    switch_to_tt must not kill "from" process depending on its exit_state, but
    must kill it after release_thread was processed only, so it examines
    switch_pipe[0] for its decision.

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

    Bodo Stroesser
     
  • Only x86 and x86_64 use arch_align_stack(), all other subarches have:

    #define arch_align_stack(x) (x)

    So, if this definition is found, UML's own arch_align_stack() should be
    skipped.

    Signed-off-by: Bodo Stroesser
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bodo Stroesser
     
  • tt/mem.c still uses hardcoded TOP for i386 instead of CONFIG_TOP_ADDR provided
    by subarch's Kconfig_XXXX, which would be right.

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

    Bodo Stroesser
     
  • So, there I was, looking at my own code, wondering what the magic setjmp
    return values did. This patch turns the constants that are used to make
    requests of the initial thread into meaningful symbols.

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

    Jeff Dike
     
  • This eliminates some stuff from arch/um/kernel/Makefile which refers to a
    file which has long since been deleted.

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

    Jeff Dike
     
  • Eliminate the non-inline version of switch_mm, which can't be used,
    considering the inline version in asm/mmu_context.h

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

    Jeff Dike
     
  • s390 tt-mode needs to save not only syscall number, but an further register
    also.

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

    Bodo Stroesser
     
  • s390 needs to change some parts of arch/um/kernel/ptrace.c. Thus, the code
    regarding PEEKUSER and POKEUSER are shifted to arch/um/sys-/ptrace.c.

    Also s390 debug registers need to be updated, when singlestepping is switched
    on / off. Thus, setting/resetting of singlestepping is centralized in the new
    function set_singlestep(), which also inserts the macro
    SUBARCH_SET_SINGLESTEP(mode), if defined.

    Finally, s390 has the "ieee_instruction_pointer" in its
    registers, which also is allowed to be read via

    ptrace( PTRACE_PEEKUSER, getpid(), PT_IEEE_IP, 0);

    To implement this feature, sys_ptrace inserts the macro
    SUBARCH_PTRACE_SPECIAL, if defined.

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

    Bodo Stroesser
     
  • Command line handling cleanups - a couple of things made static and an
    unused declaration removed from header.

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

    Jeff Dike
     
  • Remove the __deprecated from verify_area_skas and verify_area_tt. Since
    verify_area is itself marked __deprecated, and it is the only caller of
    these, then they don't need to be marked. Marking them only makes the
    build noisier.

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

    Jeff Dike
     
  • In separating out support for hardware floating point we missed the fact
    that both POWER3 and POWER4 have HW FP. Enable CONFIG_PPC_FPU for POWER3
    and POWER4 fixes the issue.

    Signed-off-by: Kumar Gala
    Acked-by: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kumar Gala
     
  • This patch enables CONFIG_RTAS_PROC by default on pSeries. This will
    preserve /proc/ppc64/rtas/rmo_buffer, which is needed by librtas.

    Signed-off-by: John Rose
    Signed-off-by: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • Noticed by Jakub Jermar

    Linus Torvalds
     

06 May, 2005

26 commits

  • Move the code to set global interrupt queue membership to xics.c,
    and remove no longer needed extern declarations. Also call it on
    all cpus (even the boot cpu) to prepare for kexec.

    Signed-off-by: Milton Miller
    Signed-off-by: R Sharada
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • Trivial patch to remove our last direct reference to contig_page_data.
    This will make it just that much less hard to seperate NUMA and
    DISCONTIG. Please forward on. Against 2.6.12-rc1

    Signed-off-by: Joel Schopp
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • start.c is not referenced in the arch/ppc64/boot/Makefile

    compile tested with the defconfig.

    Signed-off-by: Olaf Hering
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • The defines in bootinfo.h are not used, so the include can be removed.
    According to Ben, birecs are not used on ppc64:

    on ppc64, we made the decision of enforcing the presence of an
    OF device-tree and either an OF-like client interface or a kexec
    like flattened tree.
    so if your bootloader want to say things to the kernel,
    it can do so by adding properties to the device-tree

    compile-tested with defconfig

    Signed-off-by: Olaf Hering
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • The code in reloc_offset is actually subtracting the address in the link
    register from the address calculated by the linker. Perhaps the
    extended mnemonic `sub' replaced an original `subf' and the comment just
    did not get updated.

    bl 1f
    1: mflr r3
    LOADADDR(r4,1b)
    sub r3,r4,r3

    Signed-off-by: Amos Waterland
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • The code in unflatten_device_tree knows that get_property is written to
    only return with lenp equal to 1 when also returning a valid pointer.
    The gcc 3.3.3 compiler is not able to prove this to itself, so it warns
    about a possible uninitialized pointer dereference:

    .../arch/ppc64/kernel/prom.c: In function `unflatten_device_tree':
    .../arch/ppc64/kernel/prom.c:828:
    warning: `p' might be used uninitialized in this function

    Unless it is desired to rework the interaction between the two
    functions, this will keep the existing behavior but quiet the compiler.

    Signed-off-by: Amos Waterland
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • Replace a custom MIN() macro with the min() macro from kernel.h
    This patch removes 4 lines of redundant code.

    Signed-off-by: Tobias Klauser
    Signed-off-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     
  • - Changed Name/defines from "Geode GX" to "Geode GX1" for clarification

    - Dropped "-march=i586" in favor of "-march=i486"

    - Dopped X86_OOSTORE support for Geode GX1

    Signed-off-by: Kianusch Sayah Karadji
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kianusch Sayah Karadji
     
  • When I do a "diff -Nur arch/i386 arch/x86_64" to see what is different between these two
    architectures, I see some differences due to whitespace issues only. The attached patch removes
    some of the noise by fixing up the following files:
    - arch/i386/boot/bootsect.S
    - arch/i386/boot/video.S
    - arch/x86_64/boot/bootsect.S

    Signed-off-by: Daniel Dickman
    Signed-off-by: Domen Puncer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Domen Puncer
     
  • Fix cyrix section references:
    convert __initdata to __devinitdata.

    Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 00000379
    R_386_32 .init.data
    Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 00000399
    R_386_32 .init.data
    Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003b3
    R_386_32 .init.data
    Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003b9
    R_386_32 .init.data
    Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003bf
    R_386_32 .init.data

    Signed-of-by: maximilian attems

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

    maximilian attems
     
  • Kprobes could not handle the insertion of a probe on the ret/lret
    instruction and used to oops after single stepping since kprobes was
    modifying eip/rip incorrectly. Adjustment of eip/rip is not required after
    single stepping in case of ret/lret instruction, because eip/rip points to
    the correct location after execution of the ret/lret instruction. This
    patch fixes the above problem.

    Signed-off-by: Prasanna S Panchamukhi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Prasanna S Panchamukhi
     
  • Remove some definitions and declarations from arch/um/include/skas_ptrace.h,
    as they have moved to arch/um/include/sysdep/skas_ptrace.h

    Also, remove PTRACE_SIGPENDING support in UML at all.

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

    Bodo Stroesser
     
  • UML: remove no longer needed arch-signal.h

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

    Bodo Stroesser
     
  • s390 passes parameters in registers. So the only safe way to find out the
    address of signal context, error-address and error-type (trap_no), which are
    passed to signal handlers as parameters, is to declare these parameters.

    So I inserted an subarch-specific macro which holds the declaration of
    parameters for signal handlers.

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

    Bodo Stroesser
     
  • s390 has fast read access to realtime clock (nanosecond resolution). So it
    makes sense to have an arch-specific implementation not only of __delay, but
    __udelay also.

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

    Bodo Stroesser
     
  • Checksum handling largely depends on the subarch.

    Thus, I renamed i386 arch_csum_partial in arch/um/sys-i386/checksum.S back to
    csum_partial, removed csum_partial from arch/um/kernel/checksum.c and shifted
    EXPORT_SYMBOL(csum_partial) to arch/um/sys-i386/ksyms.c.

    Then, csum_partial_copy_to and csum_partial_copy_from were shifted from
    arch/um/kernel/checksum.c to arch/um/include/sysdep-i386/checksum.h and
    inserted in the calling functions csum_partial_copy_from_user() and
    csum_and_copy_to_user().

    Now, arch/um/kernel/checksum.c is empty and removed.

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

    Bodo Stroesser
     
  • This patch make elh.h a symlink to the new arch-specific include files of the
    form elf-.h, as in the same way already is done for some other
    includes. Also moves Elf-stuff from archparam-.h and elf.h to the
    new elf-.h files.

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

    Bodo Stroesser
     
  • The completion cleanup got rid of some semaphores, but didn't remove the
    inclusion of asm/semaphore.h from xterm_kern.c.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Just some breaking of some overly-long lines.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • This makes SIGWINCH work again, and fixes a couple of SIGWINCH-associated
    crashes. First, the sigio thread disables SIGWINCH because all hell breaks
    loose if it ever gets one and tries to call the signal handling code. Second,
    there was a problem with deferencing tty structs after they were freed. The
    SIGWINCH support for a tty wasn't being turned off or freed after the tty went
    away.

    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • This patch removes the arch-specific fault/trap-infos from thread and
    skas-regs.

    It adds a new struct faultinfo, that is arch-specific defined in
    sysdep/faultinfo.h.

    The structure is inserted in thread.arch and thread.regs.skas and
    thread.regs.tt

    Now, segv and other trap-handlers can copy the contents from regs.X.faultinfo
    to thread.arch.faultinfo with one simple assignment.

    Also, the number of macros necessary is reduced to

    FAULT_ADDRESS(struct faultinfo)
    extracts the faulting address from faultinfo

    FAULT_WRITE(struct faultinfo)
    extracts the "is_write" flag

    SEGV_IS_FIXABLE(struct faultinfo)
    is true for the fixable segvs, i.e. (TRAP == 14)
    on i386

    UPT_FAULTINFO(regs)
    result is (struct faultinfo *) to the faultinfo
    in regs->skas.faultinfo

    GET_FAULTINFO_FROM_SC(struct faultinfo, struct sigcontext *)
    copies the relevant parts of the sigcontext to
    struct faultinfo.

    On SIGSEGV, call user_signal() instead of handle_segv(), if the architecture
    provides the information needed in PTRACE_FAULTINFO, or if PTRACE_FAULTINFO is
    missing, because segv-stub will provide the info.

    The benefit of the change is, that in case of a non-fixable SIGSEGV, we can
    give user processes a SIGSEGV, instead of possibly looping on pagefault
    handling.

    Since handle_segv() sikked arch_fixup() implicitly by passing ip==0 to segv(),
    I changed segv() to call arch_fixup() only, if !is_user.

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

    Bodo Stroesser
     
  • This fixes write_ldt_entry to treat userspace_pid as an array.

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

    Jeff Dike
     
  • O=... builds support. Very easy, actually.

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

    Al Viro
     
  • make distclean et.al. are missing arch/um/sys-x86_64/utils; fixed the same
    way we have it done for sys-i386 counterpart.

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

    Al Viro
     
  • helpers in arch/um/util (mk_task and mk_constants) converted. That's it -
    none of the helpers depends on build and target being the same architecture
    anymore.

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

    Al Viro
     
  • mk_thread converted

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

    Al Viro