diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 42 | ||||
-rw-r--r-- | lib/ioremap.c | 10 |
2 files changed, 31 insertions, 21 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 67fa774f9572..79e0dff1cdcb 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -76,7 +76,6 @@ config UNUSED_SYMBOLS | |||
76 | 76 | ||
77 | config DEBUG_FS | 77 | config DEBUG_FS |
78 | bool "Debug Filesystem" | 78 | bool "Debug Filesystem" |
79 | depends on SYSFS | ||
80 | help | 79 | help |
81 | debugfs is a virtual file system that kernel developers use to put | 80 | debugfs is a virtual file system that kernel developers use to put |
82 | debugging files into. Enable this option to be able to read and | 81 | debugging files into. Enable this option to be able to read and |
@@ -152,28 +151,33 @@ config DEBUG_SHIRQ | |||
152 | Drivers ought to be able to handle interrupts coming in at those | 151 | Drivers ought to be able to handle interrupts coming in at those |
153 | points; some don't and need to be caught. | 152 | points; some don't and need to be caught. |
154 | 153 | ||
155 | config DETECT_SOFTLOCKUP | 154 | config LOCKUP_DETECTOR |
156 | bool "Detect Soft Lockups" | 155 | bool "Detect Hard and Soft Lockups" |
157 | depends on DEBUG_KERNEL && !S390 | 156 | depends on DEBUG_KERNEL && !S390 |
158 | default y | ||
159 | help | 157 | help |
160 | Say Y here to enable the kernel to detect "soft lockups", | 158 | Say Y here to enable the kernel to act as a watchdog to detect |
161 | which are bugs that cause the kernel to loop in kernel | 159 | hard and soft lockups. |
160 | |||
161 | Softlockups are bugs that cause the kernel to loop in kernel | ||
162 | mode for more than 60 seconds, without giving other tasks a | 162 | mode for more than 60 seconds, without giving other tasks a |
163 | chance to run. | 163 | chance to run. The current stack trace is displayed upon |
164 | detection and the system will stay locked up. | ||
164 | 165 | ||
165 | When a soft-lockup is detected, the kernel will print the | 166 | Hardlockups are bugs that cause the CPU to loop in kernel mode |
166 | current stack trace (which you should report), but the | 167 | for more than 60 seconds, without letting other interrupts have a |
167 | system will stay locked up. This feature has negligible | 168 | chance to run. The current stack trace is displayed upon detection |
168 | overhead. | 169 | and the system will stay locked up. |
170 | |||
171 | The overhead should be minimal. A periodic hrtimer runs to | ||
172 | generate interrupts and kick the watchdog task every 10-12 seconds. | ||
173 | An NMI is generated every 60 seconds or so to check for hardlockups. | ||
169 | 174 | ||
170 | (Note that "hard lockups" are separate type of bugs that | 175 | config HARDLOCKUP_DETECTOR |
171 | can be detected via the NMI-watchdog, on platforms that | 176 | def_bool LOCKUP_DETECTOR && PERF_EVENTS && HAVE_PERF_EVENTS_NMI |
172 | support it.) | ||
173 | 177 | ||
174 | config BOOTPARAM_SOFTLOCKUP_PANIC | 178 | config BOOTPARAM_SOFTLOCKUP_PANIC |
175 | bool "Panic (Reboot) On Soft Lockups" | 179 | bool "Panic (Reboot) On Soft Lockups" |
176 | depends on DETECT_SOFTLOCKUP | 180 | depends on LOCKUP_DETECTOR |
177 | help | 181 | help |
178 | Say Y here to enable the kernel to panic on "soft lockups", | 182 | Say Y here to enable the kernel to panic on "soft lockups", |
179 | which are bugs that cause the kernel to loop in kernel | 183 | which are bugs that cause the kernel to loop in kernel |
@@ -190,7 +194,7 @@ config BOOTPARAM_SOFTLOCKUP_PANIC | |||
190 | 194 | ||
191 | config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE | 195 | config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE |
192 | int | 196 | int |
193 | depends on DETECT_SOFTLOCKUP | 197 | depends on LOCKUP_DETECTOR |
194 | range 0 1 | 198 | range 0 1 |
195 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC | 199 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC |
196 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC | 200 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC |
@@ -307,6 +311,12 @@ config DEBUG_OBJECTS_WORK | |||
307 | work queue routines to track the life time of work objects and | 311 | work queue routines to track the life time of work objects and |
308 | validate the work operations. | 312 | validate the work operations. |
309 | 313 | ||
314 | config DEBUG_OBJECTS_RCU_HEAD | ||
315 | bool "Debug RCU callbacks objects" | ||
316 | depends on DEBUG_OBJECTS && PREEMPT | ||
317 | help | ||
318 | Enable this to turn on debugging of RCU list heads (call_rcu() usage). | ||
319 | |||
310 | config DEBUG_OBJECTS_ENABLE_DEFAULT | 320 | config DEBUG_OBJECTS_ENABLE_DEFAULT |
311 | int "debug_objects bootup default value (0-1)" | 321 | int "debug_objects bootup default value (0-1)" |
312 | range 0 1 | 322 | range 0 1 |
diff --git a/lib/ioremap.c b/lib/ioremap.c index 14c6078f17a2..5730ecd3eb66 100644 --- a/lib/ioremap.c +++ b/lib/ioremap.c | |||
@@ -13,10 +13,10 @@ | |||
13 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
14 | 14 | ||
15 | static int ioremap_pte_range(pmd_t *pmd, unsigned long addr, | 15 | static int ioremap_pte_range(pmd_t *pmd, unsigned long addr, |
16 | unsigned long end, unsigned long phys_addr, pgprot_t prot) | 16 | unsigned long end, phys_addr_t phys_addr, pgprot_t prot) |
17 | { | 17 | { |
18 | pte_t *pte; | 18 | pte_t *pte; |
19 | unsigned long pfn; | 19 | u64 pfn; |
20 | 20 | ||
21 | pfn = phys_addr >> PAGE_SHIFT; | 21 | pfn = phys_addr >> PAGE_SHIFT; |
22 | pte = pte_alloc_kernel(pmd, addr); | 22 | pte = pte_alloc_kernel(pmd, addr); |
@@ -31,7 +31,7 @@ static int ioremap_pte_range(pmd_t *pmd, unsigned long addr, | |||
31 | } | 31 | } |
32 | 32 | ||
33 | static inline int ioremap_pmd_range(pud_t *pud, unsigned long addr, | 33 | static inline int ioremap_pmd_range(pud_t *pud, unsigned long addr, |
34 | unsigned long end, unsigned long phys_addr, pgprot_t prot) | 34 | unsigned long end, phys_addr_t phys_addr, pgprot_t prot) |
35 | { | 35 | { |
36 | pmd_t *pmd; | 36 | pmd_t *pmd; |
37 | unsigned long next; | 37 | unsigned long next; |
@@ -49,7 +49,7 @@ static inline int ioremap_pmd_range(pud_t *pud, unsigned long addr, | |||
49 | } | 49 | } |
50 | 50 | ||
51 | static inline int ioremap_pud_range(pgd_t *pgd, unsigned long addr, | 51 | static inline int ioremap_pud_range(pgd_t *pgd, unsigned long addr, |
52 | unsigned long end, unsigned long phys_addr, pgprot_t prot) | 52 | unsigned long end, phys_addr_t phys_addr, pgprot_t prot) |
53 | { | 53 | { |
54 | pud_t *pud; | 54 | pud_t *pud; |
55 | unsigned long next; | 55 | unsigned long next; |
@@ -67,7 +67,7 @@ static inline int ioremap_pud_range(pgd_t *pgd, unsigned long addr, | |||
67 | } | 67 | } |
68 | 68 | ||
69 | int ioremap_page_range(unsigned long addr, | 69 | int ioremap_page_range(unsigned long addr, |
70 | unsigned long end, unsigned long phys_addr, pgprot_t prot) | 70 | unsigned long end, phys_addr_t phys_addr, pgprot_t prot) |
71 | { | 71 | { |
72 | pgd_t *pgd; | 72 | pgd_t *pgd; |
73 | unsigned long start; | 73 | unsigned long start; |