diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-13 17:29:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-13 17:29:07 -0400 |
commit | f499cae1e59d75d5eb24c23d47cf8986e6032c6d (patch) | |
tree | 1af6235c18391212c40116eb90b01eae8938efee /lib | |
parent | fc3f55e672e1ed917dd9e215af81939cd3d717da (diff) | |
parent | 80a04d3f2f94fb68b5df05e3ac6697130bc3467a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 38 | ||||
-rw-r--r-- | lib/debug_locks.c | 2 | ||||
-rw-r--r-- | lib/decompress_bunzip2.c | 1 | ||||
-rw-r--r-- | lib/decompress_inflate.c | 1 | ||||
-rw-r--r-- | lib/decompress_unlzma.c | 1 | ||||
-rw-r--r-- | lib/swiotlb.c | 2 | ||||
-rw-r--r-- | lib/vsprintf.c | 16 |
7 files changed, 43 insertions, 18 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 9638d99644af..c6e854f215fa 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -186,6 +186,44 @@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE | |||
186 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC | 186 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC |
187 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC | 187 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC |
188 | 188 | ||
189 | config DETECT_HUNG_TASK | ||
190 | bool "Detect Hung Tasks" | ||
191 | depends on DEBUG_KERNEL | ||
192 | default DETECT_SOFTLOCKUP | ||
193 | help | ||
194 | Say Y here to enable the kernel to detect "hung tasks", | ||
195 | which are bugs that cause the task to be stuck in | ||
196 | uninterruptible "D" state indefinitiley. | ||
197 | |||
198 | When a hung task is detected, the kernel will print the | ||
199 | current stack trace (which you should report), but the | ||
200 | task will stay in uninterruptible state. If lockdep is | ||
201 | enabled then all held locks will also be reported. This | ||
202 | feature has negligible overhead. | ||
203 | |||
204 | config BOOTPARAM_HUNG_TASK_PANIC | ||
205 | bool "Panic (Reboot) On Hung Tasks" | ||
206 | depends on DETECT_HUNG_TASK | ||
207 | help | ||
208 | Say Y here to enable the kernel to panic on "hung tasks", | ||
209 | which are bugs that cause the kernel to leave a task stuck | ||
210 | in uninterruptible "D" state. | ||
211 | |||
212 | The panic can be used in combination with panic_timeout, | ||
213 | to cause the system to reboot automatically after a | ||
214 | hung task has been detected. This feature is useful for | ||
215 | high-availability systems that have uptime guarantees and | ||
216 | where a hung tasks must be resolved ASAP. | ||
217 | |||
218 | Say N if unsure. | ||
219 | |||
220 | config BOOTPARAM_HUNG_TASK_PANIC_VALUE | ||
221 | int | ||
222 | depends on DETECT_HUNG_TASK | ||
223 | range 0 1 | ||
224 | default 0 if !BOOTPARAM_HUNG_TASK_PANIC | ||
225 | default 1 if BOOTPARAM_HUNG_TASK_PANIC | ||
226 | |||
189 | config SCHED_DEBUG | 227 | config SCHED_DEBUG |
190 | bool "Collect scheduler debugging info" | 228 | bool "Collect scheduler debugging info" |
191 | depends on DEBUG_KERNEL && PROC_FS | 229 | depends on DEBUG_KERNEL && PROC_FS |
diff --git a/lib/debug_locks.c b/lib/debug_locks.c index 0218b4693dd8..bc3b11731b9c 100644 --- a/lib/debug_locks.c +++ b/lib/debug_locks.c | |||
@@ -36,7 +36,7 @@ int debug_locks_silent; | |||
36 | */ | 36 | */ |
37 | int debug_locks_off(void) | 37 | int debug_locks_off(void) |
38 | { | 38 | { |
39 | if (xchg(&debug_locks, 0)) { | 39 | if (__debug_locks_off()) { |
40 | if (!debug_locks_silent) { | 40 | if (!debug_locks_silent) { |
41 | oops_in_progress = 1; | 41 | oops_in_progress = 1; |
42 | console_verbose(); | 42 | console_verbose(); |
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c index 5d3ddb5fcfd9..708e2a86d87b 100644 --- a/lib/decompress_bunzip2.c +++ b/lib/decompress_bunzip2.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #endif /* !STATIC */ | 50 | #endif /* !STATIC */ |
51 | 51 | ||
52 | #include <linux/decompress/mm.h> | 52 | #include <linux/decompress/mm.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #ifndef INT_MAX | 55 | #ifndef INT_MAX |
55 | #define INT_MAX 0x7fffffff | 56 | #define INT_MAX 0x7fffffff |
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index 839a329b4fc4..e36b296fc9f8 100644 --- a/lib/decompress_inflate.c +++ b/lib/decompress_inflate.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #endif /* STATIC */ | 23 | #endif /* STATIC */ |
24 | 24 | ||
25 | #include <linux/decompress/mm.h> | 25 | #include <linux/decompress/mm.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #define INBUF_LEN (16*1024) | 28 | #define INBUF_LEN (16*1024) |
28 | 29 | ||
diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c index 546f2f4c157e..32123a1340e6 100644 --- a/lib/decompress_unlzma.c +++ b/lib/decompress_unlzma.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #endif /* STATIC */ | 34 | #endif /* STATIC */ |
35 | 35 | ||
36 | #include <linux/decompress/mm.h> | 36 | #include <linux/decompress/mm.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) | 39 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) |
39 | 40 | ||
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 32e2bd3b1142..2b0b5a7d2ced 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -549,7 +549,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size, | |||
549 | dma_addr_t dev_addr; | 549 | dma_addr_t dev_addr; |
550 | void *ret; | 550 | void *ret; |
551 | int order = get_order(size); | 551 | int order = get_order(size); |
552 | u64 dma_mask = DMA_32BIT_MASK; | 552 | u64 dma_mask = DMA_BIT_MASK(32); |
553 | 553 | ||
554 | if (hwdev && hwdev->coherent_dma_mask) | 554 | if (hwdev && hwdev->coherent_dma_mask) |
555 | dma_mask = hwdev->coherent_dma_mask; | 555 | dma_mask = hwdev->coherent_dma_mask; |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index be3001f912e4..7536acea135b 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -1051,13 +1051,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | |||
1051 | if (str < end) | 1051 | if (str < end) |
1052 | *str = '%'; | 1052 | *str = '%'; |
1053 | ++str; | 1053 | ++str; |
1054 | if (*fmt) { | ||
1055 | if (str < end) | ||
1056 | *str = *fmt; | ||
1057 | ++str; | ||
1058 | } else { | ||
1059 | --fmt; | ||
1060 | } | ||
1061 | break; | 1054 | break; |
1062 | 1055 | ||
1063 | case FORMAT_TYPE_NRCHARS: { | 1056 | case FORMAT_TYPE_NRCHARS: { |
@@ -1339,8 +1332,6 @@ do { \ | |||
1339 | break; | 1332 | break; |
1340 | 1333 | ||
1341 | case FORMAT_TYPE_INVALID: | 1334 | case FORMAT_TYPE_INVALID: |
1342 | if (!*fmt) | ||
1343 | --fmt; | ||
1344 | break; | 1335 | break; |
1345 | 1336 | ||
1346 | case FORMAT_TYPE_NRCHARS: { | 1337 | case FORMAT_TYPE_NRCHARS: { |
@@ -1523,13 +1514,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf) | |||
1523 | if (str < end) | 1514 | if (str < end) |
1524 | *str = '%'; | 1515 | *str = '%'; |
1525 | ++str; | 1516 | ++str; |
1526 | if (*fmt) { | ||
1527 | if (str < end) | ||
1528 | *str = *fmt; | ||
1529 | ++str; | ||
1530 | } else { | ||
1531 | --fmt; | ||
1532 | } | ||
1533 | break; | 1517 | break; |
1534 | 1518 | ||
1535 | case FORMAT_TYPE_NRCHARS: | 1519 | case FORMAT_TYPE_NRCHARS: |