26 Mar, 2006

10 commits

  • Convert mm/ to use the new kmem_cache_zalloc allocator.

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

    Pekka Enberg
     
  • As suggested by Eric Dumazet, optimize kzalloc() calls that pass a
    compile-time constant size. Please note that the patch increases kernel
    text slightly (~200 bytes for defconfig on x86).

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

    Pekka Enberg
     
  • Introduce a memory-zeroing variant of kmem_cache_alloc. The allocator
    already exits in XFS and there are potential users for it so this patch
    makes the allocator available for the general public.

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

    Pekka Enberg
     
  • Implement /proc/slab_allocators. It produces output like:

    idr_layer_cache: 80 idr_pre_get+0x33/0x4e
    buffer_head: 2555 alloc_buffer_head+0x20/0x75
    mm_struct: 9 mm_alloc+0x1e/0x42
    mm_struct: 20 dup_mm+0x36/0x370
    vm_area_struct: 384 dup_mm+0x18f/0x370
    vm_area_struct: 151 do_mmap_pgoff+0x2e0/0x7c3
    vm_area_struct: 1 split_vma+0x5a/0x10e
    vm_area_struct: 11 do_brk+0x206/0x2e2
    vm_area_struct: 2 copy_vma+0xda/0x142
    vm_area_struct: 9 setup_arg_pages+0x99/0x214
    fs_cache: 8 copy_fs_struct+0x21/0x133
    fs_cache: 29 copy_process+0xf38/0x10e3
    files_cache: 30 alloc_files+0x1b/0xcf
    signal_cache: 81 copy_process+0xbaa/0x10e3
    sighand_cache: 77 copy_process+0xe65/0x10e3
    sighand_cache: 1 de_thread+0x4d/0x5f8
    anon_vma: 241 anon_vma_prepare+0xd9/0xf3
    size-2048: 1 add_sect_attrs+0x5f/0x145
    size-2048: 2 journal_init_revoke+0x99/0x302
    size-2048: 2 journal_init_revoke+0x137/0x302
    size-2048: 2 journal_init_inode+0xf9/0x1c4

    Cc: Manfred Spraul
    Cc: Alexander Nyberg
    Cc: Pekka Enberg
    Cc: Christoph Lameter
    Cc: Ravikiran Thirumalai
    Signed-off-by: Al Viro
    DESC
    slab-leaks3-locking-fix
    EDESC
    From: Andrew Morton

    Update for slab-remove-cachep-spinlock.patch

    Cc: Al Viro
    Cc: Manfred Spraul
    Cc: Alexander Nyberg
    Cc: Pekka Enberg
    Cc: Christoph Lameter
    Cc: Ravikiran Thirumalai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Add a driver for the on-chip watchdog on the cirrus ep93xx series of ARM
    CPUs.

    Signed-off-by: Lennert Buytenhek
    Cc: Wim Van Sebroeck
    Cc: Russell King
    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • The attached patch optimises d_find_alias() to only take the spinlock if
    there's anything in the the inode's alias list. If there isn't, it returns
    NULL immediately.

    With respect to the superblock sharing patch, this should reduce by one the
    number of times the dcache_lock is taken by nfs_lookup() for ordinary
    directory lookups.

    Only in the case where there's already a dentry for particular directory inode
    (such as might happen when another mountpoint is rooted at that dentry) will
    the lock then be taken the extra time.

    Signed-off-by: David Howells
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • According to the specification the timevals must be validated and an
    errorcode -EINVAL returned in case the timevals are not in canonical form.
    This check was never done in Linux.

    The pre 2.6.16 code converted invalid timevals silently. Negative timeouts
    were converted by the timeval_to_jiffies conversion to the maximum timeout.

    hrtimers and the ktime_t operations expect timevals in canonical form.
    Otherwise random results might happen on 32 bits machines due to the
    optimized ktime_add/sub operations. Negative timeouts are treated as
    already expired. This might break applications which work on pre 2.6.16.

    To prevent random behaviour and API breakage the timevals are checked and
    invalid timevals sanitized in a simliar way as the pre 2.6.16 code did.

    Invalid timevals are reported with a per boot limited number of kernel
    messages so applications which use this misfeature can be corrected.

    After a grace period of one year the sanitizing should be replaced by a
    correct validation check. This is also documented in
    Documentation/feature-removal-schedule.txt

    The validation and sanitizing is done inside do_setitimer so all callers
    (sys_setitimer, compat_sys_setitimer, osf_setitimer) are catched.

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

    Thomas Gleixner
     
  • alarm() calls the kernel with an unsigend int timeout in seconds. The
    value is stored in the tv_sec field of a struct timeval to setup the
    itimer. The tv_sec field of struct timeval is of type long, which causes
    the tv_sec value to be negative on 32 bit machines if seconds > INT_MAX.

    Before the hrtimer merge (pre 2.6.16) such a negative value was converted
    to the maximum jiffies timeout by the timeval_to_jiffies conversion. It's
    not clear whether this was intended or just happened to be done by the
    timeval_to_jiffies code.

    hrtimers expect a timeval in canonical form and treat a negative timeout as
    already expired. This breaks the legitimate usage of alarm() with a
    timeout value > INT_MAX seconds.

    For 32 bit machines it is therefor necessary to limit the internal seconds
    value to avoid API breakage. Instead of doing this in all implementations
    of sys_alarm the duplicated sys_alarm code is moved into a common function
    in itimer.c

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

    Thomas Gleixner
     
  • I seem to have lost this hunk in yesterday's patch. It brings the
    coming-online CPU's softlockup timer up to date so we don't get false-positive
    tripups during CPU hot-add.

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

    Andrew Morton
     
  • Attached patch fixes invalid pointer arithmetic in DMI code to make onboard
    device discovery working again.

    akpm: bug has been present since dmi_find_device() was added in 2.6.14.
    Affects ipmi only (I think) - the symptoms weren't described.

    akpm: changed to use pointer arithmetic rather than open-coded sizeof.

    Signed-off-by: Andrey Panin
    Cc: Corey Minyard
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Panin
     

25 Mar, 2006

3 commits

  • net: ne2k.c won't compile if pci_clone_list is const

    f71e130966ba429dbd24be08ddbcdf263df9a5ad which (amongst other things)
    made pci_clone_list in ne2k-pci.c const causes the following compile error.
    This patch reverses that portion of that changeset

    drivers/net/ne2k-pci.c:123: error: pci_clone_list causes a section type
    conflict

    ~/ gcc --version
    gcc (GCC) 4.0.3 (Debian 4.0.3-1)
    ~/ dpkg gcc-4.0 | grep Version
    Version: 4.0.3-1

    Signed-Off-By: Horms

    Horms
     
  • This patch adds support for the Ethernet controller integrated in the
    Atmel AT91RM9200 SoC processor.

    Changes since the previous submission (01/02/2006) are:
    - Make use of the clk.h clock infrastructure.
    - The multicast hash function is not crc32. [Patch by Pedro Perez]

    Signed-off-by: Andrew Victor
    Signed-off-by: Jeff Garzik

    Andrew Victor
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    [PATCH] libata: Remove dependence on host_set->dev for SAS
    [PATCH] libata: ata_scsi_ioctl cleanup
    [PATCH] libata: ata_scsi_queuecmd cleanup
    [libata] export ata_dev_pair; trim trailing whitespace
    [PATCH] libata: add ata_dev_pair helper
    [PATCH] Make libata not powerdown drivers on PM_EVENT_FREEZE.
    [PATCH] libata: make ata_set_mode() responsible for failure handling
    [PATCH] libata: use ata_dev_disable() in ata_bus_probe()
    [PATCH] libata: implement ata_dev_disable()
    [PATCH] libata: check if port is disabled after internal command
    [PATCH] libata: make per-dev transfer mode limits per-dev
    [PATCH] libata: add per-dev pio/mwdma/udma_mask
    [PATCH] libata: implement ata_unpack_xfermask()
    [libata] Move some bmdma-specific code to libata-bmdma.c
    [libata sata_uli] kill scr_addr abuse
    [libata sata_nv] eliminate duplicate codepaths with iomap
    [libata sata_nv] cleanups: convert #defines to enums; remove in-file history
    [libata sata_sil24] cleanups: use pci_iomap(), kzalloc()

    Linus Torvalds
     

24 Mar, 2006

27 commits

  • uevent_seqnum and uevent_helper are only defined if CONFIG_HOTPLUG=y,
    CONFIG_NET=n.

    (I stole this back from Greg's tree - it makes allnoconfig work).

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

    Andrew Morton
     
  • Copies user-space string with strndup_user() and moves the type string
    duplication code to a function (thus fixing a wrong check on the length of the
    type.)

    Signed-off-by: Davi Arnaut
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davi Arnaut
     
  • Change hand-coded userspace string copying to strndup_user.

    Signed-off-by: Davi Arnaut
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davi Arnaut
     
  • This patch series creates a strndup_user() function to easy copying C strings
    from userspace. Also we avoid common pitfalls like userspace modifying the
    final \0 after the strlen_user().

    Signed-off-by: Davi Arnaut
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davi Arnaut
     
  • Make the softlockup detector purely timer-interrupt driven, removing
    softirq-context (timer) dependencies. This means that if the softlockup
    watchdog triggers, it has truly observed a longer than 10 seconds
    scheduling delay of a SCHED_FIFO prio 99 task.

    (the patch also turns off the softlockup detector during the initial bootup
    phase and does small style fixes)

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

    Ingo Molnar
     
  • If the change of personality does not lead to change of exec domain,
    __set_personality() returned without releasing the module reference
    acquired by lookup_exec_domain().

    Signed-off-by: Sergey Vlasov
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergey Vlasov
     
  • In filesystems with the meta block group flag on, ext3_bg_num_gdb() fails
    to report the correct number of blocks used to store the group descriptor
    backups in a given group. It happens because meta_bg follows a different
    logic from the original ext3 backup placement in groups multiples of 3, 5
    and 7.

    Signed-off-by: Glauber de Oliveira Costa
    Cc: Andreas Dilger
    Cc: "Stephen C. Tweedie"
    Cc: Alex Tomas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber de Oliveira Costa
     
  • Document the fact that setrlimit(RLIMIT_CPU) doesn't return error codes when
    it should. I don't think we can fix this without a 2.7.x..

    Cc: Martin Schwidefsky
    Cc: Ulrich Weigand
    Cc: Cliff Wickman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • At present the kernel doesn't honour an attempt to set RLIMIT_CPU to zero
    seconds. But the spec says it should, and that's what 2.4.x does.

    Fixing this for real would involve some complexity (such as adding a new
    it-has-been-set flag to the task_struct, and testing that everwhere, instead
    of overloading the value of it_prof_expires).

    Given that a 2.4 kernel won't actually send the signal until one second has
    expired anyway, let's just handle this case by treating the caller's
    zero-seconds as one second.

    Cc: Martin Schwidefsky
    Cc: Ulrich Weigand
    Cc: Cliff Wickman
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • - Whitespace cleanups

    - Make that expression comprehensible.

    There's a potential logic change here: we do the "is it_prof_expires equal to
    zero" test after converting it to seconds, rather than doing the comparison
    between raw cputime_t's.

    But given that it's in units of seconds anyway, that shouldn't change
    anything.

    Cc: Martin Schwidefsky
    Cc: Ulrich Weigand
    Cc: Cliff Wickman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Drivers have no business looking at the task list and thus using this lock.
    The only possibly modular users left are:

    arch/ia64/kernel/mca.c
    drivers/edac/edac_mc.c
    fs/binfmt_elf.c

    which I'll send out fixes for soon.

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

    Christoph Hellwig
     
  • - Remove more unused headers
    - Remove various typedefs
    - Correct type of PaddrP (physical addresses should be ulong)
    - Kill use of bcopy
    - More printk cleanups
    - Kill true/false
    - Clean up direct access to pci BARs

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

    Alan Cox
     
  • - Remove more unused headers
    - Remove various typedefs
    - Correct type of PaddrP (physical addresses should be ulong)
    - Kill use of bcopy
    - More printk cleanups
    - Kill true/false
    - Clean up direct access to pci BARs

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

    Alan Cox
     
  • Final polish. There is no more save_flags/cli type locking left. We also no
    longer use the pcicopy function and file so they can go.

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

    Alan Cox
     
  • Third large chunk of code cleanup. The split between this and #3 and #4 is
    fairly arbitary and due to the message length limit on the list. These
    patches continue the process of ripping out macros and typedefs while cleaning
    up lots of 32bit assumptions. Several inlines for compatibility also get
    removed and that causes a lot of noise.

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

    Alan Cox
     
  • Second large chunk of code cleanup. The split between this and #3 and #4 is
    fairly arbitary and due to the message length limit on the list. These
    patches continue the process of ripping out macros and typedefs while cleaning
    up lots of 32bit assumptions. Several inlines for compatibility also get
    removed and that causes a lot of noise.

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

    Alan Cox
     
  • First large chunk of code cleanup. The split between this and #3 and #4 is
    fairly arbitary and due to the message length limit on the list. These
    patches continue the process of ripping out macros and typedefs while cleaning
    up lots of 32bit assumptions. Several inlines for compatibility also get
    removed and that causes a lot of noise.

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

    Alan Cox
     
  • More header cleanups, strip out typedefs and remove cruft. There are a lot of
    magic macros that can go and also a great deal of abuse of volatile that is
    not needed any more as this patch set cleans up the misuse of pointer access
    to ISA and PCI space.

    It now builds cleanly on 64bit, although there is more work left to do

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

    Alan Cox
     
  • After the indent we can now clean up unused code, and fix all myriad cases
    that don't use readb/writeb properly.

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

    Alan Cox
     
  • This is the result of indent -kr -i8 -bri0 -l255

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

    Alan Cox
     
  • Strip some of the typedef mess out Remove a small subset of unused defines
    and the like.

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

    Alan Cox
     
  • Fixes for annoying gcc-4.1 compile warnings "value computed not used".
    Simply cast to void.

    (akpm: Linus will go ballistic...)

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

    Takashi Iwai
     
  • Announce that the kernel_thread export will be removed in half a year,
    after all it's users have been converted to the kthread_ API, which I plan
    to do over the next month.

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

    Christoph Hellwig
     
  • In some embedded systems the IDE hardware interface may only support 16-bit
    or smaller accesses. Allow the interface to specify if this is the case
    and don't allow the drive or user to override the setting.

    Signed-off-by: Kumar Gala
    Acked-by: Bartlomiej Zolnierkiewicz
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kumar Gala
     
  • On architectures like i386, the "Multimedia Capabilities Port drivers" menu is
    visible, but it can't be visited since it contains nothing usable for
    !ARCH_SA1100.

    This patch therefore shows this menu only on ARCH_SA1100.

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

    Adrian Bunk
     
  • If we don't want sys_newfstatat because __ARCH_WANT_STAT64 is defined, then
    we certainly don't want compat_sys_newfstatat either.

    Signed-off-by: Grant Grundler
    Signed-off-by: Kyle McMartin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • It appears that console_setup() code only gets compiled into the kernel if
    CONFIG_PRINTK is enabled. One detrimental side-effect of this is that
    serial8250_console_setup() never gets invoked when CONFIG_PRINTK is not
    set, resulting in baud rate not being read/parsed from command line (i.e.
    console=ttyS0,115200n8 is ignored, at least the baud rate part...)

    Attached patch moves console_setup() code from inside

    #ifdef CONFIG_PRINTK

    to outside (in printk.c), removing dependence on said config. option.

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

    John Z. Bohach