diff options
| author | H. Peter Anvin <hpa@linux.intel.com> | 2014-02-07 14:27:30 -0500 |
|---|---|---|
| committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-02-07 14:27:30 -0500 |
| commit | a3b072cd180c12e8fe0ece9487b9065808327640 (patch) | |
| tree | 62b982041be84748852d77cdf6ca5639ef40858f /lib | |
| parent | 75a1ba5b2c529db60ca49626bcaf0bddf4548438 (diff) | |
| parent | 081cd62a010f97b5bc1d2b0cd123c5abc692b68a (diff) | |
Merge tag 'efi-urgent' into x86/urgent
* Avoid WARN_ON() when mapping BGRT on Baytrail (EFI 32-bit).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 50 | ||||
| -rw-r--r-- | lib/Makefile | 4 | ||||
| -rw-r--r-- | lib/assoc_array.c | 2 | ||||
| -rw-r--r-- | lib/average.c | 6 | ||||
| -rw-r--r-- | lib/cmdline.c | 14 | ||||
| -rw-r--r-- | lib/cpumask.c | 4 | ||||
| -rw-r--r-- | lib/decompress_unlz4.c | 1 | ||||
| -rw-r--r-- | lib/dma-debug.c | 197 | ||||
| -rw-r--r-- | lib/dynamic_debug.c | 29 | ||||
| -rw-r--r-- | lib/flex_array.c | 7 | ||||
| -rw-r--r-- | lib/fonts/Kconfig | 6 | ||||
| -rw-r--r-- | lib/genalloc.c | 5 | ||||
| -rw-r--r-- | lib/hash.c | 39 | ||||
| -rw-r--r-- | lib/kobject.c | 96 | ||||
| -rw-r--r-- | lib/kobject_uevent.c | 10 | ||||
| -rw-r--r-- | lib/kstrtox.c | 1 | ||||
| -rw-r--r-- | lib/parser.c | 62 | ||||
| -rw-r--r-- | lib/percpu-refcount.c | 3 | ||||
| -rw-r--r-- | lib/percpu_ida.c | 21 | ||||
| -rw-r--r-- | lib/rbtree_test.c | 13 | ||||
| -rw-r--r-- | lib/reciprocal_div.c | 24 | ||||
| -rw-r--r-- | lib/scatterlist.c | 3 | ||||
| -rw-r--r-- | lib/show_mem.c | 6 | ||||
| -rw-r--r-- | lib/swiotlb.c | 38 | ||||
| -rw-r--r-- | lib/test_module.c | 33 | ||||
| -rw-r--r-- | lib/test_user_copy.c | 110 | ||||
| -rw-r--r-- | lib/vsprintf.c | 33 |
27 files changed, 650 insertions, 167 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6982094a7e74..dbf94a7d25a8 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -1556,17 +1556,6 @@ config PROVIDE_OHCI1394_DMA_INIT | |||
| 1556 | 1556 | ||
| 1557 | See Documentation/debugging-via-ohci1394.txt for more information. | 1557 | See Documentation/debugging-via-ohci1394.txt for more information. |
| 1558 | 1558 | ||
| 1559 | config FIREWIRE_OHCI_REMOTE_DMA | ||
| 1560 | bool "Remote debugging over FireWire with firewire-ohci" | ||
| 1561 | depends on FIREWIRE_OHCI | ||
| 1562 | help | ||
| 1563 | This option lets you use the FireWire bus for remote debugging | ||
| 1564 | with help of the firewire-ohci driver. It enables unfiltered | ||
| 1565 | remote DMA in firewire-ohci. | ||
| 1566 | See Documentation/debugging-via-ohci1394.txt for more information. | ||
| 1567 | |||
| 1568 | If unsure, say N. | ||
| 1569 | |||
| 1570 | config BUILD_DOCSRC | 1559 | config BUILD_DOCSRC |
| 1571 | bool "Build targets in Documentation/ tree" | 1560 | bool "Build targets in Documentation/ tree" |
| 1572 | depends on HEADERS_CHECK | 1561 | depends on HEADERS_CHECK |
| @@ -1584,8 +1573,43 @@ config DMA_API_DEBUG | |||
| 1584 | With this option you will be able to detect common bugs in device | 1573 | With this option you will be able to detect common bugs in device |
| 1585 | drivers like double-freeing of DMA mappings or freeing mappings that | 1574 | drivers like double-freeing of DMA mappings or freeing mappings that |
| 1586 | were never allocated. | 1575 | were never allocated. |
| 1587 | This option causes a performance degredation. Use only if you want | 1576 | |
| 1588 | to debug device drivers. If unsure, say N. | 1577 | This also attempts to catch cases where a page owned by DMA is |
| 1578 | accessed by the cpu in a way that could cause data corruption. For | ||
| 1579 | example, this enables cow_user_page() to check that the source page is | ||
| 1580 | not undergoing DMA. | ||
| 1581 | |||
| 1582 | This option causes a performance degradation. Use only if you want to | ||
| 1583 | debug device drivers and dma interactions. | ||
| 1584 | |||
| 1585 | If unsure, say N. | ||
| 1586 | |||
| 1587 | config TEST_MODULE | ||
| 1588 | tristate "Test module loading with 'hello world' module" | ||
| 1589 | default n | ||
| 1590 | depends on m | ||
| 1591 | help | ||
| 1592 | This builds the "test_module" module that emits "Hello, world" | ||
| 1593 | on printk when loaded. It is designed to be used for basic | ||
| 1594 | evaluation of the module loading subsystem (for example when | ||
| 1595 | validating module verification). It lacks any extra dependencies, | ||
| 1596 | and will not normally be loaded by the system unless explicitly | ||
| 1597 | requested by name. | ||
| 1598 | |||
| 1599 | If unsure, say N. | ||
| 1600 | |||
| 1601 | config TEST_USER_COPY | ||
| 1602 | tristate "Test user/kernel boundary protections" | ||
| 1603 | default n | ||
| 1604 | depends on m | ||
| 1605 | help | ||
| 1606 | This builds the "test_user_copy" module that runs sanity checks | ||
| 1607 | on the copy_to/from_user infrastructure, making sure basic | ||
| 1608 | user/kernel boundary testing is working. If it fails to load, | ||
| 1609 | a regression has been detected in the user/kernel memory boundary | ||
| 1610 | protections. | ||
| 1611 | |||
| 1612 | If unsure, say N. | ||
| 1589 | 1613 | ||
| 1590 | source "samples/Kconfig" | 1614 | source "samples/Kconfig" |
| 1591 | 1615 | ||
diff --git a/lib/Makefile b/lib/Makefile index 04944e9993ed..48140e3ba73f 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
| @@ -26,11 +26,13 @@ obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ | |||
| 26 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ | 26 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ |
| 27 | gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \ | 27 | gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \ |
| 28 | bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o \ | 28 | bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o \ |
| 29 | percpu-refcount.o percpu_ida.o | 29 | percpu-refcount.o percpu_ida.o hash.o |
| 30 | obj-y += string_helpers.o | 30 | obj-y += string_helpers.o |
| 31 | obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o | 31 | obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o |
| 32 | obj-y += kstrtox.o | 32 | obj-y += kstrtox.o |
| 33 | obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o | 33 | obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o |
| 34 | obj-$(CONFIG_TEST_MODULE) += test_module.o | ||
| 35 | obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o | ||
| 34 | 36 | ||
| 35 | ifeq ($(CONFIG_DEBUG_KOBJECT),y) | 37 | ifeq ($(CONFIG_DEBUG_KOBJECT),y) |
| 36 | CFLAGS_kobject.o += -DDEBUG | 38 | CFLAGS_kobject.o += -DDEBUG |
diff --git a/lib/assoc_array.c b/lib/assoc_array.c index 1b6a44f1ec3e..c0b1007011e1 100644 --- a/lib/assoc_array.c +++ b/lib/assoc_array.c | |||
| @@ -157,7 +157,7 @@ enum assoc_array_walk_status { | |||
| 157 | assoc_array_walk_tree_empty, | 157 | assoc_array_walk_tree_empty, |
| 158 | assoc_array_walk_found_terminal_node, | 158 | assoc_array_walk_found_terminal_node, |
| 159 | assoc_array_walk_found_wrong_shortcut, | 159 | assoc_array_walk_found_wrong_shortcut, |
| 160 | } status; | 160 | }; |
| 161 | 161 | ||
| 162 | struct assoc_array_walk_result { | 162 | struct assoc_array_walk_result { |
| 163 | struct { | 163 | struct { |
diff --git a/lib/average.c b/lib/average.c index 99a67e662b3c..114d1beae0c7 100644 --- a/lib/average.c +++ b/lib/average.c | |||
| @@ -53,8 +53,10 @@ EXPORT_SYMBOL(ewma_init); | |||
| 53 | */ | 53 | */ |
| 54 | struct ewma *ewma_add(struct ewma *avg, unsigned long val) | 54 | struct ewma *ewma_add(struct ewma *avg, unsigned long val) |
| 55 | { | 55 | { |
| 56 | avg->internal = avg->internal ? | 56 | unsigned long internal = ACCESS_ONCE(avg->internal); |
| 57 | (((avg->internal << avg->weight) - avg->internal) + | 57 | |
| 58 | ACCESS_ONCE(avg->internal) = internal ? | ||
| 59 | (((internal << avg->weight) - internal) + | ||
| 58 | (val << avg->factor)) >> avg->weight : | 60 | (val << avg->factor)) >> avg->weight : |
| 59 | (val << avg->factor); | 61 | (val << avg->factor); |
| 60 | return avg; | 62 | return avg; |
diff --git a/lib/cmdline.c b/lib/cmdline.c index eb6791188cf5..d4932f745e92 100644 --- a/lib/cmdline.c +++ b/lib/cmdline.c | |||
| @@ -49,13 +49,13 @@ static int get_range(char **str, int *pint) | |||
| 49 | * 3 - hyphen found to denote a range | 49 | * 3 - hyphen found to denote a range |
| 50 | */ | 50 | */ |
| 51 | 51 | ||
| 52 | int get_option (char **str, int *pint) | 52 | int get_option(char **str, int *pint) |
| 53 | { | 53 | { |
| 54 | char *cur = *str; | 54 | char *cur = *str; |
| 55 | 55 | ||
| 56 | if (!cur || !(*cur)) | 56 | if (!cur || !(*cur)) |
| 57 | return 0; | 57 | return 0; |
| 58 | *pint = simple_strtol (cur, str, 0); | 58 | *pint = simple_strtol(cur, str, 0); |
| 59 | if (cur == *str) | 59 | if (cur == *str) |
| 60 | return 0; | 60 | return 0; |
| 61 | if (**str == ',') { | 61 | if (**str == ',') { |
| @@ -67,6 +67,7 @@ int get_option (char **str, int *pint) | |||
| 67 | 67 | ||
| 68 | return 1; | 68 | return 1; |
| 69 | } | 69 | } |
| 70 | EXPORT_SYMBOL(get_option); | ||
| 70 | 71 | ||
| 71 | /** | 72 | /** |
| 72 | * get_options - Parse a string into a list of integers | 73 | * get_options - Parse a string into a list of integers |
| @@ -84,13 +85,13 @@ int get_option (char **str, int *pint) | |||
| 84 | * the parse to end (typically a null terminator, if @str is | 85 | * the parse to end (typically a null terminator, if @str is |
| 85 | * completely parseable). | 86 | * completely parseable). |
| 86 | */ | 87 | */ |
| 87 | |||
