aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-03-13Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into develRussell King2-2/+2
Conflicts: arch/arm/mach-at91/gpio.c
2009-03-13Merge commit 'v2.6.29-rc8' into tracing/ftraceIngo Molnar1-8/+8
2009-03-13Merge branches 'sched/clock', 'sched/urgent' and 'linus' into sched/coreIngo Molnar1-1/+1
2009-03-12bitmap: fix end condition in bitmap_find_free_regionLinus Torvalds1-8/+8
Guennadi Liakhovetski noticed that the end condition for the loop in bitmap_find_free_region() is wrong, and the "return if error" was also using the wrong conditional that would only trigger if the bitmap was an exact multiple of the allocation size, which is not necessarily the case with dma_alloc_from_coherent(). Such a failure would end up in bitmap_find_free_region() accessing beyond the end of the bitmap. Reported-by: Guennadi Liakhovetski <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-03-13Merge branch 'core/locking' into tracing/ftraceIngo Molnar2-3/+3
2009-03-13locking: rename trace_softirq_[enter|exit] => lockdep_softirq_[enter|exit]Ingo Molnar1-2/+2
Impact: cleanup The naming clashes with upcoming softirq tracepoints, so rename the APIs to lockdep_*(). Requested-by: Steven Rostedt <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-03-13Merge branch 'linus' into core/lockingIngo Molnar1-1/+1
2009-03-11nlattr: Fix build error with NET offHerbert Xu1-9/+11
We moved the netlink attribute support from net to lib in order for it to be available for general consumption. However, parts of the code (the bits that we don't need :) really depends on NET because the target object is sk_buff. This patch fixes this by wrapping them in CONFIG_NET. Some EXPORTs have been moved to make this work. Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2009-03-11Merge commit 'origin/master' into nextBenjamin Herrenschmidt1-1/+1
2009-03-10idr: make idr_remove_all() do removal -before- free_layer()Paul E. McKenney1-1/+1
Fix a problem in the IDR system, where an idr_remove_all() hands a data element to call_rcu() (via free_layer()) before making that data element inaccessible to new readers. This is very bad, and results in readers still having a reference to this data element at the end of the grace period. Tests on large machines that concurrently map and unmap user-space memory within the same multithreaded process result in crashes within about five minutes. Applying this patch increases the kernel's longevity to the three-to-eight-hour range. There appear to be other similar problems in idr_get_empty_slot() and sub_remove(), but I fixed the easy one in idr_remove_all() first. It is therefore no surprise that failures still occur. Located-by: Milton Miller II <[email protected]> Tested-by: Milton Miller II <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-03-10Merge branch 'core/printk' into tracing/ftraceIngo Molnar1-7/+6
2009-03-10vsprintf: fix bug in negative value printingFrederic Weisbecker1-7/+6
Sitsofe Wheeler found and bisected that while unifying the vsprintf format decoding in: fef20d9: vsprintf: unify the format decoding layer for its 3 users The sign flag has been dropped out in favour of precise types (ie: LONG/ULONG). But the format helper number() still needs this flag to keep track of the signedness unless it will consider all numbers as unsigned. Also add an explicit cast to int (for %d) while parsing with va_arg() to ensure the highest bit is well extended on the 64 bits number that hosts the value in case of negative values. Reported-Bisected-Tested-by: Sitsofe Wheeler <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Lai Jiangshan <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Linus Torvalds <[email protected]> LKML-Reference: <20090309201503.GA5010@nowhere> Signed-off-by: Ingo Molnar <[email protected]>
2009-03-08Merge branches 'tracing/doc', 'tracing/ftrace', 'tracing/printk' and ↵Ingo Molnar8-1/+1631
'tracing/textedit' into tracing/core
2009-03-06Merge branch 'core/printk' into tracing/ftraceIngo Molnar2-227/+782
2009-03-06vsprintf: unify the format decoding layer for its 3 usersFrederic Weisbecker1-431/+541
An new optimization is making its way to ftrace. Its purpose is to make trace_printk() consuming less memory and be faster. Written by Lai Jiangshan, the approach is to delay the formatting job from tracing time to output time. Currently, a call to trace_printk() will format the whole string and insert it into the ring buffer. Then you can read it on /debug/tracing/trace file. The new implementation stores the address of the format string and the binary parameters into the ring buffer, making the packet more compact and faster to insert. Later, when the user exports the traces, the format string is retrieved with the binary parameters and the formatting job is eventually done. The new implementation rewrites a lot of format decoding bits from vsnprintf() function, making now 3 differents functions to maintain in their duplicated parts of printf format decoding bits. Suggested by Ingo Molnar, this patch tries to factorize the most possible common bits from these functions. The real common part between them is the format decoding. Although they do somewhat similar jobs, their way to export or import the parameters is very different. Thus, only the decoding layer is extracted, unless you see other parts that could be worth factorized. Changes in V2: - Address a suggestion from Linus to group the format_decode() parameters inside a structure. Changes in v3: - Address other cleanups suggested by Ingo and Linus such as passing the printf_spec struct to the format helpers: pointer()/number()/string() Note that this struct is passed by copy and not by address. This is to avoid side effects because these functions often change these values and the changes shoudn't be persistant when a callee helper returns. It would be too risky. - Various cleanups (code alignement, switch/case instead of if/else fountains). - Fix a bug that printed the first format specifier following a %p Changes in v4: - drop unapropriate const qualifier loss while casting fmt to a char * (thanks to Vegard Nossum for having pointed this out). Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Linus Torvalds <[email protected]> Acked-by: Steven Rostedt <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-03-06vsprintf: add binary printfLai Jiangshan2-0/+445
Impact: add new APIs for binary trace printk infrastructure vbin_printf(): write args to binary buffer, string is copied when "%s" is occurred. bstr_printf(): read from binary buffer for args and format a string [[email protected]: rebase] Signed-off-by: Lai Jiangshan <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Linus Torvalds <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-03-06Merge branch 'x86/core' into tracing/texteditIngo Molnar8-1/+1631
Conflicts: arch/x86/Kconfig block/blktrace.c kernel/irq/handle.c Semantic conflict: kernel/trace/blktrace.c Signed-off-by: Ingo Molnar <[email protected]>
2009-03-06sched: TIF_NEED_RESCHED -> need_reshed() cleanupLai Jiangshan1-1/+1
Impact: cleanup Use test_tsk_need_resched(), set_tsk_need_resched(), need_resched() instead of using TIF_NEED_RESCHED. Signed-off-by: Lai Jiangshan <[email protected]> Cc: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-03-05dma-debug: add checks for sync_single_sg_*Joerg Roedel1-0/+32
Impact: add debug callbacks for dma_sync_sg_* functions Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add checks for sync_single_range_*Joerg Roedel1-0/+24
Impact: add debug callbacks for dma_sync_single_range_for_* functions Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add checks for sync_single_*Joerg Roedel1-0/+21
Impact: add debug callbacks for dma_sync_single_for_* functions Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add checking for [alloc|free]_coherentJoerg Roedel1-0/+45
Impact: add debug callbacks for dma_[alloc|free]_coherent Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add add checking for map/unmap_sgJoerg Roedel1-0/+73
Impact: add debug callbacks for dma_{un}map_sg Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add checking for map/unmap_page/singleJoerg Roedel1-0/+53
Impact: add debug callbacks for dma_{un}map_[page|single] Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add core checking functionsJoerg Roedel1-1/+187
Impact: add functions to check on dma unmap and sync Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add debugfs interfaceJoerg Roedel1-0/+78
Impact: add debugfs interface for configuring DMA-API debugging Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add kernel command line parametersJoerg Roedel1-0/+38
Impact: add dma_debug= and dma_debug_entries= kernel parameters Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add initialization codeJoerg Roedel1-0/+66
Impact: add code to initialize dma-debug core data structures Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add allocator codeJoerg Roedel1-0/+57
Impact: add allocator code for struct dma_debug_entry Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add hash functions for dma_debug_entriesJoerg Roedel1-0/+101
Impact: implement necessary functions for the core hash Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add header file and core data structuresJoerg Roedel2-0/+44
Impact: add groundwork for DMA-API debugging Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05dma-debug: add Kconfig entryJoerg Roedel1-0/+11
Impact: add a Kconfig entry for DMA-API debugging Signed-off-by: Joerg Roedel <[email protected]>
2009-03-05Merge branch 'linus' into core/iommuIngo Molnar2-15/+11
2009-03-05Merge commit 'v2.6.29-rc7' into core/lockingIngo Molnar1-1/+1
2009-03-04Merge branch 'core/locking' into tracing/ftraceIngo Molnar1-1/+1
2009-03-04lockdep: require framepointers for x86Peter Zijlstra1-1/+1
Require framepointers for x86, because otherwise we'll be having empty stack traces, which is useless. Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <1236167295.5330.7240.camel@laptop> Signed-off-by: Ingo Molnar <[email protected]>
2009-03-04netlink: Move netlink attribute parsing support to libGeert Uytterhoeven3-0/+481
Netlink attribute parsing may be used even if CONFIG_NET is not set. Move it from net/netlink to lib and control its inclusion based on the new config symbol CONFIG_NLATTR, which is selected by CONFIG_NET. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2009-03-04Merge branches 'x86/apic', 'x86/cpu', 'x86/fixmap', 'x86/mm', 'x86/sched', ↵Ingo Molnar8-1/+1631
'x86/setup-lzma', 'x86/signal' and 'x86/urgent' into x86/core
2009-03-02debug_objects: add boot-parameter toggle to turn object debugging off againKyle McMartin1-0/+8
While trying to debug why my Atom netbook is falling over booting rawhide debug-enabled kernels, I stumbled across the fact that we've been enabling object debugging by default. However, once you default it to on, you've got no way to turn it back off again at runtime. Add a boolean toggle to turn it off. I would just make it an int module_param, however people may already expect the boolean enable behaviour, so just add an analogue for disabling. Signed-off-by: Kyle McMartin <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-02-26Merge branches 'sched/cleanups', 'sched/urgent' and 'linus' into sched/coreIngo Molnar1-1/+1
2009-02-24Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller1-1/+1
2009-02-20docsrc: use config instead of menuconfigRandy Dunlap1-1/+1
BUILD_DOCSRC should be controlled by "config" instead of "menuconfig". I have no idea how I managed to use "menuconfig" here. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-02-19bzip2/lzma: don't stop search at first unconfigured compressionAlain Knaff1-1/+1
Impact: Bugfix, avoids kernels which build but panic on boot Fix a bug in decompress.c : only scanned until the first non-configured compressor (with disastrous result especially if that was gzip.) Signed-off-by: Alain Knaff <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2009-02-19[ARM] 5386/2: unwind: Add Makefile and Kconfig entries for ARM stack unwindingCatalin Marinas1-1/+1
This patch also makes the frame pointer default to y only if !ARM_UNWIND. LOCKDEP no longer selects FRAME_POINTER if ARM_UNWIND is enabled. Signed-off-by: Catalin Marinas <[email protected]> Signed-off-by: Russell King <[email protected]>
2009-02-12Merge branch 'linus' into core/softlockupIngo Molnar3-24/+14
2009-02-11lmb: Rework lmb_dump_all() outputMichael Ellerman1-21/+21
The lmb_dump_all() output didn't include the RMO size, which is interesting on powerpc. The output was also a bit spacey and not well aligned, and didn't show you the end addresses. Signed-off-by: Michael Ellerman <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2009-02-08Merge branches 'sched/rt' and 'sched/urgent' into sched/coreIngo Molnar5-32/+16
2009-02-05netlink: change return-value logic of netlink_broadcast()Pablo Neira Ayuso1-0/+3
Currently, netlink_broadcast() reports errors to the caller if no messages at all were delivered: 1) If, at least, one message has been delivered correctly, returns 0. 2) Otherwise, if no messages at all were delivered due to skb_clone() failure, return -ENOBUFS. 3) Otherwise, if there are no listeners, return -ESRCH. With this patch, the caller knows if the delivery of any of the messages to the listeners have failed: 1) If it fails to deliver any message (for whatever reason), return -ENOBUFS. 2) Otherwise, if all messages were delivered OK, returns 0. 3) Otherwise, if no listeners, return -ESRCH. In the current ctnetlink code and in Netfilter in general, we can add reliable logging and connection tracking event delivery by dropping the packets whose events were not successfully delivered over Netlink. Of course, this option would be settable via /proc as this approach reduces performance (in terms of filtered connections per seconds by a stateful firewall) but providing reliable logging and event delivery (for conntrackd) in return. This patch also changes some clients of netlink_broadcast() that may report ENOBUFS errors via printk. This error handling is not of any help. Instead, the userspace daemons that are listening to those netlink messages should resync themselves with the kernel-side if they hit ENOBUFS. BTW, netlink_broadcast() clients include those that call cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they internally call netlink_broadcast() and return its error value. Signed-off-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-01-30cpumask: convert lib/smp_processor_id to new cpumask opsRusty Russell1-1/+1
Impact: fix debug_smp_processor_id() for CONFIG_CPUMASK_OFFSTACK=y The scheduler now uses the new cpumask API, which deals up to nr_cpumask_bits, whereas the API used NR_CPUS bits. If CONFIG_CPUMASK_OFFSTACK=y these two are not equal, so the top bits are undefined. Leading to bug 12518 "BUG: using smp_processor_id() in preemptible [00000000] code: dellWirelessCtl/..." The fix is simple: use the modern API in the check. Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: Mike Travis <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-01-26Merge branch 'core-fixes-for-linus' of ↵Linus Torvalds1-13/+0
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: debugobjects: add and use INIT_WORK_ON_STACK rcu: remove duplicate CONFIG_RCU_CPU_STALL_DETECTOR relay: fix lock imbalance in relay_late_setup_files oprofile: fix uninitialized use of struct op_entry rcu: move Kconfig menu softlock: fix false panic which can occur if softlockup_thresh is reduced rcu: add __cpuinit to rcu_init_percpu_data()