diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 43 | ||||
| -rw-r--r-- | lib/idr.c | 14 | ||||
| -rw-r--r-- | lib/rbtree.c | 12 | ||||
| -rw-r--r-- | lib/smp_processor_id.c | 2 | 
4 files changed, 34 insertions, 37 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 2e75478e9c69..29044f500269 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug  | |||
| @@ -512,6 +512,13 @@ config DEBUG_VIRTUAL | |||
| 512 | 512 | ||
| 513 | If unsure, say N. | 513 | If unsure, say N. | 
| 514 | 514 | ||
| 515 | config DEBUG_NOMMU_REGIONS | ||
| 516 | bool "Debug the global anon/private NOMMU mapping region tree" | ||
| 517 | depends on DEBUG_KERNEL && !MMU | ||
| 518 | help | ||
| 519 | This option causes the global tree of anonymous and private mapping | ||
| 520 | regions to be regularly checked for invalid topology. | ||
| 521 | |||
| 515 | config DEBUG_WRITECOUNT | 522 | config DEBUG_WRITECOUNT | 
| 516 | bool "Debug filesystem writers count" | 523 | bool "Debug filesystem writers count" | 
| 517 | depends on DEBUG_KERNEL | 524 | depends on DEBUG_KERNEL | 
| @@ -563,17 +570,26 @@ config DEBUG_NOTIFIERS | |||
| 563 | 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 | 
| 564 | performance, say N. | 571 | performance, say N. | 
| 565 | 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 | # | ||
| 578 | config ARCH_WANT_FRAME_POINTERS | ||
| 579 | bool | ||
| 580 | help | ||
| 581 | |||
| 566 | config FRAME_POINTER | 582 | config FRAME_POINTER | 
| 567 | bool "Compile the kernel with frame pointers" | 583 | bool "Compile the kernel with frame pointers" | 
| 568 | depends on DEBUG_KERNEL && \ | 584 | depends on DEBUG_KERNEL && \ | 
| 569 | (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ | 585 | (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ | 
| 570 | AVR32 || SUPERH || BLACKFIN || MN10300) | 586 | AVR32 || SUPERH || BLACKFIN || MN10300) || \ | 
| 571 | default y if DEBUG_INFO && UML | 587 | ARCH_WANT_FRAME_POINTERS | 
| 588 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | ||
| 572 | help | 589 | help | 
| 573 | 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 | 
| 574 | and slower, but it might give very useful debugging information on | 591 | larger and slower, but it gives very useful debugging information | 
| 575 | some architectures or if you use external debuggers. | 592 | in case of kernel bugs. (precise oopses/stacktraces/warnings) | 
| 576 | If you don't debug the kernel, you can say N. | ||
| 577 | 593 | ||
| 578 | config BOOT_PRINTK_DELAY | 594 | config BOOT_PRINTK_DELAY | 
| 579 | bool "Delay each boot printk message by N milliseconds" | 595 | bool "Delay each boot printk message by N milliseconds" | 
| @@ -626,19 +642,6 @@ config RCU_TORTURE_TEST_RUNNABLE | |||
| 626 | 642 | ||
| 627 | config RCU_CPU_STALL_DETECTOR | 643 | config RCU_CPU_STALL_DETECTOR | 
| 628 | bool "Check for stalled CPUs delaying RCU grace periods" | 644 | bool "Check for stalled CPUs delaying RCU grace periods" | 
| 629 | depends on CLASSIC_RCU | ||
| 630 | default n | ||
| 631 | help | ||
| 632 | This option causes RCU to printk information on which | ||
| 633 | CPUs are delaying the current grace period, but only when | ||
| 634 | the grace period extends for excessive time periods. | ||
| 635 | |||
| 636 | Say Y if you want RCU to perform such checks. | ||
| 637 | |||
| 638 | Say N if you are unsure. | ||
| 639 | |||
| 640 | config RCU_CPU_STALL_DETECTOR | ||
| 641 | bool "Check for stalled CPUs delaying RCU grace periods" | ||
| 642 | depends on CLASSIC_RCU || TREE_RCU | 645 | depends on CLASSIC_RCU || TREE_RCU | 
| 643 | default n | 646 | default n | 
| 644 | help | 647 | help | 
| @@ -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 | */ | 
| 297 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id) | 297 | int 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 | } | 
| 624 | EXPORT_SYMBOL(idr_replace); | 624 | EXPORT_SYMBOL(idr_replace); | 
| 625 | 625 | ||
| 626 | static void idr_cache_ctor(void *idr_layer) | ||
| 627 | { | ||
| 628 | memset(idr_layer, 0, sizeof(struct idr_layer)); | ||
| 629 | } | ||
| 630 | |||
| 631 | void __init idr_init_cache(void) | 626 | void __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 | */ | 
| 728 | int ida_get_new_above(struct ida *ida, int starting_id, int *p_id) | 722 | int 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 | */ | 
| 295 | struct rb_node *rb_first(struct rb_root *root) | 295 | struct 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 | } | 
| 306 | EXPORT_SYMBOL(rb_first); | 306 | EXPORT_SYMBOL(rb_first); | 
| 307 | 307 | ||
| 308 | struct rb_node *rb_last(struct rb_root *root) | 308 | struct 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 | } | 
| 319 | EXPORT_SYMBOL(rb_last); | 319 | EXPORT_SYMBOL(rb_last); | 
| 320 | 320 | ||
| 321 | struct rb_node *rb_next(struct rb_node *node) | 321 | struct 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 | } | 
| 348 | EXPORT_SYMBOL(rb_next); | 348 | EXPORT_SYMBOL(rb_next); | 
| 349 | 349 | ||
| 350 | struct rb_node *rb_prev(struct rb_node *node) | 350 | struct 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(¤t->cpus_allowed, cpumask_of(this_cpu))) | 
| 26 | goto out; | 26 | goto out; | 
| 27 | 27 | ||
| 28 | /* | 28 | /* | 
