12 Oct, 2007

2 commits

  • Move zlib_inflate_blob() out into it's own source file,
    infutil.c, so that things like the powerpc zImage builder
    in arch/powerpc/boot/Makefile don't end up trying to
    compile it.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (408 commits)
    [POWERPC] Add memchr() to the bootwrapper
    [POWERPC] Implement logging of unhandled signals
    [POWERPC] Add legacy serial support for OPB with flattened device tree
    [POWERPC] Use 1TB segments
    [POWERPC] XilinxFB: Allow fixed framebuffer base address
    [POWERPC] XilinxFB: Add support for custom screen resolution
    [POWERPC] XilinxFB: Use pdata to pass around framebuffer parameters
    [POWERPC] PCI: Add 64-bit physical address support to setup_indirect_pci
    [POWERPC] 4xx: Kilauea defconfig file
    [POWERPC] 4xx: Kilauea DTS
    [POWERPC] 4xx: Add AMCC Kilauea eval board support to platforms/40x
    [POWERPC] 4xx: Add AMCC 405EX support to cputable.c
    [POWERPC] Adjust TASK_SIZE on ppc32 systems to 3GB that are capable
    [POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers
    [POWERPC] 85xx: Enable FP emulation in MPC8560 ADS defconfig
    [POWERPC] 85xx: Killed
    [POWERPC] 85xx: Add cpm nodes for 8541/8555 CDS
    [POWERPC] 85xx: Convert mpc8560ads to the new CPM binding.
    [POWERPC] mpc8272ads: Remove muram from the CPM reg property.
    [POWERPC] Make clockevents work on PPC601 processors
    ...

    Fixed up conflict in Documentation/powerpc/booting-without-of.txt manually.

    Linus Torvalds
     

11 Oct, 2007

2 commits

  • Signed-off-by: Denys Vlasenko
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Denys Vlasenko
     
  • Each netlink socket will live in exactly one network namespace,
    this includes the controlling kernel sockets.

    This patch updates all of the existing netlink protocols
    to only support the initial network namespace. Request
    by clients in other namespaces will get -ECONREFUSED.
    As they would if the kernel did not have the support for
    that netlink protocol compiled in.

    As each netlink protocol is updated to be multiple network
    namespace safe it can register multiple kernel sockets
    to acquire a presence in the rest of the network namespaces.

    The implementation in af_netlink is a simple filter implementation
    at hash table insertion and hash table look up time.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

08 Oct, 2007

2 commits

  • Modulat lguest started giving linking errors

    MODPOST 1 modules
    ERROR: "kasprintf" [drivers/lguest/lg.ko] undefined!

    Signed-off-by: Alexey Dobriyan
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Provide some documentation for CONFIG_LOCK_STAT.

    Signed-off-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Cc: "Randy.Dunlap"
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

03 Oct, 2007

2 commits

  • Paul Mackerras
     
  • Add CONFIG_DEBUG_PREEMPT support to ppc64: it was useful for testing
    get_paca() preemption. Cheat a little, just use debug_smp_processor_id()
    in the debug version of get_paca(): it contains all the right checks and
    reporting, though get_paca() doesn't really use smp_processor_id().

    Use local_paca for what might have been called __raw_get_paca().
    Silence harmless warnings from io.h and lparcfg.c with local_paca -
    it is okay for iseries_lparcfg_data to be referencing shared_proc
    with preemption enabled: all cpus should show the same value for
    shared_proc.

    Why do other architectures need TRACE_IRQFLAGS_SUPPORT for DEBUG_PREEMPT?
    I don't know, ppc64 appears to get along fine without it.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Paul Mackerras

    Hugh Dickins
     

25 Sep, 2007

1 commit


24 Aug, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
    PCI: Run k8t_sound_hostbridge quirk only when needed
    PCI: disable MSI on RX790
    PCI: disable MSI on RD580
    PCI: disable MSI on RS690
    PCI: make pcie_get_readrq visible in pci.h
    PCI: lets kill the 'PCI hidden behind bridge' message
    pci/hotplug/cpqphp_ctrl.c: remove stale BKL use
    PCI: Document pci_iomap()
    PCI: quirk_e100_interrupt() called too early
    PCI: Move prototypes for pci_bus_find_capability to include/linux/pci.h

    Linus Torvalds
     

23 Aug, 2007

2 commits

  • Introduce CONFIG_CHECK_SIGNATURE to control inclusion of check_signature()
    and avoid problems on platforms that don't have readb().

    Let the few legacy (ISA || PCI || X86) drivers that need check_signature()
    select CONFIG_CHECK_SIGNATURE.

    Signed-off-by: Geert Uytterhoeven
    Cc: Jeff Dike
    Cc: Heiko Carstens
    Cc: Roman Zippel
    Cc: Alan Cox
    Cc: Martin Schwidefsky
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • This useful interface is hardly mentioned anywhere in the in-tree
    documentation.

    Signed-off-by: Rolf Eike Beer
    Cc: Tejun Heo
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Rolf Eike Beer
     

12 Aug, 2007

1 commit

  • Add missing "const" qualifiers to the print_hex_dump_bytes() library routines.

    (akpm: rumoured to fix some compile warning somewhere)

    Signed-off-by: Alan Stern
    Cc: Artem Bityutskiy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Stern
     

09 Aug, 2007

1 commit

  • Trivial fix: mark the buffer to hexdump as const so callers could avoid
    casting their const buffers when calling print_hex_dump().

    The patch is really trivial and I suggest to consider it as a fix
    (it fixes GCC warnings) and push it to current tree.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     

01 Aug, 2007

4 commits

  • "error" is always equal to 0.

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

    Oleg Nesterov
     
  • The arm26 port has been in a state where it was far from even compiling
    for quite some time.

    Ian Molton agreed with the removal.

    Signed-off-by: Adrian Bunk
    Cc: Ian Molton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • kasprintf pulls in kmalloc which proved to be fatal for at least
    bootimage target on alpha.
    Move it to a separate file so only users of kasprintf are exposed
    to the dependency on kmalloc.

    Signed-off-by: Sam Ravnborg
    Cc: Jeremy Fitzhardinge
    Cc: Meelis Roos
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Jay Estabrook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     
  • Add some casts to the LZO compression algorithm after they were removed
    during cleanup and shouldn't have been.

    Signed-off-by: Richard Purdie
    Cc: Edward Shishkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     

31 Jul, 2007

1 commit

  • Leaving kobject_actions[] in kobject_uevent.c, but putting it outside
    the #ifdef looks indeed like the best solution to me. This way, we
    avoid adding #ifdef CONFIG_HOTPLUG into core.c, when all other
    functions called do not need such a thing.

    Signed-off-by: Cornelia Huck
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     

25 Jul, 2007

1 commit


22 Jul, 2007

1 commit

  • If the swiotlb maps a multi-slab region, swiotlb_sync_single_range() can be
    invoked to sync a sub-region which does not include the first slab.
    Unfortunately io_tlb_orig_addr[] is only initialised for the first slab,
    and hence the call to sync_single() will read a garbage orig_addr in this
    case.

    This patch fixes the issue by initialising all mapped slabs in
    io_tlb_orig_addr[]. It also correctly adjusts the buffer pointer in
    sync_single() to handle the case that the given dma_addr is not aligned on
    a slab boundary.

    Signed-off-by: Keir Fraser
    Cc: "Luck, Tony"
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Keir Fraser
     

20 Jul, 2007

2 commits

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Introduce the core lock statistics code.

    Lock statistics provides lock wait-time and hold-time (as well as the count
    of corresponding contention and acquisitions events). Also, the first few
    call-sites that encounter contention are tracked.

    Lock wait-time is the time spent waiting on the lock. This provides insight
    into the locking scheme, that is, a heavily contended lock is indicative of
    a too coarse locking scheme.

    Lock hold-time is the duration the lock was held, this provides a reference for
    the wait-time numbers, so they can be put into perspective.

    1)
    lock
    2)
    ... do stuff ..
    unlock
    3)

    The time between 1 and 2 is the wait-time. The time between 2 and 3 is the
    hold-time.

    The lockdep held-lock tracking code is reused, because it already collects locks
    into meaningful groups (classes), and because it is an existing infrastructure
    for lock instrumentation.

    Currently lockdep tracks lock acquisition with two hooks:

    lock()
    lock_acquire()
    _lock()

    ... code protected by lock ...

    unlock()
    lock_release()
    _unlock()

    We need to extend this with two more hooks, in order to measure contention.

    lock_contended() - used to measure contention events
    lock_acquired() - completion of the contention

    These are then placed the following way:

    lock()
    lock_acquire()
    if (!_try_lock())
    lock_contended()
    _lock()
    lock_acquired()

    ... do locked stuff ...

    unlock()
    lock_release()
    _unlock()

    (Note: the try_lock() 'trick' is used to avoid instrumenting all platform
    dependent lock primitive implementations.)

    It is also possible to toggle the two lockdep features at runtime using:

    /proc/sys/kernel/prove_locking
    /proc/sys/kernel/lock_stat

    (esp. turning off the O(n^2) prove_locking functionaliy can help)

    [akpm@linux-foundation.org: build fixes]
    [akpm@linux-foundation.org: nuke unneeded ifdefs]
    Signed-off-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Acked-by: Jason Baron
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

19 Jul, 2007

1 commit


18 Jul, 2007

4 commits

  • Rather than using a tri-state integer for the wait flag in
    call_usermodehelper_exec, define a proper enum, and use that. I've
    preserved the integer values so that any callers I've missed should
    still work OK.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: James Bottomley
    Cc: Randy Dunlap
    Cc: Christoph Hellwig
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Johannes Berg
    Cc: Ralf Baechle
    Cc: Bjorn Helgaas
    Cc: Joel Becker
    Cc: Tony Luck
    Cc: Kay Sievers
    Cc: Srivatsa Vaddagiri
    Cc: Oleg Nesterov
    Cc: David Howells

    Jeremy Fitzhardinge
     
  • argv_split() is a helper function which takes a string, splits it at
    whitespace, and returns a NULL-terminated argv vector. This is
    deliberately simple - it does no quote processing of any kind.

    [ Seems to me that this is something which is already being done in
    the kernel, but I couldn't find any other implementations, either to
    steal or replace. Keep an eye out. ]

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Chris Wright
    Cc: Andrew Morton
    Cc: Randy Dunlap

    Jeremy Fitzhardinge
     
  • Add CRC7 routines, used for example in MMC over SPI communication.
    Kerneldoc updates

    [akpm@linux-foundation.org: fix funny mix of const and non-const]
    Signed-off-by: Jan Nikitenko
    Signed-off-by: David Brownell
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Nikitenko
     
  • kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing
    variant in the past. But with __GFP_ZERO it is possible now to do zeroing
    while allocating.

    Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever
    we can.

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

    Christoph Lameter
     

17 Jul, 2007

10 commits

  • This should avoid build problems on architectures without a "readb()",
    that got bitten by check_signature() being uninlined.

    Noted by Heiko Carstens.

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

    Linus Torvalds
     
  • Optimize integer-to-string conversion in vsprintf.c for base 10. This is
    by far the most used conversion, and in some use cases it impacts
    performance. For example, top reads /proc/$PID/stat for every process, and
    with 4000 processes decimal conversion alone takes noticeable time.

    Using code from

    http://www.cs.uiowa.edu/~jones/bcd/decimal.html
    (with permission from the author, Douglas W. Jones)

    binary-to-decimal-string conversion is done in groups of five digits at
    once, using only additions/subtractions/shifts (with -O2; -Os throws in
    some multiply instructions).

    On i386 arch gcc 4.1.2 -O2 generates ~500 bytes of code.

    This patch is run tested. Userspace benchmark/test is also attached.
    I tested it on PIII and AMD64 and new code is generally ~2.5 times
    faster. On AMD64:

    # ./vsprintf_verify-O2
    Original decimal conv: .......... 151 ns per iteration
    Patched decimal conv: .......... 62 ns per iteration
    Testing correctness
    12895992590592 ok... [Ctrl-C]
    # ./vsprintf_verify-O2
    Original decimal conv: .......... 151 ns per iteration
    Patched decimal conv: .......... 62 ns per iteration
    Testing correctness
    26025406464 ok... [Ctrl-C]

    More realistic test: top from busybox project was modified to
    report how many us it took to scan /proc (this does not account
    any processing done after that, like sorting process list),
    and then I test it with 4000 processes:

    #!/bin/sh
    i=4000
    while test $i != 0; do
    sleep 30 &
    let i--
    done
    busybox top -b -n3 >/dev/null

    on unpatched kernel:

    top: 4120 processes took 102864 microseconds to scan
    top: 4120 processes took 91757 microseconds to scan
    top: 4120 processes took 92517 microseconds to scan
    top: 4120 processes took 92581 microseconds to scan

    on patched kernel:

    top: 4120 processes took 75460 microseconds to scan
    top: 4120 processes took 66451 microseconds to scan
    top: 4120 processes took 67267 microseconds to scan
    top: 4120 processes took 67618 microseconds to scan

    The speedup comes from much faster generation of /proc/PID/stat
    by sprintf() calls inside the kernel.

    Signed-off-by: Douglas W Jones
    Signed-off-by: Denys Vlasenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis Vlasenko
     
  • * There is no point in having full "0...9a...z" constant vector,
    if we use only "0...9a...f" (and "x" for "0x").

    * Post-decrement usually needs a few more instructions, so use
    pre decrement instead where makes sense:
    -       while (i < precision--) {
    +       while (i base 8 or 16), we can avoid using division
    in a loop and use mask/shift, obtaining much faster conversion.
    (More complex optimization for base 10 case is in the second patch).

    Overall, size vsprintf.o shows ~80 bytes smaller text section
    with this patch applied.

    Signed-off-by: Douglas W Jones
    Signed-off-by: Denys Vlasenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis Vlasenko
     
  • The current generic bug implementation has a call to dump_stack() in case a
    WARN_ON(whatever) gets hit. Since report_bug(), which calls dump_stack(),
    gets called from an exception handler we can do better: just pass the
    pt_regs structure to report_bug() and pass it to show_regs() in case of a
    warning. This will give more debug informations like register contents,
    etc... In addition this avoids some pointless lines that dump_stack()
    emits, since it includes a stack backtrace of the exception handler which
    is of no interest in case of a warning. E.g. on s390 the following lines
    are currently always present in a stack backtrace if dump_stack() gets
    called from report_bug():

    [] show_trace+0x92/0xe8)
    [] show_stack+0xa0/0xd0
    [] dump_stack+0x2e/0x3c
    [] report_bug+0x98/0xf8
    [] illegal_op+0x1fc/0x21c
    [] sysc_return+0x0/0x10

    Acked-by: Jeremy Fitzhardinge
    Acked-by: Haavard Skinnemoen
    Cc: Andi Kleen
    Cc: Kyle McMartin
    Cc: Paul Mackerras
    Cc: Paul Mundt
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • This is a rather bizarre thing to have inlined in io.h. Stick it in lib/
    instead.

    While we're there, despaghetti it a bit, and fix its off-by-one behaviour when
    passed a zero length.

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

    Andrew Morton
     
  • Now that we have implemented hotunplug-time counter spilling,
    percpu_counter_sum() only needs to look at online CPUs.

    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • per-cpu counters presently must iterate over all possible CPUs in the
    exhaustive percpu_counter_sum().

    But it can be much better to only iterate over the presently-online CPUs. To
    do this, we must arrange for an offlined CPU's count to be spilled into the
    counter's central count.

    We can do this for all percpu_counters in the machine by linking them into a
    single global list and walking that list at CPU_DEAD time.

    (I hope. Might have race windows in which the percpu_counter_sum() count is
    inaccurate?)

    Cc: Gautham R Shenoy
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Add a new configuration variable

    CONFIG_SLUB_DEBUG_ON

    If set then the kernel will be booted by default with slab debugging
    switched on. Similar to CONFIG_SLAB_DEBUG. By default slab debugging
    is available but must be enabled by specifying "slub_debug" as a
    kernel parameter.

    Also add support to switch off slab debugging for a kernel that was
    built with CONFIG_SLUB_DEBUG_ON. This works by specifying

    slub_debug=-

    as a kernel parameter.

    Dave Jones wanted this feature.
    http://marc.info/?l=linux-kernel&m=118072189913045&w=2

    [akpm@linux-foundation.org: clean up switch statement]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Remove all ids from the given idr tree. idr_destroy() only frees up
    unused, cached idp_layers, but this function will remove all id mappings
    and leave all idp_layers unused.

    A typical clean-up sequence for objects stored in an idr tree, will use
    idr_for_each() to free all objects, if necessay, then idr_remove_all() to
    remove all ids, and idr_destroy() to free up the cached idr_layers.

    Signed-off-by: Kristian Hoegsberg
    Cc: Tejun Heo
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kristian Hoegsberg
     
  • This patch adds an iterator function for the idr data structure. Compared
    to just iterating through the idr with an integer and idr_find, this
    iterator is (almost, but not quite) linear in the number of elements, as
    opposed to the number of integers in the range covered by the idr. This
    makes a difference for sparse idrs, but more importantly, it's a nicer way
    to iterate through the elements.

    The drm subsystem is moving to idr for tracking contexts and drawables, and
    with this change, we can use the idr exclusively for tracking these
    resources.

    [akpm@linux-foundation.org: fix comment]
    Signed-off-by: Kristian Hoegsberg
    Cc: Tejun Heo
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kristian Hoegsberg
     

16 Jul, 2007

1 commit

  • * 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: (37 commits)
    [XFS] Fix lockdep annotations for xfs_lock_inodes
    [LIB]: export radix_tree_preload()
    [XFS] Fix XFS_IOC_FSBULKSTAT{,_SINGLE} & XFS_IOC_FSINUMBERS in compat mode
    [XFS] Compat ioctl handler for handle operations
    [XFS] Compat ioctl handler for XFS_IOC_FSGEOMETRY_V1.
    [XFS] Clean up function name handling in tracing code
    [XFS] Quota inode has no parent.
    [XFS] Concurrent Multi-File Data Streams
    [XFS] Use uninitialized_var macro to stop warning about rtx
    [XFS] XFS should not be looking at filp reference counts
    [XFS] Use is_power_of_2 instead of open coding checks
    [XFS] Reduce shouting by removing unnecessary macros from dir2 code.
    [XFS] Simplify XFS min/max macros.
    [XFS] Kill off xfs_count_bits
    [XFS] Cancel transactions on xfs_itruncate_start error.
    [XFS] Use do_div() on 64 bit types.
    [XFS] Fix remount,readonly path to flush everything correctly.
    [XFS] Cleanup inode extent size hint extraction
    [XFS] Prevent ENOSPC from aborting transactions that need to succeed
    [XFS] Prevent deadlock when flushing inodes on unmount
    ...

    Linus Torvalds
     

14 Jul, 2007

1 commit

  • XFS filestreams functionality uses radix trees and the preload
    functions. XFS can be built as a module and hence we need
    radix_tree_preload() exported. radix_tree_preload_end() is a
    static inline, so it doesn't need exporting.

    Signed-Off-By: Dave Chinner
    Signed-Off-By: Tim Shimmin

    David Chinner