08 Dec, 2006

40 commits

  • - move some file_operations structs into the .rodata section

    - move static strings from policy_types[] array into the .rodata section

    - fix generic seq_operations usages, so that those structs may be defined
    as "const" as well

    [akpm@osdl.org: couple of fixes]
    Signed-off-by: Helge Deller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Helge Deller
     
  • Replace kmalloc+memset with kzalloc

    Signed-off-by: Yan Burman
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yan Burman
     
  • Replace kmalloc+memset with kzalloc

    Signed-off-by: Yan Burman
    CC: Ian Molton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yan Burman
     
  • Replace kmalloc+memset with kzalloc

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

    Yan Burman
     
  • Let's remove this pre-historic paride building script.

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • CONFIG_PARIDE depends on CONFIG_PARPORT_PC, so there's no reason for
    these #ifdef's.

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • cleanup asm-generic/atomic.h

    - no longer a userspace header
    - remove the unneeded #include
    - #else/#endif comments

    [akpm@osdl.org: fix arm build]
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • When disassembling a kernel I found around over 90 sync Instructions from
    mb, rmb and wmb calls in the kernel and only few of those make any sense to
    me. So here's the first one - I think the wmb() in kernel/futex.c is not
    needed on uniprocessors so should become an smb_wmb().

    Signed-off-by: Ralf Baechle
    Acked-by: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • sun3-list@redhat.com does no longer exist.

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

    Adrian Bunk
     
  • Fix compile errors on mismatch between generic HDLC and synclink drivers.

    Notes:

    generic HDLC support for synclink drivers is *optional* so you can't just
    use depend on in Kconfig

    This solution is deemed the best after 7 months of review and criticism by
    many developers including AKPM. Read the threads on LKML before posting
    about this solution.

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

    Paul Fulghum
     
  • This patch removes the unused NFSD_OPTIMIZE_SPACE.

    Additionally, it does differently what NFSD_OPTIMIZE_SPACE was supposed to do:

    Nowadays, gcc knows best when to inline code, and CONFIG_CC_OPTIMIZE_FOR_SIZE
    even tells gcc globally whether to optimize for size or for speed. Therefore,
    this patch also removes all inline's from these files.

    Signed-off-by: Adrian Bunk
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • "extern inline" generates a warning with -Wmissing-prototypes and I'm
    currently working on getting the kernel cleaned up for adding this to the
    CFLAGS since it will help us to avoid a nasty class of runtime errors.

    If there are places that really need a forced inline, __always_inline would be
    the correct solution.

    Signed-off-by: Adrian Bunk
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • "extern inline" generates a warning with -Wmissing-prototypes and I'm
    currently working on getting the kernel cleaned up for adding this to the
    CFLAGS since it will help us to avoid a nasty class of runtime errors.

    If there are places that really need a forced inline, __always_inline would be
    the correct solution.

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

    Adrian Bunk
     
  • [jengelh@linux01.gwdg.de: cleanups]
    Signed-off-by: Jan Engelhardt
    Acked-by: Torben Mathiasen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Torben Mathiasen
     
  • The SRCU wrapper functions srcu_torture_read_lock and
    srcu_torture_read_unlock in rcutorture intentionally change the SRCU
    context; annotate them accordingly, to avoid a warning.

    Signed-off-by: Josh Triplett
    Acked-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • Remove unused 'new_ruid' variable.

    Reported by David Binderman .

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

    David Rientjes
     
  • Removed unused 'have_pt_gnu_stack' variable.

    Reported by David Binderman

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

    David Rientjes
     
  • In time for 2.6.20, we can get rid of this junk.

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

    Adrian Bunk
     
  • If you do something like:

    # touch foo
    # tail -f foo &
    # rm foo
    #
    #

    you'll panic, because ext3/4 tries to do orphan list processing on the
    readonly snapshot device, and:

    kernel: journal commit I/O error
    kernel: Assertion failure in journal_flush_Rsmp_e2f189ce() at journal.c:1356: "!journal->j_checkpoint_transactions"
    kernel: Kernel panic: Fatal exception

    for a truly readonly underlying device, it's reasonable and necessary
    to just skip orphan list processing.

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

    Eric Sandeen
     
  • Add 3 more files to get "unifdef"ed when creating sanitized headers with
    "make headers_install".

    Signed-off-by: Robert P. J. Day
    Acked-by: David Woodhouse
    Acked-by: "John W. Linville"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mariusz Kozlowski
     
  • Signed-off-by: Mariusz Kozlowski
    Cc: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mariusz Kozlowski
     
  • Rename a poorly worded PCI ID for the Geode GX and CS5535 companion chips.
    The graphics processor and host bridge actually live in the northbridge on
    the integrated processor, not in the companion chip.

    Signed-off-by: Jordan Crouse
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jordan Crouse
     
  • Every file should #include the headers containing the prototypes for
    its global functions.

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

    Adrian Bunk
     
  • Commit c7bce3097c0f9bbed76ee6fd03742f2624031a45 removed all usages of
    baud_table[] but not the array itself.

    Spotted by the GNU C compiler.

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

    Adrian Bunk
     
  • Add a proper prototype for remove_inode_dquot_ref() in
    include/linux/quotaops.h

    Signed-off-by: Adrian Bunk
    Acked-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Remove two different changelog files from fs/sysv/ and merges the INTRO
    file into Documentation/filesystems/sysv-fs.txt

    Signed-off-by: Adrian Bunk
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Keith says

    Compiling 2.6.19-rc6 with gcc version 4.1.0 (SUSE Linux), wait_hpet_tick is
    optimized away to a never ending loop and the kernel hangs on boot in timer
    setup.

    0000001a :
    1a: 55 push %ebp
    1b: 89 e5 mov %esp,%ebp
    1d: eb fe jmp 1d

    This is not a problem with gcc 3.3.5. Adding barrier() calls to
    wait_hpet_tick does not help, making the variables volatile does.

    And the consensus is that gcc-4.1.0 is busted. Suse went and shipped
    gcc-4.1.0 so we cannot ban it. Add a warning.

    Cc: Keith Owens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The pl010 primecell documentation specifies that an error indicated via RSR
    should be cleared by a write to ECR. We didn't do this, which was causing
    errors to be re-reported on every call to pl010_rx_chars().

    Doing a write to ECR once we detect an error appears to prevent the ep93xx
    console UART driver from going into a mode where it reports "ttyAM0: X
    input overrun(s)" every couple of keystrokes.

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

    Lennert Buytenhek
     
  • winbond ide depends on idedma.
    Move the option into the IDEDMA section.

    drivers/built-in.o: In function `.sl82c105_ide_dma_timeout':
    sl82c105.c:(.text+0x624d0): undefined reference to `.__ide_dma_timeout'
    drivers/built-in.o: In function `.sl82c105_ide_dma_off_quietly':
    sl82c105.c:(.text+0x6274c): undefined reference to `.__ide_dma_off_quietly'
    drivers/built-in.o: In function `.sl82c105_ide_dma_on':
    sl82c105.c:(.text+0x6284c): undefined reference to `.__ide_dma_on'
    drivers/built-in.o: In function `.sl82c105_check_drive':
    sl82c105.c:(.text+0x628ec): undefined reference to `.__ide_dma_bad_drive'
    sl82c105.c:(.text+0x62934): undefined reference to `.__ide_dma_good_drive'
    drivers/built-in.o: In function `.sl82c105_ide_dma_start':
    sl82c105.c:(.text+0x62c24): undefined reference to `.ide_dma_start'
    make[1]: *** [.tmp_vmlinux1] Error 1

    Signed-off-by: Olaf Hering
    Acked-by: "Bartlomiej Zolnierkiewicz"
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     
  • [acme@newtoy net-2.6.20]$ pahole --cacheline 64 fs/inode.o inode
    /* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/linux/dcache.h:86 */
    struct inode {
    struct hlist_node i_hash; /* 0 8 */
    struct list_head i_list; /* 8 8 */
    struct list_head i_sb_list; /* 16 8 */
    struct list_head i_dentry; /* 24 8 */
    long unsigned int i_ino; /* 32 4 */
    atomic_t i_count; /* 36 4 */
    umode_t i_mode; /* 40 2 */

    /* XXX 2 bytes hole, try to pack */

    unsigned int i_nlink; /* 44 4 */
    uid_t i_uid; /* 48 4 */
    gid_t i_gid; /* 52 4 */
    dev_t i_rdev; /* 56 4 */
    loff_t i_size; /* 60 8 */
    struct timespec i_atime; /* 68 8 */
    struct timespec i_mtime; /* 76 8 */
    struct timespec i_ctime; /* 84 8 */
    unsigned int i_blkbits; /* 92 4 */
    long unsigned int i_version; /* 96 4 */
    blkcnt_t i_blocks; /* 100 4 */
    short unsigned int i_bytes; /* 104 2 */

    /* XXX 2 bytes hole, try to pack */

    spinlock_t i_lock; /* 108 40 */
    struct mutex i_mutex; /* 148 76 */
    struct rw_semaphore i_alloc_sem; /* 224 64 */
    struct inode_operations * i_op; /* 288 4 */
    const struct file_operations * i_fop; /* 292 4 */
    struct super_block * i_sb; /* 296 4 */
    struct file_lock * i_flock; /* 300 4 */
    struct address_space * i_mapping; /* 304 4 */
    struct address_space i_data; /* 308 188 */
    struct list_head i_devices; /* 496 8 */
    union ; /* 504 4 */
    int i_cindex; /* 508 4 */
    __u32 i_generation; /* 512 4 */
    /* ---------- cacheline 8 boundary ---------- */
    long unsigned int i_dnotify_mask; /* 516 4 */
    struct dnotify_struct * i_dnotify; /* 520 4 */
    struct list_head inotify_watches; /* 524 8 */
    struct mutex inotify_mutex; /* 532 76 */
    long unsigned int i_state; /* 608 4 */
    long unsigned int dirtied_when; /* 612 4 */
    unsigned int i_flags; /* 616 4 */
    atomic_t i_writecount; /* 620 4 */
    void * i_security; /* 624 4 */
    void * i_private; /* 628 4 */
    }; /* size: 632, sum members: 628, holes: 2, sum holes: 4 */

    [acme@newtoy net-2.6.20]$

    So just moving i_mode to after i_bytes we save 4 bytes by nuking both holes:

    [acme@newtoy net-2.6.20]$ codiff -V /tmp/inode.o.before fs/inode.o
    /pub/scm/linux/kernel/git/acme/net-2.6.20/fs/inode.c:
    struct inode | -4
    i_mode;
    from: umode_t /* 40(0) 2(0) */
    to: umode_t /* 102(0) 2(0) */
    1 struct changed
    [acme@newtoy net-2.6.20]$

    I've prunned all the other offset changes, only this one is of interest here.

    So now we have:

    [acme@newtoy net-2.6.20]$ pahole --cacheline 64 ../OUTPUT/qemu/net-2.6.20/fs/inode.o inode
    /* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/linux/dcache.h:86 */
    struct inode {
    struct hlist_node i_hash; /* 0 8 */
    struct list_head i_list; /* 8 8 */
    struct list_head i_sb_list; /* 16 8 */
    struct list_head i_dentry; /* 24 8 */
    long unsigned int i_ino; /* 32 4 */
    atomic_t i_count; /* 36 4 */
    unsigned int i_nlink; /* 40 4 */
    uid_t i_uid; /* 44 4 */
    gid_t i_gid; /* 48 4 */
    dev_t i_rdev; /* 52 4 */
    loff_t i_size; /* 56 8 */
    /* ---------- cacheline 1 boundary ---------- */
    struct timespec i_atime; /* 64 8 */
    struct timespec i_mtime; /* 72 8 */
    struct timespec i_ctime; /* 80 8 */
    unsigned int i_blkbits; /* 88 4 */
    long unsigned int i_version; /* 92 4 */
    blkcnt_t i_blocks; /* 96 4 */
    short unsigned int i_bytes; /* 100 2 */
    umode_t i_mode; /* 102 2 */
    spinlock_t i_lock; /* 104 40 */
    struct mutex i_mutex; /* 144 76 */
    struct rw_semaphore i_alloc_sem; /* 220 64 */
    struct inode_operations * i_op; /* 284 4 */
    const struct file_operations * i_fop; /* 288 4 */
    struct super_block * i_sb; /* 292 4 */
    struct file_lock * i_flock; /* 296 4 */
    struct address_space * i_mapping; /* 300 4 */
    struct address_space i_data; /* 304 188 */
    struct list_head i_devices; /* 492 8 */
    union ; /* 500 4 */
    int i_cindex; /* 504 4 */
    __u32 i_generation; /* 508 4 */
    /* ---------- cacheline 8 boundary ---------- */
    long unsigned int i_dnotify_mask; /* 512 4 */
    struct dnotify_struct * i_dnotify; /* 516 4 */
    struct list_head inotify_watches; /* 520 8 */
    struct mutex inotify_mutex; /* 528 76 */
    long unsigned int i_state; /* 604 4 */
    long unsigned int dirtied_when; /* 608 4 */
    unsigned int i_flags; /* 612 4 */
    atomic_t i_writecount; /* 616 4 */
    void * i_security; /* 620 4 */
    void * i_private; /* 624 4 */
    }; /* size: 628 */

    [acme@newtoy net-2.6.20]$

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnaldo Carvalho de Melo
     
  • This macro is broken and unused so why not remove it.

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

    Mariusz Kozlowski
     
  • The real time clocks ds1742 and ds1743 differs only in the size of the
    nvram. This patch changes the existing ds1742 driver to support also
    ds1743. The main change is that the nvram size is determined from the
    resource attached to the device.

    The patch have benefitted from suggestions from Atsushi Nemeto, who is the
    author of the ds1742 driver.

    Signed-off-by: Torsten Rasmussen Rasmussen
    Acked-by: Alessandro Zummo
    Acked-by: Atsushi Nemoto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Torsten Ertbjerg Rasmussen
     
  • It is possible to have tasklets get scheduled before softirqd has had a chance
    to spawn on all CPUs. This is totally harmless; after success during action
    CPU_UP_PREPARE, action CPU_ONLINE will be called, which immediately wakes
    softirqd on the appropriate CPU to process the already pending tasklets. So
    there is no danger of having a missed wakeup for any tasklets that were
    already pending.

    In particular, i386 is affected by this during startup, and is visible when
    using a very large initrd; during the time it takes for the initrd to be
    decompressed, a timer IRQ can come in and schedule RCU callbacks. It is also
    possible that resending of a hardware IRQ via a softirq triggers the same bug.

    Because of different timing conditions, this shows up in all emulators and
    virtual machines tested, including Xen, VMware, Virtual PC, and Qemu. It is
    also possible to trigger on native hardware with a large enough initrd,
    although I don't have a reliable case demonstrating that.

    Signed-off-by: Zachary Amsden
    Cc:
    Cc: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     
  • When kernel is compiled with old version of autofs (CONFIG_AUTOFS_FS), and
    new (observed at least with 5.x.x) automount deamon is started, kernel
    correctly reports incompatible version of kernel and userland daemon, but
    then screws things up instead of correct handling of the error:

    autofs: kernel does not match daemon version
    =====================================
    [ BUG: bad unlock balance detected! ]
    -------------------------------------
    automount/4199 is trying to release lock (&type->s_umount_key) at:
    [] get_sb_nodev+0x76/0xa4
    but there are no more locks to release!

    other info that might help us debug this:
    no locks held by automount/4199.

    stack backtrace:
    [] dump_trace+0x68/0x1b2
    [] show_trace_log_lvl+0x18/0x2c
    [] show_trace+0xf/0x11
    [] dump_stack+0x12/0x14
    [] print_unlock_inbalance_bug+0xe7/0xf3
    [] lock_release+0x8d/0x164
    [] up_write+0x14/0x27
    [] get_sb_nodev+0x76/0xa4
    [] vfs_kern_mount+0x83/0xf6
    [] do_kern_mount+0x2d/0x3e
    [] do_mount+0x607/0x67a
    [] sys_mount+0x72/0xa4
    [] sysenter_past_esp+0x5f/0x99
    DWARF2 unwinder stuck at sysenter_past_esp+0x5f/0x99
    Leftover inexact backtrace:
    =======================

    and then deadlock comes.

    The problem: autofs_fill_super() returns EINVAL to get_sb_nodev(), but
    before that, it calls kill_anon_super() to destroy the superblock which
    won't be needed. This is however way too soon to call kill_anon_super(),
    because get_sb_nodev() has to perform its own cleanup of the superblock
    first (deactivate_super(), etc.). The correct time to call
    kill_anon_super() is in the autofs_kill_sb() callback, which is called by
    deactivate_super() at proper time, when the superblock is ready to be
    killed.

    I can see the same faulty codepath also in autofs4. This patch solves
    issues in both filesystems in a same way - it postpones the
    kill_anon_super() until the proper time is signalized by deactivate_super()
    calling the kill_sb() callback.

    [raven@themaw.net: update comment]
    Signed-off-by: Jiri Kosina
    Acked-by: Ian Kent
    Cc:
    Signed-off-by: Ian Kent
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Kosina
     
  • The i2c and hwmon trees have moved to a new location.

    The lm-sensors project moved to a new home as well.

    Signed-off-by: Jean Delvare
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • Add suspend/resume methods to drivers/serial/8250_pnp.c. Tested on a
    P4/HT 16550A box, ttyS0 login survives across suspend to ram.

    [akpm@osdl.org: cleanups]
    Signed-off-by: Mike Galbraith
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Cc: Russell King
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Galbraith
     
  • Some people want to use ide_cd for CD-ROM but still dynamically load
    ide-scsi for things like tape drives. If you compile in the CD driver this
    works out but if you want them modular you need an option to ensure that
    whoever loads first the right things happen.

    This replaces the original draft patch which leaked a scsi host reference

    [akpm@osdl.org: add MODULE_PARM_DESC]
    Signed-off-by: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Make the locking self-test failures (of 'FAILURE' type) easier to debug by
    printing more information.

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

    Ingo Molnar
     
  • Some have reported a chain-table overflow - double its size.

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

    Ingo Molnar