diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 54 | ||||
-rw-r--r-- | lib/ioremap.c | 10 |
2 files changed, 44 insertions, 20 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 4608952884de..79e0dff1cdcb 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -151,28 +151,33 @@ config DEBUG_SHIRQ | |||
151 | 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 |
152 | points; some don't and need to be caught. | 152 | points; some don't and need to be caught. |
153 | 153 | ||
154 | config DETECT_SOFTLOCKUP | 154 | config LOCKUP_DETECTOR |
155 | bool "Detect Soft Lockups" | 155 | bool "Detect Hard and Soft Lockups" |
156 | depends on DEBUG_KERNEL && !S390 | 156 | depends on DEBUG_KERNEL && !S390 |
157 | default y | ||
158 | help | 157 | help |
159 | 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 |
160 | 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 | ||
161 | mode for more than 60 seconds, without giving other tasks a | 162 | mode for more than 60 seconds, without giving other tasks a |
162 | chance to run. | 163 | chance to run. The current stack trace is displayed upon |
164 | detection and the system will stay locked up. | ||
163 | 165 | ||
164 | When a soft-lockup is detected, the kernel will print the | 166 | Hardlockups are bugs that cause the CPU to loop in kernel mode |
165 | current stack trace (which you should report), but the | 167 | for more than 60 seconds, without letting other interrupts have a |
166 | system will stay locked up. This feature has negligible | 168 | chance to run. The current stack trace is displayed upon detection |
167 | overhead. | 169 | and the system will stay locked up. |
168 | 170 | ||
169 | (Note that "hard lockups" are separate type of bugs that | 171 | The overhead should be minimal. A periodic hrtimer runs to |
170 | can be detected via the NMI-watchdog, on platforms that | 172 | generate interrupts and kick the watchdog task every 10-12 seconds. |
171 | support it.) | 173 | An NMI is generated every 60 seconds or so to check for hardlockups. |
174 | |||
175 | config HARDLOCKUP_DETECTOR | ||
176 | def_bool LOCKUP_DETECTOR && PERF_EVENTS && HAVE_PERF_EVENTS_NMI | ||
172 | 177 | ||
173 | config BOOTPARAM_SOFTLOCKUP_PANIC | 178 | config BOOTPARAM_SOFTLOCKUP_PANIC |
174 | bool "Panic (Reboot) On Soft Lockups" | 179 | bool "Panic (Reboot) On Soft Lockups" |
175 | depends on DETECT_SOFTLOCKUP | 180 | depends on LOCKUP_DETECTOR |
176 | help | 181 | help |
177 | 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", |
178 | which are bugs that cause the kernel to loop in kernel | 183 | which are bugs that cause the kernel to loop in kernel |
@@ -189,7 +194,7 @@ config BOOTPARAM_SOFTLOCKUP_PANIC | |||
189 | 194 | ||
190 | config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE | 195 | config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE |
191 | int | 196 | int |
192 | depends on DETECT_SOFTLOCKUP | 197 | depends on LOCKUP_DETECTOR |
193 | range 0 1 | 198 | range 0 1 |
194 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC | 199 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC |
195 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC | 200 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC |
@@ -306,6 +311,12 @@ config DEBUG_OBJECTS_WORK | |||
306 | 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 |
307 | validate the work operations. | 312 | validate the work operations. |
308 | 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 | |||
309 | config DEBUG_OBJECTS_ENABLE_DEFAULT | 320 | config DEBUG_OBJECTS_ENABLE_DEFAULT |
310 | int "debug_objects bootup default value (0-1)" | 321 | int "debug_objects bootup default value (0-1)" |
311 | range 0 1 | 322 | range 0 1 |
@@ -627,6 +638,19 @@ config DEBUG_INFO | |||
627 | 638 | ||
628 | If unsure, say N. | 639 | If unsure, say N. |
629 | 640 | ||
641 | config DEBUG_INFO_REDUCED | ||
642 | bool "Reduce debugging information" | ||
643 | depends on DEBUG_INFO | ||
644 | help | ||
645 | If you say Y here gcc is instructed to generate less debugging | ||
646 | information for structure types. This means that tools that | ||
647 | need full debugging information (like kgdb or systemtap) won't | ||
648 | be happy. But if you merely need debugging information to | ||
649 | resolve line numbers there is no loss. Advantage is that | ||
650 | build directory object sizes shrink dramatically over a full | ||
651 | DEBUG_INFO build and compile times are reduced too. | ||
652 | Only works with newer gcc versions. | ||
653 | |||
630 | config DEBUG_VM | 654 | config DEBUG_VM |
631 | bool "Debug VM" | 655 | bool "Debug VM" |
632 | depends on DEBUG_KERNEL | 656 | depends on DEBUG_KERNEL |
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; |