30 Oct, 2006

1 commit

  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 3914/1: [Jornada7xx] - Typo Fix in cpu-sa1110.c (b != B)
    [ARM] 3913/1: n2100: fix IRQ routing for second ethernet port
    [ARM] Add KBUILD_IMAGE target support
    [ARM] Fix suspend oops caused by PXA2xx PCMCIA driver
    [ARM] Fix i2c-pxa slave mode support
    [ARM] 3900/1: Fix VFP Division by Zero exception handling.
    [ARM] 3899/1: Fix the normalization of the denormal double precision number.
    [ARM] 3909/1: Disable UWIND_INFO for ARM (again)
    [ARM] Add __must_check to uaccess functions
    [ARM] Add realview SMP default configuration
    [ARM] Fix SMP irqflags support

    Linus Torvalds
     

29 Oct, 2006

1 commit

  • strstrip() does not remove the last blank from strings which only consist
    of blanks.

    Example:
    char string[] = " ";
    strstrip(string);

    results in " ", but should produce an empty string!

    The following patch solves this problem:

    Acked-by: Martin Schwidefsky
    Signed-off-by: Michael Holzheu
    Acked-by: Pekka Enberg
    Acked-by Joern Engel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     

28 Oct, 2006

1 commit


21 Oct, 2006

1 commit

  • Qooting Adrian:

    - net/sunrpc/svc.c uses highest_possible_node_id()

    - include/linux/nodemask.h says highest_possible_node_id() is
    out-of-line #if MAX_NUMNODES > 1

    - the out-of-line highest_possible_node_id() is in lib/cpumask.c

    - lib/Makefile: lib-$(CONFIG_SMP) += cpumask.o
    CONFIG_ARCH_DISCONTIGMEM_ENABLE=y, CONFIG_SMP=n, CONFIG_SUNRPC=y

    -> highest_possible_node_id() is used in net/sunrpc/svc.c
    CONFIG_NODES_SHIFT defined and > 0

    -> include/linux/numa.h: MAX_NUMNODES > 1

    -> compile error

    The bug is not present on architectures where ARCH_DISCONTIGMEM_ENABLE
    depends on NUMA (but m32r isn't the only affected architecture).

    So move the function into page_alloc.c

    Cc: Adrian Bunk
    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

17 Oct, 2006

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: fm801-gp - handle errors from pci_enable_device()
    Input: gameport core - handle errors returned by device_bind_driver()
    Input: serio core - handle errors returned by device_bind_driver()
    Lockdep: fix compile error in drivers/input/serio/serio.c
    Input: serio - add lockdep annotations
    Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass()
    Input: atkbd - supress "too many keys" error message
    Input: i8042 - supress ACK/NAKs when blinking during panic
    Input: add missing exports to fix modular build

    Linus Torvalds
     
  • This library function should be in obj-y and not in lib-y. But when we do
    that it clashes unpleasantly with the assembly-language implementation in the
    ia64 architecture.

    Instead of trying to fix it all up, just remove the generic carta_random32 in
    the expectation that the recently-made-generic random32() will suffice.

    If/when perfmon is migrated to random32, ia64's private carta_random32
    implementation can also be removed.

    Cc: Stephane Eranian
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Make net_random() more widely available by calling it random32

    akpm: hopefully this will permit the removal of carta_random32. That needs
    confirmation from Stephane - this code looks somewhat more computationally
    expensive, and has a different (ie: callee-stateful) interface.

    [akpm@osdl.org: lots of build fixes, cleanups]
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller
    Cc: Stephane Eranian
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger
     

13 Oct, 2006

1 commit


12 Oct, 2006

4 commits

  • lib/bitmap.c:bitmap_parse() is a library function that received as input a
    user buffer. This seemed to have originated from the way the write_proc
    function of the /proc filesystem operates.

    This has been reworked to not use kmalloc and eliminates a lot of
    get_user() overhead by performing one access_ok before using __get_user().

    We need to test if we are in kernel or user space (is_user) and access the
    buffer differently. We cannot use __get_user() to access kernel addresses
    in all cases, for example in architectures with separate address space for
    kernel and user.

    This function will be useful for other uses as well; for example, taking
    input for /sysfs instead of /proc, so it was changed to accept kernel
    buffers. We have this use for the Linux UWB project, as part as the
    upcoming bandwidth allocator code.

    Only a few routines used this function and they were changed too.

    Signed-off-by: Reinette Chatre
    Signed-off-by: Inaky Perez-Gonzalez
    Cc: Paul Jackson
    Cc: Joe Korty
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Reinette Chatre
     
  • This is a follow-up patch based on the review for perfmon2. This patch
    adds the carta_random32() library routine + carta_random32.h header file.

    This is fast, simple, and efficient pseudo number generator algorithm. We
    use it in perfmon2 to randomize the sampling periods. In this context, we
    do not need any fancy randomizer.

    Signed-off-by: stephane eranian
    Cc: David Mosberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephane Eranian
     
  • In order to encourage people to notice when they break the exported
    headers, add a config option which automatically runs the sanity checks
    when building vmlinux. That way, those who use allyesconfig will notice
    failures.

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

    David Woodhouse
     
  • We got several false bug reports because of enabled
    CONFIG_DETECT_SOFTLOCKUP. Disable soft lockup detection on s390, since it
    doesn't work on a virtualized architecture.

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

    Heiko Carstens
     

11 Oct, 2006

3 commits


06 Oct, 2006

1 commit


05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

04 Oct, 2006

1 commit


03 Oct, 2006

1 commit

  • It is a non-standard heap-sort algorithm implementation because the index
    of child node is wrong . The sort function still outputs right result, but
    the performance is O( n * ( log(n) + 1 ) ) , about 10% ~ 20% worse than
    standard algorithm.

    Signed-off-by: keios
    Acked-by: Matt Mackall
    Acked-by: Zou Nan hai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    keios
     

02 Oct, 2006

6 commits

  • The last in-kernel user of errno is gone, so we should remove the definition
    and everything referring to it. This also removes the now-unused lib/execve.c
    file that was introduced earlier.

    Also remove every trace of __KERNEL_SYSCALLS__ that still remained in the
    kernel.

    Signed-off-by: Arnd Bergmann
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • The use of execve() in the kernel is dubious, since it relies on the
    __KERNEL_SYSCALLS__ mechanism that stores the result in a global errno
    variable. As a first step of getting rid of this, change all users to a
    global kernel_execve function that returns a proper error code.

    This function is a terrible hack, and a later patch removes it again after the
    kernel syscalls are gone.

    Signed-off-by: Arnd Bergmann
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • cpumask: add highest_possible_node_id(), analogous to
    highest_possible_processor_id().

    [pj@sgi.com: fix typo]
    Signed-off-by: Greg Banks
    Signed-off-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Banks
     
  • A simple module to test Linux Kernel Dump mechanism. This module uses
    jprobes to install/activate pre-defined crash points. At different crash
    points, various types of crashing scenarios are created like a BUG(),
    panic(), exception, recursive loop and stack overflow. The user can
    activate a crash point with specific type by providing parameters at the
    time of module insertion. Please see the file header for usage
    information. The module is based on the Linux Kernel Dump Test Tool by
    Fernando .

    This module could be merged with mainline. Jprobes is used here so that the
    context in which crash point is hit, could be maintained. This implements
    all the crash points as done by LKDTT except the one in the middle of
    tasklet_action().

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

    Ankita Garg
     
  • The exported kernel interfaces of genpool allocator need to adhere to
    the requirements of kernel-doc.

    Signed-off-by: Dean Nelson
    Cc: Steve Wise
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dean Nelson
     
  • Modules using the genpool allocator need to be able to destroy the data
    structure when unloading.

    Signed-off-by: Steve Wise
    Cc: Randy Dunlap
    Cc: Dean Nelson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steve Wise
     

01 Oct, 2006

4 commits

  • The existing implementation of ioremap_page_range(), which was taken
    from i386, does this:

    flush_cache_all();
    /* modify page tables */
    flush_tlb_all();

    I think this is a bit defensive, so this patch changes the generic
    implementation to do:

    /* modify page tables */
    flush_cache_vmap(start, end);

    instead, which is similar to what vmalloc() does. This should still
    be correct because we never modify existing PTEs. According to
    James Bottomley:

    The problem the flush_tlb_all() is trying to solve is to avoid stale tlb
    entries in the ioremap area. We're just being conservative by flushing
    on both map and unmap. Technically what vmalloc/vfree does (only flush
    the tlb on unmap) is just fine because it means that the only tlb
    entries in the remap area must belong to in-use mappings.

    Signed-off-by: Haavard Skinnemoen
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Mikael Starvik
    Cc: Andi Kleen
    Cc:
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • This patch adds a generic implementation of ioremap_page_range() in
    lib/ioremap.c based on the i386 implementation. It differs from the
    i386 version in the following ways:

    * The PTE flags are passed as a pgprot_t argument and must be
    determined up front by the arch-specific code. No additional
    PTE flags are added.
    * Uses set_pte_at() instead of set_pte()

    [bunk@stusta.de: warning fix]
    ]dhowells@redhat.com: nommu build fix]
    Signed-off-by: Haavard Skinnemoen
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Mikael Starvik
    Cc: Andi Kleen
    Cc:
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Signed-off-by: Adrian Bunk
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • These two BUG_ON()s are redundant and undesired: we're checking for this
    condition further on in the function, only better.

    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The conditions got reserved. Also make rb_next() and rb_prev() check
    for the empty condition.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

30 Sep, 2006

5 commits


27 Sep, 2006

4 commits

  • Add SH to the list of platforms interested in Verbose BUG().

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • We had our own version, which serves no purpose. Simply
    hook SH in to the generic one.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (225 commits)
    [PATCH] Don't set calgary iommu as default y
    [PATCH] i386/x86-64: New Intel feature flags
    [PATCH] x86: Add a cumulative thermal throttle event counter.
    [PATCH] i386: Make the jiffies compares use the 64bit safe macros.
    [PATCH] x86: Refactor thermal throttle processing
    [PATCH] Add 64bit jiffies compares (for use with get_jiffies_64)
    [PATCH] Fix unwinder warning in traps.c
    [PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1
    [PATCH] x86: Move direct PCI scanning functions out of line
    [PATCH] i386/x86-64: Make all early PCI scans dependent on CONFIG_PCI
    [PATCH] Don't leak NT bit into next task
    [PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder
    [PATCH] Fix some broken white space in ia32_signal.c
    [PATCH] Initialize argument registers for 32bit signal handlers.
    [PATCH] Remove all traces of signal number conversion
    [PATCH] Don't synchronize time reading on single core AMD systems
    [PATCH] Remove outdated comment in x86-64 mmconfig code
    [PATCH] Use string instructions for Core2 copy/clear
    [PATCH] x86: - restore i8259A eoi status on resume
    [PATCH] i386: Split multi-line printk in oops output.
    ...

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (47 commits)
    Driver core: Don't call put methods while holding a spinlock
    Driver core: Remove unneeded routines from driver core
    Driver core: Fix potential deadlock in driver core
    PCI: enable driver multi-threaded probe
    Driver Core: add ability for drivers to do a threaded probe
    sysfs: add proper sysfs_init() prototype
    drivers/base: check errors
    drivers/base: Platform notify needs to occur before drivers attach to the device
    v4l-dev2: handle __must_check
    add CONFIG_ENABLE_MUST_CHECK
    add __must_check to device management code
    Driver core: fixed add_bind_files() definition
    Driver core: fix comments in drivers/base/power/resume.c
    sysfs_remove_bin_file: no return value, dump_stack on error
    kobject: must_check fixes
    Driver core: add ability for devices to create and remove bin files
    Class: add support for class interfaces for devices
    Driver core: create devices/virtual/ tree
    Driver core: add device_rename function
    Driver core: add ability for classes to handle devices properly
    ...

    Linus Torvalds
     

26 Sep, 2006

2 commits

  • This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
    CPU and the AT32STK1000 development board.

    AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
    cost-sensitive embedded applications, with particular emphasis on low power
    consumption and high code density. The AVR32 architecture is not binary
    compatible with earlier 8-bit AVR architectures.

    The AVR32 architecture, including the instruction set, is described by the
    AVR32 Architecture Manual, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf

    The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
    features a 7-stage pipeline, 16KB instruction and data caches and a full
    Memory Management Unit. It also comes with a large set of integrated
    peripherals, many of which are shared with the AT91 ARM-based controllers from
    Atmel.

    Full data sheet is available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf

    while the CPU core implementation including caches and MMU is documented by
    the AVR32 AP Technical Reference, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf

    Information about the AT32STK1000 development board can be found at

    http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918

    including a BSP CD image with an earlier version of this patch, development
    tools (binaries and source/patches) and a root filesystem image suitable for
    booting from SD card.

    Alternatively, there's a preliminary "getting started" guide available at
    http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
    to the sources and patches you will need in order to set up a cross-compiling
    environment for avr32-linux.

    This patch, as well as the other patches included with the BSP and the
    toolchain patches, is actively supported by Atmel Corporation.

    [dmccr@us.ibm.com: Fix more pxx_page macro locations]
    [bunk@stusta.de: fix `make defconfig']
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Adrian Bunk
    Signed-off-by: Dave McCracken
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • Based on patch from David Rientjes , but
    changed by AK.

    Optimizes the 64-bit hamming weight for x86_64 processors assuming they
    have fast multiplication. Uses five fewer bitops than the generic
    hweight64. Benchmark on one EMT64 showed ~25% speedup with 2^24
    consecutive calls.

    Define a new ARCH_HAS_FAST_MULTIPLIER that can be set by other
    architectures that can also multiply fast.

    Signed-off-by: Andi Kleen

    Andi Kleen