28 Jul, 2005

36 commits

  • `gcc -W' likes to complain if the static keyword is not at the beginning of
    the declaration. This patch fixes all remaining occurrences of "inline
    static" up with "static inline" in the entire kernel tree (140 occurrences in
    47 files).

    While making this change I came across a few lines with trailing whitespace
    that I also fixed up, I have also added or removed a blank line or two here
    and there, but there are no functional changes in the patch.

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

    Jesper Juhl
     
  • This patch contains the following possible cleanups:
    - make two needlessly global structs static
    - #if 0 the EXPORT_SYMBOL'ed but unused function tveeprom_dump

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

    Adrian Bunk
     
  • Use tabs for formatting like anywhere else in this file.

    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • turn many #if $undefined_string into #ifdef $undefined_string to fix some
    warnings after -Wno-def was added to global CFLAGS

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

    Olaf Hering
     
  • The cache parameter to mb_cache_shrink isn't used. We may as well remove
    it.

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

    Andreas Gruenbacher
     
  • I believe that there is a problem with the handling of POSIX locks, which
    the attached patch should address.

    The problem appears to be a race between fcntl(2) and close(2). A
    multithreaded application could close a file descriptor at the same time as
    it is trying to acquire a lock using the same file descriptor. I would
    suggest that that multithreaded application is not providing the proper
    synchronization for itself, but the OS should still behave correctly.

    SUS3 (Single UNIX Specification Version 3, read: POSIX) indicates that when
    a file descriptor is closed, that all POSIX locks on the file, owned by the
    process which closed the file descriptor, should be released.

    The trick here is when those locks are released. The current code releases
    all locks which exist when close is processing, but any locks in progress
    are handled when the last reference to the open file is released.

    There are three cases to consider.

    One is the simple case, a multithreaded (mt) process has a file open and
    races to close it and acquire a lock on it. In this case, the close will
    release one reference to the open file and when the fcntl is done, it will
    release the other reference. For this situation, no locks should exist on
    the file when both the close and fcntl operations are done. The current
    system will handle this case because the last reference to the open file is
    being released.

    The second case is when the mt process has dup(2)'d the file descriptor.
    The close will release one reference to the file and the fcntl, when done,
    will release another, but there will still be at least one more reference
    to the open file. One could argue that the existence of a lock on the file
    after the close has completed is okay, because it was acquired after the
    close operation and there is still a way for the application to release the
    lock on the file, using an existing file descriptor.

    The third case is when the mt process has forked, after opening the file
    and either before or after becoming an mt process. In this case, each
    process would hold a reference to the open file. For each process, this
    degenerates to first case above. However, the lock continues to exist
    until both processes have released their references to the open file. This
    lock could block other lock requests.

    The changes to release the lock when the last reference to the open file
    aren't quite right because they would allow the lock to exist as long as
    there was a reference to the open file. This is too long.

    The new proposed solution is to add support in the fcntl code path to
    detect a race with close and then to release the lock which was just
    acquired when such as race is detected. This causes locks to be released
    in a timely fashion and for the system to conform to the POSIX semantic
    specification.

    This was tested by instrumenting a kernel to detect the handling locks and
    then running a program which generates case #3 above. A dangling lock
    could be reliably generated. When the changes to detect the close/fcntl
    race were added, a dangling lock could no longer be generated.

    Cc: Matthew Wilcox
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Staubach
     
  • The atomic64 primitives are supposed to have 64-bit parameters instead of int.

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

    Heiko Carstens
     
  • The find_next_{zero}_bit primitives on s390* should never return a bit number
    bigger then the bit field size. In the case of a bitfield that doesn't end on
    a word boundary, an offset that makes the search start at the last word of the
    bit field and the last word doesn't contain any zero/one bits the search is
    continued with a call to find_first_bit with a negative size. The search
    normally ends pretty quickly because the words following the bit field contain
    a mix of zeros and ones. But the bit number that is returned in this case is
    too big.

    To fix this and additional if to check for this case is needed. To make the
    code easier to read I removed the assembler parts from the
    find_next_{zero}_bit functions, the C-ified code is as good.

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

    Martin Schwidefsky
     
  • Split spin lock and r/w lock implementation into a single try which is done
    inline and an out of line function that repeatedly tries to get the lock
    before doing the cpu_relax(). Add a system control to set the number of
    retries before a cpu is yielded.

    The reason for the spin lock retry is that the diagnose 0x44 that is used to
    give up the virtual cpu is quite expensive. For spin locks that are held only
    for a short period of time the costs of the diagnoses outweights the savings
    for spin locks that are held for a longer timer. The default retry count is
    1000.

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

    Martin Schwidefsky
     
  • Signed-off-by: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miles Bader
     
  • These changes are untested (I no longer have the hardware).

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

    Miles Bader
     
  • Signed-off-by: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miles Bader
     
  • Signed-off-by: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miles Bader
     
  • Signed-off-by: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miles Bader
     
  • Signed-off-by: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miles Bader
     
  • New CRIS sub architecture named v32.

    From: Dave Jones

    Fix swapped kmalloc args

    Signed-off-by: Mikael Starvik
    Signed-off-by: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mikael Starvik
     
  • Patches to make CRIS work with 2.6.12.

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

    Mikael Starvik
     
  • Include file for synchronous serial port driver.

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

    Mikael Starvik
     
  • Patches to support SMP.

    * Each CPU has its own current_pgd.
    * flush_tlb_range is implemented as flush_tlb_mm.
    * Atomic operations implemented with spinlocks.
    * Semaphores implemented with spinlocks.

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

    Mikael Starvik
     
  • System-level profiler.

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

    Mikael Starvik
     
  • Patches to make it possible to add PCI support.

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

    Mikael Starvik
     
  • Memory management patches.

    * SMP support.
    * Non-executable stack (on v32).
    * 4-level page tables.
    * Added simple Thread Local Storage support.

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

    Mikael Starvik
     
  • * Start threads with IRQs enabled.
    * Move symbol exports to arch specific file.
    * Prepare for real command line in the future.
    * Handle csum for partition that crosses flash boundary.
    * Set utsname.

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

    Mikael Starvik
     
  • Use the generic IRQ framework

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

    Mikael Starvik
     
  • Added I/O and DMA allocators to be used by drivers.

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

    Mikael Starvik
     
  • Updates to device drivers.

    * Use I/O and DMA allocators.
    * Use wait_event_interruptible instead of interrutiple_sleep_on.
    * Added spinlocks SMP.
    * Changed restore_flags to local_irq_restore etc.
    * Updated IDE driver include to fit 2.6.12.

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

    Mikael Starvik
     
  • Changes necessary to make the sub-arch split complete.

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

    Mikael Starvik
     
  • Presently the LparMap, one of the structures the kernel shares with the
    legacy iSeries hypervisor has a fixed offset address in head.S. This patch
    changes this so the LparMap is a normally initialized structure, without
    fixed address. This allows us to use macros to compute some of the values
    in the structure, which wasn't previously possible because the assembler
    always uses signed-% which gets the wrong answers for the computations in
    question.

    Unfortunately, a gcc bug means that doing this requires another structure
    (hvReleaseData) to be initialized in asm instead of C, but on the whole the
    result is cleaner than before.

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

    David Gibson
     
  • PPC64 machines before Power4 need a segment table page allocated for each
    CPU. Currently these are allocated statically in a big array in head.S for
    all CPUs. The segment tables need to be in the first segment (so
    do_stab_bolted doesn't take a recursive fault on the stab itself), but
    other than that there are no constraints which require the stabs for the
    secondary CPUs to be statically allocated.

    This patch allocates segment tables dynamically during boot, using
    lmb_alloc() to ensure they are within the first 256M segment. This reduces
    the kernel image size by 192k...

    Tested on RS64 iSeries, POWER3 pSeries, and POWER5.

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

    David Gibson
     
  • The following trivial patch changes dma_map_page() to use page_to_bus()
    instead of open-coding it (incorrectly in some cases).

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

    Matt Porter
     
  • The UARTs on the MPC824x are unique devices and really shouldn't be thought
    of as a DUART. In addition, if both UARTs are in use we need to configure
    the part to enable the 2nd UART since the pins for the UARTs are
    multiplexed. Adds support to run the 824x Sandpoint with both UARTs if
    desired.

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

    Kumar Gala
     
  • Added a proper prototype for cpm2_reset() which gets rid of a build
    warning.

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

    Kumar Gala
     
  • Attached patch removes #ifdef CONFIG_WATCHDOG_NOWAYOUT mess duplicated in
    almost every watchdog driver and replaces it with common define in
    linux/watchdog.h.

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

    Andrey Panin
     
  • This patch adds support for the Olitec ISDN PCI card in the hisax gazel
    driver. The gazel driver supports this card, but wasn't aware of its PCI
    ids. Users used to modify the PCI ids of a supported card in
    include/linux/pci_ids.h and recompile their kernel to get this card
    running, as said in most Howtos. This patch makes the hisax gazel driver
    recognize the PCI ids of the Olitec ISDN PCI card.

    Signed-off-by: Olivier Blin
    Signed-off-by: Karsten Keil
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olivier Blin
     
  • One chunk was lost somewhere between my and Andrew's machine.

    Noticed by Victor Fusco.

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

    Alexey Dobriyan
     
  • include/asm/ptrace.h: In function `user_mode_vm':
    include/asm/ptrace.h:67: `VM_MASK' undeclared (first use in this function)

    Cc: Chuck Ebbert
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

27 Jul, 2005

4 commits