aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug38
-rw-r--r--lib/idr.c14
-rw-r--r--lib/rbtree.c12
-rw-r--r--lib/smp_processor_id.c2
4 files changed, 28 insertions, 38 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d0a32aab03ff..1bcf9cd4baa0 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -570,17 +570,26 @@ config DEBUG_NOTIFIERS
570 This is a relatively cheap check but if you care about maximum 570 This is a relatively cheap check but if you care about maximum
571 performance, say N. 571 performance, say N.
572 572
573#
574# Select this config option from the architecture Kconfig, if it
575# it is preferred to always offer frame pointers as a config
576# option on the architecture (regardless of KERNEL_DEBUG):
577#
578config ARCH_WANT_FRAME_POINTERS
579 bool
580 help
581
573config FRAME_POINTER 582config FRAME_POINTER
574 bool "Compile the kernel with frame pointers" 583 bool "Compile the kernel with frame pointers"
575 depends on DEBUG_KERNEL && \ 584 depends on DEBUG_KERNEL && \
576 (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ 585 (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \
577 AVR32 || SUPERH || BLACKFIN || MN10300) 586 AVR32 || SUPERH || BLACKFIN || MN10300) || \
578 default y if DEBUG_INFO && UML 587 ARCH_WANT_FRAME_POINTERS
588 default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
579 help 589 help
580 If you say Y here the resulting kernel image will be slightly larger 590 If you say Y here the resulting kernel image will be slightly
581 and slower, but it might give very useful debugging information on 591 larger and slower, but it gives very useful debugging information
582 some architectures or if you use external debuggers. 592 in case of kernel bugs. (precise oopses/stacktraces/warnings)
583 If you don't debug the kernel, you can say N.
584 593
585config BOOT_PRINTK_DELAY 594config BOOT_PRINTK_DELAY
586 bool "Delay each boot printk message by N milliseconds" 595 bool "Delay each boot printk message by N milliseconds"
@@ -633,19 +642,6 @@ config RCU_TORTURE_TEST_RUNNABLE
633 642
634config RCU_CPU_STALL_DETECTOR 643config RCU_CPU_STALL_DETECTOR
635 bool "Check for stalled CPUs delaying RCU grace periods" 644 bool "Check for stalled CPUs delaying RCU grace periods"
636 depends on CLASSIC_RCU
637 default n
638 help
639 This option causes RCU to printk information on which
640 CPUs are delaying the current grace period, but only when
641 the grace period extends for excessive time periods.
642
643 Say Y if you want RCU to perform such checks.
644
645 Say N if you are unsure.
646
647config RCU_CPU_STALL_DETECTOR
648 bool "Check for stalled CPUs delaying RCU grace periods"
649 depends on CLASSIC_RCU || TREE_RCU 645 depends on CLASSIC_RCU || TREE_RCU
650 default n 646 default n
651 help 647 help
@@ -842,7 +838,7 @@ config FIREWIRE_OHCI_REMOTE_DMA
842 838
843 If unsure, say N. 839 If unsure, say N.
844 840
845menuconfig BUILD_DOCSRC 841config BUILD_DOCSRC
846 bool "Build targets in Documentation/ tree" 842 bool "Build targets in Documentation/ tree"
847 depends on HEADERS_CHECK 843 depends on HEADERS_CHECK
848 help 844 help
diff --git a/lib/idr.c b/lib/idr.c
index 1c4f9281f412..c11c5765cdef 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -121,7 +121,7 @@ int idr_pre_get(struct idr *idp, gfp_t gfp_mask)
121{ 121{
122 while (idp->id_free_cnt < IDR_FREE_MAX) { 122 while (idp->id_free_cnt < IDR_FREE_MAX) {
123 struct idr_layer *new; 123 struct idr_layer *new;
124 new = kmem_cache_alloc(idr_layer_cache, gfp_mask); 124 new = kmem_cache_zalloc(idr_layer_cache, gfp_mask);
125 if (new == NULL) 125 if (new == NULL)
126 return (0); 126 return (0);
127 move_to_free_list(idp, new); 127 move_to_free_list(idp, new);
@@ -292,7 +292,7 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id)
292 * and go back to the idr_pre_get() call. If the idr is full, it will 292 * and go back to the idr_pre_get() call. If the idr is full, it will
293 * return -ENOSPC. 293 * return -ENOSPC.
294 * 294 *
295 * @id returns a value in the range 0 ... 0x7fffffff 295 * @id returns a value in the range @starting_id ... 0x7fffffff
296 */ 296 */
297int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id) 297int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)
298{ 298{
@@ -623,16 +623,10 @@ void *idr_replace(struct idr *idp, void *ptr, int id)
623} 623}
624EXPORT_SYMBOL(idr_replace); 624EXPORT_SYMBOL(idr_replace);
625 625
626static void idr_cache_ctor(void *idr_layer)
627{
628 memset(idr_layer, 0, sizeof(struct idr_layer));
629}
630
631void __init idr_init_cache(void) 626void __init idr_init_cache(void)
632{ 627{
633 idr_layer_cache = kmem_cache_create("idr_layer_cache", 628 idr_layer_cache = kmem_cache_create("idr_layer_cache",
634 sizeof(struct idr_layer), 0, SLAB_PANIC, 629 sizeof(struct idr_layer), 0, SLAB_PANIC, NULL);
635 idr_cache_ctor);
636} 630}
637 631
638/** 632/**
@@ -723,7 +717,7 @@ EXPORT_SYMBOL(ida_pre_get);
723 * and go back to the ida_pre_get() call. If the ida is full, it will 717 * and go back to the ida_pre_get() call. If the ida is full, it will
724 * return -ENOSPC. 718 * return -ENOSPC.
725 * 719 *
726 * @p_id returns a value in the range 0 ... 0x7fffffff. 720 * @p_id returns a value in the range @starting_id ... 0x7fffffff.
727 */ 721 */
728int ida_get_new_above(struct ida *ida, int starting_id, int *p_id) 722int ida_get_new_above(struct ida *ida, int starting_id, int *p_id)
729{ 723{
diff --git a/lib/rbtree.c b/lib/rbtree.c
index 48499c2d88cc..9956b99649f0 100644
--- a/lib/rbtree.c
+++ b/lib/rbtree.c
@@ -292,7 +292,7 @@ EXPORT_SYMBOL(rb_erase);
292/* 292/*
293 * This function returns the first node (in sort order) of the tree. 293 * This function returns the first node (in sort order) of the tree.
294 */ 294 */
295struct rb_node *rb_first(struct rb_root *root) 295struct rb_node *rb_first(const struct rb_root *root)
296{ 296{
297 struct rb_node *n; 297 struct rb_node *n;
298 298
@@ -305,7 +305,7 @@ struct rb_node *rb_first(struct rb_root *root)
305} 305}
306EXPORT_SYMBOL(rb_first); 306EXPORT_SYMBOL(rb_first);
307 307
308struct rb_node *rb_last(struct rb_root *root) 308struct rb_node *rb_last(const struct rb_root *root)
309{ 309{
310 struct rb_node *n; 310 struct rb_node *n;
311 311
@@ -318,7 +318,7 @@ struct rb_node *rb_last(struct rb_root *root)
318} 318}
319EXPORT_SYMBOL(rb_last); 319EXPORT_SYMBOL(rb_last);
320 320
321struct rb_node *rb_next(struct rb_node *node) 321struct rb_node *rb_next(const struct rb_node *node)
322{ 322{
323 struct rb_node *parent; 323 struct rb_node *parent;
324 324
@@ -331,7 +331,7 @@ struct rb_node *rb_next(struct rb_node *node)
331 node = node->rb_right; 331 node = node->rb_right;
332 while (node->rb_left) 332 while (node->rb_left)
333 node=node->rb_left; 333 node=node->rb_left;
334 return node; 334 return (struct rb_node *)node;
335 } 335 }
336 336
337 /* No right-hand children. Everything down and left is 337 /* No right-hand children. Everything down and left is
@@ -347,7 +347,7 @@ struct rb_node *rb_next(struct rb_node *node)
347} 347}
348EXPORT_SYMBOL(rb_next); 348EXPORT_SYMBOL(rb_next);
349 349
350struct rb_node *rb_prev(struct rb_node *node) 350struct rb_node *rb_prev(const struct rb_node *node)
351{ 351{
352 struct rb_node *parent; 352 struct rb_node *parent;
353 353
@@ -360,7 +360,7 @@ struct rb_node *rb_prev(struct rb_node *node)
360 node = node->rb_left; 360 node = node->rb_left;
361 while (node->rb_right) 361 while (node->rb_right)
362 node=node->rb_right; 362 node=node->rb_right;
363 return node; 363 return (struct rb_node *)node;
364 } 364 }
365 365
366 /* No left-hand children. Go up till we find an ancestor which 366 /* No left-hand children. Go up till we find an ancestor which
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 0f8fc22ed103..4689cb073da4 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -22,7 +22,7 @@ notrace unsigned int debug_smp_processor_id(void)
22 * Kernel threads bound to a single CPU can safely use 22 * Kernel threads bound to a single CPU can safely use
23 * smp_processor_id(): 23 * smp_processor_id():
24 */ 24 */
25 if (cpus_equal(current->cpus_allowed, cpumask_of_cpu(this_cpu))) 25 if (cpumask_equal(&current->cpus_allowed, cpumask_of(this_cpu)))
26 goto out; 26 goto out;
27 27
28 /* 28 /*