12 Sep, 2008

2 commits


11 Sep, 2008

1 commit

  • This fixes a SWIOTLB oops

    With SWIOTLB being enabled and straight-forward page allocation
    failure [1], the swiotlb_alloc_coherent fall-back path hits an
    issue [2], resulting in my webcam failing to work.

    At the time of oops, RDI is clearly a pointer to a structure which
    has arrived as NULL, leading to the typo in swiotlb_map_single's
    callsite arguments.

    Correctly passing the device structure [3] addresses the issue and
    gets my webcam working again (the allocation failure still occuring).

    --- [1]

    skype: page allocation failure. order:3, mode:0x1
    Pid: 5895, comm: skype Not tainted 2.6.27-rc6-235c-debug #1

    Call Trace:
    [] __alloc_pages_internal+0x4a0/0x5d0
    [] alloc_pages_current+0xad/0x110
    [] __get_free_pages+0x1d/0x60
    [] swiotlb_alloc_coherent+0x49/0x180
    [] dma_alloc_coherent+0x281/0x310
    [] hcd_buffer_alloc+0x50/0x90
    [] usb_buffer_alloc+0x2d/0x40
    [] uvc_alloc_urb_buffers+0x53/0xf0 [uvcvideo]
    [] uvc_init_video+0x158/0x3e0 [uvcvideo]
    [] uvc_video_enable+0x37/0x80 [uvcvideo]
    [] uvc_v4l2_do_ioctl+0x723/0x1260 [uvcvideo]
    [] ? trace_hardirqs_off_caller+0x21/0xc0
    [] ? trace_hardirqs_off_caller+0x21/0xc0
    [] video_usercopy+0x19f/0x390 [videodev]
    [] ? uvc_v4l2_do_ioctl+0x0/0x1260 [uvcvideo]
    [] ? put_lock_stats+0xe/0x30
    [] uvc_v4l2_ioctl+0x4d/0x80 [uvcvideo]
    [] native_ioctl+0x83/0x90 [compat_ioctl32]
    [] v4l_compat_ioctl32+0x2be/0x1da4 [compat_ioctl32]
    [] ? do_page_fault+0x3d1/0xae0
    [] ? trace_hardirqs_on+0xd/0x10
    [] ? trace_hardirqs_on_caller+0x149/0x1b0
    [] ? trace_hardirqs_on+0xd/0x10
    [] compat_sys_ioctl+0x8a/0x3c0
    [] ? trace_hardirqs_off_thunk+0x3a/0x3c
    [] sysenter_dispatch+0x7/0x2c
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f

    Mem-Info:
    Node 0 DMA per-cpu:
    CPU 0: hi: 0, btch: 1 usd: 0
    CPU 1: hi: 0, btch: 1 usd: 0
    Node 0 DMA32 per-cpu:
    CPU 0: hi: 186, btch: 31 usd: 3
    CPU 1: hi: 186, btch: 31 usd: 0
    Node 0 Normal per-cpu:
    CPU 0: hi: 186, btch: 31 usd: 23
    CPU 1: hi: 186, btch: 31 usd: 179
    Active:78545 inactive:48683 dirty:31 writeback:0 unstable:2
    free:830202 slab:17516 mapped:17473 pagetables:3496 bounce:0
    Node 0 DMA free:36kB min:28kB low:32kB high:40kB active:0kB
    inactive:0kB present:15156kB pages_scanned:0 all_unreclaimable? no
    lowmem_reserve[]: 0 3207 3956 3956
    Node 0 DMA32 free:3197192kB min:6512kB low:8140kB high:9768kB
    active:0kB inactive:0kB present:3284896kB pages_scanned:0
    all_unreclaimable? no
    lowmem_reserve[]: 0 0 748 748
    Node 0 Normal free:123580kB min:1516kB low:1892kB high:2272kB
    active:314180kB inactive:194732kB present:766464kB pages_scanned:0
    all_unreclaimable? no
    lowmem_reserve[]: 0 0 0 0
    Node 0 DMA: 1*4kB 0*8kB 0*16kB 1*32kB 0*64kB 0*128kB 0*256kB 0*512kB
    0*1024kB 0*2048kB 0*4096kB = 36kB
    Node 0 DMA32: 4*4kB 3*8kB 2*16kB 3*32kB 4*64kB 5*128kB 3*256kB 5*512kB
    4*1024kB 5*2048kB 776*4096kB = 3197224kB
    Node 0 Normal: 14*4kB 14*8kB 8*16kB 6*32kB 1*64kB 3*128kB 3*256kB
    2*512kB 4*1024kB 1*2048kB 28*4096kB = 123560kB
    64847 total pagecache pages
    0 pages in swap cache
    Swap cache stats: add 0, delete 0, find 0/0
    Free swap = 502752kB
    Total swap = 502752kB
    1048576 pages RAM
    52120 pages reserved
    71967 pages shared
    143004 pages non-shared

    --- [2]

    BUG: unable to handle kernel NULL pointer dereference at 00000000000002c8
    IP: [] map_single+0x1c/0x280
    PGD 10e54e067 PUD 10e595067 PMD 0
    Oops: 0000 [1] PREEMPT SMP DEBUG_PAGEALLOC
    CPU 0
    Modules linked in: kvm_intel kvm microcode uvcvideo compat_ioctl32
    videodev v4l1_compat shpchp pci_hotplug
    Pid: 5895, comm: skype Not tainted 2.6.27-rc6-235c-debug #1
    RIP: 0010:[] [] map_single+0x1c/0x280
    RSP: 0018:ffff88010e78d988 EFLAGS: 00210296
    RAX: 0000780000000000 RBX: 0000000000000000 RCX: 0000000000000002
    RDX: 0000000000005000 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: ffff88010e78d9e8 R08: 0000000000000000 R09: 0000000000000001
    R10: ffff88010e78d698 R11: 0000000000000001 R12: 0000000000000002
    R13: 0000000000000000 R14: 0000000000005000 R15: ffff88012f1c9968
    FS: 0000000000000000(0000) GS:ffffffff80a6cdc0(0063) knlGS:00000000f6355b90
    CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
    CR2: 00000000000002c8 CR3: 000000010e57d000 CR4: 00000000000026e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process skype (pid: 5895, threadinfo ffff88010e78c000, task ffff88012b9cc460)
    Stack: 0000000200000000 0000000000005000 0000000000000000 0000000000000000
    00000000000017b8 0000000000000000 ffff88010e78d9c8 0000000000000000
    0000000000000002 0000000000000000 0000000000005000 ffff88012f1c9968
    Call Trace:
    [] swiotlb_map_single_attrs+0x60/0xf0
    [] swiotlb_map_single+0xc/0x10
    [] swiotlb_alloc_coherent+0xfe/0x180
    [] dma_alloc_coherent+0x281/0x310
    [] hcd_buffer_alloc+0x50/0x90
    [] usb_buffer_alloc+0x2d/0x40
    [] uvc_alloc_urb_buffers+0x53/0xf0 [uvcvideo]
    [] uvc_init_video+0x158/0x3e0 [uvcvideo]
    [] uvc_video_enable+0x37/0x80 [uvcvideo]
    [] uvc_v4l2_do_ioctl+0x723/0x1260 [uvcvideo]
    [] ? trace_hardirqs_off_caller+0x21/0xc0
    [] ? trace_hardirqs_off_caller+0x21/0xc0
    [] video_usercopy+0x19f/0x390 [videodev]
    [] ? uvc_v4l2_do_ioctl+0x0/0x1260 [uvcvideo]
    [] ? put_lock_stats+0xe/0x30
    [] uvc_v4l2_ioctl+0x4d/0x80 [uvcvideo]
    [] native_ioctl+0x83/0x90 [compat_ioctl32]
    [] v4l_compat_ioctl32+0x2be/0x1da4 [compat_ioctl32]
    [] ? do_page_fault+0x3d1/0xae0
    [] ? trace_hardirqs_on+0xd/0x10
    [] ? trace_hardirqs_on_caller+0x149/0x1b0
    [] ? trace_hardirqs_on+0xd/0x10
    [] compat_sys_ioctl+0x8a/0x3c0
    [] ? trace_hardirqs_off_thunk+0x3a/0x3c
    [] sysenter_dispatch+0x7/0x2c
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f

    Code: 45 31 c0 48 89 e5 e8 a4 ff ff ff c9 c3 66 90 55 48 89 e5 41 57
    41 56 41 55 41 54 53 48 83 ec 38 48 89 75 b0 48 89 55 a8 89 4d a4
    8b 87 c8 02 00 00 48 85 c0 0f 84 1c 02 00 00 48 8b 58 08 48
    RIP [] map_single+0x1c/0x280
    RSP
    CR2: 00000000000002c8
    ---[ end trace 5d15baeeb7025a0e ]---

    --- [3]

    ffffffff8046c830 :
    map_single():
    /store/kernel/linux/lib/swiotlb.c:291
    ffffffff8046c830: 55 push %rbp
    ffffffff8046c831: 48 89 e5 mov %rsp,%rbp
    ffffffff8046c834: 41 57 push %r15
    ffffffff8046c836: 41 56 push %r14
    ffffffff8046c838: 41 55 push %r13
    ffffffff8046c83a: 41 54 push %r12
    ffffffff8046c83c: 53 push %rbx
    ffffffff8046c83d: 48 83 ec 38 sub $0x38,%rsp
    ffffffff8046c841: 48 89 75 b0 mov %rsi,-0x50(%rbp)
    ffffffff8046c845: 48 89 55 a8 mov %rdx,-0x58(%rbp)
    ffffffff8046c849: 89 4d a4 mov %ecx,-0x5c(%rbp)
    dma_get_seg_boundary():
    /store/kernel/linux/include/linux/dma-mapping.h:80
    ffffffff8046c84c: 48 8b 87 c8 02 00 00 mov 0x2c8(%rdi),%rax
    Signed-off-by: Linus Torvalds

    Daniel J Blueman
     

10 Sep, 2008

1 commit

  • It was introduced by "vsprintf: add support for '%pS' and '%pF' pointer
    formats" in commit 0fe1ef24f7bd0020f29ffe287dfdb9ead33ca0b2. However,
    the current way its coded doesn't work on parisc64. For two reasons: 1)
    parisc isn't in the #ifdef and 2) parisc has a different format for
    function descriptors

    Make dereference_function_descriptor() more accommodating by allowing
    architecture overrides. I put the three overrides (for parisc64, ppc64
    and ia64) in arch/kernel/module.c because that's where the kernel
    internal linker which knows how to deal with function descriptors sits.

    Signed-off-by: James Bottomley
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Tony Luck
    Acked-by: Kyle McMartin
    Signed-off-by: Linus Torvalds

    James Bottomley
     

06 Sep, 2008

1 commit


03 Sep, 2008

1 commit

  • This bug is causing random crashes
    (http://bugzilla.kernel.org/show_bug.cgi?id=11414).

    -fno-omit-frame-pointer is only needed on powerpc when -pg is also
    supplied, and there is a gcc bug that causes incorrect code generation
    on 32-bit powerpc when -fno-omit-frame-pointer is used---it uses stack
    locations below the stack pointer, which is not allowed by the ABI
    because those locations can and sometimes do get corrupted by an
    interrupt.

    This ensures that CONFIG_FRAME_POINTER is only selected by ftrace.
    When CONFIG_FTRACE is enabled we also pass -mno-sched-epilog to work
    around the gcc codegen bug.

    Patch based on work by:
    Andreas Schwab
    Segher Boessenkool

    Signed-off-by: Tony Breeds
    Signed-off-by: Paul Mackerras

    Tony Breeds
     

01 Sep, 2008

1 commit

  • Daniel J. Blueman reported:
    > =======================================================
    > [ INFO: possible circular locking dependency detected ]
    > 2.6.27-rc4-224c #1
    > -------------------------------------------------------
    > hald/4680 is trying to acquire lock:
    > (&n->list_lock){++..}, at: [] add_partial+0x26/0x80
    >
    > but task is already holding lock:
    > (&obj_hash[i].lock){++..}, at: []
    > debug_object_free+0x5c/0x120

    We fix it by moving the actual freeing to outside the lock (the lock
    now only protects the list).

    The pool lock is also promoted to irq-safe (suggested by Dan). It's
    necessary because free_pool is now called outside the irq disabled
    region. So we need to protect against an interrupt handler which calls
    debug_object_init().

    [tglx@linutronix.de: added hlist_move_list helper to avoid looping
    through the list twice]

    Reported-by: Daniel J Blueman
    Signed-off-by: Vegard Nossum
    Signed-off-by: Thomas Gleixner

    Vegard Nossum
     

22 Aug, 2008

1 commit


19 Aug, 2008

1 commit


17 Aug, 2008

1 commit

  • I noticed that sysctl_check.o was the largest object file in
    a allnoconfig build in kernel/*.

    36243 0 0 36243 8d93 kernel/sysctl_check.o

    This is because it was default y and && EMBEDDED. But I don't
    really see a need for a non kernel developer to have their
    sysctls checked all the time.

    So move the Kconfig into the kernel debugging section and
    also drop the default y and the EMBEDDED check.

    Signed-off-by: Andi Kleen
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

16 Aug, 2008

1 commit

  • The idea of the implementation of this fix is from Michael Ellerman.

    This function has two loops, but they each interpret the memory_limit
    value differently. The first loop interprets it as a "size limit"
    whereas the second loop interprets it as an "address limit".

    Before the second loop runs, reset memory_limit to lmb_end_of_DRAM()
    so that it all works out.

    Signed-off-by: David S. Miller
    Acked-by: Michael Ellerman

    David S. Miller
     

13 Aug, 2008

3 commits

  • Currently source files in the Documentation/ sub-dir can easily bit-rot
    since they are not generally buildable, either because they are hidden in
    text files or because there are no Makefile rules for them. This needs to
    be fixed so that the source files remain usable and good examples of code
    instead of bad examples.

    Add the ability to build source files that are in the Documentation/ dir.
    Add to Kconfig as "BUILD_DOCSRC" config symbol.

    Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
    Documentation/ sources. Or enable BUILD_DOCSRC in the *config system.
    However, this symbol depends on HEADERS_CHECK since the header files need
    to be installed (for userspace builds).

    Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
    sparc64, powerpc, sh, m68k, & mips.

    Signed-off-by: Randy Dunlap
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Short enough reads from /proc/irq/*/smp_affinity return -EINVAL for no
    good reason.

    This became noticed with NR_CPUS=4096 patches, when length of printed
    representation of cpumask becase 1152, but cat(1) continued to read with
    1024-byte chunks. bitmap_scnprintf() in good faith fills buffer, returns
    1023, check returns -EINVAL.

    Fix it by switching to seq_file, so handler will just fill buffer and
    doesn't care about offsets, length, filling EOF and all this crap.

    For that add seq_bitmap(), and wrappers around it -- seq_cpumask() and
    seq_nodemask().

    Signed-off-by: Alexey Dobriyan
    Reviewed-by: Paul Jackson
    Cc: Mike Travis
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Fix wrong conversion function used by strict_strtou*

    Signed-off-by: Yi Yang
    Reported-by: Swen Schillig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yi Yang
     

12 Aug, 2008

1 commit


02 Aug, 2008

2 commits

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
    kgdb: fix gdb serial thread queries
    kgdb: fix kgdb_validate_break_address to perform a mem write
    kgdb: remove the requirement for CONFIG_FRAME_POINTER

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
    tcp: MD5: Fix IPv6 signatures
    skbuff: add missing kernel-doc for do_not_encrypt
    net/ipv4/route.c: fix build error
    tcp: MD5: Fix MD5 signatures on certain ACK packets
    ipv6: Fix ip6_xmit to send fragments if ipfragok is true
    ipvs: Move userspace definitions to include/linux/ip_vs.h
    netdev: Fix lockdep warnings in multiqueue configurations.
    netfilter: xt_hashlimit: fix race between htable_destroy and htable_gc
    netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations
    netfilter: nf_conntrack_tcp: decrease timeouts while data in unacknowledged
    irda: replace __FUNCTION__ with __func__
    nsc-ircc: default to dongle type 9 on IBM hardware
    bluetooth: add quirks for a few hci_usb devices
    hysdn: remove the packed attribute from PofTimStamp_tag
    isdn: use the common ascii hex helpers
    tg3: adapt tg3 to use reworked PCI PM code
    atm: fix direct casts of pointers to u32 in the InterPhase driver
    atm: fix const assignment/discard warnings in the ATM networking driver
    net: use the common ascii hex helpers
    random32: seeding improvement
    ...

    Linus Torvalds
     

01 Aug, 2008

2 commits


31 Jul, 2008

1 commit

  • The rationale is:
    * use u32 consistently
    * no need to do LCG on values from (better) get_random_bytes
    * use more data from get_random_bytes for secondary seeding
    * don't reduce state space on srandom32()
    * enforce state variable initialization restrictions

    Note: the second paper has a version of random32() with even longer period
    and a version of random64() if needed.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Andrew Morton

    Stephen Hemminger
     

29 Jul, 2008

5 commits


27 Jul, 2008

6 commits

  • This implements a platform-independent version of show_mem().

    Signed-off-by: Johannes Weiner
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Haavard Skinnemoen
    Cc: Bryan Wu
    Cc: Chris Zankel
    Cc: Ingo Molnar
    Cc: Jeff Dike
    Cc: David S. Miller
    Cc: Paul Mundt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Yoshinori Sato
    Cc: Ralf Baechle
    Cc: Greg Ungerer
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Hirokazu Takata
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • This adds the new function task_current_syscall() on machines where the
    asm/syscall.h interface is supported (CONFIG_HAVE_ARCH_TRACEHOOK). It's
    exported for modules to use in the future. This function safely samples
    the state of a blocked thread to collect what system call it is blocked
    in, and the six system call argument registers.

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

    Roland McGrath
     
  • Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
    part of the warning section for better reporting/collection. In addition, one
    of the if() clauses collapes into the WARN() entirely now.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Kmem cache passed to constructor is only needed for constructors that are
    themselves multiplexeres. Nobody uses this "feature", nor does anybody uses
    passed kmem cache in non-trivial way, so pass only pointer to object.

    Non-trivial places are:
    arch/powerpc/mm/init_64.c
    arch/powerpc/mm/hugetlbpage.c

    This is flag day, yes.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Pekka Enberg
    Acked-by: Christoph Lameter
    Cc: Jon Tollefson
    Cc: Nick Piggin
    Cc: Matt Mackall
    [akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c]
    [akpm@linux-foundation.org: fix mm/slab.c]
    [akpm@linux-foundation.org: fix ubifs]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Introduce gang_lookup_slot() and gang_lookup_slot_tag() functions, which
    are used by lockless pagecache.

    Signed-off-by: Nick Piggin
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Hugh Dickins
    Cc: "Paul E. McKenney"
    Reviewed-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
    architecture does:

    This enables us to cleanly fix the Calgary IOMMU issue that some devices
    are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

    I think that per-device dma_mapping_ops support would be also helpful for
    KVM people to support PCI passthrough but Andi thinks that this makes it
    difficult to support the PCI passthrough (see the above thread). So I
    CC'ed this to KVM camp. Comments are appreciated.

    A pointer to dma_mapping_ops to struct dev_archdata is added. If the
    pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's
    NULL, the system-wide dma_ops pointer is used as before.

    If it's useful for KVM people, I plan to implement a mechanism to register
    a hook called when a new pci (or dma capable) device is created (it works
    with hot plugging). It enables IOMMUs to set up an appropriate
    dma_mapping_ops per device.

    The major obstacle is that dma_mapping_error doesn't take a pointer to the
    device unlike other DMA operations. So x86 can't have dma_mapping_ops per
    device. Note all the POWER IOMMUs use the same dma_mapping_error function
    so this is not a problem for POWER but x86 IOMMUs use different
    dma_mapping_error functions.

    The first patch adds the device argument to dma_mapping_error. The patch
    is trivial but large since it touches lots of drivers and dma-mapping.h in
    all the architecture.

    This patch:

    dma_mapping_error() doesn't take a pointer to the device unlike other DMA
    operations. So we can't have dma_mapping_ops per device.

    Note that POWER already has dma_mapping_ops per device but all the POWER
    IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device
    argument.

    [akpm@linux-foundation.org: fix sge]
    [akpm@linux-foundation.org: fix svc_rdma]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix bnx2x]
    [akpm@linux-foundation.org: fix s2io]
    [akpm@linux-foundation.org: fix pasemi_mac]
    [akpm@linux-foundation.org: fix sdhci]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix sparc]
    [akpm@linux-foundation.org: fix ibmvscsi]
    Signed-off-by: FUJITA Tomonori
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Avi Kivity
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

26 Jul, 2008

9 commits

  • * Replace previous instances of the cpumask_of_cpu_ptr* macros
    with a the new (lvalue capable) generic cpumask_of_cpu().

    Signed-off-by: Mike Travis
    Cc: Andrew Morton
    Cc: Jack Steiner
    Cc: Rusty Russell
    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • Calculating the number of pages from given address and length numbers is a task
    required in multiple IOMMU implementations. So implement this as a generic
    function into the IOMMU helper code.

    Signed-off-by: Joerg Roedel
    Cc: iommu@lists.linux-foundation.org
    Cc: bhavna.sarathy@amd.com
    Cc: robert.richter@amd.com
    Cc: FUJITA Tomonori
    Signed-off-by: Ingo Molnar

    Joerg Roedel
     
  • Introduce the free_layer() routine: it is the one that actually frees memory
    after a grace period has elapsed.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Make idr_find rcu-safe: it can now be called inside an rcu_read critical
    section.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Make the idr_get_new* routines rcu-safe.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Do some code factorization in the return code analysis.

    Signed-off-by: Nadia Derbey
    Cc: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • Fix the incomplete printk call.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • This is a trivial patch that renames:

    . alloc_layer to get_from_free_list since it idr_pre_get that actually
    allocates memory.
    . free_layer to move_to_free_list since memory is not actually freed there.

    This makes things more clear for the next patches.

    Signed-off-by: Nadia Derbey
    Reviewed-by: "Paul E. McKenney"
    Cc: Manfred Spraul
    Cc: Jim Houston
    Cc: Pierre Peiffer
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nadia Derbey
     
  • All ratelimit user use same jiffies and burst params, so some messages
    (callbacks) will be lost.

    For example:
    a call printk_ratelimit(5 * HZ, 1)
    b call printk_ratelimit(5 * HZ, 1) before the 5*HZ timeout of a, then b will
    will be supressed.

    - rewrite __ratelimit, and use a ratelimit_state as parameter. Thanks for
    hints from andrew.

    - Add WARN_ON_RATELIMIT, update rcupreempt.h

    - remove __printk_ratelimit

    - use __ratelimit in net_ratelimit

    Signed-off-by: Dave Young
    Cc: "David S. Miller"
    Cc: "Paul E. McKenney"
    Cc: Dave Young
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Young