12 Feb, 2007

40 commits

  • - update documentation

    - use clear_bdi_congested/set_bdi_congested functions directly instead of
    old wrappers

    - removed DECLARE_BUF_AS_STRING macro

    Signed-off-by: Thomas Maier
    Cc: Peter Osterlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Maier
     
  • Use attribute(weak).

    Signed-off-by: Alexey Dobriyan
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • - Lindent the code
    - allow semicolons after macros by 'do {} while (0)'
    - eliminate C++ comments

    Signed-off-by: Jiri Slaby
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • serial167, cleanup

    - Lindent the code
    - remove 3 pointers from paranoia_check

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

    Jiri Slaby
     
  • gm_lock is useless, since ISA is configured at init time and there it's
    serialized.

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

    Jiri Slaby
     
  • Mark some funcions with __init and __devinit.

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

    Jiri Slaby
     
  • This one was pointed out on the MOKB site:
    http://kernelfun.blogspot.com/2006/11/mokb-09-11-2006-linux-26x-ext2checkpage.html

    If a directory's i_size is corrupted, ext2_find_entry() will keep
    processing pages until the i_size is reached, even if there are no more
    blocks associated with the directory inode. This patch puts in some
    minimal sanity-checking so that we don't keep checking pages (and issuing
    errors) if we know there can be no more data to read, based on the block
    count of the directory inode.

    This is somewhat similar in approach to the ext3 patch I sent earlier this
    year.

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

    Eric Sandeen
     
  • Mathieu originally needed to add this for tracing Xen, but it's something
    that's needed for any application that can be tracing while cpus are added.

    unplug isn't supported by this patch. The thought was that at minumum a new
    buffer needs to be added when a cpu comes up, but it wasn't worth the effort
    to remove buffers on cpu down since they'd be freed soon anyway when the
    channel was closed.

    [zanussi@us.ibm.com: avoid lock_cpu_hotplug deadlock]
    Signed-off-by: Mathieu Desnoyers
    Cc: Tom Zanussi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • Update the serial_txx9 driver.

    * Configurable manumum port number. (SERIAL_TXX9_NR_UARTS)
    * Remove some code which is unneeded if CONFIG_PM=n.
    * Use PCI_DEVICE() for pci device id table and make it const.
    * Do not include

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

    Atsushi Nemoto
     
  • Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
    corresponding "kmem_cache_zalloc()" call.

    Signed-off-by: Robert P. J. Day
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Roland McGrath
    Cc: James Bottomley
    Cc: Greg KH
    Acked-by: Joel Becker
    Cc: Steven Whitehouse
    Cc: Jan Kara
    Cc: Michael Halcrow
    Cc: "David S. Miller"
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Add proper prototypes for two functions in drivers/char/vc_screen.c

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

    Adrian Bunk
     
  • Userspace should be worrying about userspace, so having the socket.h
    and stat.h pollute the namespace in the non-glibc case is wrong and
    pretty much prevents any other libc from utilizing these headers
    sanely unless they set up the __GLIBC__ define themselves (which
    sucks)

    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • The line discipline numbers N_* are currently defined for each architecture
    individually, but (except for a seeming mistake) identically, in
    asm/termios.h. There is no obvious reason why these numbers should be
    architecture specific, nor any apparent relationship with the termios
    structure. The total number of these, NR_LDISCS, is defined in linux/tty.h
    anyway. So I propose the following patch which moves the definitions of
    the individual line disciplines to linux/tty.h too.

    Three of these numbers (N_MASC, N_PROFIBUS_FDL, and N_SMSBLOCK) are unused
    in the current kernel, but the patch still keeps the complete set in case
    there are plans to use them yet.

    Signed-off-by: Tilman Schmidt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tilman Schmidt
     
  • When igrab() is calling __iget() on an inode it should check if
    clear_inode() has been called on the inode already. Otherwise there is a
    race window between clear_inode() and destroy_inode() where igrab() calls
    __iget() which leads to already free inodes on the inode lists.

    Signed-off-by: Vandana Rungta
    Signed-off-by: Jan Blunck
    Cc: Al Viro
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • Generate locking graph information into /proc/lockdep, for lock hierarchy
    documentation and visualization purposes.

    sample output:

    c089fd5c OPS: 138 FD: 14 BD: 1 --..: &tty->termios_mutex
    -> [c07a3430] tty_ldisc_lock
    -> [c07a37f0] &port_lock_key
    -> [c07afdc0] &rq->rq_lock_key#2

    The lock classes listed are all the first-hop lock dependencies that
    lockdep has seen so far.

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

    Jason Baron
     
  • - returns after DEBUG_LOCKS_WARN_ON added in 3 places

    - debug_locks checking after lookup_chain_cache() added in
    __lock_acquire()

    - locking for testing and changing global variable max_lockdep_depth
    added in __lock_acquire()

    From: Ingo Molnar

    My __acquire_lock() cleanup introduced a locking bug: on SMP systems we'd
    release a non-owned graph lock. Fix this by moving the graph unlock back,
    and by leaving the max_lockdep_depth variable update possibly racy. (we
    dont care, it's just statistics)

    Also add some minimal debugging code to graph_unlock()/graph_lock(),
    which caught this locking bug.

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

    Jarek Poplawski
     
  • kmem_cache_free() was missing the check for freeing held locks.

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

    Ingo Molnar
     
  • Kill acquired_tasklist_lock, sig_needs_tasklist() is very cheap nowadays.

    Signed-off-by: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • tty_wakeup cleanup

    - remove wake_up_interruptible(&tty->write_wait) surrounding
    tty_wakup(tty);
    - substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty);

    Signed-off-by: Jiri Slaby
    Cc: Alan Cox
    Acked-by: Tilman Schmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Don't forget to decrease card_count in fail paths and in remove function.
    Also null board->base in such cases to point out, that this structure is
    unused and thus can be reassigned.

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

    Jiri Slaby
     
  • Add support for higher baud rates (coming from original isi driver).

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

    Jiri Slaby
     
  • Check if the card really interrupted us by reading its IO space and eventualy
    return IRQ_NONE.

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

    Jiri Slaby
     
  • isicom, augment card_reset

    - add 0xee to signatures
    - change long delays to sleeps
    - make one sleep shorter not to wait 3s
    - portcount == 16 is also correct

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

    Jiri Slaby
     
  • 2 spin_unlocks are omitted in the interrupt handler. Put them there to fix up
    deadlocking on UP.

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

    Jiri Slaby
     
  • Signed-off-by: Adrian Bunk
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Removes an unused and ambiguous redefinition of INIT_WORK()

    Signed-off-by: Andreas Jaggi
    Acked-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Jaggi
     
  • I added IS_NOATIME(inode) macro definition in include/linux/fs.h, true if
    the inode superblock is marked readonly or noatime.

    This new macro is then used in touch_atime() instead of separatly testing
    MS_RDONLY and MS_NOATIME

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

    Eric Dumazet
     
  • I noticed cache misses in touch_atime() that can be avoided if we keep
    mnt_count & mnt_expiry_mark in a different cache line than mnt_flags
    (mostly read)

    mnt_count & mnt_expiry_mark are modified each time a file is opened/closed
    in a file system.

    touch_atime() is called each time a file is read, and generally needs to
    read mnt_flags.

    Other fields of struct vfsmount are mostly read so I chose to move
    mnt_count & mnt_expiry_mark at the end of struct vfsmount. And adding a
    comment so that nobody tries to re-arrange fields to fill the holes :)

    On 64bits platforms, the new offsetof(mnt_count) is 0xC0
    On 32bits platforms, it is 0x60, so I didnot add a
    ____cacheline_aligned_in_smp because it would have a too big impact on the
    size of this object (in particular if CONFIG_X86_L1_CACHE_SHIFT=7)

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

    Eric Dumazet
     
  • - tty_hangup() itself schedules work, so there is no need to schedule hangup
    in the driver

    - tty_wakeup(): it's safe to call it while in atomic, so that its
    schedule_work might be also wiped out

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • The SGI IOC3 and IOC4 PCI devices implement memory space apertures, not I/O
    space apertures. Use the appropriate region management functions.

    Signed-off-by: Brent Casavant
    Cc: Pat Gefre
    Cc: Stanislaw Skowronek
    Cc: Brent Casavant
    Acked-by: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brent Casavant
     
  • Extend usr/gen_init_cpio.c "file" entry, adding support for hard links.

    Previous format:
    file

    New format:
    file []

    The hard links specification is optional, keeping the previous
    behaviour.

    All hard links are defined sequentially in the resulting cpio and the
    file data is present only in the last link. This is the behaviour of
    GNU's cpio and is supported by the kernel initramfs extractor.

    Signed-off-by: Luciano Rocha
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Luciano Rocha
     
  • Update all arch/*/kernel/vmlinux.lds.S to not include space for initramfs
    when CONFIG_BLK_DEV_INITRAMFS is not selected. This saves another 4 kbytes
    on most platfoms (some reserve PAGE_SIZE for initramfs).

    Signed-off-by: Jean-Paul Saman
    Cc: Al Viro
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean-Paul Saman
     
  • The file init/initramfs.c is always compiled and linked in the kernel
    vmlinux even when BLK_DEV_RAM and BLK_DEV_INITRD are disabled and the
    system isn't using any form of an initramfs or initrd. In this situation
    the code is only used to unpack a (static) default initial rootfilesystem.
    The current init/initramfs.c code. usr/initramfs_data.o compiles to a size
    of ~15 kbytes. Disabling BLK_DEV_RAM and BLK_DEV_INTRD shrinks the kernel
    code size with ~60 Kbytes.

    This patch avoids compiling in the code and data for initramfs support if
    CONFIG_BLK_DEV_INITRD is not defined. Instead of the initramfs code and
    data it uses a small routine in init/noinitramfs.c to setup an initial
    static default environment for mounting a rootfilesystem later on in the
    kernel initialisation process. The new code is: 164 bytes of size.

    The patch is separated in two parts:
    1) doesn't compile initramfs code when CONFIG_BLK_DEV_INITRD is not set
    2) changing all plaforms vmlinux.lds.S files to not reserve an area of
    PAGE_SIZE when CONFIG_BLK_DEV_INITRD is not set.

    [deweerdt@free.fr: warning fix]
    Signed-off-by: Jean-Paul Saman
    Cc: Al Viro
    Cc:
    Signed-off-by: Frederik Deweerdt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean-Paul Saman
     
  • tty_wakeup calls wake_up_interruptible(&tty->write_wait) itself, it's not
    needed to wake up again after tty_wakeup returns.

    Signed-off-by: Jiri Slaby
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • - Prevent things like this:

    block/ll_rw_blk.c: In function 'submit_bio':
    block/ll_rw_blk.c:3222: warning: unused variable 'count'

    inlines are very, very preferable to macros.

    - remove unused get_cpu_vm_events() macro

    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • include/linux/byteorder/pdp_endian.h is completely unused, and the comment in
    the file itself states that it's both untested and only a proof-of-concept.

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

    Adrian Bunk
     
  • currently it's
    1) if *oldlenp == 0,
    don't writeback anything

    2) if *oldlenp >= table->maxlen,
    don't writeback more than table->maxlen bytes and rewrite *oldlenp
    don't look at underlying type granularity

    3) if 0 < *oldlenp < table->maxlen,
    *cough*
    string sysctls don't writeback more than *oldlenp bytes.
    OK, that's because sizeof(char) == 1

    int sysctls writeback anything in (0, table->maxlen] range
    Though accept integers divisible by sizeof(int) for writing.

    sysctl_jiffies and sysctl_ms_jiffies don't writeback anything but
    sizeof(int), which violates 1) and 2).

    So, make sysctl_jiffies and sysctl_ms_jiffies accept
    a) *oldlenp == 0, not doing writeback
    b) *oldlenp >= sizeof(int), writing one integer.

    -EINVAL still returned for *oldlenp == 1, 2, 3.

    Signed-off-by: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • This does several things.
    - It moves looking up of the current foreground console into process
    context where we can safely take the semaphore that protects this
    operation.
    - It uses the new flavor of work queue processing.
    - This generates a factor of do_SAK, __do_SAK that runs immediately.
    - This calls __do_SAK with the console semaphore held ensuring nothing
    else happens to the console while we process the SAK operation.
    - With the console SAK processing moved into process context this
    patch removes the xchg operations that I used to attempt to attomically
    update struct pid, because of the strange locking used in the SAK processing.
    With SAK using the normal console semaphore nothing special is needed.

    Cc: Oleg Nesterov
    Signed-off-by: Eric W. Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Add retain_initrd option to control freeing of initrd memory after
    extraction. By default, free memory as previously.

    The first boot will need to hold a copy of the in memory fs for the second
    boot. This image can be large (much larger than the kernel), hence we can
    save time when the memory loader is slow. Also, it reduces the memory
    footprint while extracting the first boot since you don't need another copy
    of the fs.

    Signed-off-by: Michael Neuling
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Neuling
     
  • Add support for auxiliary displays, the ks0108 LCD controller, the
    cfag12864b LCD and adds a framebuffer device: cfag12864bfb.

    - Add a "auxdisplay/" folder in "drivers/" for auxiliary display
    drivers.

    - Add support for the ks0108 LCD Controller as a device driver. (uses
    parport interface)

    - Add support for the cfag12864b LCD as a device driver. (uses ks0108
    LCD Controller driver)

    - Add a framebuffer device called cfag12864bfb. (uses cfag12864b LCD
    driver)

    - Add the usual Documentation, includes, Makefiles, Kconfigs,
    MAINTAINERS, CREDITS...

    - Miguel Ojeda will maintain all the stuff above.

    [rdunlap@xenotime.net: workqueue fixups]
    [akpm@osdl.org: kconfig fix]
    Signed-off-by: Miguel Ojeda Sandonis
    Cc: Greg KH
    Acked-by: Paulo Marques
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miguel Ojeda Sandonis