diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 8 | ||||
| -rw-r--r-- | lib/list_debug.c | 39 | ||||
| -rw-r--r-- | lib/nlattr.c | 2 | ||||
| -rw-r--r-- | lib/radix-tree.c | 7 | ||||
| -rw-r--r-- | lib/rbtree.c | 3 | ||||
| -rw-r--r-- | lib/swiotlb.c | 6 | ||||
| -rw-r--r-- | lib/textsearch.c | 10 | ||||
| -rw-r--r-- | lib/xz/Kconfig | 12 |
8 files changed, 53 insertions, 34 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 2d05adb98401..2b97418c67e2 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -657,7 +657,7 @@ config DEBUG_HIGHMEM | |||
| 657 | Disable for production systems. | 657 | Disable for production systems. |
| 658 | 658 | ||
| 659 | config DEBUG_BUGVERBOSE | 659 | config DEBUG_BUGVERBOSE |
| 660 | bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED | 660 | bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT |
| 661 | depends on BUG | 661 | depends on BUG |
| 662 | depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || \ | 662 | depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || \ |
| 663 | FRV || SUPERH || GENERIC_BUG || BLACKFIN || MN10300 | 663 | FRV || SUPERH || GENERIC_BUG || BLACKFIN || MN10300 |
| @@ -729,8 +729,8 @@ config DEBUG_WRITECOUNT | |||
| 729 | If unsure, say N. | 729 | If unsure, say N. |
| 730 | 730 | ||
| 731 | config DEBUG_MEMORY_INIT | 731 | config DEBUG_MEMORY_INIT |
| 732 | bool "Debug memory initialisation" if EMBEDDED | 732 | bool "Debug memory initialisation" if EXPERT |
| 733 | default !EMBEDDED | 733 | default !EXPERT |
| 734 | help | 734 | help |
| 735 | Enable this for additional checks during memory initialisation. | 735 | Enable this for additional checks during memory initialisation. |
| 736 | The sanity checks verify aspects of the VM such as the memory model | 736 | The sanity checks verify aspects of the VM such as the memory model |
| @@ -805,7 +805,7 @@ config ARCH_WANT_FRAME_POINTERS | |||
| 805 | config FRAME_POINTER | 805 | config FRAME_POINTER |
| 806 | bool "Compile the kernel with frame pointers" | 806 | bool "Compile the kernel with frame pointers" |
| 807 | depends on DEBUG_KERNEL && \ | 807 | depends on DEBUG_KERNEL && \ |
| 808 | (CRIS || M68K || M68KNOMMU || FRV || UML || \ | 808 | (CRIS || M68K || FRV || UML || \ |
| 809 | AVR32 || SUPERH || BLACKFIN || MN10300) || \ | 809 | AVR32 || SUPERH || BLACKFIN || MN10300) || \ |
| 810 | ARCH_WANT_FRAME_POINTERS | 810 | ARCH_WANT_FRAME_POINTERS |
| 811 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | 811 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS |
diff --git a/lib/list_debug.c b/lib/list_debug.c index 344c710d16ca..b8029a5583ff 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c | |||
| @@ -35,6 +35,31 @@ void __list_add(struct list_head *new, | |||
| 35 | } | 35 | } |
| 36 | EXPORT_SYMBOL(__list_add); | 36 | EXPORT_SYMBOL(__list_add); |
| 37 | 37 | ||
| 38 | void __list_del_entry(struct list_head *entry) | ||
| 39 | { | ||
| 40 | struct list_head *prev, *next; | ||
| 41 | |||
| 42 | prev = entry->prev; | ||
| 43 | next = entry->next; | ||
| 44 | |||
| 45 | if (WARN(next == LIST_POISON1, | ||
| 46 | "list_del corruption, %p->next is LIST_POISON1 (%p)\n", | ||
| 47 | entry, LIST_POISON1) || | ||
| 48 | WARN(prev == LIST_POISON2, | ||
| 49 | "list_del corruption, %p->prev is LIST_POISON2 (%p)\n", | ||
| 50 | entry, LIST_POISON2) || | ||
| 51 | WARN(prev->next != entry, | ||
| 52 | "list_del corruption. prev->next should be %p, " | ||
| 53 | "but was %p\n", entry, prev->next) || | ||
| 54 | WARN(next->prev != entry, | ||
| 55 | "list_del corruption. next->prev should be %p, " | ||
| 56 | "but was %p\n", entry, next->prev)) | ||
| 57 | return; | ||
| 58 | |||
| 59 | __list_del(prev, next); | ||
| 60 | } | ||
| 61 | EXPORT_SYMBOL(__list_del_entry); | ||
| 62 | |||
| 38 | /** | 63 | /** |
| 39 | * list_del - deletes entry from list. | 64 | * list_del - deletes entry from list. |
| 40 | * @entry: the element to delete from the list. | 65 | * @entry: the element to delete from the list. |
| @@ -43,19 +68,7 @@ EXPORT_SYMBOL(__list_add); | |||
| 43 | */ | 68 | */ |
| 44 | void list_del(struct list_head *entry) | 69 | void list_del(struct list_head *entry) |
| 45 | { | 70 | { |
| 46 | WARN(entry->next == LIST_POISON1, | 71 | __list_del_entry(entry); |
| 47 | "list_del corruption, next is LIST_POISON1 (%p)\n", | ||
| 48 | LIST_POISON1); | ||
| 49 | WARN(entry->next != LIST_POISON1 && entry->prev == LIST_POISON2, | ||
| 50 | "list_del corruption, prev is LIST_POISON2 (%p)\n", | ||
| 51 | LIST_POISON2); | ||
| 52 | WARN(entry->prev->next != entry, | ||
| 53 | "list_del corruption. prev->next should be %p, " | ||
| 54 | "but was %p\n", entry, entry->prev->next); | ||
| 55 | WARN(entry->next->prev != entry, | ||
| 56 | "list_del corruption. next->prev should be %p, " | ||
| 57 | "but was %p\n", entry, entry->next->prev); | ||
| 58 | __list_del(entry->prev, entry->next); | ||
| 59 | entry->next = LIST_POISON1; | 72 | entry->next = LIST_POISON1; |
| 60 | entry->prev = LIST_POISON2; | 73 | entry->prev = LIST_POISON2; |
| 61 | } | 74 | } |
diff --git a/lib/nlattr.c b/lib/nlattr.c index 5021cbc34411..ac09f2226dc7 100644 --- a/lib/nlattr.c +++ b/lib/nlattr.c | |||
| @@ -148,7 +148,7 @@ nla_policy_len(const struct nla_policy *p, int n) | |||
| 148 | { | 148 | { |
| 149 | int i, len = 0; | 149 | int i, len = 0; |
| 150 | 150 | ||
| 151 | for (i = 0; i < n; i++) { | 151 | for (i = 0; i < n; i++, p++) { |
| 152 | if (p->len) | 152 | if (p->len) |
| 153 | len += nla_total_size(p->len); | 153 | len += nla_total_size(p->len); |
| 154 | else if (nla_attr_minlen[p->type]) | 154 | else if (nla_attr_minlen[p->type]) |
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 5086bb962b4d..7ea2e033d715 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
| @@ -736,10 +736,11 @@ next: | |||
| 736 | } | 736 | } |
| 737 | } | 737 | } |
| 738 | /* | 738 | /* |
| 739 | * The iftag must have been set somewhere because otherwise | 739 | * We need not to tag the root tag if there is no tag which is set with |
| 740 | * we would return immediated at the beginning of the function | 740 | * settag within the range from *first_indexp to last_index. |
| 741 | */ | 741 | */ |
| 742 | root_tag_set(root, settag); | 742 | if (tagged > 0) |
| 743 | root_tag_set(root, settag); | ||
| 743 | *first_indexp = index; | 744 | *first_indexp = index; |
| 744 | 745 | ||
| 745 | return tagged; | 746 | return tagged; |
diff --git a/lib/rbtree.c b/lib/rbtree.c index 4693f79195d3..a16be19a1305 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c | |||
| @@ -315,6 +315,7 @@ void rb_augment_insert(struct rb_node *node, rb_augment_f func, void *data) | |||
| 315 | 315 | ||
| 316 | rb_augment_path(node, func, data); | 316 | rb_augment_path(node, func, data); |
| 317 | } | 317 | } |
| 318 | EXPORT_SYMBOL(rb_augment_insert); | ||
| 318 | 319 | ||
| 319 | /* | 320 | /* |
| 320 | * before removing the node, find the deepest node on the rebalance path | 321 | * before removing the node, find the deepest node on the rebalance path |
| @@ -340,6 +341,7 @@ struct rb_node *rb_augment_erase_begin(struct rb_node *node) | |||
| 340 | 341 | ||
| 341 | return deepest; | 342 | return deepest; |
| 342 | } | 343 | } |
| 344 | EXPORT_SYMBOL(rb_augment_erase_begin); | ||
| 343 | 345 | ||
| 344 | /* | 346 | /* |
| 345 | * after removal, update the tree to account for the removed entry | 347 | * after removal, update the tree to account for the removed entry |
| @@ -350,6 +352,7 @@ void rb_augment_erase_end(struct rb_node *node, rb_augment_f func, void *data) | |||
| 350 | if (node) | 352 | if (node) |
| 351 | rb_augment_path(node, func, data); | 353 | rb_augment_path(node, func, data); |
| 352 | } | 354 | } |
| 355 | EXPORT_SYMBOL(rb_augment_erase_end); | ||
| 353 | 356 | ||
| 354 | /* | 357 | /* |
| 355 | * This function returns the first node (in sort order) of the tree. | 358 | * This function returns the first node (in sort order) of the tree. |
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index c47bbe11b804..93ca08b8a451 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
| @@ -686,8 +686,10 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, | |||
| 686 | /* | 686 | /* |
| 687 | * Ensure that the address returned is DMA'ble | 687 | * Ensure that the address returned is DMA'ble |
| 688 | */ | 688 | */ |
| 689 | if (!dma_capable(dev, dev_addr, size)) | 689 | if (!dma_capable(dev, dev_addr, size)) { |
| 690 | panic("map_single: bounce buffer is not DMA'ble"); | 690 | swiotlb_tbl_unmap_single(dev, map, size, dir); |
| 691 | dev_addr = swiotlb_virt_to_bus(dev, io_tlb_overflow_buffer); | ||
| 692 | } | ||
| 691 | 693 | ||
| 692 | return dev_addr; | 694 | return dev_addr; |
| 693 | } | 695 | } |
diff --git a/lib/textsearch.c b/lib/textsearch.c index d608331b3e47..e0cc0146ae62 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * | 13 | * |
| 14 | * INTRODUCTION | 14 | * INTRODUCTION |
| 15 | * | 15 | * |
| 16 | * The textsearch infrastructure provides text searching facitilies for | 16 | * The textsearch infrastructure provides text searching facilities for |
| 17 | * both linear and non-linear data. Individual search algorithms are | 17 | * both linear and non-linear data. Individual search algorithms are |
| 18 | * implemented in modules and chosen by the user. | 18 | * implemented in modules and chosen by the user. |
| 19 | * | 19 | * |
| @@ -43,7 +43,7 @@ | |||
| 43 | * to the algorithm to store persistent variables. | 43 | * to the algorithm to store persistent variables. |
| 44 | * (4) Core eventually resets the search offset and forwards the find() | 44 | * (4) Core eventually resets the search offset and forwards the find() |
| 45 | * request to the algorithm. | 45 | * request to the algorithm. |
| 46 | * (5) Algorithm calls get_next_block() provided by the user continously | 46 | * (5) Algorithm calls get_next_block() provided by the user continuously |
| 47 | * to fetch the data to be searched in block by block. | 47 | * to fetch the data to be searched in block by block. |
| 48 | * (6) Algorithm invokes finish() after the last call to get_next_block | 48 | * (6) Algorithm invokes finish() after the last call to get_next_block |
| 49 | * to clean up any leftovers from get_next_block. (Optional) | 49 | * to clean up any leftovers from get_next_block. (Optional) |
| @@ -58,15 +58,15 @@ | |||
| 58 | * the pattern to look for and flags. As a flag, you can set TS_IGNORECASE | 58 | * the pattern to look for and flags. As a flag, you can set TS_IGNORECASE |
| 59 | * to perform case insensitive matching. But it might slow down | 59 | * to perform case insensitive matching. But it might slow down |
| 60 | * performance of algorithm, so you should use it at own your risk. | 60 | * performance of algorithm, so you should use it at own your risk. |
| 61 | * The returned configuration may then be used for an arbitary | 61 | * The returned configuration may then be used for an arbitrary |
| 62 | * amount of times and even in parallel as long as a separate struct | 62 | * amount of times and even in parallel as long as a separate struct |
| 63 | * ts_state variable is provided to every instance. | 63 | * ts_state variable is provided to every instance. |
| 64 | * | 64 | * |
| 65 | * The actual search is performed by either calling textsearch_find_- | 65 | * The actual search is performed by either calling textsearch_find_- |
| 66 | * continuous() for linear data or by providing an own get_next_block() | 66 | * continuous() for linear data or by providing an own get_next_block() |
| 67 | * implementation and calling textsearch_find(). Both functions return | 67 | * implementation and calling textsearch_find(). Both functions return |
| 68 | * the position of the first occurrence of the patern or UINT_MAX if | 68 | * the position of the first occurrence of the pattern or UINT_MAX if |
| 69 | * no match was found. Subsequent occurences can be found by calling | 69 | * no match was found. Subsequent occurrences can be found by calling |
| 70 | * textsearch_next() regardless of the linearity of the data. | 70 | * textsearch_next() regardless of the linearity of the data. |
| 71 | * | 71 | * |
| 72 | * Once you're done using a configuration it must be given back via | 72 | * Once you're done using a configuration it must be given back via |
diff --git a/lib/xz/Kconfig b/lib/xz/Kconfig index e3b6e18fdac5..60a6088d0e5e 100644 --- a/lib/xz/Kconfig +++ b/lib/xz/Kconfig | |||
| @@ -7,37 +7,37 @@ config XZ_DEC | |||
| 7 | CRC32 is supported. See Documentation/xz.txt for more information. | 7 | CRC32 is supported. See Documentation/xz.txt for more information. |
| 8 | 8 | ||
| 9 | config XZ_DEC_X86 | 9 | config XZ_DEC_X86 |
| 10 | bool "x86 BCJ filter decoder" if EMBEDDED | 10 | bool "x86 BCJ filter decoder" if EXPERT |
| 11 | default y | 11 | default y |
| 12 | depends on XZ_DEC | 12 | depends on XZ_DEC |
| 13 | select XZ_DEC_BCJ | 13 | select XZ_DEC_BCJ |
| 14 | 14 | ||
| 15 | config XZ_DEC_POWERPC | 15 | config XZ_DEC_POWERPC |
| 16 | bool "PowerPC BCJ filter decoder" if EMBEDDED | 16 | bool "PowerPC BCJ filter decoder" if EXPERT |
| 17 | default y | 17 | default y |
| 18 | depends on XZ_DEC | 18 | depends on XZ_DEC |
| 19 | select XZ_DEC_BCJ | 19 | select XZ_DEC_BCJ |
| 20 | 20 | ||
| 21 | config XZ_DEC_IA64 | 21 | config XZ_DEC_IA64 |
| 22 | bool "IA-64 BCJ filter decoder" if EMBEDDED | 22 | bool "IA-64 BCJ filter decoder" if EXPERT |
| 23 | default y | 23 | default y |
| 24 | depends on XZ_DEC | 24 | depends on XZ_DEC |
| 25 | select XZ_DEC_BCJ | 25 | select XZ_DEC_BCJ |
| 26 | 26 | ||
| 27 | config XZ_DEC_ARM | 27 | config XZ_DEC_ARM |
| 28 | bool "ARM BCJ filter decoder" if EMBEDDED | 28 | bool "ARM BCJ filter decoder" if EXPERT |
| 29 | default y | 29 | default y |
| 30 | depends on XZ_DEC | 30 | depends on XZ_DEC |
| 31 | select XZ_DEC_BCJ | 31 | select XZ_DEC_BCJ |
| 32 | 32 | ||
| 33 | config XZ_DEC_ARMTHUMB | 33 | config XZ_DEC_ARMTHUMB |
| 34 | bool "ARM-Thumb BCJ filter decoder" if EMBEDDED | 34 | bool "ARM-Thumb BCJ filter decoder" if EXPERT |
| 35 | default y | 35 | default y |
| 36 | depends on XZ_DEC | 36 | depends on XZ_DEC |
| 37 | select XZ_DEC_BCJ | 37 | select XZ_DEC_BCJ |
| 38 | 38 | ||
| 39 | config XZ_DEC_SPARC | 39 | config XZ_DEC_SPARC |
| 40 | bool "SPARC BCJ filter decoder" if EMBEDDED | 40 | bool "SPARC BCJ filter decoder" if EXPERT |
| 41 | default y | 41 | default y |
| 42 | depends on XZ_DEC | 42 | depends on XZ_DEC |
| 43 | select XZ_DEC_BCJ | 43 | select XZ_DEC_BCJ |
