11 Sep, 2005

7 commits

  • Replace schedule_timeout() with msleep() to guarantee the task delays as
    expected.

    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Domen Puncer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     
  • Convert the initializers of hw_interrupt_type structures to C99 initializers.

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

    Thomas Gleixner
     
  • Convert the initializers of hw_interrupt_type structures to C99 initializers.

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

    Thomas Gleixner
     
  • Convert the initializers of hw_interrupt_type structures to C99 initializers.

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

    Thomas Gleixner
     
  • Convert the initializers of hw_interrupt_type structures to C99 initializers.

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

    Thomas Gleixner
     
  • Randy cleaned out the bulk of these stale references to the now long gone
    Documentation/smp.tex back in 2004. I followed this up with a few more
    sweeps. Somehow, these have managed to sneak back in since.

    I can't seem to figure out a contact point for M32R (no one listed in
    MAINTAINERS!), but, these patches are only but trivial.

    Signed-off-by: Arthur Othieno
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Othieno
     
  • This patch (written by me and also containing many suggestions of Arjan van
    de Ven) does a major cleanup of the spinlock code. It does the following
    things:

    - consolidates and enhances the spinlock/rwlock debugging code

    - simplifies the asm/spinlock.h files

    - encapsulates the raw spinlock type and moves generic spinlock
    features (such as ->break_lock) into the generic code.

    - cleans up the spinlock code hierarchy to get rid of the spaghetti.

    Most notably there's now only a single variant of the debugging code,
    located in lib/spinlock_debug.c. (previously we had one SMP debugging
    variant per architecture, plus a separate generic one for UP builds)

    Also, i've enhanced the rwlock debugging facility, it will now track
    write-owners. There is new spinlock-owner/CPU-tracking on SMP builds too.
    All locks have lockup detection now, which will work for both soft and hard
    spin/rwlock lockups.

    The arch-level include files now only contain the minimally necessary
    subset of the spinlock code - all the rest that can be generalized now
    lives in the generic headers:

    include/asm-i386/spinlock_types.h | 16
    include/asm-x86_64/spinlock_types.h | 16

    I have also split up the various spinlock variants into separate files,
    making it easier to see which does what. The new layout is:

    SMP | UP
    ----------------------------|-----------------------------------
    asm/spinlock_types_smp.h | linux/spinlock_types_up.h
    linux/spinlock_types.h | linux/spinlock_types.h
    asm/spinlock_smp.h | linux/spinlock_up.h
    linux/spinlock_api_smp.h | linux/spinlock_api_up.h
    linux/spinlock.h | linux/spinlock.h

    /*
    * here's the role of the various spinlock/rwlock related include files:
    *
    * on SMP builds:
    *
    * asm/spinlock_types.h: contains the raw_spinlock_t/raw_rwlock_t and the
    * initializers
    *
    * linux/spinlock_types.h:
    * defines the generic type and initializers
    *
    * asm/spinlock.h: contains the __raw_spin_*()/etc. lowlevel
    * implementations, mostly inline assembly code
    *
    * (also included on UP-debug builds:)
    *
    * linux/spinlock_api_smp.h:
    * contains the prototypes for the _spin_*() APIs.
    *
    * linux/spinlock.h: builds the final spin_*() APIs.
    *
    * on UP builds:
    *
    * linux/spinlock_type_up.h:
    * contains the generic, simplified UP spinlock type.
    * (which is an empty structure on non-debug builds)
    *
    * linux/spinlock_types.h:
    * defines the generic type and initializers
    *
    * linux/spinlock_up.h:
    * contains the __raw_spin_*()/etc. version of UP
    * builds. (which are NOPs on non-debug, non-preempt
    * builds)
    *
    * (included on UP-non-debug builds:)
    *
    * linux/spinlock_api_up.h:
    * builds the _spin_*() APIs.
    *
    * linux/spinlock.h: builds the final spin_*() APIs.
    */

    All SMP and UP architectures are converted by this patch.

    arm, i386, ia64, ppc, ppc64, s390/s390x, x64 was build-tested via
    crosscompilers. m32r, mips, sh, sparc, have not been tested yet, but should
    be mostly fine.

    From: Grant Grundler

    Booted and lightly tested on a500-44 (64-bit, SMP kernel, dual CPU).
    Builds 32-bit SMP kernel (not booted or tested). I did not try to build
    non-SMP kernels. That should be trivial to fix up later if necessary.

    I converted bit ops atomic_hash lock to raw_spinlock_t. Doing so avoids
    some ugly nesting of linux/*.h and asm/*.h files. Those particular locks
    are well tested and contained entirely inside arch specific code. I do NOT
    expect any new issues to arise with them.

    If someone does ever need to use debug/metrics with them, then they will
    need to unravel this hairball between spinlocks, atomic ops, and bit ops
    that exist only because parisc has exactly one atomic instruction: LDCW
    (load and clear word).

    From: "Luck, Tony"

    ia64 fix

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Grant Grundler
    Cc: Matthew Wilcox
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Mikael Pettersson
    Signed-off-by: Benoit Boissinot
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

10 Sep, 2005

33 commits

  • Linus Torvalds
     
  • This fixes the problem with "Averatec 6240 pcmcia_socket0: unable to
    apply power", which was due to the CardBus IOMEM register region being
    allocated at an address that was actually inside the RAM window that had
    been reserved for video frame-buffers in an UMA setup.

    The BIOS _should_ have marked that region reserved in the e820 memory
    descriptor tables, but did not.

    It is fixed by rounding up the default starting address of PCI memory
    allocations, so that we leave a bigger gap after the final known memory
    location. The amount of rounding depends on how big the unused memory
    gap is that we can allocate IOMEM from.

    Based on example code by Linus.

    Acked-by: Greg KH
    Acked-by: Ivan Kokshaysky
    Signed-off-by: Linus Torvalds

    Daniel Ritz
     
  • This adds a lost fput in 32bit tiocgdev ioctl on x86-64

    [ chrisw: Updated to use fget_light/fput_light ]

    Signed-Off-By: Kirill Korotaev
    Signed-Off-By: Maxim Giryaev
    Signed-off-by: Chris Wright
    Signed-off-by: Linus Torvalds

    Kirill Korotaev
     
  • um has it own set of files for asm-offsets. So for now the
    gen-asm-offset macro is just duplicated in the um Makefile.

    This may well be the final solution since um is a bit special compared
    to other architectures - time will tell.

    Also added a dummy arch/um/kernel/asm-offsets.h file to keep kbuild happy.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • This converts the final 20 DEFINE_SPINLOCK holdouts. (another 580 places
    are already using DEFINE_SPINLOCK). Build tested on x86.

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

    Ingo Molnar
     
  • Clean up timer initialization by introducing DEFINE_TIMER a'la
    DEFINE_SPINLOCK. Build and boot-tested on x86. A similar patch has been
    been in the -RT tree for some time.

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

    Ingo Molnar
     
  • This patch add the plateform specific stuff needed to configure and use the
    driver.

    Signed-Off-By: Arnaud Patard
    Signed-off-by: Antonino Daplas
    Cc: Russell King
    Cc: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaud Patard
     
  • For the i386, code is already present in video.S that gets the EDID from the
    video BIOS. Make this visible so drivers can also use this data as fallback
    when i2c does not work.

    To ensure that the EDID block is returned for the primary graphics adapter
    only, by check if the IORESOURCE_ROM_SHADOW flag is set.

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

    Antonino A. Daplas
     
  • Add rudimentary support by manipulating the VGA registers. However, not
    all vesa modes are VGA compatible, so VGA compatiblity is checked first.
    Only 2 levels are supported, powerup and powerdown.

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

    Antonino A. Daplas
     
  • With the use of RCU in files structure, the look-up of files using fds can now
    be lock-free. The lookup is protected by rcu_read_lock()/rcu_read_unlock().
    This patch changes the readers to use lock-free lookup.

    Signed-off-by: Maneesh Soni
    Signed-off-by: Ravikiran Thirumalai
    Signed-off-by: Dipankar Sarma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dipankar Sarma
     
  • Fix sparc64 timod to use the new files_fdtable() api to get the fd table.
    This is necessary for RCUification.

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

    Dipankar Sarma
     
  • In order for the RCU to work, the file table array, sets and their sizes must
    be updated atomically. Instead of ensuring this through too many memory
    barriers, we put the arrays and their sizes in a separate structure. This
    patch takes the first step of putting the file table elements in a separate
    structure fdtable that is embedded withing files_struct. It also changes all
    the users to refer to the file table using files_fdtable() macro. Subsequent
    applciation of RCU becomes easier after this.

    Signed-off-by: Dipankar Sarma
    Signed-Off-By: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dipankar Sarma
     
  • For architecture like ia64, the switch stack structure is fairly large
    (currently 528 bytes). For context switch intensive application, we found
    that significant amount of cache misses occurs in switch_to() function.
    The following patch adds a hook in the schedule() function to prefetch
    switch stack structure as soon as 'next' task is determined. This allows
    maximum overlap in prefetch cache lines for that structure.

    Signed-off-by: Ken Chen
    Cc: Ingo Molnar
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen, Kenneth W
     
  • arch/alpha/kernel/module.c:process_reloc_for_got(), which figures out how big
    the .got section for a module should be, appears to be confusing r_offset (the
    file offset that the relocation needs to be applied to) with r_addend (the
    offset of the relocation's actual target address from the address of the
    relocation's symbol). Because of this, one .got entry is allocated for each
    relocation instead of one each unique symbol/addend.

    In the module I am working with, this causes the .got section to be almost 10
    times larger than it needs to be (75544 bytes instead of 7608 bytes). As the
    .got is accessed with global-pointer-relative instructions, it needs to be
    within the 64k gp "zone", and a 75544 byte .got clearly does not fit. The
    result of this is that relocation overflows are detected during module load
    and the load is aborted.

    Change struct got_entry/process_reloc_for_got to fix this.

    Acked-by: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chaskiel Grundman
     
  • enforce_max_cpus nukes out cpu_present_map and cpu_possible_map making it
    impossible to add new cpus in the system. Since it doesnt provide any
    additional value apart this call and reference is removed.

    Signed-off-by: Ashok Raj
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashok Raj
     
  • The use of non-shortcut version of routines breaking CPU hotplug. The option
    to select this via cmdline also is deleted with the physflat patch, hence
    directly placing this code under CONFIG_HOTPLUG_CPU.

    We dont want to use broadcast mode IPI's when hotplug is enabled. This causes
    bad effects in send IPI to a cpu that is offline which can trip when the cpu
    is in the process of being kicked alive.

    Signed-off-by: Ashok Raj
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashok Raj
     
  • This is the same issue as ppc64 before, when returning to userland we
    shouldn't re-compute the seccomp check or the task could be killed during
    sigreturn when orig_eax is overwritten by the sigreturn syscall. This was
    found by Roland.

    This was harmless from a security standpoint, but some i686 users reported
    failures with auditing enabled system wide (some distro surprisingly makes
    it the default) and I reproduced it too by keeping the whole workload under
    strace -f.

    Patch is tested and works for me under strace -f.

    nobody@athlon:~/cpushare> strace -o /tmp/o -f python seccomp_test.py
    make: Nothing to be done for `seccomp_test'.
    Starting computing some malicious bytecode
    init
    load
    start
    stop
    receive_data failure
    kill
    exit_code 0 signal 9
    The malicious bytecode has been killed successfully by seccomp
    Starting computing some safe bytecode
    init
    load
    start
    stop
    174 counts
    kill
    exit_code 0 signal 0
    The seccomp_test.py completed successfully, thank you for testing.

    (akpm: collaterally cleaned up a bit of do_syscall_trace() too)

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

    Andrea Arcangeli
     
  • Add TANBAC TB0287 support.

    Signed-off-by: Yoichi Yuasa
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoichi Yuasa
     
  • The following patch changes the usages of PVR_440* into strcmp's with the
    cpu_name field, and removes the defines altogether. The Ebony portion was
    briefly tested long ago. One benefit of moving from PVR-tests to string
    tests in general is that not all CPUs can be on and be able to do this type
    of comparison.

    See http://patchwork.ozlabs.org/linuxppc/patch?id=1250 for the original
    thread.

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

    Tom Rini
     
  • Modifies serial_init to get base baud rate from the rs_table entry instead
    of BAUD_BASE. This patch eliminates duplication between the
    SERIAL_PORT_DFNS macro and BAUD_BASE. Without the patch, if a port set the
    baud rate in SERIAL_PORT_DFNS, but did not update BASE_BAUD, the BASE_BAUD
    value would still be used.

    Signed-off-by: Grant Likely
    Signed-off-by: Tom Rini
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tom Rini
     
  • In the flush and invalidate bootcode on PPC4xx we were accidentally using
    the wrong instruction. Use cmplw, which reads from a register like we
    want.

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

    Frank van Maarseveen
     
  • Subject says it all, there is no need to link perfmon.o on
    sub-architectures other than CONFIG_E500.

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

    Marcelo Tosatti
     
  • Looks like the help comment for MPC834x got merged incorrectly.

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

    Kumar Gala
     
  • Remove the weird and apparently unnecessary logic in MP_processor_info() which
    assumes that the BSP is the first one to run MP_processor_info(). On one of
    my boxes that isn't true and cpu_possible_map gets the wrong value.

    Cc: Zwane Mwaikambo
    Cc: Alexander Nyberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Needed to get them to build.
    And a hint to avoid hardcoding to many constants in assembler.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Cris has a dedicated asm-offsets.c file per subarchitecture.
    So a symlink is created to put the desired asm-offsets.c file
    in $(ARCH)/kernel
    This is absolutely not good practice, but it was the trick
    used in the rest of the cris code.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Removed obsolete stuff from arch makefile.
    mips had a special rule for generating asm-offsets.h so preserved it
    using an architecture specific hook in top-level Kbuild file.
    Renamed .h file to asm-offsets.h

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Delete obsolete stuff from arch Makefile
    Rename file to asm-offsets.h
    The trick used in the arch Makefile to circumvent the circular
    dependency is kept.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Deleted obsolete stuff from arch makefile
    Renamed .c file to asm-offsets.h
    Fix include of asm-offsets.h to use new name

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Delete obsolete stuff from arch makefiles
    Rename .h file to asm-offsets.h

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Delete obsoleted stuff from arch Makefile and rename
    constants.h to asm-offsets.h

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Delete obsoleted parts form arch makefiles and rename to asm-offsets.h

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • Rename all includes to use asm-offsets.h to match generic name

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg