Commit cae2ed9aa573415c6e5de9a09b7ff0d74af793bc

Authored by Ingo Molnar
Committed by Linus Torvalds
1 parent 1f194a4c39

[PATCH] lockdep: locking API self tests

Introduce DEBUG_LOCKING_API_SELFTESTS, which uses the generic lock debugging
code's silent-failure feature to run a matrix of testcases.  There are 210
testcases currently:

  +-----------------------
  | Locking API testsuite:
  +------------------------------+------+------+------+------+------+------+
                                 | spin |wlock |rlock |mutex | wsem | rsem |
  -------------------------------+------+------+------+------+------+------+
                     A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                 A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
             A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
         A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                    double unlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                 bad unlock order:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
  --------------------------------------+------+------+------+------+------+
              recursive read-lock:             |  ok  |             |  ok  |
  --------------------------------------+------+------+------+------+------+
                non-nested unlock:  ok  |  ok  |  ok  |  ok  |
  --------------------------------------+------+------+------+
     hard-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
     soft-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
     hard-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
     soft-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
       sirq-safe-A => hirqs-on/12:  ok  |  ok  |  ok  |
       sirq-safe-A => hirqs-on/21:  ok  |  ok  |  ok  |
         hard-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
         soft-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
         hard-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
         soft-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
    hard-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
    soft-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/123:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/123:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/132:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/132:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/213:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/213:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/231:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/231:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/312:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/312:  ok  |  ok  |  ok  |
      hard-irq lock-inversion/321:  ok  |  ok  |  ok  |
      soft-irq lock-inversion/321:  ok  |  ok  |  ok  |
      hard-irq read-recursion/123:  ok  |
      soft-irq read-recursion/123:  ok  |
      hard-irq read-recursion/132:  ok  |
      soft-irq read-recursion/132:  ok  |
      hard-irq read-recursion/213:  ok  |
      soft-irq read-recursion/213:  ok  |
      hard-irq read-recursion/231:  ok  |
      soft-irq read-recursion/231:  ok  |
      hard-irq read-recursion/312:  ok  |
      soft-irq read-recursion/312:  ok  |
      hard-irq read-recursion/321:  ok  |
      soft-irq read-recursion/321:  ok  |
  --------------------------------+-----+----------------
  Good, all 210 testcases passed! |
  --------------------------------+

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 18 changed files with 1347 additions and 0 deletions Inline Diff

Documentation/kernel-parameters.txt
1 Kernel Parameters 1 Kernel Parameters
2 ~~~~~~~~~~~~~~~~~ 2 ~~~~~~~~~~~~~~~~~
3 3
4 The following is a consolidated list of the kernel parameters as implemented 4 The following is a consolidated list of the kernel parameters as implemented
5 (mostly) by the __setup() macro and sorted into English Dictionary order 5 (mostly) by the __setup() macro and sorted into English Dictionary order
6 (defined as ignoring all punctuation and sorting digits before letters in a 6 (defined as ignoring all punctuation and sorting digits before letters in a
7 case insensitive manner), and with descriptions where known. 7 case insensitive manner), and with descriptions where known.
8 8
9 Module parameters for loadable modules are specified only as the 9 Module parameters for loadable modules are specified only as the
10 parameter name with optional '=' and value as appropriate, such as: 10 parameter name with optional '=' and value as appropriate, such as:
11 11
12 modprobe usbcore blinkenlights=1 12 modprobe usbcore blinkenlights=1
13 13
14 Module parameters for modules that are built into the kernel image 14 Module parameters for modules that are built into the kernel image
15 are specified on the kernel command line with the module name plus 15 are specified on the kernel command line with the module name plus
16 '.' plus parameter name, with '=' and value if appropriate, such as: 16 '.' plus parameter name, with '=' and value if appropriate, such as:
17 17
18 usbcore.blinkenlights=1 18 usbcore.blinkenlights=1
19 19
20 This document may not be entirely up to date and comprehensive. The command 20 This document may not be entirely up to date and comprehensive. The command
21 "modinfo -p ${modulename}" shows a current list of all parameters of a loadable 21 "modinfo -p ${modulename}" shows a current list of all parameters of a loadable
22 module. Loadable modules, after being loaded into the running kernel, also 22 module. Loadable modules, after being loaded into the running kernel, also
23 reveal their parameters in /sys/module/${modulename}/parameters/. Some of these 23 reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
24 parameters may be changed at runtime by the command 24 parameters may be changed at runtime by the command
25 "echo -n ${value} > /sys/module/${modulename}/parameters/${parm}". 25 "echo -n ${value} > /sys/module/${modulename}/parameters/${parm}".
26 26
27 The parameters listed below are only valid if certain kernel build options were 27 The parameters listed below are only valid if certain kernel build options were
28 enabled and if respective hardware is present. The text in square brackets at 28 enabled and if respective hardware is present. The text in square brackets at
29 the beginning of each description states the restrictions within which a 29 the beginning of each description states the restrictions within which a
30 parameter is applicable: 30 parameter is applicable:
31 31
32 ACPI ACPI support is enabled. 32 ACPI ACPI support is enabled.
33 ALSA ALSA sound support is enabled. 33 ALSA ALSA sound support is enabled.
34 APIC APIC support is enabled. 34 APIC APIC support is enabled.
35 APM Advanced Power Management support is enabled. 35 APM Advanced Power Management support is enabled.
36 AX25 Appropriate AX.25 support is enabled. 36 AX25 Appropriate AX.25 support is enabled.
37 CD Appropriate CD support is enabled. 37 CD Appropriate CD support is enabled.
38 DRM Direct Rendering Management support is enabled. 38 DRM Direct Rendering Management support is enabled.
39 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled 39 EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
40 EFI EFI Partitioning (GPT) is enabled 40 EFI EFI Partitioning (GPT) is enabled
41 EIDE EIDE/ATAPI support is enabled. 41 EIDE EIDE/ATAPI support is enabled.
42 FB The frame buffer device is enabled. 42 FB The frame buffer device is enabled.
43 HW Appropriate hardware is enabled. 43 HW Appropriate hardware is enabled.
44 IA-32 IA-32 aka i386 architecture is enabled. 44 IA-32 IA-32 aka i386 architecture is enabled.
45 IA-64 IA-64 architecture is enabled. 45 IA-64 IA-64 architecture is enabled.
46 IOSCHED More than one I/O scheduler is enabled. 46 IOSCHED More than one I/O scheduler is enabled.
47 IP_PNP IP DHCP, BOOTP, or RARP is enabled. 47 IP_PNP IP DHCP, BOOTP, or RARP is enabled.
48 ISAPNP ISA PnP code is enabled. 48 ISAPNP ISA PnP code is enabled.
49 ISDN Appropriate ISDN support is enabled. 49 ISDN Appropriate ISDN support is enabled.
50 JOY Appropriate joystick support is enabled. 50 JOY Appropriate joystick support is enabled.
51 LP Printer support is enabled. 51 LP Printer support is enabled.
52 LOOP Loopback device support is enabled. 52 LOOP Loopback device support is enabled.
53 M68k M68k architecture is enabled. 53 M68k M68k architecture is enabled.
54 These options have more detailed description inside of 54 These options have more detailed description inside of
55 Documentation/m68k/kernel-options.txt. 55 Documentation/m68k/kernel-options.txt.
56 MCA MCA bus support is enabled. 56 MCA MCA bus support is enabled.
57 MDA MDA console support is enabled. 57 MDA MDA console support is enabled.
58 MOUSE Appropriate mouse support is enabled. 58 MOUSE Appropriate mouse support is enabled.
59 MSI Message Signaled Interrupts (PCI). 59 MSI Message Signaled Interrupts (PCI).
60 MTD MTD support is enabled. 60 MTD MTD support is enabled.
61 NET Appropriate network support is enabled. 61 NET Appropriate network support is enabled.
62 NUMA NUMA support is enabled. 62 NUMA NUMA support is enabled.
63 GENERIC_TIME The generic timeofday code is enabled. 63 GENERIC_TIME The generic timeofday code is enabled.
64 NFS Appropriate NFS support is enabled. 64 NFS Appropriate NFS support is enabled.
65 OSS OSS sound support is enabled. 65 OSS OSS sound support is enabled.
66 PARIDE The ParIDE subsystem is enabled. 66 PARIDE The ParIDE subsystem is enabled.
67 PARISC The PA-RISC architecture is enabled. 67 PARISC The PA-RISC architecture is enabled.
68 PCI PCI bus support is enabled. 68 PCI PCI bus support is enabled.
69 PCMCIA The PCMCIA subsystem is enabled. 69 PCMCIA The PCMCIA subsystem is enabled.
70 PNP Plug & Play support is enabled. 70 PNP Plug & Play support is enabled.
71 PPC PowerPC architecture is enabled. 71 PPC PowerPC architecture is enabled.
72 PPT Parallel port support is enabled. 72 PPT Parallel port support is enabled.
73 PS2 Appropriate PS/2 support is enabled. 73 PS2 Appropriate PS/2 support is enabled.
74 RAM RAM disk support is enabled. 74 RAM RAM disk support is enabled.
75 S390 S390 architecture is enabled. 75 S390 S390 architecture is enabled.
76 SCSI Appropriate SCSI support is enabled. 76 SCSI Appropriate SCSI support is enabled.
77 A lot of drivers has their options described inside of 77 A lot of drivers has their options described inside of
78 Documentation/scsi/. 78 Documentation/scsi/.
79 SELINUX SELinux support is enabled. 79 SELINUX SELinux support is enabled.
80 SERIAL Serial support is enabled. 80 SERIAL Serial support is enabled.
81 SMP The kernel is an SMP kernel. 81 SMP The kernel is an SMP kernel.
82 SPARC Sparc architecture is enabled. 82 SPARC Sparc architecture is enabled.
83 SWSUSP Software suspend is enabled. 83 SWSUSP Software suspend is enabled.
84 TS Appropriate touchscreen support is enabled. 84 TS Appropriate touchscreen support is enabled.
85 USB USB support is enabled. 85 USB USB support is enabled.
86 USBHID USB Human Interface Device support is enabled. 86 USBHID USB Human Interface Device support is enabled.
87 V4L Video For Linux support is enabled. 87 V4L Video For Linux support is enabled.
88 VGA The VGA console has been enabled. 88 VGA The VGA console has been enabled.
89 VT Virtual terminal support is enabled. 89 VT Virtual terminal support is enabled.
90 WDT Watchdog support is enabled. 90 WDT Watchdog support is enabled.
91 XT IBM PC/XT MFM hard disk support is enabled. 91 XT IBM PC/XT MFM hard disk support is enabled.
92 X86-64 X86-64 architecture is enabled. 92 X86-64 X86-64 architecture is enabled.
93 More X86-64 boot options can be found in 93 More X86-64 boot options can be found in
94 Documentation/x86_64/boot-options.txt . 94 Documentation/x86_64/boot-options.txt .
95 95
96 In addition, the following text indicates that the option: 96 In addition, the following text indicates that the option:
97 97
98 BUGS= Relates to possible processor bugs on the said processor. 98 BUGS= Relates to possible processor bugs on the said processor.
99 KNL Is a kernel start-up parameter. 99 KNL Is a kernel start-up parameter.
100 BOOT Is a boot loader parameter. 100 BOOT Is a boot loader parameter.
101 101
102 Parameters denoted with BOOT are actually interpreted by the boot 102 Parameters denoted with BOOT are actually interpreted by the boot
103 loader, and have no meaning to the kernel directly. 103 loader, and have no meaning to the kernel directly.
104 Do not modify the syntax of boot loader parameters without extreme 104 Do not modify the syntax of boot loader parameters without extreme
105 need or coordination with <Documentation/i386/boot.txt>. 105 need or coordination with <Documentation/i386/boot.txt>.
106 106
107 Note that ALL kernel parameters listed below are CASE SENSITIVE, and that 107 Note that ALL kernel parameters listed below are CASE SENSITIVE, and that
108 a trailing = on the name of any parameter states that that parameter will 108 a trailing = on the name of any parameter states that that parameter will
109 be entered as an environment variable, whereas its absence indicates that 109 be entered as an environment variable, whereas its absence indicates that
110 it will appear as a kernel argument readable via /proc/cmdline by programs 110 it will appear as a kernel argument readable via /proc/cmdline by programs
111 running once the system is up. 111 running once the system is up.
112 112
113 53c7xx= [HW,SCSI] Amiga SCSI controllers 113 53c7xx= [HW,SCSI] Amiga SCSI controllers
114 See header of drivers/scsi/53c7xx.c. 114 See header of drivers/scsi/53c7xx.c.
115 See also Documentation/scsi/ncr53c7xx.txt. 115 See also Documentation/scsi/ncr53c7xx.txt.
116 116
117 acpi= [HW,ACPI] Advanced Configuration and Power Interface 117 acpi= [HW,ACPI] Advanced Configuration and Power Interface
118 Format: { force | off | ht | strict | noirq } 118 Format: { force | off | ht | strict | noirq }
119 force -- enable ACPI if default was off 119 force -- enable ACPI if default was off
120 off -- disable ACPI if default was on 120 off -- disable ACPI if default was on
121 noirq -- do not use ACPI for IRQ routing 121 noirq -- do not use ACPI for IRQ routing
122 ht -- run only enough ACPI to enable Hyper Threading 122 ht -- run only enough ACPI to enable Hyper Threading
123 strict -- Be less tolerant of platforms that are not 123 strict -- Be less tolerant of platforms that are not
124 strictly ACPI specification compliant. 124 strictly ACPI specification compliant.
125 125
126 See also Documentation/pm.txt, pci=noacpi 126 See also Documentation/pm.txt, pci=noacpi
127 127
128 acpi_sleep= [HW,ACPI] Sleep options 128 acpi_sleep= [HW,ACPI] Sleep options
129 Format: { s3_bios, s3_mode } 129 Format: { s3_bios, s3_mode }
130 See Documentation/power/video.txt 130 See Documentation/power/video.txt
131 131
132 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode 132 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode
133 Format: { level | edge | high | low } 133 Format: { level | edge | high | low }
134 134
135 acpi_irq_balance [HW,ACPI] 135 acpi_irq_balance [HW,ACPI]
136 ACPI will balance active IRQs 136 ACPI will balance active IRQs
137 default in APIC mode 137 default in APIC mode
138 138
139 acpi_irq_nobalance [HW,ACPI] 139 acpi_irq_nobalance [HW,ACPI]
140 ACPI will not move active IRQs (default) 140 ACPI will not move active IRQs (default)
141 default in PIC mode 141 default in PIC mode
142 142
143 acpi_irq_pci= [HW,ACPI] If irq_balance, clear listed IRQs for 143 acpi_irq_pci= [HW,ACPI] If irq_balance, clear listed IRQs for
144 use by PCI 144 use by PCI
145 Format: <irq>,<irq>... 145 Format: <irq>,<irq>...
146 146
147 acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA 147 acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA
148 Format: <irq>,<irq>... 148 Format: <irq>,<irq>...
149 149
150 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS 150 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
151 Format: To spoof as Windows 98: ="Microsoft Windows" 151 Format: To spoof as Windows 98: ="Microsoft Windows"
152 152
153 acpi_osi= [HW,ACPI] empty param disables _OSI 153 acpi_osi= [HW,ACPI] empty param disables _OSI
154 154
155 acpi_serialize [HW,ACPI] force serialization of AML methods 155 acpi_serialize [HW,ACPI] force serialization of AML methods
156 156
157 acpi_skip_timer_override [HW,ACPI] 157 acpi_skip_timer_override [HW,ACPI]
158 Recognize and ignore IRQ0/pin2 Interrupt Override. 158 Recognize and ignore IRQ0/pin2 Interrupt Override.
159 For broken nForce2 BIOS resulting in XT-PIC timer. 159 For broken nForce2 BIOS resulting in XT-PIC timer.
160 160
161 acpi_dbg_layer= [HW,ACPI] 161 acpi_dbg_layer= [HW,ACPI]
162 Format: <int> 162 Format: <int>
163 Each bit of the <int> indicates an ACPI debug layer, 163 Each bit of the <int> indicates an ACPI debug layer,
164 1: enable, 0: disable. It is useful for boot time 164 1: enable, 0: disable. It is useful for boot time
165 debugging. After system has booted up, it can be set 165 debugging. After system has booted up, it can be set
166 via /proc/acpi/debug_layer. 166 via /proc/acpi/debug_layer.
167 167
168 acpi_dbg_level= [HW,ACPI] 168 acpi_dbg_level= [HW,ACPI]
169 Format: <int> 169 Format: <int>
170 Each bit of the <int> indicates an ACPI debug level, 170 Each bit of the <int> indicates an ACPI debug level,
171 1: enable, 0: disable. It is useful for boot time 171 1: enable, 0: disable. It is useful for boot time
172 debugging. After system has booted up, it can be set 172 debugging. After system has booted up, it can be set
173 via /proc/acpi/debug_level. 173 via /proc/acpi/debug_level.
174 174
175 acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT 175 acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT
176 176
177 acpi_generic_hotkey [HW,ACPI] 177 acpi_generic_hotkey [HW,ACPI]
178 Allow consolidated generic hotkey driver to 178 Allow consolidated generic hotkey driver to
179 override platform specific driver. 179 override platform specific driver.
180 See also Documentation/acpi-hotkey.txt. 180 See also Documentation/acpi-hotkey.txt.
181 181
182 acpi_pm_good [IA-32,X86-64] 182 acpi_pm_good [IA-32,X86-64]
183 Override the pmtimer bug detection: force the kernel 183 Override the pmtimer bug detection: force the kernel
184 to assume that this machine's pmtimer latches its value 184 to assume that this machine's pmtimer latches its value
185 and always returns good values. 185 and always returns good values.
186 186
187 enable_timer_pin_1 [i386,x86-64] 187 enable_timer_pin_1 [i386,x86-64]
188 Enable PIN 1 of APIC timer 188 Enable PIN 1 of APIC timer
189 Can be useful to work around chipset bugs 189 Can be useful to work around chipset bugs
190 (in particular on some ATI chipsets). 190 (in particular on some ATI chipsets).
191 The kernel tries to set a reasonable default. 191 The kernel tries to set a reasonable default.
192 192
193 disable_timer_pin_1 [i386,x86-64] 193 disable_timer_pin_1 [i386,x86-64]
194 Disable PIN 1 of APIC timer 194 Disable PIN 1 of APIC timer
195 Can be useful to work around chipset bugs. 195 Can be useful to work around chipset bugs.
196 196
197 ad1816= [HW,OSS] 197 ad1816= [HW,OSS]
198 Format: <io>,<irq>,<dma>,<dma2> 198 Format: <io>,<irq>,<dma>,<dma2>
199 See also Documentation/sound/oss/AD1816. 199 See also Documentation/sound/oss/AD1816.
200 200
201 ad1848= [HW,OSS] 201 ad1848= [HW,OSS]
202 Format: <io>,<irq>,<dma>,<dma2>,<type> 202 Format: <io>,<irq>,<dma>,<dma2>,<type>
203 203
204 adlib= [HW,OSS] 204 adlib= [HW,OSS]
205 Format: <io> 205 Format: <io>
206 206
207 advansys= [HW,SCSI] 207 advansys= [HW,SCSI]
208 See header of drivers/scsi/advansys.c. 208 See header of drivers/scsi/advansys.c.
209 209
210 advwdt= [HW,WDT] Advantech WDT 210 advwdt= [HW,WDT] Advantech WDT
211 Format: <iostart>,<iostop> 211 Format: <iostart>,<iostop>
212 212
213 aedsp16= [HW,OSS] Audio Excel DSP 16 213 aedsp16= [HW,OSS] Audio Excel DSP 16
214 Format: <io>,<irq>,<dma>,<mss_io>,<mpu_io>,<mpu_irq> 214 Format: <io>,<irq>,<dma>,<mss_io>,<mpu_io>,<mpu_irq>
215 See also header of sound/oss/aedsp16.c. 215 See also header of sound/oss/aedsp16.c.
216 216
217 aha152x= [HW,SCSI] 217 aha152x= [HW,SCSI]
218 See Documentation/scsi/aha152x.txt. 218 See Documentation/scsi/aha152x.txt.
219 219
220 aha1542= [HW,SCSI] 220 aha1542= [HW,SCSI]
221 Format: <portbase>[,<buson>,<busoff>[,<dmaspeed>]] 221 Format: <portbase>[,<buson>,<busoff>[,<dmaspeed>]]
222 222
223 aic7xxx= [HW,SCSI] 223 aic7xxx= [HW,SCSI]
224 See Documentation/scsi/aic7xxx.txt. 224 See Documentation/scsi/aic7xxx.txt.
225 225
226 aic79xx= [HW,SCSI] 226 aic79xx= [HW,SCSI]
227 See Documentation/scsi/aic79xx.txt. 227 See Documentation/scsi/aic79xx.txt.
228 228
229 amijoy.map= [HW,JOY] Amiga joystick support 229 amijoy.map= [HW,JOY] Amiga joystick support
230 Map of devices attached to JOY0DAT and JOY1DAT 230 Map of devices attached to JOY0DAT and JOY1DAT
231 Format: <a>,<b> 231 Format: <a>,<b>
232 See also Documentation/kernel/input/joystick.txt 232 See also Documentation/kernel/input/joystick.txt
233 233
234 analog.map= [HW,JOY] Analog joystick and gamepad support 234 analog.map= [HW,JOY] Analog joystick and gamepad support
235 Specifies type or capabilities of an analog joystick 235 Specifies type or capabilities of an analog joystick
236 connected to one of 16 gameports 236 connected to one of 16 gameports
237 Format: <type1>,<type2>,..<type16> 237 Format: <type1>,<type2>,..<type16>
238 238
239 apc= [HW,SPARC] 239 apc= [HW,SPARC]
240 Power management functions (SPARCstation-4/5 + deriv.) 240 Power management functions (SPARCstation-4/5 + deriv.)
241 Format: noidle 241 Format: noidle
242 Disable APC CPU standby support. SPARCstation-Fox does 242 Disable APC CPU standby support. SPARCstation-Fox does
243 not play well with APC CPU idle - disable it if you have 243 not play well with APC CPU idle - disable it if you have
244 APC and your system crashes randomly. 244 APC and your system crashes randomly.
245 245
246 apic= [APIC,i386] Change the output verbosity whilst booting 246 apic= [APIC,i386] Change the output verbosity whilst booting
247 Format: { quiet (default) | verbose | debug } 247 Format: { quiet (default) | verbose | debug }
248 Change the amount of debugging information output 248 Change the amount of debugging information output
249 when initialising the APIC and IO-APIC components. 249 when initialising the APIC and IO-APIC components.
250 250
251 apm= [APM] Advanced Power Management 251 apm= [APM] Advanced Power Management
252 See header of arch/i386/kernel/apm.c. 252 See header of arch/i386/kernel/apm.c.
253 253
254 applicom= [HW] 254 applicom= [HW]
255 Format: <mem>,<irq> 255 Format: <mem>,<irq>
256 256
257 arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards 257 arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards
258 Format: <io>,<irq>,<nodeID> 258 Format: <io>,<irq>,<nodeID>
259 259
260 ataflop= [HW,M68k] 260 ataflop= [HW,M68k]
261 261
262 atarimouse= [HW,MOUSE] Atari Mouse 262 atarimouse= [HW,MOUSE] Atari Mouse
263 263
264 atascsi= [HW,SCSI] Atari SCSI 264 atascsi= [HW,SCSI] Atari SCSI
265 265
266 atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess, 266 atkbd.extra= [HW] Enable extra LEDs and keys on IBM RapidAccess,
267 EzKey and similar keyboards 267 EzKey and similar keyboards
268 268
269 atkbd.reset= [HW] Reset keyboard during initialization 269 atkbd.reset= [HW] Reset keyboard during initialization
270 270
271 atkbd.set= [HW] Select keyboard code set 271 atkbd.set= [HW] Select keyboard code set
272 Format: <int> (2 = AT (default), 3 = PS/2) 272 Format: <int> (2 = AT (default), 3 = PS/2)
273 273
274 atkbd.scroll= [HW] Enable scroll wheel on MS Office and similar 274 atkbd.scroll= [HW] Enable scroll wheel on MS Office and similar
275 keyboards 275 keyboards
276 276
277 atkbd.softraw= [HW] Choose between synthetic and real raw mode 277 atkbd.softraw= [HW] Choose between synthetic and real raw mode
278 Format: <bool> (0 = real, 1 = synthetic (default)) 278 Format: <bool> (0 = real, 1 = synthetic (default))
279 279
280 atkbd.softrepeat= [HW] 280 atkbd.softrepeat= [HW]
281 Use software keyboard repeat 281 Use software keyboard repeat
282 282
283 autotest [IA64] 283 autotest [IA64]
284 284
285 awe= [HW,OSS] AWE32/SB32/AWE64 wave table synth 285 awe= [HW,OSS] AWE32/SB32/AWE64 wave table synth
286 Format: <io>,<memsize>,<isapnp> 286 Format: <io>,<memsize>,<isapnp>
287 287
288 aztcd= [HW,CD] Aztech CD268 CDROM driver 288 aztcd= [HW,CD] Aztech CD268 CDROM driver
289 Format: <io>,0x79 (?) 289 Format: <io>,0x79 (?)
290 290
291 baycom_epp= [HW,AX25] 291 baycom_epp= [HW,AX25]
292 Format: <io>,<mode> 292 Format: <io>,<mode>
293 293
294 baycom_par= [HW,AX25] BayCom Parallel Port AX.25 Modem 294 baycom_par= [HW,AX25] BayCom Parallel Port AX.25 Modem
295 Format: <io>,<mode> 295 Format: <io>,<mode>
296 See header of drivers/net/hamradio/baycom_par.c. 296 See header of drivers/net/hamradio/baycom_par.c.
297 297
298 baycom_ser_fdx= [HW,AX25] 298 baycom_ser_fdx= [HW,AX25]
299 BayCom Serial Port AX.25 Modem (Full Duplex Mode) 299 BayCom Serial Port AX.25 Modem (Full Duplex Mode)
300 Format: <io>,<irq>,<mode>[,<baud>] 300 Format: <io>,<irq>,<mode>[,<baud>]
301 See header of drivers/net/hamradio/baycom_ser_fdx.c. 301 See header of drivers/net/hamradio/baycom_ser_fdx.c.
302 302
303 baycom_ser_hdx= [HW,AX25] 303 baycom_ser_hdx= [HW,AX25]
304 BayCom Serial Port AX.25 Modem (Half Duplex Mode) 304 BayCom Serial Port AX.25 Modem (Half Duplex Mode)
305 Format: <io>,<irq>,<mode> 305 Format: <io>,<irq>,<mode>
306 See header of drivers/net/hamradio/baycom_ser_hdx.c. 306 See header of drivers/net/hamradio/baycom_ser_hdx.c.
307 307
308 blkmtd_device= [HW,MTD] 308 blkmtd_device= [HW,MTD]
309 blkmtd_erasesz= 309 blkmtd_erasesz=
310 blkmtd_ro= 310 blkmtd_ro=
311 blkmtd_bs= 311 blkmtd_bs=
312 blkmtd_count= 312 blkmtd_count=
313 313
314 bttv.card= [HW,V4L] bttv (bt848 + bt878 based grabber cards) 314 bttv.card= [HW,V4L] bttv (bt848 + bt878 based grabber cards)
315 bttv.radio= Most important insmod options are available as 315 bttv.radio= Most important insmod options are available as
316 kernel args too. 316 kernel args too.
317 bttv.pll= See Documentation/video4linux/bttv/Insmod-options 317 bttv.pll= See Documentation/video4linux/bttv/Insmod-options
318 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST 318 bttv.tuner= and Documentation/video4linux/bttv/CARDLIST
319 319
320 BusLogic= [HW,SCSI] 320 BusLogic= [HW,SCSI]
321 See drivers/scsi/BusLogic.c, comment before function 321 See drivers/scsi/BusLogic.c, comment before function
322 BusLogic_ParseDriverOptions(). 322 BusLogic_ParseDriverOptions().
323 323
324 c101= [NET] Moxa C101 synchronous serial card 324 c101= [NET] Moxa C101 synchronous serial card
325 325
326 cachesize= [BUGS=IA-32] Override level 2 CPU cache size detection. 326 cachesize= [BUGS=IA-32] Override level 2 CPU cache size detection.
327 Sometimes CPU hardware bugs make them report the cache 327 Sometimes CPU hardware bugs make them report the cache
328 size incorrectly. The kernel will attempt work arounds 328 size incorrectly. The kernel will attempt work arounds
329 to fix known problems, but for some CPUs it is not 329 to fix known problems, but for some CPUs it is not
330 possible to determine what the correct size should be. 330 possible to determine what the correct size should be.
331 This option provides an override for these situations. 331 This option provides an override for these situations.
332 332
333 cdu31a= [HW,CD] 333 cdu31a= [HW,CD]
334 Format: <io>,<irq>[,PAS] 334 Format: <io>,<irq>[,PAS]
335 See header of drivers/cdrom/cdu31a.c. 335 See header of drivers/cdrom/cdu31a.c.
336 336
337 chandev= [HW,NET] Generic channel device initialisation 337 chandev= [HW,NET] Generic channel device initialisation
338 338
339 checkreqprot [SELINUX] Set initial checkreqprot flag value. 339 checkreqprot [SELINUX] Set initial checkreqprot flag value.
340 Format: { "0" | "1" } 340 Format: { "0" | "1" }
341 See security/selinux/Kconfig help text. 341 See security/selinux/Kconfig help text.
342 0 -- check protection applied by kernel (includes 342 0 -- check protection applied by kernel (includes
343 any implied execute protection). 343 any implied execute protection).
344 1 -- check protection requested by application. 344 1 -- check protection requested by application.
345 Default value is set via a kernel config option. 345 Default value is set via a kernel config option.
346 Value can be changed at runtime via 346 Value can be changed at runtime via
347 /selinux/checkreqprot. 347 /selinux/checkreqprot.
348 348
349 clock= [BUGS=IA-32, HW] gettimeofday clocksource override. 349 clock= [BUGS=IA-32, HW] gettimeofday clocksource override.
350 [Deprecated] 350 [Deprecated]
351 Forces specified clocksource (if avaliable) to be used 351 Forces specified clocksource (if avaliable) to be used
352 when calculating gettimeofday(). If specified 352 when calculating gettimeofday(). If specified
353 clocksource is not avalible, it defaults to PIT. 353 clocksource is not avalible, it defaults to PIT.
354 Format: { pit | tsc | cyclone | pmtmr } 354 Format: { pit | tsc | cyclone | pmtmr }
355 355
356 disable_8254_timer 356 disable_8254_timer
357 enable_8254_timer 357 enable_8254_timer
358 [IA32/X86_64] Disable/Enable interrupt 0 timer routing 358 [IA32/X86_64] Disable/Enable interrupt 0 timer routing
359 over the 8254 in addition to over the IO-APIC. The 359 over the 8254 in addition to over the IO-APIC. The
360 kernel tries to set a sensible default. 360 kernel tries to set a sensible default.
361 361
362 hpet= [IA-32,HPET] option to disable HPET and use PIT. 362 hpet= [IA-32,HPET] option to disable HPET and use PIT.
363 Format: disable 363 Format: disable
364 364
365 cm206= [HW,CD] 365 cm206= [HW,CD]
366 Format: { auto | [<io>,][<irq>] } 366 Format: { auto | [<io>,][<irq>] }
367 367
368 com20020= [HW,NET] ARCnet - COM20020 chipset 368 com20020= [HW,NET] ARCnet - COM20020 chipset
369 Format: 369 Format:
370 <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]] 370 <io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]]
371 371
372 com90io= [HW,NET] ARCnet - COM90xx chipset (IO-mapped buffers) 372 com90io= [HW,NET] ARCnet - COM90xx chipset (IO-mapped buffers)
373 Format: <io>[,<irq>] 373 Format: <io>[,<irq>]
374 374
375 com90xx= [HW,NET] 375 com90xx= [HW,NET]
376 ARCnet - COM90xx chipset (memory-mapped buffers) 376 ARCnet - COM90xx chipset (memory-mapped buffers)
377 Format: <io>[,<irq>[,<memstart>]] 377 Format: <io>[,<irq>[,<memstart>]]
378 378
379 condev= [HW,S390] console device 379 condev= [HW,S390] console device
380 conmode= 380 conmode=
381 381
382 console= [KNL] Output console device and options. 382 console= [KNL] Output console device and options.
383 383
384 tty<n> Use the virtual console device <n>. 384 tty<n> Use the virtual console device <n>.
385 385
386 ttyS<n>[,options] 386 ttyS<n>[,options]
387 ttyUSB0[,options] 387 ttyUSB0[,options]
388 Use the specified serial port. The options are of 388 Use the specified serial port. The options are of
389 the form "bbbbpnf", where "bbbb" is the baud rate, 389 the form "bbbbpnf", where "bbbb" is the baud rate,
390 "p" is parity ("n", "o", or "e"), "n" is number of 390 "p" is parity ("n", "o", or "e"), "n" is number of
391 bits, and "f" is flow control ("r" for RTS or 391 bits, and "f" is flow control ("r" for RTS or
392 omit it). Default is "9600n8". 392 omit it). Default is "9600n8".
393 393
394 See Documentation/serial-console.txt for more 394 See Documentation/serial-console.txt for more
395 information. See 395 information. See
396 Documentation/networking/netconsole.txt for an 396 Documentation/networking/netconsole.txt for an
397 alternative. 397 alternative.
398 398
399 uart,io,<addr>[,options] 399 uart,io,<addr>[,options]
400 uart,mmio,<addr>[,options] 400 uart,mmio,<addr>[,options]
401 Start an early, polled-mode console on the 8250/16550 401 Start an early, polled-mode console on the 8250/16550
402 UART at the specified I/O port or MMIO address, 402 UART at the specified I/O port or MMIO address,
403 switching to the matching ttyS device later. The 403 switching to the matching ttyS device later. The
404 options are the same as for ttyS, above. 404 options are the same as for ttyS, above.
405 405
406 cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver 406 cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver
407 Format: 407 Format:
408 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>] 408 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
409 409
410 cpia_pp= [HW,PPT] 410 cpia_pp= [HW,PPT]
411 Format: { parport<nr> | auto | none } 411 Format: { parport<nr> | auto | none }
412 412
413 crashkernel=nn[KMG]@ss[KMG] 413 crashkernel=nn[KMG]@ss[KMG]
414 [KNL] Reserve a chunk of physical memory to 414 [KNL] Reserve a chunk of physical memory to
415 hold a kernel to switch to with kexec on panic. 415 hold a kernel to switch to with kexec on panic.
416 416
417 cs4232= [HW,OSS] 417 cs4232= [HW,OSS]
418 Format: <io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq> 418 Format: <io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>
419 419
420 cs89x0_dma= [HW,NET] 420 cs89x0_dma= [HW,NET]
421 Format: <dma> 421 Format: <dma>
422 422
423 cs89x0_media= [HW,NET] 423 cs89x0_media= [HW,NET]
424 Format: { rj45 | aui | bnc } 424 Format: { rj45 | aui | bnc }
425 425
426 cyclades= [HW,SERIAL] Cyclades multi-serial port adapter. 426 cyclades= [HW,SERIAL] Cyclades multi-serial port adapter.
427 427
428 dasd= [HW,NET] 428 dasd= [HW,NET]
429 See header of drivers/s390/block/dasd_devmap.c. 429 See header of drivers/s390/block/dasd_devmap.c.
430 430
431 db9.dev[2|3]= [HW,JOY] Multisystem joystick support via parallel port 431 db9.dev[2|3]= [HW,JOY] Multisystem joystick support via parallel port
432 (one device per port) 432 (one device per port)
433 Format: <port#>,<type> 433 Format: <port#>,<type>
434 See also Documentation/input/joystick-parport.txt 434 See also Documentation/input/joystick-parport.txt
435 435
436 debug [KNL] Enable kernel debugging (events log level). 436 debug [KNL] Enable kernel debugging (events log level).
437 437
438 debug_locks_verbose=
439 [KNL] verbose self-tests
440 Format=<0|1>
441 Print debugging info while doing the locking API
442 self-tests.
443 We default to 0 (no extra messages), setting it to
444 1 will print _a lot_ more information - normally
445 only useful to kernel developers.
446
438 decnet= [HW,NET] 447 decnet= [HW,NET]
439 Format: <area>[,<node>] 448 Format: <area>[,<node>]
440 See also Documentation/networking/decnet.txt. 449 See also Documentation/networking/decnet.txt.
441 450
442 dhash_entries= [KNL] 451 dhash_entries= [KNL]
443 Set number of hash buckets for dentry cache. 452 Set number of hash buckets for dentry cache.
444 453
445 digi= [HW,SERIAL] 454 digi= [HW,SERIAL]
446 IO parameters + enable/disable command. 455 IO parameters + enable/disable command.
447 456
448 digiepca= [HW,SERIAL] 457 digiepca= [HW,SERIAL]
449 See drivers/char/README.epca and 458 See drivers/char/README.epca and
450 Documentation/digiepca.txt. 459 Documentation/digiepca.txt.
451 460
452 dmascc= [HW,AX25,SERIAL] AX.25 Z80SCC driver with DMA 461 dmascc= [HW,AX25,SERIAL] AX.25 Z80SCC driver with DMA
453 support available. 462 support available.
454 Format: <io_dev0>[,<io_dev1>[,..<io_dev32>]] 463 Format: <io_dev0>[,<io_dev1>[,..<io_dev32>]]
455 464
456 dmasound= [HW,OSS] Sound subsystem buffers 465 dmasound= [HW,OSS] Sound subsystem buffers
457 466
458 dscc4.setup= [NET] 467 dscc4.setup= [NET]
459 468
460 dtc3181e= [HW,SCSI] 469 dtc3181e= [HW,SCSI]
461 470
462 earlyprintk= [IA-32,X86-64] 471 earlyprintk= [IA-32,X86-64]
463 earlyprintk=vga 472 earlyprintk=vga
464 earlyprintk=serial[,ttySn[,baudrate]] 473 earlyprintk=serial[,ttySn[,baudrate]]
465 474
466 Append ",keep" to not disable it when the real console 475 Append ",keep" to not disable it when the real console
467 takes over. 476 takes over.
468 477
469 Only vga or serial at a time, not both. 478 Only vga or serial at a time, not both.
470 479
471 Currently only ttyS0 and ttyS1 are supported. 480 Currently only ttyS0 and ttyS1 are supported.
472 481
473 Interaction with the standard serial driver is not 482 Interaction with the standard serial driver is not
474 very good. 483 very good.
475 484
476 The VGA output is eventually overwritten by the real 485 The VGA output is eventually overwritten by the real
477 console. 486 console.
478 487
479 eata= [HW,SCSI] 488 eata= [HW,SCSI]
480 489
481 ec_intr= [HW,ACPI] ACPI Embedded Controller interrupt mode 490 ec_intr= [HW,ACPI] ACPI Embedded Controller interrupt mode
482 Format: <int> 491 Format: <int>
483 0: polling mode 492 0: polling mode
484 non-0: interrupt mode (default) 493 non-0: interrupt mode (default)
485 494
486 eda= [HW,PS2] 495 eda= [HW,PS2]
487 496
488 edb= [HW,PS2] 497 edb= [HW,PS2]
489 498
490 edd= [EDD] 499 edd= [EDD]
491 Format: {"of[f]" | "sk[ipmbr]"} 500 Format: {"of[f]" | "sk[ipmbr]"}
492 See comment in arch/i386/boot/edd.S 501 See comment in arch/i386/boot/edd.S
493 502
494 eicon= [HW,ISDN] 503 eicon= [HW,ISDN]
495 Format: <id>,<membase>,<irq> 504 Format: <id>,<membase>,<irq>
496 505
497 eisa_irq_edge= [PARISC,HW] 506 eisa_irq_edge= [PARISC,HW]
498 See header of drivers/parisc/eisa.c. 507 See header of drivers/parisc/eisa.c.
499 508
500 elanfreq= [IA-32] 509 elanfreq= [IA-32]
501 See comment before function elanfreq_setup() in 510 See comment before function elanfreq_setup() in
502 arch/i386/kernel/cpu/cpufreq/elanfreq.c. 511 arch/i386/kernel/cpu/cpufreq/elanfreq.c.
503 512
504 elevator= [IOSCHED] 513 elevator= [IOSCHED]
505 Format: {"anticipatory" | "cfq" | "deadline" | "noop"} 514 Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
506 See Documentation/block/as-iosched.txt and 515 See Documentation/block/as-iosched.txt and
507 Documentation/block/deadline-iosched.txt for details. 516 Documentation/block/deadline-iosched.txt for details.
508 517
509 elfcorehdr= [IA-32, X86_64] 518 elfcorehdr= [IA-32, X86_64]
510 Specifies physical address of start of kernel core 519 Specifies physical address of start of kernel core
511 image elf header. Generally kexec loader will 520 image elf header. Generally kexec loader will
512 pass this option to capture kernel. 521 pass this option to capture kernel.
513 See Documentation/kdump/kdump.txt for details. 522 See Documentation/kdump/kdump.txt for details.
514 523
515 enforcing [SELINUX] Set initial enforcing status. 524 enforcing [SELINUX] Set initial enforcing status.
516 Format: {"0" | "1"} 525 Format: {"0" | "1"}
517 See security/selinux/Kconfig help text. 526 See security/selinux/Kconfig help text.
518 0 -- permissive (log only, no denials). 527 0 -- permissive (log only, no denials).
519 1 -- enforcing (deny and log). 528 1 -- enforcing (deny and log).
520 Default value is 0. 529 Default value is 0.
521 Value can be changed at runtime via /selinux/enforce. 530 Value can be changed at runtime via /selinux/enforce.
522 531
523 es1370= [HW,OSS] 532 es1370= [HW,OSS]
524 Format: <lineout>[,<micbias>] 533 Format: <lineout>[,<micbias>]
525 See also header of sound/oss/es1370.c. 534 See also header of sound/oss/es1370.c.
526 535
527 es1371= [HW,OSS] 536 es1371= [HW,OSS]
528 Format: <spdif>,[<nomix>,[<amplifier>]] 537 Format: <spdif>,[<nomix>,[<amplifier>]]
529 See also header of sound/oss/es1371.c. 538 See also header of sound/oss/es1371.c.
530 539
531 ether= [HW,NET] Ethernet cards parameters 540 ether= [HW,NET] Ethernet cards parameters
532 This option is obsoleted by the "netdev=" option, which 541 This option is obsoleted by the "netdev=" option, which
533 has equivalent usage. See its documentation for details. 542 has equivalent usage. See its documentation for details.
534 543
535 eurwdt= [HW,WDT] Eurotech CPU-1220/1410 onboard watchdog. 544 eurwdt= [HW,WDT] Eurotech CPU-1220/1410 onboard watchdog.
536 Format: <io>[,<irq>] 545 Format: <io>[,<irq>]
537 546
538 fd_mcs= [HW,SCSI] 547 fd_mcs= [HW,SCSI]
539 See header of drivers/scsi/fd_mcs.c. 548 See header of drivers/scsi/fd_mcs.c.
540 549
541 fdomain= [HW,SCSI] 550 fdomain= [HW,SCSI]
542 See header of drivers/scsi/fdomain.c. 551 See header of drivers/scsi/fdomain.c.
543 552
544 floppy= [HW] 553 floppy= [HW]
545 See Documentation/floppy.txt. 554 See Documentation/floppy.txt.
546 555
547 ftape= [HW] Floppy Tape subsystem debugging options. 556 ftape= [HW] Floppy Tape subsystem debugging options.
548 See Documentation/ftape.txt. 557 See Documentation/ftape.txt.
549 558
550 gamecon.map[2|3]= 559 gamecon.map[2|3]=
551 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad 560 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
552 support via parallel port (up to 5 devices per port) 561 support via parallel port (up to 5 devices per port)
553 Format: <port#>,<pad1>,<pad2>,<pad3>,<pad4>,<pad5> 562 Format: <port#>,<pad1>,<pad2>,<pad3>,<pad4>,<pad5>
554 See also Documentation/input/joystick-parport.txt 563 See also Documentation/input/joystick-parport.txt
555 564
556 gamma= [HW,DRM] 565 gamma= [HW,DRM]
557 566
558 gdth= [HW,SCSI] 567 gdth= [HW,SCSI]
559 See header of drivers/scsi/gdth.c. 568 See header of drivers/scsi/gdth.c.
560 569
561 gpt [EFI] Forces disk with valid GPT signature but 570 gpt [EFI] Forces disk with valid GPT signature but
562 invalid Protective MBR to be treated as GPT. 571 invalid Protective MBR to be treated as GPT.
563 572
564 gscd= [HW,CD] 573 gscd= [HW,CD]
565 Format: <io> 574 Format: <io>
566 575
567 gt96100eth= [NET] MIPS GT96100 Advanced Communication Controller 576 gt96100eth= [NET] MIPS GT96100 Advanced Communication Controller
568 577
569 gus= [HW,OSS] 578 gus= [HW,OSS]
570 Format: <io>,<irq>,<dma>,<dma16> 579 Format: <io>,<irq>,<dma>,<dma16>
571 580
572 gvp11= [HW,SCSI] 581 gvp11= [HW,SCSI]
573 582
574 hashdist= [KNL,NUMA] Large hashes allocated during boot 583 hashdist= [KNL,NUMA] Large hashes allocated during boot
575 are distributed across NUMA nodes. Defaults on 584 are distributed across NUMA nodes. Defaults on
576 for IA-64, off otherwise. 585 for IA-64, off otherwise.
577 Format: 0 | 1 (for off | on) 586 Format: 0 | 1 (for off | on)
578 587
579 hcl= [IA-64] SGI's Hardware Graph compatibility layer 588 hcl= [IA-64] SGI's Hardware Graph compatibility layer
580 589
581 hd= [EIDE] (E)IDE hard drive subsystem geometry 590 hd= [EIDE] (E)IDE hard drive subsystem geometry
582 Format: <cyl>,<head>,<sect> 591 Format: <cyl>,<head>,<sect>
583 592
584 hd?= [HW] (E)IDE subsystem 593 hd?= [HW] (E)IDE subsystem
585 hd?lun= See Documentation/ide.txt. 594 hd?lun= See Documentation/ide.txt.
586 595
587 highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact 596 highmem=nn[KMG] [KNL,BOOT] forces the highmem zone to have an exact
588 size of <nn>. This works even on boxes that have no 597 size of <nn>. This works even on boxes that have no
589 highmem otherwise. This also works to reduce highmem 598 highmem otherwise. This also works to reduce highmem
590 size on bigger boxes. 599 size on bigger boxes.
591 600
592 hisax= [HW,ISDN] 601 hisax= [HW,ISDN]
593 See Documentation/isdn/README.HiSax. 602 See Documentation/isdn/README.HiSax.
594 603
595 hugepages= [HW,IA-32,IA-64] Maximal number of HugeTLB pages. 604 hugepages= [HW,IA-32,IA-64] Maximal number of HugeTLB pages.
596 605
597 noirqbalance [IA-32,SMP,KNL] Disable kernel irq balancing 606 noirqbalance [IA-32,SMP,KNL] Disable kernel irq balancing
598 607
599 i8042.direct [HW] Put keyboard port into non-translated mode 608 i8042.direct [HW] Put keyboard port into non-translated mode
600 i8042.dumbkbd [HW] Pretend that controlled can only read data from 609 i8042.dumbkbd [HW] Pretend that controlled can only read data from
601 keyboard and can not control its state 610 keyboard and can not control its state
602 (Don't attempt to blink the leds) 611 (Don't attempt to blink the leds)
603 i8042.noaux [HW] Don't check for auxiliary (== mouse) port 612 i8042.noaux [HW] Don't check for auxiliary (== mouse) port
604 i8042.nokbd [HW] Don't check/create keyboard port 613 i8042.nokbd [HW] Don't check/create keyboard port
605 i8042.nomux [HW] Don't check presence of an active multiplexing 614 i8042.nomux [HW] Don't check presence of an active multiplexing
606 controller 615 controller
607 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX 616 i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
608 controllers 617 controllers
609 i8042.panicblink= 618 i8042.panicblink=
610 [HW] Frequency with which keyboard LEDs should blink 619 [HW] Frequency with which keyboard LEDs should blink
611 when kernel panics (default is 0.5 sec) 620 when kernel panics (default is 0.5 sec)
612 i8042.reset [HW] Reset the controller during init and cleanup 621 i8042.reset [HW] Reset the controller during init and cleanup
613 i8042.unlock [HW] Unlock (ignore) the keylock 622 i8042.unlock [HW] Unlock (ignore) the keylock
614 623
615 i810= [HW,DRM] 624 i810= [HW,DRM]
616 625
617 i8k.ignore_dmi [HW] Continue probing hardware even if DMI data 626 i8k.ignore_dmi [HW] Continue probing hardware even if DMI data
618 indicates that the driver is running on unsupported 627 indicates that the driver is running on unsupported
619 hardware. 628 hardware.
620 i8k.force [HW] Activate i8k driver even if SMM BIOS signature 629 i8k.force [HW] Activate i8k driver even if SMM BIOS signature
621 does not match list of supported models. 630 does not match list of supported models.
622 i8k.power_status 631 i8k.power_status
623 [HW] Report power status in /proc/i8k 632 [HW] Report power status in /proc/i8k
624 (disabled by default) 633 (disabled by default)
625 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN 634 i8k.restricted [HW] Allow controlling fans only if SYS_ADMIN
626 capability is set. 635 capability is set.
627 636
628 ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter 637 ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter
629 See Documentation/mca.txt. 638 See Documentation/mca.txt.
630 639
631 icn= [HW,ISDN] 640 icn= [HW,ISDN]
632 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] 641 Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]]
633 642
634 ide= [HW] (E)IDE subsystem 643 ide= [HW] (E)IDE subsystem
635 Format: ide=nodma or ide=doubler or ide=reverse 644 Format: ide=nodma or ide=doubler or ide=reverse
636 See Documentation/ide.txt. 645 See Documentation/ide.txt.
637 646
638 ide?= [HW] (E)IDE subsystem 647 ide?= [HW] (E)IDE subsystem
639 Format: ide?=noprobe or chipset specific parameters. 648 Format: ide?=noprobe or chipset specific parameters.
640 See Documentation/ide.txt. 649 See Documentation/ide.txt.
641 650
642 idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed 651 idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
643 See Documentation/ide.txt. 652 See Documentation/ide.txt.
644 653
645 idle= [HW] 654 idle= [HW]
646 Format: idle=poll or idle=halt 655 Format: idle=poll or idle=halt
647 656
648 ihash_entries= [KNL] 657 ihash_entries= [KNL]
649 Set number of hash buckets for inode cache. 658 Set number of hash buckets for inode cache.
650 659
651 in2000= [HW,SCSI] 660 in2000= [HW,SCSI]
652 See header of drivers/scsi/in2000.c. 661 See header of drivers/scsi/in2000.c.
653 662
654 init= [KNL] 663 init= [KNL]
655 Format: <full_path> 664 Format: <full_path>
656 Run specified binary instead of /sbin/init as init 665 Run specified binary instead of /sbin/init as init
657 process. 666 process.
658 667
659 initcall_debug [KNL] Trace initcalls as they are executed. Useful 668 initcall_debug [KNL] Trace initcalls as they are executed. Useful
660 for working out where the kernel is dying during 669 for working out where the kernel is dying during
661 startup. 670 startup.
662 671
663 initrd= [BOOT] Specify the location of the initial ramdisk 672 initrd= [BOOT] Specify the location of the initial ramdisk
664 673
665 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver 674 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver
666 Format: <irq> 675 Format: <irq>
667 676
668 combined_mode= [HW] control which driver uses IDE ports in combined 677 combined_mode= [HW] control which driver uses IDE ports in combined
669 mode: legacy IDE driver, libata, or both 678 mode: legacy IDE driver, libata, or both
670 (in the libata case, libata.atapi_enabled=1 may be 679 (in the libata case, libata.atapi_enabled=1 may be
671 useful as well). Note that using the ide or libata 680 useful as well). Note that using the ide or libata
672 options may affect your device naming (e.g. by 681 options may affect your device naming (e.g. by
673 changing hdc to sdb). 682 changing hdc to sdb).
674 Format: combined (default), ide, or libata 683 Format: combined (default), ide, or libata
675 684
676 inttest= [IA64] 685 inttest= [IA64]
677 686
678 io7= [HW] IO7 for Marvel based alpha systems 687 io7= [HW] IO7 for Marvel based alpha systems
679 See comment before marvel_specify_io7 in 688 See comment before marvel_specify_io7 in
680 arch/alpha/kernel/core_marvel.c. 689 arch/alpha/kernel/core_marvel.c.
681 690
682 ip= [IP_PNP] 691 ip= [IP_PNP]
683 See Documentation/nfsroot.txt. 692 See Documentation/nfsroot.txt.
684 693
685 ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards 694 ip2= [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards
686 See comment before ip2_setup() in drivers/char/ip2.c. 695 See comment before ip2_setup() in drivers/char/ip2.c.
687 696
688 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller 697 ips= [HW,SCSI] Adaptec / IBM ServeRAID controller
689 See header of drivers/scsi/ips.c. 698 See header of drivers/scsi/ips.c.
690 699
691 irqfixup [HW] 700 irqfixup [HW]
692 When an interrupt is not handled search all handlers 701 When an interrupt is not handled search all handlers
693 for it. Intended to get systems with badly broken 702 for it. Intended to get systems with badly broken
694 firmware running. 703 firmware running.
695 704
696 irqpoll [HW] 705 irqpoll [HW]
697 When an interrupt is not handled search all handlers 706 When an interrupt is not handled search all handlers
698 for it. Also check all handlers each timer 707 for it. Also check all handlers each timer
699 interrupt. Intended to get systems with badly broken 708 interrupt. Intended to get systems with badly broken
700 firmware running. 709 firmware running.
701 710
702 isapnp= [ISAPNP] 711 isapnp= [ISAPNP]
703 Format: <RDP>,<reset>,<pci_scan>,<verbosity> 712 Format: <RDP>,<reset>,<pci_scan>,<verbosity>
704 713
705 isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler. 714 isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler.
706 Format: <cpu number>,...,<cpu number> 715 Format: <cpu number>,...,<cpu number>
707 This option can be used to specify one or more CPUs 716 This option can be used to specify one or more CPUs
708 to isolate from the general SMP balancing and scheduling 717 to isolate from the general SMP balancing and scheduling
709 algorithms. The only way to move a process onto or off 718 algorithms. The only way to move a process onto or off
710 an "isolated" CPU is via the CPU affinity syscalls. 719 an "isolated" CPU is via the CPU affinity syscalls.
711 <cpu number> begins at 0 and the maximum value is 720 <cpu number> begins at 0 and the maximum value is
712 "number of CPUs in system - 1". 721 "number of CPUs in system - 1".
713 722
714 This option is the preferred way to isolate CPUs. The 723 This option is the preferred way to isolate CPUs. The
715 alternative -- manually setting the CPU mask of all 724 alternative -- manually setting the CPU mask of all
716 tasks in the system -- can cause problems and 725 tasks in the system -- can cause problems and
717 suboptimal load balancer performance. 726 suboptimal load balancer performance.
718 727
719 isp16= [HW,CD] 728 isp16= [HW,CD]
720 Format: <io>,<irq>,<dma>,<setup> 729 Format: <io>,<irq>,<dma>,<setup>
721 730
722 iucv= [HW,NET] 731 iucv= [HW,NET]
723 732
724 js= [HW,JOY] Analog joystick 733 js= [HW,JOY] Analog joystick
725 See Documentation/input/joystick.txt. 734 See Documentation/input/joystick.txt.
726 735
727 keepinitrd [HW,ARM] 736 keepinitrd [HW,ARM]
728 737
729 kstack=N [IA-32,X86-64] Print N words from the kernel stack 738 kstack=N [IA-32,X86-64] Print N words from the kernel stack
730 in oops dumps. 739 in oops dumps.
731 740
732 l2cr= [PPC] 741 l2cr= [PPC]
733 742
734 lapic [IA-32,APIC] Enable the local APIC even if BIOS 743 lapic [IA-32,APIC] Enable the local APIC even if BIOS
735 disabled it. 744 disabled it.
736 745
737 lasi= [HW,SCSI] PARISC LASI driver for the 53c700 chip 746 lasi= [HW,SCSI] PARISC LASI driver for the 53c700 chip
738 Format: addr:<io>,irq:<irq> 747 Format: addr:<io>,irq:<irq>
739 748
740 llsc*= [IA64] See function print_params() in 749 llsc*= [IA64] See function print_params() in
741 arch/ia64/sn/kernel/llsc4.c. 750 arch/ia64/sn/kernel/llsc4.c.
742 751
743 load_ramdisk= [RAM] List of ramdisks to load from floppy 752 load_ramdisk= [RAM] List of ramdisks to load from floppy
744 See Documentation/ramdisk.txt. 753 See Documentation/ramdisk.txt.
745 754
746 lockd.nlm_grace_period=P [NFS] Assign grace period. 755 lockd.nlm_grace_period=P [NFS] Assign grace period.
747 Format: <integer> 756 Format: <integer>
748 757
749 lockd.nlm_tcpport=N [NFS] Assign TCP port. 758 lockd.nlm_tcpport=N [NFS] Assign TCP port.
750 Format: <integer> 759 Format: <integer>
751 760
752 lockd.nlm_timeout=T [NFS] Assign timeout value. 761 lockd.nlm_timeout=T [NFS] Assign timeout value.
753 Format: <integer> 762 Format: <integer>
754 763
755 lockd.nlm_udpport=M [NFS] Assign UDP port. 764 lockd.nlm_udpport=M [NFS] Assign UDP port.
756 Format: <integer> 765 Format: <integer>
757 766
758 logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver 767 logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver
759 Format: <irq> 768 Format: <irq>
760 769
761 loglevel= All Kernel Messages with a loglevel smaller than the 770 loglevel= All Kernel Messages with a loglevel smaller than the
762 console loglevel will be printed to the console. It can 771 console loglevel will be printed to the console. It can
763 also be changed with klogd or other programs. The 772 also be changed with klogd or other programs. The
764 loglevels are defined as follows: 773 loglevels are defined as follows:
765 774
766 0 (KERN_EMERG) system is unusable 775 0 (KERN_EMERG) system is unusable
767 1 (KERN_ALERT) action must be taken immediately 776 1 (KERN_ALERT) action must be taken immediately
768 2 (KERN_CRIT) critical conditions 777 2 (KERN_CRIT) critical conditions
769 3 (KERN_ERR) error conditions 778 3 (KERN_ERR) error conditions
770 4 (KERN_WARNING) warning conditions 779 4 (KERN_WARNING) warning conditions
771 5 (KERN_NOTICE) normal but significant condition 780 5 (KERN_NOTICE) normal but significant condition
772 6 (KERN_INFO) informational 781 6 (KERN_INFO) informational
773 7 (KERN_DEBUG) debug-level messages 782 7 (KERN_DEBUG) debug-level messages
774 783
775 log_buf_len=n Sets the size of the printk ring buffer, in bytes. 784 log_buf_len=n Sets the size of the printk ring buffer, in bytes.
776 Format: { n | nk | nM } 785 Format: { n | nk | nM }
777 n must be a power of two. The default size 786 n must be a power of two. The default size
778 is set in the kernel config file. 787 is set in the kernel config file.
779 788
780 lp=0 [LP] Specify parallel ports to use, e.g, 789 lp=0 [LP] Specify parallel ports to use, e.g,
781 lp=port[,port...] lp=none,parport0 (lp0 not configured, lp1 uses 790 lp=port[,port...] lp=none,parport0 (lp0 not configured, lp1 uses
782 lp=reset first parallel port). 'lp=0' disables the 791 lp=reset first parallel port). 'lp=0' disables the
783 lp=auto printer driver. 'lp=reset' (which can be 792 lp=auto printer driver. 'lp=reset' (which can be
784 specified in addition to the ports) causes 793 specified in addition to the ports) causes
785 attached printers to be reset. Using 794 attached printers to be reset. Using
786 lp=port1,port2,... specifies the parallel ports 795 lp=port1,port2,... specifies the parallel ports
787 to associate lp devices with, starting with 796 to associate lp devices with, starting with
788 lp0. A port specification may be 'none' to skip 797 lp0. A port specification may be 'none' to skip
789 that lp device, or a parport name such as 798 that lp device, or a parport name such as
790 'parport0'. Specifying 'lp=auto' instead of a 799 'parport0'. Specifying 'lp=auto' instead of a
791 port specification list means that device IDs 800 port specification list means that device IDs
792 from each port should be examined, to see if 801 from each port should be examined, to see if
793 an IEEE 1284-compliant printer is attached; if 802 an IEEE 1284-compliant printer is attached; if
794 so, the driver will manage that printer. 803 so, the driver will manage that printer.
795 See also header of drivers/char/lp.c. 804 See also header of drivers/char/lp.c.
796 805
797 lpj=n [KNL] 806 lpj=n [KNL]
798 Sets loops_per_jiffy to given constant, thus avoiding 807 Sets loops_per_jiffy to given constant, thus avoiding
799 time-consuming boot-time autodetection (up to 250 ms per 808 time-consuming boot-time autodetection (up to 250 ms per
800 CPU). 0 enables autodetection (default). To determine 809 CPU). 0 enables autodetection (default). To determine
801 the correct value for your kernel, boot with normal 810 the correct value for your kernel, boot with normal
802 autodetection and see what value is printed. Note that 811 autodetection and see what value is printed. Note that
803 on SMP systems the preset will be applied to all CPUs, 812 on SMP systems the preset will be applied to all CPUs,
804 which is likely to cause problems if your CPUs need 813 which is likely to cause problems if your CPUs need
805 significantly divergent settings. An incorrect value 814 significantly divergent settings. An incorrect value
806 will cause delays in the kernel to be wrong, leading to 815 will cause delays in the kernel to be wrong, leading to
807 unpredictable I/O errors and other breakage. Although 816 unpredictable I/O errors and other breakage. Although
808 unlikely, in the extreme case this might damage your 817 unlikely, in the extreme case this might damage your
809 hardware. 818 hardware.
810 819
811 ltpc= [NET] 820 ltpc= [NET]
812 Format: <io>,<irq>,<dma> 821 Format: <io>,<irq>,<dma>
813 822
814 mac5380= [HW,SCSI] Format: 823 mac5380= [HW,SCSI] Format:
815 <can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags> 824 <can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
816 825
817 mac53c9x= [HW,SCSI] Format: 826 mac53c9x= [HW,SCSI] Format:
818 <num_esps>,<disconnect>,<nosync>,<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags> 827 <num_esps>,<disconnect>,<nosync>,<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags>
819 828
820 machvec= [IA64] Force the use of a particular machine-vector 829 machvec= [IA64] Force the use of a particular machine-vector
821 (machvec) in a generic kernel. 830 (machvec) in a generic kernel.
822 Example: machvec=hpzx1_swiotlb 831 Example: machvec=hpzx1_swiotlb
823 832
824 mad16= [HW,OSS] Format: 833 mad16= [HW,OSS] Format:
825 <io>,<irq>,<dma>,<dma16>,<mpu_io>,<mpu_irq>,<joystick> 834 <io>,<irq>,<dma>,<dma16>,<mpu_io>,<mpu_irq>,<joystick>
826 835
827 maui= [HW,OSS] 836 maui= [HW,OSS]
828 Format: <io>,<irq> 837 Format: <io>,<irq>
829 838
830 max_loop= [LOOP] Maximum number of loopback devices that can 839 max_loop= [LOOP] Maximum number of loopback devices that can
831 be mounted 840 be mounted
832 Format: <1-256> 841 Format: <1-256>
833 842
834 maxcpus= [SMP] Maximum number of processors that an SMP kernel 843 maxcpus= [SMP] Maximum number of processors that an SMP kernel
835 should make use of 844 should make use of
836 845
837 max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or 846 max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or
838 equal to this physical address is ignored. 847 equal to this physical address is ignored.
839 848
840 max_luns= [SCSI] Maximum number of LUNs to probe. 849 max_luns= [SCSI] Maximum number of LUNs to probe.
841 Should be between 1 and 2^32-1. 850 Should be between 1 and 2^32-1.
842 851
843 max_report_luns= 852 max_report_luns=
844 [SCSI] Maximum number of LUNs received. 853 [SCSI] Maximum number of LUNs received.
845 Should be between 1 and 16384. 854 Should be between 1 and 16384.
846 855
847 mca-pentium [BUGS=IA-32] 856 mca-pentium [BUGS=IA-32]
848 857
849 mcatest= [IA-64] 858 mcatest= [IA-64]
850 859
851 mcd= [HW,CD] 860 mcd= [HW,CD]
852 Format: <port>,<irq>,<mitsumi_bug_93_wait> 861 Format: <port>,<irq>,<mitsumi_bug_93_wait>
853 862
854 mcdx= [HW,CD] 863 mcdx= [HW,CD]
855 864
856 mce [IA-32] Machine Check Exception 865 mce [IA-32] Machine Check Exception
857 866
858 md= [HW] RAID subsystems devices and level 867 md= [HW] RAID subsystems devices and level
859 See Documentation/md.txt. 868 See Documentation/md.txt.
860 869
861 mdacon= [MDA] 870 mdacon= [MDA]
862 Format: <first>,<last> 871 Format: <first>,<last>
863 Specifies range of consoles to be captured by the MDA. 872 Specifies range of consoles to be captured by the MDA.
864 873
865 mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory 874 mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory
866 Amount of memory to be used when the kernel is not able 875 Amount of memory to be used when the kernel is not able
867 to see the whole system memory or for test. 876 to see the whole system memory or for test.
868 [IA-32] Use together with memmap= to avoid physical 877 [IA-32] Use together with memmap= to avoid physical
869 address space collisions. Without memmap= PCI devices 878 address space collisions. Without memmap= PCI devices
870 could be placed at addresses belonging to unused RAM. 879 could be placed at addresses belonging to unused RAM.
871 880
872 mem=nopentium [BUGS=IA-32] Disable usage of 4MB pages for kernel 881 mem=nopentium [BUGS=IA-32] Disable usage of 4MB pages for kernel
873 memory. 882 memory.
874 883
875 memmap=exactmap [KNL,IA-32,X86_64] Enable setting of an exact 884 memmap=exactmap [KNL,IA-32,X86_64] Enable setting of an exact
876 E820 memory map, as specified by the user. 885 E820 memory map, as specified by the user.
877 Such memmap=exactmap lines can be constructed based on 886 Such memmap=exactmap lines can be constructed based on
878 BIOS output or other requirements. See the memmap=nn@ss 887 BIOS output or other requirements. See the memmap=nn@ss
879 option description. 888 option description.
880 889
881 memmap=nn[KMG]@ss[KMG] 890 memmap=nn[KMG]@ss[KMG]
882 [KNL] Force usage of a specific region of memory 891 [KNL] Force usage of a specific region of memory
883 Region of memory to be used, from ss to ss+nn. 892 Region of memory to be used, from ss to ss+nn.
884 893
885 memmap=nn[KMG]#ss[KMG] 894 memmap=nn[KMG]#ss[KMG]
886 [KNL,ACPI] Mark specific memory as ACPI data. 895 [KNL,ACPI] Mark specific memory as ACPI data.
887 Region of memory to be used, from ss to ss+nn. 896 Region of memory to be used, from ss to ss+nn.
888 897
889 memmap=nn[KMG]$ss[KMG] 898 memmap=nn[KMG]$ss[KMG]
890 [KNL,ACPI] Mark specific memory as reserved. 899 [KNL,ACPI] Mark specific memory as reserved.
891 Region of memory to be used, from ss to ss+nn. 900 Region of memory to be used, from ss to ss+nn.
892 901
893 meye.*= [HW] Set MotionEye Camera parameters 902 meye.*= [HW] Set MotionEye Camera parameters
894 See Documentation/video4linux/meye.txt. 903 See Documentation/video4linux/meye.txt.
895 904
896 mga= [HW,DRM] 905 mga= [HW,DRM]
897 906
898 migration_cost= 907 migration_cost=
899 [KNL,SMP] debug: override scheduler migration costs 908 [KNL,SMP] debug: override scheduler migration costs
900 Format: <level-1-usecs>,<level-2-usecs>,... 909 Format: <level-1-usecs>,<level-2-usecs>,...
901 This debugging option can be used to override the 910 This debugging option can be used to override the
902 default scheduler migration cost matrix. The numbers 911 default scheduler migration cost matrix. The numbers
903 are indexed by 'CPU domain distance'. 912 are indexed by 'CPU domain distance'.
904 E.g. migration_cost=1000,2000,3000 on an SMT NUMA 913 E.g. migration_cost=1000,2000,3000 on an SMT NUMA
905 box will set up an intra-core migration cost of 914 box will set up an intra-core migration cost of
906 1 msec, an inter-core migration cost of 2 msecs, 915 1 msec, an inter-core migration cost of 2 msecs,
907 and an inter-node migration cost of 3 msecs. 916 and an inter-node migration cost of 3 msecs.
908 917
909 WARNING: using the wrong values here can break 918 WARNING: using the wrong values here can break
910 scheduler performance, so it's only for scheduler 919 scheduler performance, so it's only for scheduler
911 development purposes, not production environments. 920 development purposes, not production environments.
912 921
913 migration_debug= 922 migration_debug=
914 [KNL,SMP] migration cost auto-detect verbosity 923 [KNL,SMP] migration cost auto-detect verbosity
915 Format=<0|1|2> 924 Format=<0|1|2>
916 If a system's migration matrix reported at bootup 925 If a system's migration matrix reported at bootup
917 seems erroneous then this option can be used to 926 seems erroneous then this option can be used to
918 increase verbosity of the detection process. 927 increase verbosity of the detection process.
919 We default to 0 (no extra messages), 1 will print 928 We default to 0 (no extra messages), 1 will print
920 some more information, and 2 will be really 929 some more information, and 2 will be really
921 verbose (probably only useful if you also have a 930 verbose (probably only useful if you also have a
922 serial console attached to the system). 931 serial console attached to the system).
923 932
924 migration_factor= 933 migration_factor=
925 [KNL,SMP] multiply/divide migration costs by a factor 934 [KNL,SMP] multiply/divide migration costs by a factor
926 Format=<percent> 935 Format=<percent>
927 This debug option can be used to proportionally 936 This debug option can be used to proportionally
928 increase or decrease the auto-detected migration 937 increase or decrease the auto-detected migration
929 costs for all entries of the migration matrix. 938 costs for all entries of the migration matrix.
930 E.g. migration_factor=150 will increase migration 939 E.g. migration_factor=150 will increase migration
931 costs by 50%. (and thus the scheduler will be less 940 costs by 50%. (and thus the scheduler will be less
932 eager migrating cache-hot tasks) 941 eager migrating cache-hot tasks)
933 migration_factor=80 will decrease migration costs 942 migration_factor=80 will decrease migration costs
934 by 20%. (thus the scheduler will be more eager to 943 by 20%. (thus the scheduler will be more eager to
935 migrate tasks) 944 migrate tasks)
936 945
937 WARNING: using the wrong values here can break 946 WARNING: using the wrong values here can break
938 scheduler performance, so it's only for scheduler 947 scheduler performance, so it's only for scheduler
939 development purposes, not production environments. 948 development purposes, not production environments.
940 949
941 mousedev.tap_time= 950 mousedev.tap_time=
942 [MOUSE] Maximum time between finger touching and 951 [MOUSE] Maximum time between finger touching and
943 leaving touchpad surface for touch to be considered 952 leaving touchpad surface for touch to be considered
944 a tap and be reported as a left button click (for 953 a tap and be reported as a left button click (for
945 touchpads working in absolute mode only). 954 touchpads working in absolute mode only).
946 Format: <msecs> 955 Format: <msecs>
947 mousedev.xres= [MOUSE] Horizontal screen resolution, used for devices 956 mousedev.xres= [MOUSE] Horizontal screen resolution, used for devices
948 reporting absolute coordinates, such as tablets 957 reporting absolute coordinates, such as tablets
949 mousedev.yres= [MOUSE] Vertical screen resolution, used for devices 958 mousedev.yres= [MOUSE] Vertical screen resolution, used for devices
950 reporting absolute coordinates, such as tablets 959 reporting absolute coordinates, such as tablets
951 960
952 mpu401= [HW,OSS] 961 mpu401= [HW,OSS]
953 Format: <io>,<irq> 962 Format: <io>,<irq>
954 963
955 MTD_Partition= [MTD] 964 MTD_Partition= [MTD]
956 Format: <name>,<region-number>,<size>,<offset> 965 Format: <name>,<region-number>,<size>,<offset>
957 966
958 MTD_Region= [MTD] Format: 967 MTD_Region= [MTD] Format:
959 <name>,<region-number>[,<base>,<size>,<buswidth>,<altbuswidth>] 968 <name>,<region-number>[,<base>,<size>,<buswidth>,<altbuswidth>]
960 969
961 mtdparts= [MTD] 970 mtdparts= [MTD]
962 See drivers/mtd/cmdline.c. 971 See drivers/mtd/cmdline.c.
963 972
964 mtouchusb.raw_coordinates= 973 mtouchusb.raw_coordinates=
965 [HW] Make the MicroTouch USB driver use raw coordinates 974 [HW] Make the MicroTouch USB driver use raw coordinates
966 ('y', default) or cooked coordinates ('n') 975 ('y', default) or cooked coordinates ('n')
967 976
968 n2= [NET] SDL Inc. RISCom/N2 synchronous serial card 977 n2= [NET] SDL Inc. RISCom/N2 synchronous serial card
969 978
970 NCR_D700= [HW,SCSI] 979 NCR_D700= [HW,SCSI]
971 See header of drivers/scsi/NCR_D700.c. 980 See header of drivers/scsi/NCR_D700.c.
972 981
973 ncr5380= [HW,SCSI] 982 ncr5380= [HW,SCSI]
974 983
975 ncr53c400= [HW,SCSI] 984 ncr53c400= [HW,SCSI]
976 985
977 ncr53c400a= [HW,SCSI] 986 ncr53c400a= [HW,SCSI]
978 987
979 ncr53c406a= [HW,SCSI] 988 ncr53c406a= [HW,SCSI]
980 989
981 ncr53c8xx= [HW,SCSI] 990 ncr53c8xx= [HW,SCSI]
982 991
983 netdev= [NET] Network devices parameters 992 netdev= [NET] Network devices parameters
984 Format: <irq>,<io>,<mem_start>,<mem_end>,<name> 993 Format: <irq>,<io>,<mem_start>,<mem_end>,<name>
985 Note that mem_start is often overloaded to mean 994 Note that mem_start is often overloaded to mean
986 something different and driver-specific. 995 something different and driver-specific.
987 This usage is only documented in each driver source 996 This usage is only documented in each driver source
988 file if at all. 997 file if at all.
989 998
990 nfsaddrs= [NFS] 999 nfsaddrs= [NFS]
991 See Documentation/nfsroot.txt. 1000 See Documentation/nfsroot.txt.
992 1001
993 nfsroot= [NFS] nfs root filesystem for disk-less boxes. 1002 nfsroot= [NFS] nfs root filesystem for disk-less boxes.
994 See Documentation/nfsroot.txt. 1003 See Documentation/nfsroot.txt.
995 1004
996 nfs.callback_tcpport= 1005 nfs.callback_tcpport=
997 [NFS] set the TCP port on which the NFSv4 callback 1006 [NFS] set the TCP port on which the NFSv4 callback
998 channel should listen. 1007 channel should listen.
999 1008
1000 nfs.idmap_cache_timeout= 1009 nfs.idmap_cache_timeout=
1001 [NFS] set the maximum lifetime for idmapper cache 1010 [NFS] set the maximum lifetime for idmapper cache
1002 entries. 1011 entries.
1003 1012
1004 nmi_watchdog= [KNL,BUGS=IA-32] Debugging features for SMP kernels 1013 nmi_watchdog= [KNL,BUGS=IA-32] Debugging features for SMP kernels
1005 1014
1006 no387 [BUGS=IA-32] Tells the kernel to use the 387 maths 1015 no387 [BUGS=IA-32] Tells the kernel to use the 387 maths
1007 emulation library even if a 387 maths coprocessor 1016 emulation library even if a 387 maths coprocessor
1008 is present. 1017 is present.
1009 1018
1010 noalign [KNL,ARM] 1019 noalign [KNL,ARM]
1011 1020
1012 noapic [SMP,APIC] Tells the kernel to not make use of any 1021 noapic [SMP,APIC] Tells the kernel to not make use of any
1013 IOAPICs that may be present in the system. 1022 IOAPICs that may be present in the system.
1014 1023
1015 noasync [HW,M68K] Disables async and sync negotiation for 1024 noasync [HW,M68K] Disables async and sync negotiation for
1016 all devices. 1025 all devices.
1017 1026
1018 nobats [PPC] Do not use BATs for mapping kernel lowmem 1027 nobats [PPC] Do not use BATs for mapping kernel lowmem
1019 on "Classic" PPC cores. 1028 on "Classic" PPC cores.
1020 1029
1021 nocache [ARM] 1030 nocache [ARM]
1022 1031
1023 nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects. 1032 nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects.
1024 1033
1025 noexec [IA-64] 1034 noexec [IA-64]
1026 1035
1027 noexec [IA-32,X86-64] 1036 noexec [IA-32,X86-64]
1028 noexec=on: enable non-executable mappings (default) 1037 noexec=on: enable non-executable mappings (default)
1029 noexec=off: disable nn-executable mappings 1038 noexec=off: disable nn-executable mappings
1030 1039
1031 nofxsr [BUGS=IA-32] Disables x86 floating point extended 1040 nofxsr [BUGS=IA-32] Disables x86 floating point extended
1032 register save and restore. The kernel will only save 1041 register save and restore. The kernel will only save
1033 legacy floating-point registers on task switch. 1042 legacy floating-point registers on task switch.
1034 1043
1035 nohlt [BUGS=ARM] 1044 nohlt [BUGS=ARM]
1036 1045
1037 no-hlt [BUGS=IA-32] Tells the kernel that the hlt 1046 no-hlt [BUGS=IA-32] Tells the kernel that the hlt
1038 instruction doesn't work correctly and not to 1047 instruction doesn't work correctly and not to
1039 use it. 1048 use it.
1040 1049
1041 nohalt [IA-64] Tells the kernel not to use the power saving 1050 nohalt [IA-64] Tells the kernel not to use the power saving
1042 function PAL_HALT_LIGHT when idle. This increases 1051 function PAL_HALT_LIGHT when idle. This increases
1043 power-consumption. On the positive side, it reduces 1052 power-consumption. On the positive side, it reduces
1044 interrupt wake-up latency, which may improve performance 1053 interrupt wake-up latency, which may improve performance
1045 in certain environments such as networked servers or 1054 in certain environments such as networked servers or
1046 real-time systems. 1055 real-time systems.
1047 1056
1048 noirqdebug [IA-32] Disables the code which attempts to detect and 1057 noirqdebug [IA-32] Disables the code which attempts to detect and
1049 disable unhandled interrupt sources. 1058 disable unhandled interrupt sources.
1050 1059
1051 noisapnp [ISAPNP] Disables ISA PnP code. 1060 noisapnp [ISAPNP] Disables ISA PnP code.
1052 1061
1053 noinitrd [RAM] Tells the kernel not to load any configured 1062 noinitrd [RAM] Tells the kernel not to load any configured
1054 initial RAM disk. 1063 initial RAM disk.
1055 1064
1056 nointroute [IA-64] 1065 nointroute [IA-64]
1057 1066
1058 nolapic [IA-32,APIC] Do not enable or use the local APIC. 1067 nolapic [IA-32,APIC] Do not enable or use the local APIC.
1059 1068
1060 noltlbs [PPC] Do not use large page/tlb entries for kernel 1069 noltlbs [PPC] Do not use large page/tlb entries for kernel
1061 lowmem mapping on PPC40x. 1070 lowmem mapping on PPC40x.
1062 1071
1063 nomca [IA-64] Disable machine check abort handling 1072 nomca [IA-64] Disable machine check abort handling
1064 1073
1065 nomce [IA-32] Machine Check Exception 1074 nomce [IA-32] Machine Check Exception
1066 1075
1067 noresidual [PPC] Don't use residual data on PReP machines. 1076 noresidual [PPC] Don't use residual data on PReP machines.
1068 1077
1069 noresume [SWSUSP] Disables resume and restores original swap 1078 noresume [SWSUSP] Disables resume and restores original swap
1070 space. 1079 space.
1071 1080
1072 no-scroll [VGA] Disables scrollback. 1081 no-scroll [VGA] Disables scrollback.
1073 This is required for the Braillex ib80-piezo Braille 1082 This is required for the Braillex ib80-piezo Braille
1074 reader made by F.H. Papenmeier (Germany). 1083 reader made by F.H. Papenmeier (Germany).
1075 1084
1076 nosbagart [IA-64] 1085 nosbagart [IA-64]
1077 1086
1078 nosep [BUGS=IA-32] Disables x86 SYSENTER/SYSEXIT support. 1087 nosep [BUGS=IA-32] Disables x86 SYSENTER/SYSEXIT support.
1079 1088
1080 nosmp [SMP] Tells an SMP kernel to act as a UP kernel. 1089 nosmp [SMP] Tells an SMP kernel to act as a UP kernel.
1081 1090
1082 nosync [HW,M68K] Disables sync negotiation for all devices. 1091 nosync [HW,M68K] Disables sync negotiation for all devices.
1083 1092
1084 notsc [BUGS=IA-32] Disable Time Stamp Counter 1093 notsc [BUGS=IA-32] Disable Time Stamp Counter
1085 1094
1086 nousb [USB] Disable the USB subsystem 1095 nousb [USB] Disable the USB subsystem
1087 1096
1088 nowb [ARM] 1097 nowb [ARM]
1089 1098
1090 nr_uarts= [SERIAL] maximum number of UARTs to be registered. 1099 nr_uarts= [SERIAL] maximum number of UARTs to be registered.
1091 1100
1092 opl3= [HW,OSS] 1101 opl3= [HW,OSS]
1093 Format: <io> 1102 Format: <io>
1094 1103
1095 opl3sa= [HW,OSS] 1104 opl3sa= [HW,OSS]
1096 Format: <io>,<irq>,<dma>,<dma2>,<mpu_io>,<mpu_irq> 1105 Format: <io>,<irq>,<dma>,<dma2>,<mpu_io>,<mpu_irq>
1097 1106
1098 opl3sa2= [HW,OSS] Format: 1107 opl3sa2= [HW,OSS] Format:
1099 <io>,<irq>,<dma>,<dma2>,<mss_io>,<mpu_io>,<ymode>,<loopback>[,<isapnp>,<multiple] 1108 <io>,<irq>,<dma>,<dma2>,<mss_io>,<mpu_io>,<ymode>,<loopback>[,<isapnp>,<multiple]
1100 1109
1101 oprofile.timer= [HW] 1110 oprofile.timer= [HW]
1102 Use timer interrupt instead of performance counters 1111 Use timer interrupt instead of performance counters
1103 1112
1104 optcd= [HW,CD] 1113 optcd= [HW,CD]
1105 Format: <io> 1114 Format: <io>
1106 1115
1107 osst= [HW,SCSI] SCSI Tape Driver 1116 osst= [HW,SCSI] SCSI Tape Driver
1108 Format: <buffer_size>,<write_threshold> 1117 Format: <buffer_size>,<write_threshold>
1109 See also Documentation/scsi/st.txt. 1118 See also Documentation/scsi/st.txt.
1110 1119
1111 panic= [KNL] Kernel behaviour on panic 1120 panic= [KNL] Kernel behaviour on panic
1112 Format: <timeout> 1121 Format: <timeout>
1113 1122
1114 parkbd.port= [HW] Parallel port number the keyboard adapter is 1123 parkbd.port= [HW] Parallel port number the keyboard adapter is
1115 connected to, default is 0. 1124 connected to, default is 0.
1116 Format: <parport#> 1125 Format: <parport#>
1117 parkbd.mode= [HW] Parallel port keyboard adapter mode of operation, 1126 parkbd.mode= [HW] Parallel port keyboard adapter mode of operation,
1118 0 for XT, 1 for AT (default is AT). 1127 0 for XT, 1 for AT (default is AT).
1119 Format: <mode> 1128 Format: <mode>
1120 1129
1121 parport= [HW,PPT] Specify parallel ports. 0 disables. 1130 parport= [HW,PPT] Specify parallel ports. 0 disables.
1122 Format: { 0 | auto | 0xBBB[,IRQ[,DMA]] } 1131 Format: { 0 | auto | 0xBBB[,IRQ[,DMA]] }
1123 Use 'auto' to force the driver to use any 1132 Use 'auto' to force the driver to use any
1124 IRQ/DMA settings detected (the default is to 1133 IRQ/DMA settings detected (the default is to
1125 ignore detected IRQ/DMA settings because of 1134 ignore detected IRQ/DMA settings because of
1126 possible conflicts). You can specify the base 1135 possible conflicts). You can specify the base
1127 address, IRQ, and DMA settings; IRQ and DMA 1136 address, IRQ, and DMA settings; IRQ and DMA
1128 should be numbers, or 'auto' (for using detected 1137 should be numbers, or 'auto' (for using detected
1129 settings on that particular port), or 'nofifo' 1138 settings on that particular port), or 'nofifo'
1130 (to avoid using a FIFO even if it is detected). 1139 (to avoid using a FIFO even if it is detected).
1131 Parallel ports are assigned in the order they 1140 Parallel ports are assigned in the order they
1132 are specified on the command line, starting 1141 are specified on the command line, starting
1133 with parport0. 1142 with parport0.
1134 1143
1135 parport_init_mode= [HW,PPT] 1144 parport_init_mode= [HW,PPT]
1136 Configure VIA parallel port to operate in 1145 Configure VIA parallel port to operate in
1137 a specific mode. This is necessary on Pegasos 1146 a specific mode. This is necessary on Pegasos
1138 computer where firmware has no options for setting 1147 computer where firmware has no options for setting
1139 up parallel port mode and sets it to spp. 1148 up parallel port mode and sets it to spp.
1140 Currently this function knows 686a and 8231 chips. 1149 Currently this function knows 686a and 8231 chips.
1141 Format: [spp|ps2|epp|ecp|ecpepp] 1150 Format: [spp|ps2|epp|ecp|ecpepp]
1142 1151
1143 pas2= [HW,OSS] Format: 1152 pas2= [HW,OSS] Format:
1144 <io>,<irq>,<dma>,<dma16>,<sb_io>,<sb_irq>,<sb_dma>,<sb_dma16> 1153 <io>,<irq>,<dma>,<dma16>,<sb_io>,<sb_irq>,<sb_dma>,<sb_dma16>
1145 1154
1146 pas16= [HW,SCSI] 1155 pas16= [HW,SCSI]
1147 See header of drivers/scsi/pas16.c. 1156 See header of drivers/scsi/pas16.c.
1148 1157
1149 pause_on_oops= 1158 pause_on_oops=
1150 Halt all CPUs after the first oops has been printed for 1159 Halt all CPUs after the first oops has been printed for
1151 the specified number of seconds. This is to be used if 1160 the specified number of seconds. This is to be used if
1152 your oopses keep scrolling off the screen. 1161 your oopses keep scrolling off the screen.
1153 1162
1154 pcbit= [HW,ISDN] 1163 pcbit= [HW,ISDN]
1155 1164
1156 pcd. [PARIDE] 1165 pcd. [PARIDE]
1157 See header of drivers/block/paride/pcd.c. 1166 See header of drivers/block/paride/pcd.c.
1158 See also Documentation/paride.txt. 1167 See also Documentation/paride.txt.
1159 1168
1160 pci=option[,option...] [PCI] various PCI subsystem options: 1169 pci=option[,option...] [PCI] various PCI subsystem options:
1161 off [IA-32] don't probe for the PCI bus 1170 off [IA-32] don't probe for the PCI bus
1162 bios [IA-32] force use of PCI BIOS, don't access 1171 bios [IA-32] force use of PCI BIOS, don't access
1163 the hardware directly. Use this if your machine 1172 the hardware directly. Use this if your machine
1164 has a non-standard PCI host bridge. 1173 has a non-standard PCI host bridge.
1165 nobios [IA-32] disallow use of PCI BIOS, only direct 1174 nobios [IA-32] disallow use of PCI BIOS, only direct
1166 hardware access methods are allowed. Use this 1175 hardware access methods are allowed. Use this
1167 if you experience crashes upon bootup and you 1176 if you experience crashes upon bootup and you
1168 suspect they are caused by the BIOS. 1177 suspect they are caused by the BIOS.
1169 conf1 [IA-32] Force use of PCI Configuration 1178 conf1 [IA-32] Force use of PCI Configuration
1170 Mechanism 1. 1179 Mechanism 1.
1171 conf2 [IA-32] Force use of PCI Configuration 1180 conf2 [IA-32] Force use of PCI Configuration
1172 Mechanism 2. 1181 Mechanism 2.
1173 nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI 1182 nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI
1174 Configuration 1183 Configuration
1175 nomsi [MSI] If the PCI_MSI kernel config parameter is 1184 nomsi [MSI] If the PCI_MSI kernel config parameter is
1176 enabled, this kernel boot option can be used to 1185 enabled, this kernel boot option can be used to
1177 disable the use of MSI interrupts system-wide. 1186 disable the use of MSI interrupts system-wide.
1178 nosort [IA-32] Don't sort PCI devices according to 1187 nosort [IA-32] Don't sort PCI devices according to
1179 order given by the PCI BIOS. This sorting is 1188 order given by the PCI BIOS. This sorting is
1180 done to get a device order compatible with 1189 done to get a device order compatible with
1181 older kernels. 1190 older kernels.
1182 biosirq [IA-32] Use PCI BIOS calls to get the interrupt 1191 biosirq [IA-32] Use PCI BIOS calls to get the interrupt
1183 routing table. These calls are known to be buggy 1192 routing table. These calls are known to be buggy
1184 on several machines and they hang the machine 1193 on several machines and they hang the machine
1185 when used, but on other computers it's the only 1194 when used, but on other computers it's the only
1186 way to get the interrupt routing table. Try 1195 way to get the interrupt routing table. Try
1187 this option if the kernel is unable to allocate 1196 this option if the kernel is unable to allocate
1188 IRQs or discover secondary PCI buses on your 1197 IRQs or discover secondary PCI buses on your
1189 motherboard. 1198 motherboard.
1190 rom [IA-32] Assign address space to expansion ROMs. 1199 rom [IA-32] Assign address space to expansion ROMs.
1191 Use with caution as certain devices share 1200 Use with caution as certain devices share
1192 address decoders between ROMs and other 1201 address decoders between ROMs and other
1193 resources. 1202 resources.
1194 irqmask=0xMMMM [IA-32] Set a bit mask of IRQs allowed to be 1203 irqmask=0xMMMM [IA-32] Set a bit mask of IRQs allowed to be
1195 assigned automatically to PCI devices. You can 1204 assigned automatically to PCI devices. You can
1196 make the kernel exclude IRQs of your ISA cards 1205 make the kernel exclude IRQs of your ISA cards
1197 this way. 1206 this way.
1198 pirqaddr=0xAAAAA [IA-32] Specify the physical address 1207 pirqaddr=0xAAAAA [IA-32] Specify the physical address
1199 of the PIRQ table (normally generated 1208 of the PIRQ table (normally generated
1200 by the BIOS) if it is outside the 1209 by the BIOS) if it is outside the
1201 F0000h-100000h range. 1210 F0000h-100000h range.
1202 lastbus=N [IA-32] Scan all buses thru bus #N. Can be 1211 lastbus=N [IA-32] Scan all buses thru bus #N. Can be
1203 useful if the kernel is unable to find your 1212 useful if the kernel is unable to find your
1204 secondary buses and you want to tell it 1213 secondary buses and you want to tell it
1205 explicitly which ones they are. 1214 explicitly which ones they are.
1206 assign-busses [IA-32] Always assign all PCI bus 1215 assign-busses [IA-32] Always assign all PCI bus
1207 numbers ourselves, overriding 1216 numbers ourselves, overriding
1208 whatever the firmware may have done. 1217 whatever the firmware may have done.
1209 usepirqmask [IA-32] Honor the possible IRQ mask stored 1218 usepirqmask [IA-32] Honor the possible IRQ mask stored
1210 in the BIOS $PIR table. This is needed on 1219 in the BIOS $PIR table. This is needed on
1211 some systems with broken BIOSes, notably 1220 some systems with broken BIOSes, notably
1212 some HP Pavilion N5400 and Omnibook XE3 1221 some HP Pavilion N5400 and Omnibook XE3
1213 notebooks. This will have no effect if ACPI 1222 notebooks. This will have no effect if ACPI
1214 IRQ routing is enabled. 1223 IRQ routing is enabled.
1215 noacpi [IA-32] Do not use ACPI for IRQ routing 1224 noacpi [IA-32] Do not use ACPI for IRQ routing
1216 or for PCI scanning. 1225 or for PCI scanning.
1217 routeirq Do IRQ routing for all PCI devices. 1226 routeirq Do IRQ routing for all PCI devices.
1218 This is normally done in pci_enable_device(), 1227 This is normally done in pci_enable_device(),
1219 so this option is a temporary workaround 1228 so this option is a temporary workaround
1220 for broken drivers that don't call it. 1229 for broken drivers that don't call it.
1221 firmware [ARM] Do not re-enumerate the bus but instead 1230 firmware [ARM] Do not re-enumerate the bus but instead
1222 just use the configuration from the 1231 just use the configuration from the
1223 bootloader. This is currently used on 1232 bootloader. This is currently used on
1224 IXP2000 systems where the bus has to be 1233 IXP2000 systems where the bus has to be
1225 configured a certain way for adjunct CPUs. 1234 configured a certain way for adjunct CPUs.
1226 1235
1227 pcmv= [HW,PCMCIA] BadgePAD 4 1236 pcmv= [HW,PCMCIA] BadgePAD 4
1228 1237
1229 pd. [PARIDE] 1238 pd. [PARIDE]
1230 See Documentation/paride.txt. 1239 See Documentation/paride.txt.
1231 1240
1232 pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at 1241 pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at
1233 boot time. 1242 boot time.
1234 Format: { 0 | 1 } 1243 Format: { 0 | 1 }
1235 See arch/parisc/kernel/pdc_chassis.c 1244 See arch/parisc/kernel/pdc_chassis.c
1236 1245
1237 pf. [PARIDE] 1246 pf. [PARIDE]
1238 See Documentation/paride.txt. 1247 See Documentation/paride.txt.
1239 1248
1240 pg. [PARIDE] 1249 pg. [PARIDE]
1241 See Documentation/paride.txt. 1250 See Documentation/paride.txt.
1242 1251
1243 pirq= [SMP,APIC] Manual mp-table setup 1252 pirq= [SMP,APIC] Manual mp-table setup
1244 See Documentation/i386/IO-APIC.txt. 1253 See Documentation/i386/IO-APIC.txt.
1245 1254
1246 plip= [PPT,NET] Parallel port network link 1255 plip= [PPT,NET] Parallel port network link
1247 Format: { parport<nr> | timid | 0 } 1256 Format: { parport<nr> | timid | 0 }
1248 See also Documentation/parport.txt. 1257 See also Documentation/parport.txt.
1249 1258
1250 pnpacpi= [ACPI] 1259 pnpacpi= [ACPI]
1251 { off } 1260 { off }
1252 1261
1253 pnpbios= [ISAPNP] 1262 pnpbios= [ISAPNP]
1254 { on | off | curr | res | no-curr | no-res } 1263 { on | off | curr | res | no-curr | no-res }
1255 1264
1256 pnp_reserve_irq= 1265 pnp_reserve_irq=
1257 [ISAPNP] Exclude IRQs for the autoconfiguration 1266 [ISAPNP] Exclude IRQs for the autoconfiguration
1258 1267
1259 pnp_reserve_dma= 1268 pnp_reserve_dma=
1260 [ISAPNP] Exclude DMAs for the autoconfiguration 1269 [ISAPNP] Exclude DMAs for the autoconfiguration
1261 1270
1262 pnp_reserve_io= [ISAPNP] Exclude I/O ports for the autoconfiguration 1271 pnp_reserve_io= [ISAPNP] Exclude I/O ports for the autoconfiguration
1263 Ranges are in pairs (I/O port base and size). 1272 Ranges are in pairs (I/O port base and size).
1264 1273
1265 pnp_reserve_mem= 1274 pnp_reserve_mem=
1266 [ISAPNP] Exclude memory regions for the 1275 [ISAPNP] Exclude memory regions for the
1267 autoconfiguration. 1276 autoconfiguration.
1268 Ranges are in pairs (memory base and size). 1277 Ranges are in pairs (memory base and size).
1269 1278
1270 profile= [KNL] Enable kernel profiling via /proc/profile 1279 profile= [KNL] Enable kernel profiling via /proc/profile
1271 Format: [schedule,]<number> 1280 Format: [schedule,]<number>
1272 Param: "schedule" - profile schedule points. 1281 Param: "schedule" - profile schedule points.
1273 Param: <number> - step/bucket size as a power of 2 for 1282 Param: <number> - step/bucket size as a power of 2 for
1274 statistical time based profiling. 1283 statistical time based profiling.
1275 1284
1276 processor.max_cstate= [HW,ACPI] 1285 processor.max_cstate= [HW,ACPI]
1277 Limit processor to maximum C-state 1286 Limit processor to maximum C-state
1278 max_cstate=9 overrides any DMI blacklist limit. 1287 max_cstate=9 overrides any DMI blacklist limit.
1279 1288
1280 processor.nocst [HW,ACPI] 1289 processor.nocst [HW,ACPI]
1281 Ignore the _CST method to determine C-states, 1290 Ignore the _CST method to determine C-states,
1282 instead using the legacy FADT method 1291 instead using the legacy FADT method
1283 1292
1284 prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk 1293 prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk
1285 before loading. 1294 before loading.
1286 See Documentation/ramdisk.txt. 1295 See Documentation/ramdisk.txt.
1287 1296
1288 psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to 1297 psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to
1289 probe for; one of (bare|imps|exps|lifebook|any). 1298 probe for; one of (bare|imps|exps|lifebook|any).
1290 psmouse.rate= [HW,MOUSE] Set desired mouse report rate, in reports 1299 psmouse.rate= [HW,MOUSE] Set desired mouse report rate, in reports
1291 per second. 1300 per second.
1292 psmouse.resetafter= [HW,MOUSE] 1301 psmouse.resetafter= [HW,MOUSE]
1293 Try to reset the device after so many bad packets 1302 Try to reset the device after so many bad packets
1294 (0 = never). 1303 (0 = never).
1295 psmouse.resolution= 1304 psmouse.resolution=
1296 [HW,MOUSE] Set desired mouse resolution, in dpi. 1305 [HW,MOUSE] Set desired mouse resolution, in dpi.
1297 psmouse.smartscroll= 1306 psmouse.smartscroll=
1298 [HW,MOUSE] Controls Logitech smartscroll autorepeat. 1307 [HW,MOUSE] Controls Logitech smartscroll autorepeat.
1299 0 = disabled, 1 = enabled (default). 1308 0 = disabled, 1 = enabled (default).
1300 1309
1301 pss= [HW,OSS] Personal Sound System (ECHO ESC614) 1310 pss= [HW,OSS] Personal Sound System (ECHO ESC614)
1302 Format: 1311 Format:
1303 <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq> 1312 <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
1304 1313
1305 pt. [PARIDE] 1314 pt. [PARIDE]
1306 See Documentation/paride.txt. 1315 See Documentation/paride.txt.
1307 1316
1308 quiet= [KNL] Disable log messages 1317 quiet= [KNL] Disable log messages
1309 1318
1310 r128= [HW,DRM] 1319 r128= [HW,DRM]
1311 1320
1312 raid= [HW,RAID] 1321 raid= [HW,RAID]
1313 See Documentation/md.txt. 1322 See Documentation/md.txt.
1314 1323
1315 ramdisk= [RAM] Sizes of RAM disks in kilobytes [deprecated] 1324 ramdisk= [RAM] Sizes of RAM disks in kilobytes [deprecated]
1316 See Documentation/ramdisk.txt. 1325 See Documentation/ramdisk.txt.
1317 1326
1318 ramdisk_blocksize= [RAM] 1327 ramdisk_blocksize= [RAM]
1319 See Documentation/ramdisk.txt. 1328 See Documentation/ramdisk.txt.
1320 1329
1321 ramdisk_size= [RAM] Sizes of RAM disks in kilobytes 1330 ramdisk_size= [RAM] Sizes of RAM disks in kilobytes
1322 New name for the ramdisk parameter. 1331 New name for the ramdisk parameter.
1323 See Documentation/ramdisk.txt. 1332 See Documentation/ramdisk.txt.
1324 1333
1325 rcu.blimit= [KNL,BOOT] Set maximum number of finished 1334 rcu.blimit= [KNL,BOOT] Set maximum number of finished
1326 RCU callbacks to process in one batch. 1335 RCU callbacks to process in one batch.
1327 1336
1328 rcu.qhimark= [KNL,BOOT] Set threshold of queued 1337 rcu.qhimark= [KNL,BOOT] Set threshold of queued
1329 RCU callbacks over which batch limiting is disabled. 1338 RCU callbacks over which batch limiting is disabled.
1330 1339
1331 rcu.qlowmark= [KNL,BOOT] Set threshold of queued 1340 rcu.qlowmark= [KNL,BOOT] Set threshold of queued
1332 RCU callbacks below which batch limiting is re-enabled. 1341 RCU callbacks below which batch limiting is re-enabled.
1333 1342
1334 rcu.rsinterval= [KNL,BOOT,SMP] Set the number of additional 1343 rcu.rsinterval= [KNL,BOOT,SMP] Set the number of additional
1335 RCU callbacks to queued before forcing reschedule 1344 RCU callbacks to queued before forcing reschedule
1336 on all cpus. 1345 on all cpus.
1337 1346
1338 rdinit= [KNL] 1347 rdinit= [KNL]
1339 Format: <full_path> 1348 Format: <full_path>
1340 Run specified binary instead of /init from the ramdisk, 1349 Run specified binary instead of /init from the ramdisk,
1341 used for early userspace startup. See initrd. 1350 used for early userspace startup. See initrd.
1342 1351
1343 reboot= [BUGS=IA-32,BUGS=ARM,BUGS=IA-64] Rebooting mode 1352 reboot= [BUGS=IA-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
1344 Format: <reboot_mode>[,<reboot_mode2>[,...]] 1353 Format: <reboot_mode>[,<reboot_mode2>[,...]]
1345 See arch/*/kernel/reboot.c. 1354 See arch/*/kernel/reboot.c.
1346 1355
1347 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area 1356 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
1348 1357
1349 resume= [SWSUSP] 1358 resume= [SWSUSP]
1350 Specify the partition device for software suspend 1359 Specify the partition device for software suspend
1351 1360
1352 rhash_entries= [KNL,NET] 1361 rhash_entries= [KNL,NET]
1353 Set number of hash buckets for route cache 1362 Set number of hash buckets for route cache
1354 1363
1355 riscom8= [HW,SERIAL] 1364 riscom8= [HW,SERIAL]
1356 Format: <io_board1>[,<io_board2>[,...<io_boardN>]] 1365 Format: <io_board1>[,<io_board2>[,...<io_boardN>]]
1357 1366
1358 ro [KNL] Mount root device read-only on boot 1367 ro [KNL] Mount root device read-only on boot
1359 1368
1360 root= [KNL] Root filesystem 1369 root= [KNL] Root filesystem
1361 1370
1362 rootdelay= [KNL] Delay (in seconds) to pause before attempting to 1371 rootdelay= [KNL] Delay (in seconds) to pause before attempting to
1363 mount the root filesystem 1372 mount the root filesystem
1364 1373
1365 rootflags= [KNL] Set root filesystem mount option string 1374 rootflags= [KNL] Set root filesystem mount option string
1366 1375
1367 rootfstype= [KNL] Set root filesystem type 1376 rootfstype= [KNL] Set root filesystem type
1368 1377
1369 rw [KNL] Mount root device read-write on boot 1378 rw [KNL] Mount root device read-write on boot
1370 1379
1371 S [KNL] Run init in single mode 1380 S [KNL] Run init in single mode
1372 1381
1373 sa1100ir [NET] 1382 sa1100ir [NET]
1374 See drivers/net/irda/sa1100_ir.c. 1383 See drivers/net/irda/sa1100_ir.c.
1375 1384
1376 sb= [HW,OSS] 1385 sb= [HW,OSS]
1377 Format: <io>,<irq>,<dma>,<dma2> 1386 Format: <io>,<irq>,<dma>,<dma2>
1378 1387
1379 sbni= [NET] Granch SBNI12 leased line adapter 1388 sbni= [NET] Granch SBNI12 leased line adapter
1380 1389
1381 sbpcd= [HW,CD] Soundblaster CD adapter 1390 sbpcd= [HW,CD] Soundblaster CD adapter
1382 Format: <io>,<type> 1391 Format: <io>,<type>
1383 See a comment before function sbpcd_setup() in 1392 See a comment before function sbpcd_setup() in
1384 drivers/cdrom/sbpcd.c. 1393 drivers/cdrom/sbpcd.c.
1385 1394
1386 sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver 1395 sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver
1387 Format: <io>[,<timeout>[,<isapnp>]] 1396 Format: <io>[,<timeout>[,<isapnp>]]
1388 1397
1389 scsi_debug_*= [SCSI] 1398 scsi_debug_*= [SCSI]
1390 See drivers/scsi/scsi_debug.c. 1399 See drivers/scsi/scsi_debug.c.
1391 1400
1392 scsi_default_dev_flags= 1401 scsi_default_dev_flags=
1393 [SCSI] SCSI default device flags 1402 [SCSI] SCSI default device flags
1394 Format: <integer> 1403 Format: <integer>
1395 1404
1396 scsi_dev_flags= [SCSI] Black/white list entry for vendor and model 1405 scsi_dev_flags= [SCSI] Black/white list entry for vendor and model
1397 Format: <vendor>:<model>:<flags> 1406 Format: <vendor>:<model>:<flags>
1398 (flags are integer value) 1407 (flags are integer value)
1399 1408
1400 scsi_logging= [SCSI] 1409 scsi_logging= [SCSI]
1401 1410
1402 selinux [SELINUX] Disable or enable SELinux at boot time. 1411 selinux [SELINUX] Disable or enable SELinux at boot time.
1403 Format: { "0" | "1" } 1412 Format: { "0" | "1" }
1404 See security/selinux/Kconfig help text. 1413 See security/selinux/Kconfig help text.
1405 0 -- disable. 1414 0 -- disable.
1406 1 -- enable. 1415 1 -- enable.
1407 Default value is set via kernel config option. 1416 Default value is set via kernel config option.
1408 If enabled at boot time, /selinux/disable can be used 1417 If enabled at boot time, /selinux/disable can be used
1409 later to disable prior to initial policy load. 1418 later to disable prior to initial policy load.
1410 1419
1411 selinux_compat_net = 1420 selinux_compat_net =
1412 [SELINUX] Set initial selinux_compat_net flag value. 1421 [SELINUX] Set initial selinux_compat_net flag value.
1413 Format: { "0" | "1" } 1422 Format: { "0" | "1" }
1414 0 -- use new secmark-based packet controls 1423 0 -- use new secmark-based packet controls
1415 1 -- use legacy packet controls 1424 1 -- use legacy packet controls
1416 Default value is 0 (preferred). 1425 Default value is 0 (preferred).
1417 Value can be changed at runtime via 1426 Value can be changed at runtime via
1418 /selinux/compat_net. 1427 /selinux/compat_net.
1419 1428
1420 serialnumber [BUGS=IA-32] 1429 serialnumber [BUGS=IA-32]
1421 1430
1422 sg_def_reserved_size= [SCSI] 1431 sg_def_reserved_size= [SCSI]
1423 1432
1424 sgalaxy= [HW,OSS] 1433 sgalaxy= [HW,OSS]
1425 Format: <io>,<irq>,<dma>,<dma2>,<sgbase> 1434 Format: <io>,<irq>,<dma>,<dma2>,<sgbase>
1426 1435
1427 shapers= [NET] 1436 shapers= [NET]
1428 Maximal number of shapers. 1437 Maximal number of shapers.
1429 1438
1430 sim710= [SCSI,HW] 1439 sim710= [SCSI,HW]
1431 See header of drivers/scsi/sim710.c. 1440 See header of drivers/scsi/sim710.c.
1432 1441
1433 simeth= [IA-64] 1442 simeth= [IA-64]
1434 simscsi= 1443 simscsi=
1435 1444
1436 sjcd= [HW,CD] 1445 sjcd= [HW,CD]
1437 Format: <io>,<irq>,<dma> 1446 Format: <io>,<irq>,<dma>
1438 See header of drivers/cdrom/sjcd.c. 1447 See header of drivers/cdrom/sjcd.c.
1439 1448
1440 slram= [HW,MTD] 1449 slram= [HW,MTD]
1441 1450
1442 smart2= [HW] 1451 smart2= [HW]
1443 Format: <io1>[,<io2>[,...,<io8>]] 1452 Format: <io1>[,<io2>[,...,<io8>]]
1444 1453
1445 snd-ad1816a= [HW,ALSA] 1454 snd-ad1816a= [HW,ALSA]
1446 1455
1447 snd-ad1848= [HW,ALSA] 1456 snd-ad1848= [HW,ALSA]
1448 1457
1449 snd-ali5451= [HW,ALSA] 1458 snd-ali5451= [HW,ALSA]
1450 1459
1451 snd-als100= [HW,ALSA] 1460 snd-als100= [HW,ALSA]
1452 1461
1453 snd-als4000= [HW,ALSA] 1462 snd-als4000= [HW,ALSA]
1454 1463
1455 snd-azt2320= [HW,ALSA] 1464 snd-azt2320= [HW,ALSA]
1456 1465
1457 snd-cmi8330= [HW,ALSA] 1466 snd-cmi8330= [HW,ALSA]
1458 1467
1459 snd-cmipci= [HW,ALSA] 1468 snd-cmipci= [HW,ALSA]
1460 1469
1461 snd-cs4231= [HW,ALSA] 1470 snd-cs4231= [HW,ALSA]
1462 1471
1463 snd-cs4232= [HW,ALSA] 1472 snd-cs4232= [HW,ALSA]
1464 1473
1465 snd-cs4236= [HW,ALSA] 1474 snd-cs4236= [HW,ALSA]
1466 1475
1467 snd-cs4281= [HW,ALSA] 1476 snd-cs4281= [HW,ALSA]
1468 1477
1469 snd-cs46xx= [HW,ALSA] 1478 snd-cs46xx= [HW,ALSA]
1470 1479
1471 snd-dt019x= [HW,ALSA] 1480 snd-dt019x= [HW,ALSA]
1472 1481
1473 snd-dummy= [HW,ALSA] 1482 snd-dummy= [HW,ALSA]
1474 1483
1475 snd-emu10k1= [HW,ALSA] 1484 snd-emu10k1= [HW,ALSA]
1476 1485
1477 snd-ens1370= [HW,ALSA] 1486 snd-ens1370= [HW,ALSA]
1478 1487
1479 snd-ens1371= [HW,ALSA] 1488 snd-ens1371= [HW,ALSA]
1480 1489
1481 snd-es968= [HW,ALSA] 1490 snd-es968= [HW,ALSA]
1482 1491
1483 snd-es1688= [HW,ALSA] 1492 snd-es1688= [HW,ALSA]
1484 1493
1485 snd-es18xx= [HW,ALSA] 1494 snd-es18xx= [HW,ALSA]
1486 1495
1487 snd-es1938= [HW,ALSA] 1496 snd-es1938= [HW,ALSA]
1488 1497
1489 snd-es1968= [HW,ALSA] 1498 snd-es1968= [HW,ALSA]
1490 1499
1491 snd-fm801= [HW,ALSA] 1500 snd-fm801= [HW,ALSA]
1492 1501
1493 snd-gusclassic= [HW,ALSA] 1502 snd-gusclassic= [HW,ALSA]
1494 1503
1495 snd-gusextreme= [HW,ALSA] 1504 snd-gusextreme= [HW,ALSA]
1496 1505
1497 snd-gusmax= [HW,ALSA] 1506 snd-gusmax= [HW,ALSA]
1498 1507
1499 snd-hdsp= [HW,ALSA] 1508 snd-hdsp= [HW,ALSA]
1500 1509
1501 snd-ice1712= [HW,ALSA] 1510 snd-ice1712= [HW,ALSA]
1502 1511
1503 snd-intel8x0= [HW,ALSA] 1512 snd-intel8x0= [HW,ALSA]
1504 1513
1505 snd-interwave= [HW,ALSA] 1514 snd-interwave= [HW,ALSA]
1506 1515
1507 snd-interwave-stb= 1516 snd-interwave-stb=
1508 [HW,ALSA] 1517 [HW,ALSA]
1509 1518
1510 snd-korg1212= [HW,ALSA] 1519 snd-korg1212= [HW,ALSA]
1511 1520
1512 snd-maestro3= [HW,ALSA] 1521 snd-maestro3= [HW,ALSA]
1513 1522
1514 snd-mpu401= [HW,ALSA] 1523 snd-mpu401= [HW,ALSA]
1515 1524
1516 snd-mtpav= [HW,ALSA] 1525 snd-mtpav= [HW,ALSA]
1517 1526
1518 snd-nm256= [HW,ALSA] 1527 snd-nm256= [HW,ALSA]
1519 1528
1520 snd-opl3sa2= [HW,ALSA] 1529 snd-opl3sa2= [HW,ALSA]
1521 1530
1522 snd-opti92x-ad1848= 1531 snd-opti92x-ad1848=
1523 [HW,ALSA] 1532 [HW,ALSA]
1524 1533
1525 snd-opti92x-cs4231= 1534 snd-opti92x-cs4231=
1526 [HW,ALSA] 1535 [HW,ALSA]
1527 1536
1528 snd-opti93x= [HW,ALSA] 1537 snd-opti93x= [HW,ALSA]
1529 1538
1530 snd-pmac= [HW,ALSA] 1539 snd-pmac= [HW,ALSA]
1531 1540
1532 snd-rme32= [HW,ALSA] 1541 snd-rme32= [HW,ALSA]
1533 1542
1534 snd-rme96= [HW,ALSA] 1543 snd-rme96= [HW,ALSA]
1535 1544
1536 snd-rme9652= [HW,ALSA] 1545 snd-rme9652= [HW,ALSA]
1537 1546
1538 snd-sb8= [HW,ALSA] 1547 snd-sb8= [HW,ALSA]
1539 1548
1540 snd-sb16= [HW,ALSA] 1549 snd-sb16= [HW,ALSA]
1541 1550
1542 snd-sbawe= [HW,ALSA] 1551 snd-sbawe= [HW,ALSA]
1543 1552
1544 snd-serial= [HW,ALSA] 1553 snd-serial= [HW,ALSA]
1545 1554
1546 snd-sgalaxy= [HW,ALSA] 1555 snd-sgalaxy= [HW,ALSA]
1547 1556
1548 snd-sonicvibes= [HW,ALSA] 1557 snd-sonicvibes= [HW,ALSA]
1549 1558
1550 snd-sun-amd7930= 1559 snd-sun-amd7930=
1551 [HW,ALSA] 1560 [HW,ALSA]
1552 1561
1553 snd-sun-cs4231= [HW,ALSA] 1562 snd-sun-cs4231= [HW,ALSA]
1554 1563
1555 snd-trident= [HW,ALSA] 1564 snd-trident= [HW,ALSA]
1556 1565
1557 snd-usb-audio= [HW,ALSA,USB] 1566 snd-usb-audio= [HW,ALSA,USB]
1558 1567
1559 snd-via82xx= [HW,ALSA] 1568 snd-via82xx= [HW,ALSA]
1560 1569
1561 snd-virmidi= [HW,ALSA] 1570 snd-virmidi= [HW,ALSA]
1562 1571
1563 snd-wavefront= [HW,ALSA] 1572 snd-wavefront= [HW,ALSA]
1564 1573
1565 snd-ymfpci= [HW,ALSA] 1574 snd-ymfpci= [HW,ALSA]
1566 1575
1567 sonicvibes= [HW,OSS] 1576 sonicvibes= [HW,OSS]
1568 Format: <reverb> 1577 Format: <reverb>
1569 1578
1570 sonycd535= [HW,CD] 1579 sonycd535= [HW,CD]
1571 Format: <io>[,<irq>] 1580 Format: <io>[,<irq>]
1572 1581
1573 sonypi.*= [HW] Sony Programmable I/O Control Device driver 1582 sonypi.*= [HW] Sony Programmable I/O Control Device driver
1574 See Documentation/sonypi.txt 1583 See Documentation/sonypi.txt
1575 1584
1576 specialix= [HW,SERIAL] Specialix multi-serial port adapter 1585 specialix= [HW,SERIAL] Specialix multi-serial port adapter
1577 See Documentation/specialix.txt. 1586 See Documentation/specialix.txt.
1578 1587
1579 spia_io_base= [HW,MTD] 1588 spia_io_base= [HW,MTD]
1580 spia_fio_base= 1589 spia_fio_base=
1581 spia_pedr= 1590 spia_pedr=
1582 spia_peddr= 1591 spia_peddr=
1583 1592
1584 sscape= [HW,OSS] 1593 sscape= [HW,OSS]
1585 Format: <io>,<irq>,<dma>,<mpu_io>,<mpu_irq> 1594 Format: <io>,<irq>,<dma>,<mpu_io>,<mpu_irq>
1586 1595
1587 st= [HW,SCSI] SCSI tape parameters (buffers, etc.) 1596 st= [HW,SCSI] SCSI tape parameters (buffers, etc.)
1588 See Documentation/scsi/st.txt. 1597 See Documentation/scsi/st.txt.
1589 1598
1590 st0x= [HW,SCSI] 1599 st0x= [HW,SCSI]
1591 See header of drivers/scsi/seagate.c. 1600 See header of drivers/scsi/seagate.c.
1592 1601
1593 sti= [PARISC,HW] 1602 sti= [PARISC,HW]
1594 Format: <num> 1603 Format: <num>
1595 Set the STI (builtin display/keyboard on the HP-PARISC 1604 Set the STI (builtin display/keyboard on the HP-PARISC
1596 machines) console (graphic card) which should be used 1605 machines) console (graphic card) which should be used
1597 as the initial boot-console. 1606 as the initial boot-console.
1598 See also comment in drivers/video/console/sticore.c. 1607 See also comment in drivers/video/console/sticore.c.
1599 1608
1600 sti_font= [HW] 1609 sti_font= [HW]
1601 See comment in drivers/video/console/sticore.c. 1610 See comment in drivers/video/console/sticore.c.
1602 1611
1603 stifb= [HW] 1612 stifb= [HW]
1604 Format: bpp:<bpp1>[:<bpp2>[:<bpp3>...]] 1613 Format: bpp:<bpp1>[:<bpp2>[:<bpp3>...]]
1605 1614
1606 swiotlb= [IA-64] Number of I/O TLB slabs 1615 swiotlb= [IA-64] Number of I/O TLB slabs
1607 1616
1608 switches= [HW,M68k] 1617 switches= [HW,M68k]
1609 1618
1610 sym53c416= [HW,SCSI] 1619 sym53c416= [HW,SCSI]
1611 See header of drivers/scsi/sym53c416.c. 1620 See header of drivers/scsi/sym53c416.c.
1612 1621
1613 t128= [HW,SCSI] 1622 t128= [HW,SCSI]
1614 See header of drivers/scsi/t128.c. 1623 See header of drivers/scsi/t128.c.
1615 1624
1616 tdfx= [HW,DRM] 1625 tdfx= [HW,DRM]
1617 1626
1618 thash_entries= [KNL,NET] 1627 thash_entries= [KNL,NET]
1619 Set number of hash buckets for TCP connection 1628 Set number of hash buckets for TCP connection
1620 1629
1621 time Show timing data prefixed to each printk message line 1630 time Show timing data prefixed to each printk message line
1622 1631
1623 clocksource= [GENERIC_TIME] Override the default clocksource 1632 clocksource= [GENERIC_TIME] Override the default clocksource
1624 Override the default clocksource and use the clocksource 1633 Override the default clocksource and use the clocksource
1625 with the name specified. 1634 with the name specified.
1626 1635
1627 tipar.timeout= [HW,PPT] 1636 tipar.timeout= [HW,PPT]
1628 Set communications timeout in tenths of a second 1637 Set communications timeout in tenths of a second
1629 (default 15). 1638 (default 15).
1630 1639
1631 tipar.delay= [HW,PPT] 1640 tipar.delay= [HW,PPT]
1632 Set inter-bit delay in microseconds (default 10). 1641 Set inter-bit delay in microseconds (default 10).
1633 1642
1634 tmc8xx= [HW,SCSI] 1643 tmc8xx= [HW,SCSI]
1635 See header of drivers/scsi/seagate.c. 1644 See header of drivers/scsi/seagate.c.
1636 1645
1637 tmscsim= [HW,SCSI] 1646 tmscsim= [HW,SCSI]
1638 See comment before function dc390_setup() in 1647 See comment before function dc390_setup() in
1639 drivers/scsi/tmscsim.c. 1648 drivers/scsi/tmscsim.c.
1640 1649
1641 tp720= [HW,PS2] 1650 tp720= [HW,PS2]
1642 1651
1643 trix= [HW,OSS] MediaTrix AudioTrix Pro 1652 trix= [HW,OSS] MediaTrix AudioTrix Pro
1644 Format: 1653 Format:
1645 <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq> 1654 <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
1646 1655
1647 tsdev.xres= [TS] Horizontal screen resolution. 1656 tsdev.xres= [TS] Horizontal screen resolution.
1648 tsdev.yres= [TS] Vertical screen resolution. 1657 tsdev.yres= [TS] Vertical screen resolution.
1649 1658
1650 turbografx.map[2|3]= [HW,JOY] 1659 turbografx.map[2|3]= [HW,JOY]
1651 TurboGraFX parallel port interface 1660 TurboGraFX parallel port interface
1652 Format: 1661 Format:
1653 <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7> 1662 <port#>,<js1>,<js2>,<js3>,<js4>,<js5>,<js6>,<js7>
1654 See also Documentation/input/joystick-parport.txt 1663 See also Documentation/input/joystick-parport.txt
1655 1664
1656 u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter 1665 u14-34f= [HW,SCSI] UltraStor 14F/34F SCSI host adapter
1657 See header of drivers/scsi/u14-34f.c. 1666 See header of drivers/scsi/u14-34f.c.
1658 1667
1659 uart401= [HW,OSS] 1668 uart401= [HW,OSS]
1660 Format: <io>,<irq> 1669 Format: <io>,<irq>
1661 1670
1662 uart6850= [HW,OSS] 1671 uart6850= [HW,OSS]
1663 Format: <io>,<irq> 1672 Format: <io>,<irq>
1664 1673
1665 usbhid.mousepoll= 1674 usbhid.mousepoll=
1666 [USBHID] The interval which mice are to be polled at. 1675 [USBHID] The interval which mice are to be polled at.
1667 1676
1668 vdso= [IA-32] 1677 vdso= [IA-32]
1669 vdso=1: enable VDSO (default) 1678 vdso=1: enable VDSO (default)
1670 vdso=0: disable VDSO mapping 1679 vdso=0: disable VDSO mapping
1671 1680
1672 video= [FB] Frame buffer configuration 1681 video= [FB] Frame buffer configuration
1673 See Documentation/fb/modedb.txt. 1682 See Documentation/fb/modedb.txt.
1674 1683
1675 vga= [BOOT,IA-32] Select a particular video mode 1684 vga= [BOOT,IA-32] Select a particular video mode
1676 See Documentation/i386/boot.txt and 1685 See Documentation/i386/boot.txt and
1677 Documentation/svga.txt. 1686 Documentation/svga.txt.
1678 Use vga=ask for menu. 1687 Use vga=ask for menu.
1679 This is actually a boot loader parameter; the value is 1688 This is actually a boot loader parameter; the value is
1680 passed to the kernel using a special protocol. 1689 passed to the kernel using a special protocol.
1681 1690
1682 vmalloc=nn[KMG] [KNL,BOOT] Forces the vmalloc area to have an exact 1691 vmalloc=nn[KMG] [KNL,BOOT] Forces the vmalloc area to have an exact
1683 size of <nn>. This can be used to increase the 1692 size of <nn>. This can be used to increase the
1684 minimum size (128MB on x86). It can also be used to 1693 minimum size (128MB on x86). It can also be used to
1685 decrease the size and leave more room for directly 1694 decrease the size and leave more room for directly
1686 mapped kernel RAM. 1695 mapped kernel RAM.
1687 1696
1688 vmhalt= [KNL,S390] Perform z/VM CP command after system halt. 1697 vmhalt= [KNL,S390] Perform z/VM CP command after system halt.
1689 Format: <command> 1698 Format: <command>
1690 1699
1691 vmpanic= [KNL,S390] Perform z/VM CP command after kernel panic. 1700 vmpanic= [KNL,S390] Perform z/VM CP command after kernel panic.
1692 Format: <command> 1701 Format: <command>
1693 1702
1694 vmpoff= [KNL,S390] Perform z/VM CP command after power off. 1703 vmpoff= [KNL,S390] Perform z/VM CP command after power off.
1695 Format: <command> 1704 Format: <command>
1696 1705
1697 waveartist= [HW,OSS] 1706 waveartist= [HW,OSS]
1698 Format: <io>,<irq>,<dma>,<dma2> 1707 Format: <io>,<irq>,<dma>,<dma2>
1699 1708
1700 wd33c93= [HW,SCSI] 1709 wd33c93= [HW,SCSI]
1701 See header of drivers/scsi/wd33c93.c. 1710 See header of drivers/scsi/wd33c93.c.
1702 1711
1703 wd7000= [HW,SCSI] 1712 wd7000= [HW,SCSI]
1704 See header of drivers/scsi/wd7000.c. 1713 See header of drivers/scsi/wd7000.c.
1705 1714
1706 wdt= [WDT] Watchdog 1715 wdt= [WDT] Watchdog
1707 See Documentation/watchdog/watchdog.txt. 1716 See Documentation/watchdog/watchdog.txt.
1708 1717
1709 xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks. 1718 xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks.
1710 xd_geo= See header of drivers/block/xd.c. 1719 xd_geo= See header of drivers/block/xd.c.
1711 1720
1712 xirc2ps_cs= [NET,PCMCIA] 1721 xirc2ps_cs= [NET,PCMCIA]
1713 Format: 1722 Format:
1714 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]] 1723 <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
1715 1724
1716 norandmaps Don't use address space randomization 1725 norandmaps Don't use address space randomization
1717 Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space 1726 Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space
1718 1727
1719 1728
1720 ______________________________________________________________________ 1729 ______________________________________________________________________
1721 1730
1722 TODO: 1731 TODO:
1723 1732
1724 Add documentation for ALSA options. 1733 Add documentation for ALSA options.
1725 Add more DRM drivers. 1734 Add more DRM drivers.
1726 1735
1 1
2 config PRINTK_TIME 2 config PRINTK_TIME
3 bool "Show timing information on printks" 3 bool "Show timing information on printks"
4 help 4 help
5 Selecting this option causes timing information to be 5 Selecting this option causes timing information to be
6 included in printk output. This allows you to measure 6 included in printk output. This allows you to measure
7 the interval between kernel operations, including bootup 7 the interval between kernel operations, including bootup
8 operations. This is useful for identifying long delays 8 operations. This is useful for identifying long delays
9 in kernel startup. 9 in kernel startup.
10 10
11 11
12 config MAGIC_SYSRQ 12 config MAGIC_SYSRQ
13 bool "Magic SysRq key" 13 bool "Magic SysRq key"
14 depends on !UML 14 depends on !UML
15 help 15 help
16 If you say Y here, you will have some control over the system even 16 If you say Y here, you will have some control over the system even
17 if the system crashes for example during kernel debugging (e.g., you 17 if the system crashes for example during kernel debugging (e.g., you
18 will be able to flush the buffer cache to disk, reboot the system 18 will be able to flush the buffer cache to disk, reboot the system
19 immediately or dump some status information). This is accomplished 19 immediately or dump some status information). This is accomplished
20 by pressing various keys while holding SysRq (Alt+PrintScreen). It 20 by pressing various keys while holding SysRq (Alt+PrintScreen). It
21 also works on a serial console (on PC hardware at least), if you 21 also works on a serial console (on PC hardware at least), if you
22 send a BREAK and then within 5 seconds a command keypress. The 22 send a BREAK and then within 5 seconds a command keypress. The
23 keys are documented in <file:Documentation/sysrq.txt>. Don't say Y 23 keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
24 unless you really know what this hack does. 24 unless you really know what this hack does.
25 25
26 config UNUSED_SYMBOLS 26 config UNUSED_SYMBOLS
27 bool "Enable unused/obsolete exported symbols" 27 bool "Enable unused/obsolete exported symbols"
28 default y if X86 28 default y if X86
29 help 29 help
30 Unused but exported symbols make the kernel needlessly bigger. For 30 Unused but exported symbols make the kernel needlessly bigger. For
31 that reason most of these unused exports will soon be removed. This 31 that reason most of these unused exports will soon be removed. This
32 option is provided temporarily to provide a transition period in case 32 option is provided temporarily to provide a transition period in case
33 some external kernel module needs one of these symbols anyway. If you 33 some external kernel module needs one of these symbols anyway. If you
34 encounter such a case in your module, consider if you are actually 34 encounter such a case in your module, consider if you are actually
35 using the right API. (rationale: since nobody in the kernel is using 35 using the right API. (rationale: since nobody in the kernel is using
36 this in a module, there is a pretty good chance it's actually the 36 this in a module, there is a pretty good chance it's actually the
37 wrong interface to use). If you really need the symbol, please send a 37 wrong interface to use). If you really need the symbol, please send a
38 mail to the linux kernel mailing list mentioning the symbol and why 38 mail to the linux kernel mailing list mentioning the symbol and why
39 you really need it, and what the merge plan to the mainline kernel for 39 you really need it, and what the merge plan to the mainline kernel for
40 your module is. 40 your module is.
41 41
42 config DEBUG_KERNEL 42 config DEBUG_KERNEL
43 bool "Kernel debugging" 43 bool "Kernel debugging"
44 help 44 help
45 Say Y here if you are developing drivers or trying to debug and 45 Say Y here if you are developing drivers or trying to debug and
46 identify kernel problems. 46 identify kernel problems.
47 47
48 config LOG_BUF_SHIFT 48 config LOG_BUF_SHIFT
49 int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL 49 int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL
50 range 12 21 50 range 12 21
51 default 17 if S390 51 default 17 if S390
52 default 16 if X86_NUMAQ || IA64 52 default 16 if X86_NUMAQ || IA64
53 default 15 if SMP 53 default 15 if SMP
54 default 14 54 default 14
55 help 55 help
56 Select kernel log buffer size as a power of 2. 56 Select kernel log buffer size as a power of 2.
57 Defaults and Examples: 57 Defaults and Examples:
58 17 => 128 KB for S/390 58 17 => 128 KB for S/390
59 16 => 64 KB for x86 NUMAQ or IA-64 59 16 => 64 KB for x86 NUMAQ or IA-64
60 15 => 32 KB for SMP 60 15 => 32 KB for SMP
61 14 => 16 KB for uniprocessor 61 14 => 16 KB for uniprocessor
62 13 => 8 KB 62 13 => 8 KB
63 12 => 4 KB 63 12 => 4 KB
64 64
65 config DETECT_SOFTLOCKUP 65 config DETECT_SOFTLOCKUP
66 bool "Detect Soft Lockups" 66 bool "Detect Soft Lockups"
67 depends on DEBUG_KERNEL 67 depends on DEBUG_KERNEL
68 default y 68 default y
69 help 69 help
70 Say Y here to enable the kernel to detect "soft lockups", 70 Say Y here to enable the kernel to detect "soft lockups",
71 which are bugs that cause the kernel to loop in kernel 71 which are bugs that cause the kernel to loop in kernel
72 mode for more than 10 seconds, without giving other tasks a 72 mode for more than 10 seconds, without giving other tasks a
73 chance to run. 73 chance to run.
74 74
75 When a soft-lockup is detected, the kernel will print the 75 When a soft-lockup is detected, the kernel will print the
76 current stack trace (which you should report), but the 76 current stack trace (which you should report), but the
77 system will stay locked up. This feature has negligible 77 system will stay locked up. This feature has negligible
78 overhead. 78 overhead.
79 79
80 (Note that "hard lockups" are separate type of bugs that 80 (Note that "hard lockups" are separate type of bugs that
81 can be detected via the NMI-watchdog, on platforms that 81 can be detected via the NMI-watchdog, on platforms that
82 support it.) 82 support it.)
83 83
84 config SCHEDSTATS 84 config SCHEDSTATS
85 bool "Collect scheduler statistics" 85 bool "Collect scheduler statistics"
86 depends on DEBUG_KERNEL && PROC_FS 86 depends on DEBUG_KERNEL && PROC_FS
87 help 87 help
88 If you say Y here, additional code will be inserted into the 88 If you say Y here, additional code will be inserted into the
89 scheduler and related routines to collect statistics about 89 scheduler and related routines to collect statistics about
90 scheduler behavior and provide them in /proc/schedstat. These 90 scheduler behavior and provide them in /proc/schedstat. These
91 stats may be useful for both tuning and debugging the scheduler 91 stats may be useful for both tuning and debugging the scheduler
92 If you aren't debugging the scheduler or trying to tune a specific 92 If you aren't debugging the scheduler or trying to tune a specific
93 application, you can say N to avoid the very slight overhead 93 application, you can say N to avoid the very slight overhead
94 this adds. 94 this adds.
95 95
96 config DEBUG_SLAB 96 config DEBUG_SLAB
97 bool "Debug slab memory allocations" 97 bool "Debug slab memory allocations"
98 depends on DEBUG_KERNEL && SLAB 98 depends on DEBUG_KERNEL && SLAB
99 help 99 help
100 Say Y here to have the kernel do limited verification on memory 100 Say Y here to have the kernel do limited verification on memory
101 allocation as well as poisoning memory on free to catch use of freed 101 allocation as well as poisoning memory on free to catch use of freed
102 memory. This can make kmalloc/kfree-intensive workloads much slower. 102 memory. This can make kmalloc/kfree-intensive workloads much slower.
103 103
104 config DEBUG_SLAB_LEAK 104 config DEBUG_SLAB_LEAK
105 bool "Memory leak debugging" 105 bool "Memory leak debugging"
106 depends on DEBUG_SLAB 106 depends on DEBUG_SLAB
107 107
108 config DEBUG_PREEMPT 108 config DEBUG_PREEMPT
109 bool "Debug preemptible kernel" 109 bool "Debug preemptible kernel"
110 depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT 110 depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
111 default y 111 default y
112 help 112 help
113 If you say Y here then the kernel will use a debug variant of the 113 If you say Y here then the kernel will use a debug variant of the
114 commonly used smp_processor_id() function and will print warnings 114 commonly used smp_processor_id() function and will print warnings
115 if kernel code uses it in a preemption-unsafe way. Also, the kernel 115 if kernel code uses it in a preemption-unsafe way. Also, the kernel
116 will detect preemption count underflows. 116 will detect preemption count underflows.
117 117
118 config DEBUG_RT_MUTEXES 118 config DEBUG_RT_MUTEXES
119 bool "RT Mutex debugging, deadlock detection" 119 bool "RT Mutex debugging, deadlock detection"
120 depends on DEBUG_KERNEL && RT_MUTEXES 120 depends on DEBUG_KERNEL && RT_MUTEXES
121 help 121 help
122 This allows rt mutex semantics violations and rt mutex related 122 This allows rt mutex semantics violations and rt mutex related
123 deadlocks (lockups) to be detected and reported automatically. 123 deadlocks (lockups) to be detected and reported automatically.
124 124
125 config DEBUG_PI_LIST 125 config DEBUG_PI_LIST
126 bool 126 bool
127 default y 127 default y
128 depends on DEBUG_RT_MUTEXES 128 depends on DEBUG_RT_MUTEXES
129 129
130 config RT_MUTEX_TESTER 130 config RT_MUTEX_TESTER
131 bool "Built-in scriptable tester for rt-mutexes" 131 bool "Built-in scriptable tester for rt-mutexes"
132 depends on DEBUG_KERNEL && RT_MUTEXES 132 depends on DEBUG_KERNEL && RT_MUTEXES
133 help 133 help
134 This option enables a rt-mutex tester. 134 This option enables a rt-mutex tester.
135 135
136 config DEBUG_SPINLOCK 136 config DEBUG_SPINLOCK
137 bool "Spinlock debugging" 137 bool "Spinlock debugging"
138 depends on DEBUG_KERNEL 138 depends on DEBUG_KERNEL
139 help 139 help
140 Say Y here and build SMP to catch missing spinlock initialization 140 Say Y here and build SMP to catch missing spinlock initialization
141 and certain other kinds of spinlock errors commonly made. This is 141 and certain other kinds of spinlock errors commonly made. This is
142 best used in conjunction with the NMI watchdog so that spinlock 142 best used in conjunction with the NMI watchdog so that spinlock
143 deadlocks are also debuggable. 143 deadlocks are also debuggable.
144 144
145 config DEBUG_SPINLOCK_SLEEP 145 config DEBUG_SPINLOCK_SLEEP
146 bool "Sleep-inside-spinlock checking" 146 bool "Sleep-inside-spinlock checking"
147 depends on DEBUG_KERNEL 147 depends on DEBUG_KERNEL
148 help 148 help
149 If you say Y here, various routines which may sleep will become very 149 If you say Y here, various routines which may sleep will become very
150 noisy if they are called with a spinlock held. 150 noisy if they are called with a spinlock held.
151 151
152 config DEBUG_LOCKING_API_SELFTESTS
153 bool "Locking API boot-time self-tests"
154 depends on DEBUG_KERNEL
155 help
156 Say Y here if you want the kernel to run a short self-test during
157 bootup. The self-test checks whether common types of locking bugs
158 are detected by debugging mechanisms or not. (if you disable
159 lock debugging then those bugs wont be detected of course.)
160 The following locking APIs are covered: spinlocks, rwlocks,
161 mutexes and rwsems.
162
152 config STACKTRACE 163 config STACKTRACE
153 bool 164 bool
154 depends on STACKTRACE_SUPPORT 165 depends on STACKTRACE_SUPPORT
155 166
156 config DEBUG_KOBJECT 167 config DEBUG_KOBJECT
157 bool "kobject debugging" 168 bool "kobject debugging"
158 depends on DEBUG_KERNEL 169 depends on DEBUG_KERNEL
159 help 170 help
160 If you say Y here, some extra kobject debugging messages will be sent 171 If you say Y here, some extra kobject debugging messages will be sent
161 to the syslog. 172 to the syslog.
162 173
163 config DEBUG_HIGHMEM 174 config DEBUG_HIGHMEM
164 bool "Highmem debugging" 175 bool "Highmem debugging"
165 depends on DEBUG_KERNEL && HIGHMEM 176 depends on DEBUG_KERNEL && HIGHMEM
166 help 177 help
167 This options enables addition error checking for high memory systems. 178 This options enables addition error checking for high memory systems.
168 Disable for production systems. 179 Disable for production systems.
169 180
170 config DEBUG_BUGVERBOSE 181 config DEBUG_BUGVERBOSE
171 bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED 182 bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
172 depends on BUG 183 depends on BUG
173 depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || X86_32 || FRV 184 depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || X86_32 || FRV
174 default !EMBEDDED 185 default !EMBEDDED
175 help 186 help
176 Say Y here to make BUG() panics output the file name and line number 187 Say Y here to make BUG() panics output the file name and line number
177 of the BUG call as well as the EIP and oops trace. This aids 188 of the BUG call as well as the EIP and oops trace. This aids
178 debugging but costs about 70-100K of memory. 189 debugging but costs about 70-100K of memory.
179 190
180 config DEBUG_INFO 191 config DEBUG_INFO
181 bool "Compile the kernel with debug info" 192 bool "Compile the kernel with debug info"
182 depends on DEBUG_KERNEL 193 depends on DEBUG_KERNEL
183 help 194 help
184 If you say Y here the resulting kernel image will include 195 If you say Y here the resulting kernel image will include
185 debugging info resulting in a larger kernel image. 196 debugging info resulting in a larger kernel image.
186 Say Y here only if you plan to debug the kernel. 197 Say Y here only if you plan to debug the kernel.
187 198
188 If unsure, say N. 199 If unsure, say N.
189 200
190 config DEBUG_FS 201 config DEBUG_FS
191 bool "Debug Filesystem" 202 bool "Debug Filesystem"
192 depends on SYSFS 203 depends on SYSFS
193 help 204 help
194 debugfs is a virtual file system that kernel developers use to put 205 debugfs is a virtual file system that kernel developers use to put
195 debugging files into. Enable this option to be able to read and 206 debugging files into. Enable this option to be able to read and
196 write to these files. 207 write to these files.
197 208
198 If unsure, say N. 209 If unsure, say N.
199 210
200 config DEBUG_VM 211 config DEBUG_VM
201 bool "Debug VM" 212 bool "Debug VM"
202 depends on DEBUG_KERNEL 213 depends on DEBUG_KERNEL
203 help 214 help
204 Enable this to turn on extended checks in the virtual-memory system 215 Enable this to turn on extended checks in the virtual-memory system
205 that may impact performance. 216 that may impact performance.
206 217
207 If unsure, say N. 218 If unsure, say N.
208 219
209 config FRAME_POINTER 220 config FRAME_POINTER
210 bool "Compile the kernel with frame pointers" 221 bool "Compile the kernel with frame pointers"
211 depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390) 222 depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390)
212 default y if DEBUG_INFO && UML 223 default y if DEBUG_INFO && UML
213 help 224 help
214 If you say Y here the resulting kernel image will be slightly larger 225 If you say Y here the resulting kernel image will be slightly larger
215 and slower, but it might give very useful debugging information on 226 and slower, but it might give very useful debugging information on
216 some architectures or if you use external debuggers. 227 some architectures or if you use external debuggers.
217 If you don't debug the kernel, you can say N. 228 If you don't debug the kernel, you can say N.
218 229
219 config UNWIND_INFO 230 config UNWIND_INFO
220 bool "Compile the kernel with frame unwind information" 231 bool "Compile the kernel with frame unwind information"
221 depends on !IA64 && !PARISC 232 depends on !IA64 && !PARISC
222 depends on !MODULES || !(MIPS || PPC || SUPERH || V850) 233 depends on !MODULES || !(MIPS || PPC || SUPERH || V850)
223 help 234 help
224 If you say Y here the resulting kernel image will be slightly larger 235 If you say Y here the resulting kernel image will be slightly larger
225 but not slower, and it will give very useful debugging information. 236 but not slower, and it will give very useful debugging information.
226 If you don't debug the kernel, you can say N, but we may not be able 237 If you don't debug the kernel, you can say N, but we may not be able
227 to solve problems without frame unwind information or frame pointers. 238 to solve problems without frame unwind information or frame pointers.
228 239
229 config STACK_UNWIND 240 config STACK_UNWIND
230 bool "Stack unwind support" 241 bool "Stack unwind support"
231 depends on UNWIND_INFO 242 depends on UNWIND_INFO
232 depends on X86 243 depends on X86
233 help 244 help
234 This enables more precise stack traces, omitting all unrelated 245 This enables more precise stack traces, omitting all unrelated
235 occurrences of pointers into kernel code from the dump. 246 occurrences of pointers into kernel code from the dump.
236 247
237 config FORCED_INLINING 248 config FORCED_INLINING
238 bool "Force gcc to inline functions marked 'inline'" 249 bool "Force gcc to inline functions marked 'inline'"
239 depends on DEBUG_KERNEL 250 depends on DEBUG_KERNEL
240 default y 251 default y
241 help 252 help
242 This option determines if the kernel forces gcc to inline the functions 253 This option determines if the kernel forces gcc to inline the functions
243 developers have marked 'inline'. Doing so takes away freedom from gcc to 254 developers have marked 'inline'. Doing so takes away freedom from gcc to
244 do what it thinks is best, which is desirable for the gcc 3.x series of 255 do what it thinks is best, which is desirable for the gcc 3.x series of
245 compilers. The gcc 4.x series have a rewritten inlining algorithm and 256 compilers. The gcc 4.x series have a rewritten inlining algorithm and
246 disabling this option will generate a smaller kernel there. Hopefully 257 disabling this option will generate a smaller kernel there. Hopefully
247 this algorithm is so good that allowing gcc4 to make the decision can 258 this algorithm is so good that allowing gcc4 to make the decision can
248 become the default in the future, until then this option is there to 259 become the default in the future, until then this option is there to
249 test gcc for this. 260 test gcc for this.
250 261
251 config RCU_TORTURE_TEST 262 config RCU_TORTURE_TEST
252 tristate "torture tests for RCU" 263 tristate "torture tests for RCU"
253 depends on DEBUG_KERNEL 264 depends on DEBUG_KERNEL
254 default n 265 default n
255 help 266 help
256 This option provides a kernel module that runs torture tests 267 This option provides a kernel module that runs torture tests
257 on the RCU infrastructure. The kernel module may be built 268 on the RCU infrastructure. The kernel module may be built
258 after the fact on the running kernel to be tested, if desired. 269 after the fact on the running kernel to be tested, if desired.
259 270
260 Say Y here if you want RCU torture tests to start automatically 271 Say Y here if you want RCU torture tests to start automatically
261 at boot time (you probably don't). 272 at boot time (you probably don't).
262 Say M if you want the RCU torture tests to build as a module. 273 Say M if you want the RCU torture tests to build as a module.
263 Say N if you are unsure. 274 Say N if you are unsure.
264 275
1 # 1 #
2 # Makefile for some libs needed in the kernel. 2 # Makefile for some libs needed in the kernel.
3 # 3 #
4 4
5 lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ 5 lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \
6 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ 6 bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
7 idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ 7 idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \
8 sha1.o 8 sha1.o
9 9
10 lib-$(CONFIG_SMP) += cpumask.o 10 lib-$(CONFIG_SMP) += cpumask.o
11 11
12 lib-y += kobject.o kref.o kobject_uevent.o klist.o 12 lib-y += kobject.o kref.o kobject_uevent.o klist.o
13 13
14 obj-y += sort.o parser.o halfmd4.o iomap_copy.o debug_locks.o 14 obj-y += sort.o parser.o halfmd4.o iomap_copy.o debug_locks.o
15 15
16 ifeq ($(CONFIG_DEBUG_KOBJECT),y) 16 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
17 CFLAGS_kobject.o += -DDEBUG 17 CFLAGS_kobject.o += -DDEBUG
18 CFLAGS_kobject_uevent.o += -DDEBUG 18 CFLAGS_kobject_uevent.o += -DDEBUG
19 endif 19 endif
20 20
21 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
21 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o 22 obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
22 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o 23 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
23 lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o 24 lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
24 lib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o 25 lib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o
25 lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o 26 lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o
26 lib-$(CONFIG_GENERIC_HWEIGHT) += hweight.o 27 lib-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
27 obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o 28 obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o
28 obj-$(CONFIG_PLIST) += plist.o 29 obj-$(CONFIG_PLIST) += plist.o
29 obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o 30 obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o
30 31
31 ifneq ($(CONFIG_HAVE_DEC_LOCK),y) 32 ifneq ($(CONFIG_HAVE_DEC_LOCK),y)
32 lib-y += dec_and_lock.o 33 lib-y += dec_and_lock.o
33 endif 34 endif
34 35
35 obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o 36 obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o
36 obj-$(CONFIG_CRC16) += crc16.o 37 obj-$(CONFIG_CRC16) += crc16.o
37 obj-$(CONFIG_CRC32) += crc32.o 38 obj-$(CONFIG_CRC32) += crc32.o
38 obj-$(CONFIG_LIBCRC32C) += libcrc32c.o 39 obj-$(CONFIG_LIBCRC32C) += libcrc32c.o
39 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o 40 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
40 obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o 41 obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o
41 42
42 obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/ 43 obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/
43 obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/ 44 obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
44 obj-$(CONFIG_REED_SOLOMON) += reed_solomon/ 45 obj-$(CONFIG_REED_SOLOMON) += reed_solomon/
45 46
46 obj-$(CONFIG_TEXTSEARCH) += textsearch.o 47 obj-$(CONFIG_TEXTSEARCH) += textsearch.o
47 obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o 48 obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
48 obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o 49 obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o
49 obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o 50 obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o
50 obj-$(CONFIG_SMP) += percpu_counter.o 51 obj-$(CONFIG_SMP) += percpu_counter.o
51 52
52 obj-$(CONFIG_SWIOTLB) += swiotlb.o 53 obj-$(CONFIG_SWIOTLB) += swiotlb.o
53 54
54 hostprogs-y := gen_crc32table 55 hostprogs-y := gen_crc32table
55 clean-files := crc32table.h 56 clean-files := crc32table.h
56 57
57 $(obj)/crc32.o: $(obj)/crc32table.h 58 $(obj)/crc32.o: $(obj)/crc32table.h
58 59
59 quiet_cmd_crc32 = GEN $@ 60 quiet_cmd_crc32 = GEN $@
60 cmd_crc32 = $< > $@ 61 cmd_crc32 = $< > $@
61 62
62 $(obj)/crc32table.h: $(obj)/gen_crc32table 63 $(obj)/crc32table.h: $(obj)/gen_crc32table
63 $(call cmd,crc32) 64 $(call cmd,crc32)
64 65
lib/locking-selftest-hardirq.h
File was created 1 #undef IRQ_DISABLE
2 #undef IRQ_ENABLE
3 #undef IRQ_ENTER
4 #undef IRQ_EXIT
5
6 #define IRQ_ENABLE HARDIRQ_ENABLE
7 #define IRQ_DISABLE HARDIRQ_DISABLE
8 #define IRQ_ENTER HARDIRQ_ENTER
9 #define IRQ_EXIT HARDIRQ_EXIT
10
lib/locking-selftest-mutex.h
File was created 1 #undef LOCK
2 #define LOCK ML
3
4 #undef UNLOCK
5 #define UNLOCK MU
6
7 #undef RLOCK
8 #undef WLOCK
9
10 #undef INIT
11 #define INIT MI
12
lib/locking-selftest-rlock-hardirq.h
File was created 1 #include "locking-selftest-rlock.h"
2 #include "locking-selftest-hardirq.h"
3
lib/locking-selftest-rlock-softirq.h
File was created 1 #include "locking-selftest-rlock.h"
2 #include "locking-selftest-softirq.h"
3
lib/locking-selftest-rlock.h
File was created 1 #undef LOCK
2 #define LOCK RL
3
4 #undef UNLOCK
5 #define UNLOCK RU
6
7 #undef RLOCK
8 #define RLOCK RL
9
10 #undef WLOCK
11 #define WLOCK WL
12
13 #undef INIT
14 #define INIT RWI
15
lib/locking-selftest-rsem.h
File was created 1 #undef LOCK
2 #define LOCK RSL
3
4 #undef UNLOCK
5 #define UNLOCK RSU
6
7 #undef RLOCK
8 #define RLOCK RSL
9
10 #undef WLOCK
11 #define WLOCK WSL
12
13 #undef INIT
14 #define INIT RWSI
15
lib/locking-selftest-softirq.h
File was created 1 #undef IRQ_DISABLE
2 #undef IRQ_ENABLE
3 #undef IRQ_ENTER
4 #undef IRQ_EXIT
5
6 #define IRQ_DISABLE SOFTIRQ_DISABLE
7 #define IRQ_ENABLE SOFTIRQ_ENABLE
8 #define IRQ_ENTER SOFTIRQ_ENTER
9 #define IRQ_EXIT SOFTIRQ_EXIT
10
lib/locking-selftest-spin-hardirq.h
File was created 1 #include "locking-selftest-spin.h"
2 #include "locking-selftest-hardirq.h"
3
lib/locking-selftest-spin-softirq.h
File was created 1 #include "locking-selftest-spin.h"
2 #include "locking-selftest-softirq.h"
3
lib/locking-selftest-spin.h
File was created 1 #undef LOCK
2 #define LOCK L
3
4 #undef UNLOCK
5 #define UNLOCK U
6
7 #undef RLOCK
8 #undef WLOCK
9
10 #undef INIT
11 #define INIT SI
12
lib/locking-selftest-wlock-hardirq.h
File was created 1 #include "locking-selftest-wlock.h"
2 #include "locking-selftest-hardirq.h"
3
lib/locking-selftest-wlock-softirq.h
File was created 1 #include "locking-selftest-wlock.h"
2 #include "locking-selftest-softirq.h"
3
lib/locking-selftest-wlock.h
File was created 1 #undef LOCK
2 #define LOCK WL
3
4 #undef UNLOCK
5 #define UNLOCK WU
6
7 #undef RLOCK
8 #define RLOCK RL
9
10 #undef WLOCK
11 #define WLOCK WL
12
13 #undef INIT
14 #define INIT RWI
15
lib/locking-selftest-wsem.h
File was created 1 #undef LOCK
2 #define LOCK WSL
3
4 #undef UNLOCK
5 #define UNLOCK WSU
6
7 #undef RLOCK
8 #define RLOCK RSL
9
10 #undef WLOCK
11 #define WLOCK WSL
12
13 #undef INIT
14 #define INIT RWSI
15
lib/locking-selftest.c
File was created 1 /*
2 * lib/locking-selftest.c
3 *
4 * Testsuite for various locking APIs: spinlocks, rwlocks,
5 * mutexes and rw-semaphores.
6 *
7 * It is checking both false positives and false negatives.
8 *
9 * Started by Ingo Molnar:
10 *
11 * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
12 */
13 #include <linux/rwsem.h>
14 #include <linux/mutex.h>
15 #include <linux/sched.h>
16 #include <linux/delay.h>
17 #include <linux/module.h>
18 #include <linux/spinlock.h>
19 #include <linux/kallsyms.h>
20 #include <linux/interrupt.h>
21 #include <linux/debug_locks.h>
22 #include <linux/irqflags.h>
23
24 /*
25 * Change this to 1 if you want to see the failure printouts:
26 */
27 static unsigned int debug_locks_verbose;
28
29 static int __init setup_debug_locks_verbose(char *str)
30 {
31 get_option(&str, &debug_locks_verbose);
32
33 return 1;
34 }
35
36 __setup("debug_locks_verbose=", setup_debug_locks_verbose);
37
38 #define FAILURE 0
39 #define SUCCESS 1
40
41 #define LOCKTYPE_SPIN 0x1
42 #define LOCKTYPE_RWLOCK 0x2
43 #define LOCKTYPE_MUTEX 0x4
44 #define LOCKTYPE_RWSEM 0x8
45
46 /*
47 * Normal standalone locks, for the circular and irq-context
48 * dependency tests:
49 */
50 static DEFINE_SPINLOCK(lock_A);
51 static DEFINE_SPINLOCK(lock_B);
52 static DEFINE_SPINLOCK(lock_C);
53 static DEFINE_SPINLOCK(lock_D);
54
55 static DEFINE_RWLOCK(rwlock_A);
56 static DEFINE_RWLOCK(rwlock_B);
57 static DEFINE_RWLOCK(rwlock_C);
58 static DEFINE_RWLOCK(rwlock_D);
59
60 static DEFINE_MUTEX(mutex_A);
61 static DEFINE_MUTEX(mutex_B);
62 static DEFINE_MUTEX(mutex_C);
63 static DEFINE_MUTEX(mutex_D);
64
65 static DECLARE_RWSEM(rwsem_A);
66 static DECLARE_RWSEM(rwsem_B);
67 static DECLARE_RWSEM(rwsem_C);
68 static DECLARE_RWSEM(rwsem_D);
69
70 /*
71 * Locks that we initialize dynamically as well so that
72 * e.g. X1 and X2 becomes two instances of the same class,
73 * but X* and Y* are different classes. We do this so that
74 * we do not trigger a real lockup:
75 */
76 static DEFINE_SPINLOCK(lock_X1);
77 static DEFINE_SPINLOCK(lock_X2);
78 static DEFINE_SPINLOCK(lock_Y1);
79 static DEFINE_SPINLOCK(lock_Y2);
80 static DEFINE_SPINLOCK(lock_Z1);
81 static DEFINE_SPINLOCK(lock_Z2);
82
83 static DEFINE_RWLOCK(rwlock_X1);
84 static DEFINE_RWLOCK(rwlock_X2);
85 static DEFINE_RWLOCK(rwlock_Y1);
86 static DEFINE_RWLOCK(rwlock_Y2);
87 static DEFINE_RWLOCK(rwlock_Z1);
88 static DEFINE_RWLOCK(rwlock_Z2);
89
90 static DEFINE_MUTEX(mutex_X1);
91 static DEFINE_MUTEX(mutex_X2);
92 static DEFINE_MUTEX(mutex_Y1);
93 static DEFINE_MUTEX(mutex_Y2);
94 static DEFINE_MUTEX(mutex_Z1);
95 static DEFINE_MUTEX(mutex_Z2);
96
97 static DECLARE_RWSEM(rwsem_X1);
98 static DECLARE_RWSEM(rwsem_X2);
99 static DECLARE_RWSEM(rwsem_Y1);
100 static DECLARE_RWSEM(rwsem_Y2);
101 static DECLARE_RWSEM(rwsem_Z1);
102 static DECLARE_RWSEM(rwsem_Z2);
103
104 /*
105 * non-inlined runtime initializers, to let separate locks share
106 * the same lock-class:
107 */
108 #define INIT_CLASS_FUNC(class) \
109 static noinline void \
110 init_class_##class(spinlock_t *lock, rwlock_t *rwlock, struct mutex *mutex, \
111 struct rw_semaphore *rwsem) \
112 { \
113 spin_lock_init(lock); \
114 rwlock_init(rwlock); \
115 mutex_init(mutex); \
116 init_rwsem(rwsem); \
117 }
118
119 INIT_CLASS_FUNC(X)
120 INIT_CLASS_FUNC(Y)
121 INIT_CLASS_FUNC(Z)
122
123 static void init_shared_classes(void)
124 {
125 init_class_X(&lock_X1, &rwlock_X1, &mutex_X1, &rwsem_X1);
126 init_class_X(&lock_X2, &rwlock_X2, &mutex_X2, &rwsem_X2);
127
128 init_class_Y(&lock_Y1, &rwlock_Y1, &mutex_Y1, &rwsem_Y1);
129 init_class_Y(&lock_Y2, &rwlock_Y2, &mutex_Y2, &rwsem_Y2);
130
131 init_class_Z(&lock_Z1, &rwlock_Z1, &mutex_Z1, &rwsem_Z1);
132 init_class_Z(&lock_Z2, &rwlock_Z2, &mutex_Z2, &rwsem_Z2);
133 }
134
135 /*
136 * For spinlocks and rwlocks we also do hardirq-safe / softirq-safe tests.
137 * The following functions use a lock from a simulated hardirq/softirq
138 * context, causing the locks to be marked as hardirq-safe/softirq-safe:
139 */
140
141 #define HARDIRQ_DISABLE local_irq_disable
142 #define HARDIRQ_ENABLE local_irq_enable
143
144 #define HARDIRQ_ENTER() \
145 local_irq_disable(); \
146 irq_enter(); \
147 WARN_ON(!in_irq());
148
149 #define HARDIRQ_EXIT() \
150 __irq_exit(); \
151 local_irq_enable();
152
153 #define SOFTIRQ_DISABLE local_bh_disable
154 #define SOFTIRQ_ENABLE local_bh_enable
155
156 #define SOFTIRQ_ENTER() \
157 local_bh_disable(); \
158 local_irq_disable(); \
159 trace_softirq_enter(); \
160 WARN_ON(!in_softirq());
161
162 #define SOFTIRQ_EXIT() \
163 trace_softirq_exit(); \
164 local_irq_enable(); \
165 local_bh_enable();
166
167 /*
168 * Shortcuts for lock/unlock API variants, to keep
169 * the testcases compact:
170 */
171 #define L(x) spin_lock(&lock_##x)
172 #define U(x) spin_unlock(&lock_##x)
173 #define LU(x) L(x); U(x)
174 #define SI(x) spin_lock_init(&lock_##x)
175
176 #define WL(x) write_lock(&rwlock_##x)
177 #define WU(x) write_unlock(&rwlock_##x)
178 #define WLU(x) WL(x); WU(x)
179
180 #define RL(x) read_lock(&rwlock_##x)
181 #define RU(x) read_unlock(&rwlock_##x)
182 #define RLU(x) RL(x); RU(x)
183 #define RWI(x) rwlock_init(&rwlock_##x)
184
185 #define ML(x) mutex_lock(&mutex_##x)
186 #define MU(x) mutex_unlock(&mutex_##x)
187 #define MI(x) mutex_init(&mutex_##x)
188
189 #define WSL(x) down_write(&rwsem_##x)
190 #define WSU(x) up_write(&rwsem_##x)
191
192 #define RSL(x) down_read(&rwsem_##x)
193 #define RSU(x) up_read(&rwsem_##x)
194 #define RWSI(x) init_rwsem(&rwsem_##x)
195
196 #define LOCK_UNLOCK_2(x,y) LOCK(x); LOCK(y); UNLOCK(y); UNLOCK(x)
197
198 /*
199 * Generate different permutations of the same testcase, using
200 * the same basic lock-dependency/state events:
201 */
202
203 #define GENERATE_TESTCASE(name) \
204 \
205 static void name(void) { E(); }
206
207 #define GENERATE_PERMUTATIONS_2_EVENTS(name) \
208 \
209 static void name##_12(void) { E1(); E2(); } \
210 static void name##_21(void) { E2(); E1(); }
211
212 #define GENERATE_PERMUTATIONS_3_EVENTS(name) \
213 \
214 static void name##_123(void) { E1(); E2(); E3(); } \
215 static void name##_132(void) { E1(); E3(); E2(); } \
216 static void name##_213(void) { E2(); E1(); E3(); } \
217 static void name##_231(void) { E2(); E3(); E1(); } \
218 static void name##_312(void) { E3(); E1(); E2(); } \
219 static void name##_321(void) { E3(); E2(); E1(); }
220
221 /*
222 * AA deadlock:
223 */
224
225 #define E() \
226 \
227 LOCK(X1); \
228 LOCK(X2); /* this one should fail */
229
230 /*
231 * 6 testcases:
232 */
233 #include "locking-selftest-spin.h"
234 GENERATE_TESTCASE(AA_spin)
235 #include "locking-selftest-wlock.h"
236 GENERATE_TESTCASE(AA_wlock)
237 #include "locking-selftest-rlock.h"
238 GENERATE_TESTCASE(AA_rlock)
239 #include "locking-selftest-mutex.h"
240 GENERATE_TESTCASE(AA_mutex)
241 #include "locking-selftest-wsem.h"
242 GENERATE_TESTCASE(AA_wsem)
243 #include "locking-selftest-rsem.h"
244 GENERATE_TESTCASE(AA_rsem)
245
246 #undef E
247
248 /*
249 * Special-case for read-locking, they are
250 * allowed to recurse on the same lock instance:
251 */
252 static void rlock_AA1(void)
253 {
254 RL(X1);
255 RL(X1); // this one should NOT fail
256 }
257
258 static void rlock_AA1B(void)
259 {
260 RL(X1);
261 RL(X2); // this one should fail
262 }
263
264 static void rsem_AA1(void)
265 {
266 RSL(X1);
267 RSL(X1); // this one should fail
268 }
269
270 static void rsem_AA1B(void)
271 {
272 RSL(X1);
273 RSL(X2); // this one should fail
274 }
275 /*
276 * The mixing of read and write locks is not allowed:
277 */
278 static void rlock_AA2(void)
279 {
280 RL(X1);
281 WL(X2); // this one should fail
282 }
283
284 static void rsem_AA2(void)
285 {
286 RSL(X1);
287 WSL(X2); // this one should fail
288 }
289
290 static void rlock_AA3(void)
291 {
292 WL(X1);
293 RL(X2); // this one should fail
294 }
295
296 static void rsem_AA3(void)
297 {
298 WSL(X1);
299 RSL(X2); // this one should fail
300 }
301
302 /*
303 * ABBA deadlock:
304 */
305
306 #define E() \
307 \
308 LOCK_UNLOCK_2(A, B); \
309 LOCK_UNLOCK_2(B, A); /* fail */
310
311 /*
312 * 6 testcases:
313 */
314 #include "locking-selftest-spin.h"
315 GENERATE_TESTCASE(ABBA_spin)
316 #include "locking-selftest-wlock.h"
317 GENERATE_TESTCASE(ABBA_wlock)
318 #include "locking-selftest-rlock.h"
319 GENERATE_TESTCASE(ABBA_rlock)
320 #include "locking-selftest-mutex.h"
321 GENERATE_TESTCASE(ABBA_mutex)
322 #include "locking-selftest-wsem.h"
323 GENERATE_TESTCASE(ABBA_wsem)
324 #include "locking-selftest-rsem.h"
325 GENERATE_TESTCASE(ABBA_rsem)
326
327 #undef E
328
329 /*
330 * AB BC CA deadlock:
331 */
332
333 #define E() \
334 \
335 LOCK_UNLOCK_2(A, B); \
336 LOCK_UNLOCK_2(B, C); \
337 LOCK_UNLOCK_2(C, A); /* fail */
338
339 /*
340 * 6 testcases:
341 */
342 #include "locking-selftest-spin.h"
343 GENERATE_TESTCASE(ABBCCA_spin)
344 #include "locking-selftest-wlock.h"
345 GENERATE_TESTCASE(ABBCCA_wlock)
346 #include "locking-selftest-rlock.h"
347 GENERATE_TESTCASE(ABBCCA_rlock)
348 #include "locking-selftest-mutex.h"
349 GENERATE_TESTCASE(ABBCCA_mutex)
350 #include "locking-selftest-wsem.h"
351 GENERATE_TESTCASE(ABBCCA_wsem)
352 #include "locking-selftest-rsem.h"
353 GENERATE_TESTCASE(ABBCCA_rsem)
354
355 #undef E
356
357 /*
358 * AB CA BC deadlock:
359 */
360
361 #define E() \
362 \
363 LOCK_UNLOCK_2(A, B); \
364 LOCK_UNLOCK_2(C, A); \
365 LOCK_UNLOCK_2(B, C); /* fail */
366
367 /*
368 * 6 testcases:
369 */
370 #include "locking-selftest-spin.h"
371 GENERATE_TESTCASE(ABCABC_spin)
372 #include "locking-selftest-wlock.h"
373 GENERATE_TESTCASE(ABCABC_wlock)
374 #include "locking-selftest-rlock.h"
375 GENERATE_TESTCASE(ABCABC_rlock)
376 #include "locking-selftest-mutex.h"
377 GENERATE_TESTCASE(ABCABC_mutex)
378 #include "locking-selftest-wsem.h"
379 GENERATE_TESTCASE(ABCABC_wsem)
380 #include "locking-selftest-rsem.h"
381 GENERATE_TESTCASE(ABCABC_rsem)
382
383 #undef E
384
385 /*
386 * AB BC CD DA deadlock:
387 */
388
389 #define E() \
390 \
391 LOCK_UNLOCK_2(A, B); \
392 LOCK_UNLOCK_2(B, C); \
393 LOCK_UNLOCK_2(C, D); \
394 LOCK_UNLOCK_2(D, A); /* fail */
395
396 /*
397 * 6 testcases:
398 */
399 #include "locking-selftest-spin.h"
400 GENERATE_TESTCASE(ABBCCDDA_spin)
401 #include "locking-selftest-wlock.h"
402 GENERATE_TESTCASE(ABBCCDDA_wlock)
403 #include "locking-selftest-rlock.h"
404 GENERATE_TESTCASE(ABBCCDDA_rlock)
405 #include "locking-selftest-mutex.h"
406 GENERATE_TESTCASE(ABBCCDDA_mutex)
407 #include "locking-selftest-wsem.h"
408 GENERATE_TESTCASE(ABBCCDDA_wsem)
409 #include "locking-selftest-rsem.h"
410 GENERATE_TESTCASE(ABBCCDDA_rsem)
411
412 #undef E
413
414 /*
415 * AB CD BD DA deadlock:
416 */
417 #define E() \
418 \
419 LOCK_UNLOCK_2(A, B); \
420 LOCK_UNLOCK_2(C, D); \
421 LOCK_UNLOCK_2(B, D); \
422 LOCK_UNLOCK_2(D, A); /* fail */
423
424 /*
425 * 6 testcases:
426 */
427 #include "locking-selftest-spin.h"
428 GENERATE_TESTCASE(ABCDBDDA_spin)
429 #include "locking-selftest-wlock.h"
430 GENERATE_TESTCASE(ABCDBDDA_wlock)
431 #include "locking-selftest-rlock.h"
432 GENERATE_TESTCASE(ABCDBDDA_rlock)
433 #include "locking-selftest-mutex.h"
434 GENERATE_TESTCASE(ABCDBDDA_mutex)
435 #include "locking-selftest-wsem.h"
436 GENERATE_TESTCASE(ABCDBDDA_wsem)
437 #include "locking-selftest-rsem.h"
438 GENERATE_TESTCASE(ABCDBDDA_rsem)
439
440 #undef E
441
442 /*
443 * AB CD BC DA deadlock:
444 */
445 #define E() \
446 \
447 LOCK_UNLOCK_2(A, B); \
448 LOCK_UNLOCK_2(C, D); \
449 LOCK_UNLOCK_2(B, C); \
450 LOCK_UNLOCK_2(D, A); /* fail */
451
452 /*
453 * 6 testcases:
454 */
455 #include "locking-selftest-spin.h"
456 GENERATE_TESTCASE(ABCDBCDA_spin)
457 #include "locking-selftest-wlock.h"
458 GENERATE_TESTCASE(ABCDBCDA_wlock)
459 #include "locking-selftest-rlock.h"
460 GENERATE_TESTCASE(ABCDBCDA_rlock)
461 #include "locking-selftest-mutex.h"
462 GENERATE_TESTCASE(ABCDBCDA_mutex)
463 #include "locking-selftest-wsem.h"
464 GENERATE_TESTCASE(ABCDBCDA_wsem)
465 #include "locking-selftest-rsem.h"
466 GENERATE_TESTCASE(ABCDBCDA_rsem)
467
468 #undef E
469
470 /*
471 * Double unlock:
472 */
473 #define E() \
474 \
475 LOCK(A); \
476 UNLOCK(A); \
477 UNLOCK(A); /* fail */
478
479 /*
480 * 6 testcases:
481 */
482 #include "locking-selftest-spin.h"
483 GENERATE_TESTCASE(double_unlock_spin)
484 #include "locking-selftest-wlock.h"
485 GENERATE_TESTCASE(double_unlock_wlock)
486 #include "locking-selftest-rlock.h"
487 GENERATE_TESTCASE(double_unlock_rlock)
488 #include "locking-selftest-mutex.h"
489 GENERATE_TESTCASE(double_unlock_mutex)
490 #include "locking-selftest-wsem.h"
491 GENERATE_TESTCASE(double_unlock_wsem)
492 #include "locking-selftest-rsem.h"
493 GENERATE_TESTCASE(double_unlock_rsem)
494
495 #undef E
496
497 /*
498 * Bad unlock ordering:
499 */
500 #define E() \
501 \
502 LOCK(A); \
503 LOCK(B); \
504 UNLOCK(A); /* fail */ \
505 UNLOCK(B);
506
507 /*
508 * 6 testcases:
509 */
510 #include "locking-selftest-spin.h"
511 GENERATE_TESTCASE(bad_unlock_order_spin)
512 #include "locking-selftest-wlock.h"
513 GENERATE_TESTCASE(bad_unlock_order_wlock)
514 #include "locking-selftest-rlock.h"
515 GENERATE_TESTCASE(bad_unlock_order_rlock)
516 #include "locking-selftest-mutex.h"
517 GENERATE_TESTCASE(bad_unlock_order_mutex)
518 #include "locking-selftest-wsem.h"
519 GENERATE_TESTCASE(bad_unlock_order_wsem)
520 #include "locking-selftest-rsem.h"
521 GENERATE_TESTCASE(bad_unlock_order_rsem)
522
523 #undef E
524
525 /*
526 * initializing a held lock:
527 */
528 #define E() \
529 \
530 LOCK(A); \
531 INIT(A); /* fail */
532
533 /*
534 * 6 testcases:
535 */
536 #include "locking-selftest-spin.h"
537 GENERATE_TESTCASE(init_held_spin)
538 #include "locking-selftest-wlock.h"
539 GENERATE_TESTCASE(init_held_wlock)
540 #include "locking-selftest-rlock.h"
541 GENERATE_TESTCASE(init_held_rlock)
542 #include "locking-selftest-mutex.h"
543 GENERATE_TESTCASE(init_held_mutex)
544 #include "locking-selftest-wsem.h"
545 GENERATE_TESTCASE(init_held_wsem)
546 #include "locking-selftest-rsem.h"
547 GENERATE_TESTCASE(init_held_rsem)
548
549 #undef E
550
551 /*
552 * locking an irq-safe lock with irqs enabled:
553 */
554 #define E1() \
555 \
556 IRQ_ENTER(); \
557 LOCK(A); \
558 UNLOCK(A); \
559 IRQ_EXIT();
560
561 #define E2() \
562 \
563 LOCK(A); \
564 UNLOCK(A);
565
566 /*
567 * Generate 24 testcases:
568 */
569 #include "locking-selftest-spin-hardirq.h"
570 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_spin)
571
572 #include "locking-selftest-rlock-hardirq.h"
573 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_rlock)
574
575 #include "locking-selftest-wlock-hardirq.h"
576 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_wlock)
577
578 #include "locking-selftest-spin-softirq.h"
579 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_spin)
580
581 #include "locking-selftest-rlock-softirq.h"
582 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_rlock)
583
584 #include "locking-selftest-wlock-softirq.h"
585 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_wlock)
586
587 #undef E1
588 #undef E2
589
590 /*
591 * Enabling hardirqs with a softirq-safe lock held:
592 */
593 #define E1() \
594 \
595 SOFTIRQ_ENTER(); \
596 LOCK(A); \
597 UNLOCK(A); \
598 SOFTIRQ_EXIT();
599
600 #define E2() \
601 \
602 HARDIRQ_DISABLE(); \
603 LOCK(A); \
604 HARDIRQ_ENABLE(); \
605 UNLOCK(A);
606
607 /*
608 * Generate 12 testcases:
609 */
610 #include "locking-selftest-spin.h"
611 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_spin)
612
613 #include "locking-selftest-wlock.h"
614 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_wlock)
615
616 #include "locking-selftest-rlock.h"
617 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_rlock)
618
619 #undef E1
620 #undef E2
621
622 /*
623 * Enabling irqs with an irq-safe lock held:
624 */
625 #define E1() \
626 \
627 IRQ_ENTER(); \
628 LOCK(A); \
629 UNLOCK(A); \
630 IRQ_EXIT();
631
632 #define E2() \
633 \
634 IRQ_DISABLE(); \
635 LOCK(A); \
636 IRQ_ENABLE(); \
637 UNLOCK(A);
638
639 /*
640 * Generate 24 testcases:
641 */
642 #include "locking-selftest-spin-hardirq.h"
643 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_spin)
644
645 #include "locking-selftest-rlock-hardirq.h"
646 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_rlock)
647
648 #include "locking-selftest-wlock-hardirq.h"
649 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_wlock)
650
651 #include "locking-selftest-spin-softirq.h"
652 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_spin)
653
654 #include "locking-selftest-rlock-softirq.h"
655 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_rlock)
656
657 #include "locking-selftest-wlock-softirq.h"
658 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock)
659
660 #undef E1
661 #undef E2
662
663 /*
664 * Acquiring a irq-unsafe lock while holding an irq-safe-lock:
665 */
666 #define E1() \
667 \
668 LOCK(A); \
669 LOCK(B); \
670 UNLOCK(B); \
671 UNLOCK(A); \
672
673 #define E2() \
674 \
675 LOCK(B); \
676 UNLOCK(B);
677
678 #define E3() \
679 \
680 IRQ_ENTER(); \
681 LOCK(A); \
682 UNLOCK(A); \
683 IRQ_EXIT();
684
685 /*
686 * Generate 36 testcases:
687 */
688 #include "locking-selftest-spin-hardirq.h"
689 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_spin)
690
691 #include "locking-selftest-rlock-hardirq.h"
692 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_rlock)
693
694 #include "locking-selftest-wlock-hardirq.h"
695 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_wlock)
696
697 #include "locking-selftest-spin-softirq.h"
698 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_spin)
699
700 #include "locking-selftest-rlock-softirq.h"
701 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_rlock)
702
703 #include "locking-selftest-wlock-softirq.h"
704 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock)
705
706 #undef E1
707 #undef E2
708 #undef E3
709
710 /*
711 * If a lock turns into softirq-safe, but earlier it took
712 * a softirq-unsafe lock:
713 */
714
715 #define E1() \
716 IRQ_DISABLE(); \
717 LOCK(A); \
718 LOCK(B); \
719 UNLOCK(B); \
720 UNLOCK(A); \
721 IRQ_ENABLE();
722
723 #define E2() \
724 LOCK(B); \
725 UNLOCK(B);
726
727 #define E3() \
728 IRQ_ENTER(); \
729 LOCK(A); \
730 UNLOCK(A); \
731 IRQ_EXIT();
732
733 /*
734 * Generate 36 testcases:
735 */
736 #include "locking-selftest-spin-hardirq.h"
737 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_spin)
738
739 #include "locking-selftest-rlock-hardirq.h"
740 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_rlock)
741
742 #include "locking-selftest-wlock-hardirq.h"
743 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_wlock)
744
745 #include "locking-selftest-spin-softirq.h"
746 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_spin)
747
748 #include "locking-selftest-rlock-softirq.h"
749 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_rlock)
750
751 #include "locking-selftest-wlock-softirq.h"
752 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_wlock)
753
754 #undef E1
755 #undef E2
756 #undef E3
757
758 /*
759 * read-lock / write-lock irq inversion.
760 *
761 * Deadlock scenario:
762 *
763 * CPU#1 is at #1, i.e. it has write-locked A, but has not
764 * taken B yet.
765 *
766 * CPU#2 is at #2, i.e. it has locked B.
767 *
768 * Hardirq hits CPU#2 at point #2 and is trying to read-lock A.
769 *
770 * The deadlock occurs because CPU#1 will spin on B, and CPU#2
771 * will spin on A.
772 */
773
774 #define E1() \
775 \
776 IRQ_DISABLE(); \
777 WL(A); \
778 LOCK(B); \
779 UNLOCK(B); \
780 WU(A); \
781 IRQ_ENABLE();
782
783 #define E2() \
784 \
785 LOCK(B); \
786 UNLOCK(B);
787
788 #define E3() \
789 \
790 IRQ_ENTER(); \
791 RL(A); \
792 RU(A); \
793 IRQ_EXIT();
794
795 /*
796 * Generate 36 testcases:
797 */
798 #include "locking-selftest-spin-hardirq.h"
799 GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_spin)
800
801 #include "locking-selftest-rlock-hardirq.h"
802 GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_rlock)
803
804 #include "locking-selftest-wlock-hardirq.h"
805 GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_wlock)
806
807 #include "locking-selftest-spin-softirq.h"
808 GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_spin)
809
810 #include "locking-selftest-rlock-softirq.h"
811 GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_rlock)
812
813 #include "locking-selftest-wlock-softirq.h"
814 GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_wlock)
815
816 #undef E1
817 #undef E2
818 #undef E3
819
820 /*
821 * read-lock / write-lock recursion that is actually safe.
822 */
823
824 #define E1() \
825 \
826 IRQ_DISABLE(); \
827 WL(A); \
828 WU(A); \
829 IRQ_ENABLE();
830
831 #define E2() \
832 \
833 RL(A); \
834 RU(A); \
835
836 #define E3() \
837 \
838 IRQ_ENTER(); \
839 RL(A); \
840 L(B); \
841 U(B); \
842 RU(A); \
843 IRQ_EXIT();
844
845 /*
846 * Generate 12 testcases:
847 */
848 #include "locking-selftest-hardirq.h"
849 GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_hard)
850
851 #include "locking-selftest-softirq.h"
852 GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_soft)
853
854 #undef E1
855 #undef E2
856 #undef E3
857
858 /*
859 * read-lock / write-lock recursion that is unsafe.
860 */
861
862 #define E1() \
863 \
864 IRQ_DISABLE(); \
865 L(B); \
866 WL(A); \
867 WU(A); \
868 U(B); \
869 IRQ_ENABLE();
870
871 #define E2() \
872 \
873 RL(A); \
874 RU(A); \
875
876 #define E3() \
877 \
878 IRQ_ENTER(); \
879 L(B); \
880 U(B); \
881 IRQ_EXIT();
882
883 /*
884 * Generate 12 testcases:
885 */
886 #include "locking-selftest-hardirq.h"
887 // GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion2_hard)
888
889 #include "locking-selftest-softirq.h"
890 // GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion2_soft)
891
892 #define lockdep_reset()
893 #define lockdep_reset_lock(x)
894
895 #ifdef CONFIG_DEBUG_LOCK_ALLOC
896 # define I_SPINLOCK(x) lockdep_reset_lock(&lock_##x.dep_map)
897 # define I_RWLOCK(x) lockdep_reset_lock(&rwlock_##x.dep_map)
898 # define I_MUTEX(x) lockdep_reset_lock(&mutex_##x.dep_map)
899 # define I_RWSEM(x) lockdep_reset_lock(&rwsem_##x.dep_map)
900 #else
901 # define I_SPINLOCK(x)
902 # define I_RWLOCK(x)
903 # define I_MUTEX(x)
904 # define I_RWSEM(x)
905 #endif
906
907 #define I1(x) \
908 do { \
909 I_SPINLOCK(x); \
910 I_RWLOCK(x); \
911 I_MUTEX(x); \
912 I_RWSEM(x); \
913 } while (0)
914
915 #define I2(x) \
916 do { \
917 spin_lock_init(&lock_##x); \
918 rwlock_init(&rwlock_##x); \
919 mutex_init(&mutex_##x); \
920 init_rwsem(&rwsem_##x); \
921 } while (0)
922
923 static void reset_locks(void)
924 {
925 local_irq_disable();
926 I1(A); I1(B); I1(C); I1(D);
927 I1(X1); I1(X2); I1(Y1); I1(Y2); I1(Z1); I1(Z2);
928 lockdep_reset();
929 I2(A); I2(B); I2(C); I2(D);
930 init_shared_classes();
931 local_irq_enable();
932 }
933
934 #undef I
935
936 static int testcase_total;
937 static int testcase_successes;
938 static int expected_testcase_failures;
939 static int unexpected_testcase_failures;
940
941 static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask)
942 {
943 unsigned long saved_preempt_count = preempt_count();
944 int expected_failure = 0;
945
946 WARN_ON(irqs_disabled());
947
948 testcase_fn();
949 /*
950 * Filter out expected failures:
951 */
952 #ifndef CONFIG_PROVE_LOCKING
953 if ((lockclass_mask & LOCKTYPE_SPIN) && debug_locks != expected)
954 expected_failure = 1;
955 if ((lockclass_mask & LOCKTYPE_RWLOCK) && debug_locks != expected)
956 expected_failure = 1;
957 if ((lockclass_mask & LOCKTYPE_MUTEX) && debug_locks != expected)
958 expected_failure = 1;
959 if ((lockclass_mask & LOCKTYPE_RWSEM) && debug_locks != expected)
960 expected_failure = 1;
961 #endif
962 if (debug_locks != expected) {
963 if (expected_failure) {
964 expected_testcase_failures++;
965 printk("failed|");
966 } else {
967 unexpected_testcase_failures++;
968 printk("FAILED|");
969 }
970 } else {
971 testcase_successes++;
972 printk(" ok |");
973 }
974 testcase_total++;
975
976 if (debug_locks_verbose)
977 printk(" lockclass mask: %x, debug_locks: %d, expected: %d\n",
978 lockclass_mask, debug_locks, expected);
979 /*
980 * Some tests (e.g. double-unlock) might corrupt the preemption
981 * count, so restore it:
982 */
983 preempt_count() = saved_preempt_count;
984 #ifdef CONFIG_TRACE_IRQFLAGS
985 if (softirq_count())
986 current->softirqs_enabled = 0;
987 else
988 current->softirqs_enabled = 1;
989 #endif
990
991 reset_locks();
992 }
993
994 static inline void print_testname(const char *testname)
995 {
996 printk("%33s:", testname);
997 }
998
999 #define DO_TESTCASE_1(desc, name, nr) \
1000 print_testname(desc"/"#nr); \
1001 dotest(name##_##nr, SUCCESS, LOCKTYPE_RWLOCK); \
1002 printk("\n");
1003
1004 #define DO_TESTCASE_1B(desc, name, nr) \
1005 print_testname(desc"/"#nr); \
1006 dotest(name##_##nr, FAILURE, LOCKTYPE_RWLOCK); \
1007 printk("\n");
1008
1009 #define DO_TESTCASE_3(desc, name, nr) \
1010 print_testname(desc"/"#nr); \
1011 dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN); \
1012 dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \
1013 dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \
1014 printk("\n");
1015
1016 #define DO_TESTCASE_3RW(desc, name, nr) \
1017 print_testname(desc"/"#nr); \
1018 dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN|LOCKTYPE_RWLOCK);\
1019 dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \
1020 dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \
1021 printk("\n");
1022
1023 #define DO_TESTCASE_6(desc, name) \
1024 print_testname(desc); \
1025 dotest(name##_spin, FAILURE, LOCKTYPE_SPIN); \
1026 dotest(name##_wlock, FAILURE, LOCKTYPE_RWLOCK); \
1027 dotest(name##_rlock, FAILURE, LOCKTYPE_RWLOCK); \
1028 dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \
1029 dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \
1030 dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \
1031 printk("\n");
1032
1033 #define DO_TESTCASE_6_SUCCESS(desc, name) \
1034 print_testname(desc); \
1035 dotest(name##_spin, SUCCESS, LOCKTYPE_SPIN); \
1036 dotest(name##_wlock, SUCCESS, LOCKTYPE_RWLOCK); \
1037 dotest(name##_rlock, SUCCESS, LOCKTYPE_RWLOCK); \
1038 dotest(name##_mutex, SUCCESS, LOCKTYPE_MUTEX); \
1039 dotest(name##_wsem, SUCCESS, LOCKTYPE_RWSEM); \
1040 dotest(name##_rsem, SUCCESS, LOCKTYPE_RWSEM); \
1041 printk("\n");
1042
1043 /*
1044 * 'read' variant: rlocks must not trigger.
1045 */
1046 #define DO_TESTCASE_6R(desc, name) \
1047 print_testname(desc); \
1048 dotest(name##_spin, FAILURE, LOCKTYPE_SPIN); \
1049 dotest(name##_wlock, FAILURE, LOCKTYPE_RWLOCK); \
1050 dotest(name##_rlock, SUCCESS, LOCKTYPE_RWLOCK); \
1051 dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \
1052 dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \
1053 dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \
1054 printk("\n");
1055
1056 #define DO_TESTCASE_2I(desc, name, nr) \
1057 DO_TESTCASE_1("hard-"desc, name##_hard, nr); \
1058 DO_TESTCASE_1("soft-"desc, name##_soft, nr);
1059
1060 #define DO_TESTCASE_2IB(desc, name, nr) \
1061 DO_TESTCASE_1B("hard-"desc, name##_hard, nr); \
1062 DO_TESTCASE_1B("soft-"desc, name##_soft, nr);
1063
1064 #define DO_TESTCASE_6I(desc, name, nr) \
1065 DO_TESTCASE_3("hard-"desc, name##_hard, nr); \
1066 DO_TESTCASE_3("soft-"desc, name##_soft, nr);
1067
1068 #define DO_TESTCASE_6IRW(desc, name, nr) \
1069 DO_TESTCASE_3RW("hard-"desc, name##_hard, nr); \
1070 DO_TESTCASE_3RW("soft-"desc, name##_soft, nr);
1071
1072 #define DO_TESTCASE_2x3(desc, name) \
1073 DO_TESTCASE_3(desc, name, 12); \
1074 DO_TESTCASE_3(desc, name, 21);
1075
1076 #define DO_TESTCASE_2x6(desc, name) \
1077 DO_TESTCASE_6I(desc, name, 12); \
1078 DO_TESTCASE_6I(desc, name, 21);
1079
1080 #define DO_TESTCASE_6x2(desc, name) \
1081 DO_TESTCASE_2I(desc, name, 123); \
1082 DO_TESTCASE_2I(desc, name, 132); \
1083 DO_TESTCASE_2I(desc, name, 213); \
1084 DO_TESTCASE_2I(desc, name, 231); \
1085 DO_TESTCASE_2I(desc, name, 312); \
1086 DO_TESTCASE_2I(desc, name, 321);
1087
1088 #define DO_TESTCASE_6x2B(desc, name) \
1089 DO_TESTCASE_2IB(desc, name, 123); \
1090 DO_TESTCASE_2IB(desc, name, 132); \
1091 DO_TESTCASE_2IB(desc, name, 213); \
1092 DO_TESTCASE_2IB(desc, name, 231); \
1093 DO_TESTCASE_2IB(desc, name, 312); \
1094 DO_TESTCASE_2IB(desc, name, 321);
1095
1096 #define DO_TESTCASE_6x6(desc, name) \
1097 DO_TESTCASE_6I(desc, name, 123); \
1098 DO_TESTCASE_6I(desc, name, 132); \
1099 DO_TESTCASE_6I(desc, name, 213); \
1100 DO_TESTCASE_6I(desc, name, 231); \
1101 DO_TESTCASE_6I(desc, name, 312); \
1102 DO_TESTCASE_6I(desc, name, 321);
1103
1104 #define DO_TESTCASE_6x6RW(desc, name) \
1105 DO_TESTCASE_6IRW(desc, name, 123); \
1106 DO_TESTCASE_6IRW(desc, name, 132); \
1107 DO_TESTCASE_6IRW(desc, name, 213); \
1108 DO_TESTCASE_6IRW(desc, name, 231); \
1109 DO_TESTCASE_6IRW(desc, name, 312); \
1110 DO_TESTCASE_6IRW(desc, name, 321);
1111
1112
1113 void locking_selftest(void)
1114 {
1115 /*
1116 * Got a locking failure before the selftest ran?
1117 */
1118 if (!debug_locks) {
1119 printk("----------------------------------\n");
1120 printk("| Locking API testsuite disabled |\n");
1121 printk("----------------------------------\n");
1122 return;
1123 }
1124
1125 /*
1126 * Run the testsuite:
1127 */
1128 printk("------------------------\n");
1129 printk("| Locking API testsuite:\n");
1130 printk("----------------------------------------------------------------------------\n");
1131 printk(" | spin |wlock |rlock |mutex | wsem | rsem |\n");
1132 printk(" --------------------------------------------------------------------------\n");
1133
1134 init_shared_classes();
1135 debug_locks_silent = !debug_locks_verbose;
1136
1137 DO_TESTCASE_6("A-A deadlock", AA);
1138 DO_TESTCASE_6R("A-B-B-A deadlock", ABBA);
1139 DO_TESTCASE_6R("A-B-B-C-C-A deadlock", ABBCCA);
1140 DO_TESTCASE_6R("A-B-C-A-B-C deadlock", ABCABC);
1141 DO_TESTCASE_6R("A-B-B-C-C-D-D-A deadlock", ABBCCDDA);
1142 DO_TESTCASE_6R("A-B-C-D-B-D-D-A deadlock", ABCDBDDA);
1143 DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA);
1144 DO_TESTCASE_6("double unlock", double_unlock);
1145 DO_TESTCASE_6("initialize held", init_held);
1146 DO_TESTCASE_6_SUCCESS("bad unlock order", bad_unlock_order);
1147
1148 printk(" --------------------------------------------------------------------------\n");
1149 print_testname("recursive read-lock");
1150 printk(" |");
1151 dotest(rlock_AA1, SUCCESS, LOCKTYPE_RWLOCK);
1152 printk(" |");
1153 dotest(rsem_AA1, FAILURE, LOCKTYPE_RWSEM);
1154 printk("\n");
1155
1156 print_testname("recursive read-lock #2");
1157 printk(" |");
1158 dotest(rlock_AA1B, FAILURE, LOCKTYPE_RWLOCK);
1159 printk(" |");
1160 dotest(rsem_AA1B, FAILURE, LOCKTYPE_RWSEM);
1161 printk("\n");
1162
1163 print_testname("mixed read-write-lock");
1164 printk(" |");
1165 dotest(rlock_AA2, FAILURE, LOCKTYPE_RWLOCK);
1166 printk(" |");
1167 dotest(rsem_AA2, FAILURE, LOCKTYPE_RWSEM);
1168 printk("\n");
1169
1170 print_testname("mixed write-read-lock");
1171 printk(" |");
1172 dotest(rlock_AA3, FAILURE, LOCKTYPE_RWLOCK);
1173 printk(" |");
1174 dotest(rsem_AA3, FAILURE, LOCKTYPE_RWSEM);
1175 printk("\n");
1176
1177 printk(" --------------------------------------------------------------------------\n");
1178
1179 /*
1180 * irq-context testcases:
1181 */
1182 DO_TESTCASE_2x6("irqs-on + irq-safe-A", irqsafe1);
1183 DO_TESTCASE_2x3("sirq-safe-A => hirqs-on", irqsafe2A);
1184 DO_TESTCASE_2x6("safe-A + irqs-on", irqsafe2B);
1185 DO_TESTCASE_6x6("safe-A + unsafe-B #1", irqsafe3);
1186 DO_TESTCASE_6x6("safe-A + unsafe-B #2", irqsafe4);
1187 DO_TESTCASE_6x6RW("irq lock-inversion", irq_inversion);
1188
1189 DO_TESTCASE_6x2("irq read-recursion", irq_read_recursion);
1190 // DO_TESTCASE_6x2B("irq read-recursion #2", irq_read_recursion2);
1191
1192 if (unexpected_testcase_failures) {
1193 printk("-----------------------------------------------------------------\n");
1194 debug_locks = 0;
1195 printk("BUG: %3d unexpected failures (out of %3d) - debugging disabled! |\n",
1196 unexpected_testcase_failures, testcase_total);
1197 printk("-----------------------------------------------------------------\n");
1198 } else if (expected_testcase_failures && testcase_successes) {
1199 printk("--------------------------------------------------------\n");
1200 printk("%3d out of %3d testcases failed, as expected. |\n",
1201 expected_testcase_failures, testcase_total);
1202 printk("----------------------------------------------------\n");
1203 debug_locks = 1;
1204 } else if (expected_testcase_failures && !testcase_successes) {
1205 printk("--------------------------------------------------------\n");
1206 printk("All %3d testcases failed, as expected. |\n",
1207 expected_testcase_failures);
1208 printk("----------------------------------------\n");
1209 debug_locks = 1;
1210 } else {
1211 printk("-------------------------------------------------------\n");
1212 printk("Good, all %3d testcases passed! |\n",
1213 testcase_successes);
1214 printk("---------------------------------\n");
1215 debug_locks = 1;
1216 }
1217 debug_locks_silent = 0;
1218 }
1219