31 Oct, 2005

40 commits

  • (akpm: I don't do typo patches, but one of these is in a printk string)

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

    Jean Delvare
     
  • Add a kconfig submenu to select the default I/O scheduler, in case
    anticipatory is not compiled in or another default is preferred. Also,
    since no-op is always available, we should use it whenever the selected
    default is not.

    Signed-off-by: Nate Diller
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nate Diller
     
  • The majority of the sys_tkill() and sys_tgkill() function code is
    duplicated between the two of them. This patch pulls the duplication out
    into a separate function -- do_tkill() -- and lets sys_tkill() and
    sys_tgkill() be simple wrappers around it. This should make it easier to
    maintain in light of future changes.

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

    Vadim Lobanov
     
  • This lock is used in sigqueue_free(), but it is always equal to
    current->sighand->siglock, so we don't need to keep it in the struct
    sigqueue.

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

    Oleg Nesterov
     
  • de_thread() calls del_timer_sync(->real_timer) under ->sighand->siglock.
    This is deadlockable, it_real_fn sends a signal and needs this lock too.

    Also, delete unneeded ->real_timer.data assignment.

    Signed-off-by: Oleg Nesterov
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Now that RCU applied on 'struct file' seems stable, we can place f_rcuhead
    in a memory location that is not anymore used at call_rcu(&f->f_rcuhead,
    file_free_rcu) time, to reduce the size of this critical kernel object.

    The trick I used is to move f_rcuhead and f_list in an union called f_u

    The callers are changed so that f_rcuhead becomes f_u.fu_rcuhead and f_list
    becomes f_u.f_list

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

    Eric Dumazet
     
  • Add explicit text about
    - where menuconfig '/' (search) searches for strings,
    - that substrings are allowed, and
    - that regular expressions are supported.

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

    Randy Dunlap
     
  • Cleanup trailing whitespace, blank lines, CodingStyle issues etc, for
    lib/idr.c

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

    Jesper Juhl
     
  • The first two hunks of the patch really belongs in patch 1, but I missed
    them on the first pass and instead of redoing all 3 patches I stuck them in
    this one.

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

    Jesper Juhl
     
  • Removes a few pointless register keywords. register is merely a compiler
    hint that access to the variable should be optimized, but gcc (3.3.6 in my
    case) generates the exact same code with and without the keyword, and even
    if gcc did something different with register present I think it is doubtful
    we would want to optimize access to these variables - especially since this
    is generic library code and there are supposed to be optimized versions in
    asm/ for anything that really matters speed wise.

    (akpm: iirc, keyword register is a gcc no-op unless using -O0)

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

    Jesper Juhl
     
  • Removes some blank lines, removes some trailing whitespace, adds spaces
    after commas and a few similar changes.

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

    Jesper Juhl
     
  • The only call to ide_cdrom_capacity is in code protected by
    CONFIG_PROC_FS, so when that is not enabled, the compiler complains:

    drivers/ide/ide-cd.c:3259: warning: `ide_cdrom_capacity' defined but not used

    Here is a patch that fixes that. It provides some space savings for
    embedded systems that are not using procfs, as well:

    text data bss dec hex filename
    - 33540 6504 1032 41076 a074 drivers/ide/ide-cd.o
    + 33468 6480 1032 40980 a014 drivers/ide/ide-cd.o

    Signed-off-by: Amos Waterland
    Cc: Jens Axboe
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Amos Waterland
     
  • lookup_flags() is only called from the non-create case, so it needn't check
    for O_CREAT|O_EXCL.

    Signed-off-by: Miklos Szeredi
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • task_struct is an internal structure to the kernel with a lot of good
    information, that is probably interesting in core dumps. However there is
    no way for user space to know what format that information is in making it
    useless.

    I grepped the GDB 6.3 source code and NT_TASKSTRUCT while defined is not
    used anywhere else. So I would be surprised if anyone notices it is
    missing.

    In addition exporting kernel pointers to all the interesting kernel data
    structures sounds like the very definition of an information leak. I
    haven't a clue what someone with evil intentions could do with that
    information, but in any attack against the kernel it looks like this is the
    perfect tool for aiming that attack.

    So since NT_TASKSTRUCT is useless as currently defined and is potentially
    dangerous, let's just not export it.

    (akpm: Daniel Jacobowitz "would be amazed" if anything was
    using NT_TASKSTRUCT).

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

    Eric W. Biederman
     
  • Remove timer_list.magic and associated debugging code.

    I originally added this when a spinlock was added to timer_list - this meant
    that an all-zeroes timer became illegal and init_timer() was required.

    That spinlock isn't even there any more, although timer.base must now be
    initialised.

    I'll keep this debugging code in -mm.

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

    Andrew Morton
     
  • This patch makes the workqueus use alloc_percpu instead of an array. The
    workqueues are placed on nodes local to each processor.

    The workqueue structure can grow to a significant size on a system with
    lots of processors if this patch is not applied. 64 bit architectures with
    all debugging features enabled and configured for 512 processors will not
    be able to boot without this patch.

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

    Christoph Lameter
     
  • Removed some more references to check_region().

    I checked these changes into the 'checkreg' branch of
    rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git

    The only valid references remaining are in:
    drivers/scsi/advansys.c
    drivers/scsi/BusLogic.c
    drivers/cdrom/sbpcd.c
    sound/oss/pss.c

    Remove last vestiges of ide_check_region()
    drivers/char/specialix: trim trailing whitespace
    drivers/char/specialix: eliminate use of check_region()
    Remove outdated and unused references to check_region()
    [sound oss] remove check_region() usage from cs4232, wavfront
    [netdrvr eepro] trim trailing whitespace
    [netdrvr eepro] remove check_region() usage

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

    Jeff Garzik
     
  • Try to make the INIT_ENV_ARG_LIMIT help text more readable and
    understandable.

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

    Randy Dunlap
     
  • The last patch from Jens Axboe for drivers/block/paride/pf.c introduced
    pf_end_request() which sets pf_req to NULL.

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

    Norbert Kiesel
     
  • Fix bizarre 4-space coding style in the NTP code.

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

    Andrew Morton
     
  • Create a macro shift_right() that avoids the numerous ugly conditionals in the
    NTP code that look like:

    if(a < 0)
    b = -(-a >> shift);
    else
    b = a >> shift;

    Replacing it with:

    b = shift_right(a, shift);

    This should have zero effect on the logic, however it should probably have
    a bit of testing just to be sure.

    Also replace open-coded min/max with the macros.

    Signed-off-by : John Stultz

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

    john stultz
     
  • TIOCSTART and TIOCSTOP are defined in asm/ioctls.h and asm/termios.h by
    various architectures but not actually implemented anywhere but in the IRIX
    compatibility layer, so remove their COMPATIBLE_IOCTL from parisc, ppc64
    and sparc64.

    Move the TIOCSLTC COMPATIBLE_IOCTL to common code, guided by an ifdef to
    only show up on architectures that support it (same as the code handling it
    in tty_ioctl.c), aswell as it's brother TIOCGLTC that wasn't handled so
    far.

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

    Christoph Hellwig
     
  • Enhance the kthread API by adding kthread_stop_sem, for use in stopping
    threads that spend their idle time waiting on a semaphore.

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

    Alan Stern
     
  • We're trying to get rid of as much as possible tasklist walks, or at
    least moving them to core code. This patch falls into the second
    category.

    Instead of walking the tasklist in cfq-iosched move that into
    elv_unregister. The added benefit is that with this change the as
    ioscheduler might be might unloadable more easily aswell.

    The new code uses read_lock instead of read_lock_irq because the
    tasklist_lock only needs irq disabling for writers.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Every user of init_timer() also needs to initialize ->function and ->data
    fields. This patch adds a simple setup_timer() helper for that.

    The schedule_timeout() is patched as an example of usage.

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

    Oleg Nesterov
     
  • Trivial, saves one 'if' branch in de_thread().

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

    Oleg Nesterov
     
  • Signed-off-by: James Lamanna
    Signed-off-by: Domen Puncer
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    James Lamanna
     
  • Fix the problem (BUG 4964) with unmapped buffers in transaction's
    t_sync_data list. The problem is we need to call filesystem's own
    invalidatepage() from block_write_full_page().

    block_write_full_page() must call filesystem's invalidatepage(). Otherwise
    following nasty race can happen:

    proc 1 proc 2
    ------ ------
    - write some new data to 'offset'
    => bh gets to the transactions data list
    - starts truncate
    => i_size set to new size
    - mpage_writepages()
    - ext3_ordered_writepage() to 'offset'
    - block_write_full_page()
    - page->index > end_index+1
    - block_invalidatepage()
    - discard_buffer()
    - clear_buffer_mapped()

    - commit triggers and finds unmapped buffer - BOOM!

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

    Jan Kara
     
  • smsc-ircc2 - avoid closing network device when suspending; just release
    interrupt and disable DMA ourselves. Also make sure to reset chip when
    resuming.

    Signed-off-by: Dmitry Torokhov
    Cc: Jean Tourrilhes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     
  • It's not necessary to test PageHighmem in here - kmap_atomic() does the right
    thing.

    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This patch exports modalias for ccw devices.

    So you can do:
    modprobe `echo /sys/device/path_to_device/modalias`
    and the proper driver will automatically be loaded by userspace.

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

    Bastian Blank
     
  • Sysfs interface to export ipl device parameters. Dependent on the ipl type
    the interface will look like this:

    - ccw ipl:

    /sys/firmware/ipl/device
    /ipl_type

    - fcp ipl:

    /sys/firmware/ipl/binary_parameter
    /bootprog
    /br_lba
    /device
    /ipl_type
    /lun
    /scp_data
    /wwpn

    - otherwise (unknown that is):

    /sys/firmware/ipl/ipl_type

    Acked-by: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Cc: Greg KH
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Martin Schwidefsky

    Fix fullscreen view of the 3270 device driver.

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

    Richard Hitt
     
  • I just noted that -mtune is used, which is only supported on recent GCCs; by
    reading http://gcc.gnu.org/gcc-3.4/changes.html, you see "-mcpu has been
    renamed to -mtune.", so for GCC < 3.4 we're not using any specific tuning in
    the appropriate cases. However -mcpu is deprecated, so use -mtune when
    possible.

    This was introduced by commit e9d4dce954a60dc23dd1d967766ca2347b780e54 of the
    old tree (between 2.6.10-rc3 and 2.6.10) by Linus Torvalds, to remove the use
    of -march, since that could trigger gcc using SSE on its own. But no
    attention was used about using -mcpu vs. -mtune.

    And btw, the old 2.6.4 code (for instance) was:
    cflags-$(CONFIG_MPENTIUMII) += $(call check_gcc,-march=pentium2,-march=i686)
    cflags-$(CONFIG_MPENTIUMIII) += $(call check_gcc,-march=pentium3,-march=i686)
    cflags-$(CONFIG_MPENTIUMM) += $(call check_gcc,-march=pentium3,-march=i686)
    cflags-$(CONFIG_MPENTIUM4) += $(call check_gcc,-march=pentium4,-march=i686)

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

    Paolo 'Blaisorblade' Giarrusso
     
  • This was used in the old dark age of 2.4, ARCH_CFLAGS doesn't work any more
    since some time, and UM_FASTCALL was never used in 2.6.

    Instead, reintroduce the thing more properly now, directly in
    include/asm-um/linkage.h.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Remove RWSEM_GENERIC_SPINLOCK, it's now defined (only if needed) by the
    underlying arch/i386/Kconfig.cpu. Leave it only for x86_64. Even there, it's
    totally wrong, as they even have the code to support XCHG_ADD.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Make UML share the underlying cpu-specific tuning done on i386.

    Actually, for now many config options aren't used a lot - but that can be done
    later. Also, UML relies on GCC optimization for things like memcpy and such
    more than i386, so specifying the correct -march and -mtune should be enough.
    Later, we may want to correct some other stuff.

    For instance, since FPU context switching, for us, is done (at least
    partially, i.e. between our kernelspace and userspace) by the host, we may
    allow usage of FPU operations by GCC. This doesn't hold for kernelspace vs.
    kernelspace, but we don't support preemption.

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

    Paolo 'Blaisorblade' Giarrusso
     
  • Update SMC91x driver for m32r.

    - Remove needless NONCACHE_OFFSET adjustment.
    > [PATCH 2.6.14-rc4] m32r: NONCACHE_OFFSET in _port2addr
    > Change _port2addr() not to add NONCACHE_OFFSET.
    > Adding NONCACHE_OFFSET requires needless address adjusting by a driver
    > using ioremap() like a SMC91x driver.

    - Fix lots of warnings as following:
    /usr/src/ctest/git/kernel/drivers/net/smc91x.c: In function `smc_reset':
    /usr/src/ctest/git/kernel/drivers/net/smc91x.c:324: warning: passing arg 2 of `_outw' makes integer from pointer without a cast
    /usr/src/ctest/git/kernel/drivers/net/smc91x.c:325: warning: passing arg 2 of `_outw' makes integer from pointer without a cast
    /usr/src/ctest/git/kernel/drivers/net/smc91x.c:341: warning: passing arg 2 of `_outw' makes integer from pointer without a cast
    /usr/src/ctest/git/kernel/drivers/net/smc91x.c:342: warning: passing arg 2 of `_outw' makes integer from pointer without a cast
    :
    /usr/src/ctest/git/kernel/drivers/net/smc91x.c:1915: warning: passing arg 1 of `_inw' makes integer from pointer without a cast
    /usr/src/ctest/git/kernel/drivers/net/smc91x.c:1915: warning: passing arg 1 of `_inw' makes integer from pointer without a cast

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • Change _port2addr() not to add NONCACHE_OFFSET. Adding NONCACHE_OFFSET
    requires needless address adjusting by a driver using ioremap() like a
    SMC91x driver.

    Signed-off-by: Hayato Fujiwara
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hirokazu Takata
     
  • Fix warnings for #if directives.

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

    Hirokazu Takata