diff options
Diffstat (limited to 'Documentation')
37 files changed, 947 insertions, 4300 deletions
diff --git a/Documentation/Changes b/Documentation/Changes index b02f476c2973..488272074c36 100644 --- a/Documentation/Changes +++ b/Documentation/Changes | |||
@@ -181,8 +181,8 @@ Intel IA32 microcode | |||
181 | -------------------- | 181 | -------------------- |
182 | 182 | ||
183 | A driver has been added to allow updating of Intel IA32 microcode, | 183 | A driver has been added to allow updating of Intel IA32 microcode, |
184 | accessible as both a devfs regular file and as a normal (misc) | 184 | accessible as a normal (misc) character device. If you are not using |
185 | character device. If you are not using devfs you may need to: | 185 | udev you may need to: |
186 | 186 | ||
187 | mkdir /dev/cpu | 187 | mkdir /dev/cpu |
188 | mknod /dev/cpu/microcode c 10 184 | 188 | mknod /dev/cpu/microcode c 10 184 |
@@ -201,7 +201,9 @@ with programs using shared memory. | |||
201 | udev | 201 | udev |
202 | ---- | 202 | ---- |
203 | udev is a userspace application for populating /dev dynamically with | 203 | udev is a userspace application for populating /dev dynamically with |
204 | only entries for devices actually present. udev replaces devfs. | 204 | only entries for devices actually present. udev replaces the basic |
205 | functionality of devfs, while allowing persistant device naming for | ||
206 | devices. | ||
205 | 207 | ||
206 | FUSE | 208 | FUSE |
207 | ---- | 209 | ---- |
@@ -231,18 +233,13 @@ The PPP driver has been restructured to support multilink and to | |||
231 | enable it to operate over diverse media layers. If you use PPP, | 233 | enable it to operate over diverse media layers. If you use PPP, |
232 | upgrade pppd to at least 2.4.0. | 234 | upgrade pppd to at least 2.4.0. |
233 | 235 | ||
234 | If you are not using devfs, you must have the device file /dev/ppp | 236 | If you are not using udev, you must have the device file /dev/ppp |
235 | which can be made by: | 237 | which can be made by: |
236 | 238 | ||
237 | mknod /dev/ppp c 108 0 | 239 | mknod /dev/ppp c 108 0 |
238 | 240 | ||
239 | as root. | 241 | as root. |
240 | 242 | ||
241 | If you use devfsd and build ppp support as modules, you will need | ||
242 | the following in your /etc/devfsd.conf file: | ||
243 | |||
244 | LOOKUP PPP MODLOAD | ||
245 | |||
246 | Isdn4k-utils | 243 | Isdn4k-utils |
247 | ------------ | 244 | ------------ |
248 | 245 | ||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 5a2882d275ba..66e1cf733571 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -10,7 +10,8 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ | |||
10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ | 10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ |
11 | procfs-guide.xml writing_usb_driver.xml \ | 11 | procfs-guide.xml writing_usb_driver.xml \ |
12 | kernel-api.xml journal-api.xml lsm.xml usb.xml \ | 12 | kernel-api.xml journal-api.xml lsm.xml usb.xml \ |
13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml | 13 | gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ |
14 | genericirq.xml | ||
14 | 15 | ||
15 | ### | 16 | ### |
16 | # The build process is as follows (targets): | 17 | # The build process is as follows (targets): |
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl new file mode 100644 index 000000000000..0f4a4b6321e4 --- /dev/null +++ b/Documentation/DocBook/genericirq.tmpl | |||
@@ -0,0 +1,474 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
4 | |||
5 | <book id="Generic-IRQ-Guide"> | ||
6 | <bookinfo> | ||
7 | <title>Linux generic IRQ handling</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Thomas</firstname> | ||
12 | <surname>Gleixner</surname> | ||
13 | <affiliation> | ||
14 | <address> | ||
15 | <email>tglx@linutronix.de</email> | ||
16 | </address> | ||
17 | </affiliation> | ||
18 | </author> | ||
19 | <author> | ||
20 | <firstname>Ingo</firstname> | ||
21 | <surname>Molnar</surname> | ||
22 | <affiliation> | ||
23 | <address> | ||
24 | <email>mingo@elte.hu</email> | ||
25 | </address> | ||
26 | </affiliation> | ||
27 | </author> | ||
28 | </authorgroup> | ||
29 | |||
30 | <copyright> | ||
31 | <year>2005-2006</year> | ||
32 | <holder>Thomas Gleixner</holder> | ||
33 | </copyright> | ||
34 | <copyright> | ||
35 | <year>2005-2006</year> | ||
36 | <holder>Ingo Molnar</holder> | ||
37 | </copyright> | ||
38 | |||
39 | <legalnotice> | ||
40 | <para> | ||
41 | This documentation is free software; you can redistribute | ||
42 | it and/or modify it under the terms of the GNU General Public | ||
43 | License version 2 as published by the Free Software Foundation. | ||
44 | </para> | ||
45 | |||
46 | <para> | ||
47 | This program is distributed in the hope that it will be | ||
48 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
49 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
50 | See the GNU General Public License for more details. | ||
51 | </para> | ||
52 | |||
53 | <para> | ||
54 | You should have received a copy of the GNU General Public | ||
55 | License along with this program; if not, write to the Free | ||
56 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
57 | MA 02111-1307 USA | ||
58 | </para> | ||
59 | |||
60 | <para> | ||
61 | For more details see the file COPYING in the source | ||
62 | distribution of Linux. | ||
63 | </para> | ||
64 | </legalnotice> | ||
65 | </bookinfo> | ||
66 | |||
67 | <toc></toc> | ||
68 | |||
69 | <chapter id="intro"> | ||
70 | <title>Introduction</title> | ||
71 | <para> | ||
72 | The generic interrupt handling layer is designed to provide a | ||
73 | complete abstraction of interrupt handling for device drivers. | ||
74 | It is able to handle all the different types of interrupt controller | ||
75 | hardware. Device drivers use generic API functions to request, enable, | ||
76 | disable and free interrupts. The drivers do not have to know anything | ||
77 | about interrupt hardware details, so they can be used on different | ||
78 | platforms without code changes. | ||
79 | </para> | ||
80 | <para> | ||
81 | This documentation is provided to developers who want to implement | ||
82 | an interrupt subsystem based for their architecture, with the help | ||
83 | of the generic IRQ handling layer. | ||
84 | </para> | ||
85 | </chapter> | ||
86 | |||
87 | <chapter id="rationale"> | ||
88 | <title>Rationale</title> | ||
89 | <para> | ||
90 | The original implementation of interrupt handling in Linux is using | ||
91 | the __do_IRQ() super-handler, which is able to deal with every | ||
92 | type of interrupt logic. | ||
93 | </para> | ||
94 | <para> | ||
95 | Originally, Russell King identified different types of handlers to | ||
96 | build a quite universal set for the ARM interrupt handler | ||
97 | implementation in Linux 2.5/2.6. He distinguished between: | ||
98 | <itemizedlist> | ||
99 | <listitem><para>Level type</para></listitem> | ||
100 | <listitem><para>Edge type</para></listitem> | ||
101 | <listitem><para>Simple type</para></listitem> | ||
102 | </itemizedlist> | ||
103 | In the SMP world of the __do_IRQ() super-handler another type | ||
104 | was identified: | ||
105 | <itemizedlist> | ||
106 | <listitem><para>Per CPU type</para></listitem> | ||
107 | </itemizedlist> | ||
108 | </para> | ||
109 | <para> | ||
110 | This split implementation of highlevel IRQ handlers allows us to | ||
111 | optimize the flow of the interrupt handling for each specific | ||
112 | interrupt type. This reduces complexity in that particular codepath | ||
113 | and allows the optimized handling of a given type. | ||
114 | </para> | ||
115 | <para> | ||
116 | The original general IRQ implementation used hw_interrupt_type | ||
117 | structures and their ->ack(), ->end() [etc.] callbacks to | ||
118 | differentiate the flow control in the super-handler. This leads to | ||
119 | a mix of flow logic and lowlevel hardware logic, and it also leads | ||
120 | to unnecessary code duplication: for example in i386, there is a | ||
121 | ioapic_level_irq and a ioapic_edge_irq irq-type which share many | ||
122 | of the lowlevel details but have different flow handling. | ||
123 | </para> | ||
124 | <para> | ||
125 | A more natural abstraction is the clean separation of the | ||
126 | 'irq flow' and the 'chip details'. | ||
127 | </para> | ||
128 | <para> | ||
129 | Analysing a couple of architecture's IRQ subsystem implementations | ||
130 | reveals that most of them can use a generic set of 'irq flow' | ||
131 | methods and only need to add the chip level specific code. | ||
132 | The separation is also valuable for (sub)architectures | ||
133 | which need specific quirks in the irq flow itself but not in the | ||
134 | chip-details - and thus provides a more transparent IRQ subsystem | ||
135 | design. | ||
136 | </para> | ||
137 | <para> | ||
138 | Each interrupt descriptor is assigned its own highlevel flow | ||
139 | handler, which is normally one of the generic | ||
140 | implementations. (This highlevel flow handler implementation also | ||
141 | makes it simple to provide demultiplexing handlers which can be | ||
142 | found in embedded platforms on various architectures.) | ||
143 | </para> | ||
144 | <para> | ||
145 | The separation makes the generic interrupt handling layer more | ||
146 | flexible and extensible. For example, an (sub)architecture can | ||
147 | use a generic irq-flow implementation for 'level type' interrupts | ||
148 | and add a (sub)architecture specific 'edge type' implementation. | ||
149 | </para> | ||
150 | <para> | ||
151 | To make the transition to the new model easier and prevent the | ||
152 | breakage of existing implementations, the __do_IRQ() super-handler | ||
153 | is still available. This leads to a kind of duality for the time | ||
154 | being. Over time the new model should be used in more and more | ||
155 | architectures, as it enables smaller and cleaner IRQ subsystems. | ||
156 | </para> | ||
157 | </chapter> | ||
158 | <chapter id="bugs"> | ||
159 | <title>Known Bugs And Assumptions</title> | ||
160 | <para> | ||
161 | None (knock on wood). | ||
162 | </para> | ||
163 | </chapter> | ||
164 | |||
165 | <chapter id="Abstraction"> | ||
166 | <title>Abstraction layers</title> | ||
167 | <para> | ||
168 | There are three main levels of abstraction in the interrupt code: | ||
169 | <orderedlist> | ||
170 | <listitem><para>Highlevel driver API</para></listitem> | ||
171 | <listitem><para>Highlevel IRQ flow handlers</para></listitem> | ||
172 | <listitem><para>Chiplevel hardware encapsulation</para></listitem> | ||
173 | </orderedlist> | ||
174 | </para> | ||
175 | <sect1> | ||
176 | <title>Interrupt control flow</title> | ||
177 | <para> | ||
178 | Each interrupt is described by an interrupt descriptor structure | ||
179 | irq_desc. The interrupt is referenced by an 'unsigned int' numeric | ||
180 | value which selects the corresponding interrupt decription structure | ||
181 | in the descriptor structures array. | ||
182 | The descriptor structure contains status information and pointers | ||
183 | to the interrupt flow method and the interrupt chip structure | ||
184 | which are assigned to this interrupt. | ||
185 | </para> | ||
186 | <para> | ||
187 | Whenever an interrupt triggers, the lowlevel arch code calls into | ||
188 | the generic interrupt code by calling desc->handle_irq(). | ||
189 | This highlevel IRQ handling function only uses desc->chip primitives | ||
190 | referenced by the assigned chip descriptor structure. | ||
191 | </para> | ||
192 | </sect1> | ||
193 | <sect1> | ||
194 | <title>Highlevel Driver API</title> | ||
195 | <para> | ||
196 | The highlevel Driver API consists of following functions: | ||
197 | <itemizedlist> | ||
198 | <listitem><para>request_irq()</para></listitem> | ||
199 | <listitem><para>free_irq()</para></listitem> | ||
200 | <listitem><para>disable_irq()</para></listitem> | ||
201 | <listitem><para>enable_irq()</para></listitem> | ||
202 | <listitem><para>disable_irq_nosync() (SMP only)</para></listitem> | ||
203 | <listitem><para>synchronize_irq() (SMP only)</para></listitem> | ||
204 | <listitem><para>set_irq_type()</para></listitem> | ||
205 | <listitem><para>set_irq_wake()</para></listitem> | ||
206 | <listitem><para>set_irq_data()</para></listitem> | ||
207 | <listitem><para>set_irq_chip()</para></listitem> | ||
208 | <listitem><para>set_irq_chip_data()</para></listitem> | ||
209 | </itemizedlist> | ||
210 | See the autogenerated function documentation for details. | ||
211 | </para> | ||
212 | </sect1> | ||
213 | <sect1> | ||
214 | <title>Highlevel IRQ flow handlers</title> | ||
215 | <para> | ||
216 | The generic layer provides a set of pre-defined irq-flow methods: | ||
217 | <itemizedlist> | ||
218 | <listitem><para>handle_level_irq</para></listitem> | ||
219 | <listitem><para>handle_edge_irq</para></listitem> | ||
220 | <listitem><para>handle_simple_irq</para></listitem> | ||
221 | <listitem><para>handle_percpu_irq</para></listitem> | ||
222 | </itemizedlist> | ||
223 | The interrupt flow handlers (either predefined or architecture | ||
224 | specific) are assigned to specific interrupts by the architecture | ||
225 | either during bootup or during device initialization. | ||
226 | </para> | ||
227 | <sect2> | ||
228 | <title>Default flow implementations</title> | ||
229 | <sect3> | ||
230 | <title>Helper functions</title> | ||
231 | <para> | ||
232 | The helper functions call the chip primitives and | ||
233 | are used by the default flow implementations. | ||
234 | The following helper functions are implemented (simplified excerpt): | ||
235 | <programlisting> | ||
236 | default_enable(irq) | ||
237 | { | ||
238 | desc->chip->unmask(irq); | ||
239 | } | ||
240 | |||
241 | default_disable(irq) | ||
242 | { | ||
243 | if (!delay_disable(irq)) | ||
244 | desc->chip->mask(irq); | ||
245 | } | ||
246 | |||
247 | default_ack(irq) | ||
248 | { | ||
249 | chip->ack(irq); | ||
250 | } | ||
251 | |||
252 | default_mask_ack(irq) | ||
253 | { | ||
254 | if (chip->mask_ack) { | ||
255 | chip->mask_ack(irq); | ||
256 | } else { | ||
257 | chip->mask(irq); | ||
258 | chip->ack(irq); | ||
259 | } | ||
260 | } | ||
261 | |||
262 | noop(irq) | ||
263 | { | ||
264 | } | ||
265 | |||
266 | </programlisting> | ||
267 | </para> | ||
268 | </sect3> | ||
269 | </sect2> | ||
270 | <sect2> | ||
271 | <title>Default flow handler implementations</title> | ||
272 | <sect3> | ||
273 | <title>Default Level IRQ flow handler</title> | ||
274 | <para> | ||
275 | handle_level_irq provides a generic implementation | ||
276 | for level-triggered interrupts. | ||
277 | </para> | ||
278 | <para> | ||
279 | The following control flow is implemented (simplified excerpt): | ||
280 | <programlisting> | ||
281 | desc->chip->start(); | ||
282 | handle_IRQ_event(desc->action); | ||
283 | desc->chip->end(); | ||
284 | </programlisting> | ||
285 | </para> | ||
286 | </sect3> | ||
287 | <sect3> | ||
288 | <title>Default Edge IRQ flow handler</title> | ||
289 | <para> | ||
290 | handle_edge_irq provides a generic implementation | ||
291 | for edge-triggered interrupts. | ||
292 | </para> | ||
293 | <para> | ||
294 | The following control flow is implemented (simplified excerpt): | ||
295 | <programlisting> | ||
296 | if (desc->status & running) { | ||
297 | desc->chip->hold(); | ||
298 | desc->status |= pending | masked; | ||
299 | return; | ||
300 | } | ||
301 | desc->chip->start(); | ||
302 | desc->status |= running; | ||
303 | do { | ||
304 | if (desc->status & masked) | ||
305 | desc->chip->enable(); | ||
306 | desc-status &= ~pending; | ||
307 | handle_IRQ_event(desc->action); | ||
308 | } while (status & pending); | ||
309 | desc-status &= ~running; | ||
310 | desc->chip->end(); | ||
311 | </programlisting> | ||
312 | </para> | ||
313 | </sect3> | ||
314 | <sect3> | ||
315 | <title>Default simple IRQ flow handler</title> | ||
316 | <para> | ||
317 | handle_simple_irq provides a generic implementation | ||
318 | for simple interrupts. | ||
319 | </para> | ||
320 | <para> | ||
321 | Note: The simple flow handler does not call any | ||
322 | handler/chip primitives. | ||
323 | </para> | ||
324 | <para> | ||
325 | The following control flow is implemented (simplified excerpt): | ||
326 | <programlisting> | ||
327 | handle_IRQ_event(desc->action); | ||
328 | </programlisting> | ||
329 | </para> | ||
330 | </sect3> | ||
331 | <sect3> | ||
332 | <title>Default per CPU flow handler</title> | ||
333 | <para> | ||
334 | handle_percpu_irq provides a generic implementation | ||
335 | for per CPU interrupts. | ||
336 | </para> | ||
337 | <para> | ||
338 | Per CPU interrupts are only available on SMP and | ||
339 | the handler provides a simplified version without | ||
340 | locking. | ||
341 | </para> | ||
342 | <para> | ||
343 | The following control flow is implemented (simplified excerpt): | ||
344 | <programlisting> | ||
345 | desc->chip->start(); | ||
346 | handle_IRQ_event(desc->action); | ||
347 | desc->chip->end(); | ||
348 | </programlisting> | ||
349 | </para> | ||
350 | </sect3> | ||
351 | </sect2> | ||
352 | <sect2> | ||
353 | <title>Quirks and optimizations</title> | ||
354 | <para> | ||
355 | The generic functions are intended for 'clean' architectures and chips, | ||
356 | which have no platform-specific IRQ handling quirks. If an architecture | ||
357 | needs to implement quirks on the 'flow' level then it can do so by | ||
358 | overriding the highlevel irq-flow handler. | ||
359 | </para> | ||
360 | </sect2> | ||
361 | <sect2> | ||
362 | <title>Delayed interrupt disable</title> | ||
363 | <para> | ||
364 | This per interrupt selectable feature, which was introduced by Russell | ||
365 | King in the ARM interrupt implementation, does not mask an interrupt | ||
366 | at the hardware level when disable_irq() is called. The interrupt is | ||
367 | kept enabled and is masked in the flow handler when an interrupt event | ||
368 | happens. This prevents losing edge interrupts on hardware which does | ||
369 | not store an edge interrupt event while the interrupt is disabled at | ||
370 | the hardware level. When an interrupt arrives while the IRQ_DISABLED | ||
371 | flag is set, then the interrupt is masked at the hardware level and | ||
372 | the IRQ_PENDING bit is set. When the interrupt is re-enabled by | ||
373 | enable_irq() the pending bit is checked and if it is set, the | ||
374 | interrupt is resent either via hardware or by a software resend | ||
375 | mechanism. (It's necessary to enable CONFIG_HARDIRQS_SW_RESEND when | ||
376 | you want to use the delayed interrupt disable feature and your | ||
377 | hardware is not capable of retriggering an interrupt.) | ||
378 | The delayed interrupt disable can be runtime enabled, per interrupt, | ||
379 | by setting the IRQ_DELAYED_DISABLE flag in the irq_desc status field. | ||
380 | </para> | ||
381 | </sect2> | ||
382 | </sect1> | ||
383 | <sect1> | ||
384 | <title>Chiplevel hardware encapsulation</title> | ||
385 | <para> | ||
386 | The chip level hardware descriptor structure irq_chip | ||
387 | contains all the direct chip relevant functions, which | ||
388 | can be utilized by the irq flow implementations. | ||
389 | <itemizedlist> | ||
390 | <listitem><para>ack()</para></listitem> | ||
391 | <listitem><para>mask_ack() - Optional, recommended for performance</para></listitem> | ||
392 | <listitem><para>mask()</para></listitem> | ||
393 | <listitem><para>unmask()</para></listitem> | ||
394 | <listitem><para>retrigger() - Optional</para></listitem> | ||
395 | <listitem><para>set_type() - Optional</para></listitem> | ||
396 | <listitem><para>set_wake() - Optional</para></listitem> | ||
397 | </itemizedlist> | ||
398 | These primitives are strictly intended to mean what they say: ack means | ||
399 | ACK, masking means masking of an IRQ line, etc. It is up to the flow | ||
400 | handler(s) to use these basic units of lowlevel functionality. | ||
401 | </para> | ||
402 | </sect1> | ||
403 | </chapter> | ||
404 | |||
405 | <chapter id="doirq"> | ||
406 | <title>__do_IRQ entry point</title> | ||
407 | <para> | ||
408 | The original implementation __do_IRQ() is an alternative entry | ||
409 | point for all types of interrupts. | ||
410 | </para> | ||
411 | <para> | ||
412 | This handler turned out to be not suitable for all | ||
413 | interrupt hardware and was therefore reimplemented with split | ||
414 | functionality for egde/level/simple/percpu interrupts. This is not | ||
415 | only a functional optimization. It also shortens code paths for | ||
416 | interrupts. | ||
417 | </para> | ||
418 | <para> | ||
419 | To make use of the split implementation, replace the call to | ||
420 | __do_IRQ by a call to desc->chip->handle_irq() and associate | ||
421 | the appropriate handler function to desc->chip->handle_irq(). | ||
422 | In most cases the generic handler implementations should | ||
423 | be sufficient. | ||
424 | </para> | ||
425 | </chapter> | ||
426 | |||
427 | <chapter id="locking"> | ||
428 | <title>Locking on SMP</title> | ||
429 | <para> | ||
430 | The locking of chip registers is up to the architecture that | ||
431 | defines the chip primitives. There is a chip->lock field that can be used | ||
432 | for serialization, but the generic layer does not touch it. The per-irq | ||
433 | structure is protected via desc->lock, by the generic layer. | ||
434 | </para> | ||
435 | </chapter> | ||
436 | <chapter id="structs"> | ||
437 | <title>Structures</title> | ||
438 | <para> | ||
439 | This chapter contains the autogenerated documentation of the structures which are | ||
440 | used in the generic IRQ layer. | ||
441 | </para> | ||
442 | !Iinclude/linux/irq.h | ||
443 | </chapter> | ||
444 | |||
445 | <chapter id="pubfunctions"> | ||
446 | <title>Public Functions Provided</title> | ||
447 | <para> | ||
448 | This chapter contains the autogenerated documentation of the kernel API functions | ||
449 | which are exported. | ||
450 | </para> | ||
451 | !Ekernel/irq/manage.c | ||
452 | !Ekernel/irq/chip.c | ||
453 | </chapter> | ||
454 | |||
455 | <chapter id="intfunctions"> | ||
456 | <title>Internal Functions Provided</title> | ||
457 | <para> | ||
458 | This chapter contains the autogenerated documentation of the internal functions. | ||
459 | </para> | ||
460 | !Ikernel/irq/handle.c | ||
461 | !Ikernel/irq/chip.c | ||
462 | </chapter> | ||
463 | |||
464 | <chapter id="credits"> | ||
465 | <title>Credits</title> | ||
466 | <para> | ||
467 | The following people have contributed to this document: | ||
468 | <orderedlist> | ||
469 | <listitem><para>Thomas Gleixner<email>tglx@linutronix.de</email></para></listitem> | ||
470 | <listitem><para>Ingo Molnar<email>mingo@elte.hu</email></para></listitem> | ||
471 | </orderedlist> | ||
472 | </para> | ||
473 | </chapter> | ||
474 | </book> | ||
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 3630a0d7695f..1ae4dc0fd856 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -348,11 +348,6 @@ X!Earch/i386/kernel/mca.c | |||
348 | </sect1> | 348 | </sect1> |
349 | </chapter> | 349 | </chapter> |
350 | 350 | ||
351 | <chapter id="devfs"> | ||
352 | <title>The Device File System</title> | ||
353 | !Efs/devfs/base.c | ||
354 | </chapter> | ||
355 | |||
356 | <chapter id="sysfs"> | 351 | <chapter id="sysfs"> |
357 | <title>The Filesystem for Exporting Kernel Objects</title> | 352 | <title>The Filesystem for Exporting Kernel Objects</title> |
358 | !Efs/sysfs/file.c | 353 | !Efs/sysfs/file.c |
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 6e463d0db266..999afe1ca8cb 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl | |||
@@ -189,9 +189,9 @@ static unsigned long baseaddr; | |||
189 | <sect1> | 189 | <sect1> |
190 | <title>Partition defines</title> | 190 | <title>Partition defines</title> |
191 | <para> | 191 | <para> |
192 | If you want to divide your device into parititions, then | 192 | If you want to divide your device into partitions, then |
193 | enable the configuration switch CONFIG_MTD_PARITIONS and define | 193 | enable the configuration switch CONFIG_MTD_PARTITIONS and define |
194 | a paritioning scheme suitable to your board. | 194 | a partitioning scheme suitable to your board. |
195 | </para> | 195 | </para> |
196 | <programlisting> | 196 | <programlisting> |
197 | #define NUM_PARTITIONS 2 | 197 | #define NUM_PARTITIONS 2 |
diff --git a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl index fdff984a5161..b629da33951d 100644 --- a/Documentation/DocBook/videobook.tmpl +++ b/Documentation/DocBook/videobook.tmpl | |||
@@ -976,7 +976,7 @@ static int camera_close(struct video_device *dev) | |||
976 | <title>Interrupt Handling</title> | 976 | <title>Interrupt Handling</title> |
977 | <para> | 977 | <para> |
978 | Our example handler is for an ISA bus device. If it was PCI you would be | 978 | Our example handler is for an ISA bus device. If it was PCI you would be |
979 | able to share the interrupt and would have set SA_SHIRQ to indicate a | 979 | able to share the interrupt and would have set IRQF_SHARED to indicate a |
980 | shared IRQ. We pass the device pointer as the interrupt routine argument. We | 980 | shared IRQ. We pass the device pointer as the interrupt routine argument. We |
981 | don't need to since we only support one card but doing this will make it | 981 | don't need to since we only support one card but doing this will make it |
982 | easier to upgrade the driver for multiple devices in the future. | 982 | easier to upgrade the driver for multiple devices in the future. |
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index bf1cf98d2a27..0256805b548f 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt | |||
@@ -10,7 +10,7 @@ standard for controlling intelligent devices that monitor a system. | |||
10 | It provides for dynamic discovery of sensors in the system and the | 10 | It provides for dynamic discovery of sensors in the system and the |
11 | ability to monitor the sensors and be informed when the sensor's | 11 | ability to monitor the sensors and be informed when the sensor's |
12 | values change or go outside certain boundaries. It also has a | 12 | values change or go outside certain boundaries. It also has a |
13 | standardized database for field-replacable units (FRUs) and a watchdog | 13 | standardized database for field-replaceable units (FRUs) and a watchdog |
14 | timer. | 14 | timer. |
15 | 15 | ||
16 | To use this, you need an interface to an IPMI controller in your | 16 | To use this, you need an interface to an IPMI controller in your |
@@ -64,7 +64,7 @@ situation, you need to read the section below named 'The SI Driver' or | |||
64 | IPMI defines a standard watchdog timer. You can enable this with the | 64 | IPMI defines a standard watchdog timer. You can enable this with the |
65 | 'IPMI Watchdog Timer' config option. If you compile the driver into | 65 | 'IPMI Watchdog Timer' config option. If you compile the driver into |
66 | the kernel, then via a kernel command-line option you can have the | 66 | the kernel, then via a kernel command-line option you can have the |
67 | watchdog timer start as soon as it intitializes. It also have a lot | 67 | watchdog timer start as soon as it initializes. It also have a lot |
68 | of other options, see the 'Watchdog' section below for more details. | 68 | of other options, see the 'Watchdog' section below for more details. |
69 | Note that you can also have the watchdog continue to run if it is | 69 | Note that you can also have the watchdog continue to run if it is |
70 | closed (by default it is disabled on close). Go into the 'Watchdog | 70 | closed (by default it is disabled on close). Go into the 'Watchdog |
diff --git a/Documentation/IRQ.txt b/Documentation/IRQ.txt new file mode 100644 index 000000000000..1011e7175021 --- /dev/null +++ b/Documentation/IRQ.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | What is an IRQ? | ||
2 | |||
3 | An IRQ is an interrupt request from a device. | ||
4 | Currently they can come in over a pin, or over a packet. | ||
5 | Several devices may be connected to the same pin thus | ||
6 | sharing an IRQ. | ||
7 | |||
8 | An IRQ number is a kernel identifier used to talk about a hardware | ||
9 | interrupt source. Typically this is an index into the global irq_desc | ||
10 | array, but except for what linux/interrupt.h implements the details | ||
11 | are architecture specific. | ||
12 | |||
13 | An IRQ number is an enumeration of the possible interrupt sources on a | ||
14 | machine. Typically what is enumerated is the number of input pins on | ||
15 | all of the interrupt controller in the system. In the case of ISA | ||
16 | what is enumerated are the 16 input pins on the two i8259 interrupt | ||
17 | controllers. | ||
18 | |||
19 | Architectures can assign additional meaning to the IRQ numbers, and | ||
20 | are encouraged to in the case where there is any manual configuration | ||
21 | of the hardware involved. The ISA IRQs are a classic example of | ||
22 | assigning this kind of additional meaning. | ||
diff --git a/Documentation/README.DAC960 b/Documentation/README.DAC960 index 98ea617a0dd6..0e8f618ab534 100644 --- a/Documentation/README.DAC960 +++ b/Documentation/README.DAC960 | |||
@@ -78,9 +78,9 @@ also known as "System Drives", and Drive Groups are also called "Packs". Both | |||
78 | terms are in use in the Mylex documentation; I have chosen to standardize on | 78 | terms are in use in the Mylex documentation; I have chosen to standardize on |
79 | the more generic "Logical Drive" and "Drive Group". | 79 | the more generic "Logical Drive" and "Drive Group". |
80 | 80 | ||
81 | DAC960 RAID disk devices are named in the style of the Device File System | 81 | DAC960 RAID disk devices are named in the style of the obsolete Device File |
82 | (DEVFS). The device corresponding to Logical Drive D on Controller C is | 82 | System (DEVFS). The device corresponding to Logical Drive D on Controller C |
83 | referred to as /dev/rd/cCdD, and the partitions are called /dev/rd/cCdDp1 | 83 | is referred to as /dev/rd/cCdD, and the partitions are called /dev/rd/cCdDp1 |
84 | through /dev/rd/cCdDp7. For example, partition 3 of Logical Drive 5 on | 84 | through /dev/rd/cCdDp7. For example, partition 3 of Logical Drive 5 on |
85 | Controller 2 is referred to as /dev/rd/c2d5p3. Note that unlike with SCSI | 85 | Controller 2 is referred to as /dev/rd/c2d5p3. Note that unlike with SCSI |
86 | disks the device names will not change in the event of a disk drive failure. | 86 | disks the device names will not change in the event of a disk drive failure. |
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx index d4c6d3aa0c25..43edb4ecf27d 100644 --- a/Documentation/arm/IXP4xx +++ b/Documentation/arm/IXP4xx | |||
@@ -85,7 +85,7 @@ IXP4xx provides two methods of accessing PCI memory space: | |||
85 | 2) If > 64MB of memory space is required, the IXP4xx can be | 85 | 2) If > 64MB of memory space is required, the IXP4xx can be |
86 | configured to use indirect registers to access PCI This allows | 86 | configured to use indirect registers to access PCI This allows |
87 | for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. | 87 | for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. |
88 | The disadvantadge of this is that every PCI access requires | 88 | The disadvantage of this is that every PCI access requires |
89 | three local register accesses plus a spinlock, but in some | 89 | three local register accesses plus a spinlock, but in some |
90 | cases the performance hit is acceptable. In addition, you cannot | 90 | cases the performance hit is acceptable. In addition, you cannot |
91 | mmap() PCI devices in this case due to the indirect nature | 91 | mmap() PCI devices in this case due to the indirect nature |
diff --git a/Documentation/digiepca.txt b/Documentation/digiepca.txt index 88820fe38dad..f2560e22f2c9 100644 --- a/Documentation/digiepca.txt +++ b/Documentation/digiepca.txt | |||
@@ -2,7 +2,7 @@ NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at | |||
2 | http://www.digi.com for PCI cards. They no longer maintain this driver, | 2 | http://www.digi.com for PCI cards. They no longer maintain this driver, |
3 | and have no 2.6 driver for ISA cards. | 3 | and have no 2.6 driver for ISA cards. |
4 | 4 | ||
5 | This driver requires a number of user-space tools. They can be aquired from | 5 | This driver requires a number of user-space tools. They can be acquired from |
6 | http://www.digi.com, but only works with 2.4 kernels. | 6 | http://www.digi.com, but only works with 2.4 kernels. |
7 | 7 | ||
8 | 8 | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 027285d0c26c..99f219a01e0e 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -6,17 +6,6 @@ be removed from this file. | |||
6 | 6 | ||
7 | --------------------------- | 7 | --------------------------- |
8 | 8 | ||
9 | What: devfs | ||
10 | When: July 2005 | ||
11 | Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfs | ||
12 | function calls throughout the kernel tree | ||
13 | Why: It has been unmaintained for a number of years, has unfixable | ||
14 | races, contains a naming policy within the kernel that is | ||
15 | against the LSB, and can be replaced by using udev. | ||
16 | Who: Greg Kroah-Hartman <greg@kroah.com> | ||
17 | |||
18 | --------------------------- | ||
19 | |||
20 | What: RAW driver (CONFIG_RAW_DRIVER) | 9 | What: RAW driver (CONFIG_RAW_DRIVER) |
21 | When: December 2005 | 10 | When: December 2005 |
22 | Why: declared obsolete since kernel 2.6.3 | 11 | Why: declared obsolete since kernel 2.6.3 |
@@ -132,16 +121,6 @@ Who: NeilBrown <neilb@suse.de> | |||
132 | 121 | ||
133 | --------------------------- | 122 | --------------------------- |
134 | 123 | ||
135 | What: au1x00_uart driver | ||
136 | When: January 2006 | ||
137 | Why: The 8250 serial driver now has the ability to deal with the differences | ||
138 | between the standard 8250 family of UARTs and their slightly strange | ||
139 | brother on Alchemy SOCs. The loss of features is not considered an | ||
140 | issue. | ||
141 | Who: Ralf Baechle <ralf@linux-mips.org> | ||
142 | |||
143 | --------------------------- | ||
144 | |||
145 | What: eepro100 network driver | 124 | What: eepro100 network driver |
146 | When: January 2007 | 125 | When: January 2007 |
147 | Why: replaced by the e100 driver | 126 | Why: replaced by the e100 driver |
@@ -177,6 +156,16 @@ Who: Jean Delvare <khali@linux-fr.org> | |||
177 | 156 | ||
178 | --------------------------- | 157 | --------------------------- |
179 | 158 | ||
159 | What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports | ||
160 | (temporary transition config option provided until then) | ||
161 | The transition config option will also be removed at the same time. | ||
162 | When: before 2.6.19 | ||
163 | Why: Unused symbols are both increasing the size of the kernel binary | ||
164 | and are often a sign of "wrong API" | ||
165 | Who: Arjan van de Ven <arjan@linux.intel.com> | ||
166 | |||
167 | --------------------------- | ||
168 | |||
180 | What: remove EXPORT_SYMBOL(tasklist_lock) | 169 | What: remove EXPORT_SYMBOL(tasklist_lock) |
181 | When: August 2006 | 170 | When: August 2006 |
182 | Files: kernel/fork.c | 171 | Files: kernel/fork.c |
@@ -224,3 +213,56 @@ Why: The interface no longer has any callers left in the kernel. It | |||
224 | Who: Nick Piggin <npiggin@suse.de> | 213 | Who: Nick Piggin <npiggin@suse.de> |
225 | 214 | ||
226 | --------------------------- | 215 | --------------------------- |
216 | |||
217 | What: Support for the MIPS EV96100 evaluation board | ||
218 | When: September 2006 | ||
219 | Why: Does no longer build since at least November 15, 2003, apparently | ||
220 | no userbase left. | ||
221 | Who: Ralf Baechle <ralf@linux-mips.org> | ||
222 | |||
223 | --------------------------- | ||
224 | |||
225 | What: Support for the Momentum / PMC-Sierra Jaguar ATX evaluation board | ||
226 | When: September 2006 | ||
227 | Why: Does no longer build since quite some time, and was never popular, | ||
228 | due to the platform being replaced by successor models. Apparently | ||
229 | no user base left. It also is one of the last users of | ||
230 | WANT_PAGE_VIRTUAL. | ||
231 | Who: Ralf Baechle <ralf@linux-mips.org> | ||
232 | |||
233 | --------------------------- | ||
234 | |||
235 | What: Support for the Momentum Ocelot, Ocelot 3, Ocelot C and Ocelot G | ||
236 | When: September 2006 | ||
237 | Why: Some do no longer build and apparently there is no user base left | ||
238 | for these platforms. | ||
239 | Who: Ralf Baechle <ralf@linux-mips.org> | ||
240 | |||
241 | --------------------------- | ||
242 | |||
243 | What: Support for MIPS Technologies' Altas and SEAD evaluation board | ||
244 | When: September 2006 | ||
245 | Why: Some do no longer build and apparently there is no user base left | ||
246 | for these platforms. Hardware out of production since several years. | ||
247 | Who: Ralf Baechle <ralf@linux-mips.org> | ||
248 | |||
249 | --------------------------- | ||
250 | |||
251 | What: Support for the IT8172-based platforms, ITE 8172G and Globespan IVR | ||
252 | When: September 2006 | ||
253 | Why: Code does no longer build since at least 2.6.0, apparently there is | ||
254 | no user base left for these platforms. Hardware out of production | ||
255 | since several years and hardly a trace of the manufacturer left on | ||
256 | the net. | ||
257 | Who: Ralf Baechle <ralf@linux-mips.org> | ||
258 | |||
259 | --------------------------- | ||
260 | |||
261 | What: Interrupt only SA_* flags | ||
262 | When: Januar 2007 | ||
263 | Why: The interrupt related SA_* flags are replaced by IRQF_* to move them | ||
264 | out of the signal namespace. | ||
265 | |||
266 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
267 | |||
268 | --------------------------- | ||
diff --git a/Documentation/filesystems/configfs/configfs_example.c b/Documentation/filesystems/configfs/configfs_example.c index 3d4713a6c207..2d6a14a463e0 100644 --- a/Documentation/filesystems/configfs/configfs_example.c +++ b/Documentation/filesystems/configfs/configfs_example.c | |||
@@ -264,6 +264,15 @@ static struct config_item_type simple_child_type = { | |||
264 | }; | 264 | }; |
265 | 265 | ||
266 | 266 | ||
267 | struct simple_children { | ||
268 | struct config_group group; | ||
269 | }; | ||
270 | |||
271 | static inline struct simple_children *to_simple_children(struct config_item *item) | ||
272 | { | ||
273 | return item ? container_of(to_config_group(item), struct simple_children, group) : NULL; | ||
274 | } | ||
275 | |||
267 | static struct config_item *simple_children_make_item(struct config_group *group, const char *name) | 276 | static struct config_item *simple_children_make_item(struct config_group *group, const char *name) |
268 | { | 277 | { |
269 | struct simple_child *simple_child; | 278 | struct simple_child *simple_child; |
@@ -304,7 +313,13 @@ static ssize_t simple_children_attr_show(struct config_item *item, | |||
304 | "items have only one attribute that is readable and writeable.\n"); | 313 | "items have only one attribute that is readable and writeable.\n"); |
305 | } | 314 | } |
306 | 315 | ||
316 | static void simple_children_release(struct config_item *item) | ||
317 | { | ||
318 | kfree(to_simple_children(item)); | ||
319 | } | ||
320 | |||
307 | static struct configfs_item_operations simple_children_item_ops = { | 321 | static struct configfs_item_operations simple_children_item_ops = { |
322 | .release = simple_children_release, | ||
308 | .show_attribute = simple_children_attr_show, | 323 | .show_attribute = simple_children_attr_show, |
309 | }; | 324 | }; |
310 | 325 | ||
@@ -345,10 +360,6 @@ static struct configfs_subsystem simple_children_subsys = { | |||
345 | * children of its own. | 360 | * children of its own. |
346 | */ | 361 | */ |
347 | 362 | ||
348 | struct simple_children { | ||
349 | struct config_group group; | ||
350 | }; | ||
351 | |||
352 | static struct config_group *group_children_make_group(struct config_group *group, const char *name) | 363 | static struct config_group *group_children_make_group(struct config_group *group, const char *name) |
353 | { | 364 | { |
354 | struct simple_children *simple_children; | 365 | struct simple_children *simple_children; |
diff --git a/Documentation/filesystems/devfs/ChangeLog b/Documentation/filesystems/devfs/ChangeLog deleted file mode 100644 index e5aba5246d7c..000000000000 --- a/Documentation/filesystems/devfs/ChangeLog +++ /dev/null | |||
@@ -1,1977 +0,0 @@ | |||
1 | /* -*- auto-fill -*- */ | ||
2 | =============================================================================== | ||
3 | Changes for patch v1 | ||
4 | |||
5 | - creation of devfs | ||
6 | |||
7 | - modified miscellaneous character devices to support devfs | ||
8 | =============================================================================== | ||
9 | Changes for patch v2 | ||
10 | |||
11 | - bug fix with manual inode creation | ||
12 | =============================================================================== | ||
13 | Changes for patch v3 | ||
14 | |||
15 | - bugfixes | ||
16 | |||
17 | - documentation improvements | ||
18 | |||
19 | - created a couple of scripts (one to save&restore a devfs and the | ||
20 | other to set up compatibility symlinks) | ||
21 | |||
22 | - devfs support for SCSI discs. New name format is: sd_hHcCiIlL | ||
23 | =============================================================================== | ||
24 | Changes for patch v4 | ||
25 | |||
26 | - bugfix for the directory reading code | ||
27 | |||
28 | - bugfix for compilation with kerneld | ||
29 | |||
30 | - devfs support for generic hard discs | ||
31 | |||
32 | - rationalisation of the various watchdog drivers | ||
33 | =============================================================================== | ||
34 | Changes for patch v5 | ||
35 | |||
36 | - support for mounting directly from entries in the devfs (it doesn't | ||
37 | need to be mounted to do this), including the root filesystem. | ||
38 | Mounting of swap partitions also works. Hence, now if you set | ||
39 | CONFIG_DEVFS_ONLY to 'Y' then you won't be able to access your discs | ||
40 | via ordinary device nodes. Naturally, the default is 'N' so that you | ||
41 | can still use your old device nodes. If you want to mount from devfs | ||
42 | entries, make sure you use: append = "root=/dev/sd_..." in your | ||
43 | lilo.conf. It seems LILO looks for the device number (major&minor) | ||
44 | and writes that into the kernel image :-( | ||
45 | |||
46 | - support for character memory devices (/dev/null, /dev/zero, /dev/full | ||
47 | and so on). Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
48 | =============================================================================== | ||
49 | Changes for patch v6 | ||
50 | |||
51 | - support for subdirectories | ||
52 | |||
53 | - support for symbolic links (created by devfs_mk_symlink(), no | ||
54 | support yet for creation via symlink(2)) | ||
55 | |||
56 | - SCSI disc naming now cast in stone, with the format: | ||
57 | /dev/sd/c0b1t2u3 controller=0, bus=1, ID=2, LUN=3, whole disc | ||
58 | /dev/sd/c0b1t2u3p4 controller=0, bus=1, ID=2, LUN=3, 4th partition | ||
59 | |||
60 | - loop devices now appear in devfs | ||
61 | |||
62 | - tty devices, console, serial ports, etc. now appear in devfs | ||
63 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
64 | |||
65 | - bugs with mounting devfs-only devices now fixed | ||
66 | =============================================================================== | ||
67 | Changes for patch v7 | ||
68 | |||
69 | - SCSI CD-ROMS, tapes and generic devices now appear in devfs | ||
70 | =============================================================================== | ||
71 | Changes for patch v8 | ||
72 | |||
73 | - bugfix with no-rewind SCSI tapes | ||
74 | |||
75 | - RAMDISCs now appear in devfs | ||
76 | |||
77 | - better cleaning up of devfs entries created by various modules | ||
78 | |||
79 | - interface change to <devfs_register> | ||
80 | =============================================================================== | ||
81 | Changes for patch v9 | ||
82 | |||
83 | - the v8 patch was corrupted somehow, which would affect the patch for | ||
84 | linux/fs/filesystems.c | ||
85 | I've also fixed the v8 patch file on the WWW | ||
86 | |||
87 | - MetaDevices (/dev/md*) should now appear in devfs | ||
88 | =============================================================================== | ||
89 | Changes for patch v10 | ||
90 | |||
91 | - bugfix in meta device support for devfs | ||
92 | |||
93 | - created this ChangeLog file | ||
94 | |||
95 | - added devfs support to the floppy driver | ||
96 | |||
97 | - added support for creating sockets in a devfs | ||
98 | =============================================================================== | ||
99 | Changes for patch v11 | ||
100 | |||
101 | - added DEVFS_FL_HIDE_UNREG flag | ||
102 | |||
103 | - incorporated better patch for ttyname() in libc 5.4.43 from H.J. Lu. | ||
104 | |||
105 | - interface change to <devfs_mk_symlink> | ||
106 | |||
107 | - support for creating symlinks with symlink(2) | ||
108 | |||
109 | - parallel port printer (/dev/lp*) now appears in devfs | ||
110 | =============================================================================== | ||
111 | Changes for patch v12 | ||
112 | |||
113 | - added inode check to <devfs_fill_file> function | ||
114 | |||
115 | - improved devfs support when mounting from devfs | ||
116 | |||
117 | - added call to <<release>> operation when removing swap areas on | ||
118 | devfs devices | ||
119 | |||
120 | - increased NR_SUPER to 128 to support large numbers of devfs mounts | ||
121 | (for chroot(2) gaols) | ||
122 | |||
123 | - fixed bug in SCSI disc support: was generating incorrect minors if | ||
124 | SCSI ID's did not start at 0 and increase by 1 | ||
125 | |||
126 | - support symlink traversal when mounting root | ||
127 | =============================================================================== | ||
128 | Changes for patch v13 | ||
129 | |||
130 | - added devfs support to soundcard driver | ||
131 | Thanks to Eric Dumas <dumas@linux.eu.org> and | ||
132 | C. Scott Ananian <cananian@alumni.princeton.edu> | ||
133 | |||
134 | - added devfs support to the joystick driver | ||
135 | |||
136 | - loop driver now has it's own subdirectory "/dev/loop/" | ||
137 | |||
138 | - created <devfs_get_flags> and <devfs_set_flags> functions | ||
139 | |||
140 | - fix problem with SCSI disc compatibility names (sd{a,b,c,d,e,f}) | ||
141 | which assumes ID's start at 0 and increase by 1. Also only create | ||
142 | devfs entries for SCSI disc partitions which actually exist | ||
143 | Show new names in partition check | ||
144 | Thanks to Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> | ||
145 | =============================================================================== | ||
146 | Changes for patch v14 | ||
147 | |||
148 | - bug fix in floppy driver: would not compile without | ||
149 | CONFIG_DEVFS_FS='Y' | ||
150 | Thanks to Jurgen Botz <jbotz@nova.botz.org> | ||
151 | |||
152 | - bug fix in loop driver | ||
153 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
154 | |||
155 | - do not create devfs entries for printers not configured | ||
156 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
157 | |||
158 | - do not create devfs entries for serial ports not present | ||
159 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
160 | |||
161 | - ensure <tty_register_devfs> is exported from tty_io.c | ||
162 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
163 | |||
164 | - allow unregistering of devfs symlink entries | ||
165 | |||
166 | - fixed bug in SCSI disc naming introduced in last patch version | ||
167 | =============================================================================== | ||
168 | Changes for patch v15 | ||
169 | |||
170 | - ported to kernel 2.1.81 | ||
171 | =============================================================================== | ||
172 | Changes for patch v16 | ||
173 | |||
174 | - created <devfs_set_symlink_destination> function | ||
175 | |||
176 | - moved DEVFS_SUPER_MAGIC into header file | ||
177 | |||
178 | - added DEVFS_FL_HIDE flag | ||
179 | |||
180 | - created <devfs_get_maj_min> | ||
181 | |||
182 | - created <devfs_get_handle_from_inode> | ||
183 | |||
184 | - fixed bugs in searching by major&minor | ||
185 | |||
186 | - changed interface to <devfs_unregister>, <devfs_fill_file> and | ||
187 | <devfs_find_handle> | ||
188 | |||
189 | - fixed inode times when symlink created with symlink(2) | ||
190 | |||
191 | - change tty driver to do auto-creation of devfs entries | ||
192 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
193 | |||
194 | - fixed bug in genhd.c: whole disc (non-SCSI) was not registered to | ||
195 | devfs | ||
196 | |||
197 | - updated libc 5.4.43 patch for ttyname() | ||
198 | =============================================================================== | ||
199 | Changes for patch v17 | ||
200 | |||
201 | - added CONFIG_DEVFS_TTY_COMPAT | ||
202 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
203 | |||
204 | - bugfix in devfs support for drivers/char/lp.c | ||
205 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
206 | |||
207 | - clean up serial driver so that PCMCIA devices unregister correctly | ||
208 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
209 | |||
210 | - fixed bug in genhd.c: whole disc (non-SCSI) was not registered to | ||
211 | devfs [was missing in patch v16] | ||
212 | |||
213 | - updated libc 5.4.43 patch for ttyname() [was missing in patch v16] | ||
214 | |||
215 | - all SCSI devices now registered in /dev/sg | ||
216 | |||
217 | - support removal of devfs entries via unlink(2) | ||
218 | =============================================================================== | ||
219 | Changes for patch v18 | ||
220 | |||
221 | - added floppy/?u720 floppy entry | ||
222 | |||
223 | - fixed kerneld support for entries in devfs subdirectories | ||
224 | |||
225 | - incorporated latest patch for ttyname() in libc 5.4.43 from H.J. Lu. | ||
226 | =============================================================================== | ||
227 | Changes for patch v19 | ||
228 | |||
229 | - bug fix when looking up unregistered entries: kerneld was not called | ||
230 | |||
231 | - fixes for kernel 2.1.86 (now requires 2.1.86) | ||
232 | =============================================================================== | ||
233 | Changes for patch v20 | ||
234 | |||
235 | - only create available floppy entries | ||
236 | Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> | ||
237 | |||
238 | - new IDE naming scheme following SCSI format (i.e. /dev/id/c0b0t0u0p1 | ||
239 | instead of /dev/hda1) | ||
240 | Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> | ||
241 | |||
242 | - new XT disc naming scheme following SCSI format (i.e. /dev/xd/c0t0p1 | ||
243 | instead of /dev/xda1) | ||
244 | Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> | ||
245 | |||
246 | - new non-standard CD-ROM names (i.e. /dev/sbp/c#t#) | ||
247 | Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> | ||
248 | |||
249 | - allow symlink traversal when mounting the root filesystem | ||
250 | |||
251 | - Create entries for MD devices at MD init | ||
252 | Thanks to Christophe Leroy <christophe.leroy5@capway.com> | ||
253 | =============================================================================== | ||
254 | Changes for patch v21 | ||
255 | |||
256 | - ported to kernel 2.1.91 | ||
257 | =============================================================================== | ||
258 | Changes for patch v22 | ||
259 | |||
260 | - SCSI host number patch ("scsihosts=" kernel option) | ||
261 | Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> | ||
262 | =============================================================================== | ||
263 | Changes for patch v23 | ||
264 | |||
265 | - Fixed persistence bug with device numbers for manually created | ||
266 | device files | ||
267 | |||
268 | - Fixed problem with recreating symlinks with different content | ||
269 | |||
270 | - Added CONFIG_DEVFS_MOUNT (mount devfs on /dev at boot time) | ||
271 | =============================================================================== | ||
272 | Changes for patch v24 | ||
273 | |||
274 | - Switched from CONFIG_KERNELD to CONFIG_KMOD: module autoloading | ||
275 | should now work again | ||
276 | |||
277 | - Hide entries which are manually unlinked | ||
278 | |||
279 | - Always invalidate devfs dentry cache when registering entries | ||
280 | |||
281 | - Support removal of devfs directories via rmdir(2) | ||
282 | |||
283 | - Ensure directories created by <devfs_mk_dir> are visible | ||
284 | |||
285 | - Default no access for "other" for floppy device | ||
286 | =============================================================================== | ||
287 | Changes for patch v25 | ||
288 | |||
289 | - Updates to CREDITS file and minor IDE numbering change | ||
290 | Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> | ||
291 | |||
292 | - Invalidate devfs dentry cache when making directories | ||
293 | |||
294 | - Invalidate devfs dentry cache when removing entries | ||
295 | |||
296 | - More informative message if root FS mount fails when devfs | ||
297 | configured | ||
298 | |||
299 | - Fixed persistence bug with fifos | ||
300 | =============================================================================== | ||
301 | Changes for patch v26 | ||
302 | |||
303 | - ported to kernel 2.1.97 | ||
304 | |||
305 | - Changed serial directory from "/dev/serial" to "/dev/tts" and | ||
306 | "/dev/consoles" to "/dev/vc" to be more friendly to new procps | ||
307 | =============================================================================== | ||
308 | Changes for patch v27 | ||
309 | |||
310 | - Added support for IDE4 and IDE5 | ||
311 | Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> | ||
312 | |||
313 | - Documented "scsihosts=" boot parameter | ||
314 | |||
315 | - Print process command when debugging kerneld/kmod | ||
316 | |||
317 | - Added debugging for register/unregister/change operations | ||
318 | |||
319 | - Added "devfs=" boot options | ||
320 | |||
321 | - Hide unregistered entries by default | ||
322 | =============================================================================== | ||
323 | Changes for patch v28 | ||
324 | |||
325 | - No longer lock/unlock superblock in <devfs_put_super> (cope with | ||
326 | recent VFS interface change) | ||
327 | |||
328 | - Do not automatically change ownership/protection of /dev/tty | ||
329 | |||
330 | - Drop negative dentries when they are released | ||
331 | |||
332 | - Manage dcache more efficiently | ||
333 | =============================================================================== | ||
334 | Changes for patch v29 | ||
335 | |||
336 | - Added DEVFS_FL_AUTO_DEVNUM flag | ||
337 | =============================================================================== | ||
338 | Changes for patch v30 | ||
339 | |||
340 | - No longer set unnecessary methods | ||
341 | |||
342 | - Ported to kernel 2.1.99-pre3 | ||
343 | =============================================================================== | ||
344 | Changes for patch v31 | ||
345 | |||
346 | - Added PID display to <call_kerneld> debugging message | ||
347 | |||
348 | - Added "diread" and "diwrite" options | ||
349 | |||
350 | - Ported to kernel 2.1.102 | ||
351 | |||
352 | - Fixed persistence problem with permissions | ||
353 | =============================================================================== | ||
354 | Changes for patch v32 | ||
355 | |||
356 | - Fixed devfs support in drivers/block/md.c | ||
357 | =============================================================================== | ||
358 | Changes for patch v33 | ||
359 | |||
360 | - Support legacy device nodes | ||
361 | |||
362 | - Fixed bug where recreated inodes were hidden | ||
363 | |||
364 | - New IDE naming scheme: everything is under /dev/ide | ||
365 | =============================================================================== | ||
366 | Changes for patch v34 | ||
367 | |||
368 | - Improved debugging in <get_vfs_inode> | ||
369 | |||
370 | - Prevent duplicate calls to <devfs_mk_dir> in SCSI layer | ||
371 | |||
372 | - No longer free old dentries in <devfs_mk_dir> | ||
373 | |||
374 | - Free all dentries for a given entry when deleting inodes | ||
375 | =============================================================================== | ||
376 | Changes for patch v35 | ||
377 | |||
378 | - Ported to kernel 2.1.105 (sound driver changes) | ||
379 | =============================================================================== | ||
380 | Changes for patch v36 | ||
381 | |||
382 | - Fixed sound driver port | ||
383 | =============================================================================== | ||
384 | Changes for patch v37 | ||
385 | |||
386 | - Minor documentation tweaks | ||
387 | =============================================================================== | ||
388 | Changes for patch v38 | ||
389 | |||
390 | - More documentation tweaks | ||
391 | |||
392 | - Fix for sound driver port | ||
393 | |||
394 | - Removed ttyname-patch (grab libc 5.4.44 instead) | ||
395 | |||
396 | - Ported to kernel 2.1.107-pre2 (loop driver fix) | ||
397 | =============================================================================== | ||
398 | Changes for patch v39 | ||
399 | |||
400 | - Ported to kernel 2.1.107 (hd.c hunk broke due to spelling "fixes"). Sigh | ||
401 | |||
402 | - Removed many #ifdef's, replaced with trickery in include/devfs_fs.h | ||
403 | =============================================================================== | ||
404 | Changes for patch v40 | ||
405 | |||
406 | - Fix for sound driver port | ||
407 | |||
408 | - Limit auto-device numbering to majors 128 to 239 | ||
409 | =============================================================================== | ||
410 | Changes for patch v41 | ||
411 | |||
412 | - Fixed inode times persistence problem | ||
413 | =============================================================================== | ||
414 | Changes for patch v42 | ||
415 | |||
416 | - Ported to kernel 2.1.108 (drivers/scsi/hosts.c hunk broke) | ||
417 | =============================================================================== | ||
418 | Changes for patch v43 | ||
419 | |||
420 | - Fixed spelling in <devfs_readlink> debug | ||
421 | |||
422 | - Fixed bug in <devfs_setup> parsing "dilookup" | ||
423 | |||
424 | - More #ifdef's removed | ||
425 | |||
426 | - Supported Sparc keyboard (/dev/kbd) | ||
427 | |||
428 | - Supported DSP56001 digital signal processor (/dev/dsp56k) | ||
429 | |||
430 | - Supported Apple Desktop Bus (/dev/adb) | ||
431 | |||
432 | - Supported Coda network file system (/dev/cfs*) | ||
433 | =============================================================================== | ||
434 | Changes for patch v44 | ||
435 | |||
436 | - Fixed devfs inode leak when manually recreating inodes | ||
437 | |||
438 | - Fixed permission persistence problem when recreating inodes | ||
439 | =============================================================================== | ||
440 | Changes for patch v45 | ||
441 | |||
442 | - Ported to kernel 2.1.110 | ||
443 | =============================================================================== | ||
444 | Changes for patch v46 | ||
445 | |||
446 | - Ported to kernel 2.1.112-pre1 | ||
447 | |||
448 | - Removed harmless "unused variable" compiler warning | ||
449 | |||
450 | - Fixed modes for manually recreated device nodes | ||
451 | =============================================================================== | ||
452 | Changes for patch v47 | ||
453 | |||
454 | - Added NULL devfs inode warning in <devfs_read_inode> | ||
455 | |||
456 | - Force all inode nlink values to 1 | ||
457 | =============================================================================== | ||
458 | Changes for patch v48 | ||
459 | |||
460 | - Added "dimknod" option | ||
461 | |||
462 | - Set inode nlink to 0 when freeing dentries | ||
463 | |||
464 | - Added support for virtual console capture devices (/dev/vcs*) | ||
465 | Thanks to Dennis Hou <smilax@mindmeld.yi.org> | ||
466 | |||
467 | - Fixed modes for manually recreated symlinks | ||
468 | =============================================================================== | ||
469 | Changes for patch v49 | ||
470 | |||
471 | - Ported to kernel 2.1.113 | ||
472 | =============================================================================== | ||
473 | Changes for patch v50 | ||
474 | |||
475 | - Fixed bugs in recreated directories and symlinks | ||
476 | =============================================================================== | ||
477 | Changes for patch v51 | ||
478 | |||
479 | - Improved robustness of rc.devfs script | ||
480 | Thanks to Roderich Schupp <rsch@experteam.de> | ||
481 | |||
482 | - Fixed bugs in recreated device nodes | ||
483 | |||
484 | - Fixed bug in currently unused <devfs_get_handle_from_inode> | ||
485 | |||
486 | - Defined new <devfs_handle_t> type | ||
487 | |||
488 | - Improved debugging when getting entries | ||
489 | |||
490 | - Fixed bug where directories could be emptied | ||
491 | |||
492 | - Ported to kernel 2.1.115 | ||
493 | =============================================================================== | ||
494 | Changes for patch v52 | ||
495 | |||
496 | - Replaced dummy .epoch inode with .devfsd character device | ||
497 | |||
498 | - Modified rc.devfs to take account of above change | ||
499 | |||
500 | - Removed spurious driver warning messages when CONFIG_DEVFS_FS=n | ||
501 | |||
502 | - Implemented devfsd protocol revision 0 | ||
503 | =============================================================================== | ||
504 | Changes for patch v53 | ||
505 | |||
506 | - Ported to kernel 2.1.116 (kmod change broke hunk) | ||
507 | |||
508 | - Updated Documentation/Configure.help | ||
509 | |||
510 | - Test and tty pattern patch for rc.devfs script | ||
511 | Thanks to Roderich Schupp <rsch@experteam.de> | ||
512 | |||
513 | - Added soothing message to warning in <devfs_d_iput> | ||
514 | =============================================================================== | ||
515 | Changes for patch v54 | ||
516 | |||
517 | - Ported to kernel 2.1.117 | ||
518 | |||
519 | - Fixed default permissions in sound driver | ||
520 | |||
521 | - Added support for frame buffer devices (/dev/fb*) | ||
522 | =============================================================================== | ||
523 | Changes for patch v55 | ||
524 | |||
525 | - Ported to kernel 2.1.119 | ||
526 | |||
527 | - Use GCC extensions for structure initialisations | ||
528 | |||
529 | - Implemented async open notification | ||
530 | |||
531 | - Incremented devfsd protocol revision to 1 | ||
532 | =============================================================================== | ||
533 | Changes for patch v56 | ||
534 | |||
535 | - Ported to kernel 2.1.120-pre3 | ||
536 | |||
537 | - Moved async open notification to end of <devfs_open> | ||
538 | =============================================================================== | ||
539 | Changes for patch v57 | ||
540 | |||
541 | - Ported to kernel 2.1.121 | ||
542 | |||
543 | - Prepended "/dev/" to module load request | ||
544 | |||
545 | - Renamed <call_kerneld> to <call_kmod> | ||
546 | |||
547 | - Created sample modules.conf file | ||
548 | =============================================================================== | ||
549 | Changes for patch v58 | ||
550 | |||
551 | - Fixed typo "AYSNC" -> "ASYNC" | ||
552 | =============================================================================== | ||
553 | Changes for patch v59 | ||
554 | |||
555 | - Added open flag for files | ||
556 | =============================================================================== | ||
557 | Changes for patch v60 | ||
558 | |||
559 | - Ported to kernel 2.1.123-pre2 | ||
560 | =============================================================================== | ||
561 | Changes for patch v61 | ||
562 | |||
563 | - Set i_blocks=0 and i_blksize=1024 in <devfs_read_inode> | ||
564 | =============================================================================== | ||
565 | Changes for patch v62 | ||
566 | |||
567 | - Ported to kernel 2.1.123 | ||
568 | =============================================================================== | ||
569 | Changes for patch v63 | ||
570 | |||
571 | - Ported to kernel 2.1.124-pre2 | ||
572 | =============================================================================== | ||
573 | Changes for patch v64 | ||
574 | |||
575 | - Fixed Unix98 pty support | ||
576 | |||
577 | - Increased buffer size in <get_partition_list> to avoid crash and | ||
578 | burn | ||
579 | =============================================================================== | ||
580 | Changes for patch v65 | ||
581 | |||
582 | - More Unix98 pty support fixes | ||
583 | |||
584 | - Added test for empty <<name>> in <devfs_find_handle> | ||
585 | |||
586 | - Renamed <generate_path> to <devfs_generate_path> and published | ||
587 | |||
588 | - Created /dev/root symlink | ||
589 | Thanks to Roderich Schupp <rsch@ExperTeam.de> | ||
590 | with further modifications by me | ||
591 | =============================================================================== | ||
592 | Changes for patch v66 | ||
593 | |||
594 | - Yet more Unix98 pty support fixes (now tested) | ||
595 | |||
596 | - Created <devfs_get_fops> | ||
597 | |||
598 | - Support media change checks when CONFIG_DEVFS_ONLY=y | ||
599 | |||
600 | - Abolished Unix98-style PTY names for old PTY devices | ||
601 | =============================================================================== | ||
602 | Changes for patch v67 | ||
603 | |||
604 | - Added inline declaration for dummy <devfs_generate_path> | ||
605 | |||
606 | - Removed spurious "unable to register... in devfs" messages when | ||
607 | CONFIG_DEVFS_FS=n | ||
608 | |||
609 | - Fixed misc. devices when CONFIG_DEVFS_FS=n | ||
610 | |||
611 | - Limit auto-device numbering to majors 144 to 239 | ||
612 | =============================================================================== | ||
613 | Changes for patch v68 | ||
614 | |||
615 | - Hide unopened virtual consoles from directory listings | ||
616 | |||
617 | - Added support for video capture devices | ||
618 | |||
619 | - Ported to kernel 2.1.125 | ||
620 | =============================================================================== | ||
621 | Changes for patch v69 | ||
622 | |||
623 | - Fix for CONFIG_VT=n | ||
624 | =============================================================================== | ||
625 | Changes for patch v70 | ||
626 | |||
627 | - Added support for non-OSS/Free sound cards | ||
628 | =============================================================================== | ||
629 | Changes for patch v71 | ||
630 | |||
631 | - Ported to kernel 2.1.126-pre2 | ||
632 | =============================================================================== | ||
633 | Changes for patch v72 | ||
634 | |||
635 | - #ifdef's for CONFIG_DEVFS_DISABLE_OLD_NAMES removed | ||
636 | =============================================================================== | ||
637 | Changes for patch v73 | ||
638 | |||
639 | - CONFIG_DEVFS_DISABLE_OLD_NAMES replaced with "nocompat" boot option | ||
640 | |||
641 | - CONFIG_DEVFS_BOOT_OPTIONS removed: boot options always available | ||
642 | =============================================================================== | ||
643 | Changes for patch v74 | ||
644 | |||
645 | - Removed CONFIG_DEVFS_MOUNT and "mount" boot option and replaced with | ||
646 | "nomount" boot option | ||
647 | |||
648 | - Documentation updates | ||
649 | |||
650 | - Updated sample modules.conf | ||
651 | =============================================================================== | ||
652 | Changes for patch v75 | ||
653 | |||
654 | - Updated sample modules.conf | ||
655 | |||
656 | - Remount devfs after initrd finishes | ||
657 | |||
658 | - Ported to kernel 2.1.127 | ||
659 | |||
660 | - Added support for ISDN | ||
661 | Thanks to Christophe Leroy <christophe.leroy5@capway.com> | ||
662 | =============================================================================== | ||
663 | Changes for patch v76 | ||
664 | |||
665 | - Updated an email address in ChangeLog | ||
666 | |||
667 | - CONFIG_DEVFS_ONLY replaced with "only" boot option | ||
668 | =============================================================================== | ||
669 | Changes for patch v77 | ||
670 | |||
671 | - Added DEVFS_FL_REMOVABLE flag | ||
672 | |||
673 | - Check for disc change when listing directories with removable media | ||
674 | devices | ||
675 | |||
676 | - Use DEVFS_FL_REMOVABLE in sd.c | ||
677 | |||
678 | - Ported to kernel 2.1.128 | ||
679 | =============================================================================== | ||
680 | Changes for patch v78 | ||
681 | |||
682 | - Only call <scan_dir_for_removable> on first call to <devfs_readdir> | ||
683 | |||
684 | - Ported to kernel 2.1.129-pre5 | ||
685 | |||
686 | - ISDN support improvements | ||
687 | Thanks to Christophe Leroy <christophe.leroy5@capway.com> | ||
688 | =============================================================================== | ||
689 | Changes for patch v79 | ||
690 | |||
691 | - Ported to kernel 2.1.130 | ||
692 | |||
693 | - Renamed miscdevice "apm" to "apm_bios" to be consistent with | ||
694 | devices.txt | ||
695 | =============================================================================== | ||
696 | Changes for patch v80 | ||
697 | |||
698 | - Ported to kernel 2.1.131 | ||
699 | |||
700 | - Updated <devfs_rmdir> for VFS change in 2.1.131 | ||
701 | =============================================================================== | ||
702 | Changes for patch v81 | ||
703 | |||
704 | - Fixed permissions on /dev/ptmx | ||
705 | =============================================================================== | ||
706 | Changes for patch v82 | ||
707 | |||
708 | - Ported to kernel 2.1.132-pre4 | ||
709 | |||
710 | - Changed initial permissions on /dev/pts/* | ||
711 | |||
712 | - Created <devfs_mk_compat> | ||
713 | |||
714 | - Added "symlinks" boot option | ||
715 | |||
716 | - Changed devfs_register_blkdev() back to register_blkdev() for IDE | ||
717 | |||
718 | - Check for partitions on removable media in <devfs_lookup> | ||
719 | =============================================================================== | ||
720 | Changes for patch v83 | ||
721 | |||
722 | - Fixed support for ramdisc when using string-based root FS name | ||
723 | |||
724 | - Ported to kernel 2.2.0-pre1 | ||
725 | =============================================================================== | ||
726 | Changes for patch v84 | ||
727 | |||
728 | - Ported to kernel 2.2.0-pre7 | ||
729 | =============================================================================== | ||
730 | Changes for patch v85 | ||
731 | |||
732 | - Compile fixes for driver/sound/sound_common.c (non-module) and | ||
733 | drivers/isdn/isdn_common.c | ||
734 | Thanks to Christophe Leroy <christophe.leroy5@capway.com> | ||
735 | |||
736 | - Added support for registering regular files | ||
737 | |||
738 | - Created <devfs_set_file_size> | ||
739 | |||
740 | - Added /dev/cpu/mtrr as an alternative interface to /proc/mtrr | ||
741 | |||
742 | - Update devfs inodes from entries if not changed through FS | ||
743 | =============================================================================== | ||
744 | Changes for patch v86 | ||
745 | |||
746 | - Ported to kernel 2.2.0-pre9 | ||
747 | =============================================================================== | ||
748 | Changes for patch v87 | ||
749 | |||
750 | - Fixed bug when mounting non-devfs devices in a devfs | ||
751 | =============================================================================== | ||
752 | Changes for patch v88 | ||
753 | |||
754 | - Fixed <devfs_fill_file> to only initialise temporary inodes | ||
755 | |||
756 | - Trap for NULL fops in <devfs_register> | ||
757 | |||
758 | - Return -ENODEV in <devfs_fill_file> for non-driver inodes | ||
759 | |||
760 | - Fixed bug when unswapping non-devfs devices in a devfs | ||
761 | =============================================================================== | ||
762 | Changes for patch v89 | ||
763 | |||
764 | - Switched to C data types in include/linux/devfs_fs.h | ||
765 | |||
766 | - Switched from PATH_MAX to DEVFS_PATHLEN | ||
767 | |||
768 | - Updated Documentation/filesystems/devfs/modules.conf to take account | ||
769 | of reverse scanning (!) by modprobe | ||
770 | |||
771 | - Ported to kernel 2.2.0 | ||
772 | =============================================================================== | ||
773 | Changes for patch v90 | ||
774 | |||
775 | - CONFIG_DEVFS_DISABLE_OLD_TTY_NAMES replaced with "nottycompat" boot | ||
776 | option | ||
777 | |||
778 | - CONFIG_DEVFS_TTY_COMPAT removed: existing "symlinks" boot option now | ||
779 | controls this. This means you must have libc 5.4.44 or later, or a | ||
780 | recent version of libc 6 if you use the "symlinks" option | ||
781 | =============================================================================== | ||
782 | Changes for patch v91 | ||
783 | |||
784 | - Switch from <devfs_mk_symlink> to <devfs_mk_compat> in | ||
785 | drivers/char/vc_screen.c to fix problems with Midnight Commander | ||
786 | =============================================================================== | ||
787 | Changes for patch v92 | ||
788 | |||
789 | - Ported to kernel 2.2.2-pre5 | ||
790 | =============================================================================== | ||
791 | Changes for patch v93 | ||
792 | |||
793 | - Modified <sd_name> in drivers/scsi/sd.c to cope with devices that | ||
794 | don't exist (which happens with new RAID autostart code printk()s) | ||
795 | =============================================================================== | ||
796 | Changes for patch v94 | ||
797 | |||
798 | - Fixed bug in joystick driver: only first joystick was registered | ||
799 | =============================================================================== | ||
800 | Changes for patch v95 | ||
801 | |||
802 | - Fixed another bug in joystick driver | ||
803 | |||
804 | - Fixed <devfsd_read> to not overrun event buffer | ||
805 | =============================================================================== | ||
806 | Changes for patch v96 | ||
807 | |||
808 | - Ported to kernel 2.2.5-2 | ||
809 | |||
810 | - Created <devfs_auto_unregister> | ||
811 | |||
812 | - Fixed bugs: compatibility entries were not unregistered for: | ||
813 | loop driver | ||
814 | floppy driver | ||
815 | RAMDISC driver | ||
816 | IDE tape driver | ||
817 | SCSI CD-ROM driver | ||
818 | SCSI HDD driver | ||
819 | =============================================================================== | ||
820 | Changes for patch v97 | ||
821 | |||
822 | - Fixed bugs: compatibility entries were not unregistered for: | ||
823 | ALSA sound driver | ||
824 | partitions in generic disc driver | ||
825 | |||
826 | - Don't return unregistred entries in <devfs_find_handle> | ||
827 | |||
828 | - Panic in <devfs_unregister> if entry unregistered | ||
829 | |||
830 | - Don't panic in <devfs_auto_unregister> for duplicates | ||
831 | =============================================================================== | ||
832 | Changes for patch v98 | ||
833 | |||
834 | - Don't unregister already unregistered entries in <unregister> | ||
835 | |||
836 | - Register entry in <sd_detect> | ||
837 | |||
838 | - Unregister entry in <sd_detach> | ||
839 | |||
840 | - Changed to <devfs_*register_chrdev> in drivers/char/tty_io.c | ||
841 | |||
842 | - Ported to kernel 2.2.7 | ||
843 | =============================================================================== | ||
844 | Changes for patch v99 | ||
845 | |||
846 | - Ported to kernel 2.2.8 | ||
847 | |||
848 | - Fixed bug in drivers/scsi/sd.c when >16 SCSI discs | ||
849 | |||
850 | - Disable warning messages when unable to read partition table for | ||
851 | removable media | ||
852 | =============================================================================== | ||
853 | Changes for patch v100 | ||
854 | |||
855 | - Ported to kernel 2.3.1-pre5 | ||
856 | |||
857 | - Added "oops-on-panic" boot option | ||
858 | |||
859 | - Improved debugging in <devfs_register> and <devfs_unregister> | ||
860 | |||
861 | - Register entry in <sr_detect> | ||
862 | |||
863 | - Unregister entry in <sr_detach> | ||
864 | |||
865 | - Register entry in <sg_detect> | ||
866 | |||
867 | - Unregister entry in <sg_detach> | ||
868 | |||
869 | - Added support for ALSA drivers | ||
870 | =============================================================================== | ||
871 | Changes for patch v101 | ||
872 | |||
873 | - Ported to kernel 2.3.2 | ||
874 | =============================================================================== | ||
875 | Changes for patch v102 | ||
876 | |||
877 | - Update serial driver to register PCMCIA entries | ||
878 | Thanks to Roch-Alexandre Nomine-Beguin <roch@samarkand.infini.fr> | ||
879 | |||
880 | - Updated an email address in ChangeLog | ||
881 | |||
882 | - Hide virtual console capture entries from directory listings when | ||
883 | corresponding console device is not open | ||
884 | =============================================================================== | ||
885 | Changes for patch v103 | ||
886 | |||
887 | - Ported to kernel 2.3.3 | ||
888 | =============================================================================== | ||
889 | Changes for patch v104 | ||
890 | |||
891 | - Added documentation for some functions | ||
892 | |||
893 | - Added "doc" target to fs/devfs/Makefile | ||
894 | |||
895 | - Added "v4l" directory for video4linux devices | ||
896 | |||
897 | - Replaced call to <devfs_unregister> in <sd_detach> with call to | ||
898 | <devfs_register_partitions> | ||
899 | |||
900 | - Moved registration for sr and sg drivers from detect() to attach() | ||
901 | methods | ||
902 | |||
903 | - Register entries in <st_attach> and unregister in <st_detach> | ||
904 | |||
905 | - Work around IDE driver treating CD-ROM as gendisk | ||
906 | |||
907 | - Use <sed> instead of <tr> in rc.devfs | ||
908 | |||
909 | - Updated ToDo list | ||
910 | |||
911 | - Removed "oops-on-panic" boot option: now always Oops | ||
912 | =============================================================================== | ||
913 | Changes for patch v105 | ||
914 | |||
915 | - Unregister SCSI host from <scsi_host_no_list> in <scsi_unregister> | ||
916 | Thanks to Zoltán Böszörményi <zboszor@mail.externet.hu> | ||
917 | |||
918 | - Don't save /dev/log in rc.devfs | ||
919 | |||
920 | - Ported to kernel 2.3.4-pre1 | ||
921 | =============================================================================== | ||
922 | Changes for patch v106 | ||
923 | |||
924 | - Fixed silly typo in drivers/scsi/st.c | ||
925 | |||
926 | - Improved debugging in <devfs_register> | ||
927 | =============================================================================== | ||
928 | Changes for patch v107 | ||
929 | |||
930 | - Added "diunlink" and "nokmod" boot options | ||
931 | |||
932 | - Removed superfluous warning message in <devfs_d_iput> | ||
933 | =============================================================================== | ||
934 | Changes for patch v108 | ||
935 | |||
936 | - Remove entries when unloading sound module | ||
937 | =============================================================================== | ||
938 | Changes for patch v109 | ||
939 | |||
940 | - Ported to kernel 2.3.6-pre2 | ||
941 | =============================================================================== | ||
942 | Changes for patch v110 | ||
943 | |||
944 | - Took account of change to <d_alloc_root> | ||
945 | =============================================================================== | ||
946 | Changes for patch v111 | ||
947 | |||
948 | - Created separate event queue for each mounted devfs | ||
949 | |||
950 | - Removed <devfs_invalidate_dcache> | ||
951 | |||
952 | - Created new ioctl()s for devfsd | ||
953 | |||
954 | - Incremented devfsd protocol revision to 3 | ||
955 | |||
956 | - Fixed bug when re-creating directories: contents were lost | ||
957 | |||
958 | - Block access to inodes until devfsd updates permissions | ||
959 | =============================================================================== | ||
960 | Changes for patch v112 | ||
961 | |||
962 | - Modified patch so it applies against 2.3.5 and 2.3.6 | ||
963 | |||
964 | - Updated an email address in ChangeLog | ||
965 | |||
966 | - Do not automatically change ownership/protection of /dev/tty<n> | ||
967 | |||
968 | - Updated sample modules.conf | ||
969 | |||
970 | - Switched to sending process uid/gid to devfsd | ||
971 | |||
972 | - Renamed <call_kmod> to <try_modload> | ||
973 | |||
974 | - Added DEVFSD_NOTIFY_LOOKUP event | ||
975 | |||
976 | - Added DEVFSD_NOTIFY_CHANGE event | ||
977 | |||
978 | - Added DEVFSD_NOTIFY_CREATE event | ||
979 | |||
980 | - Incremented devfsd protocol revision to 4 | ||
981 | |||
982 | - Moved kernel-specific stuff to include/linux/devfs_fs_kernel.h | ||
983 | =============================================================================== | ||
984 | Changes for patch v113 | ||
985 | |||
986 | - Ported to kernel 2.3.9 | ||
987 | |||
988 | - Restricted permissions on some block devices | ||
989 | =============================================================================== | ||
990 | Changes for patch v114 | ||
991 | |||
992 | - Added support for /dev/netlink | ||
993 | Thanks to Dennis Hou <smilax@mindmeld.yi.org> | ||
994 | |||
995 | - Return EISDIR rather than EINVAL for read(2) on directories | ||
996 | |||
997 | - Ported to kernel 2.3.10 | ||
998 | =============================================================================== | ||
999 | Changes for patch v115 | ||
1000 | |||
1001 | - Added support for all remaining character devices | ||
1002 | Thanks to Dennis Hou <smilax@mindmeld.yi.org> | ||
1003 | |||
1004 | - Cleaned up netlink support | ||
1005 | =============================================================================== | ||
1006 | Changes for patch v116 | ||
1007 | |||
1008 | - Added support for /dev/parport%d | ||
1009 | Thanks to Tim Waugh <tim@cyberelk.demon.co.uk> | ||
1010 | |||
1011 | - Fixed parallel port ATAPI tape driver | ||
1012 | |||
1013 | - Fixed Atari SLM laser printer driver | ||
1014 | =============================================================================== | ||
1015 | Changes for patch v117 | ||
1016 | |||
1017 | - Added support for COSA card | ||
1018 | Thanks to Dennis Hou <smilax@mindmeld.yi.org> | ||
1019 | |||
1020 | - Fixed drivers/char/ppdev.c: missing #include <linux/init.h> | ||
1021 | |||
1022 | - Fixed drivers/char/ftape/zftape/zftape-init.c | ||
1023 | Thanks to Vladimir Popov <mashgrad@usa.net> | ||
1024 | =============================================================================== | ||
1025 | Changes for patch v118 | ||
1026 | |||
1027 | - Ported to kernel 2.3.15-pre3 | ||
1028 | |||
1029 | - Fixed bug in loop driver | ||
1030 | |||
1031 | - Unregister /dev/lp%d entries in drivers/char/lp.c | ||
1032 | Thanks to Maciej W. Rozycki <macro@ds2.pg.gda.pl> | ||
1033 | =============================================================================== | ||
1034 | Changes for patch v119 | ||
1035 | |||
1036 | - Ported to kernel 2.3.16 | ||
1037 | =============================================================================== | ||
1038 | Changes for patch v120 | ||
1039 | |||
1040 | - Fixed bug in drivers/scsi/scsi.c | ||
1041 | |||
1042 | - Added /dev/ppp | ||
1043 | Thanks to Dennis Hou <smilax@mindmeld.yi.org> | ||
1044 | |||
1045 | - Ported to kernel 2.3.17 | ||
1046 | =============================================================================== | ||
1047 | Changes for patch v121 | ||
1048 | |||
1049 | - Fixed bug in drivers/block/loop.c | ||
1050 | |||
1051 | - Ported to kernel 2.3.18 | ||
1052 | =============================================================================== | ||
1053 | Changes for patch v122 | ||
1054 | |||
1055 | - Ported to kernel 2.3.19 | ||
1056 | =============================================================================== | ||
1057 | Changes for patch v123 | ||
1058 | |||
1059 | - Ported to kernel 2.3.20 | ||
1060 | =============================================================================== | ||
1061 | Changes for patch v124 | ||
1062 | |||
1063 | - Ported to kernel 2.3.21 | ||
1064 | =============================================================================== | ||
1065 | Changes for patch v125 | ||
1066 | |||
1067 | - Created <devfs_get_info>, <devfs_set_info>, | ||
1068 | <devfs_get_first_child> and <devfs_get_next_sibling> | ||
1069 | Added <<dir>> parameter to <devfs_register>, <devfs_mk_compat>, | ||
1070 | <devfs_mk_dir> and <devfs_find_handle> | ||
1071 | Work sponsored by SGI | ||
1072 | |||
1073 | - Fixed apparent bug in COSA driver | ||
1074 | |||
1075 | - Re-instated "scsihosts=" boot option | ||
1076 | =============================================================================== | ||
1077 | Changes for patch v126 | ||
1078 | |||
1079 | - Always create /dev/pts if CONFIG_UNIX98_PTYS=y | ||
1080 | |||
1081 | - Fixed call to <devfs_mk_dir> in drivers/block/ide-disk.c | ||
1082 | Thanks to Dennis Hou <smilax@mindmeld.yi.org> | ||
1083 | |||
1084 | - Allow multiple unregistrations | ||
1085 | |||
1086 | - Created /dev/scsi hierarchy | ||
1087 | Work sponsored by SGI | ||
1088 | =============================================================================== | ||
1089 | Changes for patch v127 | ||
1090 | |||
1091 | Work sponsored by SGI | ||
1092 | |||
1093 | - No longer disable devpts if devfs enabled (caveat emptor) | ||
1094 | |||
1095 | - Added flags array to struct gendisk and removed code from | ||
1096 | drivers/scsi/sd.c | ||
1097 | |||
1098 | - Created /dev/discs hierarchy | ||
1099 | =============================================================================== | ||
1100 | Changes for patch v128 | ||
1101 | |||
1102 | Work sponsored by SGI | ||
1103 | |||
1104 | - Created /dev/cdroms hierarchy | ||
1105 | =============================================================================== | ||
1106 | Changes for patch v129 | ||
1107 | |||
1108 | Work sponsored by SGI | ||
1109 | |||
1110 | - Removed compatibility entries for sound devices | ||
1111 | |||
1112 | - Removed compatibility entries for printer devices | ||
1113 | |||
1114 | - Removed compatibility entries for video4linux devices | ||
1115 | |||
1116 | - Removed compatibility entries for parallel port devices | ||
1117 | |||
1118 | - Removed compatibility entries for frame buffer devices | ||
1119 | =============================================================================== | ||
1120 | Changes for patch v130 | ||
1121 | |||
1122 | Work sponsored by SGI | ||
1123 | |||
1124 | - Added major and minor number to devfsd protocol | ||
1125 | |||
1126 | - Incremented devfsd protocol revision to 5 | ||
1127 | |||
1128 | - Removed compatibility entries for SoundBlaster CD-ROMs | ||
1129 | |||
1130 | - Removed compatibility entries for netlink devices | ||
1131 | |||
1132 | - Removed compatibility entries for SCSI generic devices | ||
1133 | |||
1134 | - Removed compatibility entries for SCSI tape devices | ||
1135 | =============================================================================== | ||
1136 | Changes for patch v131 | ||
1137 | |||
1138 | Work sponsored by SGI | ||
1139 | |||
1140 | - Support info pointer for all devfs entry types | ||
1141 | |||
1142 | - Added <<info>> parameter to <devfs_mk_dir> and <devfs_mk_symlink> | ||
1143 | |||
1144 | - Removed /dev/st hierarchy | ||
1145 | |||
1146 | - Removed /dev/sg hierarchy | ||
1147 | |||
1148 | - Removed compatibility entries for loop devices | ||
1149 | |||
1150 | - Removed compatibility entries for IDE tape devices | ||
1151 | |||
1152 | - Removed compatibility entries for SCSI CD-ROMs | ||
1153 | |||
1154 | - Removed /dev/sr hierarchy | ||
1155 | =============================================================================== | ||
1156 | Changes for patch v132 | ||
1157 | |||
1158 | Work sponsored by SGI | ||
1159 | |||
1160 | - Removed compatibility entries for floppy devices | ||
1161 | |||
1162 | - Removed compatibility entries for RAMDISCs | ||
1163 | |||
1164 | - Removed compatibility entries for meta-devices | ||
1165 | |||
1166 | - Removed compatibility entries for SCSI discs | ||
1167 | |||
1168 | - Created <devfs_make_root> | ||
1169 | |||
1170 | - Removed /dev/sd hierarchy | ||
1171 | |||
1172 | - Support "../" when searching devfs namespace | ||
1173 | |||
1174 | - Created /dev/ide/host* hierarchy | ||
1175 | |||
1176 | - Supported IDE hard discs in /dev/ide/host* hierarchy | ||
1177 | |||
1178 | - Removed compatibility entries for IDE discs | ||
1179 | |||
1180 | - Removed /dev/ide/hd hierarchy | ||
1181 | |||
1182 | - Supported IDE CD-ROMs in /dev/ide/host* hierarchy | ||
1183 | |||
1184 | - Removed compatibility entries for IDE CD-ROMs | ||
1185 | |||
1186 | - Removed /dev/ide/cd hierarchy | ||
1187 | =============================================================================== | ||
1188 | Changes for patch v133 | ||
1189 | |||
1190 | Work sponsored by SGI | ||
1191 | |||
1192 | - Created <devfs_get_unregister_slave> | ||
1193 | |||
1194 | - Fixed bug in fs/partitions/check.c when rescanning | ||
1195 | =============================================================================== | ||
1196 | Changes for patch v134 | ||
1197 | |||
1198 | Work sponsored by SGI | ||
1199 | |||
1200 | - Removed /dev/sd, /dev/sr, /dev/st and /dev/sg directories | ||
1201 | |||
1202 | - Removed /dev/ide/hd directory | ||
1203 | |||
1204 | - Exported <devfs_get_parent> | ||
1205 | |||
1206 | - Created <devfs_register_tape> and /dev/tapes hierarchy | ||
1207 | |||
1208 | - Removed /dev/ide/mt hierarchy | ||
1209 | |||
1210 | - Removed /dev/ide/fd hierarchy | ||
1211 | |||
1212 | - Ported to kernel 2.3.25 | ||
1213 | =============================================================================== | ||
1214 | Changes for patch v135 | ||
1215 | |||
1216 | Work sponsored by SGI | ||
1217 | |||
1218 | - Removed compatibility entries for virtual console capture devices | ||
1219 | |||
1220 | - Removed unused <devfs_set_symlink_destination> | ||
1221 | |||
1222 | - Removed compatibility entries for serial devices | ||
1223 | |||
1224 | - Removed compatibility entries for console devices | ||
1225 | |||
1226 | - Do not hide entries from devfsd or children | ||
1227 | |||
1228 | - Removed DEVFS_FL_TTY_COMPAT flag | ||
1229 | |||
1230 | - Removed "nottycompat" boot option | ||
1231 | |||
1232 | - Removed <devfs_mk_compat> | ||
1233 | =============================================================================== | ||
1234 | Changes for patch v136 | ||
1235 | |||
1236 | Work sponsored by SGI | ||
1237 | |||
1238 | - Moved BSD pty devices to /dev/pty | ||
1239 | |||
1240 | - Added DEVFS_FL_WAIT flag | ||
1241 | =============================================================================== | ||
1242 | Changes for patch v137 | ||
1243 | |||
1244 | Work sponsored by SGI | ||
1245 | |||
1246 | - Really fixed bug in fs/partitions/check.c when rescanning | ||
1247 | |||
1248 | - Support new "disc" naming scheme in <get_removable_partition> | ||
1249 | |||
1250 | - Allow NULL fops in <devfs_register> | ||
1251 | |||
1252 | - Removed redundant name functions in SCSI disc and IDE drivers | ||
1253 | =============================================================================== | ||
1254 | Changes for patch v138 | ||
1255 | |||
1256 | Work sponsored by SGI | ||
1257 | |||
1258 | - Fixed old bugs in drivers/block/paride/pt.c, drivers/char/tpqic02.c, | ||
1259 | drivers/net/wan/cosa.c and drivers/scsi/scsi.c | ||
1260 | Thanks to Sergey Kubushin <ksi@ksi-linux.com> | ||
1261 | |||
1262 | - Fall back to major table if NULL fops given to <devfs_register> | ||
1263 | =============================================================================== | ||
1264 | Changes for patch v139 | ||
1265 | |||
1266 | Work sponsored by SGI | ||
1267 | |||
1268 | - Corrected and moved <get_blkfops> and <get_chrfops> declarations | ||
1269 | from arch/alpha/kernel/osf_sys.c to include/linux/fs.h | ||
1270 | |||
1271 | - Removed name function from struct gendisk | ||
1272 | |||
1273 | - Updated devfs FAQ | ||
1274 | =============================================================================== | ||
1275 | Changes for patch v140 | ||
1276 | |||
1277 | Work sponsored by SGI | ||
1278 | |||
1279 | - Ported to kernel 2.3.27 | ||
1280 | =============================================================================== | ||
1281 | Changes for patch v141 | ||
1282 | |||
1283 | Work sponsored by SGI | ||
1284 | |||
1285 | - Bug fix in arch/m68k/atari/joystick.c | ||
1286 | |||
1287 | - Moved ISDN and capi devices to /dev/isdn | ||
1288 | =============================================================================== | ||
1289 | Changes for patch v142 | ||
1290 | |||
1291 | Work sponsored by SGI | ||
1292 | |||
1293 | - Bug fix in drivers/block/ide-probe.c (patch confusion) | ||
1294 | =============================================================================== | ||
1295 | Changes for patch v143 | ||
1296 | |||
1297 | Work sponsored by SGI | ||
1298 | |||
1299 | - Bug fix in drivers/block/blkpg.c:partition_name() | ||
1300 | =============================================================================== | ||
1301 | Changes for patch v144 | ||
1302 | |||
1303 | Work sponsored by SGI | ||
1304 | |||
1305 | - Ported to kernel 2.3.29 | ||
1306 | |||
1307 | - Removed calls to <devfs_register> from cdu31a, cm206, mcd and mcdx | ||
1308 | CD-ROM drivers: generic driver handles this now | ||
1309 | |||
1310 | - Moved joystick devices to /dev/joysticks | ||
1311 | =============================================================================== | ||
1312 | Changes for patch v145 | ||
1313 | |||
1314 | Work sponsored by SGI | ||
1315 | |||
1316 | - Ported to kernel 2.3.30-pre3 | ||
1317 | |||
1318 | - Register whole-disc entry even for invalid partition tables | ||
1319 | |||
1320 | - Fixed bug in mounting root FS when initrd enabled | ||
1321 | |||
1322 | - Fixed device entry leak with IDE CD-ROMs | ||
1323 | |||
1324 | - Fixed compile problem with drivers/isdn/isdn_common.c | ||
1325 | |||
1326 | - Moved COSA devices to /dev/cosa | ||
1327 | |||
1328 | - Support fifos when unregistering | ||
1329 | |||
1330 | - Created <devfs_register_series> and used in many drivers | ||
1331 | |||
1332 | - Moved Coda devices to /dev/coda | ||
1333 | |||
1334 | - Moved parallel port IDE tapes to /dev/pt | ||
1335 | |||
1336 | - Moved parallel port IDE generic devices to /dev/pg | ||
1337 | =============================================================================== | ||
1338 | Changes for patch v146 | ||
1339 | |||
1340 | Work sponsored by SGI | ||
1341 | |||
1342 | - Removed obsolete DEVFS_FL_COMPAT and DEVFS_FL_TOLERANT flags | ||
1343 | |||
1344 | - Fixed compile problem with fs/coda/psdev.c | ||
1345 | |||
1346 | - Reinstate change to <devfs_register_blkdev> in | ||
1347 | drivers/block/ide-probe.c now that fs/isofs/inode.c is fixed | ||
1348 | |||
1349 | - Switched to <devfs_register_blkdev> in drivers/block/floppy.c, | ||
1350 | drivers/scsi/sr.c and drivers/block/md.c | ||
1351 | |||
1352 | - Moved DAC960 devices to /dev/dac960 | ||
1353 | =============================================================================== | ||
1354 | Changes for patch v147 | ||
1355 | |||
1356 | Work sponsored by SGI | ||
1357 | |||
1358 | - Ported to kernel 2.3.32-pre4 | ||
1359 | =============================================================================== | ||
1360 | Changes for patch v148 | ||
1361 | |||
1362 | Work sponsored by SGI | ||
1363 | |||
1364 | - Removed kmod support: use devfsd instead | ||
1365 | |||
1366 | - Moved miscellaneous character devices to /dev/misc | ||
1367 | =============================================================================== | ||
1368 | Changes for patch v149 | ||
1369 | |||
1370 | Work sponsored by SGI | ||
1371 | |||
1372 | - Ensure include/linux/joystick.h is OK for user-space | ||
1373 | |||
1374 | - Improved debugging in <get_vfs_inode> | ||
1375 | |||
1376 | - Ensure dentries created by devfsd will be cleaned up | ||
1377 | =============================================================================== | ||
1378 | Changes for patch v150 | ||
1379 | |||
1380 | Work sponsored by SGI | ||
1381 | |||
1382 | - Ported to kernel 2.3.34 | ||
1383 | =============================================================================== | ||
1384 | Changes for patch v151 | ||
1385 | |||
1386 | Work sponsored by SGI | ||
1387 | |||
1388 | - Ported to kernel 2.3.35-pre1 | ||
1389 | |||
1390 | - Created <devfs_get_name> | ||
1391 | =============================================================================== | ||
1392 | Changes for patch v152 | ||
1393 | |||
1394 | Work sponsored by SGI | ||
1395 | |||
1396 | - Updated sample modules.conf | ||
1397 | |||
1398 | - Ported to kernel 2.3.36-pre1 | ||
1399 | =============================================================================== | ||
1400 | Changes for patch v153 | ||
1401 | |||
1402 | Work sponsored by SGI | ||
1403 | |||
1404 | - Ported to kernel 2.3.42 | ||
1405 | |||
1406 | - Removed <devfs_fill_file> | ||
1407 | =============================================================================== | ||
1408 | Changes for patch v154 | ||
1409 | |||
1410 | Work sponsored by SGI | ||
1411 | |||
1412 | - Took account of device number changes for /dev/fb* | ||
1413 | =============================================================================== | ||
1414 | Changes for patch v155 | ||
1415 | |||
1416 | Work sponsored by SGI | ||
1417 | |||
1418 | - Ported to kernel 2.3.43-pre8 | ||
1419 | |||
1420 | - Moved /dev/tty0 to /dev/vc/0 | ||
1421 | |||
1422 | - Moved sequence number formatting from <_tty_make_name> to drivers | ||
1423 | =============================================================================== | ||
1424 | Changes for patch v156 | ||
1425 | |||
1426 | Work sponsored by SGI | ||
1427 | |||
1428 | - Fixed breakage in drivers/scsi/sd.c due to recent SCSI changes | ||
1429 | =============================================================================== | ||
1430 | Changes for patch v157 | ||
1431 | |||
1432 | Work sponsored by SGI | ||
1433 | |||
1434 | - Ported to kernel 2.3.45 | ||
1435 | =============================================================================== | ||
1436 | Changes for patch v158 | ||
1437 | |||
1438 | Work sponsored by SGI | ||
1439 | |||
1440 | - Ported to kernel 2.3.46-pre2 | ||
1441 | =============================================================================== | ||
1442 | Changes for patch v159 | ||
1443 | |||
1444 | Work sponsored by SGI | ||
1445 | |||
1446 | - Fixed drivers/block/md.c | ||
1447 | Thanks to Mike Galbraith <mikeg@weiden.de> | ||
1448 | |||
1449 | - Documentation fixes | ||
1450 | |||
1451 | - Moved device registration from <lp_init> to <lp_register> | ||
1452 | Thanks to Tim Waugh <twaugh@redhat.com> | ||
1453 | =============================================================================== | ||
1454 | Changes for patch v160 | ||
1455 | |||
1456 | Work sponsored by SGI | ||
1457 | |||
1458 | - Fixed drivers/char/joystick/joystick.c | ||
1459 | Thanks to Vojtech Pavlik <vojtech@suse.cz> | ||
1460 | |||
1461 | - Documentation updates | ||
1462 | |||
1463 | - Fixed arch/i386/kernel/mtrr.c if procfs and devfs not enabled | ||
1464 | |||
1465 | - Fixed drivers/char/stallion.c | ||
1466 | =============================================================================== | ||
1467 | Changes for patch v161 | ||
1468 | |||
1469 | Work sponsored by SGI | ||
1470 | |||
1471 | - Remove /dev/ide when ide-mod is unloaded | ||
1472 | |||
1473 | - Fixed bug in drivers/block/ide-probe.c when secondary but no primary | ||
1474 | |||
1475 | - Added DEVFS_FL_NO_PERSISTENCE flag | ||
1476 | |||
1477 | - Used new DEVFS_FL_NO_PERSISTENCE flag for Unix98 pty slaves | ||
1478 | |||
1479 | - Removed unnecessary call to <update_devfs_inode_from_entry> in | ||
1480 | <devfs_readdir> | ||
1481 | |||
1482 | - Only set auto-ownership for /dev/pty/s* | ||
1483 | =============================================================================== | ||
1484 | Changes for patch v162 | ||
1485 | |||
1486 | Work sponsored by SGI | ||
1487 | |||
1488 | - Set inode->i_size to correct size for symlinks | ||
1489 | Thanks to Jeremy Fitzhardinge <jeremy@goop.org> | ||
1490 | |||
1491 | - Only give lookup() method to directories to comply with new VFS | ||
1492 | assumptions | ||
1493 | |||
1494 | - Remove unnecessary tests in symlink methods | ||
1495 | |||
1496 | - Don't kill existing block ops in <devfs_read_inode> | ||
1497 | |||
1498 | - Restore auto-ownership for /dev/pty/m* | ||
1499 | =============================================================================== | ||
1500 | Changes for patch v163 | ||
1501 | |||
1502 | Work sponsored by SGI | ||
1503 | |||
1504 | - Don't create missing directories in <devfs_find_handle> | ||
1505 | |||
1506 | - Removed Documentation/filesystems/devfs/mk-devlinks | ||
1507 | |||
1508 | - Updated Documentation/filesystems/devfs/README | ||
1509 | =============================================================================== | ||
1510 | Changes for patch v164 | ||
1511 | |||
1512 | Work sponsored by SGI | ||
1513 | |||
1514 | - Fixed CONFIG_DEVFS breakage in drivers/char/serial.c introduced in | ||
1515 | linux-2.3.99-pre6-7 | ||
1516 | =============================================================================== | ||
1517 | Changes for patch v165 | ||
1518 | |||
1519 | Work sponsored by SGI | ||
1520 | |||
1521 | - Ported to kernel 2.3.99-pre6 | ||
1522 | =============================================================================== | ||
1523 | Changes for patch v166 | ||
1524 | |||
1525 | Work sponsored by SGI | ||
1526 | |||
1527 | - Added CONFIG_DEVFS_MOUNT | ||
1528 | =============================================================================== | ||
1529 | Changes for patch v167 | ||
1530 | |||
1531 | Work sponsored by SGI | ||
1532 | |||
1533 | - Updated Documentation/filesystems/devfs/README | ||
1534 | |||
1535 | - Updated sample modules.conf | ||
1536 | =============================================================================== | ||
1537 | Changes for patch v168 | ||
1538 | |||
1539 | Work sponsored by SGI | ||
1540 | |||
1541 | - Disabled multi-mount capability (use VFS bindings instead) | ||
1542 | |||
1543 | - Updated README from master HTML file | ||
1544 | =============================================================================== | ||
1545 | Changes for patch v169 | ||
1546 | |||
1547 | Work sponsored by SGI | ||
1548 | |||
1549 | - Removed multi-mount code | ||
1550 | |||
1551 | - Removed compatibility macros: VFS has changed too much | ||
1552 | =============================================================================== | ||
1553 | Changes for patch v170 | ||
1554 | |||
1555 | Work sponsored by SGI | ||
1556 | |||
1557 | - Updated README from master HTML file | ||
1558 | |||
1559 | - Merged devfs inode into devfs entry | ||
1560 | =============================================================================== | ||
1561 | Changes for patch v171 | ||
1562 | |||
1563 | Work sponsored by SGI | ||
1564 | |||
1565 | - Updated sample modules.conf | ||
1566 | |||
1567 | - Removed dead code in <devfs_register> which used to call | ||
1568 | <free_dentries> | ||
1569 | |||
1570 | - Ported to kernel 2.4.0-test2-pre3 | ||
1571 | =============================================================================== | ||
1572 | Changes for patch v172 | ||
1573 | |||
1574 | Work sponsored by SGI | ||
1575 | |||
1576 | - Changed interface to <devfs_register> | ||
1577 | |||
1578 | - Changed interface to <devfs_register_series> | ||
1579 | =============================================================================== | ||
1580 | Changes for patch v173 | ||
1581 | |||
1582 | Work sponsored by SGI | ||
1583 | |||
1584 | - Simplified interface to <devfs_mk_symlink> | ||
1585 | |||
1586 | - Simplified interface to <devfs_mk_dir> | ||
1587 | |||
1588 | - Simplified interface to <devfs_find_handle> | ||
1589 | =============================================================================== | ||
1590 | Changes for patch v174 | ||
1591 | |||
1592 | Work sponsored by SGI | ||
1593 | |||
1594 | - Updated README from master HTML file | ||
1595 | =============================================================================== | ||
1596 | Changes for patch v175 | ||
1597 | |||
1598 | Work sponsored by SGI | ||
1599 | |||
1600 | - DocBook update for fs/devfs/base.c | ||
1601 | Thanks to Tim Waugh <twaugh@redhat.com> | ||
1602 | |||
1603 | - Removed stale fs/tunnel.c (was never used or completed) | ||
1604 | =============================================================================== | ||
1605 | Changes for patch v176 | ||
1606 | |||
1607 | Work sponsored by SGI | ||
1608 | |||
1609 | - Updated ToDo list | ||
1610 | |||
1611 | - Removed sample modules.conf: now distributed with devfsd | ||
1612 | |||
1613 | - Updated README from master HTML file | ||
1614 | |||
1615 | - Ported to kernel 2.4.0-test3-pre4 (which had devfs-patch-v174) | ||
1616 | =============================================================================== | ||
1617 | Changes for patch v177 | ||
1618 | |||
1619 | - Updated README from master HTML file | ||
1620 | |||
1621 | - Documentation cleanups | ||
1622 | |||
1623 | - Ensure <devfs_generate_path> terminates string for root entry | ||
1624 | Thanks to Tim Jansen <tim@tjansen.de> | ||
1625 | |||
1626 | - Exported <devfs_get_name> to modules | ||
1627 | |||
1628 | - Make <devfs_mk_symlink> send events to devfsd | ||
1629 | |||
1630 | - Cleaned up option processing in <devfs_setup> | ||
1631 | |||
1632 | - Fixed bugs in handling symlinks: could leak or cause Oops | ||
1633 | |||
1634 | - Cleaned up directory handling by separating fops | ||
1635 | Thanks to Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | ||
1636 | =============================================================================== | ||
1637 | Changes for patch v178 | ||
1638 | |||
1639 | - Fixed handling of inverted options in <devfs_setup> | ||
1640 | =============================================================================== | ||
1641 | Changes for patch v179 | ||
1642 | |||
1643 | - Adjusted <try_modload> to account for <devfs_generate_path> fix | ||
1644 | =============================================================================== | ||
1645 | Changes for patch v180 | ||
1646 | |||
1647 | - Fixed !CONFIG_DEVFS_FS stub declaration of <devfs_get_info> | ||
1648 | =============================================================================== | ||
1649 | Changes for patch v181 | ||
1650 | |||
1651 | - Answered question posed by Al Viro and removed his comments from <devfs_open> | ||
1652 | |||
1653 | - Moved setting of registered flag after other fields are changed | ||
1654 | |||
1655 | - Fixed race between <devfsd_close> and <devfsd_notify_one> | ||
1656 | |||
1657 | - Global VFS changes added bogus BKL to devfsd_close(): removed | ||
1658 | |||
1659 | - Widened locking in <devfs_readlink> and <devfs_follow_link> | ||
1660 | |||
1661 | - Replaced <devfsd_read> stack usage with <devfsd_ioctl> kmalloc | ||
1662 | |||
1663 | - Simplified locking in <devfsd_ioctl> and fixed memory leak | ||
1664 | =============================================================================== | ||
1665 | Changes for patch v182 | ||
1666 | |||
1667 | - Created <devfs_*alloc_major> and <devfs_*alloc_devnum> | ||
1668 | |||
1669 | - Removed broken devnum allocation and use <devfs_alloc_devnum> | ||
1670 | |||
1671 | - Fixed old devnum leak by calling new <devfs_dealloc_devnum> | ||
1672 | |||
1673 | - Created <devfs_*alloc_unique_number> | ||
1674 | |||
1675 | - Fixed number leak for /dev/cdroms/cdrom%d | ||
1676 | |||
1677 | - Fixed number leak for /dev/discs/disc%d | ||
1678 | =============================================================================== | ||
1679 | Changes for patch v183 | ||
1680 | |||
1681 | - Fixed bug in <devfs_setup> which could hang boot process | ||
1682 | =============================================================================== | ||
1683 | Changes for patch v184 | ||
1684 | |||
1685 | - Documentation typo fix for fs/devfs/util.c | ||
1686 | |||
1687 | - Fixed drivers/char/stallion.c for devfs | ||
1688 | |||
1689 | - Added DEVFSD_NOTIFY_DELETE event | ||
1690 | |||
1691 | - Updated README from master HTML file | ||
1692 | |||
1693 | - Removed #include <asm/segment.h> from fs/devfs/base.c | ||
1694 | =============================================================================== | ||
1695 | Changes for patch v185 | ||
1696 | |||
1697 | - Made <block_semaphore> and <char_semaphore> in fs/devfs/util.c | ||
1698 | private | ||
1699 | |||
1700 | - Fixed inode table races by removing it and using inode->u.generic_ip | ||
1701 | instead | ||
1702 | |||
1703 | - Moved <devfs_read_inode> into <get_vfs_inode> | ||
1704 | |||
1705 | - Moved <devfs_write_inode> into <devfs_notify_change> | ||
1706 | =============================================================================== | ||
1707 | Changes for patch v186 | ||
1708 | |||
1709 | - Fixed race in <devfs_do_symlink> for uni-processor | ||
1710 | |||
1711 | - Updated README from master HTML file | ||
1712 | =============================================================================== | ||
1713 | Changes for patch v187 | ||
1714 | |||
1715 | - Fixed drivers/char/stallion.c for devfs | ||
1716 | |||
1717 | - Fixed drivers/char/rocket.c for devfs | ||
1718 | |||
1719 | - Fixed bug in <devfs_alloc_unique_number>: limited to 128 numbers | ||
1720 | =============================================================================== | ||
1721 | Changes for patch v188 | ||
1722 | |||
1723 | - Updated major masks in fs/devfs/util.c up to Linus' "no new majors" | ||
1724 | proclamation. Block: were 126 now 122 free, char: were 26 now 19 free | ||
1725 | |||
1726 | - Updated README from master HTML file | ||
1727 | |||
1728 | - Removed remnant of multi-mount support in <devfs_mknod> | ||
1729 | |||
1730 | - Removed unused DEVFS_FL_SHOW_UNREG flag | ||
1731 | =============================================================================== | ||
1732 | Changes for patch v189 | ||
1733 | |||
1734 | - Removed nlink field from struct devfs_inode | ||
1735 | |||
1736 | - Removed auto-ownership for /dev/pty/* (BSD ptys) and used | ||
1737 | DEVFS_FL_CURRENT_OWNER|DEVFS_FL_NO_PERSISTENCE for /dev/pty/s* (just | ||
1738 | like Unix98 pty slaves) and made /dev/pty/m* rw-rw-rw- access | ||
1739 | =============================================================================== | ||
1740 | Changes for patch v190 | ||
1741 | |||
1742 | - Updated README from master HTML file | ||
1743 | |||
1744 | - Replaced BKL with global rwsem to protect symlink data (quick and | ||
1745 | dirty hack) | ||
1746 | =============================================================================== | ||
1747 | Changes for patch v191 | ||
1748 | |||
1749 | - Replaced global rwsem for symlink with per-link refcount | ||
1750 | =============================================================================== | ||
1751 | Changes for patch v192 | ||
1752 | |||
1753 | - Removed unnecessary #ifdef CONFIG_DEVFS_FS from arch/i386/kernel/mtrr.c | ||
1754 | |||
1755 | - Ported to kernel 2.4.10-pre11 | ||
1756 | |||
1757 | - Set inode->i_mapping->a_ops for block nodes in <get_vfs_inode> | ||
1758 | =============================================================================== | ||
1759 | Changes for patch v193 | ||
1760 | |||
1761 | - Went back to global rwsem for symlinks (refcount scheme no good) | ||
1762 | =============================================================================== | ||
1763 | Changes for patch v194 | ||
1764 | |||
1765 | - Fixed overrun in <devfs_link> by removing function (not needed) | ||
1766 | |||
1767 | - Updated README from master HTML file | ||
1768 | =============================================================================== | ||
1769 | Changes for patch v195 | ||
1770 | |||
1771 | - Fixed buffer underrun in <try_modload> | ||
1772 | |||
1773 | - Moved down_read() from <search_for_entry_in_dir> to <find_entry> | ||
1774 | =============================================================================== | ||
1775 | Changes for patch v196 | ||
1776 | |||
1777 | - Fixed race in <devfsd_ioctl> when setting event mask | ||
1778 | Thanks to Kari Hurtta <hurtta@leija.mh.fmi.fi> | ||
1779 | |||
1780 | - Avoid deadlock in <devfs_follow_link> by using temporary buffer | ||
1781 | =============================================================================== | ||
1782 | Changes for patch v197 | ||
1783 | |||
1784 | - First release of new locking code for devfs core (v1.0) | ||
1785 | |||
1786 | - Fixed bug in drivers/cdrom/cdrom.c | ||
1787 | =============================================================================== | ||
1788 | Changes for patch v198 | ||
1789 | |||
1790 | - Discard temporary buffer, now use "%s" for dentry names | ||
1791 | |||
1792 | - Don't generate path in <try_modload>: use fake entry instead | ||
1793 | |||
1794 | - Use "existing" directory in <_devfs_make_parent_for_leaf> | ||
1795 | |||
1796 | - Use slab cache rather than fixed buffer for devfsd events | ||
1797 | =============================================================================== | ||
1798 | Changes for patch v199 | ||
1799 | |||
1800 | - Removed obsolete usage of DEVFS_FL_NO_PERSISTENCE | ||
1801 | |||
1802 | - Send DEVFSD_NOTIFY_REGISTERED events in <devfs_mk_dir> | ||
1803 | |||
1804 | - Fixed locking bug in <devfs_d_revalidate_wait> due to typo | ||
1805 | |||
1806 | - Do not send CREATE, CHANGE, ASYNC_OPEN or DELETE events from devfsd | ||
1807 | or children | ||
1808 | =============================================================================== | ||
1809 | Changes for patch v200 | ||
1810 | |||
1811 | - Ported to kernel 2.5.1-pre2 | ||
1812 | =============================================================================== | ||
1813 | Changes for patch v201 | ||
1814 | |||
1815 | - Fixed bug in <devfsd_read>: was dereferencing freed pointer | ||
1816 | =============================================================================== | ||
1817 | Changes for patch v202 | ||
1818 | |||
1819 | - Fixed bug in <devfsd_close>: was dereferencing freed pointer | ||
1820 | |||
1821 | - Added process group check for devfsd privileges | ||
1822 | =============================================================================== | ||
1823 | Changes for patch v203 | ||
1824 | |||
1825 | - Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> | ||
1826 | =============================================================================== | ||
1827 | Changes for patch v204 | ||
1828 | |||
1829 | - Removed long obsolete rc.devfs | ||
1830 | |||
1831 | - Return old entry in <devfs_mk_dir> for 2.4.x kernels | ||
1832 | |||
1833 | - Updated README from master HTML file | ||
1834 | |||
1835 | - Increment refcount on module in <check_disc_changed> | ||
1836 | |||
1837 | - Created <devfs_get_handle> and exported <devfs_put> | ||
1838 | |||
1839 | - Increment refcount on module in <devfs_get_ops> | ||
1840 | |||
1841 | - Created <devfs_put_ops> and used where needed to fix races | ||
1842 | |||
1843 | - Added clarifying comments in response to preliminary EMC code review | ||
1844 | |||
1845 | - Added poisoning to <devfs_put> | ||
1846 | |||
1847 | - Improved debugging messages | ||
1848 | |||
1849 | - Fixed unregister bugs in drivers/md/lvm-fs.c | ||
1850 | =============================================================================== | ||
1851 | Changes for patch v205 | ||
1852 | |||
1853 | - Corrected (made useful) debugging message in <unregister> | ||
1854 | |||
1855 | - Moved <kmem_cache_create> in <mount_devfs_fs> to <init_devfs_fs> | ||
1856 | |||
1857 | - Fixed drivers/md/lvm-fs.c to create "lvm" entry | ||
1858 | |||
1859 | - Added magic number to guard against scribbling drivers | ||
1860 | |||
1861 | - Only return old entry in <devfs_mk_dir> if a directory | ||
1862 | |||
1863 | - Defined macros for error and debug messages | ||
1864 | |||
1865 | - Updated README from master HTML file | ||
1866 | =============================================================================== | ||
1867 | Changes for patch v206 | ||
1868 | |||
1869 | - Added support for multiple Compaq cpqarray controllers | ||
1870 | |||
1871 | - Fixed (rare, old) race in <devfs_lookup> | ||
1872 | =============================================================================== | ||
1873 | Changes for patch v207 | ||
1874 | |||
1875 | - Fixed deadlock bug in <devfs_d_revalidate_wait> | ||
1876 | |||
1877 | - Tag VFS deletable in <devfs_mk_symlink> if handle ignored | ||
1878 | |||
1879 | - Updated README from master HTML file | ||
1880 | =============================================================================== | ||
1881 | Changes for patch v208 | ||
1882 | |||
1883 | - Added KERN_* to remaining messages | ||
1884 | |||
1885 | - Cleaned up declaration of <stat_read> | ||
1886 | |||
1887 | - Updated README from master HTML file | ||
1888 | =============================================================================== | ||
1889 | Changes for patch v209 | ||
1890 | |||
1891 | - Updated README from master HTML file | ||
1892 | |||
1893 | - Removed silently introduced calls to lock_kernel() and | ||
1894 | unlock_kernel() due to recent VFS locking changes. BKL isn't | ||
1895 | required in devfs | ||
1896 | |||
1897 | - Changed <devfs_rmdir> to allow later additions if not yet empty | ||
1898 | |||
1899 | - Added calls to <devfs_register_partitions> in drivers/block/blkpc.c | ||
1900 | <add_partition> and <del_partition> | ||
1901 | |||
1902 | - Fixed bug in <devfs_alloc_unique_number>: was clearing beyond | ||
1903 | bitfield | ||
1904 | |||
1905 | - Fixed bitfield data type for <devfs_*alloc_devnum> | ||
1906 | |||
1907 | - Made major bitfield type and initialiser 64 bit safe | ||
1908 | =============================================================================== | ||
1909 | Changes for patch v210 | ||
1910 | |||
1911 | - Updated fs/devfs/util.c to fix shift warning on 64 bit machines | ||
1912 | Thanks to Anton Blanchard <anton@samba.org> | ||
1913 | |||
1914 | - Updated README from master HTML file | ||
1915 | =============================================================================== | ||
1916 | Changes for patch v211 | ||
1917 | |||
1918 | - Do not put miscellaneous character devices in /dev/misc if they | ||
1919 | specify their own directory (i.e. contain a '/' character) | ||
1920 | |||
1921 | - Copied macro for error messages from fs/devfs/base.c to | ||
1922 | fs/devfs/util.c and made use of this macro | ||
1923 | |||
1924 | - Removed 2.4.x compatibility code from fs/devfs/base.c | ||
1925 | =============================================================================== | ||
1926 | Changes for patch v212 | ||
1927 | |||
1928 | - Added BKL to <devfs_open> because drivers still need it | ||
1929 | =============================================================================== | ||
1930 | Changes for patch v213 | ||
1931 | |||
1932 | - Protected <scan_dir_for_removable> and <get_removable_partition> | ||
1933 | from changing directory contents | ||
1934 | =============================================================================== | ||
1935 | Changes for patch v214 | ||
1936 | |||
1937 | - Switched to ISO C structure field initialisers | ||
1938 | |||
1939 | - Switch to set_current_state() and move before add_wait_queue() | ||
1940 | |||
1941 | - Updated README from master HTML file | ||
1942 | |||
1943 | - Fixed devfs entry leak in <devfs_readdir> when *readdir fails | ||
1944 | =============================================================================== | ||
1945 | Changes for patch v215 | ||
1946 | |||
1947 | - Created <devfs_find_and_unregister> | ||
1948 | |||
1949 | - Switched many functions from <devfs_find_handle> to | ||
1950 | <devfs_find_and_unregister> | ||
1951 | |||
1952 | - Switched many functions from <devfs_find_handle> to <devfs_get_handle> | ||
1953 | =============================================================================== | ||
1954 | Changes for patch v216 | ||
1955 | |||
1956 | - Switched arch/ia64/sn/io/hcl.c from <devfs_find_handle> to | ||
1957 | <devfs_get_handle> | ||
1958 | |||
1959 | - Removed deprecated <devfs_find_handle> | ||
1960 | =============================================================================== | ||
1961 | Changes for patch v217 | ||
1962 | |||
1963 | - Exported <devfs_find_and_unregister> and <devfs_only> to modules | ||
1964 | |||
1965 | - Updated README from master HTML file | ||
1966 | |||
1967 | - Fixed module unload race in <devfs_open> | ||
1968 | =============================================================================== | ||
1969 | Changes for patch v218 | ||
1970 | |||
1971 | - Removed DEVFS_FL_AUTO_OWNER flag | ||
1972 | |||
1973 | - Switched lingering structure field initialiser to ISO C | ||
1974 | |||
1975 | - Added locking when setting/clearing flags | ||
1976 | |||
1977 | - Documentation fix in fs/devfs/util.c | ||
diff --git a/Documentation/filesystems/devfs/README b/Documentation/filesystems/devfs/README deleted file mode 100644 index aabfba24bc2e..000000000000 --- a/Documentation/filesystems/devfs/README +++ /dev/null | |||
@@ -1,1959 +0,0 @@ | |||
1 | Devfs (Device File System) FAQ | ||
2 | |||
3 | |||
4 | Linux Devfs (Device File System) FAQ | ||
5 | Richard Gooch | ||
6 | 20-AUG-2002 | ||
7 | |||
8 | |||
9 | Document languages: | ||
10 | |||
11 | |||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 | ----------------------------------------------------------------------------- | ||
18 | |||
19 | NOTE: the master copy of this document is available online at: | ||
20 | |||
21 | http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html | ||
22 | and looks much better than the text version distributed with the | ||
23 | kernel sources. A mirror site is available at: | ||
24 | |||
25 | http://www.ras.ucalgary.ca/~rgooch/linux/docs/devfs.html | ||
26 | |||
27 | There is also an optional daemon that may be used with devfs. You can | ||
28 | find out more about it at: | ||
29 | |||
30 | http://www.atnf.csiro.au/~rgooch/linux/ | ||
31 | |||
32 | A mailing list is available which you may subscribe to. Send | ||
33 | |||
34 | to majordomo@oss.sgi.com with the following line in the | ||
35 | body of the message: | ||
36 | subscribe devfs | ||
37 | To unsubscribe, send the message body: | ||
38 | unsubscribe devfs | ||
39 | instead. The list is archived at | ||
40 | |||
41 | http://oss.sgi.com/projects/devfs/archive/. | ||
42 | |||
43 | ----------------------------------------------------------------------------- | ||
44 | |||
45 | Contents | ||
46 | |||
47 | |||
48 | What is it? | ||
49 | |||
50 | Why do it? | ||
51 | |||
52 | Who else does it? | ||
53 | |||
54 | How it works | ||
55 | |||
56 | Operational issues (essential reading) | ||
57 | |||
58 | Instructions for the impatient | ||
59 | Permissions persistence across reboots | ||
60 | Dealing with drivers without devfs support | ||
61 | All the way with Devfs | ||
62 | Other Issues | ||
63 | Kernel Naming Scheme | ||
64 | Devfsd Naming Scheme | ||
65 | Old Compatibility Names | ||
66 | SCSI Host Probing Issues | ||
67 | |||
68 | |||
69 | |||
70 | Device drivers currently ported | ||
71 | |||
72 | Allocation of Device Numbers | ||
73 | |||
74 | Questions and Answers | ||
75 | |||
76 | Making things work | ||
77 | Alternatives to devfs | ||
78 | What I don't like about devfs | ||
79 | How to report bugs | ||
80 | Strange kernel messages | ||
81 | Compilation problems with devfsd | ||
82 | |||
83 | |||
84 | Other resources | ||
85 | |||
86 | Translations of this document | ||
87 | |||
88 | |||
89 | ----------------------------------------------------------------------------- | ||
90 | |||
91 | |||
92 | What is it? | ||
93 | |||
94 | Devfs is an alternative to "real" character and block special devices | ||
95 | on your root filesystem. Kernel device drivers can register devices by | ||
96 | name rather than major and minor numbers. These devices will appear in | ||
97 | devfs automatically, with whatever default ownership and | ||
98 | protection the driver specified. A daemon (devfsd) can be used to | ||
99 | override these defaults. Devfs has been in the kernel since 2.3.46. | ||
100 | |||
101 | NOTE that devfs is entirely optional. If you prefer the old | ||
102 | disc-based device nodes, then simply leave CONFIG_DEVFS_FS=n (the | ||
103 | default). In this case, nothing will change. ALSO NOTE that if you do | ||
104 | enable devfs, the defaults are such that full compatibility is | ||
105 | maintained with the old devices names. | ||
106 | |||
107 | There are two aspects to devfs: one is the underlying device | ||
108 | namespace, which is a namespace just like any mounted filesystem. The | ||
109 | other aspect is the filesystem code which provides a view of the | ||
110 | device namespace. The reason I make a distinction is because devfs | ||
111 | can be mounted many times, with each mount showing the same device | ||
112 | namespace. Changes made are global to all mounted devfs filesystems. | ||
113 | Also, because the devfs namespace exists without any devfs mounts, you | ||
114 | can easily mount the root filesystem by referring to an entry in the | ||
115 | devfs namespace. | ||
116 | |||
117 | |||
118 | The cost of devfs is a small increase in kernel code size and memory | ||
119 | usage. About 7 pages of code (some of that in __init sections) and 72 | ||
120 | bytes for each entry in the namespace. A modest system has only a | ||
121 | couple of hundred device entries, so this costs a few more | ||
122 | pages. Compare this with the suggestion to put /dev on a <a | ||
123 | href="#why-faq-ramdisc">ramdisc. | ||
124 | |||
125 | On a typical machine, the cost is under 0.2 percent. On a modest | ||
126 | system with 64 MBytes of RAM, the cost is under 0.1 percent. The | ||
127 | accusations of "bloatware" levelled at devfs are not justified. | ||
128 | |||
129 | ----------------------------------------------------------------------------- | ||
130 | |||
131 | |||
132 | Why do it? | ||
133 | |||
134 | There are several problems that devfs addresses. Some of these | ||
135 | problems are more serious than others (depending on your point of | ||
136 | view), and some can be solved without devfs. However, the totality of | ||
137 | these problems really calls out for devfs. | ||
138 | |||
139 | The choice is a patchwork of inefficient user space solutions, which | ||
140 | are complex and likely to be fragile, or to use a simple and efficient | ||
141 | devfs which is robust. | ||
142 | |||
143 | There have been many counter-proposals to devfs, all seeking to | ||
144 | provide some of the benefits without actually implementing devfs. So | ||
145 | far there has been an absence of code and no proposed alternative has | ||
146 | been able to provide all the features that devfs does. Further, | ||
147 | alternative proposals require far more complexity in user-space (and | ||
148 | still deliver less functionality than devfs). Some people have the | ||
149 | mantra of reducing "kernel bloat", but don't consider the effects on | ||
150 | user-space. | ||
151 | |||
152 | A good solution limits the total complexity of kernel-space and | ||
153 | user-space. | ||
154 | |||
155 | |||
156 | Major&minor allocation | ||
157 | |||
158 | The existing scheme requires the allocation of major and minor device | ||
159 | numbers for each and every device. This means that a central | ||
160 | co-ordinating authority is required to issue these device numbers | ||
161 | (unless you're developing a "private" device driver), in order to | ||
162 | preserve uniqueness. Devfs shifts the burden to a namespace. This may | ||
163 | not seem like a huge benefit, but actually it is. Since driver authors | ||
164 | will naturally choose a device name which reflects the functionality | ||
165 | of the device, there is far less potential for namespace conflict. | ||
166 | Solving this requires a kernel change. | ||
167 | |||
168 | /dev management | ||
169 | |||
170 | Because you currently access devices through device nodes, these must | ||
171 | be created by the system administrator. For standard devices you can | ||
172 | usually find a MAKEDEV programme which creates all these (hundreds!) | ||
173 | of nodes. This means that changes in the kernel must be reflected by | ||
174 | changes in the MAKEDEV programme, or else the system administrator | ||
175 | creates device nodes by hand. | ||
176 | |||
177 | The basic problem is that there are two separate databases of | ||
178 | major and minor numbers. One is in the kernel and one is in /dev (or | ||
179 | in a MAKEDEV programme, if you want to look at it that way). This is | ||
180 | duplication of information, which is not good practice. | ||
181 | Solving this requires a kernel change. | ||
182 | |||
183 | /dev growth | ||
184 | |||
185 | A typical /dev has over 1200 nodes! Most of these devices simply don't | ||
186 | exist because the hardware is not available. A huge /dev increases the | ||
187 | time to access devices (I'm just referring to the dentry lookup times | ||
188 | and the time taken to read inodes off disc: the next subsection shows | ||
189 | some more horrors). | ||
190 | |||
191 | An example of how big /dev can grow is if we consider SCSI devices: | ||
192 | |||
193 | host 6 bits (say up to 64 hosts on a really big machine) | ||
194 | channel 4 bits (say up to 16 SCSI buses per host) | ||
195 | id 4 bits | ||
196 | lun 3 bits | ||
197 | partition 6 bits | ||
198 | TOTAL 23 bits | ||
199 | |||
200 | |||
201 | This requires 8 Mega (1024*1024) inodes if we want to store all | ||
202 | possible device nodes. Even if we scrap everything but id,partition | ||
203 | and assume a single host adapter with a single SCSI bus and only one | ||
204 | logical unit per SCSI target (id), that's still 10 bits or 1024 | ||
205 | inodes. Each VFS inode takes around 256 bytes (kernel 2.1.78), so | ||
206 | that's 256 kBytes of inode storage on disc (assuming real inodes take | ||
207 | a similar amount of space as VFS inodes). This is actually not so bad, | ||
208 | because disc is cheap these days. Embedded systems would care about | ||
209 | 256 kBytes of /dev inodes, but you could argue that embedded systems | ||
210 | would have hand-tuned /dev directories. I've had to do just that on my | ||
211 | embedded systems, but I would rather just leave it to devfs. | ||
212 | |||
213 | Another issue is the time taken to lookup an inode when first | ||
214 | referenced. Not only does this take time in scanning through a list in | ||
215 | memory, but also the seek times to read the inodes off disc. | ||
216 | This could be solved in user-space using a clever programme which | ||
217 | scanned the kernel logs and deleted /dev entries which are not | ||
218 | available and created them when they were available. This programme | ||
219 | would need to be run every time a new module was loaded, which would | ||
220 | slow things down a lot. | ||
221 | |||
222 | There is an existing programme called scsidev which will automatically | ||
223 | create device nodes for SCSI devices. It can do this by scanning files | ||
224 | in /proc/scsi. Unfortunately, to extend this idea to other device | ||
225 | nodes would require significant modifications to existing drivers (so | ||
226 | they too would provide information in /proc). This is a non-trivial | ||
227 | change (I should know: devfs has had to do something similar). Once | ||
228 | you go to this much effort, you may as well use devfs itself (which | ||
229 | also provides this information). Furthermore, such a system would | ||
230 | likely be implemented in an ad-hoc fashion, as different drivers will | ||
231 | provide their information in different ways. | ||
232 | |||
233 | Devfs is much cleaner, because it (naturally) has a uniform mechanism | ||
234 | to provide this information: the device nodes themselves! | ||
235 | |||
236 | |||
237 | Node to driver file_operations translation | ||
238 | |||
239 | There is an important difference between the way disc-based character | ||
240 | and block nodes and devfs entries make the connection between an entry | ||
241 | in /dev and the actual device driver. | ||
242 | |||
243 | With the current 8 bit major and minor numbers the connection between | ||
244 | disc-based c&b nodes and per-major drivers is done through a | ||
245 | fixed-length table of 128 entries. The various filesystem types set | ||
246 | the inode operations for c&b nodes to {chr,blk}dev_inode_operations, | ||
247 | so when a device is opened a few quick levels of indirection bring us | ||
248 | to the driver file_operations. | ||
249 | |||
250 | For miscellaneous character devices a second step is required: there | ||
251 | is a scan for the driver entry with the same minor number as the file | ||
252 | that was opened, and the appropriate minor open method is called. This | ||
253 | scanning is done *every time* you open a device node. Potentially, you | ||
254 | may be searching through dozens of misc. entries before you find your | ||
255 | open method. While not an enormous performance overhead, this does | ||
256 | seem pointless. | ||
257 | |||
258 | Linux *must* move beyond the 8 bit major and minor barrier, | ||
259 | somehow. If we simply increase each to 16 bits, then the indexing | ||
260 | scheme used for major driver lookup becomes untenable, because the | ||
261 | major tables (one each for character and block devices) would need to | ||
262 | be 64 k entries long (512 kBytes on x86, 1 MByte for 64 bit | ||
263 | systems). So we would have to use a scheme like that used for | ||
264 | miscellaneous character devices, which means the search time goes up | ||
265 | linearly with the average number of major device drivers on your | ||
266 | system. Not all "devices" are hardware, some are higher-level drivers | ||
267 | like KGI, so you can get more "devices" without adding hardware | ||
268 | You can improve this by creating an ordered (balanced:-) | ||
269 | binary tree, in which case your search time becomes log(N). | ||
270 | Alternatively, you can use hashing to speed up the search. | ||
271 | But why do that search at all if you don't have to? Once again, it | ||
272 | seems pointless. | ||
273 | |||
274 | Note that devfs doesn't use the major&minor system. For devfs | ||
275 | entries, the connection is done when you lookup the /dev entry. When | ||
276 | devfs_register() is called, an internal table is appended which has | ||
277 | the entry name and the file_operations. If the dentry cache doesn't | ||
278 | have the /dev entry already, this internal table is scanned to get the | ||
279 | file_operations, and an inode is created. If the dentry cache already | ||
280 | has the entry, there is *no lookup time* (other than the dentry scan | ||
281 | itself, but we can't avoid that anyway, and besides Linux dentries | ||
282 | cream other OS's which don't have them:-). Furthermore, the number of | ||
283 | node entries in a devfs is only the number of available device | ||
284 | entries, not the number of *conceivable* entries. Even if you remove | ||
285 | unnecessary entries in a disc-based /dev, the number of conceivable | ||
286 | entries remains the same: you just limit yourself in order to save | ||
287 | space. | ||
288 | |||
289 | Devfs provides a fast connection between a VFS node and the device | ||
290 | driver, in a scalable way. | ||
291 | |||
292 | /dev as a system administration tool | ||
293 | |||
294 | Right now /dev contains a list of conceivable devices, most of which I | ||
295 | don't have. Devfs only shows those devices available on my | ||
296 | system. This means that listing /dev is a handy way of checking what | ||
297 | devices are available. | ||
298 | |||
299 | Major&minor size | ||
300 | |||
301 | Existing major and minor numbers are limited to 8 bits each. This is | ||
302 | now a limiting factor for some drivers, particularly the SCSI disc | ||
303 | driver, which consumes a single major number. Only 16 discs are | ||
304 | supported, and each disc may have only 15 partitions. Maybe this isn't | ||
305 | a problem for you, but some of us are building huge Linux systems with | ||
306 | disc arrays. With devfs an arbitrary pointer can be associated with | ||
307 | each device entry, which can be used to give an effective 32 bit | ||
308 | device identifier (i.e. that's like having a 32 bit minor | ||
309 | number). Since this is private to the kernel, there are no C library | ||
310 | compatibility issues which you would have with increasing major and | ||
311 | minor number sizes. See the section on "Allocation of Device Numbers" | ||
312 | for details on maintaining compatibility with userspace. | ||
313 | |||
314 | Solving this requires a kernel change. | ||
315 | |||
316 | Since writing this, the kernel has been modified so that the SCSI disc | ||
317 | driver has more major numbers allocated to it and now supports up to | ||
318 | 128 discs. Since these major numbers are non-contiguous (a result of | ||
319 | unplanned expansion), the implementation is a little more cumbersome | ||
320 | than originally. | ||
321 | |||
322 | Just like the changes to IPv4 to fix impending limitations in the | ||
323 | address space, people find ways around the limitations. In the long | ||
324 | run, however, solutions like IPv6 or devfs can't be put off forever. | ||
325 | |||
326 | Read-only root filesystem | ||
327 | |||
328 | Having your device nodes on the root filesystem means that you can't | ||
329 | operate properly with a read-only root filesystem. This is because you | ||
330 | want to change ownerships and protections of tty devices. Existing | ||
331 | practice prevents you using a CD-ROM as your root filesystem for a | ||
332 | *real* system. Sure, you can boot off a CD-ROM, but you can't change | ||
333 | tty ownerships, so it's only good for installing. | ||
334 | |||
335 | Also, you can't use a shared NFS root filesystem for a cluster of | ||
336 | discless Linux machines (having tty ownerships changed on a common | ||
337 | /dev is not good). Nor can you embed your root filesystem in a | ||
338 | ROM-FS. | ||
339 | |||
340 | You can get around this by creating a RAMDISC at boot time, making | ||
341 | an ext2 filesystem in it, mounting it somewhere and copying the | ||
342 | contents of /dev into it, then unmounting it and mounting it over | ||
343 | /dev. | ||
344 | |||
345 | A devfs is a cleaner way of solving this. | ||
346 | |||
347 | Non-Unix root filesystem | ||
348 | |||
349 | Non-Unix filesystems (such as NTFS) can't be used for a root | ||
350 | filesystem because they variously don't support character and block | ||
351 | special files or symbolic links. You can't have a separate disc-based | ||
352 | or RAMDISC-based filesystem mounted on /dev because you need device | ||
353 | nodes before you can mount these. Devfs can be mounted without any | ||
354 | device nodes. Devlinks won't work because symlinks aren't supported. | ||
355 | An alternative solution is to use initrd to mount a RAMDISC initial | ||
356 | root filesystem (which is populated with a minimal set of device | ||
357 | nodes), and then construct a new /dev in another RAMDISC, and finally | ||
358 | switch to your non-Unix root filesystem. This requires clever boot | ||
359 | scripts and a fragile and conceptually complex boot procedure. | ||
360 | |||
361 | Devfs solves this in a robust and conceptually simple way. | ||
362 | |||
363 | PTY security | ||
364 | |||
365 | Current pseudo-tty (pty) devices are owned by root and read-writable | ||
366 | by everyone. The user of a pty-pair cannot change | ||
367 | ownership/protections without being suid-root. | ||
368 | |||
369 | This could be solved with a secure user-space daemon which runs as | ||
370 | root and does the actual creation of pty-pairs. Such a daemon would | ||
371 | require modification to *every* programme that wants to use this new | ||
372 | mechanism. It also slows down creation of pty-pairs. | ||
373 | |||
374 | An alternative is to create a new open_pty() syscall which does much | ||
375 | the same thing as the user-space daemon. Once again, this requires | ||
376 | modifications to pty-handling programmes. | ||
377 | |||
378 | The devfs solution allows a device driver to "tag" certain device | ||
379 | files so that when an unopened device is opened, the ownerships are | ||
380 | changed to the current euid and egid of the opening process, and the | ||
381 | protections are changed to the default registered by the driver. When | ||
382 | the device is closed ownership is set back to root and protections are | ||
383 | set back to read-write for everybody. No programme need be changed. | ||
384 | The devpts filesystem provides this auto-ownership feature for Unix98 | ||
385 | ptys. It doesn't support old-style pty devices, nor does it have all | ||
386 | the other features of devfs. | ||
387 | |||
388 | Intelligent device management | ||
389 | |||
390 | Devfs implements a simple yet powerful protocol for communication with | ||
391 | a device management daemon (devfsd) which runs in user space. It is | ||
392 | possible to send a message (either synchronously or asynchronously) to | ||
393 | devfsd on any event, such as registration/unregistration of device | ||
394 | entries, opening and closing devices, looking up inodes, scanning | ||
395 | directories and more. This has many possibilities. Some of these are | ||
396 | already implemented. See: | ||
397 | |||
398 | |||
399 | http://www.atnf.csiro.au/~rgooch/linux/ | ||
400 | |||
401 | Device entry registration events can be used by devfsd to change | ||
402 | permissions of newly-created device nodes. This is one mechanism to | ||
403 | control device permissions. | ||
404 | |||
405 | Device entry registration/unregistration events can be used to run | ||
406 | programmes or scripts. This can be used to provide automatic mounting | ||
407 | of filesystems when a new block device media is inserted into the | ||
408 | drive. | ||
409 | |||
410 | Asynchronous device open and close events can be used to implement | ||
411 | clever permissions management. For example, the default permissions on | ||
412 | /dev/dsp do not allow everybody to read from the device. This is | ||
413 | sensible, as you don't want some remote user recording what you say at | ||
414 | your console. However, the console user is also prevented from | ||
415 | recording. This behaviour is not desirable. With asynchronous device | ||
416 | open and close events, you can have devfsd run a programme or script | ||
417 | when console devices are opened to change the ownerships for *other* | ||
418 | device nodes (such as /dev/dsp). On closure, you can run a different | ||
419 | script to restore permissions. An advantage of this scheme over | ||
420 | modifying the C library tty handling is that this works even if your | ||
421 | programme crashes (how many times have you seen the utmp database with | ||
422 | lingering entries for non-existent logins?). | ||
423 | |||
424 | Synchronous device open events can be used to perform intelligent | ||
425 | device access protections. Before the device driver open() method is | ||
426 | called, the daemon must first validate the open attempt, by running an | ||
427 | external programme or script. This is far more flexible than access | ||
428 | control lists, as access can be determined on the basis of other | ||
429 | system conditions instead of just the UID and GID. | ||
430 | |||
431 | Inode lookup events can be used to authenticate module autoload | ||
432 | requests. Instead of using kmod directly, the event is sent to | ||
433 | devfsd which can implement an arbitrary authentication before loading | ||
434 | the module itself. | ||
435 | |||
436 | Inode lookup events can also be used to construct arbitrary | ||
437 | namespaces, without having to resort to populating devfs with symlinks | ||
438 | to devices that don't exist. | ||
439 | |||
440 | Speculative Device Scanning | ||
441 | |||
442 | Consider an application (like cdparanoia) that wants to find all | ||
443 | CD-ROM devices on the system (SCSI, IDE and other types), whether or | ||
444 | not their respective modules are loaded. The application must | ||
445 | speculatively open certain device nodes (such as /dev/sr0 for the SCSI | ||
446 | CD-ROMs) in order to make sure the module is loaded. This requires | ||
447 | that all Linux distributions follow the standard device naming scheme | ||
448 | (last time I looked RedHat did things differently). Devfs solves the | ||
449 | naming problem. | ||
450 | |||
451 | The same application also wants to see which devices are actually | ||
452 | available on the system. With the existing system it needs to read the | ||
453 | /dev directory and speculatively open each /dev/sr* device to | ||
454 | determine if the device exists or not. With a large /dev this is an | ||
455 | inefficient operation, especially if there are many /dev/sr* nodes. A | ||
456 | solution like scsidev could reduce the number of /dev/sr* entries (but | ||
457 | of course that also requires all that inefficient directory scanning). | ||
458 | |||
459 | With devfs, the application can open the /dev/sr directory | ||
460 | (which triggers the module autoloading if required), and proceed to | ||
461 | read /dev/sr. Since only the available devices will have | ||
462 | entries, there are no inefficencies in directory scanning or device | ||
463 | openings. | ||
464 | |||
465 | ----------------------------------------------------------------------------- | ||
466 | |||
467 | Who else does it? | ||
468 | |||
469 | FreeBSD has a devfs implementation. Solaris and AIX each have a | ||
470 | pseudo-devfs (something akin to scsidev but for all devices, with some | ||
471 | unspecified kernel support). BeOS, Plan9 and QNX also have it. SGI's | ||
472 | IRIX 6.4 and above also have a device filesystem. | ||
473 | |||
474 | While we shouldn't just automatically do something because others do | ||
475 | it, we should not ignore the work of others either. FreeBSD has a lot | ||
476 | of competent people working on it, so their opinion should not be | ||
477 | blithely ignored. | ||
478 | |||
479 | ----------------------------------------------------------------------------- | ||
480 | |||
481 | |||
482 | How it works | ||
483 | |||
484 | Registering device entries | ||
485 | |||
486 | For every entry (device node) in a devfs-based /dev a driver must call | ||
487 | devfs_register(). This adds the name of the device entry, the | ||
488 | file_operations structure pointer and a few other things to an | ||
489 | internal table. Device entries may be added and removed at any | ||
490 | time. When a device entry is registered, it automagically appears in | ||
491 | any mounted devfs'. | ||
492 | |||
493 | Inode lookup | ||
494 | |||
495 | When a lookup operation on an entry is performed and if there is no | ||
496 | driver information for that entry devfs will attempt to call | ||
497 | devfsd. If still no driver information can be found then a negative | ||
498 | dentry is yielded and the next stage operation will be called by the | ||
499 | VFS (such as create() or mknod() inode methods). If driver information | ||
500 | can be found, an inode is created (if one does not exist already) and | ||
501 | all is well. | ||
502 | |||
503 | Manually creating device nodes | ||
504 | |||
505 | The mknod() method allows you to create an ordinary named pipe in the | ||
506 | devfs, or you can create a character or block special inode if one | ||
507 | does not already exist. You may wish to create a character or block | ||
508 | special inode so that you can set permissions and ownership. Later, if | ||
509 | a device driver registers an entry with the same name, the | ||
510 | permissions, ownership and times are retained. This is how you can set | ||
511 | the protections on a device even before the driver is loaded. Once you | ||
512 | create an inode it appears in the directory listing. | ||
513 | |||
514 | Unregistering device entries | ||
515 | |||
516 | A device driver calls devfs_unregister() to unregister an entry. | ||
517 | |||
518 | Chroot() gaols | ||
519 | |||
520 | 2.2.x kernels | ||
521 | |||
522 | The semantics of inode creation are different when devfs is mounted | ||
523 | with the "explicit" option. Now, when a device entry is registered, it | ||
524 | will not appear until you use mknod() to create the device. It doesn't | ||
525 | matter if you mknod() before or after the device is registered with | ||
526 | devfs_register(). The purpose of this behaviour is to support | ||
527 | chroot(2) gaols, where you want to mount a minimal devfs inside the | ||
528 | gaol. Only the devices you specifically want to be available (through | ||
529 | your mknod() setup) will be accessible. | ||
530 | |||
531 | 2.4.x kernels | ||
532 | |||
533 | As of kernel 2.3.99, the VFS has had the ability to rebind parts of | ||
534 | the global filesystem namespace into another part of the namespace. | ||
535 | This now works even at the leaf-node level, which means that | ||
536 | individual files and device nodes may be bound into other parts of the | ||
537 | namespace. This is like making links, but better, because it works | ||
538 | across filesystems (unlike hard links) and works through chroot() | ||
539 | gaols (unlike symbolic links). | ||
540 | |||
541 | Because of these improvements to the VFS, the multi-mount capability | ||
542 | in devfs is no longer needed. The administrator may create a minimal | ||
543 | device tree inside a chroot(2) gaol by using VFS bindings. As this | ||
544 | provides most of the features of the devfs multi-mount capability, I | ||
545 | removed the multi-mount support code (after issuing an RFC). This | ||
546 | yielded code size reductions and simplifications. | ||
547 | |||
548 | If you want to construct a minimal chroot() gaol, the following | ||
549 | command should suffice: | ||
550 | |||
551 | mount --bind /dev/null /gaol/dev/null | ||
552 | |||
553 | |||
554 | Repeat for other device nodes you want to expose. Simple! | ||
555 | |||
556 | ----------------------------------------------------------------------------- | ||
557 | |||
558 | |||
559 | Operational issues | ||
560 | |||
561 | |||
562 | Instructions for the impatient | ||
563 | |||
564 | Nobody likes reading documentation. People just want to get in there | ||
565 | and play. So this section tells you quickly the steps you need to take | ||
566 | to run with devfs mounted over /dev. Skip these steps and you will end | ||
567 | up with a nearly unbootable system. Subsequent sections describe the | ||
568 | issues in more detail, and discuss non-essential configuration | ||
569 | options. | ||
570 | |||
571 | Devfsd | ||
572 | OK, if you're reading this, I assume you want to play with | ||
573 | devfs. First you should ensure that /usr/src/linux contains a | ||
574 | recent kernel source tree. Then you need to compile devfsd, the device | ||
575 | management daemon, available at | ||
576 | |||
577 | http://www.atnf.csiro.au/~rgooch/linux/. | ||
578 | Because the kernel has a naming scheme | ||
579 | which is quite different from the old naming scheme, you need to | ||
580 | install devfsd so that software and configuration files that use the | ||
581 | old naming scheme will not break. | ||
582 | |||
583 | Compile and install devfsd. You will be provided with a default | ||
584 | configuration file /etc/devfsd.conf which will provide | ||
585 | compatibility symlinks for the old naming scheme. Don't change this | ||
586 | config file unless you know what you're doing. Even if you think you | ||
587 | do know what you're doing, don't change it until you've followed all | ||
588 | the steps below and booted a devfs-enabled system and verified that it | ||
589 | works. | ||
590 | |||
591 | Now edit your main system boot script so that devfsd is started at the | ||
592 | very beginning (before any filesystem | ||
593 | checks). /etc/rc.d/rc.sysinit is often the main boot script | ||
594 | on systems with SysV-style boot scripts. On systems with BSD-style | ||
595 | boot scripts it is often /etc/rc. Also check | ||
596 | /sbin/rc. | ||
597 | |||
598 | NOTE that the line you put into the boot | ||
599 | script should be exactly: | ||
600 | |||
601 | /sbin/devfsd /dev | ||
602 | |||
603 | DO NOT use some special daemon-launching | ||
604 | programme, otherwise the boot script may not wait for devfsd to finish | ||
605 | initialising. | ||
606 | |||
607 | System Libraries | ||
608 | There may still be some problems because of broken software making | ||
609 | assumptions about device names. In particular, some software does not | ||
610 | handle devices which are symbolic links. If you are running a libc 5 | ||
611 | based system, install libc 5.4.44 (if you have libc 5.4.46, go back to | ||
612 | libc 5.4.44, which is actually correct). If you are running a glibc | ||
613 | based system, make sure you have glibc 2.1.3 or later. | ||
614 | |||
615 | /etc/securetty | ||
616 | PAM (Pluggable Authentication Modules) is supposed to be a flexible | ||
617 | mechanism for providing better user authentication and access to | ||
618 | services. Unfortunately, it's also fragile, complex and undocumented | ||
619 | (check out RedHat 6.1, and probably other distributions as well). PAM | ||
620 | has problems with symbolic links. Append the following lines to your | ||
621 | /etc/securetty file: | ||
622 | |||
623 | vc/1 | ||
624 | vc/2 | ||
625 | vc/3 | ||
626 | vc/4 | ||
627 | vc/5 | ||
628 | vc/6 | ||
629 | vc/7 | ||
630 | vc/8 | ||
631 | |||
632 | This will not weaken security. If you have a version of util-linux | ||
633 | earlier than 2.10.h, please upgrade to 2.10.h or later. If you | ||
634 | absolutely cannot upgrade, then also append the following lines to | ||
635 | your /etc/securetty file: | ||
636 | |||
637 | 1 | ||
638 | 2 | ||
639 | 3 | ||
640 | 4 | ||
641 | 5 | ||
642 | 6 | ||
643 | 7 | ||
644 | 8 | ||
645 | |||
646 | This may potentially weaken security by allowing root logins over the | ||
647 | network (a password is still required, though). However, since there | ||
648 | are problems with dealing with symlinks, I'm suspicious of the level | ||
649 | of security offered in any case. | ||
650 | |||
651 | XFree86 | ||
652 | While not essential, it's probably a good idea to upgrade to XFree86 | ||
653 | 4.0, as patches went in to make it more devfs-friendly. If you don't, | ||
654 | you'll probably need to apply the following patch to | ||
655 | /etc/security/console.perms so that ordinary users can run | ||
656 | startx. Note that not all distributions have this file (e.g. Debian), | ||
657 | so if it's not present, don't worry about it. | ||
658 | |||
659 | --- /etc/security/console.perms.orig Sat Apr 17 16:26:47 1999 | ||
660 | +++ /etc/security/console.perms Fri Feb 25 23:53:55 2000 | ||
661 | @@ -14,7 +14,7 @@ | ||
662 | # man 5 console.perms | ||
663 | |||
664 | # file classes -- these are regular expressions | ||
665 | -<console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9] | ||
666 | +<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9] | ||
667 | |||
668 | # device classes -- these are shell-style globs | ||
669 | <floppy>=/dev/fd[0-1]* | ||
670 | |||
671 | If the patch does not apply, then change the line: | ||
672 | |||
673 | <console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9] | ||
674 | |||
675 | with: | ||
676 | |||
677 | <console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9] | ||
678 | |||
679 | |||
680 | Disable devpts | ||
681 | I've had a report of devpts mounted on /dev/pts not working | ||
682 | correctly. Since devfs will also manage /dev/pts, there is no | ||
683 | need to mount devpts as well. You should either edit your | ||
684 | /etc/fstab so devpts is not mounted, or disable devpts from | ||
685 | your kernel configuration. | ||
686 | |||
687 | Unsupported drivers | ||
688 | Not all drivers have devfs support. If you depend on one of these | ||
689 | drivers, you will need to create a script or tarfile that you can use | ||
690 | at boot time to create device nodes as appropriate. There is a | ||
691 | section which describes this. Another | ||
692 | section lists the drivers which have | ||
693 | devfs support. | ||
694 | |||
695 | /dev/mouse | ||
696 | |||
697 | Many disributions configure /dev/mouse to be the mouse device | ||
698 | for XFree86 and GPM. I actually think this is a bad idea, because it | ||
699 | adds another level of indirection. When looking at a config file, if | ||
700 | you see /dev/mouse you're left wondering which mouse | ||
701 | is being referred to. Hence I recommend putting the actual mouse | ||
702 | device (for example /dev/psaux) into your | ||
703 | /etc/X11/XF86Config file (and similarly for the GPM | ||
704 | configuration file). | ||
705 | |||
706 | Alternatively, use the same technique used for unsupported drivers | ||
707 | described above. | ||
708 | |||
709 | The Kernel | ||
710 | Finally, you need to make sure devfs is compiled into your kernel. Set | ||
711 | CONFIG_EXPERIMENTAL=y, CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y by | ||
712 | using favourite configuration tool (i.e. make config or | ||
713 | make xconfig) and then make clean and then recompile your kernel and | ||
714 | modules. At boot, devfs will be mounted onto /dev. | ||
715 | |||
716 | If you encounter problems booting (for example if you forgot a | ||
717 | configuration step), you can pass devfs=nomount at the kernel | ||
718 | boot command line. This will prevent the kernel from mounting devfs at | ||
719 | boot time onto /dev. | ||
720 | |||
721 | In general, a kernel built with CONFIG_DEVFS_FS=y but without mounting | ||
722 | devfs onto /dev is completely safe, and requires no | ||
723 | configuration changes. One exception to take note of is when | ||
724 | LABEL= directives are used in /etc/fstab. In this | ||
725 | case you will be unable to boot properly. This is because the | ||
726 | mount(8) programme uses /proc/partitions as part of | ||
727 | the volume label search process, and the device names it finds are not | ||
728 | available, because setting CONFIG_DEVFS_FS=y changes the names in | ||
729 | /proc/partitions, irrespective of whether devfs is mounted. | ||
730 | |||
731 | Now you've finished all the steps required. You're now ready to boot | ||
732 | your shiny new kernel. Enjoy. | ||
733 | |||
734 | Changing the configuration | ||
735 | |||
736 | OK, you've now booted a devfs-enabled system, and everything works. | ||
737 | Now you may feel like changing the configuration (common targets are | ||
738 | /etc/fstab and /etc/devfsd.conf). Since you have a | ||
739 | system that works, if you make any changes and it doesn't work, you | ||
740 | now know that you only have to restore your configuration files to the | ||
741 | default and it will work again. | ||
742 | |||
743 | |||
744 | Permissions persistence across reboots | ||
745 | |||
746 | If you don't use mknod(2) to create a device file, nor use chmod(2) or | ||
747 | chown(2) to change the ownerships/permissions, the inode ctime will | ||
748 | remain at 0 (the epoch, 12 am, 1-JAN-1970, GMT). Anything with a ctime | ||
749 | later than this has had it's ownership/permissions changed. Hence, a | ||
750 | simple script or programme may be used to tar up all changed inodes, | ||
751 | prior to shutdown. Although effective, many consider this approach a | ||
752 | kludge. | ||
753 | |||
754 | A much better approach is to use devfsd to save and restore | ||
755 | permissions. It may be configured to record changes in permissions and | ||
756 | will save them in a database (in fact a directory tree), and restore | ||
757 | these upon boot. This is an efficient method and results in immediate | ||
758 | saving of current permissions (unlike the tar approach, which saves | ||
759 | permissions at some unspecified future time). | ||
760 | |||
761 | The default configuration file supplied with devfsd has config entries | ||
762 | which you may uncomment to enable persistence management. | ||
763 | |||
764 | If you decide to use the tar approach anyway, be aware that tar will | ||
765 | first unlink(2) an inode before creating a new device node. The | ||
766 | unlink(2) has the effect of breaking the connection between a devfs | ||
767 | entry and the device driver. If you use the "devfs=only" boot option, | ||
768 | you lose access to the device driver, requiring you to reload the | ||
769 | module. I consider this a bug in tar (there is no real need to | ||
770 | unlink(2) the inode first). | ||
771 | |||
772 | Alternatively, you can use devfsd to provide more sophisticated | ||
773 | management of device permissions. You can use devfsd to store | ||
774 | permissions for whole groups of devices with a single configuration | ||
775 | entry, rather than the conventional single entry per device entry. | ||
776 | |||
777 | Permissions database stored in mounted-over /dev | ||
778 | |||
779 | If you wish to save and restore your device permissions into the | ||
780 | disc-based /dev while still mounting devfs onto /dev | ||
781 | you may do so. This requires a 2.4.x kernel (in fact, 2.3.99 or | ||
782 | later), which has the VFS binding facility. You need to do the | ||
783 | following to set this up: | ||
784 | |||
785 | |||
786 | |||
787 | make sure the kernel does not mount devfs at boot time | ||
788 | |||
789 | |||
790 | make sure you have a correct /dev/console entry in your | ||
791 | root file-system (where your disc-based /dev lives) | ||
792 | |||
793 | create the /dev-state directory | ||
794 | |||
795 | |||
796 | add the following lines near the very beginning of your boot | ||
797 | scripts: | ||
798 | |||
799 | mount --bind /dev /dev-state | ||
800 | mount -t devfs none /dev | ||
801 | devfsd /dev | ||
802 | |||
803 | |||
804 | |||
805 | |||
806 | add the following lines to your /etc/devfsd.conf file: | ||
807 | |||
808 | REGISTER ^pt[sy] IGNORE | ||
809 | CREATE ^pt[sy] IGNORE | ||
810 | CHANGE ^pt[sy] IGNORE | ||
811 | DELETE ^pt[sy] IGNORE | ||
812 | REGISTER .* COPY /dev-state/$devname $devpath | ||
813 | CREATE .* COPY $devpath /dev-state/$devname | ||
814 | CHANGE .* COPY $devpath /dev-state/$devname | ||
815 | DELETE .* CFUNCTION GLOBAL unlink /dev-state/$devname | ||
816 | RESTORE /dev-state | ||
817 | |||
818 | Note that the sample devfsd.conf file contains these lines, | ||
819 | as well as other sample configurations you may find useful. See the | ||
820 | devfsd distribution | ||
821 | |||
822 | |||
823 | reboot. | ||
824 | |||
825 | |||
826 | |||
827 | |||
828 | Permissions database stored in normal directory | ||
829 | |||
830 | If you are using an older kernel which doesn't support VFS binding, | ||
831 | then you won't be able to have the permissions database in a | ||
832 | mounted-over /dev. However, you can still use a regular | ||
833 | directory to store the database. The sample /etc/devfsd.conf | ||
834 | file above may still be used. You will need to create the | ||
835 | /dev-state directory prior to installing devfsd. If you have | ||
836 | old permissions in /dev, then just copy (or move) the device | ||
837 | nodes over to the new directory. | ||
838 | |||
839 | Which method is better? | ||
840 | |||
841 | The best method is to have the permissions database stored in the | ||
842 | mounted-over /dev. This is because you will not need to copy | ||
843 | device nodes over to /dev-state, and because it allows you to | ||
844 | switch between devfs and non-devfs kernels, without requiring you to | ||
845 | copy permissions between /dev-state (for devfs) and | ||
846 | /dev (for non-devfs). | ||
847 | |||
848 | |||
849 | Dealing with drivers without devfs support | ||
850 | |||
851 | Currently, not all device drivers in the kernel have been modified to | ||
852 | use devfs. Device drivers which do not yet have devfs support will not | ||
853 | automagically appear in devfs. The simplest way to create device nodes | ||
854 | for these drivers is to unpack a tarfile containing the required | ||
855 | device nodes. You can do this in your boot scripts. All your drivers | ||
856 | will now work as before. | ||
857 | |||
858 | Hopefully for most people devfs will have enough support so that they | ||
859 | can mount devfs directly over /dev without losing most functionality | ||
860 | (i.e. losing access to various devices). As of 22-JAN-1998 (devfs | ||
861 | patch version 10) I am now running this way. All the devices I have | ||
862 | are available in devfs, so I don't lose anything. | ||
863 | |||
864 | WARNING: if your configuration requires the old-style device names | ||
865 | (i.e. /dev/hda1 or /dev/sda1), you must install devfsd and configure | ||
866 | it to maintain compatibility entries. It is almost certain that you | ||
867 | will require this. Note that the kernel creates a compatibility entry | ||
868 | for the root device, so you don't need initrd. | ||
869 | |||
870 | Note that you no longer need to mount devpts if you use Unix98 PTYs, | ||
871 | as devfs can manage /dev/pts itself. This saves you some RAM, as you | ||
872 | don't need to compile and install devpts. Note that some versions of | ||
873 | glibc have a bug with Unix98 pty handling on devfs systems. Contact | ||
874 | the glibc maintainers for a fix. Glibc 2.1.3 has the fix. | ||
875 | |||
876 | Note also that apart from editing /etc/fstab, other things will need | ||
877 | to be changed if you *don't* install devfsd. Some software (like the X | ||
878 | server) hard-wire device names in their source. It really is much | ||
879 | easier to install devfsd so that compatibility entries are created. | ||
880 | You can then slowly migrate your system to using the new device names | ||
881 | (for example, by starting with /etc/fstab), and then limiting the | ||
882 | compatibility entries that devfsd creates. | ||
883 | |||
884 | IF YOU CONFIGURE TO MOUNT DEVFS AT BOOT, MAKE SURE YOU INSTALL DEVFSD | ||
885 | BEFORE YOU BOOT A DEVFS-ENABLED KERNEL! | ||
886 | |||
887 | Now that devfs has gone into the 2.3.46 kernel, I'm getting a lot of | ||
888 | reports back. Many of these are because people are trying to run | ||
889 | without devfsd, and hence some things break. Please just run devfsd if | ||
890 | things break. I want to concentrate on real bugs rather than | ||
891 | misconfiguration problems at the moment. If people are willing to fix | ||
892 | bugs/false assumptions in other code (i.e. glibc, X server) and submit | ||
893 | that to the respective maintainers, that would be great. | ||
894 | |||
895 | |||
896 | All the way with Devfs | ||
897 | |||
898 | The devfs kernel patch creates a rationalised device tree. As stated | ||
899 | above, if you want to keep using the old /dev naming scheme, | ||
900 | you just need to configure devfsd appopriately (see the man | ||
901 | page). People who prefer the old names can ignore this section. For | ||
902 | those of us who like the rationalised names and an uncluttered | ||
903 | /dev, read on. | ||
904 | |||
905 | If you don't run devfsd, or don't enable compatibility entry | ||
906 | management, then you will have to configure your system to use the new | ||
907 | names. For example, you will then need to edit your | ||
908 | /etc/fstab to use the new disc naming scheme. If you want to | ||
909 | be able to boot non-devfs kernels, you will need compatibility | ||
910 | symlinks in the underlying disc-based /dev pointing back to | ||
911 | the old-style names for when you boot a kernel without devfs. | ||
912 | |||
913 | You can selectively decide which devices you want compatibility | ||
914 | entries for. For example, you may only want compatibility entries for | ||
915 | BSD pseudo-terminal devices (otherwise you'll have to patch you C | ||
916 | library or use Unix98 ptys instead). It's just a matter of putting in | ||
917 | the correct regular expression into /dev/devfsd.conf. | ||
918 | |||
919 | There are other choices of naming schemes that you may prefer. For | ||
920 | example, I don't use the kernel-supplied | ||
921 | names, because they are too verbose. A common misconception is | ||
922 | that the kernel-supplied names are meant to be used directly in | ||
923 | configuration files. This is not the case. They are designed to | ||
924 | reflect the layout of the devices attached and to provide easy | ||
925 | classification. | ||
926 | |||
927 | If you like the kernel-supplied names, that's fine. If you don't then | ||
928 | you should be using devfsd to construct a namespace more to your | ||
929 | liking. Devfsd has built-in code to construct a | ||
930 | namespace that is both logical and easy to | ||
931 | manage. In essence, it creates a convenient abbreviation of the | ||
932 | kernel-supplied namespace. | ||
933 | |||
934 | You are of course free to build your own namespace. Devfsd has all the | ||
935 | infrastructure required to make this easy for you. All you need do is | ||
936 | write a script. You can even write some C code and devfsd can load the | ||
937 | shared object as a callable extension. | ||
938 | |||
939 | |||
940 | Other Issues | ||
941 | |||
942 | The init programme | ||
943 | Another thing to take note of is whether your init programme | ||
944 | creates a Unix socket /dev/telinit. Some versions of init | ||
945 | create /dev/telinit so that the telinit programme can | ||
946 | communicate with the init process. If you have such a system you need | ||
947 | to make sure that devfs is mounted over /dev *before* init | ||
948 | starts. In other words, you can't leave the mounting of devfs to | ||
949 | /etc/rc, since this is executed after init. Other | ||
950 | versions of init require a named pipe /dev/initctl | ||
951 | which must exist *before* init starts. Once again, you need to | ||
952 | mount devfs and then create the named pipe *before* init | ||
953 | starts. | ||
954 | |||
955 | The default behaviour now is not to mount devfs onto /dev at | ||
956 | boot time for 2.3.x and later kernels. You can correct this with the | ||
957 | "devfs=mount" boot option. This solves any problems with init, | ||
958 | and also prevents the dreaded: | ||
959 | |||
960 | Cannot open initial console | ||
961 | |||
962 | message. For 2.2.x kernels where you need to apply the devfs patch, | ||
963 | the default is to mount. | ||
964 | |||
965 | If you have automatic mounting of devfs onto /dev then you | ||
966 | may need to create /dev/initctl in your boot scripts. The | ||
967 | following lines should suffice: | ||
968 | |||
969 | mknod /dev/initctl p | ||
970 | kill -SIGUSR1 1 # tell init that /dev/initctl now exists | ||
971 | |||
972 | Alternatively, if you don't want the kernel to mount devfs onto | ||
973 | /dev then you could use the following procedure is a | ||
974 | guideline for how to get around /dev/initctl problems: | ||
975 | |||
976 | # cd /sbin | ||
977 | # mv init init.real | ||
978 | # cat > init | ||
979 | #! /bin/sh | ||
980 | mount -n -t devfs none /dev | ||
981 | mknod /dev/initctl p | ||
982 | exec /sbin/init.real $* | ||
983 | [control-D] | ||
984 | # chmod a+x init | ||
985 | |||
986 | Note that newer versions of init create /dev/initctl | ||
987 | automatically, so you don't have to worry about this. | ||
988 | |||
989 | Module autoloading | ||
990 | You will need to configure devfsd to enable module | ||
991 | autoloading. The following lines should be placed in your | ||
992 | /etc/devfsd.conf file: | ||
993 | |||
994 | LOOKUP .* MODLOAD | ||
995 | |||
996 | |||
997 | As of devfsd-v1.3.10, a generic /etc/modules.devfs | ||
998 | configuration file is installed, which is used by the MODLOAD | ||
999 | action. This should be sufficient for most configurations. If you | ||
1000 | require further configuration, edit your /etc/modules.conf | ||
1001 | file. The way module autoloading work with devfs is: | ||
1002 | |||
1003 | |||
1004 | a process attempts to lookup a device node (e.g. /dev/fred) | ||
1005 | |||
1006 | |||
1007 | if that device node does not exist, the full pathname is passed to | ||
1008 | devfsd as a string | ||
1009 | |||
1010 | |||
1011 | devfsd will pass the string to the modprobe programme (provided the | ||
1012 | configuration line shown above is present), and specifies that | ||
1013 | /etc/modules.devfs is the configuration file | ||
1014 | |||
1015 | |||
1016 | /etc/modules.devfs includes /etc/modules.conf to | ||
1017 | access local configurations | ||
1018 | |||
1019 | modprobe will search it's configuration files, looking for an alias | ||
1020 | that translates the pathname into a module name | ||
1021 | |||
1022 | |||
1023 | the translated pathname is then used to load the module. | ||
1024 | |||
1025 | |||
1026 | If you wanted a lookup of /dev/fred to load the | ||
1027 | mymod module, you would require the following configuration | ||
1028 | line in /etc/modules.conf: | ||
1029 | |||
1030 | alias /dev/fred mymod | ||
1031 | |||
1032 | The /etc/modules.devfs configuration file provides many such | ||
1033 | aliases for standard device names. If you look closely at this file, | ||
1034 | you will note that some modules require multiple alias configuration | ||
1035 | lines. This is required to support module autoloading for old and new | ||
1036 | device names. | ||
1037 | |||
1038 | Mounting root off a devfs device | ||
1039 | If you wish to mount root off a devfs device when you pass the | ||
1040 | "devfs=only" boot option, then you need to pass in the | ||
1041 | "root=<device>" option to the kernel when booting. If you use | ||
1042 | LILO, then you must have this in lilo.conf: | ||
1043 | |||
1044 | append = "root=<device>" | ||
1045 | |||
1046 | Surprised? Yep, so was I. It turns out if you have (as most people | ||
1047 | do): | ||
1048 | |||
1049 | root = <device> | ||
1050 | |||
1051 | |||
1052 | then LILO will determine the device number of <device> and will | ||
1053 | write that device number into a special place in the kernel image | ||
1054 | before starting the kernel, and the kernel will use that device number | ||
1055 | to mount the root filesystem. So, using the "append" variety ensures | ||
1056 | that LILO passes the root filesystem device as a string, which devfs | ||
1057 | can then use. | ||
1058 | |||
1059 | Note that this isn't an issue if you don't pass "devfs=only". | ||
1060 | |||
1061 | TTY issues | ||
1062 | The ttyname(3) function in some versions of the C library makes | ||
1063 | false assumptions about device entries which are symbolic links. The | ||
1064 | tty(1) programme is one that depends on this function. I've | ||
1065 | written a patch to libc 5.4.43 which fixes this. This has been | ||
1066 | included in libc 5.4.44 and a similar fix is in glibc 2.1.3. | ||
1067 | |||
1068 | |||
1069 | Kernel Naming Scheme | ||
1070 | |||
1071 | The kernel provides a default naming scheme. This scheme is designed | ||
1072 | to make it easy to search for specific devices or device types, and to | ||
1073 | view the available devices. Some device types (such as hard discs), | ||
1074 | have a directory of entries, making it easy to see what devices of | ||
1075 | that class are available. Often, the entries are symbolic links into a | ||
1076 | directory tree that reflects the topology of available devices. The | ||
1077 | topological tree is useful for finding how your devices are arranged. | ||
1078 | |||
1079 | Below is a list of the naming schemes for the most common drivers. A | ||
1080 | list of reserved device names is | ||
1081 | available for reference. Please send email to | ||
1082 | rgooch@atnf.csiro.au to obtain an allocation. Please be | ||
1083 | patient (the maintainer is busy). An alternative name may be allocated | ||
1084 | instead of the requested name, at the discretion of the maintainer. | ||
1085 | |||
1086 | Disc Devices | ||
1087 | |||
1088 | All discs, whether SCSI, IDE or whatever, are placed under the | ||
1089 | /dev/discs hierarchy: | ||
1090 | |||
1091 | /dev/discs/disc0 first disc | ||
1092 | /dev/discs/disc1 second disc | ||
1093 | |||
1094 | |||
1095 | Each of these entries is a symbolic link to the directory for that | ||
1096 | device. The device directory contains: | ||
1097 | |||
1098 | disc for the whole disc | ||
1099 | part* for individual partitions | ||
1100 | |||
1101 | |||
1102 | CD-ROM Devices | ||
1103 | |||
1104 | All CD-ROMs, whether SCSI, IDE or whatever, are placed under the | ||
1105 | /dev/cdroms hierarchy: | ||
1106 | |||
1107 | /dev/cdroms/cdrom0 first CD-ROM | ||
1108 | /dev/cdroms/cdrom1 second CD-ROM | ||
1109 | |||
1110 | |||
1111 | Each of these entries is a symbolic link to the real device entry for | ||
1112 | that device. | ||
1113 | |||
1114 | Tape Devices | ||
1115 | |||
1116 | All tapes, whether SCSI, IDE or whatever, are placed under the | ||
1117 | /dev/tapes hierarchy: | ||
1118 | |||
1119 | /dev/tapes/tape0 first tape | ||
1120 | /dev/tapes/tape1 second tape | ||
1121 | |||
1122 | |||
1123 | Each of these entries is a symbolic link to the directory for that | ||
1124 | device. The device directory contains: | ||
1125 | |||
1126 | mt for mode 0 | ||
1127 | mtl for mode 1 | ||
1128 | mtm for mode 2 | ||
1129 | mta for mode 3 | ||
1130 | mtn for mode 0, no rewind | ||
1131 | mtln for mode 1, no rewind | ||
1132 | mtmn for mode 2, no rewind | ||
1133 | mtan for mode 3, no rewind | ||
1134 | |||
1135 | |||
1136 | SCSI Devices | ||
1137 | |||
1138 | To uniquely identify any SCSI device requires the following | ||
1139 | information: | ||
1140 | |||
1141 | controller (host adapter) | ||
1142 | bus (SCSI channel) | ||
1143 | target (SCSI ID) | ||
1144 | unit (Logical Unit Number) | ||
1145 | |||
1146 | |||
1147 | All SCSI devices are placed under /dev/scsi (assuming devfs | ||
1148 | is mounted on /dev). Hence, a SCSI device with the following | ||
1149 | parameters: c=1,b=2,t=3,u=4 would appear as: | ||
1150 | |||
1151 | /dev/scsi/host1/bus2/target3/lun4 device directory | ||
1152 | |||
1153 | |||
1154 | Inside this directory, a number of device entries may be created, | ||
1155 | depending on which SCSI device-type drivers were installed. | ||
1156 | |||
1157 | See the section on the disc naming scheme to see what entries the SCSI | ||
1158 | disc driver creates. | ||
1159 | |||
1160 | See the section on the tape naming scheme to see what entries the SCSI | ||
1161 | tape driver creates. | ||
1162 | |||
1163 | The SCSI CD-ROM driver creates: | ||
1164 | |||
1165 | cd | ||
1166 | |||
1167 | |||
1168 | The SCSI generic driver creates: | ||
1169 | |||
1170 | generic | ||
1171 | |||
1172 | |||
1173 | IDE Devices | ||
1174 | |||
1175 | To uniquely identify any IDE device requires the following | ||
1176 | information: | ||
1177 | |||
1178 | controller | ||
1179 | bus (aka. primary/secondary) | ||
1180 | target (aka. master/slave) | ||
1181 | unit | ||
1182 | |||
1183 | |||
1184 | All IDE devices are placed under /dev/ide, and uses a similar | ||
1185 | naming scheme to the SCSI subsystem. | ||
1186 | |||
1187 | XT Hard Discs | ||
1188 | |||
1189 | All XT discs are placed under /dev/xd. The first XT disc has | ||
1190 | the directory /dev/xd/disc0. | ||
1191 | |||
1192 | TTY devices | ||
1193 | |||
1194 | The tty devices now appear as: | ||
1195 | |||
1196 | New name Old-name Device Type | ||
1197 | -------- -------- ----------- | ||
1198 | /dev/tts/{0,1,...} /dev/ttyS{0,1,...} Serial ports | ||
1199 | /dev/cua/{0,1,...} /dev/cua{0,1,...} Call out devices | ||
1200 | /dev/vc/0 /dev/tty Current virtual console | ||
1201 | /dev/vc/{1,2,...} /dev/tty{1...63} Virtual consoles | ||
1202 | /dev/vcc/{0,1,...} /dev/vcs{1...63} Virtual consoles | ||
1203 | /dev/pty/m{0,1,...} /dev/ptyp?? PTY masters | ||
1204 | /dev/pty/s{0,1,...} /dev/ttyp?? PTY slaves | ||
1205 | |||
1206 | |||
1207 | RAMDISCS | ||
1208 | |||
1209 | The RAMDISCS are placed in their own directory, and are named thus: | ||
1210 | |||
1211 | /dev/rd/{0,1,2,...} | ||
1212 | |||
1213 | |||
1214 | Meta Devices | ||
1215 | |||
1216 | The meta devices are placed in their own directory, and are named | ||
1217 | thus: | ||
1218 | |||
1219 | /dev/md/{0,1,2,...} | ||
1220 | |||
1221 | |||
1222 | Floppy discs | ||
1223 | |||
1224 | Floppy discs are placed in the /dev/floppy directory. | ||
1225 | |||
1226 | Loop devices | ||
1227 | |||
1228 | Loop devices are placed in the /dev/loop directory. | ||
1229 | |||
1230 | Sound devices | ||
1231 | |||
1232 | Sound devices are placed in the /dev/sound directory | ||
1233 | (audio, sequencer, ...). | ||
1234 | |||
1235 | |||
1236 | Devfsd Naming Scheme | ||
1237 | |||
1238 | Devfsd provides a naming scheme which is a convenient abbreviation of | ||
1239 | the kernel-supplied namespace. In some | ||
1240 | cases, the kernel-supplied naming scheme is quite convenient, so | ||
1241 | devfsd does not provide another naming scheme. The convenience names | ||
1242 | that devfsd creates are in fact the same names as the original devfs | ||
1243 | kernel patch created (before Linus mandated the Big Name | ||
1244 | Change). These are referred to as "new compatibility entries". | ||
1245 | |||
1246 | In order to configure devfsd to create these convenience names, the | ||
1247 | following lines should be placed in your /etc/devfsd.conf: | ||
1248 | |||
1249 | REGISTER .* MKNEWCOMPAT | ||
1250 | UNREGISTER .* RMNEWCOMPAT | ||
1251 | |||
1252 | This will cause devfsd to create (and destroy) symbolic links which | ||
1253 | point to the kernel-supplied names. | ||
1254 | |||
1255 | SCSI Hard Discs | ||
1256 | |||
1257 | All SCSI discs are placed under /dev/sd (assuming devfs is | ||
1258 | mounted on /dev). Hence, a SCSI disc with the following | ||
1259 | parameters: c=1,b=2,t=3,u=4 would appear as: | ||
1260 | |||
1261 | /dev/sd/c1b2t3u4 for the whole disc | ||
1262 | /dev/sd/c1b2t3u4p5 for the 5th partition | ||
1263 | /dev/sd/c1b2t3u4p5s6 for the 6th slice in the 5th partition | ||
1264 | |||
1265 | |||
1266 | SCSI Tapes | ||
1267 | |||
1268 | All SCSI tapes are placed under /dev/st. A similar naming | ||
1269 | scheme is used as for SCSI discs. A SCSI tape with the | ||
1270 | parameters:c=1,b=2,t=3,u=4 would appear as: | ||
1271 | |||
1272 | /dev/st/c1b2t3u4m0 for mode 0 | ||
1273 | /dev/st/c1b2t3u4m1 for mode 1 | ||
1274 | /dev/st/c1b2t3u4m2 for mode 2 | ||
1275 | /dev/st/c1b2t3u4m3 for mode 3 | ||
1276 | /dev/st/c1b2t3u4m0n for mode 0, no rewind | ||
1277 | /dev/st/c1b2t3u4m1n for mode 1, no rewind | ||
1278 | /dev/st/c1b2t3u4m2n for mode 2, no rewind | ||
1279 | /dev/st/c1b2t3u4m3n for mode 3, no rewind | ||
1280 | |||
1281 | |||
1282 | SCSI CD-ROMs | ||
1283 | |||
1284 | All SCSI CD-ROMs are placed under /dev/sr. A similar naming | ||
1285 | scheme is used as for SCSI discs. A SCSI CD-ROM with the | ||
1286 | parameters:c=1,b=2,t=3,u=4 would appear as: | ||
1287 | |||
1288 | /dev/sr/c1b2t3u4 | ||
1289 | |||
1290 | |||
1291 | SCSI Generic Devices | ||
1292 | |||
1293 | The generic (aka. raw) interface for all SCSI devices are placed under | ||
1294 | /dev/sg. A similar naming scheme is used as for SCSI discs. A | ||
1295 | SCSI generic device with the parameters:c=1,b=2,t=3,u=4 would appear | ||
1296 | as: | ||
1297 | |||
1298 | /dev/sg/c1b2t3u4 | ||
1299 | |||
1300 | |||
1301 | IDE Hard Discs | ||
1302 | |||
1303 | All IDE discs are placed under /dev/ide/hd, using a similar | ||
1304 | convention to SCSI discs. The following mappings exist between the new | ||
1305 | and the old names: | ||
1306 | |||
1307 | /dev/hda /dev/ide/hd/c0b0t0u0 | ||
1308 | /dev/hdb /dev/ide/hd/c0b0t1u0 | ||
1309 | /dev/hdc /dev/ide/hd/c0b1t0u0 | ||
1310 | /dev/hdd /dev/ide/hd/c0b1t1u0 | ||
1311 | |||
1312 | |||
1313 | IDE Tapes | ||
1314 | |||
1315 | A similar naming scheme is used as for IDE discs. The entries will | ||
1316 | appear in the /dev/ide/mt directory. | ||
1317 | |||
1318 | IDE CD-ROM | ||
1319 | |||
1320 | A similar naming scheme is used as for IDE discs. The entries will | ||
1321 | appear in the /dev/ide/cd directory. | ||
1322 | |||
1323 | IDE Floppies | ||
1324 | |||
1325 | A similar naming scheme is used as for IDE discs. The entries will | ||
1326 | appear in the /dev/ide/fd directory. | ||
1327 | |||
1328 | XT Hard Discs | ||
1329 | |||
1330 | All XT discs are placed under /dev/xd. The first XT disc | ||
1331 | would appear as /dev/xd/c0t0. | ||
1332 | |||
1333 | |||
1334 | Old Compatibility Names | ||
1335 | |||
1336 | The old compatibility names are the legacy device names, such as | ||
1337 | /dev/hda, /dev/sda, /dev/rtc and so on. | ||
1338 | Devfsd can be configured to create compatibility symlinks so that you | ||
1339 | may continue to use the old names in your configuration files and so | ||
1340 | that old applications will continue to function correctly. | ||
1341 | |||
1342 | In order to configure devfsd to create these legacy names, the | ||
1343 | following lines should be placed in your /etc/devfsd.conf: | ||
1344 | |||
1345 | REGISTER .* MKOLDCOMPAT | ||
1346 | UNREGISTER .* RMOLDCOMPAT | ||
1347 | |||
1348 | This will cause devfsd to create (and destroy) symbolic links which | ||
1349 | point to the kernel-supplied names. | ||
1350 | |||
1351 | |||
1352 | ----------------------------------------------------------------------------- | ||
1353 | |||
1354 | |||
1355 | Device drivers currently ported | ||
1356 | |||
1357 | - All miscellaneous character devices support devfs (this is done | ||
1358 | transparently through misc_register()) | ||
1359 | |||
1360 | - SCSI discs and generic hard discs | ||
1361 | |||
1362 | - Character memory devices (null, zero, full and so on) | ||
1363 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
1364 | |||
1365 | - Loop devices (/dev/loop?) | ||
1366 | |||
1367 | - TTY devices (console, serial ports, terminals and pseudo-terminals) | ||
1368 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
1369 | |||
1370 | - SCSI tapes (/dev/scsi and /dev/tapes) | ||
1371 | |||
1372 | - SCSI CD-ROMs (/dev/scsi and /dev/cdroms) | ||
1373 | |||
1374 | - SCSI generic devices (/dev/scsi) | ||
1375 | |||
1376 | - RAMDISCS (/dev/ram?) | ||
1377 | |||
1378 | - Meta Devices (/dev/md*) | ||
1379 | |||
1380 | - Floppy discs (/dev/floppy) | ||
1381 | |||
1382 | - Parallel port printers (/dev/printers) | ||
1383 | |||
1384 | - Sound devices (/dev/sound) | ||
1385 | Thanks to Eric Dumas <dumas@linux.eu.org> and | ||
1386 | C. Scott Ananian <cananian@alumni.princeton.edu> | ||
1387 | |||
1388 | - Joysticks (/dev/joysticks) | ||
1389 | |||
1390 | - Sparc keyboard (/dev/kbd) | ||
1391 | |||
1392 | - DSP56001 digital signal processor (/dev/dsp56k) | ||
1393 | |||
1394 | - Apple Desktop Bus (/dev/adb) | ||
1395 | |||
1396 | - Coda network file system (/dev/cfs*) | ||
1397 | |||
1398 | - Virtual console capture devices (/dev/vcc) | ||
1399 | Thanks to Dennis Hou <smilax@mindmeld.yi.org> | ||
1400 | |||
1401 | - Frame buffer devices (/dev/fb) | ||
1402 | |||
1403 | - Video capture devices (/dev/v4l) | ||
1404 | |||
1405 | |||
1406 | ----------------------------------------------------------------------------- | ||
1407 | |||
1408 | |||
1409 | Allocation of Device Numbers | ||
1410 | |||
1411 | Devfs allows you to write a driver which doesn't need to allocate a | ||
1412 | device number (major&minor numbers) for the internal operation of the | ||
1413 | kernel. However, there are a number of userspace programmes that use | ||
1414 | the device number as a unique handle for a device. An example is the | ||
1415 | find programme, which uses device numbers to determine whether | ||
1416 | an inode is on a different filesystem than another inode. The device | ||
1417 | number used is the one for the block device which a filesystem is | ||
1418 | using. To preserve compatibility with userspace programmes, block | ||
1419 | devices using devfs need to have unique device numbers allocated to | ||
1420 | them. Furthermore, POSIX specifies device numbers, so some kind of | ||
1421 | device number needs to be presented to userspace. | ||
1422 | |||
1423 | The simplest option (especially when porting drivers to devfs) is to | ||
1424 | keep using the old major and minor numbers. Devfs will take whatever | ||
1425 | values are given for major&minor and pass them onto userspace. | ||
1426 | |||
1427 | This device number is a 16 bit number, so this leaves plenty of space | ||
1428 | for large numbers of discs and partitions. This scheme can also be | ||
1429 | used for character devices, in particular the tty devices, which are | ||
1430 | currently limited to 256 pseudo-ttys (this limits the total number of | ||
1431 | simultaneous xterms and remote logins). Note that the device number | ||
1432 | is limited to the range 36864-61439 (majors 144-239), in order to | ||
1433 | avoid any possible conflicts with existing official allocations. | ||
1434 | |||
1435 | Please note that using dynamically allocated block device numbers may | ||
1436 | break the NFS daemons (both user and kernel mode), which expect dev_t | ||
1437 | for a given device to be constant over the lifetime of remote mounts. | ||
1438 | |||
1439 | A final note on this scheme: since it doesn't increase the size of | ||
1440 | device numbers, there are no compatibility issues with userspace. | ||
1441 | |||
1442 | ----------------------------------------------------------------------------- | ||
1443 | |||
1444 | |||
1445 | Questions and Answers | ||
1446 | |||
1447 | |||
1448 | Making things work | ||
1449 | Alternatives to devfs | ||
1450 | What I don't like about devfs | ||
1451 | How to report bugs | ||
1452 | Strange kernel messages | ||
1453 | Compilation problems with devfsd | ||
1454 | |||
1455 | |||
1456 | |||
1457 | Making things work | ||
1458 | |||
1459 | Here are some common questions and answers. | ||
1460 | |||
1461 | |||
1462 | |||
1463 | Devfsd doesn't start | ||
1464 | |||
1465 | Make sure you have compiled and installed devfsd | ||
1466 | Make sure devfsd is being started from your boot | ||
1467 | scripts | ||
1468 | Make sure you have configured your kernel to enable devfs (see | ||
1469 | below) | ||
1470 | Make sure devfs is mounted (see below) | ||
1471 | |||
1472 | |||
1473 | Devfsd is not managing all my permissions | ||
1474 | |||
1475 | Make sure you are capturing the appropriate events. For example, | ||
1476 | device entries created by the kernel generate REGISTER events, | ||
1477 | but those created by devfsd generate CREATE events. | ||
1478 | |||
1479 | |||
1480 | Devfsd is not capturing all REGISTER events | ||
1481 | |||
1482 | See the previous entry: you may need to capture CREATE events. | ||
1483 | |||
1484 | |||
1485 | X will not start | ||
1486 | |||
1487 | Make sure you followed the steps | ||
1488 | outlined above. | ||
1489 | |||
1490 | |||
1491 | Why don't my network devices appear in devfs? | ||
1492 | |||
1493 | This is not a bug. Network devices have their own, completely separate | ||
1494 | namespace. They are accessed via socket(2) and | ||
1495 | setsockopt(2) calls, and thus require no device nodes. I have | ||
1496 | raised the possibilty of moving network devices into the device | ||
1497 | namespace, but have had no response. | ||
1498 | |||
1499 | |||
1500 | How can I test if I have devfs compiled into my kernel? | ||
1501 | |||
1502 | All filesystems built-in or currently loaded are listed in | ||
1503 | /proc/filesystems. If you see a devfs entry, then | ||
1504 | you know that devfs was compiled into your kernel. If you have | ||
1505 | correctly configured and rebuilt your kernel, then devfs will be | ||
1506 | built-in. If you think you've configured it in, but | ||
1507 | /proc/filesystems doesn't show it, you've made a mistake. | ||
1508 | Common mistakes include: | ||
1509 | |||
1510 | Using a 2.2.x kernel without applying the devfs patch (if you | ||
1511 | don't know how to patch your kernel, use 2.4.x instead, don't bother | ||
1512 | asking me how to patch) | ||
1513 | Forgetting to set CONFIG_EXPERIMENTAL=y | ||
1514 | Forgetting to set CONFIG_DEVFS_FS=y | ||
1515 | Forgetting to set CONFIG_DEVFS_MOUNT=y (if you want devfs | ||
1516 | to be automatically mounted at boot) | ||
1517 | Editing your .config manually, instead of using make | ||
1518 | config or make xconfig | ||
1519 | Forgetting to run make dep; make clean after changing the | ||
1520 | configuration and before compiling | ||
1521 | Forgetting to compile your kernel and modules | ||
1522 | Forgetting to install your kernel | ||
1523 | Forgetting to install your modules | ||
1524 | |||
1525 | Please check twice that you've done all these steps before sending in | ||
1526 | a bug report. | ||
1527 | |||
1528 | |||
1529 | |||
1530 | How can I test if devfs is mounted on /dev? | ||
1531 | |||
1532 | The device filesystem will always create an entry called | ||
1533 | ".devfsd", which is used to communicate with the daemon. Even | ||
1534 | if the daemon is not running, this entry will exist. Testing for the | ||
1535 | existence of this entry is the approved method of determining if devfs | ||
1536 | is mounted or not. Note that the type of entry (i.e. regular file, | ||
1537 | character device, named pipe, etc.) may change without notice. Only | ||
1538 | the existence of the entry should be relied upon. | ||
1539 | |||
1540 | |||
1541 | When I start devfsd, I see the error: | ||
1542 | Error opening file: ".devfsd" No such file or directory? | ||
1543 | |||
1544 | This means that devfs is not mounted. Make sure you have devfs mounted. | ||
1545 | |||
1546 | |||
1547 | How do I mount devfs? | ||
1548 | |||
1549 | First make sure you have devfs compiled into your kernel (see | ||
1550 | above). Then you will either need to: | ||
1551 | |||
1552 | set CONFIG_DEVFS_MOUNT=y in your kernel config | ||
1553 | pass devfs=mount to your boot loader | ||
1554 | mount devfs manually in your boot scripts with: | ||
1555 | mount -t none devfs /dev | ||
1556 | |||
1557 | |||
1558 | |||
1559 | Mount by volume LABEL=<label> doesn't work with | ||
1560 | devfs | ||
1561 | |||
1562 | Most probably you are not mounting devfs onto /dev. What | ||
1563 | happens is that if your kernel config has CONFIG_DEVFS_FS=y | ||
1564 | then the contents of /proc/partitions will have the devfs | ||
1565 | names (such as scsi/host0/bus0/target0/lun0/part1). The | ||
1566 | contents of /proc/partitions are used by mount(8) when | ||
1567 | mounting by volume label. If devfs is not mounted on /dev, | ||
1568 | then mount(8) will fail to find devices. The solution is to | ||
1569 | make sure that devfs is mounted on /dev. See above for how to | ||
1570 | do that. | ||
1571 | |||
1572 | |||
1573 | I have extra or incorrect entries in /dev | ||
1574 | |||
1575 | You may have stale entries in your dev-state area. Check for a | ||
1576 | RESTORE configuration line in your devfsd configuration | ||
1577 | (typically /etc/devfsd.conf). If you have this line, check | ||
1578 | the contents of the specified directory for stale entries. Remove | ||
1579 | any entries which are incorrect, then reboot. | ||
1580 | |||
1581 | |||
1582 | I get "Unable to open initial console" messages at boot | ||
1583 | |||
1584 | This usually happens when you don't have devfs automounted onto | ||
1585 | /dev at boot time, and there is no valid | ||
1586 | /dev/console entry on your root file-system. Create a valid | ||
1587 | /dev/console device node. | ||
1588 | |||
1589 | |||
1590 | |||
1591 | |||
1592 | |||
1593 | Alternatives to devfs | ||
1594 | |||
1595 | I've attempted to collate all the anti-devfs proposals and explain | ||
1596 | their limitations. Under construction. | ||
1597 | |||
1598 | |||
1599 | Why not just pass device create/remove events to a daemon? | ||
1600 | |||
1601 | Here the suggestion is to develop an API in the kernel so that devices | ||
1602 | can register create and remove events, and a daemon listens for those | ||
1603 | events. The daemon would then populate/depopulate /dev (which | ||
1604 | resides on disc). | ||
1605 | |||
1606 | This has several limitations: | ||
1607 | |||
1608 | |||
1609 | it only works for modules loaded and unloaded (or devices inserted | ||
1610 | and removed) after the kernel has finished booting. Without a database | ||
1611 | of events, there is no way the daemon could fully populate | ||
1612 | /dev | ||
1613 | |||
1614 | |||
1615 | if you add a database to this scheme, the question is then how to | ||
1616 | present that database to user-space. If you make it a list of strings | ||
1617 | with embedded event codes which are passed through a pipe to the | ||
1618 | daemon, then this is only of use to the daemon. I would argue that the | ||
1619 | natural way to present this data is via a filesystem (since many of | ||
1620 | the events will be of a hierarchical nature), such as devfs. | ||
1621 | Presenting the data as a filesystem makes it easy for the user to see | ||
1622 | what is available and also makes it easy to write scripts to scan the | ||
1623 | "database" | ||
1624 | |||
1625 | |||
1626 | the tight binding between device nodes and drivers is no longer | ||
1627 | possible (requiring the otherwise perfectly avoidable | ||
1628 | table lookups) | ||
1629 | |||
1630 | |||
1631 | you cannot catch inode lookup events on /dev which means | ||
1632 | that module autoloading requires device nodes to be created. This is a | ||
1633 | problem, particularly for drivers where only a few inodes are created | ||
1634 | from a potentially large set | ||
1635 | |||
1636 | |||
1637 | this technique can't be used when the root FS is mounted | ||
1638 | read-only | ||
1639 | |||
1640 | |||
1641 | |||
1642 | |||
1643 | Just implement a better scsidev | ||
1644 | |||
1645 | This suggestion involves taking the scsidev programme and | ||
1646 | extending it to scan for all devices, not just SCSI devices. The | ||
1647 | scsidev programme works by scanning /proc/scsi | ||
1648 | |||
1649 | Problems: | ||
1650 | |||
1651 | |||
1652 | the kernel does not currently provide a list of all devices | ||
1653 | available. Not all drivers register entries in /proc or | ||
1654 | generate kernel messages | ||
1655 | |||
1656 | |||
1657 | there is no uniform mechanism to register devices other than the | ||
1658 | devfs API | ||
1659 | |||
1660 | |||
1661 | implementing such an API is then the same as the | ||
1662 | proposal above | ||
1663 | |||
1664 | |||
1665 | |||
1666 | |||
1667 | Put /dev on a ramdisc | ||
1668 | |||
1669 | This suggestion involves creating a ramdisc and populating it with | ||
1670 | device nodes and then mounting it over /dev. | ||
1671 | |||
1672 | Problems: | ||
1673 | |||
1674 | |||
1675 | |||
1676 | this doesn't help when mounting the root filesystem, since you | ||
1677 | still need a device node to do that | ||
1678 | |||
1679 | |||
1680 | if you want to use this technique for the root device node as | ||
1681 | well, you need to use initrd. This complicates the booting sequence | ||
1682 | and makes it significantly harder to administer and configure. The | ||
1683 | initrd is essentially opaque, robbing the system administrator of easy | ||
1684 | configuration | ||
1685 | |||
1686 | |||
1687 | insufficient information is available to correctly populate the | ||
1688 | ramdisc. So we come back to the | ||
1689 | proposal above to "solve" this | ||
1690 | |||
1691 | |||
1692 | a ramdisc-based solution would take more kernel memory, since the | ||
1693 | backing store would be (at best) normal VFS inodes and dentries, which | ||
1694 | take 284 bytes and 112 bytes, respectively, for each entry. Compare | ||
1695 | that to 72 bytes for devfs | ||
1696 | |||
1697 | |||
1698 | |||
1699 | |||
1700 | Do nothing: there's no problem | ||
1701 | |||
1702 | Sometimes people can be heard to claim that the existing scheme is | ||
1703 | fine. This is what they're ignoring: | ||
1704 | |||
1705 | |||
1706 | device number size (8 bits each for major and minor) is a real | ||
1707 | limitation, and must be fixed somehow. Systems with large numbers of | ||
1708 | SCSI devices, for example, will continue to consume the remaining | ||
1709 | unallocated major numbers. USB will also need to push beyond the 8 bit | ||
1710 | minor limitation | ||
1711 | |||
1712 | |||
1713 | simply increasing the device number size is insufficient. Apart | ||
1714 | from causing a lot of pain, it doesn't solve the management issues | ||
1715 | of a /dev with thousands or more device nodes | ||
1716 | |||
1717 | |||
1718 | ignoring the problem of a huge /dev will not make it go | ||
1719 | away, and dismisses the legitimacy of a large number of people who | ||
1720 | want a dynamic /dev | ||
1721 | |||
1722 | |||
1723 | the standard response then becomes: "write a device management | ||
1724 | daemon", which brings us back to the | ||
1725 | proposal above | ||
1726 | |||
1727 | |||
1728 | |||
1729 | |||
1730 | What I don't like about devfs | ||
1731 | |||
1732 | Here are some common complaints about devfs, and some suggestions and | ||
1733 | solutions that may make it more palatable for you. I can't please | ||
1734 | everybody, but I do try :-) | ||
1735 | |||
1736 | I hate the naming scheme | ||
1737 | |||
1738 | First, remember that no naming scheme will please everybody. You hate | ||
1739 | the scheme, others love it. Who's to say who's right and who's wrong? | ||
1740 | Ultimately, the person who writes the code gets to choose, and what | ||
1741 | exists now is a combination of the choices made by the | ||
1742 | devfs author and the | ||
1743 | kernel maintainer (Linus). | ||
1744 | |||
1745 | However, not all is lost. If you want to create your own naming | ||
1746 | scheme, it is a simple matter to write a standalone script, hack | ||
1747 | devfsd, or write a script called by devfsd. You can create whatever | ||
1748 | naming scheme you like. | ||
1749 | |||
1750 | Further, if you want to remove all traces of the devfs naming scheme | ||
1751 | from /dev, you can mount devfs elsewhere (say | ||
1752 | /devfs) and populate /dev with links into | ||
1753 | /devfs. This population can be automated using devfsd if you | ||
1754 | wish. | ||
1755 | |||
1756 | You can even use the VFS binding facility to make the links, rather | ||
1757 | than using symbolic links. This way, you don't even have to see the | ||
1758 | "destination" of these symbolic links. | ||
1759 | |||
1760 | Devfs puts policy into the kernel | ||
1761 | |||
1762 | There's already policy in the kernel. Device numbers are in fact | ||
1763 | policy (why should the kernel dictate what device numbers I use?). | ||
1764 | Face it, some policy has to be in the kernel. The real difference | ||
1765 | between device names as policy and device numbers as policy is that | ||
1766 | no one will use device numbers directly, because device | ||
1767 | numbers are devoid of meaning to humans and are ugly. At least with | ||
1768 | the devfs device names, (even though you can add your own naming | ||
1769 | scheme) some people will use the devfs-supplied names directly. This | ||
1770 | offends some people :-) | ||
1771 | |||
1772 | Devfs is bloatware | ||
1773 | |||
1774 | This is not even remotely true. As shown above, | ||
1775 | both code and data size are quite modest. | ||
1776 | |||
1777 | |||
1778 | How to report bugs | ||
1779 | |||
1780 | If you have (or think you have) a bug with devfs, please follow the | ||
1781 | steps below: | ||
1782 | |||
1783 | |||
1784 | |||
1785 | make sure you have enabled debugging output when configuring your | ||
1786 | kernel. You will need to set (at least) the following config options: | ||
1787 | |||
1788 | CONFIG_DEVFS_DEBUG=y | ||
1789 | CONFIG_DEBUG_KERNEL=y | ||
1790 | CONFIG_DEBUG_SLAB=y | ||
1791 | |||
1792 | |||
1793 | |||
1794 | please make sure you have the latest devfs patches applied. The | ||
1795 | latest kernel version might not have the latest devfs patches applied | ||
1796 | yet (Linus is very busy) | ||
1797 | |||
1798 | |||
1799 | save a copy of your complete kernel logs (preferably by | ||
1800 | using the dmesg programme) for later inclusion in your bug | ||
1801 | report. You may need to use the -s switch to increase the | ||
1802 | internal buffer size so you can capture all the boot messages. | ||
1803 | Don't edit or trim the dmesg output | ||
1804 | |||
1805 | |||
1806 | |||
1807 | |||
1808 | try booting with devfs=dall passed to the kernel boot | ||
1809 | command line (read the documentation on your bootloader on how to do | ||
1810 | this), and save the result to a file. This may be quite verbose, and | ||
1811 | it may overflow the messages buffer, but try to get as much of it as | ||
1812 | you can | ||
1813 | |||
1814 | |||
1815 | send a copy of your devfsd configuration file(s) | ||
1816 | |||
1817 | send the bug report to me first. | ||
1818 | Don't expect that I will see it if you post it to the linux-kernel | ||
1819 | mailing list. Include all the information listed above, plus | ||
1820 | anything else that you think might be relevant. Put the string | ||
1821 | devfs somewhere in the subject line, so my mail filters mark | ||
1822 | it as urgent | ||
1823 | |||
1824 | |||
1825 | |||
1826 | |||
1827 | Here is a general guide on how to ask questions in a way that greatly | ||
1828 | improves your chances of getting a reply: | ||
1829 | |||
1830 | http://www.tuxedo.org/~esr/faqs/smart-questions.html. If you have | ||
1831 | a bug to report, you should also read | ||
1832 | |||
1833 | http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. | ||
1834 | |||
1835 | |||
1836 | Strange kernel messages | ||
1837 | |||
1838 | You may see devfs-related messages in your kernel logs. Below are some | ||
1839 | messages and what they mean (and what you should do about them, if | ||
1840 | anything). | ||
1841 | |||
1842 | |||
1843 | |||
1844 | devfs_register(fred): could not append to parent, err: -17 | ||
1845 | |||
1846 | You need to check what the error code means, but usually 17 means | ||
1847 | EEXIST. This means that a driver attempted to create an entry | ||
1848 | fred in a directory, but there already was an entry with that | ||
1849 | name. This is often caused by flawed boot scripts which untar a bunch | ||
1850 | of inodes into /dev, as a way to restore permissions. This | ||
1851 | message is harmless, as the device nodes will still | ||
1852 | provide access to the driver (unless you use the devfs=only | ||
1853 | boot option, which is only for dedicated souls:-). If you want to get | ||
1854 | rid of these annoying messages, upgrade to devfsd-v1.3.20 and use the | ||
1855 | recommended RESTORE directive to restore permissions. | ||
1856 | |||
1857 | |||
1858 | devfs_mk_dir(bill): using old entry in dir: c1808724 "" | ||
1859 | |||
1860 | This is similar to the message above, except that a driver attempted | ||
1861 | to create a directory named bill, and the parent directory | ||
1862 | has an entry with the same name. In this case, to ensure that drivers | ||
1863 | continue to work properly, the old entry is re-used and given to the | ||
1864 | driver. In 2.5 kernels, the driver is given a NULL entry, and thus, | ||
1865 | under rare circumstances, may not create the require device nodes. | ||
1866 | The solution is the same as above. | ||
1867 | |||
1868 | |||
1869 | |||
1870 | |||
1871 | |||
1872 | Compilation problems with devfsd | ||
1873 | |||
1874 | Usually, you can compile devfsd just by typing in | ||
1875 | make in the source directory, followed by a make | ||
1876 | install (as root). Sometimes, you may have problems, particularly | ||
1877 | on broken configurations. | ||
1878 | |||
1879 | |||
1880 | |||
1881 | error messages relating to DEVFSD_NOTIFY_DELETE | ||
1882 | |||
1883 | This happened because you have an ancient set of kernel headers | ||
1884 | installed in /usr/include/linux or /usr/src/linux. | ||
1885 | Install kernel 2.4.10 or later. You may need to pass the | ||
1886 | KERNEL_DIR variable to make (if you did not install | ||
1887 | the new kernel sources as /usr/src/linux), or you may copy | ||
1888 | the devfs_fs.h file in the kernel source tree into | ||
1889 | /usr/include/linux. | ||
1890 | |||
1891 | |||
1892 | |||
1893 | |||
1894 | ----------------------------------------------------------------------------- | ||
1895 | |||
1896 | |||
1897 | Other resources | ||
1898 | |||
1899 | |||
1900 | |||
1901 | Douglas Gilbert has written a useful document at | ||
1902 | |||
1903 | http://www.torque.net/sg/devfs_scsi.html which | ||
1904 | explores the SCSI subsystem and how it interacts with devfs | ||
1905 | |||
1906 | |||
1907 | Douglas Gilbert has written another useful document at | ||
1908 | |||
1909 | http://www.torque.net/scsi/SCSI-2.4-HOWTO/ which | ||
1910 | discusses the Linux SCSI subsystem in 2.4. | ||
1911 | |||
1912 | |||
1913 | Johannes Erdfelt has started a discussion paper on Linux and | ||
1914 | hot-swap devices, describing what the requirements are for a scalable | ||
1915 | solution and how and why he's used devfs+devfsd. Note that this is an | ||
1916 | early draft only, available in plain text form at: | ||
1917 | |||
1918 | http://johannes.erdfelt.com/hotswap.txt. | ||
1919 | Johannes has promised a HTML version will follow. | ||
1920 | |||
1921 | |||
1922 | I presented an invited | ||
1923 | paper | ||
1924 | at the | ||
1925 | |||
1926 | 2nd Annual Storage Management Workshop held in Miamia, Florida, | ||
1927 | U.S.A. in October 2000. | ||
1928 | |||
1929 | |||
1930 | |||
1931 | |||
1932 | ----------------------------------------------------------------------------- | ||
1933 | |||
1934 | |||
1935 | Translations of this document | ||
1936 | |||
1937 | This document has been translated into other languages. | ||
1938 | |||
1939 | |||
1940 | |||
1941 | |||
1942 | The document master (in English) by rgooch@atnf.csiro.au is | ||
1943 | available at | ||
1944 | |||
1945 | http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html | ||
1946 | |||
1947 | |||
1948 | |||
1949 | A Korean translation by viatoris@nownuri.net is available at | ||
1950 | |||
1951 | http://your.destiny.pe.kr/devfs/devfs.html | ||
1952 | |||
1953 | |||
1954 | |||
1955 | |||
1956 | ----------------------------------------------------------------------------- | ||
1957 | Most flags courtesy of ITA's | ||
1958 | Flags of All Countries | ||
1959 | used with permission. | ||
diff --git a/Documentation/filesystems/devfs/ToDo b/Documentation/filesystems/devfs/ToDo deleted file mode 100644 index afd5a8f2c19b..000000000000 --- a/Documentation/filesystems/devfs/ToDo +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | Device File System (devfs) ToDo List | ||
2 | |||
3 | Richard Gooch <rgooch@atnf.csiro.au> | ||
4 | |||
5 | 3-JUL-2000 | ||
6 | |||
7 | This is a list of things to be done for better devfs support in the | ||
8 | Linux kernel. If you'd like to contribute to the devfs, please have a | ||
9 | look at this list for anything that is unallocated. Also, if there are | ||
10 | items missing (surely), please contact me so I can add them to the | ||
11 | list (preferably with your name attached to them:-). | ||
12 | |||
13 | |||
14 | - >256 ptys | ||
15 | Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> | ||
16 | |||
17 | - Amiga floppy driver (drivers/block/amiflop.c) | ||
18 | |||
19 | - Atari floppy driver (drivers/block/ataflop.c) | ||
20 | |||
21 | - SWIM3 (Super Woz Integrated Machine 3) floppy driver (drivers/block/swim3.c) | ||
22 | |||
23 | - Amiga ZorroII ramdisc driver (drivers/block/z2ram.c) | ||
24 | |||
25 | - Parallel port ATAPI CD-ROM (drivers/block/paride/pcd.c) | ||
26 | |||
27 | - Parallel port ATAPI floppy (drivers/block/paride/pf.c) | ||
28 | |||
29 | - AP1000 block driver (drivers/ap1000/ap.c, drivers/ap1000/ddv.c) | ||
30 | |||
31 | - Archimedes floppy (drivers/acorn/block/fd1772.c) | ||
32 | |||
33 | - MFM hard drive (drivers/acorn/block/mfmhd.c) | ||
34 | |||
35 | - I2O block device (drivers/message/i2o/i2o_block.c) | ||
36 | |||
37 | - ST-RAM device (arch/m68k/atari/stram.c) | ||
38 | |||
39 | - Raw devices | ||
40 | |||
diff --git a/Documentation/filesystems/devfs/boot-options b/Documentation/filesystems/devfs/boot-options deleted file mode 100644 index df3d33b03e0a..000000000000 --- a/Documentation/filesystems/devfs/boot-options +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | /* -*- auto-fill -*- */ | ||
2 | |||
3 | Device File System (devfs) Boot Options | ||
4 | |||
5 | Richard Gooch <rgooch@atnf.csiro.au> | ||
6 | |||
7 | 18-AUG-2001 | ||
8 | |||
9 | |||
10 | When CONFIG_DEVFS_DEBUG is enabled, you can pass several boot options | ||
11 | to the kernel to debug devfs. The boot options are prefixed by | ||
12 | "devfs=", and are separated by commas. Spaces are not allowed. The | ||
13 | syntax looks like this: | ||
14 | |||
15 | devfs=<option1>,<option2>,<option3> | ||
16 | |||
17 | and so on. For example, if you wanted to turn on debugging for module | ||
18 | load requests and device registration, you would do: | ||
19 | |||
20 | devfs=dmod,dreg | ||
21 | |||
22 | You may prefix "no" to any option. This will invert the option. | ||
23 | |||
24 | |||
25 | Debugging Options | ||
26 | ================= | ||
27 | |||
28 | These requires CONFIG_DEVFS_DEBUG to be enabled. | ||
29 | Note that all debugging options have 'd' as the first character. By | ||
30 | default all options are off. All debugging output is sent to the | ||
31 | kernel logs. The debugging options do not take effect until the devfs | ||
32 | version message appears (just prior to the root filesystem being | ||
33 | mounted). | ||
34 | |||
35 | These are the options: | ||
36 | |||
37 | dmod print module load requests to <request_module> | ||
38 | |||
39 | dreg print device register requests to <devfs_register> | ||
40 | |||
41 | dunreg print device unregister requests to <devfs_unregister> | ||
42 | |||
43 | dchange print device change requests to <devfs_set_flags> | ||
44 | |||
45 | dilookup print inode lookup requests | ||
46 | |||
47 | diget print VFS inode allocations | ||
48 | |||
49 | diunlink print inode unlinks | ||
50 | |||
51 | dichange print inode changes | ||
52 | |||
53 | dimknod print calls to mknod(2) | ||
54 | |||
55 | dall some debugging turned on | ||
56 | |||
57 | |||
58 | Other Options | ||
59 | ============= | ||
60 | |||
61 | These control the default behaviour of devfs. The options are: | ||
62 | |||
63 | mount mount devfs onto /dev at boot time | ||
64 | |||
65 | only disable non-devfs device nodes for devfs-capable drivers | ||
diff --git a/Documentation/initrd.txt b/Documentation/initrd.txt index 7de1c80cd719..b1b6440237a6 100644 --- a/Documentation/initrd.txt +++ b/Documentation/initrd.txt | |||
@@ -67,8 +67,7 @@ initrd adds the following new options: | |||
67 | as the last process has closed it, all data is freed and /dev/initrd | 67 | as the last process has closed it, all data is freed and /dev/initrd |
68 | can't be opened anymore. | 68 | can't be opened anymore. |
69 | 69 | ||
70 | root=/dev/ram0 (without devfs) | 70 | root=/dev/ram0 |
71 | root=/dev/rd/0 (with devfs) | ||
72 | 71 | ||
73 | initrd is mounted as root, and the normal boot procedure is followed, | 72 | initrd is mounted as root, and the normal boot procedure is followed, |
74 | with the RAM disk still mounted as root. | 73 | with the RAM disk still mounted as root. |
@@ -90,8 +89,7 @@ you're building an install floppy), the root file system creation | |||
90 | procedure should create the /initrd directory. | 89 | procedure should create the /initrd directory. |
91 | 90 | ||
92 | If initrd will not be mounted in some cases, its content is still | 91 | If initrd will not be mounted in some cases, its content is still |
93 | accessible if the following device has been created (note that this | 92 | accessible if the following device has been created: |
94 | does not work if using devfs): | ||
95 | 93 | ||
96 | # mknod /dev/initrd b 1 250 | 94 | # mknod /dev/initrd b 1 250 |
97 | # chmod 400 /dev/initrd | 95 | # chmod 400 /dev/initrd |
@@ -119,8 +117,7 @@ We'll describe the loopback device method: | |||
119 | (if space is critical, you may want to use the Minix FS instead of Ext2) | 117 | (if space is critical, you may want to use the Minix FS instead of Ext2) |
120 | 3) mount the file system, e.g. | 118 | 3) mount the file system, e.g. |
121 | # mount -t ext2 -o loop initrd /mnt | 119 | # mount -t ext2 -o loop initrd /mnt |
122 | 4) create the console device (not necessary if using devfs, but it can't | 120 | 4) create the console device: |
123 | hurt to do it anyway): | ||
124 | # mkdir /mnt/dev | 121 | # mkdir /mnt/dev |
125 | # mknod /mnt/dev/console c 5 1 | 122 | # mknod /mnt/dev/console c 5 1 |
126 | 5) copy all the files that are needed to properly use the initrd | 123 | 5) copy all the files that are needed to properly use the initrd |
@@ -152,12 +149,7 @@ have to be given: | |||
152 | 149 | ||
153 | root=/dev/ram0 init=/linuxrc rw | 150 | root=/dev/ram0 init=/linuxrc rw |
154 | 151 | ||
155 | if not using devfs, or | 152 | (rw is only necessary if writing to the initrd file system.) |
156 | |||
157 | root=/dev/rd/0 init=/linuxrc rw | ||
158 | |||
159 | if using devfs. (rw is only necessary if writing to the initrd file | ||
160 | system.) | ||
161 | 153 | ||
162 | With LOADLIN, you simply execute | 154 | With LOADLIN, you simply execute |
163 | 155 | ||
@@ -217,9 +209,9 @@ following command: | |||
217 | # exec chroot . what-follows <dev/console >dev/console 2>&1 | 209 | # exec chroot . what-follows <dev/console >dev/console 2>&1 |
218 | 210 | ||
219 | Where what-follows is a program under the new root, e.g. /sbin/init | 211 | Where what-follows is a program under the new root, e.g. /sbin/init |
220 | If the new root file system will be used with devfs and has no valid | 212 | If the new root file system will be used with udev and has no valid |
221 | /dev directory, devfs must be mounted before invoking chroot in order to | 213 | /dev directory, udev must be initialized before invoking chroot in order |
222 | provide /dev/console. | 214 | to provide /dev/console. |
223 | 215 | ||
224 | Note: implementation details of pivot_root may change with time. In order | 216 | Note: implementation details of pivot_root may change with time. In order |
225 | to ensure compatibility, the following points should be observed: | 217 | to ensure compatibility, the following points should be observed: |
@@ -236,7 +228,7 @@ Now, the initrd can be unmounted and the memory allocated by the RAM | |||
236 | disk can be freed: | 228 | disk can be freed: |
237 | 229 | ||
238 | # umount /initrd | 230 | # umount /initrd |
239 | # blockdev --flushbufs /dev/ram0 # /dev/rd/0 if using devfs | 231 | # blockdev --flushbufs /dev/ram0 |
240 | 232 | ||
241 | It is also possible to use initrd with an NFS-mounted root, see the | 233 | It is also possible to use initrd with an NFS-mounted root, see the |
242 | pivot_root(8) man page for details. | 234 | pivot_root(8) man page for details. |
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index 1543802ef53e..edc04d74ae23 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl-number.txt | |||
@@ -119,7 +119,6 @@ Code Seq# Include File Comments | |||
119 | 'c' 00-7F linux/comstats.h conflict! | 119 | 'c' 00-7F linux/comstats.h conflict! |
120 | 'c' 00-7F linux/coda.h conflict! | 120 | 'c' 00-7F linux/coda.h conflict! |
121 | 'd' 00-FF linux/char/drm/drm/h conflict! | 121 | 'd' 00-FF linux/char/drm/drm/h conflict! |
122 | 'd' 00-1F linux/devfs_fs.h conflict! | ||
123 | 'd' 00-DF linux/video_decoder.h conflict! | 122 | 'd' 00-DF linux/video_decoder.h conflict! |
124 | 'd' F0-FF linux/digi1.h | 123 | 'd' F0-FF linux/digi1.h |
125 | 'e' all linux/digi1.h conflict! | 124 | 'e' all linux/digi1.h conflict! |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 0d189c93eeaf..86e9282d1c20 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -35,7 +35,6 @@ parameter is applicable: | |||
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 | DEVFS devfs support is enabled. | ||
39 | DRM Direct Rendering Management support is enabled. | 38 | DRM Direct Rendering Management support is enabled. |
40 | EDD BIOS Enhanced Disk Drive Services (EDD) is enabled | 39 | EDD BIOS Enhanced Disk Drive Services (EDD) is enabled |
41 | EFI EFI Partitioning (GPT) is enabled | 40 | EFI EFI Partitioning (GPT) is enabled |
@@ -440,9 +439,6 @@ running once the system is up. | |||
440 | Format: <area>[,<node>] | 439 | Format: <area>[,<node>] |
441 | See also Documentation/networking/decnet.txt. | 440 | See also Documentation/networking/decnet.txt. |
442 | 441 | ||
443 | devfs= [DEVFS] | ||
444 | See Documentation/filesystems/devfs/boot-options. | ||
445 | |||
446 | dhash_entries= [KNL] | 442 | dhash_entries= [KNL] |
447 | Set number of hash buckets for dentry cache. | 443 | Set number of hash buckets for dentry cache. |
448 | 444 | ||
@@ -1689,9 +1685,14 @@ running once the system is up. | |||
1689 | decrease the size and leave more room for directly | 1685 | decrease the size and leave more room for directly |
1690 | mapped kernel RAM. | 1686 | mapped kernel RAM. |
1691 | 1687 | ||
1692 | vmhalt= [KNL,S390] | 1688 | vmhalt= [KNL,S390] Perform z/VM CP command after system halt. |
1689 | Format: <command> | ||
1690 | |||
1691 | vmpanic= [KNL,S390] Perform z/VM CP command after kernel panic. | ||
1692 | Format: <command> | ||
1693 | 1693 | ||
1694 | vmpoff= [KNL,S390] | 1694 | vmpoff= [KNL,S390] Perform z/VM CP command after power off. |
1695 | Format: <command> | ||
1695 | 1696 | ||
1696 | waveartist= [HW,OSS] | 1697 | waveartist= [HW,OSS] |
1697 | Format: <io>,<irq>,<dma>,<dma2> | 1698 | Format: <io>,<irq>,<dma>,<dma2> |
diff --git a/Documentation/keys-request-key.txt b/Documentation/keys-request-key.txt index 22488d791168..c1f64fdf84cb 100644 --- a/Documentation/keys-request-key.txt +++ b/Documentation/keys-request-key.txt | |||
@@ -3,16 +3,23 @@ | |||
3 | =================== | 3 | =================== |
4 | 4 | ||
5 | The key request service is part of the key retention service (refer to | 5 | The key request service is part of the key retention service (refer to |
6 | Documentation/keys.txt). This document explains more fully how that the | 6 | Documentation/keys.txt). This document explains more fully how the requesting |
7 | requesting algorithm works. | 7 | algorithm works. |
8 | 8 | ||
9 | The process starts by either the kernel requesting a service by calling | 9 | The process starts by either the kernel requesting a service by calling |
10 | request_key(): | 10 | request_key*(): |
11 | 11 | ||
12 | struct key *request_key(const struct key_type *type, | 12 | struct key *request_key(const struct key_type *type, |
13 | const char *description, | 13 | const char *description, |
14 | const char *callout_string); | 14 | const char *callout_string); |
15 | 15 | ||
16 | or: | ||
17 | |||
18 | struct key *request_key_with_auxdata(const struct key_type *type, | ||
19 | const char *description, | ||
20 | const char *callout_string, | ||
21 | void *aux); | ||
22 | |||
16 | Or by userspace invoking the request_key system call: | 23 | Or by userspace invoking the request_key system call: |
17 | 24 | ||
18 | key_serial_t request_key(const char *type, | 25 | key_serial_t request_key(const char *type, |
@@ -20,16 +27,26 @@ Or by userspace invoking the request_key system call: | |||
20 | const char *callout_info, | 27 | const char *callout_info, |
21 | key_serial_t dest_keyring); | 28 | key_serial_t dest_keyring); |
22 | 29 | ||
23 | The main difference between the two access points is that the in-kernel | 30 | The main difference between the access points is that the in-kernel interface |
24 | interface does not need to link the key to a keyring to prevent it from being | 31 | does not need to link the key to a keyring to prevent it from being immediately |
25 | immediately destroyed. The kernel interface returns a pointer directly to the | 32 | destroyed. The kernel interface returns a pointer directly to the key, and |
26 | key, and it's up to the caller to destroy the key. | 33 | it's up to the caller to destroy the key. |
34 | |||
35 | The request_key_with_auxdata() call is like the in-kernel request_key() call, | ||
36 | except that it permits auxiliary data to be passed to the upcaller (the default | ||
37 | is NULL). This is only useful for those key types that define their own upcall | ||
38 | mechanism rather than using /sbin/request-key. | ||
27 | 39 | ||
28 | The userspace interface links the key to a keyring associated with the process | 40 | The userspace interface links the key to a keyring associated with the process |
29 | to prevent the key from going away, and returns the serial number of the key to | 41 | to prevent the key from going away, and returns the serial number of the key to |
30 | the caller. | 42 | the caller. |
31 | 43 | ||
32 | 44 | ||
45 | The following example assumes that the key types involved don't define their | ||
46 | own upcall mechanisms. If they do, then those should be substituted for the | ||
47 | forking and execution of /sbin/request-key. | ||
48 | |||
49 | |||
33 | =========== | 50 | =========== |
34 | THE PROCESS | 51 | THE PROCESS |
35 | =========== | 52 | =========== |
@@ -40,8 +57,8 @@ A request proceeds in the following manner: | |||
40 | interface]. | 57 | interface]. |
41 | 58 | ||
42 | (2) request_key() searches the process's subscribed keyrings to see if there's | 59 | (2) request_key() searches the process's subscribed keyrings to see if there's |
43 | a suitable key there. If there is, it returns the key. If there isn't, and | 60 | a suitable key there. If there is, it returns the key. If there isn't, |
44 | callout_info is not set, an error is returned. Otherwise the process | 61 | and callout_info is not set, an error is returned. Otherwise the process |
45 | proceeds to the next step. | 62 | proceeds to the next step. |
46 | 63 | ||
47 | (3) request_key() sees that A doesn't have the desired key yet, so it creates | 64 | (3) request_key() sees that A doesn't have the desired key yet, so it creates |
@@ -62,7 +79,7 @@ A request proceeds in the following manner: | |||
62 | instantiation. | 79 | instantiation. |
63 | 80 | ||
64 | (7) The program may want to access another key from A's context (say a | 81 | (7) The program may want to access another key from A's context (say a |
65 | Kerberos TGT key). It just requests the appropriate key, and the keyring | 82 | Kerberos TGT key). It just requests the appropriate key, and the keyring |
66 | search notes that the session keyring has auth key V in its bottom level. | 83 | search notes that the session keyring has auth key V in its bottom level. |
67 | 84 | ||
68 | This will permit it to then search the keyrings of process A with the | 85 | This will permit it to then search the keyrings of process A with the |
@@ -79,10 +96,11 @@ A request proceeds in the following manner: | |||
79 | (10) The program then exits 0 and request_key() deletes key V and returns key | 96 | (10) The program then exits 0 and request_key() deletes key V and returns key |
80 | U to the caller. | 97 | U to the caller. |
81 | 98 | ||
82 | This also extends further. If key W (step 7 above) didn't exist, key W would be | 99 | This also extends further. If key W (step 7 above) didn't exist, key W would |
83 | created uninstantiated, another auth key (X) would be created (as per step 3) | 100 | be created uninstantiated, another auth key (X) would be created (as per step |
84 | and another copy of /sbin/request-key spawned (as per step 4); but the context | 101 | 3) and another copy of /sbin/request-key spawned (as per step 4); but the |
85 | specified by auth key X will still be process A, as it was in auth key V. | 102 | context specified by auth key X will still be process A, as it was in auth key |
103 | V. | ||
86 | 104 | ||
87 | This is because process A's keyrings can't simply be attached to | 105 | This is because process A's keyrings can't simply be attached to |
88 | /sbin/request-key at the appropriate places because (a) execve will discard two | 106 | /sbin/request-key at the appropriate places because (a) execve will discard two |
@@ -118,17 +136,17 @@ A search of any particular keyring proceeds in the following fashion: | |||
118 | 136 | ||
119 | (2) It considers all the non-keyring keys within that keyring and, if any key | 137 | (2) It considers all the non-keyring keys within that keyring and, if any key |
120 | matches the criteria specified, calls key_permission(SEARCH) on it to see | 138 | matches the criteria specified, calls key_permission(SEARCH) on it to see |
121 | if the key is allowed to be found. If it is, that key is returned; if | 139 | if the key is allowed to be found. If it is, that key is returned; if |
122 | not, the search continues, and the error code is retained if of higher | 140 | not, the search continues, and the error code is retained if of higher |
123 | priority than the one currently set. | 141 | priority than the one currently set. |
124 | 142 | ||
125 | (3) It then considers all the keyring-type keys in the keyring it's currently | 143 | (3) It then considers all the keyring-type keys in the keyring it's currently |
126 | searching. It calls key_permission(SEARCH) on each keyring, and if this | 144 | searching. It calls key_permission(SEARCH) on each keyring, and if this |
127 | grants permission, it recurses, executing steps (2) and (3) on that | 145 | grants permission, it recurses, executing steps (2) and (3) on that |
128 | keyring. | 146 | keyring. |
129 | 147 | ||
130 | The process stops immediately a valid key is found with permission granted to | 148 | The process stops immediately a valid key is found with permission granted to |
131 | use it. Any error from a previous match attempt is discarded and the key is | 149 | use it. Any error from a previous match attempt is discarded and the key is |
132 | returned. | 150 | returned. |
133 | 151 | ||
134 | When search_process_keyrings() is invoked, it performs the following searches | 152 | When search_process_keyrings() is invoked, it performs the following searches |
@@ -153,7 +171,7 @@ The moment one succeeds, all pending errors are discarded and the found key is | |||
153 | returned. | 171 | returned. |
154 | 172 | ||
155 | Only if all these fail does the whole thing fail with the highest priority | 173 | Only if all these fail does the whole thing fail with the highest priority |
156 | error. Note that several errors may have come from LSM. | 174 | error. Note that several errors may have come from LSM. |
157 | 175 | ||
158 | The error priority is: | 176 | The error priority is: |
159 | 177 | ||
diff --git a/Documentation/keys.txt b/Documentation/keys.txt index 61c0fad2fe2f..e373f0212843 100644 --- a/Documentation/keys.txt +++ b/Documentation/keys.txt | |||
@@ -780,6 +780,17 @@ payload contents" for more information. | |||
780 | See also Documentation/keys-request-key.txt. | 780 | See also Documentation/keys-request-key.txt. |
781 | 781 | ||
782 | 782 | ||
783 | (*) To search for a key, passing auxiliary data to the upcaller, call: | ||
784 | |||
785 | struct key *request_key_with_auxdata(const struct key_type *type, | ||
786 | const char *description, | ||
787 | const char *callout_string, | ||
788 | void *aux); | ||
789 | |||
790 | This is identical to request_key(), except that the auxiliary data is | ||
791 | passed to the key_type->request_key() op if it exists. | ||
792 | |||
793 | |||
783 | (*) When it is no longer required, the key should be released using: | 794 | (*) When it is no longer required, the key should be released using: |
784 | 795 | ||
785 | void key_put(struct key *key); | 796 | void key_put(struct key *key); |
@@ -1031,6 +1042,24 @@ The structure has a number of fields, some of which are mandatory: | |||
1031 | as might happen when the userspace buffer is accessed. | 1042 | as might happen when the userspace buffer is accessed. |
1032 | 1043 | ||
1033 | 1044 | ||
1045 | (*) int (*request_key)(struct key *key, struct key *authkey, const char *op, | ||
1046 | void *aux); | ||
1047 | |||
1048 | This method is optional. If provided, request_key() and | ||
1049 | request_key_with_auxdata() will invoke this function rather than | ||
1050 | upcalling to /sbin/request-key to operate upon a key of this type. | ||
1051 | |||
1052 | The aux parameter is as passed to request_key_with_auxdata() or is NULL | ||
1053 | otherwise. Also passed are the key to be operated upon, the | ||
1054 | authorisation key for this operation and the operation type (currently | ||
1055 | only "create"). | ||
1056 | |||
1057 | This function should return only when the upcall is complete. Upon return | ||
1058 | the authorisation key will be revoked, and the target key will be | ||
1059 | negatively instantiated if it is still uninstantiated. The error will be | ||
1060 | returned to the caller of request_key*(). | ||
1061 | |||
1062 | |||
1034 | ============================ | 1063 | ============================ |
1035 | REQUEST-KEY CALLBACK SERVICE | 1064 | REQUEST-KEY CALLBACK SERVICE |
1036 | ============================ | 1065 | ============================ |
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index cf0d5416a4c3..28d1bc3edb1c 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -602,7 +602,7 @@ Consider the following sequence of events: | |||
602 | 602 | ||
603 | This sequence of events is committed to the memory coherence system in an order | 603 | This sequence of events is committed to the memory coherence system in an order |
604 | that the rest of the system might perceive as the unordered set of { STORE A, | 604 | that the rest of the system might perceive as the unordered set of { STORE A, |
605 | STORE B, STORE C } all occuring before the unordered set of { STORE D, STORE E | 605 | STORE B, STORE C } all occurring before the unordered set of { STORE D, STORE E |
606 | }: | 606 | }: |
607 | 607 | ||
608 | +-------+ : : | 608 | +-------+ : : |
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt index 278771c9ad99..44f2f769e865 100644 --- a/Documentation/networking/pktgen.txt +++ b/Documentation/networking/pktgen.txt | |||
@@ -74,7 +74,7 @@ Examples: | |||
74 | pgset "pkt_size 9014" sets packet size to 9014 | 74 | pgset "pkt_size 9014" sets packet size to 9014 |
75 | pgset "frags 5" packet will consist of 5 fragments | 75 | pgset "frags 5" packet will consist of 5 fragments |
76 | pgset "count 200000" sets number of packets to send, set to zero | 76 | pgset "count 200000" sets number of packets to send, set to zero |
77 | for continious sends untill explicitl stopped. | 77 | for continuous sends until explicitly stopped. |
78 | 78 | ||
79 | pgset "delay 5000" adds delay to hard_start_xmit(). nanoseconds | 79 | pgset "delay 5000" adds delay to hard_start_xmit(). nanoseconds |
80 | 80 | ||
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index 3242e5c1ee9c..2b395e478961 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -225,7 +225,7 @@ Generic flavors of pci_request_region() are request_mem_region() | |||
225 | Use these for address resources that are not described by "normal" PCI | 225 | Use these for address resources that are not described by "normal" PCI |
226 | interfaces (e.g. BAR). | 226 | interfaces (e.g. BAR). |
227 | 227 | ||
228 | All interrupt handlers should be registered with SA_SHIRQ and use the devid | 228 | All interrupt handlers should be registered with IRQF_SHARED and use the devid |
229 | to map IRQs to devices (remember that all PCI interrupts are shared). | 229 | to map IRQs to devices (remember that all PCI interrupts are shared). |
230 | 230 | ||
231 | 231 | ||
diff --git a/Documentation/pcmcia/crc32hash.c b/Documentation/pcmcia/crc32hash.c new file mode 100644 index 000000000000..cbc36d299af8 --- /dev/null +++ b/Documentation/pcmcia/crc32hash.c | |||
@@ -0,0 +1,32 @@ | |||
1 | /* crc32hash.c - derived from linux/lib/crc32.c, GNU GPL v2 */ | ||
2 | /* Usage example: | ||
3 | $ ./crc32hash "Dual Speed" | ||
4 | */ | ||
5 | |||
6 | #include <string.h> | ||
7 | #include <stdio.h> | ||
8 | #include <ctype.h> | ||
9 | #include <stdlib.h> | ||
10 | |||
11 | unsigned int crc32(unsigned char const *p, unsigned int len) | ||
12 | { | ||
13 | int i; | ||
14 | unsigned int crc = 0; | ||
15 | while (len--) { | ||
16 | crc ^= *p++; | ||
17 | for (i = 0; i < 8; i++) | ||
18 | crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0); | ||
19 | } | ||
20 | return crc; | ||
21 | } | ||
22 | |||
23 | int main(int argc, char **argv) { | ||
24 | unsigned int result; | ||
25 | if (argc != 2) { | ||
26 | printf("no string passed as argument\n"); | ||
27 | return -1; | ||
28 | } | ||
29 | result = crc32(argv[1], strlen(argv[1])); | ||
30 | printf("0x%x\n", result); | ||
31 | return 0; | ||
32 | } | ||
diff --git a/Documentation/pcmcia/devicetable.txt b/Documentation/pcmcia/devicetable.txt index 3351c0355143..199afd100cf2 100644 --- a/Documentation/pcmcia/devicetable.txt +++ b/Documentation/pcmcia/devicetable.txt | |||
@@ -27,37 +27,7 @@ pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000 | |||
27 | The hex value after "pa" is the hash of product ID string 1, after "pb" for | 27 | The hex value after "pa" is the hash of product ID string 1, after "pb" for |
28 | string 2 and so on. | 28 | string 2 and so on. |
29 | 29 | ||
30 | Alternatively, you can use this small tool to determine the crc32 hash. | 30 | Alternatively, you can use crc32hash (see Documentation/pcmcia/crc32hash.c) |
31 | simply pass the string you want to evaluate as argument to this program, | 31 | to determine the crc32 hash. Simply pass the string you want to evaluate |
32 | e.g. | 32 | as argument to this program, e.g.: |
33 | $ ./crc32hash "Dual Speed" | 33 | $ ./crc32hash "Dual Speed" |
34 | |||
35 | ------------------------------------------------------------------------- | ||
36 | /* crc32hash.c - derived from linux/lib/crc32.c, GNU GPL v2 */ | ||
37 | #include <string.h> | ||
38 | #include <stdio.h> | ||
39 | #include <ctype.h> | ||
40 | #include <stdlib.h> | ||
41 | |||
42 | unsigned int crc32(unsigned char const *p, unsigned int len) | ||
43 | { | ||
44 | int i; | ||
45 | unsigned int crc = 0; | ||
46 | while (len--) { | ||
47 | crc ^= *p++; | ||
48 | for (i = 0; i < 8; i++) | ||
49 | crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0); | ||
50 | } | ||
51 | return crc; | ||
52 | } | ||
53 | |||
54 | int main(int argc, char **argv) { | ||
55 | unsigned int result; | ||
56 | if (argc != 2) { | ||
57 | printf("no string passed as argument\n"); | ||
58 | return -1; | ||
59 | } | ||
60 | result = crc32(argv[1], strlen(argv[1])); | ||
61 | printf("0x%x\n", result); | ||
62 | return 0; | ||
63 | } | ||
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt index e165229adf50..df7a02bfb5bf 100644 --- a/Documentation/scsi/tmscsim.txt +++ b/Documentation/scsi/tmscsim.txt | |||
@@ -109,7 +109,7 @@ than the 33.33 MHz being in the PCI spec. | |||
109 | 109 | ||
110 | If you want to share the IRQ with another device and the driver refuses to | 110 | If you want to share the IRQ with another device and the driver refuses to |
111 | do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to | 111 | do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to |
112 | SA_SHIRQ | SA_INTERRUPT. | 112 | IRQF_SHARED | IRQF_DISABLED. |
113 | 113 | ||
114 | 114 | ||
115 | 3.Features | 115 | 3.Features |
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 87d76a5c73d0..f61af23dd85d 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -472,6 +472,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
472 | 472 | ||
473 | The power-management is supported. | 473 | The power-management is supported. |
474 | 474 | ||
475 | Module snd-darla20 | ||
476 | ------------------ | ||
477 | |||
478 | Module for Echoaudio Darla20 | ||
479 | |||
480 | This module supports multiple cards. | ||
481 | The driver requires the firmware loader support on kernel. | ||
482 | |||
483 | Module snd-darla24 | ||
484 | ------------------ | ||
485 | |||
486 | Module for Echoaudio Darla24 | ||
487 | |||
488 | This module supports multiple cards. | ||
489 | The driver requires the firmware loader support on kernel. | ||
490 | |||
475 | Module snd-dt019x | 491 | Module snd-dt019x |
476 | ----------------- | 492 | ----------------- |
477 | 493 | ||
@@ -499,6 +515,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
499 | 515 | ||
500 | The power-management is supported. | 516 | The power-management is supported. |
501 | 517 | ||
518 | Module snd-echo3g | ||
519 | ----------------- | ||
520 | |||
521 | Module for Echoaudio 3G cards (Gina3G/Layla3G) | ||
522 | |||
523 | This module supports multiple cards. | ||
524 | The driver requires the firmware loader support on kernel. | ||
525 | |||
502 | Module snd-emu10k1 | 526 | Module snd-emu10k1 |
503 | ------------------ | 527 | ------------------ |
504 | 528 | ||
@@ -657,6 +681,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
657 | 681 | ||
658 | The power-management is supported. | 682 | The power-management is supported. |
659 | 683 | ||
684 | Module snd-gina20 | ||
685 | ----------------- | ||
686 | |||
687 | Module for Echoaudio Gina20 | ||
688 | |||
689 | This module supports multiple cards. | ||
690 | The driver requires the firmware loader support on kernel. | ||
691 | |||
692 | Module snd-gina24 | ||
693 | ----------------- | ||
694 | |||
695 | Module for Echoaudio Gina24 | ||
696 | |||
697 | This module supports multiple cards. | ||
698 | The driver requires the firmware loader support on kernel. | ||
699 | |||
660 | Module snd-gusclassic | 700 | Module snd-gusclassic |
661 | --------------------- | 701 | --------------------- |
662 | 702 | ||
@@ -760,12 +800,18 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
760 | basic fixed pin assignment w/o SPDIF | 800 | basic fixed pin assignment w/o SPDIF |
761 | auto auto-config reading BIOS (default) | 801 | auto auto-config reading BIOS (default) |
762 | 802 | ||
763 | ALC882/883/885 | 803 | ALC882/885 |
764 | 3stack-dig 3-jack with SPDIF I/O | 804 | 3stack-dig 3-jack with SPDIF I/O |
765 | 6stck-dig 6-jack digital with SPDIF I/O | 805 | 6stck-dig 6-jack digital with SPDIF I/O |
766 | auto auto-config reading BIOS (default) | 806 | auto auto-config reading BIOS (default) |
767 | 807 | ||
768 | ALC861 | 808 | ALC883/888 |
809 | 3stack-dig 3-jack with SPDIF I/O | ||
810 | 6stack-dig 6-jack digital with SPDIF I/O | ||
811 | 6stack-dig-demo 6-stack digital for Intel demo board | ||
812 | auto auto-config reading BIOS (default) | ||
813 | |||
814 | ALC861/660 | ||
769 | 3stack 3-jack | 815 | 3stack 3-jack |
770 | 3stack-dig 3-jack with SPDIF I/O | 816 | 3stack-dig 3-jack with SPDIF I/O |
771 | 6stack-dig 6-jack with SPDIF I/O | 817 | 6stack-dig 6-jack with SPDIF I/O |
@@ -937,6 +983,30 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
937 | driver isn't configured properly or you want to try another | 983 | driver isn't configured properly or you want to try another |
938 | type for testing. | 984 | type for testing. |
939 | 985 | ||
986 | Module snd-indigo | ||
987 | ----------------- | ||
988 | |||
989 | Module for Echoaudio Indigo | ||
990 | |||
991 | This module supports multiple cards. | ||
992 | The driver requires the firmware loader support on kernel. | ||
993 | |||
994 | Module snd-indigodj | ||
995 | ------------------- | ||
996 | |||
997 | Module for Echoaudio Indigo DJ | ||
998 | |||
999 | This module supports multiple cards. | ||
1000 | The driver requires the firmware loader support on kernel. | ||
1001 | |||
1002 | Module snd-indigoio | ||
1003 | ------------------- | ||
1004 | |||
1005 | Module for Echoaudio Indigo IO | ||
1006 | |||
1007 | This module supports multiple cards. | ||
1008 | The driver requires the firmware loader support on kernel. | ||
1009 | |||
940 | Module snd-intel8x0 | 1010 | Module snd-intel8x0 |
941 | ------------------- | 1011 | ------------------- |
942 | 1012 | ||
@@ -1036,6 +1106,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1036 | 1106 | ||
1037 | This module supports multiple cards. | 1107 | This module supports multiple cards. |
1038 | 1108 | ||
1109 | Module snd-layla20 | ||
1110 | ------------------ | ||
1111 | |||
1112 | Module for Echoaudio Layla20 | ||
1113 | |||
1114 | This module supports multiple cards. | ||
1115 | The driver requires the firmware loader support on kernel. | ||
1116 | |||
1117 | Module snd-layla24 | ||
1118 | ------------------ | ||
1119 | |||
1120 | Module for Echoaudio Layla24 | ||
1121 | |||
1122 | This module supports multiple cards. | ||
1123 | The driver requires the firmware loader support on kernel. | ||
1124 | |||
1039 | Module snd-maestro3 | 1125 | Module snd-maestro3 |
1040 | ------------------- | 1126 | ------------------- |
1041 | 1127 | ||
@@ -1056,6 +1142,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1056 | 1142 | ||
1057 | The power-management is supported. | 1143 | The power-management is supported. |
1058 | 1144 | ||
1145 | Module snd-mia | ||
1146 | --------------- | ||
1147 | |||
1148 | Module for Echoaudio Mia | ||
1149 | |||
1150 | This module supports multiple cards. | ||
1151 | The driver requires the firmware loader support on kernel. | ||
1152 | |||
1059 | Module snd-miro | 1153 | Module snd-miro |
1060 | --------------- | 1154 | --------------- |
1061 | 1155 | ||
@@ -1088,6 +1182,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1088 | When no hotplug fw loader is available, you need to load the | 1182 | When no hotplug fw loader is available, you need to load the |
1089 | firmware via mixartloader utility in alsa-tools package. | 1183 | firmware via mixartloader utility in alsa-tools package. |
1090 | 1184 | ||
1185 | Module snd-mona | ||
1186 | --------------- | ||
1187 | |||
1188 | Module for Echoaudio Mona | ||
1189 | |||
1190 | This module supports multiple cards. | ||
1191 | The driver requires the firmware loader support on kernel. | ||
1192 | |||
1091 | Module snd-mpu401 | 1193 | Module snd-mpu401 |
1092 | ----------------- | 1194 | ----------------- |
1093 | 1195 | ||
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 635cbb94357c..69866d5997a4 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -1149,7 +1149,7 @@ | |||
1149 | } | 1149 | } |
1150 | chip->port = pci_resource_start(pci, 0); | 1150 | chip->port = pci_resource_start(pci, 0); |
1151 | if (request_irq(pci->irq, snd_mychip_interrupt, | 1151 | if (request_irq(pci->irq, snd_mychip_interrupt, |
1152 | SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { | 1152 | IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) { |
1153 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); | 1153 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); |
1154 | snd_mychip_free(chip); | 1154 | snd_mychip_free(chip); |
1155 | return -EBUSY; | 1155 | return -EBUSY; |
@@ -1323,7 +1323,7 @@ | |||
1323 | <programlisting> | 1323 | <programlisting> |
1324 | <![CDATA[ | 1324 | <![CDATA[ |
1325 | if (request_irq(pci->irq, snd_mychip_interrupt, | 1325 | if (request_irq(pci->irq, snd_mychip_interrupt, |
1326 | SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { | 1326 | IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) { |
1327 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); | 1327 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); |
1328 | snd_mychip_free(chip); | 1328 | snd_mychip_free(chip); |
1329 | return -EBUSY; | 1329 | return -EBUSY; |
@@ -1342,7 +1342,7 @@ | |||
1342 | 1342 | ||
1343 | <para> | 1343 | <para> |
1344 | On the PCI bus, the interrupts can be shared. Thus, | 1344 | On the PCI bus, the interrupts can be shared. Thus, |
1345 | <constant>SA_SHIRQ</constant> is given as the interrupt flag of | 1345 | <constant>IRQF_SHARED</constant> is given as the interrupt flag of |
1346 | <function>request_irq()</function>. | 1346 | <function>request_irq()</function>. |
1347 | </para> | 1347 | </para> |
1348 | 1348 | ||
@@ -3048,7 +3048,7 @@ struct _snd_pcm_runtime { | |||
3048 | </para> | 3048 | </para> |
3049 | 3049 | ||
3050 | <para> | 3050 | <para> |
3051 | If you aquire a spinlock in the interrupt handler, and the | 3051 | If you acquire a spinlock in the interrupt handler, and the |
3052 | lock is used in other pcm callbacks, too, then you have to | 3052 | lock is used in other pcm callbacks, too, then you have to |
3053 | release the lock before calling | 3053 | release the lock before calling |
3054 | <function>snd_pcm_period_elapsed()</function>, because | 3054 | <function>snd_pcm_period_elapsed()</function>, because |
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 2dc246af4885..86754eb390da 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -28,7 +28,6 @@ Currently, these files are in /proc/sys/vm: | |||
28 | - block_dump | 28 | - block_dump |
29 | - drop-caches | 29 | - drop-caches |
30 | - zone_reclaim_mode | 30 | - zone_reclaim_mode |
31 | - zone_reclaim_interval | ||
32 | - panic_on_oom | 31 | - panic_on_oom |
33 | 32 | ||
34 | ============================================================== | 33 | ============================================================== |
@@ -167,18 +166,6 @@ use of files and builds up large slab caches. However, the slab | |||
167 | shrink operation is global, may take a long time and free slabs | 166 | shrink operation is global, may take a long time and free slabs |
168 | in all nodes of the system. | 167 | in all nodes of the system. |
169 | 168 | ||
170 | ================================================================ | ||
171 | |||
172 | zone_reclaim_interval: | ||
173 | |||
174 | The time allowed for off node allocations after zone reclaim | ||
175 | has failed to reclaim enough pages to allow a local allocation. | ||
176 | |||
177 | Time is set in seconds and set by default to 30 seconds. | ||
178 | |||
179 | Reduce the interval if undesired off node allocations occur. However, too | ||
180 | frequent scans will have a negative impact onoff node allocation performance. | ||
181 | |||
182 | ============================================================= | 169 | ============================================================= |
183 | 170 | ||
184 | panic_on_oom | 171 | panic_on_oom |
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 6cb63ddf6163..00d9a1f2a54c 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -50,3 +50,4 @@ | |||
50 | 49 -> PixelView PlayTV P7000 [1554:4813] | 50 | 49 -> PixelView PlayTV P7000 [1554:4813] |
51 | 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] | 51 | 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] |
52 | 51 -> WinFast DTV2000 H [107d:665e] | 52 | 51 -> WinFast DTV2000 H [107d:665e] |
53 | 52 -> Geniatech DVB-S [14f1:0084] | ||
diff --git a/Documentation/watchdog/pcwd-watchdog.txt b/Documentation/watchdog/pcwd-watchdog.txt index 12187a33e310..d9ee6336c1d4 100644 --- a/Documentation/watchdog/pcwd-watchdog.txt +++ b/Documentation/watchdog/pcwd-watchdog.txt | |||
@@ -22,78 +22,9 @@ | |||
22 | to run the program with an "&" to run it in the background!) | 22 | to run the program with an "&" to run it in the background!) |
23 | 23 | ||
24 | If you want to write a program to be compatible with the PC Watchdog | 24 | If you want to write a program to be compatible with the PC Watchdog |
25 | driver, simply do the following: | 25 | driver, simply use of modify the watchdog test program: |
26 | 26 | Documentation/watchdog/src/watchdog-test.c | |
27 | -- Snippet of code -- | 27 | |
28 | /* | ||
29 | * Watchdog Driver Test Program | ||
30 | */ | ||
31 | |||
32 | #include <stdio.h> | ||
33 | #include <stdlib.h> | ||
34 | #include <string.h> | ||
35 | #include <unistd.h> | ||
36 | #include <fcntl.h> | ||
37 | #include <sys/ioctl.h> | ||
38 | #include <linux/types.h> | ||
39 | #include <linux/watchdog.h> | ||
40 | |||
41 | int fd; | ||
42 | |||
43 | /* | ||
44 | * This function simply sends an IOCTL to the driver, which in turn ticks | ||
45 | * the PC Watchdog card to reset its internal timer so it doesn't trigger | ||
46 | * a computer reset. | ||
47 | */ | ||
48 | void keep_alive(void) | ||
49 | { | ||
50 | int dummy; | ||
51 | |||
52 | ioctl(fd, WDIOC_KEEPALIVE, &dummy); | ||
53 | } | ||
54 | |||
55 | /* | ||
56 | * The main program. Run the program with "-d" to disable the card, | ||
57 | * or "-e" to enable the card. | ||
58 | */ | ||
59 | int main(int argc, char *argv[]) | ||
60 | { | ||
61 | fd = open("/dev/watchdog", O_WRONLY); | ||
62 | |||
63 | if (fd == -1) { | ||
64 | fprintf(stderr, "Watchdog device not enabled.\n"); | ||
65 | fflush(stderr); | ||
66 | exit(-1); | ||
67 | } | ||
68 | |||
69 | if (argc > 1) { | ||
70 | if (!strncasecmp(argv[1], "-d", 2)) { | ||
71 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD); | ||
72 | fprintf(stderr, "Watchdog card disabled.\n"); | ||
73 | fflush(stderr); | ||
74 | exit(0); | ||
75 | } else if (!strncasecmp(argv[1], "-e", 2)) { | ||
76 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD); | ||
77 | fprintf(stderr, "Watchdog card enabled.\n"); | ||
78 | fflush(stderr); | ||
79 | exit(0); | ||
80 | } else { | ||
81 | fprintf(stderr, "-d to disable, -e to enable.\n"); | ||
82 | fprintf(stderr, "run by itself to tick the card.\n"); | ||
83 | fflush(stderr); | ||
84 | exit(0); | ||
85 | } | ||
86 | } else { | ||
87 | fprintf(stderr, "Watchdog Ticking Away!\n"); | ||
88 | fflush(stderr); | ||
89 | } | ||
90 | |||
91 | while(1) { | ||
92 | keep_alive(); | ||
93 | sleep(1); | ||
94 | } | ||
95 | } | ||
96 | -- End snippet -- | ||
97 | 28 | ||
98 | Other IOCTL functions include: | 29 | Other IOCTL functions include: |
99 | 30 | ||
diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c new file mode 100644 index 000000000000..85cf17c48669 --- /dev/null +++ b/Documentation/watchdog/src/watchdog-simple.c | |||
@@ -0,0 +1,15 @@ | |||
1 | #include <stdlib.h> | ||
2 | #include <fcntl.h> | ||
3 | |||
4 | int main(int argc, const char *argv[]) { | ||
5 | int fd = open("/dev/watchdog", O_WRONLY); | ||
6 | if (fd == -1) { | ||
7 | perror("watchdog"); | ||
8 | exit(1); | ||
9 | } | ||
10 | while (1) { | ||
11 | write(fd, "\0", 1); | ||
12 | fsync(fd); | ||
13 | sleep(10); | ||
14 | } | ||
15 | } | ||
diff --git a/Documentation/watchdog/src/watchdog-test.c b/Documentation/watchdog/src/watchdog-test.c new file mode 100644 index 000000000000..65f6c19cb865 --- /dev/null +++ b/Documentation/watchdog/src/watchdog-test.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * Watchdog Driver Test Program | ||
3 | */ | ||
4 | |||
5 | #include <stdio.h> | ||
6 | #include <stdlib.h> | ||
7 | #include <string.h> | ||
8 | #include <unistd.h> | ||
9 | #include <fcntl.h> | ||
10 | #include <sys/ioctl.h> | ||
11 | #include <linux/types.h> | ||
12 | #include <linux/watchdog.h> | ||
13 | |||
14 | int fd; | ||
15 | |||
16 | /* | ||
17 | * This function simply sends an IOCTL to the driver, which in turn ticks | ||
18 | * the PC Watchdog card to reset its internal timer so it doesn't trigger | ||
19 | * a computer reset. | ||
20 | */ | ||
21 | void keep_alive(void) | ||
22 | { | ||
23 | int dummy; | ||
24 | |||
25 | ioctl(fd, WDIOC_KEEPALIVE, &dummy); | ||
26 | } | ||
27 | |||
28 | /* | ||
29 | * The main program. Run the program with "-d" to disable the card, | ||
30 | * or "-e" to enable the card. | ||
31 | */ | ||
32 | int main(int argc, char *argv[]) | ||
33 | { | ||
34 | fd = open("/dev/watchdog", O_WRONLY); | ||
35 | |||
36 | if (fd == -1) { | ||
37 | fprintf(stderr, "Watchdog device not enabled.\n"); | ||
38 | fflush(stderr); | ||
39 | exit(-1); | ||
40 | } | ||
41 | |||
42 | if (argc > 1) { | ||
43 | if (!strncasecmp(argv[1], "-d", 2)) { | ||
44 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD); | ||
45 | fprintf(stderr, "Watchdog card disabled.\n"); | ||
46 | fflush(stderr); | ||
47 | exit(0); | ||
48 | } else if (!strncasecmp(argv[1], "-e", 2)) { | ||
49 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD); | ||
50 | fprintf(stderr, "Watchdog card enabled.\n"); | ||
51 | fflush(stderr); | ||
52 | exit(0); | ||
53 | } else { | ||
54 | fprintf(stderr, "-d to disable, -e to enable.\n"); | ||
55 | fprintf(stderr, "run by itself to tick the card.\n"); | ||
56 | fflush(stderr); | ||
57 | exit(0); | ||
58 | } | ||
59 | } else { | ||
60 | fprintf(stderr, "Watchdog Ticking Away!\n"); | ||
61 | fflush(stderr); | ||
62 | } | ||
63 | |||
64 | while(1) { | ||
65 | keep_alive(); | ||
66 | sleep(1); | ||
67 | } | ||
68 | } | ||
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt index 21ed51173662..958ff3d48be3 100644 --- a/Documentation/watchdog/watchdog-api.txt +++ b/Documentation/watchdog/watchdog-api.txt | |||
@@ -34,22 +34,7 @@ activates as soon as /dev/watchdog is opened and will reboot unless | |||
34 | the watchdog is pinged within a certain time, this time is called the | 34 | the watchdog is pinged within a certain time, this time is called the |
35 | timeout or margin. The simplest way to ping the watchdog is to write | 35 | timeout or margin. The simplest way to ping the watchdog is to write |
36 | some data to the device. So a very simple watchdog daemon would look | 36 | some data to the device. So a very simple watchdog daemon would look |
37 | like this: | 37 | like this source file: see Documentation/watchdog/src/watchdog-simple.c |
38 | |||
39 | #include <stdlib.h> | ||
40 | #include <fcntl.h> | ||
41 | |||
42 | int main(int argc, const char *argv[]) { | ||
43 | int fd=open("/dev/watchdog",O_WRONLY); | ||
44 | if (fd==-1) { | ||
45 | perror("watchdog"); | ||
46 | exit(1); | ||
47 | } | ||
48 | while(1) { | ||
49 | write(fd, "\0", 1); | ||
50 | sleep(10); | ||
51 | } | ||
52 | } | ||
53 | 38 | ||
54 | A more advanced driver could for example check that a HTTP server is | 39 | A more advanced driver could for example check that a HTTP server is |
55 | still responding before doing the write call to ping the watchdog. | 40 | still responding before doing the write call to ping the watchdog. |
@@ -110,7 +95,40 @@ current timeout using the GETTIMEOUT ioctl. | |||
110 | ioctl(fd, WDIOC_GETTIMEOUT, &timeout); | 95 | ioctl(fd, WDIOC_GETTIMEOUT, &timeout); |
111 | printf("The timeout was is %d seconds\n", timeout); | 96 | printf("The timeout was is %d seconds\n", timeout); |
112 | 97 | ||
113 | Envinronmental monitoring: | 98 | Pretimeouts: |
99 | |||
100 | Some watchdog timers can be set to have a trigger go off before the | ||
101 | actual time they will reset the system. This can be done with an NMI, | ||
102 | interrupt, or other mechanism. This allows Linux to record useful | ||
103 | information (like panic information and kernel coredumps) before it | ||
104 | resets. | ||
105 | |||
106 | pretimeout = 10; | ||
107 | ioctl(fd, WDIOC_SETPRETIMEOUT, &pretimeout); | ||
108 | |||
109 | Note that the pretimeout is the number of seconds before the time | ||
110 | when the timeout will go off. It is not the number of seconds until | ||
111 | the pretimeout. So, for instance, if you set the timeout to 60 seconds | ||
112 | and the pretimeout to 10 seconds, the pretimout will go of in 50 | ||
113 | seconds. Setting a pretimeout to zero disables it. | ||
114 | |||
115 | There is also a get function for getting the pretimeout: | ||
116 | |||
117 | ioctl(fd, WDIOC_GETPRETIMEOUT, &timeout); | ||
118 | printf("The pretimeout was is %d seconds\n", timeout); | ||
119 | |||
120 | Not all watchdog drivers will support a pretimeout. | ||
121 | |||
122 | Get the number of seconds before reboot: | ||
123 | |||
124 | Some watchdog drivers have the ability to report the remaining time | ||
125 | before the system will reboot. The WDIOC_GETTIMELEFT is the ioctl | ||
126 | that returns the number of seconds before reboot. | ||
127 | |||
128 | ioctl(fd, WDIOC_GETTIMELEFT, &timeleft); | ||
129 | printf("The timeout was is %d seconds\n", timeleft); | ||
130 | |||
131 | Environmental monitoring: | ||
114 | 132 | ||
115 | All watchdog drivers are required return more information about the system, | 133 | All watchdog drivers are required return more information about the system, |
116 | some do temperature, fan and power level monitoring, some can tell you | 134 | some do temperature, fan and power level monitoring, some can tell you |
@@ -169,6 +187,10 @@ The watchdog saw a keepalive ping since it was last queried. | |||
169 | 187 | ||
170 | WDIOF_SETTIMEOUT Can set/get the timeout | 188 | WDIOF_SETTIMEOUT Can set/get the timeout |
171 | 189 | ||
190 | The watchdog can do pretimeouts. | ||
191 | |||
192 | WDIOF_PRETIMEOUT Pretimeout (in seconds), get/set | ||
193 | |||
172 | 194 | ||
173 | For those drivers that return any bits set in the option field, the | 195 | For those drivers that return any bits set in the option field, the |
174 | GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current | 196 | GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current |
diff --git a/Documentation/watchdog/watchdog.txt b/Documentation/watchdog/watchdog.txt index dffda29c8799..4b1ff69cc19a 100644 --- a/Documentation/watchdog/watchdog.txt +++ b/Documentation/watchdog/watchdog.txt | |||
@@ -65,28 +65,7 @@ The external event interfaces on the WDT boards are not currently supported. | |||
65 | Minor numbers are however allocated for it. | 65 | Minor numbers are however allocated for it. |
66 | 66 | ||
67 | 67 | ||
68 | Example Watchdog Driver | 68 | Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c |
69 | ----------------------- | ||
70 | |||
71 | #include <stdio.h> | ||
72 | #include <unistd.h> | ||
73 | #include <fcntl.h> | ||
74 | |||
75 | int main(int argc, const char *argv[]) | ||
76 | { | ||
77 | int fd=open("/dev/watchdog",O_WRONLY); | ||
78 | if(fd==-1) | ||
79 | { | ||
80 | perror("watchdog"); | ||
81 | exit(1); | ||
82 | } | ||
83 | while(1) | ||
84 | { | ||
85 | write(fd,"\0",1); | ||
86 | fsync(fd); | ||
87 | sleep(10); | ||
88 | } | ||
89 | } | ||
90 | 69 | ||
91 | 70 | ||
92 | Contact Information | 71 | Contact Information |