25 Feb, 2010

4 commits

  • Because idr can be used with any of a number of locks or with
    any flavor of RCU, just disable the lockdep-based diagnostics.
    If idr needs diagnostics, the check expression will need to be
    passed into the relevant idr primitives as an additional
    argument.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Because the radix tree is used with many different locking
    designs, we cannot do any effective checking without changing
    the radix-tree APIs. It might make sense to do this later, but
    only if the RCU lockdep checking proves itself sufficiently
    valuable.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Inspection is proving insufficient to catch all RCU misuses,
    which is understandable given that rcu_dereference() might be
    protected by any of four different flavors of RCU (RCU, RCU-bh,
    RCU-sched, and SRCU), and might also/instead be protected by any
    of a number of locking primitives. It is therefore time to
    enlist the aid of lockdep.

    This set of patches is inspired by earlier work by Peter
    Zijlstra and Thomas Gleixner, and takes the following approach:

    o Set up separate lockdep classes for RCU, RCU-bh, and RCU-sched.

    o Set up separate lockdep classes for each instance of SRCU.

    o Create primitives that check for being in an RCU read-side
    critical section. These return exact answers if lockdep is
    fully enabled, but if unsure, report being in an RCU read-side
    critical section. (We want to avoid false positives!)
    The primitives are:

    For RCU: rcu_read_lock_held(void)

    For RCU-bh: rcu_read_lock_bh_held(void)

    For RCU-sched: rcu_read_lock_sched_held(void)

    For SRCU: srcu_read_lock_held(struct srcu_struct *sp)

    o Add rcu_dereference_check(), which takes a second argument
    in which one places a boolean expression based on the above
    primitives and/or lockdep_is_held().

    o A new kernel configuration parameter, CONFIG_PROVE_RCU, enables
    rcu_dereference_check(). This depends on CONFIG_PROVE_LOCKING,
    and should be quite helpful during the transition period while
    CONFIG_PROVE_RCU-unaware patches are in flight.

    The existing rcu_dereference() primitive does no checking, but
    upcoming patches will change that.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     
  • Merge reason: Update from -rc4 to -final.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

23 Feb, 2010

1 commit

  • This is retry of reverted 859ddf09743a8cc680af33f7259ccd0fd36bfe9d
    ("idr: fix a critical misallocation bug") which contained two bugs.

    * pa[idp->layers] should be cleared even if it's not used by
    sub_alloc() because it's used by mark idr_mark_full().

    * The original condition check also assigned pa[l] to p which the new
    code didn't do thus leaving p pointing at the wrong layer.

    Both problems have been fixed and the idr code has received good amount
    testing using userland testing setup where simple bitmap allocator is
    run parallel to verify the result of idr allocation.

    The bug this patch fixes is caused by sub_alloc() optimization path
    bypassing out-of-room condition check and restarting allocation loop
    with starting value higher than maximum allowed value. For detailed
    description, please read commit message of 859ddf09.

    Signed-off-by: Tejun Heo
    Based-on-patch-from: Eric Paris
    Reported-by: Eric Paris
    Tested-by: Stefan Lippers-Hollmann
    Tested-by: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

05 Feb, 2010

1 commit

  • Commit 859ddf09743a8cc680af33f7259ccd0fd36bfe9d tried to fix
    misallocation bug but broke full bit marking by not clearing
    pa[idp->layers] and also is causing X failures due to lookup failure
    in drm code. The cause of the latter hasn't been found yet. Revert
    the fix for now.

    Signed-off-by: Tejun Heo
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

03 Feb, 2010

1 commit

  • Eric Paris located a bug in idr. With IDR_BITS of 6, it grows to three
    layers when id 4096 is first allocated. When that happens, idr wraps
    incorrectly and searches the idr array ignoring the high bits. The
    following test code from Eric demonstrates the bug nicely.

    #include
    #include
    #include

    static DEFINE_IDR(test_idr);

    int init_module(void)
    {
    int ret, forty95, forty96;
    void *addr;

    /* add 2 entries both with 4095 as the start address */
    again1:
    if (!idr_pre_get(&test_idr, GFP_KERNEL))
    return -ENOMEM;
    ret = idr_get_new_above(&test_idr, (void *)4095, 4095, &forty95);
    if (ret) {
    if (ret == -EAGAIN)
    goto again1;
    return ret;
    }
    if (forty95 != 4095)
    printk(KERN_ERR "hmmm, forty95=%d\n", forty95);

    again2:
    if (!idr_pre_get(&test_idr, GFP_KERNEL))
    return -ENOMEM;
    ret = idr_get_new_above(&test_idr, (void *)4096, 4095, &forty96);
    if (ret) {
    if (ret == -EAGAIN)
    goto again2;
    return ret;
    }
    if (forty96 != 4096)
    printk(KERN_ERR "hmmm, forty96=%d\n", forty96);

    /* try to find the 2 entries, noticing that 4096 broke */
    addr = idr_find(&test_idr, forty95);
    if ((int)addr != forty95)
    printk(KERN_ERR "hmmm, after find forty95=%d addr=%d\n", forty95, (int)addr);
    addr = idr_find(&test_idr, forty96);
    if ((int)addr != forty96)
    printk(KERN_ERR "hmmm, after find forty96=%d addr=%d\n", forty96, (int)addr);
    /* really weird, the entry which should be at 4096 is actually at 0!! */
    addr = idr_find(&test_idr, 0);
    if ((int)addr)
    printk(KERN_ERR "found an entry at id=0 for addr=%d\n", (int)addr);

    idr_remove(&test_idr, forty95);
    idr_remove(&test_idr, forty96);

    return 0;
    }

    void cleanup_module(void)
    {
    }

    MODULE_AUTHOR("Eric Paris ");
    MODULE_DESCRIPTION("Simple idr test");
    MODULE_LICENSE("GPL");

    This happens because when sub_alloc() back tracks it doesn't always do it
    step-by-step while the over-the-limit detection assumes step-by-step
    backtracking. The logic in sub_alloc() looks like the following.

    restart:
    clear pa[top level + 1] for end cond detection
    l = top level
    while (true) {
    search for empty slot at this level
    if (not found) {
    push id to the next possible value
    l++
    A: if (pa[l] is clear)
    failed, return asking caller to grow the tree
    if (going up 1 level gives more slots to search)
    continue the while loop above with the incremented l
    else
    C: goto restart
    }
    adjust id accordingly to the found slot
    if (l == 0)
    return found id;
    create lower level if not there yet
    record pa[l] and l--
    }

    Test A is the fail exit condition but this assumes that failure is
    propagated upwared one level at a time but the B optimization path breaks
    the assumption and restarts the whole thing with a start value which is
    above the possible limit with the current layers. sub_alloc() assumes the
    start id value is inside the limit when called and test A is the only exit
    condition check, so it ends up searching for empty slot while ignoring
    high set bit.

    So, for 4095->4096 test, level0 search fails but pa[1] contains a valid
    pointer. However, going up 1 level wouldn't give any more empty slot so
    it takes C and when the whole thing restarts nobody notices the high bit
    set beyond the top level.

    This patch fixes the bug by changing the fail exit condition check to full
    id limit check.

    Based-on-patch-from: Eric Paris
    Reported-by: Eric Paris
    Signed-off-by: Tejun Heo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

23 Jan, 2010

2 commits


17 Jan, 2010

1 commit

  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    tracing/filters: Add comment for match callbacks
    tracing/filters: Fix MATCH_FULL filter matching for PTR_STRING
    tracing/filters: Fix MATCH_MIDDLE_ONLY filter matching
    lib: Introduce strnstr()
    tracing/filters: Fix MATCH_END_ONLY filter matching
    tracing/filters: Fix MATCH_FRONT_ONLY filter matching
    ftrace: Fix MATCH_END_ONLY function filter
    tracing/x86: Derive arch from bits argument in recordmcount.pl
    ring-buffer: Add rb_list_head() wrapper around new reader page next field
    ring-buffer: Wrap a list.next reference with rb_list_head()

    Linus Torvalds
     

16 Jan, 2010

1 commit

  • Add expedited functions. Review documentation and update
    obsolete verbiage. Also fix the advice for the RCU CPU-stall
    kernel configuration parameter, and document RCU CPU-stall
    warnings.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josh@joshtriplett.org
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    Cc: Valdis.Kletnieks@vt.edu
    Cc: dhowells@redhat.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

15 Jan, 2010

1 commit

  • It differs strstr() in that it limits the length to be searched
    in the first string.

    Signed-off-by: Li Zefan
    LKML-Reference:
    Acked-by: Frederic Weisbecker
    Signed-off-by: Steven Rostedt

    Li Zefan
     

14 Jan, 2010

1 commit

  • Commit ac4c2a3bbe5db5fc570b1d0ee1e474db7cb22585 broke the build
    of all powerpc boot wrappers.

    It attempts to add an include of autoconf.h but used the wrong
    path for it. It also adds -D__KERNEL__ to our boot wrapper, both
    things that we pretty much didn't do on purpose so far.

    We want our boot wrapper to remain independent enough of the kernel
    for various reasons, one of them being that you can "wrap" an existing
    kernel at distro install time which allows to ship one kernel image
    and a set of boot wrappers for different platforms, the wrappers
    don't have to be built out of the same kernel build tree.

    It's also incorrect to do what the patch does in our boot environment
    since we may not have a proper alignment exception handler which means
    we may not be able to fixup the few cases where an unaligned access will
    need SW emulation (depends on the core variant, could be when crossing
    page or segment boundaries for example).

    This patch fixes it by putting the old code back in and using the
    new "fancy" variant only when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
    is set, which happens not to be set on powerpc since we don't include
    autoconf.h. It also reverts the changes to our boot wrapper Makefile.

    This means that x86 should, afaik, keep the optimisations since its
    boot wrapper does include autoconf.h and define __KERNEL__ (though I
    doubt they make that much different outside of slow embedded processors).

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

13 Jan, 2010

1 commit

  • There are two copies of list_sort() in the tree already, one in the DRM
    code, another in ubifs. Now XFS needs this as well. Create a generic
    list_sort() function from the ubifs version and convert existing users
    to it so we don't end up with yet another copy in the tree.

    Signed-off-by: Dave Chinner
    Acked-by: Dave Airlie
    Acked-by: Artem Bityutskiy
    Signed-off-by: Linus Torvalds

    Dave Chinner
     

12 Jan, 2010

6 commits

  • Signed-off-by: Uwe Kleine-König
    Reported-by: Josip Rodin
    Cc: Joe Perches
    Cc: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • lib/rational.c:62: warning: data definition has no type or storage class
    lib/rational.c:62: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
    lib/rational.c:62: warning: parameter names (without types) in function declaration

    Signed-off-by: Sascha Hauer
    Signed-off-by: Uwe Kleine-König
    Acked-by: WANG Cong
    Cc: Oskar Schirmer
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sascha Hauer
     
  • Signed-off-by: Albin Tonnerre
    Tested-by: Wu Zhangjin
    Acked-by: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Tested-by: Russell King
    Acked-by: Russell King
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Albin Tonnerre
     
  • This patch series adds generic support for creating and extracting
    LZO-compressed kernel images, as well as support for using such images on
    the x86 and ARM architectures, and support for creating and using
    LZO-compressed initrd and initramfs images.

    Russell King said:

    : Testing on a Cortex A9 model:
    : - lzo decompressor is 65% of the time gzip takes to decompress a kernel
    : - lzo kernel is 9% larger than a gzip kernel
    :
    : which I'm happy to say confirms your figures when comparing the two.
    :
    : However, when comparing your new gzip code to the old gzip code:
    : - new is 99% of the size of the old code
    : - new takes 42% of the time to decompress than the old code
    :
    : What this means is that for a proper comparison, the results get even better:
    : - lzo is 7.5% larger than the old gzip'd kernel image
    : - lzo takes 28% of the time that the old gzip code took
    :
    : So the expense seems definitely worth the effort. The only reason I
    : can think of ever using gzip would be if you needed the additional
    : compression (eg, because you have limited flash to store the image.)
    :
    : I would argue that the default for ARM should therefore be LZO.

    This patch:

    The lzo compressor is worse than gzip at compression, but faster at
    extraction. Here are some figures for an ARM board I'm working on:

    Uncompressed size: 3.24Mo
    gzip 1.61Mo 0.72s
    lzo 1.75Mo 0.48s

    So for a compression ratio that is still relatively close to gzip, it's
    much faster to extract, at least in that case.

    This part contains:
    - Makefile routine to support lzo compression
    - Fixes to the existing lzo compressor so that it can be used in
    compressed kernels
    - wrapper around the existing lzo1x_decompress, as it only extracts one
    block at a time, while we need to extract a whole file here
    - config dialog for kernel compression

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Albin Tonnerre
    Tested-by: Wu Zhangjin
    Acked-by: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Tested-by: Russell King
    Acked-by: Russell King
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Albin Tonnerre
     
  • JFFS2 uses lesser compression ratio and inflate always ends up in "copy
    direct from output" case.

    This patch tries to optimize the direct copy procedure. Uses
    get_unaligned() but only in one place.

    The copy loop just above this one can also use this optimization, but I
    havn't done so as I have not tested if it is a win there too.

    On my MPC8321 this is about 17% faster on my JFFS2 root FS than the
    original.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joakim Tjernlund
    Cc: Roel Kluin
    Cc: Richard Purdie
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joakim Tjernlund
     
  • There is no need to perform full BIDIR sync (copying the buffers in case
    of swiotlb and similar schemes) if we know that the owner (CPU or device)
    hasn't altered the data.

    Addresses the false-positive reported at
    http://bugzilla.kernel.org/show_bug.cgi?id=14169

    Signed-off-by: Krzysztof Halasa
    Cc: David Miller
    Cc: Joerg Roedel
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Halasa
     

01 Jan, 2010

2 commits

  • …l/git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    dma-debug: Fix bug causing build warning

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86/agp: Fix agp_amd64_init() initialization with CONFIG_GART_IOMMU enabled
    x86: SGI UV: Fix writes to led registers on remote uv hubs
    x86, kmemcheck: Use KERN_WARNING for error reporting
    x86: Use KERN_DEFAULT log-level in __show_regs()
    x86, compress: Force i386 instructions for the decompressor
    x86/amd-iommu: Fix initialization failure panic
    dma-debug: Do not add notifier when dma debugging is disabled.
    x86: Fix objdump version check in chkobjdump.awk for different formats.

    Trivial conflicts in arch/x86/include/asm/uv/uv_hub.h due to me having
    applied an earlier version of an SGI UV fix.

    Linus Torvalds
     

31 Dec, 2009

1 commit

  • Stephen Rothwell reported the following build warning:

    lib/dma-debug.c: In function 'dma_debug_device_change':
    lib/dma-debug.c:680: warning: 'return' with no value, in function returning non-void

    Introduced by commit f797d9881b62c2ddb1d2e7bd80d87141949c84aa
    ("dma-debug: Do not add notifier when dma debugging is disabled").

    Return 0 [notify-done] when disabled. (this is standard bus notifier behavior.)

    Signed-off-by: Shaun Ruffell
    Signed-off-by: Joerg Roedel
    Cc: Linus Torvalds
    Cc:
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

28 Dec, 2009

1 commit


23 Dec, 2009

1 commit

  • Fix kernel-doc warnings (@arg name) in string.c::skip_spaces().

    Warning(lib/string.c:347): No description found for parameter 'str'
    Warning(lib/string.c:347): Excess function parameter 's' description in 'skip_spaces'

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

    Randy Dunlap
     

21 Dec, 2009

1 commit

  • If CONFIG_HAVE_DMA_API_DEBUG is defined and "dma_debug=off" is
    specified on the kernel command line, when you detach a driver from a
    device you can cause the following NULL pointer dereference:

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] dma_debug_device_change+0x5d/0x117

    The problem is that the dma_debug_device_change notifier function is
    added to the bus notifier chain even though the dma_entry_hash array
    was never initialized. If dma debugging is disabled, this patch both
    prevents dma_debug_device_change notifiers from being added to the
    chain, and additionally ensures that the dma_debug_device_change
    notifier function is a no-op.

    Cc: stable@kernel.org
    Signed-off-by: Shaun Ruffell
    Signed-off-by: Joerg Roedel

    Shaun Ruffell
     

20 Dec, 2009

1 commit

  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, irq: Allow 0xff for /proc/irq/[n]/smp_affinity on an 8-cpu system
    Makefile: Unexport LC_ALL instead of clearing it
    x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
    x86: Reenable TSC sync check at boot, even with NONSTOP_TSC
    x86: Don't use POSIX character classes in gen-insn-attr-x86.awk
    Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C
    x86: Increase MAX_EARLY_RES; insufficient on 32-bit NUMA
    x86: Fix checking of SRAT when node 0 ram is not from 0
    x86, cpuid: Add "volatile" to asm in native_cpuid()
    x86, msr: msrs_alloc/free for CONFIG_SMP=n
    x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space
    x86: Add IA32_TSC_AUX MSR and use it
    x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers
    initramfs: add missing decompressor error check
    bzip2: Add missing checks for malloc returning NULL
    bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure

    Linus Torvalds
     

18 Dec, 2009

2 commits

  • * 'kmemleak' of git://linux-arm.org/linux-2.6:
    kmemleak: fix kconfig for crc32 build error
    kmemleak: Reduce the false positives by checking for modified objects
    kmemleak: Show the age of an unreferenced object
    kmemleak: Release the object lock before calling put_object()
    kmemleak: Scan the _ftrace_events section in modules
    kmemleak: Simplify the kmemleak_scan_area() function prototype
    kmemleak: Do not use off-slab management with SLAB_NOLEAKTRACE

    Linus Torvalds
     
  • These were added in

    9ac6e44 (lib/vsprintf.c: add %pU to print UUID/GUIDs)
    c7dabef (vsprintf: use %pR, %pr instead of %pRt, %pRf)
    8a27f7c (lib/vsprintf.c: Add "%pI6c" - print pointer as compressed ipv6 address)
    4aa9960 (printk: add %I4, %I6, %i4, %i6 format specifiers)
    dd45c9c (printk: add %pM format specifier for MAC addresses)

    but only added comments to pointer() not vsnprintf() that is refered to by
    printk's comments.

    Signed-off-by: Uwe Kleine-König
    Cc: Harvey Harrison
    Cc: David S. Miller
    Cc: Joe Perches
    Cc: Jens Rosenboom
    Cc: David S. Miller
    Cc: Bjorn Helgaas
    Cc: Jesse Barnes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     

17 Dec, 2009

1 commit

  • * 'next' of git://git.secretlab.ca/git/linux-2.6: (23 commits)
    powerpc: fix up for mmu_mapin_ram api change
    powerpc: wii: allow ioremap within the memory hole
    powerpc: allow ioremap within reserved memory regions
    wii: use both mem1 and mem2 as ram
    wii: bootwrapper: add fixup to calc useable mem2
    powerpc: gamecube/wii: early debugging using usbgecko
    powerpc: reserve fixmap entries for early debug
    powerpc: wii: default config
    powerpc: wii: platform support
    powerpc: wii: hollywood interrupt controller support
    powerpc: broadway processor support
    powerpc: wii: bootwrapper bits
    powerpc: wii: device tree
    powerpc: gamecube: default config
    powerpc: gamecube: platform support
    powerpc: gamecube/wii: flipper interrupt controller support
    powerpc: gamecube/wii: udbg support for usbgecko
    powerpc: gamecube/wii: do not include PCI support
    powerpc: gamecube/wii: declare as non-coherent platforms
    powerpc: gamecube/wii: introduce GAMECUBE_COMMON
    ...

    Fix up conflicts in arch/powerpc/mm/fsl_booke_mmu.c.

    Hopefully even close to correctly.

    Linus Torvalds
     

16 Dec, 2009

10 commits

  • Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Use bitmap library and kill some unused iommu helper functions.

    1. s/iommu_area_free/bitmap_clear/

    2. s/iommu_area_reserve/bitmap_set/

    3. Use bitmap_find_next_zero_area instead of find_next_zero_area

    This cannot be simple substitution because find_next_zero_area
    doesn't check the last bit of the limit in bitmap

    4. Remove iommu_area_free, iommu_area_reserve, and find_next_zero_area

    Signed-off-by: Akinobu Mita
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: FUJITA Tomonori
    Cc: Joerg Roedel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • This introduces new bitmap functions:

    bitmap_set: Set specified bit area
    bitmap_clear: Clear specified bit area
    bitmap_find_next_zero_area: Find free bit area

    These are mostly stolen from iommu helper. The differences are:

    - Use find_next_bit instead of doing test_bit for each bit

    - Rewrite bitmap_set and bitmap_clear

    Instead of setting or clearing for each bit.

    - Check the last bit of the limit

    iommu-helper doesn't want to find such area

    - The return value if there is no zero area

    find_next_zero_area in iommu helper: returns -1
    bitmap_find_next_zero_area: return >= bitmap size

    Signed-off-by: Akinobu Mita
    Cc: FUJITA Tomonori
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Greg Kroah-Hartman
    Cc: Lothar Wassmann
    Cc: Roland Dreier
    Cc: Yevgeny Petrilin
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Joerg Roedel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • dma_mask is, when interpreted as address, the last valid byte, and hence
    comparison msut also be done using the last valid of the buffer in
    question.

    Also fix the open-coded instances in lib/swiotlb.c.

    Signed-off-by: Jan Beulich
    Cc: FUJITA Tomonori
    Cc: Becky Bruce
    Cc: "Luck, Tony"
    Cc: Benjamin Herrenschmidt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • Signed-off-by: Phillip Lougher
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Phillip Lougher
     
  • …el/git/tip/linux-2.6-tip

    * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits)
    clockevents: Convert to raw_spinlock
    clockevents: Make tick_device_lock static
    debugobjects: Convert to raw_spinlocks
    perf_event: Convert to raw_spinlock
    hrtimers: Convert to raw_spinlocks
    genirq: Convert irq_desc.lock to raw_spinlock
    smp: Convert smplocks to raw_spinlocks
    rtmutes: Convert rtmutex.lock to raw_spinlock
    sched: Convert pi_lock to raw_spinlock
    sched: Convert cpupri lock to raw_spinlock
    sched: Convert rt_runtime_lock to raw_spinlock
    sched: Convert rq->lock to raw_spinlock
    plist: Make plist debugging raw_spinlock aware
    bkl: Fixup core_lock fallout
    locking: Cleanup the name space completely
    locking: Further name space cleanups
    alpha: Fix fallout from locking changes
    locking: Implement new raw_spinlock
    locking: Convert raw_rwlock functions to arch_rwlock
    locking: Convert raw_rwlock to arch_rwlock
    ...

    Linus Torvalds
     
  • Move common crc body to new function crc32_body() cleaup and micro
    optimize crc32_body for speed and less size.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joakim Tjernlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joakim Tjernlund
     
  • Recently, We marked strstrip() as must_check. because it was frequently
    misused and it should be checked. However, we found one exception.
    scsi/ipr.c intentionally ignore return value of strstrip. Because it
    wishes to keep the whitespace at the beginning.

    Thus we need to keep with and without checked whitespace trim function.
    This patch adds a new strim() and changes ipr.c to use it.

    [akpm@linux-foundation.org: coding-style fixes]
    Suggested-by: Alan Cox
    Signed-off-by: KOSAKI Motohiro
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KOSAKI Motohiro
     
  • UUID/GUIDs are somewhat common in kernel source.

    Standardize the printed style of UUID/GUIDs by using
    another extension to %p.

    %pUb: 01020304-0506-0708-090a-0b0c0d0e0f10
    %pUB: 01020304-0506-0708-090A-0B0C0D0E0F10 (upper case)
    %pUl: 04030201-0605-0807-090a-0b0c0d0e0f10
    %pUL: 04030201-0605-0807-090A-0B0C0D0E0F10 (upper case)

    %pU defaults to %pUb

    Signed-off-by: Joe Perches
    Cc: Jeff Garzik
    Cc: Tejun Heo
    Cc: Alex Elder
    Cc: Christoph Hellwig
    Cc: Artem Bityutskiy
    Cc: Adrian Hunter
    Cc: Steven Whitehouse
    Cc: Mauro Carvalho Chehab
    Cc: Matt Mackall
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • No functional change. Cache strlen() result to avoid recalculating it up
    to 3 times on the worst case.

    Reduces code size a little by 32 bytes:
    text data bss dec hex filename
    1385 0 0 1385 569 lib/parser.o-BEFORE
    1353 0 0 1353 549 lib/parser.o-AFTER

    Signed-off-by: André Goddard Rosa
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    André Goddard Rosa