blob: fbd77b7dfd7f07b12249938287770d7a9c666632 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001menu "Kernel hacking"
2
Ingo Molnar55f327f2006-07-03 00:24:43 -07003config TRACE_IRQFLAGS_SUPPORT
Randy Dunlapd013a272007-10-24 15:50:43 -07004 def_bool y
Ingo Molnar55f327f2006-07-03 00:24:43 -07005
Linus Torvalds1da177e2005-04-16 15:20:36 -07006source "lib/Kconfig.debug"
7
8config EARLY_PRINTK
9 bool "Early printk" if EMBEDDED && DEBUG_KERNEL
10 default y
Randy Dunlapd013a272007-10-24 15:50:43 -070011 depends on X86_32
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 help
13 Write kernel log output directly into the VGA buffer or to a serial
14 port.
15
16 This is useful for kernel debugging when your machine crashes very
17 early before the console code is initialized. For normal operation
18 it is not recommended because it looks ugly and doesn't cooperate
19 with klogd/syslogd or the X server. You should normally N here,
20 unless you want to debug such a crash.
21
22config DEBUG_STACKOVERFLOW
23 bool "Check for stack overflows"
24 depends on DEBUG_KERNEL
Adrian Bunkdab175f2005-07-27 11:44:23 -070025 help
26 This option will cause messages to be printed if free stack space
27 drops below a certain limit.
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Linus Torvalds1da177e2005-04-16 15:20:36 -070029config DEBUG_STACK_USAGE
30 bool "Stack utilization instrumentation"
31 depends on DEBUG_KERNEL
32 help
33 Enables the display of the minimum amount of free stack which each
34 task has ever had available in the sysrq-T and sysrq-P debug output.
35
36 This option will slow down process creation somewhat.
37
38comment "Page alloc debug is incompatible with Software Suspend on i386"
Rafael J. Wysockib0cb1a12007-07-29 23:24:36 +020039 depends on DEBUG_KERNEL && HIBERNATION
Randy Dunlapd013a272007-10-24 15:50:43 -070040 depends on X86_32
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
42config DEBUG_PAGEALLOC
Andrew Morton4a2f0ac2006-03-25 03:07:22 -080043 bool "Debug page memory allocations"
Rafael J. Wysockib0cb1a12007-07-29 23:24:36 +020044 depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS
Randy Dunlapd013a272007-10-24 15:50:43 -070045 depends on X86_32
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 help
47 Unmap pages from the kernel linear mapping after free_pages().
48 This results in a large slowdown, but helps to find certain types
49 of memory corruptions.
50
Arjan van de Ven63aaf302006-01-06 00:12:02 -080051config DEBUG_RODATA
52 bool "Write protect kernel read-only data structures"
53 depends on DEBUG_KERNEL
54 help
55 Mark the kernel read-only data as write-protected in the pagetables,
56 in order to catch accidental (and incorrect) writes to such const
57 data. This option may have a slight performance impact because a
58 portion of the kernel code won't be covered by a 2MB TLB anymore.
59 If in doubt, say "N".
60
Linus Torvalds1da177e2005-04-16 15:20:36 -070061config 4KSTACKS
62 bool "Use 4Kb for kernel stacks instead of 8Kb"
63 depends on DEBUG_KERNEL
Randy Dunlapd013a272007-10-24 15:50:43 -070064 depends on X86_32
Linus Torvalds1da177e2005-04-16 15:20:36 -070065 help
66 If you say Y here the kernel will use a 4Kb stacksize for the
67 kernel stack attached to each process/thread. This facilitates
68 running more threads on a system and also reduces the pressure
69 on the VM subsystem for higher order allocations. This option
70 will also use IRQ stacks to compensate for the reduced stackspace.
71
72config X86_FIND_SMP_CONFIG
Randy Dunlapd013a272007-10-24 15:50:43 -070073 def_bool y
Linus Torvalds1da177e2005-04-16 15:20:36 -070074 depends on X86_LOCAL_APIC || X86_VOYAGER
Randy Dunlapd013a272007-10-24 15:50:43 -070075 depends on X86_32
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
77config X86_MPPARSE
Randy Dunlapd013a272007-10-24 15:50:43 -070078 def_bool y
Linus Torvalds1da177e2005-04-16 15:20:36 -070079 depends on X86_LOCAL_APIC && !X86_VISWS
Randy Dunlapd013a272007-10-24 15:50:43 -070080 depends on X86_32
Linus Torvalds1da177e2005-04-16 15:20:36 -070081
Andi Kleen102e41f2006-04-18 12:35:22 +020082config DOUBLEFAULT
83 default y
84 bool "Enable doublefault exception handler" if EMBEDDED
Randy Dunlapd013a272007-10-24 15:50:43 -070085 depends on X86_32
Andi Kleen102e41f2006-04-18 12:35:22 +020086 help
Randy Dunlapd013a272007-10-24 15:50:43 -070087 This option allows trapping of rare doublefault exceptions that
88 would otherwise cause a system to silently reboot. Disabling this
89 option saves about 4k and might cause you much additional grey
90 hair.
91
92config IOMMU_DEBUG
93 bool "Enable IOMMU debugging"
Joerg Roedel966396d2007-10-24 12:49:48 +020094 depends on GART_IOMMU && DEBUG_KERNEL
Randy Dunlapd013a272007-10-24 15:50:43 -070095 depends on X86_64
96 help
97 Force the IOMMU to on even when you have less than 4GB of
98 memory and add debugging code. On overflow always panic. And
99 allow to enable IOMMU leak tracing. Can be disabled at boot
100 time with iommu=noforce. This will also enable scatter gather
101 list merging. Currently not recommended for production
102 code. When you use it make sure you have a big enough
103 IOMMU/AGP aperture. Most of the options enabled by this can
104 be set more finegrained using the iommu= command line
105 options. See Documentation/x86_64/boot-options.txt for more
106 details.
107
108config IOMMU_LEAK
109 bool "IOMMU leak tracing"
110 depends on DEBUG_KERNEL
111 depends on IOMMU_DEBUG
112 help
113 Add a simple leak tracer to the IOMMU code. This is useful when you
114 are debugging a buggy device driver that leaks IOMMU mappings.
115
116#config X86_REMOTE_DEBUG
117# bool "kgdb debugging stub"
Andi Kleen102e41f2006-04-18 12:35:22 +0200118
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119endmenu