aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug38
-rw-r--r--lib/swiotlb.c2
-rw-r--r--lib/vsprintf.c16
3 files changed, 39 insertions, 17 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
189config 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
204config 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
220config 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
189config SCHED_DEBUG 227config 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/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: