diff options
Diffstat (limited to 'Documentation')
57 files changed, 2526 insertions, 1265 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index e8fb24671967..a82a113b4a4b 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -25,8 +25,6 @@ DMA-API.txt | |||
25 | - DMA API, pci_ API & extensions for non-consistent memory machines. | 25 | - DMA API, pci_ API & extensions for non-consistent memory machines. |
26 | DMA-ISA-LPC.txt | 26 | DMA-ISA-LPC.txt |
27 | - How to do DMA with ISA (and LPC) devices. | 27 | - How to do DMA with ISA (and LPC) devices. |
28 | DMA-mapping.txt | ||
29 | - info for PCI drivers using DMA portably across all platforms. | ||
30 | DocBook/ | 28 | DocBook/ |
31 | - directory with DocBook templates etc. for kernel documentation. | 29 | - directory with DocBook templates etc. for kernel documentation. |
32 | HOWTO | 30 | HOWTO |
@@ -43,8 +41,6 @@ ManagementStyle | |||
43 | - how to (attempt to) manage kernel hackers. | 41 | - how to (attempt to) manage kernel hackers. |
44 | MSI-HOWTO.txt | 42 | MSI-HOWTO.txt |
45 | - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. | 43 | - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. |
46 | PCIEBUS-HOWTO.txt | ||
47 | - a guide describing the PCI Express Port Bus driver. | ||
48 | RCU/ | 44 | RCU/ |
49 | - directory with info on RCU (read-copy update). | 45 | - directory with info on RCU (read-copy update). |
50 | README.DAC960 | 46 | README.DAC960 |
@@ -167,10 +163,8 @@ highuid.txt | |||
167 | - notes on the change from 16 bit to 32 bit user/group IDs. | 163 | - notes on the change from 16 bit to 32 bit user/group IDs. |
168 | hpet.txt | 164 | hpet.txt |
169 | - High Precision Event Timer Driver for Linux. | 165 | - High Precision Event Timer Driver for Linux. |
170 | hrtimer/ | 166 | timers/ |
171 | - info on the timer_stats debugging facility for timer (ab)use. | 167 | - info on the timer related topics |
172 | hrtimers/ | ||
173 | - info on the hrtimers subsystem for high-resolution kernel timers. | ||
174 | hw_random.txt | 168 | hw_random.txt |
175 | - info on Linux support for random number generator in i8xx chipsets. | 169 | - info on Linux support for random number generator in i8xx chipsets. |
176 | hwmon/ | 170 | hwmon/ |
@@ -287,12 +281,6 @@ parport.txt | |||
287 | - how to use the parallel-port driver. | 281 | - how to use the parallel-port driver. |
288 | parport-lowlevel.txt | 282 | parport-lowlevel.txt |
289 | - description and usage of the low level parallel port functions. | 283 | - description and usage of the low level parallel port functions. |
290 | pci-error-recovery.txt | ||
291 | - info on PCI error recovery. | ||
292 | pci.txt | ||
293 | - info on the PCI subsystem for device driver authors. | ||
294 | pcieaer-howto.txt | ||
295 | - the PCI Express Advanced Error Reporting Driver Guide HOWTO. | ||
296 | pcmcia/ | 284 | pcmcia/ |
297 | - info on the Linux PCMCIA driver. | 285 | - info on the Linux PCMCIA driver. |
298 | pi-futex.txt | 286 | pi-futex.txt |
diff --git a/Documentation/ABI/obsolete/o2cb b/Documentation/ABI/obsolete/o2cb new file mode 100644 index 000000000000..9c49d8e6c0cc --- /dev/null +++ b/Documentation/ABI/obsolete/o2cb | |||
@@ -0,0 +1,11 @@ | |||
1 | What: /sys/o2cb symlink | ||
2 | Date: Dec 2005 | ||
3 | KernelVersion: 2.6.16 | ||
4 | Contact: ocfs2-devel@oss.oracle.com | ||
5 | Description: This is a symlink: /sys/o2cb to /sys/fs/o2cb. The symlink will | ||
6 | be removed when new versions of ocfs2-tools which know to look | ||
7 | in /sys/fs/o2cb are sufficiently prevalent. Don't code new | ||
8 | software to look here, it should try /sys/fs/o2cb instead. | ||
9 | See Documentation/ABI/stable/o2cb for more information on usage. | ||
10 | Users: ocfs2-tools. It's sufficient to mail proposed changes to | ||
11 | ocfs2-devel@oss.oracle.com. | ||
diff --git a/Documentation/ABI/stable/o2cb b/Documentation/ABI/stable/o2cb new file mode 100644 index 000000000000..5eb1545e0b8d --- /dev/null +++ b/Documentation/ABI/stable/o2cb | |||
@@ -0,0 +1,10 @@ | |||
1 | What: /sys/fs/o2cb/ (was /sys/o2cb) | ||
2 | Date: Dec 2005 | ||
3 | KernelVersion: 2.6.16 | ||
4 | Contact: ocfs2-devel@oss.oracle.com | ||
5 | Description: Ocfs2-tools looks at 'interface-revision' for versioning | ||
6 | information. Each logmask/ file controls a set of debug prints | ||
7 | and can be written into with the strings "allow", "deny", or | ||
8 | "off". Reading the file returns the current state. | ||
9 | Users: ocfs2-tools. It's sufficient to mail proposed changes to | ||
10 | ocfs2-devel@oss.oracle.com. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci new file mode 100644 index 000000000000..ceddcff4082a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -0,0 +1,11 @@ | |||
1 | What: /sys/bus/pci/devices/.../vpd | ||
2 | Date: February 2008 | ||
3 | Contact: Ben Hutchings <bhutchings@solarflare.com> | ||
4 | Description: | ||
5 | A file named vpd in a device directory will be a | ||
6 | binary file containing the Vital Product Data for the | ||
7 | device. It should follow the VPD format defined in | ||
8 | PCI Specification 2.1 or 2.2, but users should consider | ||
9 | that some devices may have malformatted data. If the | ||
10 | underlying VPD has a writable section then the | ||
11 | corresponding section of this file will be writable. | ||
diff --git a/Documentation/ABI/testing/sysfs-ibft b/Documentation/ABI/testing/sysfs-ibft new file mode 100644 index 000000000000..c2b7d1154bec --- /dev/null +++ b/Documentation/ABI/testing/sysfs-ibft | |||
@@ -0,0 +1,23 @@ | |||
1 | What: /sys/firmware/ibft/initiator | ||
2 | Date: November 2007 | ||
3 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> | ||
4 | Description: The /sys/firmware/ibft/initiator directory will contain | ||
5 | files that expose the iSCSI Boot Firmware Table initiator data. | ||
6 | Usually this contains the Initiator name. | ||
7 | |||
8 | What: /sys/firmware/ibft/targetX | ||
9 | Date: November 2007 | ||
10 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> | ||
11 | Description: The /sys/firmware/ibft/targetX directory will contain | ||
12 | files that expose the iSCSI Boot Firmware Table target data. | ||
13 | Usually this contains the target's IP address, boot LUN, | ||
14 | target name, and what NIC it is associated with. It can also | ||
15 | contain the CHAP name (and password), the reverse CHAP | ||
16 | name (and password) | ||
17 | |||
18 | What: /sys/firmware/ibft/ethernetX | ||
19 | Date: November 2007 | ||
20 | Contact: Konrad Rzeszutek <ketuzsezr@darnok.org> | ||
21 | Description: The /sys/firmware/ibft/ethernetX directory will contain | ||
22 | files that expose the iSCSI Boot Firmware Table NIC data. | ||
23 | This can this can the IP address, MAC, and gateway of the NIC. | ||
diff --git a/Documentation/ABI/testing/sysfs-ocfs2 b/Documentation/ABI/testing/sysfs-ocfs2 new file mode 100644 index 000000000000..b7cc516a8a8a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-ocfs2 | |||
@@ -0,0 +1,89 @@ | |||
1 | What: /sys/fs/ocfs2/ | ||
2 | Date: April 2008 | ||
3 | Contact: ocfs2-devel@oss.oracle.com | ||
4 | Description: | ||
5 | The /sys/fs/ocfs2 directory contains knobs used by the | ||
6 | ocfs2-tools to interact with the filesystem. | ||
7 | |||
8 | What: /sys/fs/ocfs2/max_locking_protocol | ||
9 | Date: April 2008 | ||
10 | Contact: ocfs2-devel@oss.oracle.com | ||
11 | Description: | ||
12 | The /sys/fs/ocfs2/max_locking_protocol file displays version | ||
13 | of ocfs2 locking supported by the filesystem. This version | ||
14 | covers how ocfs2 uses distributed locking between cluster | ||
15 | nodes. | ||
16 | |||
17 | The protocol version has a major and minor number. Two | ||
18 | cluster nodes can interoperate if they have an identical | ||
19 | major number and an overlapping minor number - thus, | ||
20 | a node with version 1.10 can interoperate with a node | ||
21 | sporting version 1.8, as long as both use the 1.8 protocol. | ||
22 | |||
23 | Reading from this file returns a single line, the major | ||
24 | number and minor number joined by a period, eg "1.10". | ||
25 | |||
26 | This file is read-only. The value is compiled into the | ||
27 | driver. | ||
28 | |||
29 | What: /sys/fs/ocfs2/loaded_cluster_plugins | ||
30 | Date: April 2008 | ||
31 | Contact: ocfs2-devel@oss.oracle.com | ||
32 | Description: | ||
33 | The /sys/fs/ocfs2/loaded_cluster_plugins file describes | ||
34 | the available plugins to support ocfs2 cluster operation. | ||
35 | A cluster plugin is required to use ocfs2 in a cluster. | ||
36 | There are currently two available plugins: | ||
37 | |||
38 | * 'o2cb' - The classic o2cb cluster stack that ocfs2 has | ||
39 | used since its inception. | ||
40 | * 'user' - A plugin supporting userspace cluster software | ||
41 | in conjunction with fs/dlm. | ||
42 | |||
43 | Reading from this file returns the names of all loaded | ||
44 | plugins, one per line. | ||
45 | |||
46 | This file is read-only. Its contents may change as | ||
47 | plugins are loaded or removed. | ||
48 | |||
49 | What: /sys/fs/ocfs2/active_cluster_plugin | ||
50 | Date: April 2008 | ||
51 | Contact: ocfs2-devel@oss.oracle.com | ||
52 | Description: | ||
53 | The /sys/fs/ocfs2/active_cluster_plugin displays which | ||
54 | cluster plugin is currently in use by the filesystem. | ||
55 | The active plugin will appear in the loaded_cluster_plugins | ||
56 | file as well. Only one plugin can be used at a time. | ||
57 | |||
58 | Reading from this file returns the name of the active plugin | ||
59 | on a single line. | ||
60 | |||
61 | This file is read-only. Which plugin is active depends on | ||
62 | the cluster stack in use. The contents may change | ||
63 | when all filesystems are unmounted and the cluster stack | ||
64 | is changed. | ||
65 | |||
66 | What: /sys/fs/ocfs2/cluster_stack | ||
67 | Date: April 2008 | ||
68 | Contact: ocfs2-devel@oss.oracle.com | ||
69 | Description: | ||
70 | The /sys/fs/ocfs2/cluster_stack file contains the name | ||
71 | of current ocfs2 cluster stack. This value is set by | ||
72 | userspace tools when bringing the cluster stack online. | ||
73 | |||
74 | Cluster stack names are 4 characters in length. | ||
75 | |||
76 | When the 'o2cb' cluster stack is used, the 'o2cb' cluster | ||
77 | plugin is active. All other cluster stacks use the 'user' | ||
78 | cluster plugin. | ||
79 | |||
80 | Reading from this file returns the name of the current | ||
81 | cluster stack on a single line. | ||
82 | |||
83 | Writing a new stack name to this file changes the current | ||
84 | cluster stack unless there are mounted ocfs2 filesystems. | ||
85 | If there are mounted filesystems, attempts to change the | ||
86 | stack return an error. | ||
87 | |||
88 | Users: | ||
89 | ocfs2-tools <ocfs2-tools-devel@oss.oracle.com> | ||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 300e1707893f..b2b6366bba51 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -9,9 +9,10 @@ | |||
9 | DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ | 9 | 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 networking.xml \ | 11 | procfs-guide.xml writing_usb_driver.xml networking.xml \ |
12 | kernel-api.xml filesystems.xml lsm.xml usb.xml \ | 12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.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 s390-drivers.xml uio-howto.xml scsi.xml | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
15 | mac80211.xml | ||
15 | 16 | ||
16 | ### | 17 | ### |
17 | # The build process is as follows (targets): | 18 | # The build process is as follows (targets): |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index dc0f30c3e571..488dd4a4945b 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -297,11 +297,6 @@ X!Earch/x86/kernel/mca_32.c | |||
297 | !Ikernel/acct.c | 297 | !Ikernel/acct.c |
298 | </chapter> | 298 | </chapter> |
299 | 299 | ||
300 | <chapter id="pmfuncs"> | ||
301 | <title>Power Management</title> | ||
302 | !Ekernel/power/pm.c | ||
303 | </chapter> | ||
304 | |||
305 | <chapter id="devdrivers"> | 300 | <chapter id="devdrivers"> |
306 | <title>Device drivers infrastructure</title> | 301 | <title>Device drivers infrastructure</title> |
307 | <sect1><title>Device Drivers Base</title> | 302 | <sect1><title>Device Drivers Base</title> |
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 2e9d6b41f034..77c42f40be5d 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl | |||
@@ -241,7 +241,7 @@ | |||
241 | </para> | 241 | </para> |
242 | <para> | 242 | <para> |
243 | The third type is a semaphore | 243 | The third type is a semaphore |
244 | (<filename class="headerfile">include/asm/semaphore.h</filename>): it | 244 | (<filename class="headerfile">include/linux/semaphore.h</filename>): it |
245 | can have more than one holder at any time (the number decided at | 245 | can have more than one holder at any time (the number decided at |
246 | initialization time), although it is most commonly used as a | 246 | initialization time), although it is most commonly used as a |
247 | single-holder lock (a mutex). If you can't get a semaphore, your | 247 | single-holder lock (a mutex). If you can't get a semaphore, your |
@@ -290,7 +290,7 @@ | |||
290 | <para> | 290 | <para> |
291 | If you have a data structure which is only ever accessed from | 291 | If you have a data structure which is only ever accessed from |
292 | user context, then you can use a simple semaphore | 292 | user context, then you can use a simple semaphore |
293 | (<filename>linux/asm/semaphore.h</filename>) to protect it. This | 293 | (<filename>linux/linux/semaphore.h</filename>) to protect it. This |
294 | is the most trivial case: you initialize the semaphore to the number | 294 | is the most trivial case: you initialize the semaphore to the number |
295 | of resources available (usually 1), and call | 295 | of resources available (usually 1), and call |
296 | <function>down_interruptible()</function> to grab the semaphore, and | 296 | <function>down_interruptible()</function> to grab the semaphore, and |
@@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the | |||
854 | }; | 854 | }; |
855 | 855 | ||
856 | -static DEFINE_MUTEX(cache_lock); | 856 | -static DEFINE_MUTEX(cache_lock); |
857 | +static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 857 | +static DEFINE_SPINLOCK(cache_lock); |
858 | static LIST_HEAD(cache); | 858 | static LIST_HEAD(cache); |
859 | static unsigned int cache_num = 0; | 859 | static unsigned int cache_num = 0; |
860 | #define MAX_CACHE_SIZE 10 | 860 | #define MAX_CACHE_SIZE 10 |
@@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation: | |||
1238 | - int popularity; | 1238 | - int popularity; |
1239 | }; | 1239 | }; |
1240 | 1240 | ||
1241 | static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; | 1241 | static DEFINE_SPINLOCK(cache_lock); |
1242 | @@ -77,6 +84,7 @@ | 1242 | @@ -77,6 +84,7 @@ |
1243 | obj->id = id; | 1243 | obj->id = id; |
1244 | obj->popularity = 0; | 1244 | obj->popularity = 0; |
@@ -1656,7 +1656,7 @@ the amount of locking which needs to be done. | |||
1656 | #include <linux/slab.h> | 1656 | #include <linux/slab.h> |
1657 | #include <linux/string.h> | 1657 | #include <linux/string.h> |
1658 | +#include <linux/rcupdate.h> | 1658 | +#include <linux/rcupdate.h> |
1659 | #include <asm/semaphore.h> | 1659 | #include <linux/semaphore.h> |
1660 | #include <asm/errno.h> | 1660 | #include <asm/errno.h> |
1661 | 1661 | ||
1662 | struct object | 1662 | struct object |
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl new file mode 100644 index 000000000000..97618bed4d65 --- /dev/null +++ b/Documentation/DocBook/kgdb.tmpl | |||
@@ -0,0 +1,447 @@ | |||
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="kgdbOnLinux"> | ||
6 | <bookinfo> | ||
7 | <title>Using kgdb and the kgdb Internals</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Jason</firstname> | ||
12 | <surname>Wessel</surname> | ||
13 | <affiliation> | ||
14 | <address> | ||
15 | <email>jason.wessel@windriver.com</email> | ||
16 | </address> | ||
17 | </affiliation> | ||
18 | </author> | ||
19 | </authorgroup> | ||
20 | |||
21 | <authorgroup> | ||
22 | <author> | ||
23 | <firstname>Tom</firstname> | ||
24 | <surname>Rini</surname> | ||
25 | <affiliation> | ||
26 | <address> | ||
27 | <email>trini@kernel.crashing.org</email> | ||
28 | </address> | ||
29 | </affiliation> | ||
30 | </author> | ||
31 | </authorgroup> | ||
32 | |||
33 | <authorgroup> | ||
34 | <author> | ||
35 | <firstname>Amit S.</firstname> | ||
36 | <surname>Kale</surname> | ||
37 | <affiliation> | ||
38 | <address> | ||
39 | <email>amitkale@linsyssoft.com</email> | ||
40 | </address> | ||
41 | </affiliation> | ||
42 | </author> | ||
43 | </authorgroup> | ||
44 | |||
45 | <copyright> | ||
46 | <year>2008</year> | ||
47 | <holder>Wind River Systems, Inc.</holder> | ||
48 | </copyright> | ||
49 | <copyright> | ||
50 | <year>2004-2005</year> | ||
51 | <holder>MontaVista Software, Inc.</holder> | ||
52 | </copyright> | ||
53 | <copyright> | ||
54 | <year>2004</year> | ||
55 | <holder>Amit S. Kale</holder> | ||
56 | </copyright> | ||
57 | |||
58 | <legalnotice> | ||
59 | <para> | ||
60 | This file is licensed under the terms of the GNU General Public License | ||
61 | version 2. This program is licensed "as is" without any warranty of any | ||
62 | kind, whether express or implied. | ||
63 | </para> | ||
64 | |||
65 | </legalnotice> | ||
66 | </bookinfo> | ||
67 | |||
68 | <toc></toc> | ||
69 | <chapter id="Introduction"> | ||
70 | <title>Introduction</title> | ||
71 | <para> | ||
72 | kgdb is a source level debugger for linux kernel. It is used along | ||
73 | with gdb to debug a linux kernel. The expectation is that gdb can | ||
74 | be used to "break in" to the kernel to inspect memory, variables | ||
75 | and look through a cal stack information similar to what an | ||
76 | application developer would use gdb for. It is possible to place | ||
77 | breakpoints in kernel code and perform some limited execution | ||
78 | stepping. | ||
79 | </para> | ||
80 | <para> | ||
81 | Two machines are required for using kgdb. One of these machines is a | ||
82 | development machine and the other is a test machine. The kernel | ||
83 | to be debugged runs on the test machine. The development machine | ||
84 | runs an instance of gdb against the vmlinux file which contains | ||
85 | the symbols (not boot image such as bzImage, zImage, uImage...). | ||
86 | In gdb the developer specifies the connection parameters and | ||
87 | connects to kgdb. Depending on which kgdb I/O modules exist in | ||
88 | the kernel for a given architecture, it may be possible to debug | ||
89 | the test machine's kernel with the development machine using a | ||
90 | rs232 or ethernet connection. | ||
91 | </para> | ||
92 | </chapter> | ||
93 | <chapter id="CompilingAKernel"> | ||
94 | <title>Compiling a kernel</title> | ||
95 | <para> | ||
96 | To enable <symbol>CONFIG_KGDB</symbol>, look under the "Kernel debugging" | ||
97 | and then select "KGDB: kernel debugging with remote gdb". | ||
98 | </para> | ||
99 | <para> | ||
100 | Next you should choose one of more I/O drivers to interconnect debugging | ||
101 | host and debugged target. Early boot debugging requires a KGDB | ||
102 | I/O driver that supports early debugging and the driver must be | ||
103 | built into the kernel directly. Kgdb I/O driver configuration | ||
104 | takes place via kernel or module parameters, see following | ||
105 | chapter. | ||
106 | </para> | ||
107 | <para> | ||
108 | The kgdb test compile options are described in the kgdb test suite chapter. | ||
109 | </para> | ||
110 | |||
111 | </chapter> | ||
112 | <chapter id="EnableKGDB"> | ||
113 | <title>Enable kgdb for debugging</title> | ||
114 | <para> | ||
115 | In order to use kgdb you must activate it by passing configuration | ||
116 | information to one of the kgdb I/O drivers. If you do not pass any | ||
117 | configuration information kgdb will not do anything at all. Kgdb | ||
118 | will only actively hook up to the kernel trap hooks if a kgdb I/O | ||
119 | driver is loaded and configured. If you unconfigure a kgdb I/O | ||
120 | driver, kgdb will unregister all the kernel hook points. | ||
121 | </para> | ||
122 | <para> | ||
123 | All drivers can be reconfigured at run time, if | ||
124 | <symbol>CONFIG_SYSFS</symbol> and <symbol>CONFIG_MODULES</symbol> | ||
125 | are enabled, by echo'ing a new config string to | ||
126 | <constant>/sys/module/<driver>/parameter/<option></constant>. | ||
127 | The driver can be unconfigured by passing an empty string. You cannot | ||
128 | change the configuration while the debugger is attached. Make sure | ||
129 | to detach the debugger with the <constant>detach</constant> command | ||
130 | prior to trying unconfigure a kgdb I/O driver. | ||
131 | </para> | ||
132 | <sect1 id="kgdbwait"> | ||
133 | <title>Kernel parameter: kgdbwait</title> | ||
134 | <para> | ||
135 | The Kernel command line option <constant>kgdbwait</constant> makes | ||
136 | kgdb wait for a debugger connection during booting of a kernel. You | ||
137 | can only use this option you compiled a kgdb I/O driver into the | ||
138 | kernel and you specified the I/O driver configuration as a kernel | ||
139 | command line option. The kgdbwait parameter should always follow the | ||
140 | configuration parameter for the kgdb I/O driver in the kernel | ||
141 | command line else the I/O driver will not be configured prior to | ||
142 | asking the kernel to use it to wait. | ||
143 | </para> | ||
144 | <para> | ||
145 | The kernel will stop and wait as early as the I/O driver and | ||
146 | architecture will allow when you use this option. If you build the | ||
147 | kgdb I/O driver as a kernel module kgdbwait will not do anything. | ||
148 | </para> | ||
149 | </sect1> | ||
150 | <sect1 id="kgdboc"> | ||
151 | <title>Kernel parameter: kgdboc</title> | ||
152 | <para> | ||
153 | The kgdboc driver was originally an abbreviation meant to stand for | ||
154 | "kgdb over console". Kgdboc is designed to work with a single | ||
155 | serial port. It was meant to cover the circumstance | ||
156 | where you wanted to use a serial console as your primary console as | ||
157 | well as using it to perform kernel debugging. Of course you can | ||
158 | also use kgdboc without assigning a console to the same port. | ||
159 | </para> | ||
160 | <sect2 id="UsingKgdboc"> | ||
161 | <title>Using kgdboc</title> | ||
162 | <para> | ||
163 | You can configure kgdboc via sysfs or a module or kernel boot line | ||
164 | parameter depending on if you build with CONFIG_KGDBOC as a module | ||
165 | or built-in. | ||
166 | <orderedlist> | ||
167 | <listitem><para>From the module load or build-in</para> | ||
168 | <para><constant>kgdboc=<tty-device>,[baud]</constant></para> | ||
169 | <para> | ||
170 | The example here would be if your console port was typically ttyS0, you would use something like <constant>kgdboc=ttyS0,115200</constant> or on the ARM Versatile AB you would likely use <constant>kgdboc=ttyAMA0,115200</constant> | ||
171 | </para> | ||
172 | </listitem> | ||
173 | <listitem><para>From sysfs</para> | ||
174 | <para><constant>echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc</constant></para> | ||
175 | </listitem> | ||
176 | </orderedlist> | ||
177 | </para> | ||
178 | <para> | ||
179 | NOTE: Kgdboc does not support interrupting the target via the | ||
180 | gdb remote protocol. You must manually send a sysrq-g unless you | ||
181 | have a proxy that splits console output to a terminal problem and | ||
182 | has a separate port for the debugger to connect to that sends the | ||
183 | sysrq-g for you. | ||
184 | </para> | ||
185 | <para>When using kgdboc with no debugger proxy, you can end up | ||
186 | connecting the debugger for one of two entry points. If an | ||
187 | exception occurs after you have loaded kgdboc a message should print | ||
188 | on the console stating it is waiting for the debugger. In case you | ||
189 | disconnect your terminal program and then connect the debugger in | ||
190 | its place. If you want to interrupt the target system and forcibly | ||
191 | enter a debug session you have to issue a Sysrq sequence and then | ||
192 | type the letter <constant>g</constant>. Then you disconnect the | ||
193 | terminal session and connect gdb. Your options if you don't like | ||
194 | this are to hack gdb to send the sysrq-g for you as well as on the | ||
195 | initial connect, or to use a debugger proxy that allows an | ||
196 | unmodified gdb to do the debugging. | ||
197 | </para> | ||
198 | </sect2> | ||
199 | </sect1> | ||
200 | <sect1 id="kgdbcon"> | ||
201 | <title>Kernel parameter: kgdbcon</title> | ||
202 | <para> | ||
203 | Kgdb supports using the gdb serial protocol to send console messages | ||
204 | to the debugger when the debugger is connected and running. There | ||
205 | are two ways to activate this feature. | ||
206 | <orderedlist> | ||
207 | <listitem><para>Activate with the kernel command line option:</para> | ||
208 | <para><constant>kgdbcon</constant></para> | ||
209 | </listitem> | ||
210 | <listitem><para>Use sysfs before configuring an io driver</para> | ||
211 | <para> | ||
212 | <constant>echo 1 > /sys/module/kgdb/parameters/kgdb_use_con</constant> | ||
213 | </para> | ||
214 | <para> | ||
215 | NOTE: If you do this after you configure the kgdb I/O driver, the | ||
216 | setting will not take effect until the next point the I/O is | ||
217 | reconfigured. | ||
218 | </para> | ||
219 | </listitem> | ||
220 | </orderedlist> | ||
221 | </para> | ||
222 | <para> | ||
223 | IMPORTANT NOTE: Using this option with kgdb over the console | ||
224 | (kgdboc) or kgdb over ethernet (kgdboe) is not supported. | ||
225 | </para> | ||
226 | </sect1> | ||
227 | </chapter> | ||
228 | <chapter id="ConnectingGDB"> | ||
229 | <title>Connecting gdb</title> | ||
230 | <para> | ||
231 | If you are using kgdboc, you need to have used kgdbwait as a boot | ||
232 | argument, issued a sysrq-g, or the system you are going to debug | ||
233 | has already taken an exception and is waiting for the debugger to | ||
234 | attach before you can connect gdb. | ||
235 | </para> | ||
236 | <para> | ||
237 | If you are not using different kgdb I/O driver other than kgdboc, | ||
238 | you should be able to connect and the target will automatically | ||
239 | respond. | ||
240 | </para> | ||
241 | <para> | ||
242 | Example (using a serial port): | ||
243 | </para> | ||
244 | <programlisting> | ||
245 | % gdb ./vmlinux | ||
246 | (gdb) set remotebaud 115200 | ||
247 | (gdb) target remote /dev/ttyS0 | ||
248 | </programlisting> | ||
249 | <para> | ||
250 | Example (kgdb to a terminal server): | ||
251 | </para> | ||
252 | <programlisting> | ||
253 | % gdb ./vmlinux | ||
254 | (gdb) target remote udp:192.168.2.2:6443 | ||
255 | </programlisting> | ||
256 | <para> | ||
257 | Example (kgdb over ethernet): | ||
258 | </para> | ||
259 | <programlisting> | ||
260 | % gdb ./vmlinux | ||
261 | (gdb) target remote udp:192.168.2.2:6443 | ||
262 | </programlisting> | ||
263 | <para> | ||
264 | Once connected, you can debug a kernel the way you would debug an | ||
265 | application program. | ||
266 | </para> | ||
267 | <para> | ||
268 | If you are having problems connecting or something is going | ||
269 | seriously wrong while debugging, it will most often be the case | ||
270 | that you want to enable gdb to be verbose about its target | ||
271 | communications. You do this prior to issuing the <constant>target | ||
272 | remote</constant> command by typing in: <constant>set remote debug 1</constant> | ||
273 | </para> | ||
274 | </chapter> | ||
275 | <chapter id="KGDBTestSuite"> | ||
276 | <title>kgdb Test Suite</title> | ||
277 | <para> | ||
278 | When kgdb is enabled in the kernel config you can also elect to | ||
279 | enable the config parameter KGDB_TESTS. Turning this on will | ||
280 | enable a special kgdb I/O module which is designed to test the | ||
281 | kgdb internal functions. | ||
282 | </para> | ||
283 | <para> | ||
284 | The kgdb tests are mainly intended for developers to test the kgdb | ||
285 | internals as well as a tool for developing a new kgdb architecture | ||
286 | specific implementation. These tests are not really for end users | ||
287 | of the Linux kernel. The primary source of documentation would be | ||
288 | to look in the drivers/misc/kgdbts.c file. | ||
289 | </para> | ||
290 | <para> | ||
291 | The kgdb test suite can also be configured at compile time to run | ||
292 | the core set of tests by setting the kernel config parameter | ||
293 | KGDB_TESTS_ON_BOOT. This particular option is aimed at automated | ||
294 | regression testing and does not require modifying the kernel boot | ||
295 | config arguments. If this is turned on, the kgdb test suite can | ||
296 | be disabled by specifying "kgdbts=" as a kernel boot argument. | ||
297 | </para> | ||
298 | </chapter> | ||
299 | <chapter id="CommonBackEndReq"> | ||
300 | <title>KGDB Internals</title> | ||
301 | <sect1 id="kgdbArchitecture"> | ||
302 | <title>Architecture Specifics</title> | ||
303 | <para> | ||
304 | Kgdb is organized into three basic components: | ||
305 | <orderedlist> | ||
306 | <listitem><para>kgdb core</para> | ||
307 | <para> | ||
308 | The kgdb core is found in kernel/kgdb.c. It contains: | ||
309 | <itemizedlist> | ||
310 | <listitem><para>All the logic to implement the gdb serial protocol</para></listitem> | ||
311 | <listitem><para>A generic OS exception handler which includes sync'ing the processors into a stopped state on an multi cpu system.</para></listitem> | ||
312 | <listitem><para>The API to talk to the kgdb I/O drivers</para></listitem> | ||
313 | <listitem><para>The API to make calls to the arch specific kgdb implementation</para></listitem> | ||
314 | <listitem><para>The logic to perform safe memory reads and writes to memory while using the debugger</para></listitem> | ||
315 | <listitem><para>A full implementation for software breakpoints unless overridden by the arch</para></listitem> | ||
316 | </itemizedlist> | ||
317 | </para> | ||
318 | </listitem> | ||
319 | <listitem><para>kgdb arch specific implementation</para> | ||
320 | <para> | ||
321 | This implementation is generally found in arch/*/kernel/kgdb.c. | ||
322 | As an example, arch/x86/kernel/kgdb.c contains the specifics to | ||
323 | implement HW breakpoint as well as the initialization to | ||
324 | dynamically register and unregister for the trap handlers on | ||
325 | this architecture. The arch specific portion implements: | ||
326 | <itemizedlist> | ||
327 | <listitem><para>contains an arch specific trap catcher which | ||
328 | invokes kgdb_handle_exception() to start kgdb about doing its | ||
329 | work</para></listitem> | ||
330 | <listitem><para>translation to and from gdb specific packet format to pt_regs</para></listitem> | ||
331 | <listitem><para>Registration and unregistration of architecture specific trap hooks</para></listitem> | ||
332 | <listitem><para>Any special exception handling and cleanup</para></listitem> | ||
333 | <listitem><para>NMI exception handling and cleanup</para></listitem> | ||
334 | <listitem><para>(optional)HW breakpoints</para></listitem> | ||
335 | </itemizedlist> | ||
336 | </para> | ||
337 | </listitem> | ||
338 | <listitem><para>kgdb I/O driver</para> | ||
339 | <para> | ||
340 | Each kgdb I/O driver has to provide an implemenation for the following: | ||
341 | <itemizedlist> | ||
342 | <listitem><para>configuration via builtin or module</para></listitem> | ||
343 | <listitem><para>dynamic configuration and kgdb hook registration calls</para></listitem> | ||
344 | <listitem><para>read and write character interface</para></listitem> | ||
345 | <listitem><para>A cleanup handler for unconfiguring from the kgdb core</para></listitem> | ||
346 | <listitem><para>(optional) Early debug methodology</para></listitem> | ||
347 | </itemizedlist> | ||
348 | Any given kgdb I/O driver has to operate very closely with the | ||
349 | hardware and must do it in such a way that does not enable | ||
350 | interrupts or change other parts of the system context without | ||
351 | completely restoring them. The kgdb core will repeatedly "poll" | ||
352 | a kgdb I/O driver for characters when it needs input. The I/O | ||
353 | driver is expected to return immediately if there is no data | ||
354 | available. Doing so allows for the future possibility to touch | ||
355 | watch dog hardware in such a way as to have a target system not | ||
356 | reset when these are enabled. | ||
357 | </para> | ||
358 | </listitem> | ||
359 | </orderedlist> | ||
360 | </para> | ||
361 | <para> | ||
362 | If you are intent on adding kgdb architecture specific support | ||
363 | for a new architecture, the architecture should define | ||
364 | <constant>HAVE_ARCH_KGDB</constant> in the architecture specific | ||
365 | Kconfig file. This will enable kgdb for the architecture, and | ||
366 | at that point you must create an architecture specific kgdb | ||
367 | implementation. | ||
368 | </para> | ||
369 | <para> | ||
370 | There are a few flags which must be set on every architecture in | ||
371 | their <asm/kgdb.h> file. These are: | ||
372 | <itemizedlist> | ||
373 | <listitem> | ||
374 | <para> | ||
375 | NUMREGBYTES: The size in bytes of all of the registers, so | ||
376 | that we can ensure they will all fit into a packet. | ||
377 | </para> | ||
378 | <para> | ||
379 | BUFMAX: The size in bytes of the buffer GDB will read into. | ||
380 | This must be larger than NUMREGBYTES. | ||
381 | </para> | ||
382 | <para> | ||
383 | CACHE_FLUSH_IS_SAFE: Set to 1 if it is always safe to call | ||
384 | flush_cache_range or flush_icache_range. On some architectures, | ||
385 | these functions may not be safe to call on SMP since we keep other | ||
386 | CPUs in a holding pattern. | ||
387 | </para> | ||
388 | </listitem> | ||
389 | </itemizedlist> | ||
390 | </para> | ||
391 | <para> | ||
392 | There are also the following functions for the common backend, | ||
393 | found in kernel/kgdb.c, that must be supplied by the | ||
394 | architecture-specific backend unless marked as (optional), in | ||
395 | which case a default function maybe used if the architecture | ||
396 | does not need to provide a specific implementation. | ||
397 | </para> | ||
398 | !Iinclude/linux/kgdb.h | ||
399 | </sect1> | ||
400 | <sect1 id="kgdbocDesign"> | ||
401 | <title>kgdboc internals</title> | ||
402 | <para> | ||
403 | The kgdboc driver is actually a very thin driver that relies on the | ||
404 | underlying low level to the hardware driver having "polling hooks" | ||
405 | which the to which the tty driver is attached. In the initial | ||
406 | implementation of kgdboc it the serial_core was changed to expose a | ||
407 | low level uart hook for doing polled mode reading and writing of a | ||
408 | single character while in an atomic context. When kgdb makes an I/O | ||
409 | request to the debugger, kgdboc invokes a call back in the serial | ||
410 | core which in turn uses the call back in the uart driver. It is | ||
411 | certainly possible to extend kgdboc to work with non-uart based | ||
412 | consoles in the future. | ||
413 | </para> | ||
414 | <para> | ||
415 | When using kgdboc with a uart, the uart driver must implement two callbacks in the <constant>struct uart_ops</constant>. Example from drivers/8250.c:<programlisting> | ||
416 | #ifdef CONFIG_CONSOLE_POLL | ||
417 | .poll_get_char = serial8250_get_poll_char, | ||
418 | .poll_put_char = serial8250_put_poll_char, | ||
419 | #endif | ||
420 | </programlisting> | ||
421 | Any implementation specifics around creating a polling driver use the | ||
422 | <constant>#ifdef CONFIG_CONSOLE_POLL</constant>, as shown above. | ||
423 | Keep in mind that polling hooks have to be implemented in such a way | ||
424 | that they can be called from an atomic context and have to restore | ||
425 | the state of the uart chip on return such that the system can return | ||
426 | to normal when the debugger detaches. You need to be very careful | ||
427 | with any kind of lock you consider, because failing here is most | ||
428 | going to mean pressing the reset button. | ||
429 | </para> | ||
430 | </sect1> | ||
431 | </chapter> | ||
432 | <chapter id="credits"> | ||
433 | <title>Credits</title> | ||
434 | <para> | ||
435 | The following people have contributed to this document: | ||
436 | <orderedlist> | ||
437 | <listitem><para>Amit Kale<email>amitkale@linsyssoft.com</email></para></listitem> | ||
438 | <listitem><para>Tom Rini<email>trini@kernel.crashing.org</email></para></listitem> | ||
439 | </orderedlist> | ||
440 | In March 2008 this document was completely rewritten by: | ||
441 | <itemizedlist> | ||
442 | <listitem><para>Jason Wessel<email>jason.wessel@windriver.com</email></para></listitem> | ||
443 | </itemizedlist> | ||
444 | </para> | ||
445 | </chapter> | ||
446 | </book> | ||
447 | |||
diff --git a/Documentation/DocBook/mac80211.tmpl b/Documentation/DocBook/mac80211.tmpl new file mode 100644 index 000000000000..b651e0a4b1c0 --- /dev/null +++ b/Documentation/DocBook/mac80211.tmpl | |||
@@ -0,0 +1,335 @@ | |||
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="mac80211-developers-guide"> | ||
6 | <bookinfo> | ||
7 | <title>The mac80211 subsystem for kernel developers</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Johannes</firstname> | ||
12 | <surname>Berg</surname> | ||
13 | <affiliation> | ||
14 | <address><email>johannes@sipsolutions.net</email></address> | ||
15 | </affiliation> | ||
16 | </author> | ||
17 | </authorgroup> | ||
18 | |||
19 | <copyright> | ||
20 | <year>2007</year> | ||
21 | <year>2008</year> | ||
22 | <holder>Johannes Berg</holder> | ||
23 | </copyright> | ||
24 | |||
25 | <legalnotice> | ||
26 | <para> | ||
27 | This documentation is free software; you can redistribute | ||
28 | it and/or modify it under the terms of the GNU General Public | ||
29 | License version 2 as published by the Free Software Foundation. | ||
30 | </para> | ||
31 | |||
32 | <para> | ||
33 | This documentation is distributed in the hope that it will be | ||
34 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
35 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
36 | See the GNU General Public License for more details. | ||
37 | </para> | ||
38 | |||
39 | <para> | ||
40 | You should have received a copy of the GNU General Public | ||
41 | License along with this documentation; if not, write to the Free | ||
42 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
43 | MA 02111-1307 USA | ||
44 | </para> | ||
45 | |||
46 | <para> | ||
47 | For more details see the file COPYING in the source | ||
48 | distribution of Linux. | ||
49 | </para> | ||
50 | </legalnotice> | ||
51 | |||
52 | <abstract> | ||
53 | !Pinclude/net/mac80211.h Introduction | ||
54 | !Pinclude/net/mac80211.h Warning | ||
55 | </abstract> | ||
56 | </bookinfo> | ||
57 | |||
58 | <toc></toc> | ||
59 | |||
60 | <!-- | ||
61 | Generally, this document shall be ordered by increasing complexity. | ||
62 | It is important to note that readers should be able to read only | ||
63 | the first few sections to get a working driver and only advanced | ||
64 | usage should require reading the full document. | ||
65 | --> | ||
66 | |||
67 | <part> | ||
68 | <title>The basic mac80211 driver interface</title> | ||
69 | <partintro> | ||
70 | <para> | ||
71 | You should read and understand the information contained | ||
72 | within this part of the book while implementing a driver. | ||
73 | In some chapters, advanced usage is noted, that may be | ||
74 | skipped at first. | ||
75 | </para> | ||
76 | <para> | ||
77 | This part of the book only covers station and monitor mode | ||
78 | functionality, additional information required to implement | ||
79 | the other modes is covered in the second part of the book. | ||
80 | </para> | ||
81 | </partintro> | ||
82 | |||
83 | <chapter id="basics"> | ||
84 | <title>Basic hardware handling</title> | ||
85 | <para>TBD</para> | ||
86 | <para> | ||
87 | This chapter shall contain information on getting a hw | ||
88 | struct allocated and registered with mac80211. | ||
89 | </para> | ||
90 | <para> | ||
91 | Since it is required to allocate rates/modes before registering | ||
92 | a hw struct, this chapter shall also contain information on setting | ||
93 | up the rate/mode structs. | ||
94 | </para> | ||
95 | <para> | ||
96 | Additionally, some discussion about the callbacks and | ||
97 | the general programming model should be in here, including | ||
98 | the definition of ieee80211_ops which will be referred to | ||
99 | a lot. | ||
100 | </para> | ||
101 | <para> | ||
102 | Finally, a discussion of hardware capabilities should be done | ||
103 | with references to other parts of the book. | ||
104 | </para> | ||
105 | <!-- intentionally multiple !F lines to get proper order --> | ||
106 | !Finclude/net/mac80211.h ieee80211_hw | ||
107 | !Finclude/net/mac80211.h ieee80211_hw_flags | ||
108 | !Finclude/net/mac80211.h SET_IEEE80211_DEV | ||
109 | !Finclude/net/mac80211.h SET_IEEE80211_PERM_ADDR | ||
110 | !Finclude/net/mac80211.h ieee80211_ops | ||
111 | !Finclude/net/mac80211.h ieee80211_alloc_hw | ||
112 | !Finclude/net/mac80211.h ieee80211_register_hw | ||
113 | !Finclude/net/mac80211.h ieee80211_get_tx_led_name | ||
114 | !Finclude/net/mac80211.h ieee80211_get_rx_led_name | ||
115 | !Finclude/net/mac80211.h ieee80211_get_assoc_led_name | ||
116 | !Finclude/net/mac80211.h ieee80211_get_radio_led_name | ||
117 | !Finclude/net/mac80211.h ieee80211_unregister_hw | ||
118 | !Finclude/net/mac80211.h ieee80211_free_hw | ||
119 | </chapter> | ||
120 | |||
121 | <chapter id="phy-handling"> | ||
122 | <title>PHY configuration</title> | ||
123 | <para>TBD</para> | ||
124 | <para> | ||
125 | This chapter should describe PHY handling including | ||
126 | start/stop callbacks and the various structures used. | ||
127 | </para> | ||
128 | !Finclude/net/mac80211.h ieee80211_conf | ||
129 | !Finclude/net/mac80211.h ieee80211_conf_flags | ||
130 | </chapter> | ||
131 | |||
132 | <chapter id="iface-handling"> | ||
133 | <title>Virtual interfaces</title> | ||
134 | <para>TBD</para> | ||
135 | <para> | ||
136 | This chapter should describe virtual interface basics | ||
137 | that are relevant to the driver (VLANs, MGMT etc are not.) | ||
138 | It should explain the use of the add_iface/remove_iface | ||
139 | callbacks as well as the interface configuration callbacks. | ||
140 | </para> | ||
141 | <para>Things related to AP mode should be discussed there.</para> | ||
142 | <para> | ||
143 | Things related to supporting multiple interfaces should be | ||
144 | in the appropriate chapter, a BIG FAT note should be here about | ||
145 | this though and the recommendation to allow only a single | ||
146 | interface in STA mode at first! | ||
147 | </para> | ||
148 | !Finclude/net/mac80211.h ieee80211_if_types | ||
149 | !Finclude/net/mac80211.h ieee80211_if_init_conf | ||
150 | !Finclude/net/mac80211.h ieee80211_if_conf | ||
151 | </chapter> | ||
152 | |||
153 | <chapter id="rx-tx"> | ||
154 | <title>Receive and transmit processing</title> | ||
155 | <sect1> | ||
156 | <title>what should be here</title> | ||
157 | <para>TBD</para> | ||
158 | <para> | ||
159 | This should describe the receive and transmit | ||
160 | paths in mac80211/the drivers as well as | ||
161 | transmit status handling. | ||
162 | </para> | ||
163 | </sect1> | ||
164 | <sect1> | ||
165 | <title>Frame format</title> | ||
166 | !Pinclude/net/mac80211.h Frame format | ||
167 | </sect1> | ||
168 | <sect1> | ||
169 | <title>Alignment issues</title> | ||
170 | <para>TBD</para> | ||
171 | </sect1> | ||
172 | <sect1> | ||
173 | <title>Calling into mac80211 from interrupts</title> | ||
174 | !Pinclude/net/mac80211.h Calling mac80211 from interrupts | ||
175 | </sect1> | ||
176 | <sect1> | ||
177 | <title>functions/definitions</title> | ||
178 | !Finclude/net/mac80211.h ieee80211_rx_status | ||
179 | !Finclude/net/mac80211.h mac80211_rx_flags | ||
180 | !Finclude/net/mac80211.h ieee80211_tx_control | ||
181 | !Finclude/net/mac80211.h ieee80211_tx_status_flags | ||
182 | !Finclude/net/mac80211.h ieee80211_rx | ||
183 | !Finclude/net/mac80211.h ieee80211_rx_irqsafe | ||
184 | !Finclude/net/mac80211.h ieee80211_tx_status | ||
185 | !Finclude/net/mac80211.h ieee80211_tx_status_irqsafe | ||
186 | !Finclude/net/mac80211.h ieee80211_rts_get | ||
187 | !Finclude/net/mac80211.h ieee80211_rts_duration | ||
188 | !Finclude/net/mac80211.h ieee80211_ctstoself_get | ||
189 | !Finclude/net/mac80211.h ieee80211_ctstoself_duration | ||
190 | !Finclude/net/mac80211.h ieee80211_generic_frame_duration | ||
191 | !Finclude/net/mac80211.h ieee80211_get_hdrlen_from_skb | ||
192 | !Finclude/net/mac80211.h ieee80211_get_hdrlen | ||
193 | !Finclude/net/mac80211.h ieee80211_wake_queue | ||
194 | !Finclude/net/mac80211.h ieee80211_stop_queue | ||
195 | !Finclude/net/mac80211.h ieee80211_start_queues | ||
196 | !Finclude/net/mac80211.h ieee80211_stop_queues | ||
197 | !Finclude/net/mac80211.h ieee80211_wake_queues | ||
198 | </sect1> | ||
199 | </chapter> | ||
200 | |||
201 | <chapter id="filters"> | ||
202 | <title>Frame filtering</title> | ||
203 | !Pinclude/net/mac80211.h Frame filtering | ||
204 | !Finclude/net/mac80211.h ieee80211_filter_flags | ||
205 | </chapter> | ||
206 | </part> | ||
207 | |||
208 | <part id="advanced"> | ||
209 | <title>Advanced driver interface</title> | ||
210 | <partintro> | ||
211 | <para> | ||
212 | Information contained within this part of the book is | ||
213 | of interest only for advanced interaction of mac80211 | ||
214 | with drivers to exploit more hardware capabilities and | ||
215 | improve performance. | ||
216 | </para> | ||
217 | </partintro> | ||
218 | |||
219 | <chapter id="hardware-crypto-offload"> | ||
220 | <title>Hardware crypto acceleration</title> | ||
221 | !Pinclude/net/mac80211.h Hardware crypto acceleration | ||
222 | <!-- intentionally multiple !F lines to get proper order --> | ||
223 | !Finclude/net/mac80211.h set_key_cmd | ||
224 | !Finclude/net/mac80211.h ieee80211_key_conf | ||
225 | !Finclude/net/mac80211.h ieee80211_key_alg | ||
226 | !Finclude/net/mac80211.h ieee80211_key_flags | ||
227 | </chapter> | ||
228 | |||
229 | <chapter id="qos"> | ||
230 | <title>Multiple queues and QoS support</title> | ||
231 | <para>TBD</para> | ||
232 | !Finclude/net/mac80211.h ieee80211_tx_queue_params | ||
233 | !Finclude/net/mac80211.h ieee80211_tx_queue_stats_data | ||
234 | !Finclude/net/mac80211.h ieee80211_tx_queue | ||
235 | </chapter> | ||
236 | |||
237 | <chapter id="AP"> | ||
238 | <title>Access point mode support</title> | ||
239 | <para>TBD</para> | ||
240 | <para>Some parts of the if_conf should be discussed here instead</para> | ||
241 | <para> | ||
242 | Insert notes about VLAN interfaces with hw crypto here or | ||
243 | in the hw crypto chapter. | ||
244 | </para> | ||
245 | !Finclude/net/mac80211.h ieee80211_get_buffered_bc | ||
246 | !Finclude/net/mac80211.h ieee80211_beacon_get | ||
247 | </chapter> | ||
248 | |||
249 | <chapter id="multi-iface"> | ||
250 | <title>Supporting multiple virtual interfaces</title> | ||
251 | <para>TBD</para> | ||
252 | <para> | ||
253 | Note: WDS with identical MAC address should almost always be OK | ||
254 | </para> | ||
255 | <para> | ||
256 | Insert notes about having multiple virtual interfaces with | ||
257 | different MAC addresses here, note which configurations are | ||
258 | supported by mac80211, add notes about supporting hw crypto | ||
259 | with it. | ||
260 | </para> | ||
261 | </chapter> | ||
262 | |||
263 | <chapter id="hardware-scan-offload"> | ||
264 | <title>Hardware scan offload</title> | ||
265 | <para>TBD</para> | ||
266 | !Finclude/net/mac80211.h ieee80211_scan_completed | ||
267 | </chapter> | ||
268 | </part> | ||
269 | |||
270 | <part id="rate-control"> | ||
271 | <title>Rate control interface</title> | ||
272 | <partintro> | ||
273 | <para>TBD</para> | ||
274 | <para> | ||
275 | This part of the book describes the rate control algorithm | ||
276 | interface and how it relates to mac80211 and drivers. | ||
277 | </para> | ||
278 | </partintro> | ||
279 | <chapter id="dummy"> | ||
280 | <title>dummy chapter</title> | ||
281 | <para>TBD</para> | ||
282 | </chapter> | ||
283 | </part> | ||
284 | |||
285 | <part id="internal"> | ||
286 | <title>Internals</title> | ||
287 | <partintro> | ||
288 | <para>TBD</para> | ||
289 | <para> | ||
290 | This part of the book describes mac80211 internals. | ||
291 | </para> | ||
292 | </partintro> | ||
293 | |||
294 | <chapter id="key-handling"> | ||
295 | <title>Key handling</title> | ||
296 | <sect1> | ||
297 | <title>Key handling basics</title> | ||
298 | !Pnet/mac80211/key.c Key handling basics | ||
299 | </sect1> | ||
300 | <sect1> | ||
301 | <title>MORE TBD</title> | ||
302 | <para>TBD</para> | ||
303 | </sect1> | ||
304 | </chapter> | ||
305 | |||
306 | <chapter id="rx-processing"> | ||
307 | <title>Receive processing</title> | ||
308 | <para>TBD</para> | ||
309 | </chapter> | ||
310 | |||
311 | <chapter id="tx-processing"> | ||
312 | <title>Transmit processing</title> | ||
313 | <para>TBD</para> | ||
314 | </chapter> | ||
315 | |||
316 | <chapter id="sta-info"> | ||
317 | <title>Station info handling</title> | ||
318 | <sect1> | ||
319 | <title>Programming information</title> | ||
320 | !Fnet/mac80211/sta_info.h sta_info | ||
321 | !Fnet/mac80211/sta_info.h ieee80211_sta_info_flags | ||
322 | </sect1> | ||
323 | <sect1> | ||
324 | <title>STA information lifetime rules</title> | ||
325 | !Pnet/mac80211/sta_info.c STA information lifetime rules | ||
326 | </sect1> | ||
327 | </chapter> | ||
328 | |||
329 | <chapter id="synchronisation"> | ||
330 | <title>Synchronisation</title> | ||
331 | <para>TBD</para> | ||
332 | <para>Locking, lots of RCU</para> | ||
333 | </chapter> | ||
334 | </part> | ||
335 | </book> | ||
diff --git a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl index d4188d4ff535..eeff19ca831b 100644 --- a/Documentation/DocBook/writing_usb_driver.tmpl +++ b/Documentation/DocBook/writing_usb_driver.tmpl | |||
@@ -100,8 +100,8 @@ | |||
100 | useful documents, at the USB home page (see Resources). An excellent | 100 | useful documents, at the USB home page (see Resources). An excellent |
101 | introduction to the Linux USB subsystem can be found at the USB Working | 101 | introduction to the Linux USB subsystem can be found at the USB Working |
102 | Devices List (see Resources). It explains how the Linux USB subsystem is | 102 | Devices List (see Resources). It explains how the Linux USB subsystem is |
103 | structured and introduces the reader to the concept of USB urbs, which | 103 | structured and introduces the reader to the concept of USB urbs |
104 | are essential to USB drivers. | 104 | (USB Request Blocks), which are essential to USB drivers. |
105 | </para> | 105 | </para> |
106 | <para> | 106 | <para> |
107 | The first thing a Linux USB driver needs to do is register itself with | 107 | The first thing a Linux USB driver needs to do is register itself with |
@@ -162,8 +162,8 @@ static int __init usb_skel_init(void) | |||
162 | module_init(usb_skel_init); | 162 | module_init(usb_skel_init); |
163 | </programlisting> | 163 | </programlisting> |
164 | <para> | 164 | <para> |
165 | When the driver is unloaded from the system, it needs to unregister | 165 | When the driver is unloaded from the system, it needs to deregister |
166 | itself with the USB subsystem. This is done with the usb_unregister | 166 | itself with the USB subsystem. This is done with the usb_deregister |
167 | function: | 167 | function: |
168 | </para> | 168 | </para> |
169 | <programlisting> | 169 | <programlisting> |
@@ -232,7 +232,7 @@ static int skel_probe(struct usb_interface *interface, | |||
232 | were passed to the USB subsystem will be called from a user program trying | 232 | were passed to the USB subsystem will be called from a user program trying |
233 | to talk to the device. The first function called will be open, as the | 233 | to talk to the device. The first function called will be open, as the |
234 | program tries to open the device for I/O. We increment our private usage | 234 | program tries to open the device for I/O. We increment our private usage |
235 | count and save off a pointer to our internal structure in the file | 235 | count and save a pointer to our internal structure in the file |
236 | structure. This is done so that future calls to file operations will | 236 | structure. This is done so that future calls to file operations will |
237 | enable the driver to determine which device the user is addressing. All | 237 | enable the driver to determine which device the user is addressing. All |
238 | of this is done with the following code: | 238 | of this is done with the following code: |
@@ -252,8 +252,8 @@ file->private_data = dev; | |||
252 | send to the device based on the size of the write urb it has created (this | 252 | send to the device based on the size of the write urb it has created (this |
253 | size depends on the size of the bulk out end point that the device has). | 253 | size depends on the size of the bulk out end point that the device has). |
254 | Then it copies the data from user space to kernel space, points the urb to | 254 | Then it copies the data from user space to kernel space, points the urb to |
255 | the data and submits the urb to the USB subsystem. This can be shown in | 255 | the data and submits the urb to the USB subsystem. This can be seen in |
256 | he following code: | 256 | the following code: |
257 | </para> | 257 | </para> |
258 | <programlisting> | 258 | <programlisting> |
259 | /* we can only write as much as 1 urb will hold */ | 259 | /* we can only write as much as 1 urb will hold */ |
diff --git a/Documentation/PCI/00-INDEX b/Documentation/PCI/00-INDEX new file mode 100644 index 000000000000..49f43946c6b6 --- /dev/null +++ b/Documentation/PCI/00-INDEX | |||
@@ -0,0 +1,12 @@ | |||
1 | 00-INDEX | ||
2 | - this file | ||
3 | PCI-DMA-mapping.txt | ||
4 | - info for PCI drivers using DMA portably across all platforms | ||
5 | PCIEBUS-HOWTO.txt | ||
6 | - a guide describing the PCI Express Port Bus driver | ||
7 | pci-error-recovery.txt | ||
8 | - info on PCI error recovery | ||
9 | pci.txt | ||
10 | - info on the PCI subsystem for device driver authors | ||
11 | pcieaer-howto.txt | ||
12 | - the PCI Express Advanced Error Reporting Driver Guide HOWTO | ||
diff --git a/Documentation/PCIEBUS-HOWTO.txt b/Documentation/PCI/PCIEBUS-HOWTO.txt index c93f42a74d7e..9a07e38631b0 100644 --- a/Documentation/PCIEBUS-HOWTO.txt +++ b/Documentation/PCI/PCIEBUS-HOWTO.txt | |||
@@ -56,9 +56,9 @@ advantages of using the PCI Express Port Bus driver are listed below: | |||
56 | 56 | ||
57 | - Allow service drivers implemented in an independent | 57 | - Allow service drivers implemented in an independent |
58 | staged approach. | 58 | staged approach. |
59 | 59 | ||
60 | - Allow one service driver to run on multiple PCI-PCI Bridge | 60 | - Allow one service driver to run on multiple PCI-PCI Bridge |
61 | Port devices. | 61 | Port devices. |
62 | 62 | ||
63 | - Manage and distribute resources of a PCI-PCI Bridge Port | 63 | - Manage and distribute resources of a PCI-PCI Bridge Port |
64 | device to requested service drivers. | 64 | device to requested service drivers. |
@@ -82,7 +82,7 @@ Model requires some minimal changes on existing service drivers that | |||
82 | imposes no impact on the functionality of existing service drivers. | 82 | imposes no impact on the functionality of existing service drivers. |
83 | 83 | ||
84 | A service driver is required to use the two APIs shown below to | 84 | A service driver is required to use the two APIs shown below to |
85 | register its service with the PCI Express Port Bus driver (see | 85 | register its service with the PCI Express Port Bus driver (see |
86 | section 5.2.1 & 5.2.2). It is important that a service driver | 86 | section 5.2.1 & 5.2.2). It is important that a service driver |
87 | initializes the pcie_port_service_driver data structure, included in | 87 | initializes the pcie_port_service_driver data structure, included in |
88 | header file /include/linux/pcieport_if.h, before calling these APIs. | 88 | header file /include/linux/pcieport_if.h, before calling these APIs. |
@@ -137,7 +137,7 @@ driver. | |||
137 | static int __init aerdrv_service_init(void) | 137 | static int __init aerdrv_service_init(void) |
138 | { | 138 | { |
139 | int retval = 0; | 139 | int retval = 0; |
140 | 140 | ||
141 | retval = pcie_port_service_register(&root_aerdrv); | 141 | retval = pcie_port_service_register(&root_aerdrv); |
142 | if (!retval) { | 142 | if (!retval) { |
143 | /* | 143 | /* |
@@ -147,7 +147,7 @@ static int __init aerdrv_service_init(void) | |||
147 | return retval; | 147 | return retval; |
148 | } | 148 | } |
149 | 149 | ||
150 | static void __exit aerdrv_service_exit(void) | 150 | static void __exit aerdrv_service_exit(void) |
151 | { | 151 | { |
152 | pcie_port_service_unregister(&root_aerdrv); | 152 | pcie_port_service_unregister(&root_aerdrv); |
153 | } | 153 | } |
@@ -175,7 +175,7 @@ same physical Root Port. Both service drivers call pci_enable_msi to | |||
175 | request MSI based interrupts. A service driver may not know whether | 175 | request MSI based interrupts. A service driver may not know whether |
176 | any other service drivers have run on this Root Port. If either one | 176 | any other service drivers have run on this Root Port. If either one |
177 | of them calls pci_disable_msi, it puts the other service driver | 177 | of them calls pci_disable_msi, it puts the other service driver |
178 | in a wrong interrupt mode. | 178 | in a wrong interrupt mode. |
179 | 179 | ||
180 | To avoid this situation all service drivers are not permitted to | 180 | To avoid this situation all service drivers are not permitted to |
181 | switch interrupt mode on its device. The PCI Express Port Bus driver | 181 | switch interrupt mode on its device. The PCI Express Port Bus driver |
diff --git a/Documentation/pci-error-recovery.txt b/Documentation/PCI/pci-error-recovery.txt index 6650af432523..6650af432523 100644 --- a/Documentation/pci-error-recovery.txt +++ b/Documentation/PCI/pci-error-recovery.txt | |||
diff --git a/Documentation/pci.txt b/Documentation/PCI/pci.txt index d2c2e6e2b224..8d4dc6250c58 100644 --- a/Documentation/pci.txt +++ b/Documentation/PCI/pci.txt | |||
@@ -119,7 +119,7 @@ initialization with a pointer to a structure describing the driver | |||
119 | the power state of a device before reboot. | 119 | the power state of a device before reboot. |
120 | e.g. drivers/net/e100.c. | 120 | e.g. drivers/net/e100.c. |
121 | 121 | ||
122 | err_handler See Documentation/pci-error-recovery.txt | 122 | err_handler See Documentation/PCI/pci-error-recovery.txt |
123 | 123 | ||
124 | 124 | ||
125 | The ID table is an array of struct pci_device_id entries ending with an | 125 | The ID table is an array of struct pci_device_id entries ending with an |
diff --git a/Documentation/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt index d5da86170106..16c251230c82 100644 --- a/Documentation/pcieaer-howto.txt +++ b/Documentation/PCI/pcieaer-howto.txt | |||
@@ -13,7 +13,7 @@ Reporting (AER) driver and provides information on how to use it, as | |||
13 | well as how to enable the drivers of endpoint devices to conform with | 13 | well as how to enable the drivers of endpoint devices to conform with |
14 | PCI Express AER driver. | 14 | PCI Express AER driver. |
15 | 15 | ||
16 | 1.2 Copyright © Intel Corporation 2006. | 16 | 1.2 Copyright © Intel Corporation 2006. |
17 | 17 | ||
18 | 1.3 What is the PCI Express AER Driver? | 18 | 1.3 What is the PCI Express AER Driver? |
19 | 19 | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 1fc4e7144dce..9c93a03ea33b 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -183,7 +183,7 @@ Even if the maintainer did not respond in step #4, make sure to ALWAYS | |||
183 | copy the maintainer when you change their code. | 183 | copy the maintainer when you change their code. |
184 | 184 | ||
185 | For small patches you may want to CC the Trivial Patch Monkey | 185 | For small patches you may want to CC the Trivial Patch Monkey |
186 | trivial@kernel.org managed by Adrian Bunk; which collects "trivial" | 186 | trivial@kernel.org managed by Jesper Juhl; which collects "trivial" |
187 | patches. Trivial patches must qualify for one of the following rules: | 187 | patches. Trivial patches must qualify for one of the following rules: |
188 | Spelling fixes in documentation | 188 | Spelling fixes in documentation |
189 | Spelling fixes which could break grep(1) | 189 | Spelling fixes which could break grep(1) |
@@ -196,7 +196,7 @@ patches. Trivial patches must qualify for one of the following rules: | |||
196 | since people copy, as long as it's trivial) | 196 | since people copy, as long as it's trivial) |
197 | Any fix by the author/maintainer of the file (ie. patch monkey | 197 | Any fix by the author/maintainer of the file (ie. patch monkey |
198 | in re-transmission mode) | 198 | in re-transmission mode) |
199 | URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/> | 199 | URL: <http://www.kernel.org/pub/linux/kernel/people/juhl/trivial/> |
200 | 200 | ||
201 | 201 | ||
202 | 202 | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/NAND.txt b/Documentation/arm/Samsung-S3C24XX/NAND.txt new file mode 100644 index 000000000000..bc478a3409b8 --- /dev/null +++ b/Documentation/arm/Samsung-S3C24XX/NAND.txt | |||
@@ -0,0 +1,30 @@ | |||
1 | S3C24XX NAND Support | ||
2 | ==================== | ||
3 | |||
4 | Introduction | ||
5 | ------------ | ||
6 | |||
7 | Small Page NAND | ||
8 | --------------- | ||
9 | |||
10 | The driver uses a 512 byte (1 page) ECC code for this setup. The | ||
11 | ECC code is not directly compatible with the default kernel ECC | ||
12 | code, so the driver enforces its own OOB layout and ECC parameters | ||
13 | |||
14 | Large Page NAND | ||
15 | --------------- | ||
16 | |||
17 | The driver is capable of handling NAND flash with a 2KiB page | ||
18 | size, with support for hardware ECC generation and correction. | ||
19 | |||
20 | Unlike the 512byte page mode, the driver generates ECC data for | ||
21 | each 256 byte block in an 2KiB page. This means that more than | ||
22 | one error in a page can be rectified. It also means that the | ||
23 | OOB layout remains the default kernel layout for these flashes. | ||
24 | |||
25 | |||
26 | Document Author | ||
27 | --------------- | ||
28 | |||
29 | Ben Dooks, Copyright 2007 Simtec Electronics | ||
30 | |||
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt index c31b76fa66c4..d04e1e30c47f 100644 --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt | |||
@@ -156,6 +156,8 @@ NAND | |||
156 | controller. If there are any problems the latest linux-mtd | 156 | controller. If there are any problems the latest linux-mtd |
157 | code can be found from http://www.linux-mtd.infradead.org/ | 157 | code can be found from http://www.linux-mtd.infradead.org/ |
158 | 158 | ||
159 | For more information see Documentation/arm/Samsung-S3C24XX/NAND.txt | ||
160 | |||
159 | 161 | ||
160 | Serial | 162 | Serial |
161 | ------ | 163 | ------ |
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 93f223b9723f..4dbb8be1c991 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -1097,7 +1097,7 @@ lock themselves, if required. Drivers that explicitly used the | |||
1097 | io_request_lock for serialization need to be modified accordingly. | 1097 | io_request_lock for serialization need to be modified accordingly. |
1098 | Usually it's as easy as adding a global lock: | 1098 | Usually it's as easy as adding a global lock: |
1099 | 1099 | ||
1100 | static spinlock_t my_driver_lock = SPIN_LOCK_UNLOCKED; | 1100 | static DEFINE_SPINLOCK(my_driver_lock); |
1101 | 1101 | ||
1102 | and passing the address to that lock to blk_init_queue(). | 1102 | and passing the address to that lock to blk_init_queue(). |
1103 | 1103 | ||
diff --git a/Documentation/cdrom/cdrom-standard.tex b/Documentation/cdrom/cdrom-standard.tex index c713aeb020c4..c06233fe52ac 100644 --- a/Documentation/cdrom/cdrom-standard.tex +++ b/Documentation/cdrom/cdrom-standard.tex | |||
@@ -777,7 +777,7 @@ Note that a driver must have one static structure, $<device>_dops$, while | |||
777 | it may have as many structures $<device>_info$ as there are minor devices | 777 | it may have as many structures $<device>_info$ as there are minor devices |
778 | active. $Register_cdrom()$ builds a linked list from these. | 778 | active. $Register_cdrom()$ builds a linked list from these. |
779 | 779 | ||
780 | \subsection{$Int\ unregister_cdrom(struct\ cdrom_device_info * cdi)$} | 780 | \subsection{$Void\ unregister_cdrom(struct\ cdrom_device_info * cdi)$} |
781 | 781 | ||
782 | Unregistering device $cdi$ with minor number $MINOR(cdi\to dev)$ removes | 782 | Unregistering device $cdi$ with minor number $MINOR(cdi\to dev)$ removes |
783 | the minor device from the list. If it was the last registered minor for | 783 | the minor device from the list. If it was the last registered minor for |
diff --git a/Documentation/cli-sti-removal.txt b/Documentation/cli-sti-removal.txt index 0223c9d20331..60932b02fcb3 100644 --- a/Documentation/cli-sti-removal.txt +++ b/Documentation/cli-sti-removal.txt | |||
@@ -43,7 +43,7 @@ would execute while the cli()-ed section is executing. | |||
43 | 43 | ||
44 | but from now on a more direct method of locking has to be used: | 44 | but from now on a more direct method of locking has to be used: |
45 | 45 | ||
46 | spinlock_t driver_lock = SPIN_LOCK_UNLOCKED; | 46 | DEFINE_SPINLOCK(driver_lock); |
47 | struct driver_data; | 47 | struct driver_data; |
48 | 48 | ||
49 | irq_handler (...) | 49 | irq_handler (...) |
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index ad2bb3b3acc1..aa854b9b18cd 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -8,6 +8,7 @@ Portions Copyright (c) 2004-2006 Silicon Graphics, Inc. | |||
8 | Modified by Paul Jackson <pj@sgi.com> | 8 | Modified by Paul Jackson <pj@sgi.com> |
9 | Modified by Christoph Lameter <clameter@sgi.com> | 9 | Modified by Christoph Lameter <clameter@sgi.com> |
10 | Modified by Paul Menage <menage@google.com> | 10 | Modified by Paul Menage <menage@google.com> |
11 | Modified by Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | ||
11 | 12 | ||
12 | CONTENTS: | 13 | CONTENTS: |
13 | ========= | 14 | ========= |
@@ -20,7 +21,8 @@ CONTENTS: | |||
20 | 1.5 What is memory_pressure ? | 21 | 1.5 What is memory_pressure ? |
21 | 1.6 What is memory spread ? | 22 | 1.6 What is memory spread ? |
22 | 1.7 What is sched_load_balance ? | 23 | 1.7 What is sched_load_balance ? |
23 | 1.8 How do I use cpusets ? | 24 | 1.8 What is sched_relax_domain_level ? |
25 | 1.9 How do I use cpusets ? | ||
24 | 2. Usage Examples and Syntax | 26 | 2. Usage Examples and Syntax |
25 | 2.1 Basic Usage | 27 | 2.1 Basic Usage |
26 | 2.2 Adding/removing cpus | 28 | 2.2 Adding/removing cpus |
@@ -497,7 +499,73 @@ the cpuset code to update these sched domains, it compares the new | |||
497 | partition requested with the current, and updates its sched domains, | 499 | partition requested with the current, and updates its sched domains, |
498 | removing the old and adding the new, for each change. | 500 | removing the old and adding the new, for each change. |
499 | 501 | ||
500 | 1.8 How do I use cpusets ? | 502 | |
503 | 1.8 What is sched_relax_domain_level ? | ||
504 | -------------------------------------- | ||
505 | |||
506 | In sched domain, the scheduler migrates tasks in 2 ways; periodic load | ||
507 | balance on tick, and at time of some schedule events. | ||
508 | |||
509 | When a task is woken up, scheduler try to move the task on idle CPU. | ||
510 | For example, if a task A running on CPU X activates another task B | ||
511 | on the same CPU X, and if CPU Y is X's sibling and performing idle, | ||
512 | then scheduler migrate task B to CPU Y so that task B can start on | ||
513 | CPU Y without waiting task A on CPU X. | ||
514 | |||
515 | And if a CPU run out of tasks in its runqueue, the CPU try to pull | ||
516 | extra tasks from other busy CPUs to help them before it is going to | ||
517 | be idle. | ||
518 | |||
519 | Of course it takes some searching cost to find movable tasks and/or | ||
520 | idle CPUs, the scheduler might not search all CPUs in the domain | ||
521 | everytime. In fact, in some architectures, the searching ranges on | ||
522 | events are limited in the same socket or node where the CPU locates, | ||
523 | while the load balance on tick searchs all. | ||
524 | |||
525 | For example, assume CPU Z is relatively far from CPU X. Even if CPU Z | ||
526 | is idle while CPU X and the siblings are busy, scheduler can't migrate | ||
527 | woken task B from X to Z since it is out of its searching range. | ||
528 | As the result, task B on CPU X need to wait task A or wait load balance | ||
529 | on the next tick. For some applications in special situation, waiting | ||
530 | 1 tick may be too long. | ||
531 | |||
532 | The 'sched_relax_domain_level' file allows you to request changing | ||
533 | this searching range as you like. This file takes int value which | ||
534 | indicates size of searching range in levels ideally as follows, | ||
535 | otherwise initial value -1 that indicates the cpuset has no request. | ||
536 | |||
537 | -1 : no request. use system default or follow request of others. | ||
538 | 0 : no search. | ||
539 | 1 : search siblings (hyperthreads in a core). | ||
540 | 2 : search cores in a package. | ||
541 | 3 : search cpus in a node [= system wide on non-NUMA system] | ||
542 | ( 4 : search nodes in a chunk of node [on NUMA system] ) | ||
543 | ( 5~ : search system wide [on NUMA system]) | ||
544 | |||
545 | This file is per-cpuset and affect the sched domain where the cpuset | ||
546 | belongs to. Therefore if the flag 'sched_load_balance' of a cpuset | ||
547 | is disabled, then 'sched_relax_domain_level' have no effect since | ||
548 | there is no sched domain belonging the cpuset. | ||
549 | |||
550 | If multiple cpusets are overlapping and hence they form a single sched | ||
551 | domain, the largest value among those is used. Be careful, if one | ||
552 | requests 0 and others are -1 then 0 is used. | ||
553 | |||
554 | Note that modifying this file will have both good and bad effects, | ||
555 | and whether it is acceptable or not will be depend on your situation. | ||
556 | Don't modify this file if you are not sure. | ||
557 | |||
558 | If your situation is: | ||
559 | - The migration costs between each cpu can be assumed considerably | ||
560 | small(for you) due to your special application's behavior or | ||
561 | special hardware support for CPU cache etc. | ||
562 | - The searching cost doesn't have impact(for you) or you can make | ||
563 | the searching cost enough small by managing cpuset to compact etc. | ||
564 | - The latency is required even it sacrifices cache hit rate etc. | ||
565 | then increasing 'sched_relax_domain_level' would benefit you. | ||
566 | |||
567 | |||
568 | 1.9 How do I use cpusets ? | ||
501 | -------------------------- | 569 | -------------------------- |
502 | 570 | ||
503 | In order to minimize the impact of cpusets on critical kernel | 571 | In order to minimize the impact of cpusets on critical kernel |
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt index c360d4e91b48..59a91e5c6909 100644 --- a/Documentation/debugging-via-ohci1394.txt +++ b/Documentation/debugging-via-ohci1394.txt | |||
@@ -41,15 +41,19 @@ to a working state and enables physical DMA by default for all remote nodes. | |||
41 | This can be turned off by ohci1394's module parameter phys_dma=0. | 41 | This can be turned off by ohci1394's module parameter phys_dma=0. |
42 | 42 | ||
43 | The alternative firewire-ohci driver in drivers/firewire uses filtered physical | 43 | The alternative firewire-ohci driver in drivers/firewire uses filtered physical |
44 | DMA, hence is not yet suitable for remote debugging. | 44 | DMA by default, which is more secure but not suitable for remote debugging. |
45 | Compile the driver with CONFIG_FIREWIRE_OHCI_REMOTE_DMA (Kernel hacking menu: | ||
46 | Remote debugging over FireWire with firewire-ohci) to get unfiltered physical | ||
47 | DMA. | ||
45 | 48 | ||
46 | Because ohci1394 depends on the PCI enumeration to be completed, an | 49 | Because ohci1394 and firewire-ohci depend on the PCI enumeration to be |
47 | initialization routine which runs pretty early (long before console_init() | 50 | completed, an initialization routine which runs pretty early has been |
48 | which makes the printk buffer appear on the console can be called) was written. | 51 | implemented for x86. This routine runs long before console_init() can be |
52 | called, i.e. before the printk buffer appears on the console. | ||
49 | 53 | ||
50 | To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu: | 54 | To activate it, enable CONFIG_PROVIDE_OHCI1394_DMA_INIT (Kernel hacking menu: |
51 | Provide code for enabling DMA over FireWire early on boot) and pass the | 55 | Remote debugging over FireWire early on boot) and pass the parameter |
52 | parameter "ohci1394_dma=early" to the recompiled kernel on boot. | 56 | "ohci1394_dma=early" to the recompiled kernel on boot. |
53 | 57 | ||
54 | Tools | 58 | Tools |
55 | ----- | 59 | ----- |
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index c09a96b99354..354aec047c0e 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -47,7 +47,6 @@ | |||
47 | .mm | 47 | .mm |
48 | 53c700_d.h | 48 | 53c700_d.h |
49 | 53c8xx_d.h* | 49 | 53c8xx_d.h* |
50 | BitKeeper | ||
51 | COPYING | 50 | COPYING |
52 | CREDITS | 51 | CREDITS |
53 | CVS | 52 | CVS |
diff --git a/Documentation/early-userspace/README b/Documentation/early-userspace/README index 766d320c8eb6..e35d83052192 100644 --- a/Documentation/early-userspace/README +++ b/Documentation/early-userspace/README | |||
@@ -89,8 +89,8 @@ the 2.7 era (it missed the boat for 2.5). | |||
89 | You can obtain somewhat infrequent snapshots of klibc from | 89 | You can obtain somewhat infrequent snapshots of klibc from |
90 | ftp://ftp.kernel.org/pub/linux/libs/klibc/ | 90 | ftp://ftp.kernel.org/pub/linux/libs/klibc/ |
91 | 91 | ||
92 | For active users, you are better off using the klibc BitKeeper | 92 | For active users, you are better off using the klibc git |
93 | repositories, at http://klibc.bkbits.net/ | 93 | repository, at http://git.kernel.org/?p=libs/klibc/klibc.git |
94 | 94 | ||
95 | The standalone klibc distribution currently provides three components, | 95 | The standalone klibc distribution currently provides three components, |
96 | in addition to the klibc library: | 96 | in addition to the klibc library: |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index bf0e3df8e7a1..448729fcaeb1 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -203,16 +203,8 @@ Who: linuxppc-dev@ozlabs.org | |||
203 | 203 | ||
204 | --------------------------- | 204 | --------------------------- |
205 | 205 | ||
206 | What: sk98lin network driver | ||
207 | When: Feburary 2008 | ||
208 | Why: In kernel tree version of driver is unmaintained. Sk98lin driver | ||
209 | replaced by the skge driver. | ||
210 | Who: Stephen Hemminger <shemminger@linux-foundation.org> | ||
211 | |||
212 | --------------------------- | ||
213 | |||
214 | What: i386/x86_64 bzImage symlinks | 206 | What: i386/x86_64 bzImage symlinks |
215 | When: April 2008 | 207 | When: April 2010 |
216 | 208 | ||
217 | Why: The i386/x86_64 merge provides a symlink to the old bzImage | 209 | Why: The i386/x86_64 merge provides a symlink to the old bzImage |
218 | location so not yet updated user space tools, e.g. package | 210 | location so not yet updated user space tools, e.g. package |
@@ -221,8 +213,6 @@ Who: Thomas Gleixner <tglx@linutronix.de> | |||
221 | 213 | ||
222 | --------------------------- | 214 | --------------------------- |
223 | 215 | ||
224 | --------------------------- | ||
225 | |||
226 | What: i2c-i810, i2c-prosavage and i2c-savage4 | 216 | What: i2c-i810, i2c-prosavage and i2c-savage4 |
227 | When: May 2008 | 217 | When: May 2008 |
228 | Why: These drivers are superseded by i810fb, intelfb and savagefb. | 218 | Why: These drivers are superseded by i810fb, intelfb and savagefb. |
@@ -230,33 +220,6 @@ Who: Jean Delvare <khali@linux-fr.org> | |||
230 | 220 | ||
231 | --------------------------- | 221 | --------------------------- |
232 | 222 | ||
233 | What: bcm43xx wireless network driver | ||
234 | When: 2.6.26 | ||
235 | Files: drivers/net/wireless/bcm43xx | ||
236 | Why: This driver's functionality has been replaced by the | ||
237 | mac80211-based b43 and b43legacy drivers. | ||
238 | Who: John W. Linville <linville@tuxdriver.com> | ||
239 | |||
240 | --------------------------- | ||
241 | |||
242 | What: ieee80211 softmac wireless networking component | ||
243 | When: 2.6.26 (or after removal of bcm43xx and port of zd1211rw to mac80211) | ||
244 | Files: net/ieee80211/softmac | ||
245 | Why: No in-kernel drivers will depend on it any longer. | ||
246 | Who: John W. Linville <linville@tuxdriver.com> | ||
247 | |||
248 | --------------------------- | ||
249 | |||
250 | What: rc80211-simple rate control algorithm for mac80211 | ||
251 | When: 2.6.26 | ||
252 | Files: net/mac80211/rc80211-simple.c | ||
253 | Why: This algorithm was provided for reference but always exhibited bad | ||
254 | responsiveness and performance and has some serious flaws. It has been | ||
255 | replaced by rc80211-pid. | ||
256 | Who: Stefano Brivio <stefano.brivio@polimi.it> | ||
257 | |||
258 | --------------------------- | ||
259 | |||
260 | What (Why): | 223 | What (Why): |
261 | - include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files | 224 | - include/linux/netfilter_ipv4/ipt_TOS.h ipt_tos.h header files |
262 | (superseded by xt_TOS/xt_tos target & match) | 225 | (superseded by xt_TOS/xt_tos target & match) |
@@ -298,17 +261,6 @@ Who: Michael Buesch <mb@bu3sch.de> | |||
298 | 261 | ||
299 | --------------------------- | 262 | --------------------------- |
300 | 263 | ||
301 | What: Solaris/SunOS syscall and binary support on Sparc | ||
302 | When: 2.6.26 | ||
303 | Why: Largely unmaintained and almost entirely unused. File system | ||
304 | layering used to divert library and dynamic linker searches to | ||
305 | /usr/gnemul is extremely buggy and unfixable. Making it work | ||
306 | is largely pointless as without a lot of work only the most | ||
307 | trivial of Solaris binaries can work with the emulation code. | ||
308 | Who: David S. Miller <davem@davemloft.net> | ||
309 | |||
310 | --------------------------- | ||
311 | |||
312 | What: init_mm export | 264 | What: init_mm export |
313 | When: 2.6.26 | 265 | When: 2.6.26 |
314 | Why: Not used in-tree. The current out-of-tree users used it to | 266 | Why: Not used in-tree. The current out-of-tree users used it to |
@@ -318,3 +270,28 @@ Why: Not used in-tree. The current out-of-tree users used it to | |||
318 | code / infrastructure should be in the kernel and not in some | 270 | code / infrastructure should be in the kernel and not in some |
319 | out-of-tree driver. | 271 | out-of-tree driver. |
320 | Who: Thomas Gleixner <tglx@linutronix.de> | 272 | Who: Thomas Gleixner <tglx@linutronix.de> |
273 | |||
274 | ---------------------------- | ||
275 | |||
276 | What: usedac i386 kernel parameter | ||
277 | When: 2.6.27 | ||
278 | Why: replaced by allowdac and no dac combination | ||
279 | Who: Glauber Costa <gcosta@redhat.com> | ||
280 | |||
281 | --------------------------- | ||
282 | |||
283 | What: /sys/o2cb symlink | ||
284 | When: January 2010 | ||
285 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb | ||
286 | exists as a symlink for backwards compatibility for old versions of | ||
287 | ocfs2-tools. 2 years should be sufficient time to phase in new versions | ||
288 | which know to look in /sys/fs/o2cb. | ||
289 | Who: ocfs2-devel@oss.oracle.com | ||
290 | |||
291 | --------------------------- | ||
292 | |||
293 | What: asm/semaphore.h | ||
294 | When: 2.6.26 | ||
295 | Why: Implementation became generic; users should now include | ||
296 | linux/semaphore.h instead. | ||
297 | Who: Matthew Wilcox <willy@linux.intel.com> | ||
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 4598ef7b622b..7f27b8f840d0 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -176,8 +176,10 @@ implementations: | |||
176 | Recall that an attribute should only be exporting one value, or an | 176 | Recall that an attribute should only be exporting one value, or an |
177 | array of similar values, so this shouldn't be that expensive. | 177 | array of similar values, so this shouldn't be that expensive. |
178 | 178 | ||
179 | This allows userspace to do partial reads and seeks arbitrarily over | 179 | This allows userspace to do partial reads and forward seeks |
180 | the entire file at will. | 180 | arbitrarily over the entire file at will. If userspace seeks back to |
181 | zero or does a pread(2) with an offset of '0' the show() method will | ||
182 | be called again, rearmed, to fill the buffer. | ||
181 | 183 | ||
182 | - On write(2), sysfs expects the entire buffer to be passed during the | 184 | - On write(2), sysfs expects the entire buffer to be passed during the |
183 | first write. Sysfs then passes the entire buffer to the store() | 185 | first write. Sysfs then passes the entire buffer to the store() |
@@ -192,6 +194,9 @@ implementations: | |||
192 | 194 | ||
193 | Other notes: | 195 | Other notes: |
194 | 196 | ||
197 | - Writing causes the show() method to be rearmed regardless of current | ||
198 | file position. | ||
199 | |||
195 | - The buffer will always be PAGE_SIZE bytes in length. On i386, this | 200 | - The buffer will always be PAGE_SIZE bytes in length. On i386, this |
196 | is 4096. | 201 | is 4096. |
197 | 202 | ||
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index 74aeb142ae5f..0a1668ba2600 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt | |||
@@ -52,16 +52,15 @@ When mounting an XFS filesystem, the following options are accepted. | |||
52 | and also gets the setgid bit set if it is a directory itself. | 52 | and also gets the setgid bit set if it is a directory itself. |
53 | 53 | ||
54 | ihashsize=value | 54 | ihashsize=value |
55 | Sets the number of hash buckets available for hashing the | 55 | In memory inode hashes have been removed, so this option has |
56 | in-memory inodes of the specified mount point. If a value | 56 | no function as of August 2007. Option is deprecated. |
57 | of zero is used, the value selected by the default algorithm | ||
58 | will be displayed in /proc/mounts. | ||
59 | 57 | ||
60 | ikeep/noikeep | 58 | ikeep/noikeep |
61 | When inode clusters are emptied of inodes, keep them around | 59 | When ikeep is specified, XFS does not delete empty inode clusters |
62 | on the disk (ikeep) - this is the traditional XFS behaviour | 60 | and keeps them around on disk. ikeep is the traditional XFS |
63 | and is still the default for now. Using the noikeep option, | 61 | behaviour. When noikeep is specified, empty inode clusters |
64 | inode clusters are returned to the free space pool. | 62 | are returned to the free space pool. The default is noikeep for |
63 | non-DMAPI mounts, while ikeep is the default when DMAPI is in use. | ||
65 | 64 | ||
66 | inode64 | 65 | inode64 |
67 | Indicates that XFS is allowed to create inodes at any location | 66 | Indicates that XFS is allowed to create inodes at any location |
diff --git a/Documentation/firmware_class/firmware_sample_driver.c b/Documentation/firmware_class/firmware_sample_driver.c deleted file mode 100644 index 6865cbe075ec..000000000000 --- a/Documentation/firmware_class/firmware_sample_driver.c +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * firmware_sample_driver.c - | ||
3 | * | ||
4 | * Copyright (c) 2003 Manuel Estrada Sainz | ||
5 | * | ||
6 | * Sample code on how to use request_firmware() from drivers. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/module.h> | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/device.h> | ||
14 | #include <linux/string.h> | ||
15 | |||
16 | #include "linux/firmware.h" | ||
17 | |||
18 | static struct device ghost_device = { | ||
19 | .bus_id = "ghost0", | ||
20 | }; | ||
21 | |||
22 | |||
23 | static void sample_firmware_load(char *firmware, int size) | ||
24 | { | ||
25 | u8 buf[size+1]; | ||
26 | memcpy(buf, firmware, size); | ||
27 | buf[size] = '\0'; | ||
28 | printk(KERN_INFO "firmware_sample_driver: firmware: %s\n", buf); | ||
29 | } | ||
30 | |||
31 | static void sample_probe_default(void) | ||
32 | { | ||
33 | /* uses the default method to get the firmware */ | ||
34 | const struct firmware *fw_entry; | ||
35 | printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n"); | ||
36 | |||
37 | if(request_firmware(&fw_entry, "sample_driver_fw", &ghost_device)!=0) | ||
38 | { | ||
39 | printk(KERN_ERR | ||
40 | "firmware_sample_driver: Firmware not available\n"); | ||
41 | return; | ||
42 | } | ||
43 | |||
44 | sample_firmware_load(fw_entry->data, fw_entry->size); | ||
45 | |||
46 | release_firmware(fw_entry); | ||
47 | |||
48 | /* finish setting up the device */ | ||
49 | } | ||
50 | static void sample_probe_specific(void) | ||
51 | { | ||
52 | /* Uses some specific hotplug support to get the firmware from | ||
53 | * userspace directly into the hardware, or via some sysfs file */ | ||
54 | |||
55 | /* NOTE: This currently doesn't work */ | ||
56 | |||
57 | printk(KERN_INFO "firmware_sample_driver: a ghost device got inserted :)\n"); | ||
58 | |||
59 | if(request_firmware(NULL, "sample_driver_fw", &ghost_device)!=0) | ||
60 | { | ||
61 | printk(KERN_ERR | ||
62 | "firmware_sample_driver: Firmware load failed\n"); | ||
63 | return; | ||
64 | } | ||
65 | |||
66 | /* request_firmware blocks until userspace finished, so at | ||
67 | * this point the firmware should be already in the device */ | ||
68 | |||
69 | /* finish setting up the device */ | ||
70 | } | ||
71 | static void sample_probe_async_cont(const struct firmware *fw, void *context) | ||
72 | { | ||
73 | if(!fw){ | ||
74 | printk(KERN_ERR | ||
75 | "firmware_sample_driver: firmware load failed\n"); | ||
76 | return; | ||
77 | } | ||
78 | |||
79 | printk(KERN_INFO "firmware_sample_driver: device pointer \"%s\"\n", | ||
80 | (char *)context); | ||
81 | sample_firmware_load(fw->data, fw->size); | ||
82 | } | ||
83 | static void sample_probe_async(void) | ||
84 | { | ||
85 | /* Let's say that I can't sleep */ | ||
86 | int error; | ||
87 | error = request_firmware_nowait (THIS_MODULE, FW_ACTION_NOHOTPLUG, | ||
88 | "sample_driver_fw", &ghost_device, | ||
89 | "my device pointer", | ||
90 | sample_probe_async_cont); | ||
91 | if(error){ | ||
92 | printk(KERN_ERR | ||
93 | "firmware_sample_driver:" | ||
94 | " request_firmware_nowait failed\n"); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | static int sample_init(void) | ||
99 | { | ||
100 | device_initialize(&ghost_device); | ||
101 | /* since there is no real hardware insertion I just call the | ||
102 | * sample probe functions here */ | ||
103 | sample_probe_specific(); | ||
104 | sample_probe_default(); | ||
105 | sample_probe_async(); | ||
106 | return 0; | ||
107 | } | ||
108 | static void __exit sample_exit(void) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | module_init (sample_init); | ||
113 | module_exit (sample_exit); | ||
114 | |||
115 | MODULE_LICENSE("GPL"); | ||
diff --git a/Documentation/firmware_class/firmware_sample_firmware_class.c b/Documentation/firmware_class/firmware_sample_firmware_class.c deleted file mode 100644 index 2de62854f0e5..000000000000 --- a/Documentation/firmware_class/firmware_sample_firmware_class.c +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | /* | ||
2 | * firmware_sample_firmware_class.c - | ||
3 | * | ||
4 | * Copyright (c) 2003 Manuel Estrada Sainz | ||
5 | * | ||
6 | * NOTE: This is just a probe of concept, if you think that your driver would | ||
7 | * be well served by this mechanism please contact me first. | ||
8 | * | ||
9 | * DON'T USE THIS CODE AS IS | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <linux/device.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/timer.h> | ||
17 | #include <linux/slab.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/firmware.h> | ||
20 | |||
21 | |||
22 | MODULE_AUTHOR("Manuel Estrada Sainz"); | ||
23 | MODULE_DESCRIPTION("Hackish sample for using firmware class directly"); | ||
24 | MODULE_LICENSE("GPL"); | ||
25 | |||
26 | static inline struct class_device *to_class_dev(struct kobject *obj) | ||
27 | { | ||
28 | return container_of(obj,struct class_device,kobj); | ||
29 | } | ||
30 | static inline | ||
31 | struct class_device_attribute *to_class_dev_attr(struct attribute *_attr) | ||
32 | { | ||
33 | return container_of(_attr,struct class_device_attribute,attr); | ||
34 | } | ||
35 | |||
36 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr); | ||
37 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); | ||
38 | |||
39 | struct firmware_priv { | ||
40 | char fw_id[FIRMWARE_NAME_MAX]; | ||
41 | s32 loading:2; | ||
42 | u32 abort:1; | ||
43 | }; | ||
44 | |||
45 | extern struct class firmware_class; | ||
46 | |||
47 | static ssize_t firmware_loading_show(struct class_device *class_dev, char *buf) | ||
48 | { | ||
49 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
50 | return sprintf(buf, "%d\n", fw_priv->loading); | ||
51 | } | ||
52 | static ssize_t firmware_loading_store(struct class_device *class_dev, | ||
53 | const char *buf, size_t count) | ||
54 | { | ||
55 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
56 | int prev_loading = fw_priv->loading; | ||
57 | |||
58 | fw_priv->loading = simple_strtol(buf, NULL, 10); | ||
59 | |||
60 | switch(fw_priv->loading){ | ||
61 | case -1: | ||
62 | /* abort load an panic */ | ||
63 | break; | ||
64 | case 1: | ||
65 | /* setup load */ | ||
66 | break; | ||
67 | case 0: | ||
68 | if(prev_loading==1){ | ||
69 | /* finish load and get the device back to working | ||
70 | * state */ | ||
71 | } | ||
72 | break; | ||
73 | } | ||
74 | |||
75 | return count; | ||
76 | } | ||
77 | static CLASS_DEVICE_ATTR(loading, 0644, | ||
78 | firmware_loading_show, firmware_loading_store); | ||
79 | |||
80 | static ssize_t firmware_data_read(struct kobject *kobj, | ||
81 | struct bin_attribute *bin_attr, | ||
82 | char *buffer, loff_t offset, size_t count) | ||
83 | { | ||
84 | struct class_device *class_dev = to_class_dev(kobj); | ||
85 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
86 | |||
87 | /* read from the devices firmware memory */ | ||
88 | |||
89 | return count; | ||
90 | } | ||
91 | static ssize_t firmware_data_write(struct kobject *kobj, | ||
92 | struct bin_attribute *bin_attr, | ||
93 | char *buffer, loff_t offset, size_t count) | ||
94 | { | ||
95 | struct class_device *class_dev = to_class_dev(kobj); | ||
96 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
97 | |||
98 | /* write to the devices firmware memory */ | ||
99 | |||
100 | return count; | ||
101 | } | ||
102 | static struct bin_attribute firmware_attr_data = { | ||
103 | .attr = {.name = "data", .mode = 0644}, | ||
104 | .size = 0, | ||
105 | .read = firmware_data_read, | ||
106 | .write = firmware_data_write, | ||
107 | }; | ||
108 | static int fw_setup_class_device(struct class_device *class_dev, | ||
109 | const char *fw_name, | ||
110 | struct device *device) | ||
111 | { | ||
112 | int retval; | ||
113 | struct firmware_priv *fw_priv; | ||
114 | |||
115 | fw_priv = kzalloc(sizeof(struct firmware_priv), GFP_KERNEL); | ||
116 | if (!fw_priv) { | ||
117 | retval = -ENOMEM; | ||
118 | goto out; | ||
119 | } | ||
120 | |||
121 | memset(class_dev, 0, sizeof(*class_dev)); | ||
122 | |||
123 | strncpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX); | ||
124 | fw_priv->fw_id[FIRMWARE_NAME_MAX-1] = '\0'; | ||
125 | |||
126 | strncpy(class_dev->class_id, device->bus_id, BUS_ID_SIZE); | ||
127 | class_dev->class_id[BUS_ID_SIZE-1] = '\0'; | ||
128 | class_dev->dev = device; | ||
129 | |||
130 | class_dev->class = &firmware_class, | ||
131 | class_set_devdata(class_dev, fw_priv); | ||
132 | retval = class_device_register(class_dev); | ||
133 | if (retval){ | ||
134 | printk(KERN_ERR "%s: class_device_register failed\n", | ||
135 | __FUNCTION__); | ||
136 | goto error_free_fw_priv; | ||
137 | } | ||
138 | |||
139 | retval = sysfs_create_bin_file(&class_dev->kobj, &firmware_attr_data); | ||
140 | if (retval){ | ||
141 | printk(KERN_ERR "%s: sysfs_create_bin_file failed\n", | ||
142 | __FUNCTION__); | ||
143 | goto error_unreg_class_dev; | ||
144 | } | ||
145 | |||
146 | retval = class_device_create_file(class_dev, | ||
147 | &class_device_attr_loading); | ||
148 | if (retval){ | ||
149 | printk(KERN_ERR "%s: class_device_create_file failed\n", | ||
150 | __FUNCTION__); | ||
151 | goto error_remove_data; | ||
152 | } | ||
153 | |||
154 | goto out; | ||
155 | |||
156 | error_remove_data: | ||
157 | sysfs_remove_bin_file(&class_dev->kobj, &firmware_attr_data); | ||
158 | error_unreg_class_dev: | ||
159 | class_device_unregister(class_dev); | ||
160 | error_free_fw_priv: | ||
161 | kfree(fw_priv); | ||
162 | out: | ||
163 | return retval; | ||
164 | } | ||
165 | static void fw_remove_class_device(struct class_device *class_dev) | ||
166 | { | ||
167 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
168 | |||
169 | class_device_remove_file(class_dev, &class_device_attr_loading); | ||
170 | sysfs_remove_bin_file(&class_dev->kobj, &firmware_attr_data); | ||
171 | class_device_unregister(class_dev); | ||
172 | } | ||
173 | |||
174 | static struct class_device *class_dev; | ||
175 | |||
176 | static struct device my_device = { | ||
177 | .bus_id = "my_dev0", | ||
178 | }; | ||
179 | |||
180 | static int __init firmware_sample_init(void) | ||
181 | { | ||
182 | int error; | ||
183 | |||
184 | device_initialize(&my_device); | ||
185 | class_dev = kmalloc(sizeof(struct class_device), GFP_KERNEL); | ||
186 | if(!class_dev) | ||
187 | return -ENOMEM; | ||
188 | |||
189 | error = fw_setup_class_device(class_dev, "my_firmware_image", | ||
190 | &my_device); | ||
191 | if(error){ | ||
192 | kfree(class_dev); | ||
193 | return error; | ||
194 | } | ||
195 | return 0; | ||
196 | |||
197 | } | ||
198 | static void __exit firmware_sample_exit(void) | ||
199 | { | ||
200 | struct firmware_priv *fw_priv = class_get_devdata(class_dev); | ||
201 | fw_remove_class_device(class_dev); | ||
202 | kfree(fw_priv); | ||
203 | kfree(class_dev); | ||
204 | } | ||
205 | module_init(firmware_sample_init); | ||
206 | module_exit(firmware_sample_exit); | ||
207 | |||
diff --git a/Documentation/highuid.txt b/Documentation/highuid.txt index 76034d9dbfc0..6bad6f1d1cac 100644 --- a/Documentation/highuid.txt +++ b/Documentation/highuid.txt | |||
@@ -28,8 +28,6 @@ What's left to be done for 32-bit UIDs on all Linux architectures: | |||
28 | uses the 32-bit UID system calls properly otherwise. | 28 | uses the 32-bit UID system calls properly otherwise. |
29 | 29 | ||
30 | This affects at least: | 30 | This affects at least: |
31 | SunOS emulation | ||
32 | Solaris emulation | ||
33 | iBCS on Intel | 31 | iBCS on Intel |
34 | 32 | ||
35 | sparc32 emulation on sparc64 | 33 | sparc32 emulation on sparc64 |
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt index fc49b79bc1ab..2eb16100bb3f 100644 --- a/Documentation/i386/boot.txt +++ b/Documentation/i386/boot.txt | |||
@@ -170,6 +170,8 @@ Offset Proto Name Meaning | |||
170 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line | 170 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line |
171 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture | 171 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture |
172 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data | 172 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data |
173 | 0248/4 2.08+ payload_offset Offset of kernel payload | ||
174 | 024C/4 2.08+ payload_length Length of kernel payload | ||
173 | 175 | ||
174 | (1) For backwards compatibility, if the setup_sects field contains 0, the | 176 | (1) For backwards compatibility, if the setup_sects field contains 0, the |
175 | real value is 4. | 177 | real value is 4. |
@@ -512,6 +514,32 @@ Protocol: 2.07+ | |||
512 | 514 | ||
513 | A pointer to data that is specific to hardware subarch | 515 | A pointer to data that is specific to hardware subarch |
514 | 516 | ||
517 | Field name: payload_offset | ||
518 | Type: read | ||
519 | Offset/size: 0x248/4 | ||
520 | Protocol: 2.08+ | ||
521 | |||
522 | If non-zero then this field contains the offset from the end of the | ||
523 | real-mode code to the payload. | ||
524 | |||
525 | The payload may be compressed. The format of both the compressed and | ||
526 | uncompressed data should be determined using the standard magic | ||
527 | numbers. Currently only gzip compressed ELF is used. | ||
528 | |||
529 | Field name: payload_length | ||
530 | Type: read | ||
531 | Offset/size: 0x24c/4 | ||
532 | Protocol: 2.08+ | ||
533 | |||
534 | The length of the payload. | ||
535 | |||
536 | **** THE IMAGE CHECKSUM | ||
537 | |||
538 | From boot protocol version 2.08 onwards the CRC-32 is calculated over | ||
539 | the entire file using the characteristic polynomial 0x04C11DB7 and an | ||
540 | initial remainder of 0xffffffff. The checksum is appended to the | ||
541 | file; therefore the CRC of the file up to the limit specified in the | ||
542 | syssize field of the header is always 0. | ||
515 | 543 | ||
516 | **** THE KERNEL COMMAND LINE | 544 | **** THE KERNEL COMMAND LINE |
517 | 545 | ||
diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt index 818676aad45a..486c699f4aea 100644 --- a/Documentation/ide/ide.txt +++ b/Documentation/ide/ide.txt | |||
@@ -71,29 +71,6 @@ This driver automatically probes for most IDE interfaces (including all PCI | |||
71 | ones), for the drives/geometries attached to those interfaces, and for the IRQ | 71 | ones), for the drives/geometries attached to those interfaces, and for the IRQ |
72 | lines being used by the interfaces (normally 14, 15 for ide0/ide1). | 72 | lines being used by the interfaces (normally 14, 15 for ide0/ide1). |
73 | 73 | ||
74 | For special cases, interfaces may be specified using kernel "command line" | ||
75 | options. For example, | ||
76 | |||
77 | ide3=0x168,0x36e,10 /* ioports 0x168-0x16f,0x36e, irq 10 */ | ||
78 | |||
79 | Normally the irq number need not be specified, as ide.c will probe for it: | ||
80 | |||
81 | ide3=0x168,0x36e /* ioports 0x168-0x16f,0x36e */ | ||
82 | |||
83 | The standard port, and irq values are these: | ||
84 | |||
85 | ide0=0x1f0,0x3f6,14 | ||
86 | ide1=0x170,0x376,15 | ||
87 | ide2=0x1e8,0x3ee,11 | ||
88 | ide3=0x168,0x36e,10 | ||
89 | |||
90 | Note that the first parameter reserves 8 contiguous ioports, whereas the | ||
91 | second value denotes a single ioport. If in doubt, do a 'cat /proc/ioports'. | ||
92 | |||
93 | In all probability the device uses these ports and IRQs if it is attached | ||
94 | to the appropriate ide channel. Pass the parameter for the correct ide | ||
95 | channel to the kernel, as explained above. | ||
96 | |||
97 | Any number of interfaces may share a single IRQ if necessary, at a slight | 74 | Any number of interfaces may share a single IRQ if necessary, at a slight |
98 | performance penalty, whether on separate cards or a single VLB card. | 75 | performance penalty, whether on separate cards or a single VLB card. |
99 | The IDE driver automatically detects and handles this. However, this may | 76 | The IDE driver automatically detects and handles this. However, this may |
@@ -184,13 +161,6 @@ provided it is mounted with the default block size of 1024 (as above). | |||
184 | Please pass on any feedback on any of this stuff to the maintainer, | 161 | Please pass on any feedback on any of this stuff to the maintainer, |
185 | whose address can be found in linux/MAINTAINERS. | 162 | whose address can be found in linux/MAINTAINERS. |
186 | 163 | ||
187 | Note that if BOTH hd.c and ide.c are configured into the kernel, | ||
188 | hd.c will normally be allowed to control the primary IDE interface. | ||
189 | This is useful for older hardware that may be incompatible with ide.c, | ||
190 | and still allows newer hardware to run on the 2nd/3rd/4th IDE ports | ||
191 | under control of ide.c. To have ide.c also "take over" the primary | ||
192 | IDE port in this situation, use the "command line" parameter: ide0=0x1f0 | ||
193 | |||
194 | The IDE driver is modularized. The high level disk/CD-ROM/tape/floppy | 164 | The IDE driver is modularized. The high level disk/CD-ROM/tape/floppy |
195 | drivers can always be compiled as loadable modules, the chipset drivers | 165 | drivers can always be compiled as loadable modules, the chipset drivers |
196 | can only be compiled into the kernel, and the core code (ide.c) can be | 166 | can only be compiled into the kernel, and the core code (ide.c) can be |
@@ -206,7 +176,7 @@ When ide.c is used as a module, you can pass command line parameters to the | |||
206 | driver using the "options=" keyword to insmod, while replacing any ',' with | 176 | driver using the "options=" keyword to insmod, while replacing any ',' with |
207 | ';'. For example: | 177 | ';'. For example: |
208 | 178 | ||
209 | insmod ide.o options="ide0=serialize ide1=serialize ide2=0x1e8;0x3ee;11" | 179 | insmod ide.o options="hda=nodma hdb=nodma" |
210 | 180 | ||
211 | 181 | ||
212 | ================================================================================ | 182 | ================================================================================ |
@@ -247,21 +217,11 @@ Summary of ide driver parameters for kernel command line | |||
247 | As for VLB, it is safest to not specify it. | 217 | As for VLB, it is safest to not specify it. |
248 | Bigger values are safer than smaller ones. | 218 | Bigger values are safer than smaller ones. |
249 | 219 | ||
250 | "idex=base" : probe for an interface at the addr specified, | ||
251 | where "base" is usually 0x1f0 or 0x170 | ||
252 | and "ctl" is assumed to be "base"+0x206 | ||
253 | |||
254 | "idex=base,ctl" : specify both base and ctl | ||
255 | |||
256 | "idex=base,ctl,irq" : specify base, ctl, and irq number | ||
257 | |||
258 | "idex=serialize" : do not overlap operations on idex. Please note | 220 | "idex=serialize" : do not overlap operations on idex. Please note |
259 | that you will have to specify this option for | 221 | that you will have to specify this option for |
260 | both the respective primary and secondary channel | 222 | both the respective primary and secondary channel |
261 | to take effect. | 223 | to take effect. |
262 | 224 | ||
263 | "idex=four" : four drives on idex and ide(x^1) share same ports | ||
264 | |||
265 | "idex=reset" : reset interface after probe | 225 | "idex=reset" : reset interface after probe |
266 | 226 | ||
267 | "idex=ata66" : informs the interface that it has an 80c cable | 227 | "idex=ata66" : informs the interface that it has an 80c cable |
@@ -269,8 +229,6 @@ Summary of ide driver parameters for kernel command line | |||
269 | ability to bit test for detection is currently | 229 | ability to bit test for detection is currently |
270 | unknown. | 230 | unknown. |
271 | 231 | ||
272 | "ide=reverse" : formerly called to pci sub-system, but now local. | ||
273 | |||
274 | "ide=doubler" : probe/support IDE doublers on Amiga | 232 | "ide=doubler" : probe/support IDE doublers on Amiga |
275 | 233 | ||
276 | There may be more options than shown -- use the source, Luke! | 234 | There may be more options than shown -- use the source, Luke! |
@@ -290,6 +248,9 @@ Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb" | |||
290 | kernel paremeter to enable probing for VLB version of the chipset (PCI ones | 248 | kernel paremeter to enable probing for VLB version of the chipset (PCI ones |
291 | are detected automatically). | 249 | are detected automatically). |
292 | 250 | ||
251 | You also need to use "probe" kernel parameter for ide-4drives driver | ||
252 | (support for IDE generic chipset with four drives on one port). | ||
253 | |||
293 | ================================================================================ | 254 | ================================================================================ |
294 | 255 | ||
295 | Some Terminology | 256 | Some Terminology |
diff --git a/Documentation/ide/warm-plug-howto.txt b/Documentation/ide/warm-plug-howto.txt new file mode 100644 index 000000000000..d5885468b072 --- /dev/null +++ b/Documentation/ide/warm-plug-howto.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | |||
2 | IDE warm-plug HOWTO | ||
3 | =================== | ||
4 | |||
5 | To warm-plug devices on a port 'idex': | ||
6 | |||
7 | # echo -n "1" > /sys/class/ide_port/idex/delete_devices | ||
8 | |||
9 | unplug old device(s) and plug new device(s) | ||
10 | |||
11 | # echo -n "1" > /sys/class/ide_port/idex/scan | ||
12 | |||
13 | done | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index dafd001bf833..bf6303ec0bde 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -366,6 +366,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
366 | possible to determine what the correct size should be. | 366 | possible to determine what the correct size should be. |
367 | This option provides an override for these situations. | 367 | This option provides an override for these situations. |
368 | 368 | ||
369 | security= [SECURITY] Choose a security module to enable at boot. | ||
370 | If this boot parameter is not specified, only the first | ||
371 | security module asking for security registration will be | ||
372 | loaded. An invalid security module name will be treated | ||
373 | as if no module has been chosen. | ||
374 | |||
369 | capability.disable= | 375 | capability.disable= |
370 | [SECURITY] Disable capabilities. This would normally | 376 | [SECURITY] Disable capabilities. This would normally |
371 | be used only if an alternative security model is to be | 377 | be used only if an alternative security model is to be |
@@ -763,11 +769,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
763 | Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] | 769 | Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] |
764 | 770 | ||
765 | ide= [HW] (E)IDE subsystem | 771 | ide= [HW] (E)IDE subsystem |
766 | Format: ide=nodma or ide=doubler or ide=reverse | 772 | Format: ide=nodma or ide=doubler |
767 | See Documentation/ide/ide.txt. | 773 | See Documentation/ide/ide.txt. |
768 | 774 | ||
769 | ide?= [HW] (E)IDE subsystem | 775 | ide?= [HW] (E)IDE subsystem |
770 | Format: ide?=noprobe or chipset specific parameters. | 776 | Format: ide?=ata66 or chipset specific parameters. |
771 | See Documentation/ide/ide.txt. | 777 | See Documentation/ide/ide.txt. |
772 | 778 | ||
773 | idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed | 779 | idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed |
@@ -812,6 +818,19 @@ and is between 256 and 4096 characters. It is defined in the file | |||
812 | 818 | ||
813 | inttest= [IA64] | 819 | inttest= [IA64] |
814 | 820 | ||
821 | iommu= [x86] | ||
822 | off | ||
823 | force | ||
824 | noforce | ||
825 | biomerge | ||
826 | panic | ||
827 | nopanic | ||
828 | merge | ||
829 | nomerge | ||
830 | forcesac | ||
831 | soft | ||
832 | |||
833 | |||
815 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option | 834 | intel_iommu= [DMAR] Intel IOMMU driver (DMAR) option |
816 | off | 835 | off |
817 | Disable intel iommu driver. | 836 | Disable intel iommu driver. |
@@ -828,6 +847,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
828 | than 32 bit addressing. The default is to look | 847 | than 32 bit addressing. The default is to look |
829 | for translation below 32 bit and if not available | 848 | for translation below 32 bit and if not available |
830 | then look in the higher range. | 849 | then look in the higher range. |
850 | strict [Default Off] | ||
851 | With this option on every unmap_single operation will | ||
852 | result in a hardware IOTLB flush operation as opposed | ||
853 | to batching them for performance. | ||
831 | 854 | ||
832 | io_delay= [X86-32,X86-64] I/O delay method | 855 | io_delay= [X86-32,X86-64] I/O delay method |
833 | 0x80 | 856 | 0x80 |
@@ -928,8 +951,15 @@ and is between 256 and 4096 characters. It is defined in the file | |||
928 | kstack=N [X86-32,X86-64] Print N words from the kernel stack | 951 | kstack=N [X86-32,X86-64] Print N words from the kernel stack |
929 | in oops dumps. | 952 | in oops dumps. |
930 | 953 | ||
954 | kgdboc= [HW] kgdb over consoles. | ||
955 | Requires a tty driver that supports console polling. | ||
956 | (only serial suported for now) | ||
957 | Format: <serial_device>[,baud] | ||
958 | |||
931 | l2cr= [PPC] | 959 | l2cr= [PPC] |
932 | 960 | ||
961 | l3cr= [PPC] | ||
962 | |||
933 | lapic [X86-32,APIC] Enable the local APIC even if BIOS | 963 | lapic [X86-32,APIC] Enable the local APIC even if BIOS |
934 | disabled it. | 964 | disabled it. |
935 | 965 | ||
@@ -1134,6 +1164,11 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1134 | or | 1164 | or |
1135 | memmap=0x10000$0x18690000 | 1165 | memmap=0x10000$0x18690000 |
1136 | 1166 | ||
1167 | memtest= [KNL,X86_64] Enable memtest | ||
1168 | Format: <integer> | ||
1169 | range: 0,4 : pattern number | ||
1170 | default : 0 <disable> | ||
1171 | |||
1137 | meye.*= [HW] Set MotionEye Camera parameters | 1172 | meye.*= [HW] Set MotionEye Camera parameters |
1138 | See Documentation/video4linux/meye.txt. | 1173 | See Documentation/video4linux/meye.txt. |
1139 | 1174 | ||
@@ -1251,8 +1286,16 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1251 | noexec [IA-64] | 1286 | noexec [IA-64] |
1252 | 1287 | ||
1253 | noexec [X86-32,X86-64] | 1288 | noexec [X86-32,X86-64] |
1289 | On X86-32 available only on PAE configured kernels. | ||
1254 | noexec=on: enable non-executable mappings (default) | 1290 | noexec=on: enable non-executable mappings (default) |
1255 | noexec=off: disable nn-executable mappings | 1291 | noexec=off: disable non-executable mappings |
1292 | |||
1293 | noexec32 [X86-64] | ||
1294 | This affects only 32-bit executables. | ||
1295 | noexec32=on: enable non-executable mappings (default) | ||
1296 | read doesn't imply executable mappings | ||
1297 | noexec32=off: disable non-executable mappings | ||
1298 | read implies executable mappings | ||
1256 | 1299 | ||
1257 | nofxsr [BUGS=X86-32] Disables x86 floating point extended | 1300 | nofxsr [BUGS=X86-32] Disables x86 floating point extended |
1258 | register save and restore. The kernel will only save | 1301 | register save and restore. The kernel will only save |
@@ -1339,6 +1382,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1339 | 1382 | ||
1340 | nowb [ARM] | 1383 | nowb [ARM] |
1341 | 1384 | ||
1385 | nptcg= [IA64] Override max number of concurrent global TLB | ||
1386 | purges which is reported from either PAL_VM_SUMMARY or | ||
1387 | SAL PALO. | ||
1388 | |||
1342 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. | 1389 | numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA. |
1343 | one of ['zone', 'node', 'default'] can be specified | 1390 | one of ['zone', 'node', 'default'] can be specified |
1344 | This can be set from sysctl after boot. | 1391 | This can be set from sysctl after boot. |
@@ -1428,10 +1475,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1428 | nomsi [MSI] If the PCI_MSI kernel config parameter is | 1475 | nomsi [MSI] If the PCI_MSI kernel config parameter is |
1429 | enabled, this kernel boot option can be used to | 1476 | enabled, this kernel boot option can be used to |
1430 | disable the use of MSI interrupts system-wide. | 1477 | disable the use of MSI interrupts system-wide. |
1431 | nosort [X86-32] Don't sort PCI devices according to | ||
1432 | order given by the PCI BIOS. This sorting is | ||
1433 | done to get a device order compatible with | ||
1434 | older kernels. | ||
1435 | biosirq [X86-32] Use PCI BIOS calls to get the interrupt | 1478 | biosirq [X86-32] Use PCI BIOS calls to get the interrupt |
1436 | routing table. These calls are known to be buggy | 1479 | routing table. These calls are known to be buggy |
1437 | on several machines and they hang the machine | 1480 | on several machines and they hang the machine |
diff --git a/Documentation/laptops/acer-wmi.txt b/Documentation/laptops/acer-wmi.txt index 23df051dbf69..79b7dbd22141 100644 --- a/Documentation/laptops/acer-wmi.txt +++ b/Documentation/laptops/acer-wmi.txt | |||
@@ -80,7 +80,7 @@ once you enable the radio, will depend on your hardware and driver combination. | |||
80 | e.g. With the BCM4318 on the Acer Aspire 5020 series: | 80 | e.g. With the BCM4318 on the Acer Aspire 5020 series: |
81 | 81 | ||
82 | ndiswrapper: Light blinks on when transmitting | 82 | ndiswrapper: Light blinks on when transmitting |
83 | bcm43xx/b43: Solid light, blinks off when transmitting | 83 | b43: Solid light, blinks off when transmitting |
84 | 84 | ||
85 | Wireless radio control is unconditionally enabled - all Acer laptops that support | 85 | Wireless radio control is unconditionally enabled - all Acer laptops that support |
86 | acer-wmi come with built-in wireless. However, should you feel so inclined to | 86 | acer-wmi come with built-in wireless. However, should you feel so inclined to |
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt index bd450e797558..95070028d15e 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt | |||
@@ -95,7 +95,6 @@ RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c | |||
95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h | 95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h |
96 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h | 96 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h |
97 | A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h | 97 | A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h |
98 | SOLARIS_SOCKET_MAGIC 0x000ADDED sol_socket_struct arch/sparc64/solaris/socksys.h | ||
99 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h | 98 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h |
100 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c | 99 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c |
101 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h | 100 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h |
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 1f506f7830ec..e5a819a4f0c9 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -430,8 +430,8 @@ There are certain things that the Linux kernel memory barriers do not guarantee: | |||
430 | 430 | ||
431 | [*] For information on bus mastering DMA and coherency please read: | 431 | [*] For information on bus mastering DMA and coherency please read: |
432 | 432 | ||
433 | Documentation/pci.txt | 433 | Documentation/PCI/pci.txt |
434 | Documentation/DMA-mapping.txt | 434 | Documentation/PCI/PCI-DMA-mapping.txt |
435 | Documentation/DMA-API.txt | 435 | Documentation/DMA-API.txt |
436 | 436 | ||
437 | 437 | ||
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX index c485ee028bd9..1634c6dcecae 100644 --- a/Documentation/networking/00-INDEX +++ b/Documentation/networking/00-INDEX | |||
@@ -100,8 +100,6 @@ tuntap.txt | |||
100 | - TUN/TAP device driver, allowing user space Rx/Tx of packets. | 100 | - TUN/TAP device driver, allowing user space Rx/Tx of packets. |
101 | vortex.txt | 101 | vortex.txt |
102 | - info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards. | 102 | - info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards. |
103 | wan-router.txt | ||
104 | - WAN router documentation | ||
105 | wavelan.txt | 103 | wavelan.txt |
106 | - AT&T GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver | 104 | - AT&T GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver |
107 | x25.txt | 105 | x25.txt |
diff --git a/Documentation/networking/bcm43xx.txt b/Documentation/networking/bcm43xx.txt deleted file mode 100644 index d602c8d6ff3e..000000000000 --- a/Documentation/networking/bcm43xx.txt +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | |||
2 | BCM43xx Linux Driver Project | ||
3 | ============================ | ||
4 | |||
5 | Introduction | ||
6 | ------------ | ||
7 | |||
8 | Many of the wireless devices found in modern notebook computers are | ||
9 | based on the wireless chips produced by Broadcom. These devices have | ||
10 | been a problem for Linux users as there is no open-source driver | ||
11 | available. In addition, Broadcom has not released specifications | ||
12 | for the device, and driver availability has been limited to the | ||
13 | binary-only form used in the GPL versions of AP hardware such as the | ||
14 | Linksys WRT54G, and the Windows and OS X drivers. Before this project | ||
15 | began, the only way to use these devices were to use the Windows or | ||
16 | OS X drivers with either the Linuxant or ndiswrapper modules. There | ||
17 | is a strong penalty if this method is used as loading the binary-only | ||
18 | module "taints" the kernel, and no kernel developer will help diagnose | ||
19 | any kernel problems. | ||
20 | |||
21 | Development | ||
22 | ----------- | ||
23 | |||
24 | This driver has been developed using | ||
25 | a clean-room technique that is described at | ||
26 | http://bcm-specs.sipsolutions.net/ReverseEngineeringProcess. For legal | ||
27 | reasons, none of the clean-room crew works on the on the Linux driver, | ||
28 | and none of the Linux developers sees anything but the specifications, | ||
29 | which are the ultimate product of the reverse-engineering group. | ||
30 | |||
31 | Software | ||
32 | -------- | ||
33 | |||
34 | Since the release of the 2.6.17 kernel, the bcm43xx driver has been | ||
35 | distributed with the kernel source, and is prebuilt in most, if not | ||
36 | all, distributions. There is, however, additional software that is | ||
37 | required. The firmware used by the chip is the intellectual property | ||
38 | of Broadcom and they have not given the bcm43xx team redistribution | ||
39 | rights to this firmware. Since we cannot legally redistribute | ||
40 | the firmware we cannot include it with the driver. Furthermore, it | ||
41 | cannot be placed in the downloadable archives of any distributing | ||
42 | organization; therefore, the user is responsible for obtaining the | ||
43 | firmware and placing it in the appropriate location so that the driver | ||
44 | can find it when initializing. | ||
45 | |||
46 | To help with this process, the bcm43xx developers provide a separate | ||
47 | program named bcm43xx-fwcutter to "cut" the firmware out of a | ||
48 | Windows or OS X driver and write the extracted files to the proper | ||
49 | location. This program is usually provided with the distribution; | ||
50 | however, it may be downloaded from | ||
51 | |||
52 | http://developer.berlios.de/project/showfiles.php?group_id=4547 | ||
53 | |||
54 | The firmware is available in two versions. V3 firmware is used with | ||
55 | the in-kernel bcm43xx driver that uses a software MAC layer called | ||
56 | SoftMAC, and will have a microcode revision of 0x127 or smaller. The | ||
57 | V4 firmware is used by an out-of-kernel driver employing a variation of | ||
58 | the Devicescape MAC layer known as d80211. Once bcm43xx-d80211 reaches | ||
59 | a satisfactory level of development, it will replace bcm43xx-softmac | ||
60 | in the kernel as it is much more flexible and powerful. | ||
61 | |||
62 | A source for the latest V3 firmware is | ||
63 | |||
64 | http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o | ||
65 | |||
66 | Once this file is downloaded, the command | ||
67 | 'bcm43xx-fwcutter -w <dir> <filename>' | ||
68 | will extract the microcode and write it to directory | ||
69 | <dir>. The correct directory will depend on your distribution; | ||
70 | however, most use '/lib/firmware'. Once this step is completed, | ||
71 | the bcm3xx driver should load when the system is booted. To see | ||
72 | any messages relating to the driver, issue the command 'dmesg | | ||
73 | grep bcm43xx' from a terminal window. If there are any problems, | ||
74 | please send that output to Bcm43xx-dev@lists.berlios.de. | ||
75 | |||
76 | Although the driver has been in-kernel since 2.6.17, the earliest | ||
77 | version is quite limited in its capability. Patches that include | ||
78 | all features of later versions are available for the stable kernel | ||
79 | versions from 2.6.18. These will be needed if you use a BCM4318, | ||
80 | or a PCI Express version (BCM4311 and BCM4312). In addition, if you | ||
81 | have an early BCM4306 and more than 1 GB RAM, your kernel will need | ||
82 | to be patched. These patches, which are being updated regularly, | ||
83 | are available at ftp://lwfinger.dynalias.org/patches. Look for | ||
84 | combined_2.6.YY.patch. Of course you will need kernel source downloaded | ||
85 | from kernel.org, or the source from your distribution. | ||
86 | |||
87 | If you build your own kernel, please enable CONFIG_BCM43XX_DEBUG | ||
88 | and CONFIG_IEEE80211_SOFTMAC_DEBUG. The log information provided is | ||
89 | essential for solving any problems. | ||
diff --git a/Documentation/networking/wan-router.txt b/Documentation/networking/wan-router.txt deleted file mode 100644 index bc2ab419a74a..000000000000 --- a/Documentation/networking/wan-router.txt +++ /dev/null | |||
@@ -1,621 +0,0 @@ | |||
1 | ------------------------------------------------------------------------------ | ||
2 | Linux WAN Router Utilities Package | ||
3 | ------------------------------------------------------------------------------ | ||
4 | Version 2.2.1 | ||
5 | Mar 28, 2001 | ||
6 | Author: Nenad Corbic <ncorbic@sangoma.com> | ||
7 | Copyright (c) 1995-2001 Sangoma Technologies Inc. | ||
8 | ------------------------------------------------------------------------------ | ||
9 | |||
10 | INTRODUCTION | ||
11 | |||
12 | Wide Area Networks (WANs) are used to interconnect Local Area Networks (LANs) | ||
13 | and/or stand-alone hosts over vast distances with data transfer rates | ||
14 | significantly higher than those achievable with commonly used dial-up | ||
15 | connections. | ||
16 | |||
17 | Usually an external device called `WAN router' sitting on your local network | ||
18 | or connected to your machine's serial port provides physical connection to | ||
19 | WAN. Although router's job may be as simple as taking your local network | ||
20 | traffic, converting it to WAN format and piping it through the WAN link, these | ||
21 | devices are notoriously expensive, with prices as much as 2 - 5 times higher | ||
22 | then the price of a typical PC box. | ||
23 | |||
24 | Alternatively, considering robustness and multitasking capabilities of Linux, | ||
25 | an internal router can be built (most routers use some sort of stripped down | ||
26 | Unix-like operating system anyway). With a number of relatively inexpensive WAN | ||
27 | interface cards available on the market, a perfectly usable router can be | ||
28 | built for less than half a price of an external router. Yet a Linux box | ||
29 | acting as a router can still be used for other purposes, such as fire-walling, | ||
30 | running FTP, WWW or DNS server, etc. | ||
31 | |||
32 | This kernel module introduces the notion of a WAN Link Driver (WLD) to Linux | ||
33 | operating system and provides generic hardware-independent services for such | ||
34 | drivers. Why can existing Linux network device interface not be used for | ||
35 | this purpose? Well, it can. However, there are a few key differences between | ||
36 | a typical network interface (e.g. Ethernet) and a WAN link. | ||
37 | |||
38 | Many WAN protocols, such as X.25 and frame relay, allow for multiple logical | ||
39 | connections (known as `virtual circuits' in X.25 terminology) over a single | ||
40 | physical link. Each such virtual circuit may (and almost always does) lead | ||
41 | to a different geographical location and, therefore, different network. As a | ||
42 | result, it is the virtual circuit, not the physical link, that represents a | ||
43 | route and, therefore, a network interface in Linux terms. | ||
44 | |||
45 | To further complicate things, virtual circuits are usually volatile in nature | ||
46 | (excluding so called `permanent' virtual circuits or PVCs). With almost no | ||
47 | time required to set up and tear down a virtual circuit, it is highly desirable | ||
48 | to implement on-demand connections in order to minimize network charges. So | ||
49 | unlike a typical network driver, the WAN driver must be able to handle multiple | ||
50 | network interfaces and cope as multiple virtual circuits come into existence | ||
51 | and go away dynamically. | ||
52 | |||
53 | Last, but not least, WAN configuration is much more complex than that of say | ||
54 | Ethernet and may well amount to several dozens of parameters. Some of them | ||
55 | are "link-wide" while others are virtual circuit-specific. The same holds | ||
56 | true for WAN statistics which is by far more extensive and extremely useful | ||
57 | when troubleshooting WAN connections. Extending the ifconfig utility to suit | ||
58 | these needs may be possible, but does not seem quite reasonable. Therefore, a | ||
59 | WAN configuration utility and corresponding application programmer's interface | ||
60 | is needed for this purpose. | ||
61 | |||
62 | Most of these problems are taken care of by this module. Its goal is to | ||
63 | provide a user with more-or-less standard look and feel for all WAN devices and | ||
64 | assist a WAN device driver writer by providing common services, such as: | ||
65 | |||
66 | o User-level interface via /proc file system | ||
67 | o Centralized configuration | ||
68 | o Device management (setup, shutdown, etc.) | ||
69 | o Network interface management (dynamic creation/destruction) | ||
70 | o Protocol encapsulation/decapsulation | ||
71 | |||
72 | To ba able to use the Linux WAN Router you will also need a WAN Tools package | ||
73 | available from | ||
74 | |||
75 | ftp.sangoma.com/pub/linux/current_wanpipe/wanpipe-X.Y.Z.tgz | ||
76 | |||
77 | where vX.Y.Z represent the wanpipe version number. | ||
78 | |||
79 | For technical questions and/or comments please e-mail to ncorbic@sangoma.com. | ||
80 | For general inquiries please contact Sangoma Technologies Inc. by | ||
81 | |||
82 | Hotline: 1-800-388-2475 (USA and Canada, toll free) | ||
83 | Phone: (905) 474-1990 ext: 106 | ||
84 | Fax: (905) 474-9223 | ||
85 | E-mail: dm@sangoma.com (David Mandelstam) | ||
86 | WWW: http://www.sangoma.com | ||
87 | |||
88 | |||
89 | INSTALLATION | ||
90 | |||
91 | Please read the WanpipeForLinux.pdf manual on how to | ||
92 | install the WANPIPE tools and drivers properly. | ||
93 | |||
94 | |||
95 | After installing wanpipe package: /usr/local/wanrouter/doc. | ||
96 | On the ftp.sangoma.com : /linux/current_wanpipe/doc | ||
97 | |||
98 | |||
99 | COPYRIGHT AND LICENSING INFORMATION | ||
100 | |||
101 | This program is free software; you can redistribute it and/or modify it under | ||
102 | the terms of the GNU General Public License as published by the Free Software | ||
103 | Foundation; either version 2, or (at your option) any later version. | ||
104 | |||
105 | This program is distributed in the hope that it will be useful, but WITHOUT | ||
106 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
107 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
108 | |||
109 | You should have received a copy of the GNU General Public License along with | ||
110 | this program; if not, write to the Free Software Foundation, Inc., 675 Mass | ||
111 | Ave, Cambridge, MA 02139, USA. | ||
112 | |||
113 | |||
114 | |||
115 | ACKNOWLEDGEMENTS | ||
116 | |||
117 | This product is based on the WANPIPE(tm) Multiprotocol WAN Router developed | ||
118 | by Sangoma Technologies Inc. for Linux 2.0.x and 2.2.x. Success of the WANPIPE | ||
119 | together with the next major release of Linux kernel in summer 1996 commanded | ||
120 | adequate changes to the WANPIPE code to take full advantage of new Linux | ||
121 | features. | ||
122 | |||
123 | Instead of continuing developing proprietary interface tied to Sangoma WAN | ||
124 | cards, we decided to separate all hardware-independent code into a separate | ||
125 | module and defined two levels of interfaces - one for user-level applications | ||
126 | and another for kernel-level WAN drivers. WANPIPE is now implemented as a | ||
127 | WAN driver compliant with the WAN Link Driver interface. Also a general | ||
128 | purpose WAN configuration utility and a set of shell scripts was developed to | ||
129 | support WAN router at the user level. | ||
130 | |||
131 | Many useful ideas concerning hardware-independent interface implementation | ||
132 | were given by Mike McLagan <mike.mclagan@linux.org> and his implementation | ||
133 | of the Frame Relay router and drivers for Sangoma cards (dlci/sdla). | ||
134 | |||
135 | With the new implementation of the APIs being incorporated into the WANPIPE, | ||
136 | a special thank goes to Alan Cox in providing insight into BSD sockets. | ||
137 | |||
138 | Special thanks to all the WANPIPE users who performed field-testing, reported | ||
139 | bugs and made valuable comments and suggestions that help us to improve this | ||
140 | product. | ||
141 | |||
142 | |||
143 | |||
144 | NEW IN THIS RELEASE | ||
145 | |||
146 | o Updated the WANCFG utility | ||
147 | Calls the pppconfig to configure the PPPD | ||
148 | for async connections. | ||
149 | |||
150 | o Added the PPPCONFIG utility | ||
151 | Used to configure the PPPD daemon for the | ||
152 | WANPIPE Async PPP and standard serial port. | ||
153 | The wancfg calls the pppconfig to configure | ||
154 | the pppd. | ||
155 | |||
156 | o Fixed the PCI autodetect feature. | ||
157 | The SLOT 0 was used as an autodetect option | ||
158 | however, some high end PC's slot numbers start | ||
159 | from 0. | ||
160 | |||
161 | o This release has been tested with the new backupd | ||
162 | daemon release. | ||
163 | |||
164 | |||
165 | PRODUCT COMPONENTS AND RELATED FILES | ||
166 | |||
167 | /etc: (or user defined) | ||
168 | wanpipe1.conf default router configuration file | ||
169 | |||
170 | /lib/modules/X.Y.Z/misc: | ||
171 | wanrouter.o router kernel loadable module | ||
172 | af_wanpipe.o wanpipe api socket module | ||
173 | |||
174 | /lib/modules/X.Y.Z/net: | ||
175 | sdladrv.o Sangoma SDLA support module | ||
176 | wanpipe.o Sangoma WANPIPE(tm) driver module | ||
177 | |||
178 | /proc/net/wanrouter | ||
179 | Config reads current router configuration | ||
180 | Status reads current router status | ||
181 | {name} reads WAN driver statistics | ||
182 | |||
183 | /usr/sbin: | ||
184 | wanrouter wanrouter start-up script | ||
185 | wanconfig wanrouter configuration utility | ||
186 | sdladump WANPIPE adapter memory dump utility | ||
187 | fpipemon Monitor for Frame Relay | ||
188 | cpipemon Monitor for Cisco HDLC | ||
189 | ppipemon Monitor for PPP | ||
190 | xpipemon Monitor for X25 | ||
191 | wpkbdmon WANPIPE keyboard led monitor/debugger | ||
192 | |||
193 | /usr/local/wanrouter: | ||
194 | README this file | ||
195 | COPYING GNU General Public License | ||
196 | Setup installation script | ||
197 | Filelist distribution definition file | ||
198 | wanrouter.rc meta-configuration file | ||
199 | (used by the Setup and wanrouter script) | ||
200 | |||
201 | /usr/local/wanrouter/doc: | ||
202 | wanpipeForLinux.pdf WAN Router User's Manual | ||
203 | |||
204 | /usr/local/wanrouter/patches: | ||
205 | wanrouter-v2213.gz patch for Linux kernels 2.2.11 up to 2.2.13. | ||
206 | wanrouter-v2214.gz patch for Linux kernel 2.2.14. | ||
207 | wanrouter-v2215.gz patch for Linux kernels 2.2.15 to 2.2.17. | ||
208 | wanrouter-v2218.gz patch for Linux kernels 2.2.18 and up. | ||
209 | wanrouter-v240.gz patch for Linux kernel 2.4.0. | ||
210 | wanrouter-v242.gz patch for Linux kernel 2.4.2 and up. | ||
211 | wanrouter-v2034.gz patch for Linux kernel 2.0.34 | ||
212 | wanrouter-v2036.gz patch for Linux kernel 2.0.36 and up. | ||
213 | |||
214 | /usr/local/wanrouter/patches/kdrivers: | ||
215 | Sources of the latest WANPIPE device drivers. | ||
216 | These are used to UPGRADE the linux kernel to the newest | ||
217 | version if the kernel source has already been patched with | ||
218 | WANPIPE drivers. | ||
219 | |||
220 | /usr/local/wanrouter/samples: | ||
221 | interface sample interface configuration file | ||
222 | wanpipe1.cpri CHDLC primary port | ||
223 | wanpipe2.csec CHDLC secondary port | ||
224 | wanpipe1.fr Frame Relay protocol | ||
225 | wanpipe1.ppp PPP protocol ) | ||
226 | wanpipe1.asy CHDLC ASYNC protocol | ||
227 | wanpipe1.x25 X25 protocol | ||
228 | wanpipe1.stty Sync TTY driver (Used by Kernel PPPD daemon) | ||
229 | wanpipe1.atty Async TTY driver (Used by Kernel PPPD daemon) | ||
230 | wanrouter.rc sample meta-configuration file | ||
231 | |||
232 | /usr/local/wanrouter/util: | ||
233 | * wan-tools utilities source code | ||
234 | |||
235 | /usr/local/wanrouter/api/x25: | ||
236 | * x25 api sample programs. | ||
237 | /usr/local/wanrouter/api/chdlc: | ||
238 | * chdlc api sample programs. | ||
239 | /usr/local/wanrouter/api/fr: | ||
240 | * fr api sample programs. | ||
241 | /usr/local/wanrouter/config/wancfg: | ||
242 | wancfg WANPIPE GUI configuration program. | ||
243 | Creates wanpipe#.conf files. | ||
244 | /usr/local/wanrouter/config/cfgft1: | ||
245 | cfgft1 GUI CSU/DSU configuration program. | ||
246 | |||
247 | /usr/include/linux: | ||
248 | wanrouter.h router API definitions | ||
249 | wanpipe.h WANPIPE API definitions | ||
250 | sdladrv.h SDLA support module API definitions | ||
251 | sdlasfm.h SDLA firmware module definitions | ||
252 | if_wanpipe.h WANPIPE Socket definitions | ||
253 | sdlapci.h WANPIPE PCI definitions | ||
254 | |||
255 | |||
256 | /usr/src/linux/net/wanrouter: | ||
257 | * wanrouter source code | ||
258 | |||
259 | /var/log: | ||
260 | wanrouter wanrouter start-up log (created by the Setup script) | ||
261 | |||
262 | /var/lock: (or /var/lock/subsys for RedHat) | ||
263 | wanrouter wanrouter lock file (created by the Setup script) | ||
264 | |||
265 | /usr/local/wanrouter/firmware: | ||
266 | fr514.sfm Frame relay firmware for Sangoma S508/S514 card | ||
267 | cdual514.sfm Dual Port Cisco HDLC firmware for Sangoma S508/S514 card | ||
268 | ppp514.sfm PPP Firmware for Sangoma S508 and S514 cards | ||
269 | x25_508.sfm X25 Firmware for Sangoma S508 card. | ||
270 | |||
271 | |||
272 | REVISION HISTORY | ||
273 | |||
274 | 1.0.0 December 31, 1996 Initial version | ||
275 | |||
276 | 1.0.1 January 30, 1997 Status and statistics can be read via /proc | ||
277 | filesystem entries. | ||
278 | |||
279 | 1.0.2 April 30, 1997 Added UDP management via monitors. | ||
280 | |||
281 | 1.0.3 June 3, 1997 UDP management for multiple boards using Frame | ||
282 | Relay and PPP | ||
283 | Enabled continuous transmission of Configure | ||
284 | Request Packet for PPP (for 508 only) | ||
285 | Connection Timeout for PPP changed from 900 to 0 | ||
286 | Flow Control Problem fixed for Frame Relay | ||
287 | |||
288 | 1.0.4 July 10, 1997 S508/FT1 monitoring capability in fpipemon and | ||
289 | ppipemon utilities. | ||
290 | Configurable TTL for UDP packets. | ||
291 | Multicast and Broadcast IP source addresses are | ||
292 | silently discarded. | ||
293 | |||
294 | 1.0.5 July 28, 1997 Configurable T391,T392,N391,N392,N393 for Frame | ||
295 | Relay in router.conf. | ||
296 | Configurable Memory Address through router.conf | ||
297 | for Frame Relay, PPP and X.25. (commenting this | ||
298 | out enables auto-detection). | ||
299 | Fixed freeing up received buffers using kfree() | ||
300 | for Frame Relay and X.25. | ||
301 | Protect sdla_peek() by calling save_flags(), | ||
302 | cli() and restore_flags(). | ||
303 | Changed number of Trace elements from 32 to 20 | ||
304 | Added DLCI specific data monitoring in FPIPEMON. | ||
305 | 2.0.0 Nov 07, 1997 Implemented protection of RACE conditions by | ||
306 | critical flags for FRAME RELAY and PPP. | ||
307 | DLCI List interrupt mode implemented. | ||
308 | IPX support in FRAME RELAY and PPP. | ||
309 | IPX Server Support (MARS) | ||
310 | More driver specific stats included in FPIPEMON | ||
311 | and PIPEMON. | ||
312 | |||
313 | 2.0.1 Nov 28, 1997 Bug Fixes for version 2.0.0. | ||
314 | Protection of "enable_irq()" while | ||
315 | "disable_irq()" has been enabled from any other | ||
316 | routine (for Frame Relay, PPP and X25). | ||
317 | Added additional Stats for Fpipemon and Ppipemon | ||
318 | Improved Load Sharing for multiple boards | ||
319 | |||
320 | 2.0.2 Dec 09, 1997 Support for PAP and CHAP for ppp has been | ||
321 | implemented. | ||
322 | |||
323 | 2.0.3 Aug 15, 1998 New release supporting Cisco HDLC, CIR for Frame | ||
324 | relay, Dynamic IP assignment for PPP and Inverse | ||
325 | Arp support for Frame-relay. Man Pages are | ||
326 | included for better support and a new utility | ||
327 | for configuring FT1 cards. | ||
328 | |||
329 | 2.0.4 Dec 09, 1998 Dual Port support for Cisco HDLC. | ||
330 | Support for HDLC (LAPB) API. | ||
331 | Supports BiSync Streaming code for S502E | ||
332 | and S503 cards. | ||
333 | Support for Streaming HDLC API. | ||
334 | Provides a BSD socket interface for | ||
335 | creating applications using BiSync | ||
336 | streaming. | ||
337 | |||
338 | 2.0.5 Aug 04, 1999 CHDLC initialization bug fix. | ||
339 | PPP interrupt driven driver: | ||
340 | Fix to the PPP line hangup problem. | ||
341 | New PPP firmware | ||
342 | Added comments to the startup SYSTEM ERROR messages | ||
343 | Xpipemon debugging application for the X25 protocol | ||
344 | New USER_MANUAL.txt | ||
345 | Fixed the odd boundary 4byte writes to the board. | ||
346 | BiSync Streaming code has been taken out. | ||
347 | Available as a patch. | ||
348 | Streaming HDLC API has been taken out. | ||
349 | Available as a patch. | ||
350 | |||
351 | 2.0.6 Aug 17, 1999 Increased debugging in statup scripts | ||
352 | Fixed installation bugs from 2.0.5 | ||
353 | Kernel patch works for both 2.2.10 and 2.2.11 kernels. | ||
354 | There is no functional difference between the two packages | ||
355 | |||
356 | 2.0.7 Aug 26, 1999 o Merged X25API code into WANPIPE. | ||
357 | o Fixed a memory leak for X25API | ||
358 | o Updated the X25API code for 2.2.X kernels. | ||
359 | o Improved NEM handling. | ||
360 | |||
361 | 2.1.0 Oct 25, 1999 o New code for S514 PCI Card | ||
362 | o New CHDLC and Frame Relay drivers | ||
363 | o PPP and X25 are not supported in this release | ||
364 | |||
365 | 2.1.1 Nov 30, 1999 o PPP support for S514 PCI Cards | ||
366 | |||
367 | 2.1.3 Apr 06, 2000 o Socket based x25api | ||
368 | o Socket based chdlc api | ||
369 | o Socket based fr api | ||
370 | o Dual Port Receive only CHDLC support. | ||
371 | o Asynchronous CHDLC support (Secondary Port) | ||
372 | o cfgft1 GUI csu/dsu configurator | ||
373 | o wancfg GUI configuration file | ||
374 | configurator. | ||
375 | o Architectural directory changes. | ||
376 | |||
377 | beta-2.1.4 Jul 2000 o Dynamic interface configuration: | ||
378 | Network interfaces reflect the state | ||
379 | of protocol layer. If the protocol becomes | ||
380 | disconnected, driver will bring down | ||
381 | the interface. Once the protocol reconnects | ||
382 | the interface will be brought up. | ||
383 | |||
384 | Note: This option is turned off by default. | ||
385 | |||
386 | o Dynamic wanrouter setup using 'wanconfig': | ||
387 | wanconfig utility can be used to | ||
388 | shutdown,restart,start or reconfigure | ||
389 | a virtual circuit dynamically. | ||
390 | |||
391 | Frame Relay: Each DLCI can be: | ||
392 | created,stopped,restarted and reconfigured | ||
393 | dynamically using wanconfig. | ||
394 | |||
395 | ex: wanconfig card wanpipe1 dev wp1_fr16 up | ||
396 | |||
397 | o Wanrouter startup via command line arguments: | ||
398 | wanconfig also supports wanrouter startup via command line | ||
399 | arguments. Thus, there is no need to create a wanpipe#.conf | ||
400 | configuration file. | ||
401 | |||
402 | o Socket based x25api update/bug fixes. | ||
403 | Added support for LCN numbers greater than 255. | ||
404 | Option to pass up modem messages. | ||
405 | Provided a PCI IRQ check, so a single S514 | ||
406 | card is guaranteed to have a non-sharing interrupt. | ||
407 | |||
408 | o Fixes to the wancfg utility. | ||
409 | o New FT1 debugging support via *pipemon utilities. | ||
410 | o Frame Relay ARP support Enabled. | ||
411 | |||
412 | beta3-2.1.4 Jul 2000 o X25 M_BIT Problem fix. | ||
413 | o Added the Multi-Port PPP | ||
414 | Updated utilities for the Multi-Port PPP. | ||
415 | |||
416 | 2.1.4 Aut 2000 | ||
417 | o In X25API: | ||
418 | Maximum packet an application can send | ||
419 | to the driver has been extended to 4096 bytes. | ||
420 | |||
421 | Fixed the x25 startup bug. Enable | ||
422 | communications only after all interfaces | ||
423 | come up. HIGH SVC/PVC is used to calculate | ||
424 | the number of channels. | ||
425 | Enable protocol only after all interfaces | ||
426 | are enabled. | ||
427 | |||
428 | o Added an extra state to the FT1 config, kernel module. | ||
429 | o Updated the pipemon debuggers. | ||
430 | |||
431 | o Blocked the Multi-Port PPP from running on kernels | ||
432 | 2.2.16 or greater, due to syncppp kernel module | ||
433 | change. | ||
434 | |||
435 | beta1-2.1.5 Nov 15 2000 | ||
436 | o Fixed the MultiPort PPP Support for kernels 2.2.16 and above. | ||
437 | 2.2.X kernels only | ||
438 | |||
439 | o Secured the driver UDP debugging calls | ||
440 | - All illegal network debugging calls are reported to | ||
441 | the log. | ||
442 | - Defined a set of allowed commands, all other denied. | ||
443 | |||
444 | o Cpipemon | ||
445 | - Added set FT1 commands to the cpipemon. Thus CSU/DSU | ||
446 | configuration can be performed using cpipemon. | ||
447 | All systems that cannot run cfgft1 GUI utility should | ||
448 | use cpipemon to configure the on board CSU/DSU. | ||
449 | |||
450 | |||
451 | o Keyboard Led Monitor/Debugger | ||
452 | - A new utility /usr/sbin/wpkbdmon uses keyboard leds | ||
453 | to convey operational statistic information of the | ||
454 | Sangoma WANPIPE cards. | ||
455 | NUM_LOCK = Line State (On=connected, Off=disconnected) | ||
456 | CAPS_LOCK = Tx data (On=transmitting, Off=no tx data) | ||
457 | SCROLL_LOCK = Rx data (On=receiving, Off=no rx data | ||
458 | |||
459 | o Hardware probe on module load and dynamic device allocation | ||
460 | - During WANPIPE module load, all Sangoma cards are probed | ||
461 | and found information is printed in the /var/log/messages. | ||
462 | - If no cards are found, the module load fails. | ||
463 | - Appropriate number of devices are dynamically loaded | ||
464 | based on the number of Sangoma cards found. | ||
465 | |||
466 | Note: The kernel configuration option | ||
467 | CONFIG_WANPIPE_CARDS has been taken out. | ||
468 | |||
469 | o Fixed the Frame Relay and Chdlc network interfaces so they are | ||
470 | compatible with libpcap libraries. Meaning, tcpdump, snort, | ||
471 | ethereal, and all other packet sniffers and debuggers work on | ||
472 | all WANPIPE network interfaces. | ||
473 | - Set the network interface encoding type to ARPHRD_PPP. | ||
474 | This tell the sniffers that data obtained from the | ||
475 | network interface is in pure IP format. | ||
476 | Fix for 2.2.X kernels only. | ||
477 | |||
478 | o True interface encoding option for Frame Relay and CHDLC | ||
479 | - The above fix sets the network interface encoding | ||
480 | type to ARPHRD_PPP, however some customers use | ||
481 | the encoding interface type to determine the | ||
482 | protocol running. Therefore, the TURE ENCODING | ||
483 | option will set the interface type back to the | ||
484 | original value. | ||
485 | |||
486 | NOTE: If this option is used with Frame Relay and CHDLC | ||
487 | libpcap library support will be broken. | ||
488 | i.e. tcpdump will not work. | ||
489 | Fix for 2.2.x Kernels only. | ||
490 | |||
491 | o Ethernet Bridgind over Frame Relay | ||
492 | - The Frame Relay bridging has been developed by | ||
493 | Kristian Hoffmann and Mark Wells. | ||
494 | - The Linux kernel bridge is used to send ethernet | ||
495 | data over the frame relay links. | ||
496 | For 2.2.X Kernels only. | ||
497 | |||
498 | o Added extensive 2.0.X support. Most new features of | ||
499 | 2.1.5 for protocols Frame Relay, PPP and CHDLC are | ||
500 | supported under 2.0.X kernels. | ||
501 | |||
502 | beta1-2.2.0 Dec 30 2000 | ||
503 | o Updated drivers for 2.4.X kernels. | ||
504 | o Updated drivers for SMP support. | ||
505 | o X25API is now able to share PCI interrupts. | ||
506 | o Took out a general polling routine that was used | ||
507 | only by X25API. | ||
508 | o Added appropriate locks to the dynamic reconfiguration | ||
509 | code. | ||
510 | o Fixed a bug in the keyboard debug monitor. | ||
511 | |||
512 | beta2-2.2.0 Jan 8 2001 | ||
513 | o Patches for 2.4.0 kernel | ||
514 | o Patches for 2.2.18 kernel | ||
515 | o Minor updates to PPP and CHLDC drivers. | ||
516 | Note: No functional difference. | ||
517 | |||
518 | beta3-2.2.9 Jan 10 2001 | ||
519 | o I missed the 2.2.18 kernel patches in beta2-2.2.0 | ||
520 | release. They are included in this release. | ||
521 | |||
522 | Stable Release | ||
523 | 2.2.0 Feb 01 2001 | ||
524 | o Bug fix in wancfg GUI configurator. | ||
525 | The edit function didn't work properly. | ||
526 | |||
527 | |||
528 | bata1-2.2.1 Feb 09 2001 | ||
529 | o WANPIPE TTY Driver emulation. | ||
530 | Two modes of operation Sync and Async. | ||
531 | Sync: Using the PPPD daemon, kernel SyncPPP layer | ||
532 | and the Wanpipe sync TTY driver: a PPP protocol | ||
533 | connection can be established via Sangoma adapter, over | ||
534 | a T1 leased line. | ||
535 | |||
536 | The 2.4.0 kernel PPP layer supports MULTILINK | ||
537 | protocol, that can be used to bundle any number of Sangoma | ||
538 | adapters (T1 lines) into one, under a single IP address. | ||
539 | Thus, efficiently obtaining multiple T1 throughput. | ||
540 | |||
541 | NOTE: The remote side must also implement MULTILINK PPP | ||
542 | protocol. | ||
543 | |||
544 | Async:Using the PPPD daemon, kernel AsyncPPP layer | ||
545 | and the WANPIPE async TTY driver: a PPP protocol | ||
546 | connection can be established via Sangoma adapter and | ||
547 | a modem, over a telephone line. | ||
548 | |||
549 | Thus, the WANPIPE async TTY driver simulates a serial | ||
550 | TTY driver that would normally be used to interface the | ||
551 | MODEM to the linux kernel. | ||
552 | |||
553 | o WANPIPE PPP Backup Utility | ||
554 | This utility will monitor the state of the PPP T1 line. | ||
555 | In case of failure, a dial up connection will be established | ||
556 | via pppd daemon, ether via a serial tty driver (serial port), | ||
557 | or a WANPIPE async TTY driver (in case serial port is unavailable). | ||
558 | |||
559 | Furthermore, while in dial up mode, the primary PPP T1 link | ||
560 | will be monitored for signs of life. | ||
561 | |||
562 | If the PPP T1 link comes back to life, the dial up connection | ||
563 | will be shutdown and T1 line re-established. | ||
564 | |||
565 | |||
566 | o New Setup installation script. | ||
567 | Option to UPGRADE device drivers if the kernel source has | ||
568 | already been patched with WANPIPE. | ||
569 | |||
570 | Option to COMPILE WANPIPE modules against the currently | ||
571 | running kernel, thus no need for manual kernel and module | ||
572 | re-compilation. | ||
573 | |||
574 | o Updates and Bug Fixes to wancfg utility. | ||
575 | |||
576 | bata2-2.2.1 Feb 20 2001 | ||
577 | |||
578 | o Bug fixes to the CHDLC device drivers. | ||
579 | The driver had compilation problems under kernels | ||
580 | 2.2.14 or lower. | ||
581 | |||
582 | o Bug fixes to the Setup installation script. | ||
583 | The device drivers compilation options didn't work | ||
584 | properly. | ||
585 | |||
586 | o Update to the wpbackupd daemon. | ||
587 | Optimized the cross-over times, between the primary | ||
588 | link and the backup dialup. | ||
589 | |||
590 | beta3-2.2.1 Mar 02 2001 | ||
591 | o Patches for 2.4.2 kernel. | ||
592 | |||
593 | o Bug fixes to util/ make files. | ||
594 | o Bug fixes to the Setup installation script. | ||
595 | |||
596 | o Took out the backupd support and made it into | ||
597 | as separate package. | ||
598 | |||
599 | beta4-2.2.1 Mar 12 2001 | ||
600 | |||
601 | o Fix to the Frame Relay Device driver. | ||
602 | IPSAC sends a packet of zero length | ||
603 | header to the frame relay driver. The | ||
604 | driver tries to push its own 2 byte header | ||
605 | into the packet, which causes the driver to | ||
606 | crash. | ||
607 | |||
608 | o Fix the WANPIPE re-configuration code. | ||
609 | Bug was found by trying to run the cfgft1 while the | ||
610 | interface was already running. | ||
611 | |||
612 | o Updates to cfgft1. | ||
613 | Writes a wanpipe#.cfgft1 configuration file | ||
614 | once the CSU/DSU is configured. This file can | ||
615 | holds the current CSU/DSU configuration. | ||
616 | |||
617 | |||
618 | |||
619 | >>>>>> END OF README <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
620 | |||
621 | |||
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 461e4f1dbec4..421e7d00ffd0 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -196,6 +196,11 @@ its parent; and can't be removed or suspended after that parent. | |||
196 | 196 | ||
197 | The policy is that the device tree should match hardware bus topology. | 197 | The policy is that the device tree should match hardware bus topology. |
198 | (Or at least the control bus, for devices which use multiple busses.) | 198 | (Or at least the control bus, for devices which use multiple busses.) |
199 | In particular, this means that a device registration may fail if the parent of | ||
200 | the device is suspending (ie. has been chosen by the PM core as the next | ||
201 | device to suspend) or has already suspended, as well as after all of the other | ||
202 | devices have been suspended. Device drivers must be prepared to cope with such | ||
203 | situations. | ||
199 | 204 | ||
200 | 205 | ||
201 | Suspending Devices | 206 | Suspending Devices |
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 7b4e8a70882c..4cc780024e6c 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -59,12 +59,39 @@ Table of Contents | |||
59 | p) Freescale Synchronous Serial Interface | 59 | p) Freescale Synchronous Serial Interface |
60 | q) USB EHCI controllers | 60 | q) USB EHCI controllers |
61 | 61 | ||
62 | VII - Specifying interrupt information for devices | 62 | VII - Marvell Discovery mv64[345]6x System Controller chips |
63 | 1) The /system-controller node | ||
64 | 2) Child nodes of /system-controller | ||
65 | a) Marvell Discovery MDIO bus | ||
66 | b) Marvell Discovery ethernet controller | ||
67 | c) Marvell Discovery PHY nodes | ||
68 | d) Marvell Discovery SDMA nodes | ||
69 | e) Marvell Discovery BRG nodes | ||
70 | f) Marvell Discovery CUNIT nodes | ||
71 | g) Marvell Discovery MPSCROUTING nodes | ||
72 | h) Marvell Discovery MPSCINTR nodes | ||
73 | i) Marvell Discovery MPSC nodes | ||
74 | j) Marvell Discovery Watch Dog Timer nodes | ||
75 | k) Marvell Discovery I2C nodes | ||
76 | l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes | ||
77 | m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes | ||
78 | n) Marvell Discovery GPP (General Purpose Pins) nodes | ||
79 | o) Marvell Discovery PCI host bridge node | ||
80 | p) Marvell Discovery CPU Error nodes | ||
81 | q) Marvell Discovery SRAM Controller nodes | ||
82 | r) Marvell Discovery PCI Error Handler nodes | ||
83 | s) Marvell Discovery Memory Controller nodes | ||
84 | |||
85 | VIII - Specifying interrupt information for devices | ||
63 | 1) interrupts property | 86 | 1) interrupts property |
64 | 2) interrupt-parent property | 87 | 2) interrupt-parent property |
65 | 3) OpenPIC Interrupt Controllers | 88 | 3) OpenPIC Interrupt Controllers |
66 | 4) ISA Interrupt Controllers | 89 | 4) ISA Interrupt Controllers |
67 | 90 | ||
91 | VIII - Specifying GPIO information for devices | ||
92 | 1) gpios property | ||
93 | 2) gpio-controller nodes | ||
94 | |||
68 | Appendix A - Sample SOC node for MPC8540 | 95 | Appendix A - Sample SOC node for MPC8540 |
69 | 96 | ||
70 | 97 | ||
@@ -1269,10 +1296,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1269 | 1296 | ||
1270 | Recommended properties: | 1297 | Recommended properties: |
1271 | 1298 | ||
1272 | - linux,network-index : This is the intended "index" of this | ||
1273 | network device. This is used by the bootwrapper to interpret | ||
1274 | MAC addresses passed by the firmware when no information other | ||
1275 | than indices is available to associate an address with a device. | ||
1276 | - phy-connection-type : a string naming the controller/PHY interface type, | 1299 | - phy-connection-type : a string naming the controller/PHY interface type, |
1277 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", | 1300 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", |
1278 | "tbi", or "rtbi". This property is only really needed if the connection | 1301 | "tbi", or "rtbi". This property is only really needed if the connection |
@@ -1622,8 +1645,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
1622 | - device_type : should be "network", "hldc", "uart", "transparent" | 1645 | - device_type : should be "network", "hldc", "uart", "transparent" |
1623 | "bisync", "atm", or "serial". | 1646 | "bisync", "atm", or "serial". |
1624 | - compatible : could be "ucc_geth" or "fsl_atm" and so on. | 1647 | - compatible : could be "ucc_geth" or "fsl_atm" and so on. |
1625 | - model : should be "UCC". | 1648 | - cell-index : the ucc number(1-8), corresponding to UCCx in UM. |
1626 | - device-id : the ucc number(1-8), corresponding to UCCx in UM. | ||
1627 | - reg : Offset and length of the register set for the device | 1649 | - reg : Offset and length of the register set for the device |
1628 | - interrupts : <a b> where a is the interrupt number and b is a | 1650 | - interrupts : <a b> where a is the interrupt number and b is a |
1629 | field that represents an encoding of the sense and level | 1651 | field that represents an encoding of the sense and level |
@@ -1667,10 +1689,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1667 | - phy-handle : The phandle for the PHY connected to this controller. | 1689 | - phy-handle : The phandle for the PHY connected to this controller. |
1668 | 1690 | ||
1669 | Recommended properties: | 1691 | Recommended properties: |
1670 | - linux,network-index : This is the intended "index" of this | ||
1671 | network device. This is used by the bootwrapper to interpret | ||
1672 | MAC addresses passed by the firmware when no information other | ||
1673 | than indices is available to associate an address with a device. | ||
1674 | - phy-connection-type : a string naming the controller/PHY interface type, | 1692 | - phy-connection-type : a string naming the controller/PHY interface type, |
1675 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal | 1693 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal |
1676 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), | 1694 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), |
@@ -1680,8 +1698,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
1680 | ucc@2000 { | 1698 | ucc@2000 { |
1681 | device_type = "network"; | 1699 | device_type = "network"; |
1682 | compatible = "ucc_geth"; | 1700 | compatible = "ucc_geth"; |
1683 | model = "UCC"; | 1701 | cell-index = <1>; |
1684 | device-id = <1>; | ||
1685 | reg = <2000 200>; | 1702 | reg = <2000 200>; |
1686 | interrupts = <a0 0>; | 1703 | interrupts = <a0 0>; |
1687 | interrupt-parent = <700>; | 1704 | interrupt-parent = <700>; |
@@ -1995,7 +2012,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
1995 | interrupts = <20 8>; | 2012 | interrupts = <20 8>; |
1996 | interrupt-parent = <&PIC>; | 2013 | interrupt-parent = <&PIC>; |
1997 | phy-handle = <&PHY0>; | 2014 | phy-handle = <&PHY0>; |
1998 | linux,network-index = <0>; | ||
1999 | fsl,cpm-command = <12000300>; | 2015 | fsl,cpm-command = <12000300>; |
2000 | }; | 2016 | }; |
2001 | 2017 | ||
@@ -2217,12 +2233,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
2217 | EMAC, that is the content of the current (bogus) "phy-port" | 2233 | EMAC, that is the content of the current (bogus) "phy-port" |
2218 | property. | 2234 | property. |
2219 | 2235 | ||
2220 | Recommended properties: | ||
2221 | - linux,network-index : This is the intended "index" of this | ||
2222 | network device. This is used by the bootwrapper to interpret | ||
2223 | MAC addresses passed by the firmware when no information other | ||
2224 | than indices is available to associate an address with a device. | ||
2225 | |||
2226 | Optional properties: | 2236 | Optional properties: |
2227 | - phy-address : 1 cell, optional, MDIO address of the PHY. If absent, | 2237 | - phy-address : 1 cell, optional, MDIO address of the PHY. If absent, |
2228 | a search is performed. | 2238 | a search is performed. |
@@ -2246,7 +2256,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
2246 | Example: | 2256 | Example: |
2247 | 2257 | ||
2248 | EMAC0: ethernet@40000800 { | 2258 | EMAC0: ethernet@40000800 { |
2249 | linux,network-index = <0>; | ||
2250 | device_type = "network"; | 2259 | device_type = "network"; |
2251 | compatible = "ibm,emac-440gp", "ibm,emac"; | 2260 | compatible = "ibm,emac-440gp", "ibm,emac"; |
2252 | interrupt-parent = <&UIC1>; | 2261 | interrupt-parent = <&UIC1>; |
@@ -2817,9 +2826,528 @@ platforms are moved over to use the flattened-device-tree model. | |||
2817 | }; | 2826 | }; |
2818 | 2827 | ||
2819 | 2828 | ||
2820 | More devices will be defined as this spec matures. | 2829 | VII - Marvell Discovery mv64[345]6x System Controller chips |
2830 | =========================================================== | ||
2831 | |||
2832 | The Marvell mv64[345]60 series of system controller chips contain | ||
2833 | many of the peripherals needed to implement a complete computer | ||
2834 | system. In this section, we define device tree nodes to describe | ||
2835 | the system controller chip itself and each of the peripherals | ||
2836 | which it contains. Compatible string values for each node are | ||
2837 | prefixed with the string "marvell,", for Marvell Technology Group Ltd. | ||
2838 | |||
2839 | 1) The /system-controller node | ||
2840 | |||
2841 | This node is used to represent the system-controller and must be | ||
2842 | present when the system uses a system contller chip. The top-level | ||
2843 | system-controller node contains information that is global to all | ||
2844 | devices within the system controller chip. The node name begins | ||
2845 | with "system-controller" followed by the unit address, which is | ||
2846 | the base address of the memory-mapped register set for the system | ||
2847 | controller chip. | ||
2848 | |||
2849 | Required properties: | ||
2850 | |||
2851 | - ranges : Describes the translation of system controller addresses | ||
2852 | for memory mapped registers. | ||
2853 | - clock-frequency: Contains the main clock frequency for the system | ||
2854 | controller chip. | ||
2855 | - reg : This property defines the address and size of the | ||
2856 | memory-mapped registers contained within the system controller | ||
2857 | chip. The address specified in the "reg" property should match | ||
2858 | the unit address of the system-controller node. | ||
2859 | - #address-cells : Address representation for system controller | ||
2860 | devices. This field represents the number of cells needed to | ||
2861 | represent the address of the memory-mapped registers of devices | ||
2862 | within the system controller chip. | ||
2863 | - #size-cells : Size representation for for the memory-mapped | ||
2864 | registers within the system controller chip. | ||
2865 | - #interrupt-cells : Defines the width of cells used to represent | ||
2866 | interrupts. | ||
2867 | |||
2868 | Optional properties: | ||
2869 | |||
2870 | - model : The specific model of the system controller chip. Such | ||
2871 | as, "mv64360", "mv64460", or "mv64560". | ||
2872 | - compatible : A string identifying the compatibility identifiers | ||
2873 | of the system controller chip. | ||
2874 | |||
2875 | The system-controller node contains child nodes for each system | ||
2876 | controller device that the platform uses. Nodes should not be created | ||
2877 | for devices which exist on the system controller chip but are not used | ||
2878 | |||
2879 | Example Marvell Discovery mv64360 system-controller node: | ||
2880 | |||
2881 | system-controller@f1000000 { /* Marvell Discovery mv64360 */ | ||
2882 | #address-cells = <1>; | ||
2883 | #size-cells = <1>; | ||
2884 | model = "mv64360"; /* Default */ | ||
2885 | compatible = "marvell,mv64360"; | ||
2886 | clock-frequency = <133333333>; | ||
2887 | reg = <0xf1000000 0x10000>; | ||
2888 | virtual-reg = <0xf1000000>; | ||
2889 | ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */ | ||
2890 | 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */ | ||
2891 | 0xa0000000 0xa0000000 0x4000000 /* User FLASH */ | ||
2892 | 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */ | ||
2893 | 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */ | ||
2894 | |||
2895 | [ child node definitions... ] | ||
2896 | } | ||
2897 | |||
2898 | 2) Child nodes of /system-controller | ||
2899 | |||
2900 | a) Marvell Discovery MDIO bus | ||
2901 | |||
2902 | The MDIO is a bus to which the PHY devices are connected. For each | ||
2903 | device that exists on this bus, a child node should be created. See | ||
2904 | the definition of the PHY node below for an example of how to define | ||
2905 | a PHY. | ||
2906 | |||
2907 | Required properties: | ||
2908 | - #address-cells : Should be <1> | ||
2909 | - #size-cells : Should be <0> | ||
2910 | - device_type : Should be "mdio" | ||
2911 | - compatible : Should be "marvell,mv64360-mdio" | ||
2912 | |||
2913 | Example: | ||
2914 | |||
2915 | mdio { | ||
2916 | #address-cells = <1>; | ||
2917 | #size-cells = <0>; | ||
2918 | device_type = "mdio"; | ||
2919 | compatible = "marvell,mv64360-mdio"; | ||
2920 | |||
2921 | ethernet-phy@0 { | ||
2922 | ...... | ||
2923 | }; | ||
2924 | }; | ||
2925 | |||
2926 | |||
2927 | b) Marvell Discovery ethernet controller | ||
2928 | |||
2929 | The Discover ethernet controller is described with two levels | ||
2930 | of nodes. The first level describes an ethernet silicon block | ||
2931 | and the second level describes up to 3 ethernet nodes within | ||
2932 | that block. The reason for the multiple levels is that the | ||
2933 | registers for the node are interleaved within a single set | ||
2934 | of registers. The "ethernet-block" level describes the | ||
2935 | shared register set, and the "ethernet" nodes describe ethernet | ||
2936 | port-specific properties. | ||
2937 | |||
2938 | Ethernet block node | ||
2939 | |||
2940 | Required properties: | ||
2941 | - #address-cells : <1> | ||
2942 | - #size-cells : <0> | ||
2943 | - compatible : "marvell,mv64360-eth-block" | ||
2944 | - reg : Offset and length of the register set for this block | ||
2945 | |||
2946 | Example Discovery Ethernet block node: | ||
2947 | ethernet-block@2000 { | ||
2948 | #address-cells = <1>; | ||
2949 | #size-cells = <0>; | ||
2950 | compatible = "marvell,mv64360-eth-block"; | ||
2951 | reg = <0x2000 0x2000>; | ||
2952 | ethernet@0 { | ||
2953 | ....... | ||
2954 | }; | ||
2955 | }; | ||
2956 | |||
2957 | Ethernet port node | ||
2958 | |||
2959 | Required properties: | ||
2960 | - device_type : Should be "network". | ||
2961 | - compatible : Should be "marvell,mv64360-eth". | ||
2962 | - reg : Should be <0>, <1>, or <2>, according to which registers | ||
2963 | within the silicon block the device uses. | ||
2964 | - interrupts : <a> where a is the interrupt number for the port. | ||
2965 | - interrupt-parent : the phandle for the interrupt controller | ||
2966 | that services interrupts for this device. | ||
2967 | - phy : the phandle for the PHY connected to this ethernet | ||
2968 | controller. | ||
2969 | - local-mac-address : 6 bytes, MAC address | ||
2970 | |||
2971 | Example Discovery Ethernet port node: | ||
2972 | ethernet@0 { | ||
2973 | device_type = "network"; | ||
2974 | compatible = "marvell,mv64360-eth"; | ||
2975 | reg = <0>; | ||
2976 | interrupts = <32>; | ||
2977 | interrupt-parent = <&PIC>; | ||
2978 | phy = <&PHY0>; | ||
2979 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
2980 | }; | ||
2981 | |||
2982 | |||
2983 | |||
2984 | c) Marvell Discovery PHY nodes | ||
2985 | |||
2986 | Required properties: | ||
2987 | - device_type : Should be "ethernet-phy" | ||
2988 | - interrupts : <a> where a is the interrupt number for this phy. | ||
2989 | - interrupt-parent : the phandle for the interrupt controller that | ||
2990 | services interrupts for this device. | ||
2991 | - reg : The ID number for the phy, usually a small integer | ||
2992 | |||
2993 | Example Discovery PHY node: | ||
2994 | ethernet-phy@1 { | ||
2995 | device_type = "ethernet-phy"; | ||
2996 | compatible = "broadcom,bcm5421"; | ||
2997 | interrupts = <76>; /* GPP 12 */ | ||
2998 | interrupt-parent = <&PIC>; | ||
2999 | reg = <1>; | ||
3000 | }; | ||
3001 | |||
3002 | |||
3003 | d) Marvell Discovery SDMA nodes | ||
3004 | |||
3005 | Represent DMA hardware associated with the MPSC (multiprotocol | ||
3006 | serial controllers). | ||
3007 | |||
3008 | Required properties: | ||
3009 | - compatible : "marvell,mv64360-sdma" | ||
3010 | - reg : Offset and length of the register set for this device | ||
3011 | - interrupts : <a> where a is the interrupt number for the DMA | ||
3012 | device. | ||
3013 | - interrupt-parent : the phandle for the interrupt controller | ||
3014 | that services interrupts for this device. | ||
3015 | |||
3016 | Example Discovery SDMA node: | ||
3017 | sdma@4000 { | ||
3018 | compatible = "marvell,mv64360-sdma"; | ||
3019 | reg = <0x4000 0xc18>; | ||
3020 | virtual-reg = <0xf1004000>; | ||
3021 | interrupts = <36>; | ||
3022 | interrupt-parent = <&PIC>; | ||
3023 | }; | ||
3024 | |||
3025 | |||
3026 | e) Marvell Discovery BRG nodes | ||
3027 | |||
3028 | Represent baud rate generator hardware associated with the MPSC | ||
3029 | (multiprotocol serial controllers). | ||
3030 | |||
3031 | Required properties: | ||
3032 | - compatible : "marvell,mv64360-brg" | ||
3033 | - reg : Offset and length of the register set for this device | ||
3034 | - clock-src : A value from 0 to 15 which selects the clock | ||
3035 | source for the baud rate generator. This value corresponds | ||
3036 | to the CLKS value in the BRGx configuration register. See | ||
3037 | the mv64x60 User's Manual. | ||
3038 | - clock-frequence : The frequency (in Hz) of the baud rate | ||
3039 | generator's input clock. | ||
3040 | - current-speed : The current speed setting (presumably by | ||
3041 | firmware) of the baud rate generator. | ||
3042 | |||
3043 | Example Discovery BRG node: | ||
3044 | brg@b200 { | ||
3045 | compatible = "marvell,mv64360-brg"; | ||
3046 | reg = <0xb200 0x8>; | ||
3047 | clock-src = <8>; | ||
3048 | clock-frequency = <133333333>; | ||
3049 | current-speed = <9600>; | ||
3050 | }; | ||
3051 | |||
3052 | |||
3053 | f) Marvell Discovery CUNIT nodes | ||
3054 | |||
3055 | Represent the Serial Communications Unit device hardware. | ||
3056 | |||
3057 | Required properties: | ||
3058 | - reg : Offset and length of the register set for this device | ||
3059 | |||
3060 | Example Discovery CUNIT node: | ||
3061 | cunit@f200 { | ||
3062 | reg = <0xf200 0x200>; | ||
3063 | }; | ||
3064 | |||
3065 | |||
3066 | g) Marvell Discovery MPSCROUTING nodes | ||
3067 | |||
3068 | Represent the Discovery's MPSC routing hardware | ||
3069 | |||
3070 | Required properties: | ||
3071 | - reg : Offset and length of the register set for this device | ||
3072 | |||
3073 | Example Discovery CUNIT node: | ||
3074 | mpscrouting@b500 { | ||
3075 | reg = <0xb400 0xc>; | ||
3076 | }; | ||
3077 | |||
3078 | |||
3079 | h) Marvell Discovery MPSCINTR nodes | ||
3080 | |||
3081 | Represent the Discovery's MPSC DMA interrupt hardware registers | ||
3082 | (SDMA cause and mask registers). | ||
3083 | |||
3084 | Required properties: | ||
3085 | - reg : Offset and length of the register set for this device | ||
2821 | 3086 | ||
2822 | VII - Specifying interrupt information for devices | 3087 | Example Discovery MPSCINTR node: |
3088 | mpsintr@b800 { | ||
3089 | reg = <0xb800 0x100>; | ||
3090 | }; | ||
3091 | |||
3092 | |||
3093 | i) Marvell Discovery MPSC nodes | ||
3094 | |||
3095 | Represent the Discovery's MPSC (Multiprotocol Serial Controller) | ||
3096 | serial port. | ||
3097 | |||
3098 | Required properties: | ||
3099 | - device_type : "serial" | ||
3100 | - compatible : "marvell,mv64360-mpsc" | ||
3101 | - reg : Offset and length of the register set for this device | ||
3102 | - sdma : the phandle for the SDMA node used by this port | ||
3103 | - brg : the phandle for the BRG node used by this port | ||
3104 | - cunit : the phandle for the CUNIT node used by this port | ||
3105 | - mpscrouting : the phandle for the MPSCROUTING node used by this port | ||
3106 | - mpscintr : the phandle for the MPSCINTR node used by this port | ||
3107 | - cell-index : the hardware index of this cell in the MPSC core | ||
3108 | - max_idle : value needed for MPSC CHR3 (Maximum Frame Length) | ||
3109 | register | ||
3110 | - interrupts : <a> where a is the interrupt number for the MPSC. | ||
3111 | - interrupt-parent : the phandle for the interrupt controller | ||
3112 | that services interrupts for this device. | ||
3113 | |||
3114 | Example Discovery MPSCINTR node: | ||
3115 | mpsc@8000 { | ||
3116 | device_type = "serial"; | ||
3117 | compatible = "marvell,mv64360-mpsc"; | ||
3118 | reg = <0x8000 0x38>; | ||
3119 | virtual-reg = <0xf1008000>; | ||
3120 | sdma = <&SDMA0>; | ||
3121 | brg = <&BRG0>; | ||
3122 | cunit = <&CUNIT>; | ||
3123 | mpscrouting = <&MPSCROUTING>; | ||
3124 | mpscintr = <&MPSCINTR>; | ||
3125 | cell-index = <0>; | ||
3126 | max_idle = <40>; | ||
3127 | interrupts = <40>; | ||
3128 | interrupt-parent = <&PIC>; | ||
3129 | }; | ||
3130 | |||
3131 | |||
3132 | j) Marvell Discovery Watch Dog Timer nodes | ||
3133 | |||
3134 | Represent the Discovery's watchdog timer hardware | ||
3135 | |||
3136 | Required properties: | ||
3137 | - compatible : "marvell,mv64360-wdt" | ||
3138 | - reg : Offset and length of the register set for this device | ||
3139 | |||
3140 | Example Discovery Watch Dog Timer node: | ||
3141 | wdt@b410 { | ||
3142 | compatible = "marvell,mv64360-wdt"; | ||
3143 | reg = <0xb410 0x8>; | ||
3144 | }; | ||
3145 | |||
3146 | |||
3147 | k) Marvell Discovery I2C nodes | ||
3148 | |||
3149 | Represent the Discovery's I2C hardware | ||
3150 | |||
3151 | Required properties: | ||
3152 | - device_type : "i2c" | ||
3153 | - compatible : "marvell,mv64360-i2c" | ||
3154 | - reg : Offset and length of the register set for this device | ||
3155 | - interrupts : <a> where a is the interrupt number for the I2C. | ||
3156 | - interrupt-parent : the phandle for the interrupt controller | ||
3157 | that services interrupts for this device. | ||
3158 | |||
3159 | Example Discovery I2C node: | ||
3160 | compatible = "marvell,mv64360-i2c"; | ||
3161 | reg = <0xc000 0x20>; | ||
3162 | virtual-reg = <0xf100c000>; | ||
3163 | interrupts = <37>; | ||
3164 | interrupt-parent = <&PIC>; | ||
3165 | }; | ||
3166 | |||
3167 | |||
3168 | l) Marvell Discovery PIC (Programmable Interrupt Controller) nodes | ||
3169 | |||
3170 | Represent the Discovery's PIC hardware | ||
3171 | |||
3172 | Required properties: | ||
3173 | - #interrupt-cells : <1> | ||
3174 | - #address-cells : <0> | ||
3175 | - compatible : "marvell,mv64360-pic" | ||
3176 | - reg : Offset and length of the register set for this device | ||
3177 | - interrupt-controller | ||
3178 | |||
3179 | Example Discovery PIC node: | ||
3180 | pic { | ||
3181 | #interrupt-cells = <1>; | ||
3182 | #address-cells = <0>; | ||
3183 | compatible = "marvell,mv64360-pic"; | ||
3184 | reg = <0x0 0x88>; | ||
3185 | interrupt-controller; | ||
3186 | }; | ||
3187 | |||
3188 | |||
3189 | m) Marvell Discovery MPP (Multipurpose Pins) multiplexing nodes | ||
3190 | |||
3191 | Represent the Discovery's MPP hardware | ||
3192 | |||
3193 | Required properties: | ||
3194 | - compatible : "marvell,mv64360-mpp" | ||
3195 | - reg : Offset and length of the register set for this device | ||
3196 | |||
3197 | Example Discovery MPP node: | ||
3198 | mpp@f000 { | ||
3199 | compatible = "marvell,mv64360-mpp"; | ||
3200 | reg = <0xf000 0x10>; | ||
3201 | }; | ||
3202 | |||
3203 | |||
3204 | n) Marvell Discovery GPP (General Purpose Pins) nodes | ||
3205 | |||
3206 | Represent the Discovery's GPP hardware | ||
3207 | |||
3208 | Required properties: | ||
3209 | - compatible : "marvell,mv64360-gpp" | ||
3210 | - reg : Offset and length of the register set for this device | ||
3211 | |||
3212 | Example Discovery GPP node: | ||
3213 | gpp@f000 { | ||
3214 | compatible = "marvell,mv64360-gpp"; | ||
3215 | reg = <0xf100 0x20>; | ||
3216 | }; | ||
3217 | |||
3218 | |||
3219 | o) Marvell Discovery PCI host bridge node | ||
3220 | |||
3221 | Represents the Discovery's PCI host bridge device. The properties | ||
3222 | for this node conform to Rev 2.1 of the PCI Bus Binding to IEEE | ||
3223 | 1275-1994. A typical value for the compatible property is | ||
3224 | "marvell,mv64360-pci". | ||
3225 | |||
3226 | Example Discovery PCI host bridge node | ||
3227 | pci@80000000 { | ||
3228 | #address-cells = <3>; | ||
3229 | #size-cells = <2>; | ||
3230 | #interrupt-cells = <1>; | ||
3231 | device_type = "pci"; | ||
3232 | compatible = "marvell,mv64360-pci"; | ||
3233 | reg = <0xcf8 0x8>; | ||
3234 | ranges = <0x01000000 0x0 0x0 | ||
3235 | 0x88000000 0x0 0x01000000 | ||
3236 | 0x02000000 0x0 0x80000000 | ||
3237 | 0x80000000 0x0 0x08000000>; | ||
3238 | bus-range = <0 255>; | ||
3239 | clock-frequency = <66000000>; | ||
3240 | interrupt-parent = <&PIC>; | ||
3241 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
3242 | interrupt-map = < | ||
3243 | /* IDSEL 0x0a */ | ||
3244 | 0x5000 0 0 1 &PIC 80 | ||
3245 | 0x5000 0 0 2 &PIC 81 | ||
3246 | 0x5000 0 0 3 &PIC 91 | ||
3247 | 0x5000 0 0 4 &PIC 93 | ||
3248 | |||
3249 | /* IDSEL 0x0b */ | ||
3250 | 0x5800 0 0 1 &PIC 91 | ||
3251 | 0x5800 0 0 2 &PIC 93 | ||
3252 | 0x5800 0 0 3 &PIC 80 | ||
3253 | 0x5800 0 0 4 &PIC 81 | ||
3254 | |||
3255 | /* IDSEL 0x0c */ | ||
3256 | 0x6000 0 0 1 &PIC 91 | ||
3257 | 0x6000 0 0 2 &PIC 93 | ||
3258 | 0x6000 0 0 3 &PIC 80 | ||
3259 | 0x6000 0 0 4 &PIC 81 | ||
3260 | |||
3261 | /* IDSEL 0x0d */ | ||
3262 | 0x6800 0 0 1 &PIC 93 | ||
3263 | 0x6800 0 0 2 &PIC 80 | ||
3264 | 0x6800 0 0 3 &PIC 81 | ||
3265 | 0x6800 0 0 4 &PIC 91 | ||
3266 | >; | ||
3267 | }; | ||
3268 | |||
3269 | |||
3270 | p) Marvell Discovery CPU Error nodes | ||
3271 | |||
3272 | Represent the Discovery's CPU error handler device. | ||
3273 | |||
3274 | Required properties: | ||
3275 | - compatible : "marvell,mv64360-cpu-error" | ||
3276 | - reg : Offset and length of the register set for this device | ||
3277 | - interrupts : the interrupt number for this device | ||
3278 | - interrupt-parent : the phandle for the interrupt controller | ||
3279 | that services interrupts for this device. | ||
3280 | |||
3281 | Example Discovery CPU Error node: | ||
3282 | cpu-error@0070 { | ||
3283 | compatible = "marvell,mv64360-cpu-error"; | ||
3284 | reg = <0x70 0x10 0x128 0x28>; | ||
3285 | interrupts = <3>; | ||
3286 | interrupt-parent = <&PIC>; | ||
3287 | }; | ||
3288 | |||
3289 | |||
3290 | q) Marvell Discovery SRAM Controller nodes | ||
3291 | |||
3292 | Represent the Discovery's SRAM controller device. | ||
3293 | |||
3294 | Required properties: | ||
3295 | - compatible : "marvell,mv64360-sram-ctrl" | ||
3296 | - reg : Offset and length of the register set for this device | ||
3297 | - interrupts : the interrupt number for this device | ||
3298 | - interrupt-parent : the phandle for the interrupt controller | ||
3299 | that services interrupts for this device. | ||
3300 | |||
3301 | Example Discovery SRAM Controller node: | ||
3302 | sram-ctrl@0380 { | ||
3303 | compatible = "marvell,mv64360-sram-ctrl"; | ||
3304 | reg = <0x380 0x80>; | ||
3305 | interrupts = <13>; | ||
3306 | interrupt-parent = <&PIC>; | ||
3307 | }; | ||
3308 | |||
3309 | |||
3310 | r) Marvell Discovery PCI Error Handler nodes | ||
3311 | |||
3312 | Represent the Discovery's PCI error handler device. | ||
3313 | |||
3314 | Required properties: | ||
3315 | - compatible : "marvell,mv64360-pci-error" | ||
3316 | - reg : Offset and length of the register set for this device | ||
3317 | - interrupts : the interrupt number for this device | ||
3318 | - interrupt-parent : the phandle for the interrupt controller | ||
3319 | that services interrupts for this device. | ||
3320 | |||
3321 | Example Discovery PCI Error Handler node: | ||
3322 | pci-error@1d40 { | ||
3323 | compatible = "marvell,mv64360-pci-error"; | ||
3324 | reg = <0x1d40 0x40 0xc28 0x4>; | ||
3325 | interrupts = <12>; | ||
3326 | interrupt-parent = <&PIC>; | ||
3327 | }; | ||
3328 | |||
3329 | |||
3330 | s) Marvell Discovery Memory Controller nodes | ||
3331 | |||
3332 | Represent the Discovery's memory controller device. | ||
3333 | |||
3334 | Required properties: | ||
3335 | - compatible : "marvell,mv64360-mem-ctrl" | ||
3336 | - reg : Offset and length of the register set for this device | ||
3337 | - interrupts : the interrupt number for this device | ||
3338 | - interrupt-parent : the phandle for the interrupt controller | ||
3339 | that services interrupts for this device. | ||
3340 | |||
3341 | Example Discovery Memory Controller node: | ||
3342 | mem-ctrl@1400 { | ||
3343 | compatible = "marvell,mv64360-mem-ctrl"; | ||
3344 | reg = <0x1400 0x60>; | ||
3345 | interrupts = <17>; | ||
3346 | interrupt-parent = <&PIC>; | ||
3347 | }; | ||
3348 | |||
3349 | |||
3350 | VIII - Specifying interrupt information for devices | ||
2823 | =================================================== | 3351 | =================================================== |
2824 | 3352 | ||
2825 | The device tree represents the busses and devices of a hardware | 3353 | The device tree represents the busses and devices of a hardware |
@@ -2905,6 +3433,54 @@ encodings listed below: | |||
2905 | 2 = high to low edge sensitive type enabled | 3433 | 2 = high to low edge sensitive type enabled |
2906 | 3 = low to high edge sensitive type enabled | 3434 | 3 = low to high edge sensitive type enabled |
2907 | 3435 | ||
3436 | VIII - Specifying GPIO information for devices | ||
3437 | ============================================== | ||
3438 | |||
3439 | 1) gpios property | ||
3440 | ----------------- | ||
3441 | |||
3442 | Nodes that makes use of GPIOs should define them using `gpios' property, | ||
3443 | format of which is: <&gpio-controller1-phandle gpio1-specifier | ||
3444 | &gpio-controller2-phandle gpio2-specifier | ||
3445 | 0 /* holes are permitted, means no GPIO 3 */ | ||
3446 | &gpio-controller4-phandle gpio4-specifier | ||
3447 | ...>; | ||
3448 | |||
3449 | Note that gpio-specifier length is controller dependent. | ||
3450 | |||
3451 | gpio-specifier may encode: bank, pin position inside the bank, | ||
3452 | whether pin is open-drain and whether pin is logically inverted. | ||
3453 | |||
3454 | Example of the node using GPIOs: | ||
3455 | |||
3456 | node { | ||
3457 | gpios = <&qe_pio_e 18 0>; | ||
3458 | }; | ||
3459 | |||
3460 | In this example gpio-specifier is "18 0" and encodes GPIO pin number, | ||
3461 | and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller. | ||
3462 | |||
3463 | 2) gpio-controller nodes | ||
3464 | ------------------------ | ||
3465 | |||
3466 | Every GPIO controller node must have #gpio-cells property defined, | ||
3467 | this information will be used to translate gpio-specifiers. | ||
3468 | |||
3469 | Example of two SOC GPIO banks defined as gpio-controller nodes: | ||
3470 | |||
3471 | qe_pio_a: gpio-controller@1400 { | ||
3472 | #gpio-cells = <2>; | ||
3473 | compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank"; | ||
3474 | reg = <0x1400 0x18>; | ||
3475 | gpio-controller; | ||
3476 | }; | ||
3477 | |||
3478 | qe_pio_e: gpio-controller@1460 { | ||
3479 | #gpio-cells = <2>; | ||
3480 | compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank"; | ||
3481 | reg = <0x1460 0x18>; | ||
3482 | gpio-controller; | ||
3483 | }; | ||
2908 | 3484 | ||
2909 | Appendix A - Sample SOC node for MPC8540 | 3485 | Appendix A - Sample SOC node for MPC8540 |
2910 | ======================================== | 3486 | ======================================== |
diff --git a/Documentation/powerpc/phyp-assisted-dump.txt b/Documentation/powerpc/phyp-assisted-dump.txt new file mode 100644 index 000000000000..c4682b982a2e --- /dev/null +++ b/Documentation/powerpc/phyp-assisted-dump.txt | |||
@@ -0,0 +1,127 @@ | |||
1 | |||
2 | Hypervisor-Assisted Dump | ||
3 | ------------------------ | ||
4 | November 2007 | ||
5 | |||
6 | The goal of hypervisor-assisted dump is to enable the dump of | ||
7 | a crashed system, and to do so from a fully-reset system, and | ||
8 | to minimize the total elapsed time until the system is back | ||
9 | in production use. | ||
10 | |||
11 | As compared to kdump or other strategies, hypervisor-assisted | ||
12 | dump offers several strong, practical advantages: | ||
13 | |||
14 | -- Unlike kdump, the system has been reset, and loaded | ||
15 | with a fresh copy of the kernel. In particular, | ||
16 | PCI and I/O devices have been reinitialized and are | ||
17 | in a clean, consistent state. | ||
18 | -- As the dump is performed, the dumped memory becomes | ||
19 | immediately available to the system for normal use. | ||
20 | -- After the dump is completed, no further reboots are | ||
21 | required; the system will be fully usable, and running | ||
22 | in it's normal, production mode on it normal kernel. | ||
23 | |||
24 | The above can only be accomplished by coordination with, | ||
25 | and assistance from the hypervisor. The procedure is | ||
26 | as follows: | ||
27 | |||
28 | -- When a system crashes, the hypervisor will save | ||
29 | the low 256MB of RAM to a previously registered | ||
30 | save region. It will also save system state, system | ||
31 | registers, and hardware PTE's. | ||
32 | |||
33 | -- After the low 256MB area has been saved, the | ||
34 | hypervisor will reset PCI and other hardware state. | ||
35 | It will *not* clear RAM. It will then launch the | ||
36 | bootloader, as normal. | ||
37 | |||
38 | -- The freshly booted kernel will notice that there | ||
39 | is a new node (ibm,dump-kernel) in the device tree, | ||
40 | indicating that there is crash data available from | ||
41 | a previous boot. It will boot into only 256MB of RAM, | ||
42 | reserving the rest of system memory. | ||
43 | |||
44 | -- Userspace tools will parse /sys/kernel/release_region | ||
45 | and read /proc/vmcore to obtain the contents of memory, | ||
46 | which holds the previous crashed kernel. The userspace | ||
47 | tools may copy this info to disk, or network, nas, san, | ||
48 | iscsi, etc. as desired. | ||
49 | |||
50 | For Example: the values in /sys/kernel/release-region | ||
51 | would look something like this (address-range pairs). | ||
52 | CPU:0x177fee000-0x10000: HPTE:0x177ffe020-0x1000: / | ||
53 | DUMP:0x177fff020-0x10000000, 0x10000000-0x16F1D370A | ||
54 | |||
55 | -- As the userspace tools complete saving a portion of | ||
56 | dump, they echo an offset and size to | ||
57 | /sys/kernel/release_region to release the reserved | ||
58 | memory back to general use. | ||
59 | |||
60 | An example of this is: | ||
61 | "echo 0x40000000 0x10000000 > /sys/kernel/release_region" | ||
62 | which will release 256MB at the 1GB boundary. | ||
63 | |||
64 | Please note that the hypervisor-assisted dump feature | ||
65 | is only available on Power6-based systems with recent | ||
66 | firmware versions. | ||
67 | |||
68 | Implementation details: | ||
69 | ---------------------- | ||
70 | |||
71 | During boot, a check is made to see if firmware supports | ||
72 | this feature on this particular machine. If it does, then | ||
73 | we check to see if a active dump is waiting for us. If yes | ||
74 | then everything but 256 MB of RAM is reserved during early | ||
75 | boot. This area is released once we collect a dump from user | ||
76 | land scripts that are run. If there is dump data, then | ||
77 | the /sys/kernel/release_region file is created, and | ||
78 | the reserved memory is held. | ||
79 | |||
80 | If there is no waiting dump data, then only the highest | ||
81 | 256MB of the ram is reserved as a scratch area. This area | ||
82 | is *not* released: this region will be kept permanently | ||
83 | reserved, so that it can act as a receptacle for a copy | ||
84 | of the low 256MB in the case a crash does occur. See, | ||
85 | however, "open issues" below, as to whether | ||
86 | such a reserved region is really needed. | ||
87 | |||
88 | Currently the dump will be copied from /proc/vmcore to a | ||
89 | a new file upon user intervention. The starting address | ||
90 | to be read and the range for each data point in provided | ||
91 | in /sys/kernel/release_region. | ||
92 | |||
93 | The tools to examine the dump will be same as the ones | ||
94 | used for kdump. | ||
95 | |||
96 | General notes: | ||
97 | -------------- | ||
98 | Security: please note that there are potential security issues | ||
99 | with any sort of dump mechanism. In particular, plaintext | ||
100 | (unencrypted) data, and possibly passwords, may be present in | ||
101 | the dump data. Userspace tools must take adequate precautions to | ||
102 | preserve security. | ||
103 | |||
104 | Open issues/ToDo: | ||
105 | ------------ | ||
106 | o The various code paths that tell the hypervisor that a crash | ||
107 | occurred, vs. it simply being a normal reboot, should be | ||
108 | reviewed, and possibly clarified/fixed. | ||
109 | |||
110 | o Instead of using /sys/kernel, should there be a /sys/dump | ||
111 | instead? There is a dump_subsys being created by the s390 code, | ||
112 | perhaps the pseries code should use a similar layout as well. | ||
113 | |||
114 | o Is reserving a 256MB region really required? The goal of | ||
115 | reserving a 256MB scratch area is to make sure that no | ||
116 | important crash data is clobbered when the hypervisor | ||
117 | save low mem to the scratch area. But, if one could assure | ||
118 | that nothing important is located in some 256MB area, then | ||
119 | it would not need to be reserved. Something that can be | ||
120 | improved in subsequent versions. | ||
121 | |||
122 | o Still working the kdump team to integrate this with kdump, | ||
123 | some work remains but this would not affect the current | ||
124 | patches. | ||
125 | |||
126 | o Still need to write a shell script, to copy the dump away. | ||
127 | Currently I am parsing it manually. | ||
diff --git a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c new file mode 100644 index 000000000000..f8e8e95e81fd --- /dev/null +++ b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) | ||
3 | * | ||
4 | * Tests if the control register is updated correctly | ||
5 | * at context switches | ||
6 | * | ||
7 | * Warning: this test will cause a very high load for a few seconds | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <signal.h> | ||
15 | #include <inttypes.h> | ||
16 | #include <wait.h> | ||
17 | |||
18 | |||
19 | #include <sys/prctl.h> | ||
20 | #include <linux/prctl.h> | ||
21 | |||
22 | /* Get/set the process' ability to use the timestamp counter instruction */ | ||
23 | #ifndef PR_GET_TSC | ||
24 | #define PR_GET_TSC 25 | ||
25 | #define PR_SET_TSC 26 | ||
26 | # define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */ | ||
27 | # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ | ||
28 | #endif | ||
29 | |||
30 | uint64_t rdtsc() { | ||
31 | uint32_t lo, hi; | ||
32 | /* We cannot use "=A", since this would use %rax on x86_64 */ | ||
33 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); | ||
34 | return (uint64_t)hi << 32 | lo; | ||
35 | } | ||
36 | |||
37 | void sigsegv_expect(int sig) | ||
38 | { | ||
39 | /* */ | ||
40 | } | ||
41 | |||
42 | void segvtask(void) | ||
43 | { | ||
44 | if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) | ||
45 | { | ||
46 | perror("prctl"); | ||
47 | exit(0); | ||
48 | } | ||
49 | signal(SIGSEGV, sigsegv_expect); | ||
50 | alarm(10); | ||
51 | rdtsc(); | ||
52 | fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n"); | ||
53 | exit(0); | ||
54 | } | ||
55 | |||
56 | |||
57 | void sigsegv_fail(int sig) | ||
58 | { | ||
59 | fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n"); | ||
60 | exit(0); | ||
61 | } | ||
62 | |||
63 | void rdtsctask(void) | ||
64 | { | ||
65 | if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) | ||
66 | { | ||
67 | perror("prctl"); | ||
68 | exit(0); | ||
69 | } | ||
70 | signal(SIGSEGV, sigsegv_fail); | ||
71 | alarm(10); | ||
72 | for(;;) rdtsc(); | ||
73 | } | ||
74 | |||
75 | |||
76 | int main(int argc, char **argv) | ||
77 | { | ||
78 | int n_tasks = 100, i; | ||
79 | |||
80 | fprintf(stderr, "[No further output means we're allright]\n"); | ||
81 | |||
82 | for (i=0; i<n_tasks; i++) | ||
83 | if (fork() == 0) | ||
84 | { | ||
85 | if (i & 1) | ||
86 | segvtask(); | ||
87 | else | ||
88 | rdtsctask(); | ||
89 | } | ||
90 | |||
91 | for (i=0; i<n_tasks; i++) | ||
92 | wait(NULL); | ||
93 | |||
94 | exit(0); | ||
95 | } | ||
96 | |||
diff --git a/Documentation/prctl/disable-tsc-on-off-stress-test.c b/Documentation/prctl/disable-tsc-on-off-stress-test.c new file mode 100644 index 000000000000..1fcd91445375 --- /dev/null +++ b/Documentation/prctl/disable-tsc-on-off-stress-test.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) | ||
3 | * | ||
4 | * Tests if the control register is updated correctly | ||
5 | * when set with prctl() | ||
6 | * | ||
7 | * Warning: this test will cause a very high load for a few seconds | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <signal.h> | ||
15 | #include <inttypes.h> | ||
16 | #include <wait.h> | ||
17 | |||
18 | |||
19 | #include <sys/prctl.h> | ||
20 | #include <linux/prctl.h> | ||
21 | |||
22 | /* Get/set the process' ability to use the timestamp counter instruction */ | ||
23 | #ifndef PR_GET_TSC | ||
24 | #define PR_GET_TSC 25 | ||
25 | #define PR_SET_TSC 26 | ||
26 | # define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */ | ||
27 | # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ | ||
28 | #endif | ||
29 | |||
30 | /* snippet from wikipedia :-) */ | ||
31 | |||
32 | uint64_t rdtsc() { | ||
33 | uint32_t lo, hi; | ||
34 | /* We cannot use "=A", since this would use %rax on x86_64 */ | ||
35 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); | ||
36 | return (uint64_t)hi << 32 | lo; | ||
37 | } | ||
38 | |||
39 | int should_segv = 0; | ||
40 | |||
41 | void sigsegv_cb(int sig) | ||
42 | { | ||
43 | if (!should_segv) | ||
44 | { | ||
45 | fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n"); | ||
46 | exit(0); | ||
47 | } | ||
48 | if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) | ||
49 | { | ||
50 | perror("prctl"); | ||
51 | exit(0); | ||
52 | } | ||
53 | should_segv = 0; | ||
54 | |||
55 | rdtsc(); | ||
56 | } | ||
57 | |||
58 | void task(void) | ||
59 | { | ||
60 | signal(SIGSEGV, sigsegv_cb); | ||
61 | alarm(10); | ||
62 | for(;;) | ||
63 | { | ||
64 | rdtsc(); | ||
65 | if (should_segv) | ||
66 | { | ||
67 | fprintf(stderr, "FATAL ERROR, rdtsc() succeeded while disabled\n"); | ||
68 | exit(0); | ||
69 | } | ||
70 | if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) | ||
71 | { | ||
72 | perror("prctl"); | ||
73 | exit(0); | ||
74 | } | ||
75 | should_segv = 1; | ||
76 | } | ||
77 | } | ||
78 | |||
79 | |||
80 | int main(int argc, char **argv) | ||
81 | { | ||
82 | int n_tasks = 100, i; | ||
83 | |||
84 | fprintf(stderr, "[No further output means we're allright]\n"); | ||
85 | |||
86 | for (i=0; i<n_tasks; i++) | ||
87 | if (fork() == 0) | ||
88 | task(); | ||
89 | |||
90 | for (i=0; i<n_tasks; i++) | ||
91 | wait(NULL); | ||
92 | |||
93 | exit(0); | ||
94 | } | ||
95 | |||
diff --git a/Documentation/prctl/disable-tsc-test.c b/Documentation/prctl/disable-tsc-test.c new file mode 100644 index 000000000000..843c81eac235 --- /dev/null +++ b/Documentation/prctl/disable-tsc-test.c | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) | ||
3 | * | ||
4 | * Basic test to test behaviour of PR_GET_TSC and PR_SET_TSC | ||
5 | */ | ||
6 | |||
7 | #include <stdio.h> | ||
8 | #include <stdlib.h> | ||
9 | #include <unistd.h> | ||
10 | #include <signal.h> | ||
11 | #include <inttypes.h> | ||
12 | |||
13 | |||
14 | #include <sys/prctl.h> | ||
15 | #include <linux/prctl.h> | ||
16 | |||
17 | /* Get/set the process' ability to use the timestamp counter instruction */ | ||
18 | #ifndef PR_GET_TSC | ||
19 | #define PR_GET_TSC 25 | ||
20 | #define PR_SET_TSC 26 | ||
21 | # define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */ | ||
22 | # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ | ||
23 | #endif | ||
24 | |||
25 | const char *tsc_names[] = | ||
26 | { | ||
27 | [0] = "[not set]", | ||
28 | [PR_TSC_ENABLE] = "PR_TSC_ENABLE", | ||
29 | [PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV", | ||
30 | }; | ||
31 | |||
32 | uint64_t rdtsc() { | ||
33 | uint32_t lo, hi; | ||
34 | /* We cannot use "=A", since this would use %rax on x86_64 */ | ||
35 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); | ||
36 | return (uint64_t)hi << 32 | lo; | ||
37 | } | ||
38 | |||
39 | void sigsegv_cb(int sig) | ||
40 | { | ||
41 | int tsc_val = 0; | ||
42 | |||
43 | printf("[ SIG_SEGV ]\n"); | ||
44 | printf("prctl(PR_GET_TSC, &tsc_val); "); | ||
45 | fflush(stdout); | ||
46 | |||
47 | if ( prctl(PR_GET_TSC, &tsc_val) == -1) | ||
48 | perror("prctl"); | ||
49 | |||
50 | printf("tsc_val == %s\n", tsc_names[tsc_val]); | ||
51 | printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n"); | ||
52 | fflush(stdout); | ||
53 | if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1) | ||
54 | perror("prctl"); | ||
55 | |||
56 | printf("rdtsc() == "); | ||
57 | } | ||
58 | |||
59 | int main(int argc, char **argv) | ||
60 | { | ||
61 | int tsc_val = 0; | ||
62 | |||
63 | signal(SIGSEGV, sigsegv_cb); | ||
64 | |||
65 | printf("rdtsc() == %llu\n", (unsigned long long)rdtsc()); | ||
66 | printf("prctl(PR_GET_TSC, &tsc_val); "); | ||
67 | fflush(stdout); | ||
68 | |||
69 | if ( prctl(PR_GET_TSC, &tsc_val) == -1) | ||
70 | perror("prctl"); | ||
71 | |||
72 | printf("tsc_val == %s\n", tsc_names[tsc_val]); | ||
73 | printf("rdtsc() == %llu\n", (unsigned long long)rdtsc()); | ||
74 | printf("prctl(PR_SET_TSC, PR_TSC_ENABLE)\n"); | ||
75 | fflush(stdout); | ||
76 | |||
77 | if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1) | ||
78 | perror("prctl"); | ||
79 | |||
80 | printf("rdtsc() == %llu\n", (unsigned long long)rdtsc()); | ||
81 | printf("prctl(PR_SET_TSC, PR_TSC_SIGSEGV)\n"); | ||
82 | fflush(stdout); | ||
83 | |||
84 | if ( prctl(PR_SET_TSC, PR_TSC_SIGSEGV) == -1) | ||
85 | perror("prctl"); | ||
86 | |||
87 | printf("rdtsc() == "); | ||
88 | fflush(stdout); | ||
89 | printf("%llu\n", (unsigned long long)rdtsc()); | ||
90 | fflush(stdout); | ||
91 | |||
92 | exit(EXIT_SUCCESS); | ||
93 | } | ||
94 | |||
diff --git a/Documentation/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt index 0eb7c58916de..e05420973698 100644 --- a/Documentation/s390/s390dbf.txt +++ b/Documentation/s390/s390dbf.txt | |||
@@ -115,6 +115,27 @@ Return Value: Handle for generated debug area | |||
115 | Description: Allocates memory for a debug log | 115 | Description: Allocates memory for a debug log |
116 | Must not be called within an interrupt handler | 116 | Must not be called within an interrupt handler |
117 | 117 | ||
118 | ---------------------------------------------------------------------------- | ||
119 | debug_info_t *debug_register_mode(char *name, int pages, int nr_areas, | ||
120 | int buf_size, mode_t mode, uid_t uid, | ||
121 | gid_t gid); | ||
122 | |||
123 | Parameter: name: Name of debug log (e.g. used for debugfs entry) | ||
124 | pages: Number of pages, which will be allocated per area | ||
125 | nr_areas: Number of debug areas | ||
126 | buf_size: Size of data area in each debug entry | ||
127 | mode: File mode for debugfs files. E.g. S_IRWXUGO | ||
128 | uid: User ID for debugfs files. Currently only 0 is | ||
129 | supported. | ||
130 | gid: Group ID for debugfs files. Currently only 0 is | ||
131 | supported. | ||
132 | |||
133 | Return Value: Handle for generated debug area | ||
134 | NULL if register failed | ||
135 | |||
136 | Description: Allocates memory for a debug log | ||
137 | Must not be called within an interrupt handler | ||
138 | |||
118 | --------------------------------------------------------------------------- | 139 | --------------------------------------------------------------------------- |
119 | void debug_unregister (debug_info_t * id); | 140 | void debug_unregister (debug_info_t * id); |
120 | 141 | ||
diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt index 1c6332f4543c..14f901f639ee 100644 --- a/Documentation/scheduler/sched-rt-group.txt +++ b/Documentation/scheduler/sched-rt-group.txt | |||
@@ -1,59 +1,177 @@ | |||
1 | Real-Time group scheduling | ||
2 | -------------------------- | ||
1 | 3 | ||
4 | CONTENTS | ||
5 | ======== | ||
2 | 6 | ||
3 | Real-Time group scheduling. | 7 | 1. Overview |
8 | 1.1 The problem | ||
9 | 1.2 The solution | ||
10 | 2. The interface | ||
11 | 2.1 System-wide settings | ||
12 | 2.2 Default behaviour | ||
13 | 2.3 Basis for grouping tasks | ||
14 | 3. Future plans | ||
4 | 15 | ||
5 | The problem space: | ||
6 | 16 | ||
7 | In order to schedule multiple groups of realtime tasks each group must | 17 | 1. Overview |
8 | be assigned a fixed portion of the CPU time available. Without a minimum | 18 | =========== |
9 | guarantee a realtime group can obviously fall short. A fuzzy upper limit | ||
10 | is of no use since it cannot be relied upon. Which leaves us with just | ||
11 | the single fixed portion. | ||
12 | 19 | ||
13 | CPU time is divided by means of specifying how much time can be spent | ||
14 | running in a given period. Say a frame fixed realtime renderer must | ||
15 | deliver 25 frames a second, which yields a period of 0.04s. Now say | ||
16 | it will also have to play some music and respond to input, leaving it | ||
17 | with around 80% for the graphics. We can then give this group a runtime | ||
18 | of 0.8 * 0.04s = 0.032s. | ||
19 | 20 | ||
20 | This way the graphics group will have a 0.04s period with a 0.032s runtime | 21 | 1.1 The problem |
21 | limit. | 22 | --------------- |
22 | 23 | ||
23 | Now if the audio thread needs to refill the DMA buffer every 0.005s, but | 24 | Realtime scheduling is all about determinism, a group has to be able to rely on |
24 | needs only about 3% CPU time to do so, it can do with a 0.03 * 0.005s | 25 | the amount of bandwidth (eg. CPU time) being constant. In order to schedule |
25 | = 0.00015s. | 26 | multiple groups of realtime tasks, each group must be assigned a fixed portion |
27 | of the CPU time available. Without a minimum guarantee a realtime group can | ||
28 | obviously fall short. A fuzzy upper limit is of no use since it cannot be | ||
29 | relied upon. Which leaves us with just the single fixed portion. | ||
26 | 30 | ||
31 | 1.2 The solution | ||
32 | ---------------- | ||
27 | 33 | ||
28 | The Interface: | 34 | CPU time is divided by means of specifying how much time can be spent running |
35 | in a given period. We allocate this "run time" for each realtime group which | ||
36 | the other realtime groups will not be permitted to use. | ||
29 | 37 | ||
30 | system wide: | 38 | Any time not allocated to a realtime group will be used to run normal priority |
39 | tasks (SCHED_OTHER). Any allocated run time not used will also be picked up by | ||
40 | SCHED_OTHER. | ||
31 | 41 | ||
32 | /proc/sys/kernel/sched_rt_period_ms | 42 | Let's consider an example: a frame fixed realtime renderer must deliver 25 |
33 | /proc/sys/kernel/sched_rt_runtime_us | 43 | frames a second, which yields a period of 0.04s per frame. Now say it will also |
44 | have to play some music and respond to input, leaving it with around 80% CPU | ||
45 | time dedicated for the graphics. We can then give this group a run time of 0.8 | ||
46 | * 0.04s = 0.032s. | ||
34 | 47 | ||
35 | CONFIG_FAIR_USER_SCHED | 48 | This way the graphics group will have a 0.04s period with a 0.032s run time |
49 | limit. Now if the audio thread needs to refill the DMA buffer every 0.005s, but | ||
50 | needs only about 3% CPU time to do so, it can do with a 0.03 * 0.005s = | ||
51 | 0.00015s. So this group can be scheduled with a period of 0.005s and a run time | ||
52 | of 0.00015s. | ||
36 | 53 | ||
37 | /sys/kernel/uids/<uid>/cpu_rt_runtime_us | 54 | The remaining CPU time will be used for user input and other tass. Because |
55 | realtime tasks have explicitly allocated the CPU time they need to perform | ||
56 | their tasks, buffer underruns in the graphocs or audio can be eliminated. | ||
38 | 57 | ||
39 | or | 58 | NOTE: the above example is not fully implemented as of yet (2.6.25). We still |
59 | lack an EDF scheduler to make non-uniform periods usable. | ||
40 | 60 | ||
41 | CONFIG_FAIR_CGROUP_SCHED | ||
42 | 61 | ||
43 | /cgroup/<cgroup>/cpu.rt_runtime_us | 62 | 2. The Interface |
63 | ================ | ||
44 | 64 | ||
45 | [ time is specified in us because the interface is s32; this gives an | ||
46 | operating range of ~35m to 1us ] | ||
47 | 65 | ||
48 | The period takes values in [ 1, INT_MAX ], runtime in [ -1, INT_MAX - 1 ]. | 66 | 2.1 System wide settings |
67 | ------------------------ | ||
49 | 68 | ||
50 | A runtime of -1 specifies runtime == period, ie. no limit. | 69 | The system wide settings are configured under the /proc virtual file system: |
51 | 70 | ||
52 | New groups get the period from /proc/sys/kernel/sched_rt_period_us and | 71 | /proc/sys/kernel/sched_rt_period_us: |
53 | a runtime of 0. | 72 | The scheduling period that is equivalent to 100% CPU bandwidth |
54 | 73 | ||
55 | Settings are constrained to: | 74 | /proc/sys/kernel/sched_rt_runtime_us: |
75 | A global limit on how much time realtime scheduling may use. Even without | ||
76 | CONFIG_RT_GROUP_SCHED enabled, this will limit time reserved to realtime | ||
77 | processes. With CONFIG_RT_GROUP_SCHED it signifies the total bandwidth | ||
78 | available to all realtime groups. | ||
79 | |||
80 | * Time is specified in us because the interface is s32. This gives an | ||
81 | operating range from 1us to about 35 minutes. | ||
82 | * sched_rt_period_us takes values from 1 to INT_MAX. | ||
83 | * sched_rt_runtime_us takes values from -1 to (INT_MAX - 1). | ||
84 | * A run time of -1 specifies runtime == period, ie. no limit. | ||
85 | |||
86 | |||
87 | 2.2 Default behaviour | ||
88 | --------------------- | ||
89 | |||
90 | The default values for sched_rt_period_us (1000000 or 1s) and | ||
91 | sched_rt_runtime_us (950000 or 0.95s). This gives 0.05s to be used by | ||
92 | SCHED_OTHER (non-RT tasks). These defaults were chosen so that a run-away | ||
93 | realtime tasks will not lock up the machine but leave a little time to recover | ||
94 | it. By setting runtime to -1 you'd get the old behaviour back. | ||
95 | |||
96 | By default all bandwidth is assigned to the root group and new groups get the | ||
97 | period from /proc/sys/kernel/sched_rt_period_us and a run time of 0. If you | ||
98 | want to assign bandwidth to another group, reduce the root group's bandwidth | ||
99 | and assign some or all of the difference to another group. | ||
100 | |||
101 | Realtime group scheduling means you have to assign a portion of total CPU | ||
102 | bandwidth to the group before it will accept realtime tasks. Therefore you will | ||
103 | not be able to run realtime tasks as any user other than root until you have | ||
104 | done that, even if the user has the rights to run processes with realtime | ||
105 | priority! | ||
106 | |||
107 | |||
108 | 2.3 Basis for grouping tasks | ||
109 | ---------------------------- | ||
110 | |||
111 | There are two compile-time settings for allocating CPU bandwidth. These are | ||
112 | configured using the "Basis for grouping tasks" multiple choice menu under | ||
113 | General setup > Group CPU Scheduler: | ||
114 | |||
115 | a. CONFIG_USER_SCHED (aka "Basis for grouping tasks" = "user id") | ||
116 | |||
117 | This lets you use the virtual files under | ||
118 | "/sys/kernel/uids/<uid>/cpu_rt_runtime_us" to control he CPU time reserved for | ||
119 | each user . | ||
120 | |||
121 | The other option is: | ||
122 | |||
123 | .o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups") | ||
124 | |||
125 | This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us" | ||
126 | to control the CPU time reserved for each control group instead. | ||
127 | |||
128 | For more information on working with control groups, you should read | ||
129 | Documentation/cgroups.txt as well. | ||
130 | |||
131 | Group settings are checked against the following limits in order to keep the configuration | ||
132 | schedulable: | ||
56 | 133 | ||
57 | \Sum_{i} runtime_{i} / global_period <= global_runtime / global_period | 134 | \Sum_{i} runtime_{i} / global_period <= global_runtime / global_period |
58 | 135 | ||
59 | in order to keep the configuration schedulable. | 136 | For now, this can be simplified to just the following (but see Future plans): |
137 | |||
138 | \Sum_{i} runtime_{i} <= global_runtime | ||
139 | |||
140 | |||
141 | 3. Future plans | ||
142 | =============== | ||
143 | |||
144 | There is work in progress to make the scheduling period for each group | ||
145 | ("/sys/kernel/uids/<uid>/cpu_rt_period_us" or | ||
146 | "/cgroup/<cgroup>/cpu.rt_period_us" respectively) configurable as well. | ||
147 | |||
148 | The constraint on the period is that a subgroup must have a smaller or | ||
149 | equal period to its parent. But realistically its not very useful _yet_ | ||
150 | as its prone to starvation without deadline scheduling. | ||
151 | |||
152 | Consider two sibling groups A and B; both have 50% bandwidth, but A's | ||
153 | period is twice the length of B's. | ||
154 | |||
155 | * group A: period=100000us, runtime=10000us | ||
156 | - this runs for 0.01s once every 0.1s | ||
157 | |||
158 | * group B: period= 50000us, runtime=10000us | ||
159 | - this runs for 0.01s twice every 0.1s (or once every 0.05 sec). | ||
160 | |||
161 | This means that currently a while (1) loop in A will run for the full period of | ||
162 | B and can starve B's tasks (assuming they are of lower priority) for a whole | ||
163 | period. | ||
164 | |||
165 | The next project will be SCHED_EDF (Earliest Deadline First scheduling) to bring | ||
166 | full deadline scheduling to the linux kernel. Deadline scheduling the above | ||
167 | groups and treating end of the period as a deadline will ensure that they both | ||
168 | get their allocated time. | ||
169 | |||
170 | Implementing SCHED_EDF might take a while to complete. Priority Inheritance is | ||
171 | the biggest challenge as the current linux PI infrastructure is geared towards | ||
172 | the limited static priority levels 0-139. With deadline scheduling you need to | ||
173 | do deadline inheritance (since priority is inversely proportional to the | ||
174 | deadline delta (deadline - now). | ||
175 | |||
176 | This means the whole PI machinery will have to be reworked - and that is one of | ||
177 | the most complex pieces of code we have. | ||
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt index b7be95b5bd24..40752602c050 100644 --- a/Documentation/scsi/st.txt +++ b/Documentation/scsi/st.txt | |||
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver. | |||
2 | The driver is currently maintained by Kai Mäkisara (email | 2 | The driver is currently maintained by Kai Mäkisara (email |
3 | Kai.Makisara@kolumbus.fi) | 3 | Kai.Makisara@kolumbus.fi) |
4 | 4 | ||
5 | Last modified: Mon Mar 7 21:14:44 2005 by kai.makisara | 5 | Last modified: Sun Feb 24 21:59:07 2008 by kai.makisara |
6 | 6 | ||
7 | 7 | ||
8 | BASICS | 8 | BASICS |
@@ -133,6 +133,11 @@ the defaults set by the user. The value -1 means the default is not set. The | |||
133 | file 'dev' contains the device numbers corresponding to this device. The links | 133 | file 'dev' contains the device numbers corresponding to this device. The links |
134 | 'device' and 'driver' point to the SCSI device and driver entries. | 134 | 'device' and 'driver' point to the SCSI device and driver entries. |
135 | 135 | ||
136 | Each directory also contains the entry 'options' which shows the currently | ||
137 | enabled driver and mode options. The value in the file is a bit mask where the | ||
138 | bit definitions are the same as those used with MTSETDRVBUFFER in setting the | ||
139 | options. | ||
140 | |||
136 | A link named 'tape' is made from the SCSI device directory to the class | 141 | A link named 'tape' is made from the SCSI device directory to the class |
137 | directory corresponding to the mode 0 auto-rewind device (e.g., st0). | 142 | directory corresponding to the mode 0 auto-rewind device (e.g., st0). |
138 | 143 | ||
@@ -372,6 +377,11 @@ MTSETDRVBUFFER | |||
372 | MT_ST_SYSV sets the SYSV semantics (mode) | 377 | MT_ST_SYSV sets the SYSV semantics (mode) |
373 | MT_ST_NOWAIT enables immediate mode (i.e., don't wait for | 378 | MT_ST_NOWAIT enables immediate mode (i.e., don't wait for |
374 | the command to finish) for some commands (e.g., rewind) | 379 | the command to finish) for some commands (e.g., rewind) |
380 | MT_ST_SILI enables setting the SILI bit in SCSI commands when | ||
381 | reading in variable block mode to enhance performance when | ||
382 | reading blocks shorter than the byte count; set this only | ||
383 | if you are sure that the drive supports SILI and the HBA | ||
384 | correctly returns transfer residuals | ||
375 | MT_ST_DEBUGGING debugging (global; debugging must be | 385 | MT_ST_DEBUGGING debugging (global; debugging must be |
376 | compiled into the driver) | 386 | compiled into the driver) |
377 | MT_ST_SETBOOLEANS | 387 | MT_ST_SETBOOLEANS |
diff --git a/Documentation/hrtimers/highres.txt b/Documentation/timers/highres.txt index a73ecf5b4bdb..a73ecf5b4bdb 100644 --- a/Documentation/hrtimers/highres.txt +++ b/Documentation/timers/highres.txt | |||
diff --git a/Documentation/hrtimers/hrtimers.txt b/Documentation/timers/hrtimers.txt index ce31f65e12e7..ce31f65e12e7 100644 --- a/Documentation/hrtimers/hrtimers.txt +++ b/Documentation/timers/hrtimers.txt | |||
diff --git a/Documentation/hrtimer/timer_stats.txt b/Documentation/timers/timer_stats.txt index 20d368c59814..20d368c59814 100644 --- a/Documentation/hrtimer/timer_stats.txt +++ b/Documentation/timers/timer_stats.txt | |||
diff --git a/Documentation/x86/pat.txt b/Documentation/x86/pat.txt new file mode 100644 index 000000000000..17965f927c15 --- /dev/null +++ b/Documentation/x86/pat.txt | |||
@@ -0,0 +1,100 @@ | |||
1 | |||
2 | PAT (Page Attribute Table) | ||
3 | |||
4 | x86 Page Attribute Table (PAT) allows for setting the memory attribute at the | ||
5 | page level granularity. PAT is complementary to the MTRR settings which allows | ||
6 | for setting of memory types over physical address ranges. However, PAT is | ||
7 | more flexible than MTRR due to its capability to set attributes at page level | ||
8 | and also due to the fact that there are no hardware limitations on number of | ||
9 | such attribute settings allowed. Added flexibility comes with guidelines for | ||
10 | not having memory type aliasing for the same physical memory with multiple | ||
11 | virtual addresses. | ||
12 | |||
13 | PAT allows for different types of memory attributes. The most commonly used | ||
14 | ones that will be supported at this time are Write-back, Uncached, | ||
15 | Write-combined and Uncached Minus. | ||
16 | |||
17 | There are many different APIs in the kernel that allows setting of memory | ||
18 | attributes at the page level. In order to avoid aliasing, these interfaces | ||
19 | should be used thoughtfully. Below is a table of interfaces available, | ||
20 | their intended usage and their memory attribute relationships. Internally, | ||
21 | these APIs use a reserve_memtype()/free_memtype() interface on the physical | ||
22 | address range to avoid any aliasing. | ||
23 | |||
24 | |||
25 | ------------------------------------------------------------------- | ||
26 | API | RAM | ACPI,... | Reserved/Holes | | ||
27 | -----------------------|----------|------------|------------------| | ||
28 | | | | | | ||
29 | ioremap | -- | UC | UC | | ||
30 | | | | | | ||
31 | ioremap_cache | -- | WB | WB | | ||
32 | | | | | | ||
33 | ioremap_nocache | -- | UC | UC | | ||
34 | | | | | | ||
35 | ioremap_wc | -- | -- | WC | | ||
36 | | | | | | ||
37 | set_memory_uc | UC | -- | -- | | ||
38 | set_memory_wb | | | | | ||
39 | | | | | | ||
40 | set_memory_wc | WC | -- | -- | | ||
41 | set_memory_wb | | | | | ||
42 | | | | | | ||
43 | pci sysfs resource | -- | -- | UC | | ||
44 | | | | | | ||
45 | pci sysfs resource_wc | -- | -- | WC | | ||
46 | is IORESOURCE_PREFETCH| | | | | ||
47 | | | | | | ||
48 | pci proc | -- | -- | UC | | ||
49 | !PCIIOC_WRITE_COMBINE | | | | | ||
50 | | | | | | ||
51 | pci proc | -- | -- | WC | | ||
52 | PCIIOC_WRITE_COMBINE | | | | | ||
53 | | | | | | ||
54 | /dev/mem | -- | UC | UC | | ||
55 | read-write | | | | | ||
56 | | | | | | ||
57 | /dev/mem | -- | UC | UC | | ||
58 | mmap SYNC flag | | | | | ||
59 | | | | | | ||
60 | /dev/mem | -- | WB/WC/UC | WB/WC/UC | | ||
61 | mmap !SYNC flag | |(from exist-| (from exist- | | ||
62 | and | | ing alias)| ing alias) | | ||
63 | any alias to this area| | | | | ||
64 | | | | | | ||
65 | /dev/mem | -- | WB | WB | | ||
66 | mmap !SYNC flag | | | | | ||
67 | no alias to this area | | | | | ||
68 | and | | | | | ||
69 | MTRR says WB | | | | | ||
70 | | | | | | ||
71 | /dev/mem | -- | -- | UC_MINUS | | ||
72 | mmap !SYNC flag | | | | | ||
73 | no alias to this area | | | | | ||
74 | and | | | | | ||
75 | MTRR says !WB | | | | | ||
76 | | | | | | ||
77 | ------------------------------------------------------------------- | ||
78 | |||
79 | Notes: | ||
80 | |||
81 | -- in the above table mean "Not suggested usage for the API". Some of the --'s | ||
82 | are strictly enforced by the kernel. Some others are not really enforced | ||
83 | today, but may be enforced in future. | ||
84 | |||
85 | For ioremap and pci access through /sys or /proc - The actual type returned | ||
86 | can be more restrictive, in case of any existing aliasing for that address. | ||
87 | For example: If there is an existing uncached mapping, a new ioremap_wc can | ||
88 | return uncached mapping in place of write-combine requested. | ||
89 | |||
90 | set_memory_[uc|wc] and set_memory_wb should be used in pairs, where driver will | ||
91 | first make a region uc or wc and switch it back to wb after use. | ||
92 | |||
93 | Over time writes to /proc/mtrr will be deprecated in favor of using PAT based | ||
94 | interfaces. Users writing to /proc/mtrr are suggested to use above interfaces. | ||
95 | |||
96 | Drivers should use ioremap_[uc|wc] to access PCI BARs with [uc|wc] access | ||
97 | types. | ||
98 | |||
99 | Drivers should use set_memory_[uc|wc] to set access type for RAM ranges. | ||
100 | |||
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index 34abae4e9442..b0c7b6c4abda 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt | |||
@@ -307,3 +307,8 @@ Debugging | |||
307 | stuck (default) | 307 | stuck (default) |
308 | 308 | ||
309 | Miscellaneous | 309 | Miscellaneous |
310 | |||
311 | nogbpages | ||
312 | Do not use GB pages for kernel direct mappings. | ||
313 | gbpages | ||
314 | Use GB pages for kernel direct mappings. | ||