diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 09:25:26 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 09:25:26 -0400 |
commit | 4bf311ddfbffe12d41ad1a3c311ab727db6f72cb (patch) | |
tree | 9d19a2774e83637d86dc876f3af22af1dacf0bec /Documentation | |
parent | 597d0cae0f99f62501e229bed50e8149604015bb (diff) | |
parent | 82d6897fefca6206bca7153805b4c5359ce97fc4 (diff) |
Merge branch 'master'
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DMA-mapping.txt | 8 | ||||
-rw-r--r-- | Documentation/RCU/whatisRCU.txt | 5 | ||||
-rw-r--r-- | Documentation/SubmitChecklist | 76 | ||||
-rw-r--r-- | Documentation/accounting/delay-accounting.txt | 110 | ||||
-rw-r--r-- | Documentation/accounting/getdelays.c | 396 | ||||
-rw-r--r-- | Documentation/accounting/taskstats.txt | 181 | ||||
-rw-r--r-- | Documentation/drivers/edac/edac.txt | 152 | ||||
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 30 | ||||
-rw-r--r-- | Documentation/filesystems/Locking | 4 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 4 | ||||
-rw-r--r-- | Documentation/hwmon/abituguru | 32 | ||||
-rw-r--r-- | Documentation/i2c/busses/i2c-sis96x | 4 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 2 | ||||
-rw-r--r-- | Documentation/memory-barriers.txt | 5 | ||||
-rw-r--r-- | Documentation/mips/time.README | 10 | ||||
-rw-r--r-- | Documentation/nfsroot.txt | 275 | ||||
-rw-r--r-- | Documentation/ramdisk.txt | 12 | ||||
-rw-r--r-- | Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 4 | ||||
-rw-r--r-- | Documentation/usb/usb-serial.txt | 4 |
19 files changed, 987 insertions, 327 deletions
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index 7c717699032c..63392c9132b4 100644 --- a/Documentation/DMA-mapping.txt +++ b/Documentation/DMA-mapping.txt | |||
@@ -698,12 +698,12 @@ these interfaces. Remember that, as defined, consistent mappings are | |||
698 | always going to be SAC addressable. | 698 | always going to be SAC addressable. |
699 | 699 | ||
700 | The first thing your driver needs to do is query the PCI platform | 700 | The first thing your driver needs to do is query the PCI platform |
701 | layer with your devices DAC addressing capabilities: | 701 | layer if it is capable of handling your devices DAC addressing |
702 | capabilities: | ||
702 | 703 | ||
703 | int pci_dac_set_dma_mask(struct pci_dev *pdev, u64 mask); | 704 | int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask); |
704 | 705 | ||
705 | This routine behaves identically to pci_set_dma_mask. You may not | 706 | You may not use the following interfaces if this routine fails. |
706 | use the following interfaces if this routine fails. | ||
707 | 707 | ||
708 | Next, DMA addresses using this API are kept track of using the | 708 | Next, DMA addresses using this API are kept track of using the |
709 | dma64_addr_t type. It is guaranteed to be big enough to hold any | 709 | dma64_addr_t type. It is guaranteed to be big enough to hold any |
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 4f41a60e5111..318df44259b3 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -687,8 +687,9 @@ diff shows how closely related RCU and reader-writer locking can be. | |||
687 | + spin_lock(&listmutex); | 687 | + spin_lock(&listmutex); |
688 | list_for_each_entry(p, head, lp) { | 688 | list_for_each_entry(p, head, lp) { |
689 | if (p->key == key) { | 689 | if (p->key == key) { |
690 | list_del(&p->list); | 690 | - list_del(&p->list); |
691 | - write_unlock(&listmutex); | 691 | - write_unlock(&listmutex); |
692 | + list_del_rcu(&p->list); | ||
692 | + spin_unlock(&listmutex); | 693 | + spin_unlock(&listmutex); |
693 | + synchronize_rcu(); | 694 | + synchronize_rcu(); |
694 | kfree(p); | 695 | kfree(p); |
@@ -736,7 +737,7 @@ Or, for those who prefer a side-by-side listing: | |||
736 | 5 write_lock(&listmutex); 5 spin_lock(&listmutex); | 737 | 5 write_lock(&listmutex); 5 spin_lock(&listmutex); |
737 | 6 list_for_each_entry(p, head, lp) { 6 list_for_each_entry(p, head, lp) { | 738 | 6 list_for_each_entry(p, head, lp) { 6 list_for_each_entry(p, head, lp) { |
738 | 7 if (p->key == key) { 7 if (p->key == key) { | 739 | 7 if (p->key == key) { 7 if (p->key == key) { |
739 | 8 list_del(&p->list); 8 list_del(&p->list); | 740 | 8 list_del(&p->list); 8 list_del_rcu(&p->list); |
740 | 9 write_unlock(&listmutex); 9 spin_unlock(&listmutex); | 741 | 9 write_unlock(&listmutex); 9 spin_unlock(&listmutex); |
741 | 10 synchronize_rcu(); | 742 | 10 synchronize_rcu(); |
742 | 10 kfree(p); 11 kfree(p); | 743 | 10 kfree(p); 11 kfree(p); |
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index 8230098da529..a10bfb6ecd9f 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -1,57 +1,63 @@ | |||
1 | Linux Kernel patch sumbittal checklist | 1 | Linux Kernel patch sumbittal checklist |
2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3 | 3 | ||
4 | Here are some basic things that developers should do if they | 4 | Here are some basic things that developers should do if they want to see their |
5 | want to see their kernel patch submittals accepted quicker. | 5 | kernel patch submissions accepted more quickly. |
6 | 6 | ||
7 | These are all above and beyond the documentation that is provided | 7 | These are all above and beyond the documentation that is provided in |
8 | in Documentation/SubmittingPatches and elsewhere about submitting | 8 | Documentation/SubmittingPatches and elsewhere regarding submitting Linux |
9 | Linux kernel patches. | 9 | kernel patches. |
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | - Builds cleanly with applicable or modified CONFIG options =y, =m, and =n. | 13 | 1: Builds cleanly with applicable or modified CONFIG options =y, =m, and |
14 | No gcc warnings/errors, no linker warnings/errors. | 14 | =n. No gcc warnings/errors, no linker warnings/errors. |
15 | 15 | ||
16 | - Passes allnoconfig, allmodconfig | 16 | 2: Passes allnoconfig, allmodconfig |
17 | 17 | ||
18 | - Builds on multiple CPU arch-es by using local cross-compile tools | 18 | 3: Builds on multiple CPU architectures by using local cross-compile tools |
19 | or something like PLM at OSDL. | 19 | or something like PLM at OSDL. |
20 | 20 | ||
21 | - ppc64 is a good architecture for cross-compilation checking because it | 21 | 4: ppc64 is a good architecture for cross-compilation checking because it |
22 | tends to use `unsigned long' for 64-bit quantities. | 22 | tends to use `unsigned long' for 64-bit quantities. |
23 | 23 | ||
24 | - Matches kernel coding style(!) | 24 | 5: Matches kernel coding style(!) |
25 | 25 | ||
26 | - Any new or modified CONFIG options don't muck up the config menu. | 26 | 6: Any new or modified CONFIG options don't muck up the config menu. |
27 | 27 | ||
28 | - All new Kconfig options have help text. | 28 | 7: All new Kconfig options have help text. |
29 | 29 | ||
30 | - Has been carefully reviewed with respect to relevant Kconfig | 30 | 8: Has been carefully reviewed with respect to relevant Kconfig |
31 | combinations. This is very hard to get right with testing -- | 31 | combinations. This is very hard to get right with testing -- brainpower |
32 | brainpower pays off here. | 32 | pays off here. |
33 | 33 | ||
34 | - Check cleanly with sparse. | 34 | 9: Check cleanly with sparse. |
35 | 35 | ||
36 | - Use 'make checkstack' and 'make namespacecheck' and fix any | 36 | 10: Use 'make checkstack' and 'make namespacecheck' and fix any problems |
37 | problems that they find. Note: checkstack does not point out | 37 | that they find. Note: checkstack does not point out problems explicitly, |
38 | problems explicitly, but any one function that uses more than | 38 | but any one function that uses more than 512 bytes on the stack is a |
39 | 512 bytes on the stack is a candidate for change. | 39 | candidate for change. |
40 | 40 | ||
41 | - Include kernel-doc to document global kernel APIs. (Not required | 41 | 11: Include kernel-doc to document global kernel APIs. (Not required for |
42 | for static functions, but OK there also.) Use 'make htmldocs' | 42 | static functions, but OK there also.) Use 'make htmldocs' or 'make |
43 | or 'make mandocs' to check the kernel-doc and fix any issues. | 43 | mandocs' to check the kernel-doc and fix any issues. |
44 | 44 | ||
45 | - Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, | 45 | 12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, |
46 | CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, | 46 | CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, |
47 | CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously | 47 | CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously |
48 | enabled. | 48 | enabled. |
49 | 49 | ||
50 | - Has been build- and runtime tested with and without CONFIG_SMP and | 50 | 13: Has been build- and runtime tested with and without CONFIG_SMP and |
51 | CONFIG_PREEMPT. | 51 | CONFIG_PREEMPT. |
52 | 52 | ||
53 | - If the patch affects IO/Disk, etc: has been tested with and without | 53 | 14: If the patch affects IO/Disk, etc: has been tested with and without |
54 | CONFIG_LBD. | 54 | CONFIG_LBD. |
55 | 55 | ||
56 | 15: All codepaths have been exercised with all lockdep features enabled. | ||
56 | 57 | ||
57 | 2006-APR-27 | 58 | 16: All new /proc entries are documented under Documentation/ |
59 | |||
60 | 17: All new kernel boot parameters are documented in | ||
61 | Documentation/kernel-parameters.txt. | ||
62 | |||
63 | 18: All new module parameters are documented with MODULE_PARM_DESC() | ||
diff --git a/Documentation/accounting/delay-accounting.txt b/Documentation/accounting/delay-accounting.txt new file mode 100644 index 000000000000..be215e58423b --- /dev/null +++ b/Documentation/accounting/delay-accounting.txt | |||
@@ -0,0 +1,110 @@ | |||
1 | Delay accounting | ||
2 | ---------------- | ||
3 | |||
4 | Tasks encounter delays in execution when they wait | ||
5 | for some kernel resource to become available e.g. a | ||
6 | runnable task may wait for a free CPU to run on. | ||
7 | |||
8 | The per-task delay accounting functionality measures | ||
9 | the delays experienced by a task while | ||
10 | |||
11 | a) waiting for a CPU (while being runnable) | ||
12 | b) completion of synchronous block I/O initiated by the task | ||
13 | c) swapping in pages | ||
14 | |||
15 | and makes these statistics available to userspace through | ||
16 | the taskstats interface. | ||
17 | |||
18 | Such delays provide feedback for setting a task's cpu priority, | ||
19 | io priority and rss limit values appropriately. Long delays for | ||
20 | important tasks could be a trigger for raising its corresponding priority. | ||
21 | |||
22 | The functionality, through its use of the taskstats interface, also provides | ||
23 | delay statistics aggregated for all tasks (or threads) belonging to a | ||
24 | thread group (corresponding to a traditional Unix process). This is a commonly | ||
25 | needed aggregation that is more efficiently done by the kernel. | ||
26 | |||
27 | Userspace utilities, particularly resource management applications, can also | ||
28 | aggregate delay statistics into arbitrary groups. To enable this, delay | ||
29 | statistics of a task are available both during its lifetime as well as on its | ||
30 | exit, ensuring continuous and complete monitoring can be done. | ||
31 | |||
32 | |||
33 | Interface | ||
34 | --------- | ||
35 | |||
36 | Delay accounting uses the taskstats interface which is described | ||
37 | in detail in a separate document in this directory. Taskstats returns a | ||
38 | generic data structure to userspace corresponding to per-pid and per-tgid | ||
39 | statistics. The delay accounting functionality populates specific fields of | ||
40 | this structure. See | ||
41 | include/linux/taskstats.h | ||
42 | for a description of the fields pertaining to delay accounting. | ||
43 | It will generally be in the form of counters returning the cumulative | ||
44 | delay seen for cpu, sync block I/O, swapin etc. | ||
45 | |||
46 | Taking the difference of two successive readings of a given | ||
47 | counter (say cpu_delay_total) for a task will give the delay | ||
48 | experienced by the task waiting for the corresponding resource | ||
49 | in that interval. | ||
50 | |||
51 | When a task exits, records containing the per-task statistics | ||
52 | are sent to userspace without requiring a command. If it is the last exiting | ||
53 | task of a thread group, the per-tgid statistics are also sent. More details | ||
54 | are given in the taskstats interface description. | ||
55 | |||
56 | The getdelays.c userspace utility in this directory allows simple commands to | ||
57 | be run and the corresponding delay statistics to be displayed. It also serves | ||
58 | as an example of using the taskstats interface. | ||
59 | |||
60 | Usage | ||
61 | ----- | ||
62 | |||
63 | Compile the kernel with | ||
64 | CONFIG_TASK_DELAY_ACCT=y | ||
65 | CONFIG_TASKSTATS=y | ||
66 | |||
67 | Enable the accounting at boot time by adding | ||
68 | the following to the kernel boot options | ||
69 | delayacct | ||
70 | |||
71 | and after the system has booted up, use a utility | ||
72 | similar to getdelays.c to access the delays | ||
73 | seen by a given task or a task group (tgid). | ||
74 | The utility also allows a given command to be | ||
75 | executed and the corresponding delays to be | ||
76 | seen. | ||
77 | |||
78 | General format of the getdelays command | ||
79 | |||
80 | getdelays [-t tgid] [-p pid] [-c cmd...] | ||
81 | |||
82 | |||
83 | Get delays, since system boot, for pid 10 | ||
84 | # ./getdelays -p 10 | ||
85 | (output similar to next case) | ||
86 | |||
87 | Get sum of delays, since system boot, for all pids with tgid 5 | ||
88 | # ./getdelays -t 5 | ||
89 | |||
90 | |||
91 | CPU count real total virtual total delay total | ||
92 | 7876 92005750 100000000 24001500 | ||
93 | IO count delay total | ||
94 | 0 0 | ||
95 | MEM count delay total | ||
96 | 0 0 | ||
97 | |||
98 | Get delays seen in executing a given simple command | ||
99 | # ./getdelays -c ls / | ||
100 | |||
101 | bin data1 data3 data5 dev home media opt root srv sys usr | ||
102 | boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var | ||
103 | |||
104 | |||
105 | CPU count real total virtual total delay total | ||
106 | 6 4000250 4000000 0 | ||
107 | IO count delay total | ||
108 | 0 0 | ||
109 | MEM count delay total | ||
110 | 0 0 | ||
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c new file mode 100644 index 000000000000..795ca3911cc5 --- /dev/null +++ b/Documentation/accounting/getdelays.c | |||
@@ -0,0 +1,396 @@ | |||
1 | /* getdelays.c | ||
2 | * | ||
3 | * Utility to get per-pid and per-tgid delay accounting statistics | ||
4 | * Also illustrates usage of the taskstats interface | ||
5 | * | ||
6 | * Copyright (C) Shailabh Nagar, IBM Corp. 2005 | ||
7 | * Copyright (C) Balbir Singh, IBM Corp. 2006 | ||
8 | * Copyright (c) Jay Lan, SGI. 2006 | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <stdio.h> | ||
13 | #include <stdlib.h> | ||
14 | #include <errno.h> | ||
15 | #include <unistd.h> | ||
16 | #include <poll.h> | ||
17 | #include <string.h> | ||
18 | #include <fcntl.h> | ||
19 | #include <sys/types.h> | ||
20 | #include <sys/stat.h> | ||
21 | #include <sys/socket.h> | ||
22 | #include <sys/types.h> | ||
23 | #include <signal.h> | ||
24 | |||
25 | #include <linux/genetlink.h> | ||
26 | #include <linux/taskstats.h> | ||
27 | |||
28 | /* | ||
29 | * Generic macros for dealing with netlink sockets. Might be duplicated | ||
30 | * elsewhere. It is recommended that commercial grade applications use | ||
31 | * libnl or libnetlink and use the interfaces provided by the library | ||
32 | */ | ||
33 | #define GENLMSG_DATA(glh) ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN)) | ||
34 | #define GENLMSG_PAYLOAD(glh) (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN) | ||
35 | #define NLA_DATA(na) ((void *)((char*)(na) + NLA_HDRLEN)) | ||
36 | #define NLA_PAYLOAD(len) (len - NLA_HDRLEN) | ||
37 | |||
38 | #define err(code, fmt, arg...) do { printf(fmt, ##arg); exit(code); } while (0) | ||
39 | int done = 0; | ||
40 | int rcvbufsz=0; | ||
41 | |||
42 | char name[100]; | ||
43 | int dbg=0, print_delays=0; | ||
44 | __u64 stime, utime; | ||
45 | #define PRINTF(fmt, arg...) { \ | ||
46 | if (dbg) { \ | ||
47 | printf(fmt, ##arg); \ | ||
48 | } \ | ||
49 | } | ||
50 | |||
51 | /* Maximum size of response requested or message sent */ | ||
52 | #define MAX_MSG_SIZE 256 | ||
53 | /* Maximum number of cpus expected to be specified in a cpumask */ | ||
54 | #define MAX_CPUS 32 | ||
55 | /* Maximum length of pathname to log file */ | ||
56 | #define MAX_FILENAME 256 | ||
57 | |||
58 | struct msgtemplate { | ||
59 | struct nlmsghdr n; | ||
60 | struct genlmsghdr g; | ||
61 | char buf[MAX_MSG_SIZE]; | ||
62 | }; | ||
63 | |||
64 | char cpumask[100+6*MAX_CPUS]; | ||
65 | |||
66 | /* | ||
67 | * Create a raw netlink socket and bind | ||
68 | */ | ||
69 | static int create_nl_socket(int protocol) | ||
70 | { | ||
71 | int fd; | ||
72 | struct sockaddr_nl local; | ||
73 | |||
74 | fd = socket(AF_NETLINK, SOCK_RAW, protocol); | ||
75 | if (fd < 0) | ||
76 | return -1; | ||
77 | |||
78 | if (rcvbufsz) | ||
79 | if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, | ||
80 | &rcvbufsz, sizeof(rcvbufsz)) < 0) { | ||
81 | printf("Unable to set socket rcv buf size to %d\n", | ||
82 | rcvbufsz); | ||
83 | return -1; | ||
84 | } | ||
85 | |||
86 | memset(&local, 0, sizeof(local)); | ||
87 | local.nl_family = AF_NETLINK; | ||
88 | |||
89 | if (bind(fd, (struct sockaddr *) &local, sizeof(local)) < 0) | ||
90 | goto error; | ||
91 | |||
92 | return fd; | ||
93 | error: | ||
94 | close(fd); | ||
95 | return -1; | ||
96 | } | ||
97 | |||
98 | |||
99 | int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, | ||
100 | __u8 genl_cmd, __u16 nla_type, | ||
101 | void *nla_data, int nla_len) | ||
102 | { | ||
103 | struct nlattr *na; | ||
104 | struct sockaddr_nl nladdr; | ||
105 | int r, buflen; | ||
106 | char *buf; | ||
107 | |||
108 | struct msgtemplate msg; | ||
109 | |||
110 | msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); | ||
111 | msg.n.nlmsg_type = nlmsg_type; | ||
112 | msg.n.nlmsg_flags = NLM_F_REQUEST; | ||
113 | msg.n.nlmsg_seq = 0; | ||
114 | msg.n.nlmsg_pid = nlmsg_pid; | ||
115 | msg.g.cmd = genl_cmd; | ||
116 | msg.g.version = 0x1; | ||
117 | na = (struct nlattr *) GENLMSG_DATA(&msg); | ||
118 | na->nla_type = nla_type; | ||
119 | na->nla_len = nla_len + 1 + NLA_HDRLEN; | ||
120 | memcpy(NLA_DATA(na), nla_data, nla_len); | ||
121 | msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); | ||
122 | |||
123 | buf = (char *) &msg; | ||
124 | buflen = msg.n.nlmsg_len ; | ||
125 | memset(&nladdr, 0, sizeof(nladdr)); | ||
126 | nladdr.nl_family = AF_NETLINK; | ||
127 | while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr, | ||
128 | sizeof(nladdr))) < buflen) { | ||
129 | if (r > 0) { | ||
130 | buf += r; | ||
131 | buflen -= r; | ||
132 | } else if (errno != EAGAIN) | ||
133 | return -1; | ||
134 | } | ||
135 | return 0; | ||
136 | } | ||
137 | |||
138 | |||
139 | /* | ||
140 | * Probe the controller in genetlink to find the family id | ||
141 | * for the TASKSTATS family | ||
142 | */ | ||
143 | int get_family_id(int sd) | ||
144 | { | ||
145 | struct { | ||
146 | struct nlmsghdr n; | ||
147 | struct genlmsghdr g; | ||
148 | char buf[256]; | ||
149 | } ans; | ||
150 | |||
151 | int id, rc; | ||
152 | struct nlattr *na; | ||
153 | int rep_len; | ||
154 | |||
155 | strcpy(name, TASKSTATS_GENL_NAME); | ||
156 | rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY, | ||
157 | CTRL_ATTR_FAMILY_NAME, (void *)name, | ||
158 | strlen(TASKSTATS_GENL_NAME)+1); | ||
159 | |||
160 | rep_len = recv(sd, &ans, sizeof(ans), 0); | ||
161 | if (ans.n.nlmsg_type == NLMSG_ERROR || | ||
162 | (rep_len < 0) || !NLMSG_OK((&ans.n), rep_len)) | ||
163 | return 0; | ||
164 | |||
165 | na = (struct nlattr *) GENLMSG_DATA(&ans); | ||
166 | na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); | ||
167 | if (na->nla_type == CTRL_ATTR_FAMILY_ID) { | ||
168 | id = *(__u16 *) NLA_DATA(na); | ||
169 | } | ||
170 | return id; | ||
171 | } | ||
172 | |||
173 | void print_delayacct(struct taskstats *t) | ||
174 | { | ||
175 | printf("\n\nCPU %15s%15s%15s%15s\n" | ||
176 | " %15llu%15llu%15llu%15llu\n" | ||
177 | "IO %15s%15s\n" | ||
178 | " %15llu%15llu\n" | ||
179 | "MEM %15s%15s\n" | ||
180 | " %15llu%15llu\n\n", | ||
181 | "count", "real total", "virtual total", "delay total", | ||
182 | t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total, | ||
183 | t->cpu_delay_total, | ||
184 | "count", "delay total", | ||
185 | t->blkio_count, t->blkio_delay_total, | ||
186 | "count", "delay total", t->swapin_count, t->swapin_delay_total); | ||
187 | } | ||
188 | |||
189 | int main(int argc, char *argv[]) | ||
190 | { | ||
191 | int c, rc, rep_len, aggr_len, len2, cmd_type; | ||
192 | __u16 id; | ||
193 | __u32 mypid; | ||
194 | |||
195 | struct nlattr *na; | ||
196 | int nl_sd = -1; | ||
197 | int len = 0; | ||
198 | pid_t tid = 0; | ||
199 | pid_t rtid = 0; | ||
200 | |||
201 | int fd = 0; | ||
202 | int count = 0; | ||
203 | int write_file = 0; | ||
204 | int maskset = 0; | ||
205 | char logfile[128]; | ||
206 | int loop = 0; | ||
207 | |||
208 | struct msgtemplate msg; | ||
209 | |||
210 | while (1) { | ||
211 | c = getopt(argc, argv, "dw:r:m:t:p:v:l"); | ||
212 | if (c < 0) | ||
213 | break; | ||
214 | |||
215 | switch (c) { | ||
216 | case 'd': | ||
217 | printf("print delayacct stats ON\n"); | ||
218 | print_delays = 1; | ||
219 | break; | ||
220 | case 'w': | ||
221 | strncpy(logfile, optarg, MAX_FILENAME); | ||
222 | printf("write to file %s\n", logfile); | ||
223 | write_file = 1; | ||
224 | break; | ||
225 | case 'r': | ||
226 | rcvbufsz = atoi(optarg); | ||
227 | printf("receive buf size %d\n", rcvbufsz); | ||
228 | if (rcvbufsz < 0) | ||
229 | err(1, "Invalid rcv buf size\n"); | ||
230 | break; | ||
231 | case 'm': | ||
232 | strncpy(cpumask, optarg, sizeof(cpumask)); | ||
233 | maskset = 1; | ||
234 | printf("cpumask %s maskset %d\n", cpumask, maskset); | ||
235 | break; | ||
236 | case 't': | ||
237 | tid = atoi(optarg); | ||
238 | if (!tid) | ||
239 | err(1, "Invalid tgid\n"); | ||
240 | cmd_type = TASKSTATS_CMD_ATTR_TGID; | ||
241 | print_delays = 1; | ||
242 | break; | ||
243 | case 'p': | ||
244 | tid = atoi(optarg); | ||
245 | if (!tid) | ||
246 | err(1, "Invalid pid\n"); | ||
247 | cmd_type = TASKSTATS_CMD_ATTR_PID; | ||
248 | print_delays = 1; | ||
249 | break; | ||
250 | case 'v': | ||
251 | printf("debug on\n"); | ||
252 | dbg = 1; | ||
253 | break; | ||
254 | case 'l': | ||
255 | printf("listen forever\n"); | ||
256 | loop = 1; | ||
257 | break; | ||
258 | default: | ||
259 | printf("Unknown option %d\n", c); | ||
260 | exit(-1); | ||
261 | } | ||
262 | } | ||
263 | |||
264 | if (write_file) { | ||
265 | fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, | ||
266 | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); | ||
267 | if (fd == -1) { | ||
268 | perror("Cannot open output file\n"); | ||
269 | exit(1); | ||
270 | } | ||
271 | } | ||
272 | |||
273 | if ((nl_sd = create_nl_socket(NETLINK_GENERIC)) < 0) | ||
274 | err(1, "error creating Netlink socket\n"); | ||
275 | |||
276 | |||
277 | mypid = getpid(); | ||
278 | id = get_family_id(nl_sd); | ||
279 | if (!id) { | ||
280 | printf("Error getting family id, errno %d", errno); | ||
281 | goto err; | ||
282 | } | ||
283 | PRINTF("family id %d\n", id); | ||
284 | |||
285 | if (maskset) { | ||
286 | rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, | ||
287 | TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, | ||
288 | &cpumask, sizeof(cpumask)); | ||
289 | PRINTF("Sent register cpumask, retval %d\n", rc); | ||
290 | if (rc < 0) { | ||
291 | printf("error sending register cpumask\n"); | ||
292 | goto err; | ||
293 | } | ||
294 | } | ||
295 | |||
296 | if (tid) { | ||
297 | rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, | ||
298 | cmd_type, &tid, sizeof(__u32)); | ||
299 | PRINTF("Sent pid/tgid, retval %d\n", rc); | ||
300 | if (rc < 0) { | ||
301 | printf("error sending tid/tgid cmd\n"); | ||
302 | goto done; | ||
303 | } | ||
304 | } | ||
305 | |||
306 | do { | ||
307 | int i; | ||
308 | |||
309 | rep_len = recv(nl_sd, &msg, sizeof(msg), 0); | ||
310 | PRINTF("received %d bytes\n", rep_len); | ||
311 | |||
312 | if (rep_len < 0) { | ||
313 | printf("nonfatal reply error: errno %d\n", errno); | ||
314 | continue; | ||
315 | } | ||
316 | if (msg.n.nlmsg_type == NLMSG_ERROR || | ||
317 | !NLMSG_OK((&msg.n), rep_len)) { | ||
318 | printf("fatal reply error, errno %d\n", errno); | ||
319 | goto done; | ||
320 | } | ||
321 | |||
322 | PRINTF("nlmsghdr size=%d, nlmsg_len=%d, rep_len=%d\n", | ||
323 | sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len); | ||
324 | |||
325 | |||
326 | rep_len = GENLMSG_PAYLOAD(&msg.n); | ||
327 | |||
328 | na = (struct nlattr *) GENLMSG_DATA(&msg); | ||
329 | len = 0; | ||
330 | i = 0; | ||
331 | while (len < rep_len) { | ||
332 | len += NLA_ALIGN(na->nla_len); | ||
333 | switch (na->nla_type) { | ||
334 | case TASKSTATS_TYPE_AGGR_TGID: | ||
335 | /* Fall through */ | ||
336 | case TASKSTATS_TYPE_AGGR_PID: | ||
337 | aggr_len = NLA_PAYLOAD(na->nla_len); | ||
338 | len2 = 0; | ||
339 | /* For nested attributes, na follows */ | ||
340 | na = (struct nlattr *) NLA_DATA(na); | ||
341 | done = 0; | ||
342 | while (len2 < aggr_len) { | ||
343 | switch (na->nla_type) { | ||
344 | case TASKSTATS_TYPE_PID: | ||
345 | rtid = *(int *) NLA_DATA(na); | ||
346 | if (print_delays) | ||
347 | printf("PID\t%d\n", rtid); | ||
348 | break; | ||
349 | case TASKSTATS_TYPE_TGID: | ||
350 | rtid = *(int *) NLA_DATA(na); | ||
351 | if (print_delays) | ||
352 | printf("TGID\t%d\n", rtid); | ||
353 | break; | ||
354 | case TASKSTATS_TYPE_STATS: | ||
355 | count++; | ||
356 | if (print_delays) | ||
357 | print_delayacct((struct taskstats *) NLA_DATA(na)); | ||
358 | if (fd) { | ||
359 | if (write(fd, NLA_DATA(na), na->nla_len) < 0) { | ||
360 | err(1,"write error\n"); | ||
361 | } | ||
362 | } | ||
363 | if (!loop) | ||
364 | goto done; | ||
365 | break; | ||
366 | default: | ||
367 | printf("Unknown nested nla_type %d\n", na->nla_type); | ||
368 | break; | ||
369 | } | ||
370 | len2 += NLA_ALIGN(na->nla_len); | ||
371 | na = (struct nlattr *) ((char *) na + len2); | ||
372 | } | ||
373 | break; | ||
374 | |||
375 | default: | ||
376 | printf("Unknown nla_type %d\n", na->nla_type); | ||
377 | break; | ||
378 | } | ||
379 | na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); | ||
380 | } | ||
381 | } while (loop); | ||
382 | done: | ||
383 | if (maskset) { | ||
384 | rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, | ||
385 | TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, | ||
386 | &cpumask, sizeof(cpumask)); | ||
387 | printf("Sent deregister mask, retval %d\n", rc); | ||
388 | if (rc < 0) | ||
389 | err(rc, "error sending deregister cpumask\n"); | ||
390 | } | ||
391 | err: | ||
392 | close(nl_sd); | ||
393 | if (fd) | ||
394 | close(fd); | ||
395 | return 0; | ||
396 | } | ||
diff --git a/Documentation/accounting/taskstats.txt b/Documentation/accounting/taskstats.txt new file mode 100644 index 000000000000..92ebf29e9041 --- /dev/null +++ b/Documentation/accounting/taskstats.txt | |||
@@ -0,0 +1,181 @@ | |||
1 | Per-task statistics interface | ||
2 | ----------------------------- | ||
3 | |||
4 | |||
5 | Taskstats is a netlink-based interface for sending per-task and | ||
6 | per-process statistics from the kernel to userspace. | ||
7 | |||
8 | Taskstats was designed for the following benefits: | ||
9 | |||
10 | - efficiently provide statistics during lifetime of a task and on its exit | ||
11 | - unified interface for multiple accounting subsystems | ||
12 | - extensibility for use by future accounting patches | ||
13 | |||
14 | Terminology | ||
15 | ----------- | ||
16 | |||
17 | "pid", "tid" and "task" are used interchangeably and refer to the standard | ||
18 | Linux task defined by struct task_struct. per-pid stats are the same as | ||
19 | per-task stats. | ||
20 | |||
21 | "tgid", "process" and "thread group" are used interchangeably and refer to the | ||
22 | tasks that share an mm_struct i.e. the traditional Unix process. Despite the | ||
23 | use of tgid, there is no special treatment for the task that is thread group | ||
24 | leader - a process is deemed alive as long as it has any task belonging to it. | ||
25 | |||
26 | Usage | ||
27 | ----- | ||
28 | |||
29 | To get statistics during a task's lifetime, userspace opens a unicast netlink | ||
30 | socket (NETLINK_GENERIC family) and sends commands specifying a pid or a tgid. | ||
31 | The response contains statistics for a task (if pid is specified) or the sum of | ||
32 | statistics for all tasks of the process (if tgid is specified). | ||
33 | |||
34 | To obtain statistics for tasks which are exiting, the userspace listener | ||
35 | sends a register command and specifies a cpumask. Whenever a task exits on | ||
36 | one of the cpus in the cpumask, its per-pid statistics are sent to the | ||
37 | registered listener. Using cpumasks allows the data received by one listener | ||
38 | to be limited and assists in flow control over the netlink interface and is | ||
39 | explained in more detail below. | ||
40 | |||
41 | If the exiting task is the last thread exiting its thread group, | ||
42 | an additional record containing the per-tgid stats is also sent to userspace. | ||
43 | The latter contains the sum of per-pid stats for all threads in the thread | ||
44 | group, both past and present. | ||
45 | |||
46 | getdelays.c is a simple utility demonstrating usage of the taskstats interface | ||
47 | for reporting delay accounting statistics. Users can register cpumasks, | ||
48 | send commands and process responses, listen for per-tid/tgid exit data, | ||
49 | write the data received to a file and do basic flow control by increasing | ||
50 | receive buffer sizes. | ||
51 | |||
52 | Interface | ||
53 | --------- | ||
54 | |||
55 | The user-kernel interface is encapsulated in include/linux/taskstats.h | ||
56 | |||
57 | To avoid this documentation becoming obsolete as the interface evolves, only | ||
58 | an outline of the current version is given. taskstats.h always overrides the | ||
59 | description here. | ||
60 | |||
61 | struct taskstats is the common accounting structure for both per-pid and | ||
62 | per-tgid data. It is versioned and can be extended by each accounting subsystem | ||
63 | that is added to the kernel. The fields and their semantics are defined in the | ||
64 | taskstats.h file. | ||
65 | |||
66 | The data exchanged between user and kernel space is a netlink message belonging | ||
67 | to the NETLINK_GENERIC family and using the netlink attributes interface. | ||
68 | The messages are in the format | ||
69 | |||
70 | +----------+- - -+-------------+-------------------+ | ||
71 | | nlmsghdr | Pad | genlmsghdr | taskstats payload | | ||
72 | +----------+- - -+-------------+-------------------+ | ||
73 | |||
74 | |||
75 | The taskstats payload is one of the following three kinds: | ||
76 | |||
77 | 1. Commands: Sent from user to kernel. Commands to get data on | ||
78 | a pid/tgid consist of one attribute, of type TASKSTATS_CMD_ATTR_PID/TGID, | ||
79 | containing a u32 pid or tgid in the attribute payload. The pid/tgid denotes | ||
80 | the task/process for which userspace wants statistics. | ||
81 | |||
82 | Commands to register/deregister interest in exit data from a set of cpus | ||
83 | consist of one attribute, of type | ||
84 | TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK and contain a cpumask in the | ||
85 | attribute payload. The cpumask is specified as an ascii string of | ||
86 | comma-separated cpu ranges e.g. to listen to exit data from cpus 1,2,3,5,7,8 | ||
87 | the cpumask would be "1-3,5,7-8". If userspace forgets to deregister interest | ||
88 | in cpus before closing the listening socket, the kernel cleans up its interest | ||
89 | set over time. However, for the sake of efficiency, an explicit deregistration | ||
90 | is advisable. | ||
91 | |||
92 | 2. Response for a command: sent from the kernel in response to a userspace | ||
93 | command. The payload is a series of three attributes of type: | ||
94 | |||
95 | a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates | ||
96 | a pid/tgid will be followed by some stats. | ||
97 | |||
98 | b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats | ||
99 | is being returned. | ||
100 | |||
101 | c) TASKSTATS_TYPE_STATS: attribute with a struct taskstsats as payload. The | ||
102 | same structure is used for both per-pid and per-tgid stats. | ||
103 | |||
104 | 3. New message sent by kernel whenever a task exits. The payload consists of a | ||
105 | series of attributes of the following type: | ||
106 | |||
107 | a) TASKSTATS_TYPE_AGGR_PID: indicates next two attributes will be pid+stats | ||
108 | b) TASKSTATS_TYPE_PID: contains exiting task's pid | ||
109 | c) TASKSTATS_TYPE_STATS: contains the exiting task's per-pid stats | ||
110 | d) TASKSTATS_TYPE_AGGR_TGID: indicates next two attributes will be tgid+stats | ||
111 | e) TASKSTATS_TYPE_TGID: contains tgid of process to which task belongs | ||
112 | f) TASKSTATS_TYPE_STATS: contains the per-tgid stats for exiting task's process | ||
113 | |||
114 | |||
115 | per-tgid stats | ||
116 | -------------- | ||
117 | |||
118 | Taskstats provides per-process stats, in addition to per-task stats, since | ||
119 | resource management is often done at a process granularity and aggregating task | ||
120 | stats in userspace alone is inefficient and potentially inaccurate (due to lack | ||
121 | of atomicity). | ||
122 | |||
123 | However, maintaining per-process, in addition to per-task stats, within the | ||
124 | kernel has space and time overheads. To address this, the taskstats code | ||
125 | accumalates each exiting task's statistics into a process-wide data structure. | ||
126 | When the last task of a process exits, the process level data accumalated also | ||
127 | gets sent to userspace (along with the per-task data). | ||
128 | |||
129 | When a user queries to get per-tgid data, the sum of all other live threads in | ||
130 | the group is added up and added to the accumalated total for previously exited | ||
131 | threads of the same thread group. | ||
132 | |||
133 | Extending taskstats | ||
134 | ------------------- | ||
135 | |||
136 | There are two ways to extend the taskstats interface to export more | ||
137 | per-task/process stats as patches to collect them get added to the kernel | ||
138 | in future: | ||
139 | |||
140 | 1. Adding more fields to the end of the existing struct taskstats. Backward | ||
141 | compatibility is ensured by the version number within the | ||
142 | structure. Userspace will use only the fields of the struct that correspond | ||
143 | to the version its using. | ||
144 | |||
145 | 2. Defining separate statistic structs and using the netlink attributes | ||
146 | interface to return them. Since userspace processes each netlink attribute | ||
147 | independently, it can always ignore attributes whose type it does not | ||
148 | understand (because it is using an older version of the interface). | ||
149 | |||
150 | |||
151 | Choosing between 1. and 2. is a matter of trading off flexibility and | ||
152 | overhead. If only a few fields need to be added, then 1. is the preferable | ||
153 | path since the kernel and userspace don't need to incur the overhead of | ||
154 | processing new netlink attributes. But if the new fields expand the existing | ||
155 | struct too much, requiring disparate userspace accounting utilities to | ||
156 | unnecessarily receive large structures whose fields are of no interest, then | ||
157 | extending the attributes structure would be worthwhile. | ||
158 | |||
159 | Flow control for taskstats | ||
160 | -------------------------- | ||
161 | |||
162 | When the rate of task exits becomes large, a listener may not be able to keep | ||
163 | up with the kernel's rate of sending per-tid/tgid exit data leading to data | ||
164 | loss. This possibility gets compounded when the taskstats structure gets | ||
165 | extended and the number of cpus grows large. | ||
166 | |||
167 | To avoid losing statistics, userspace should do one or more of the following: | ||
168 | |||
169 | - increase the receive buffer sizes for the netlink sockets opened by | ||
170 | listeners to receive exit data. | ||
171 | |||
172 | - create more listeners and reduce the number of cpus being listened to by | ||
173 | each listener. In the extreme case, there could be one listener for each cpu. | ||
174 | Users may also consider setting the cpu affinity of the listener to the subset | ||
175 | of cpus to which it listens, especially if they are listening to just one cpu. | ||
176 | |||
177 | Despite these measures, if the userspace receives ENOBUFS error messages | ||
178 | indicated overflow of receive buffers, it should take measures to handle the | ||
179 | loss of data. | ||
180 | |||
181 | ---- | ||
diff --git a/Documentation/drivers/edac/edac.txt b/Documentation/drivers/edac/edac.txt index 70d96a62e5e1..7b3d969d2964 100644 --- a/Documentation/drivers/edac/edac.txt +++ b/Documentation/drivers/edac/edac.txt | |||
@@ -35,15 +35,14 @@ the vendor should tie the parity status bits to 0 if they do not intend | |||
35 | to generate parity. Some vendors do not do this, and thus the parity bit | 35 | to generate parity. Some vendors do not do this, and thus the parity bit |
36 | can "float" giving false positives. | 36 | can "float" giving false positives. |
37 | 37 | ||
38 | The PCI Parity EDAC device has the ability to "skip" known flaky | 38 | [There are patches in the kernel queue which will allow for storage of |
39 | cards during the parity scan. These are set by the parity "blacklist" | 39 | quirks of PCI devices reporting false parity positives. The 2.6.18 |
40 | interface in the sysfs for PCI Parity. (See the PCI section in the sysfs | 40 | kernel should have those patches included. When that becomes available, |
41 | section below.) There is also a parity "whitelist" which is used as | 41 | then EDAC will be patched to utilize that information to "skip" such |
42 | an explicit list of devices to scan, while the blacklist is a list | 42 | devices.] |
43 | of devices to skip. | ||
44 | 43 | ||
45 | EDAC will have future error detectors that will be added or integrated | 44 | EDAC will have future error detectors that will be integrated with |
46 | into EDAC in the following list: | 45 | EDAC or added to it, in the following list: |
47 | 46 | ||
48 | MCE Machine Check Exception | 47 | MCE Machine Check Exception |
49 | MCA Machine Check Architecture | 48 | MCA Machine Check Architecture |
@@ -93,22 +92,24 @@ EDAC lives in the /sys/devices/system/edac directory. Within this directory | |||
93 | there currently reside 2 'edac' components: | 92 | there currently reside 2 'edac' components: |
94 | 93 | ||
95 | mc memory controller(s) system | 94 | mc memory controller(s) system |
96 | pci PCI status system | 95 | pci PCI control and status system |
97 | 96 | ||
98 | 97 | ||
99 | ============================================================================ | 98 | ============================================================================ |
100 | Memory Controller (mc) Model | 99 | Memory Controller (mc) Model |
101 | 100 | ||
102 | First a background on the memory controller's model abstracted in EDAC. | 101 | First a background on the memory controller's model abstracted in EDAC. |
103 | Each mc device controls a set of DIMM memory modules. These modules are | 102 | Each 'mc' device controls a set of DIMM memory modules. These modules are |
104 | laid out in a Chip-Select Row (csrowX) and Channel table (chX). There can | 103 | laid out in a Chip-Select Row (csrowX) and Channel table (chX). There can |
105 | be multiple csrows and two channels. | 104 | be multiple csrows and multiple channels. |
106 | 105 | ||
107 | Memory controllers allow for several csrows, with 8 csrows being a typical value. | 106 | Memory controllers allow for several csrows, with 8 csrows being a typical value. |
108 | Yet, the actual number of csrows depends on the electrical "loading" | 107 | Yet, the actual number of csrows depends on the electrical "loading" |
109 | of a given motherboard, memory controller and DIMM characteristics. | 108 | of a given motherboard, memory controller and DIMM characteristics. |
110 | 109 | ||
111 | Dual channels allows for 128 bit data transfers to the CPU from memory. | 110 | Dual channels allows for 128 bit data transfers to the CPU from memory. |
111 | Some newer chipsets allow for more than 2 channels, like Fully Buffered DIMMs | ||
112 | (FB-DIMMs). The following example will assume 2 channels: | ||
112 | 113 | ||
113 | 114 | ||
114 | Channel 0 Channel 1 | 115 | Channel 0 Channel 1 |
@@ -234,23 +235,15 @@ Polling period control file: | |||
234 | The time period, in milliseconds, for polling for error information. | 235 | The time period, in milliseconds, for polling for error information. |
235 | Too small a value wastes resources. Too large a value might delay | 236 | Too small a value wastes resources. Too large a value might delay |
236 | necessary handling of errors and might loose valuable information for | 237 | necessary handling of errors and might loose valuable information for |
237 | locating the error. 1000 milliseconds (once each second) is about | 238 | locating the error. 1000 milliseconds (once each second) is the current |
238 | right for most uses. | 239 | default. Systems which require all the bandwidth they can get, may |
240 | increase this. | ||
239 | 241 | ||
240 | LOAD TIME: module/kernel parameter: poll_msec=[0|1] | 242 | LOAD TIME: module/kernel parameter: poll_msec=[0|1] |
241 | 243 | ||
242 | RUN TIME: echo "1000" >/sys/devices/system/edac/mc/poll_msec | 244 | RUN TIME: echo "1000" >/sys/devices/system/edac/mc/poll_msec |
243 | 245 | ||
244 | 246 | ||
245 | Module Version read-only attribute file: | ||
246 | |||
247 | 'mc_version' | ||
248 | |||
249 | The EDAC CORE module's version and compile date are shown here to | ||
250 | indicate what EDAC is running. | ||
251 | |||
252 | |||
253 | |||
254 | ============================================================================ | 247 | ============================================================================ |
255 | 'mcX' DIRECTORIES | 248 | 'mcX' DIRECTORIES |
256 | 249 | ||
@@ -284,35 +277,6 @@ Seconds since last counter reset control file: | |||
284 | 277 | ||
285 | 278 | ||
286 | 279 | ||
287 | DIMM capability attribute file: | ||
288 | |||
289 | 'edac_capability' | ||
290 | |||
291 | The EDAC (Error Detection and Correction) capabilities/modes of | ||
292 | the memory controller hardware. | ||
293 | |||
294 | |||
295 | DIMM Current Capability attribute file: | ||
296 | |||
297 | 'edac_current_capability' | ||
298 | |||
299 | The EDAC capabilities available with the hardware | ||
300 | configuration. This may not be the same as "EDAC capability" | ||
301 | if the correct memory is not used. If a memory controller is | ||
302 | capable of EDAC, but DIMMs without check bits are in use, then | ||
303 | Parity, SECDED, S4ECD4ED capabilities will not be available | ||
304 | even though the memory controller might be capable of those | ||
305 | modes with the proper memory loaded. | ||
306 | |||
307 | |||
308 | Memory Type supported on this controller attribute file: | ||
309 | |||
310 | 'supported_mem_type' | ||
311 | |||
312 | This attribute file displays the memory type, usually | ||
313 | buffered and unbuffered DIMMs. | ||
314 | |||
315 | |||
316 | Memory Controller name attribute file: | 280 | Memory Controller name attribute file: |
317 | 281 | ||
318 | 'mc_name' | 282 | 'mc_name' |
@@ -321,16 +285,6 @@ Memory Controller name attribute file: | |||
321 | that is being utilized. | 285 | that is being utilized. |
322 | 286 | ||
323 | 287 | ||
324 | Memory Controller Module name attribute file: | ||
325 | |||
326 | 'module_name' | ||
327 | |||
328 | This attribute file displays the memory controller module name, | ||
329 | version and date built. The name of the memory controller | ||
330 | hardware - some drivers work with multiple controllers and | ||
331 | this field shows which hardware is present. | ||
332 | |||
333 | |||
334 | Total memory managed by this memory controller attribute file: | 288 | Total memory managed by this memory controller attribute file: |
335 | 289 | ||
336 | 'size_mb' | 290 | 'size_mb' |
@@ -432,6 +386,9 @@ Memory Type attribute file: | |||
432 | 386 | ||
433 | This attribute file will display what type of memory is currently | 387 | This attribute file will display what type of memory is currently |
434 | on this csrow. Normally, either buffered or unbuffered memory. | 388 | on this csrow. Normally, either buffered or unbuffered memory. |
389 | Examples: | ||
390 | Registered-DDR | ||
391 | Unbuffered-DDR | ||
435 | 392 | ||
436 | 393 | ||
437 | EDAC Mode of operation attribute file: | 394 | EDAC Mode of operation attribute file: |
@@ -446,8 +403,13 @@ Device type attribute file: | |||
446 | 403 | ||
447 | 'dev_type' | 404 | 'dev_type' |
448 | 405 | ||
449 | This attribute file will display what type of DIMM device is | 406 | This attribute file will display what type of DRAM device is |
450 | being utilized. Example: x4 | 407 | being utilized on this DIMM. |
408 | Examples: | ||
409 | x1 | ||
410 | x2 | ||
411 | x4 | ||
412 | x8 | ||
451 | 413 | ||
452 | 414 | ||
453 | Channel 0 CE Count attribute file: | 415 | Channel 0 CE Count attribute file: |
@@ -522,10 +484,10 @@ SYSTEM LOGGING | |||
522 | If logging for UEs and CEs are enabled then system logs will have | 484 | If logging for UEs and CEs are enabled then system logs will have |
523 | error notices indicating errors that have been detected: | 485 | error notices indicating errors that have been detected: |
524 | 486 | ||
525 | MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0, | 487 | EDAC MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0, |
526 | channel 1 "DIMM_B1": amd76x_edac | 488 | channel 1 "DIMM_B1": amd76x_edac |
527 | 489 | ||
528 | MC0: CE page 0x1e5, offset 0xfb0, grain 8, syndrome 0xb741, row 0, | 490 | EDAC MC0: CE page 0x1e5, offset 0xfb0, grain 8, syndrome 0xb741, row 0, |
529 | channel 1 "DIMM_B1": amd76x_edac | 491 | channel 1 "DIMM_B1": amd76x_edac |
530 | 492 | ||
531 | 493 | ||
@@ -610,64 +572,4 @@ Parity Count: | |||
610 | 572 | ||
611 | 573 | ||
612 | 574 | ||
613 | PCI Device Whitelist: | ||
614 | |||
615 | 'pci_parity_whitelist' | ||
616 | |||
617 | This control file allows for an explicit list of PCI devices to be | ||
618 | scanned for parity errors. Only devices found on this list will | ||
619 | be examined. The list is a line of hexadecimal VENDOR and DEVICE | ||
620 | ID tuples: | ||
621 | |||
622 | 1022:7450,1434:16a6 | ||
623 | |||
624 | One or more can be inserted, separated by a comma. | ||
625 | |||
626 | To write the above list doing the following as one command line: | ||
627 | |||
628 | echo "1022:7450,1434:16a6" | ||
629 | > /sys/devices/system/edac/pci/pci_parity_whitelist | ||
630 | |||
631 | |||
632 | |||
633 | To display what the whitelist is, simply 'cat' the same file. | ||
634 | |||
635 | |||
636 | PCI Device Blacklist: | ||
637 | |||
638 | 'pci_parity_blacklist' | ||
639 | |||
640 | This control file allows for a list of PCI devices to be | ||
641 | skipped for scanning. | ||
642 | The list is a line of hexadecimal VENDOR and DEVICE ID tuples: | ||
643 | |||
644 | 1022:7450,1434:16a6 | ||
645 | |||
646 | One or more can be inserted, separated by a comma. | ||
647 | |||
648 | To write the above list doing the following as one command line: | ||
649 | |||
650 | echo "1022:7450,1434:16a6" | ||
651 | > /sys/devices/system/edac/pci/pci_parity_blacklist | ||
652 | |||
653 | |||
654 | To display what the whitelist currently contains, | ||
655 | simply 'cat' the same file. | ||
656 | |||
657 | ======================================================================= | 575 | ======================================================================= |
658 | |||
659 | PCI Vendor and Devices IDs can be obtained with the lspci command. Using | ||
660 | the -n option lspci will display the vendor and device IDs. The system | ||
661 | administrator will have to determine which devices should be scanned or | ||
662 | skipped. | ||
663 | |||
664 | |||
665 | |||
666 | The two lists (white and black) are prioritized. blacklist is the lower | ||
667 | priority and will NOT be utilized when a whitelist has been set. | ||
668 | Turn OFF a whitelist by an empty echo command: | ||
669 | |||
670 | echo > /sys/devices/system/edac/pci/pci_parity_whitelist | ||
671 | |||
672 | and any previous blacklist will be utilized. | ||
673 | |||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 99f219a01e0e..9d3a0775a11d 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -55,14 +55,6 @@ Who: Mauro Carvalho Chehab <mchehab@brturbo.com.br> | |||
55 | 55 | ||
56 | --------------------------- | 56 | --------------------------- |
57 | 57 | ||
58 | What: remove EXPORT_SYMBOL(insert_resource) | ||
59 | When: April 2006 | ||
60 | Files: kernel/resource.c | ||
61 | Why: No modular usage in the kernel. | ||
62 | Who: Adrian Bunk <bunk@stusta.de> | ||
63 | |||
64 | --------------------------- | ||
65 | |||
66 | What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) | 58 | What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) |
67 | When: November 2005 | 59 | When: November 2005 |
68 | Files: drivers/pcmcia/: pcmcia_ioctl.c | 60 | Files: drivers/pcmcia/: pcmcia_ioctl.c |
@@ -166,17 +158,6 @@ Who: Arjan van de Ven <arjan@linux.intel.com> | |||
166 | 158 | ||
167 | --------------------------- | 159 | --------------------------- |
168 | 160 | ||
169 | What: remove EXPORT_SYMBOL(tasklist_lock) | ||
170 | When: August 2006 | ||
171 | Files: kernel/fork.c | ||
172 | Why: tasklist_lock protects the kernel internal task list. Modules have | ||
173 | no business looking at it, and all instances in drivers have been due | ||
174 | to use of too-lowlevel APIs. Having this symbol exported prevents | ||
175 | moving to more scalable locking schemes for the task list. | ||
176 | Who: Christoph Hellwig <hch@lst.de> | ||
177 | |||
178 | --------------------------- | ||
179 | |||
180 | What: mount/umount uevents | 161 | What: mount/umount uevents |
181 | When: February 2007 | 162 | When: February 2007 |
182 | Why: These events are not correct, and do not properly let userspace know | 163 | Why: These events are not correct, and do not properly let userspace know |
@@ -266,3 +247,14 @@ Why: The interrupt related SA_* flags are replaced by IRQF_* to move them | |||
266 | Who: Thomas Gleixner <tglx@linutronix.de> | 247 | Who: Thomas Gleixner <tglx@linutronix.de> |
267 | 248 | ||
268 | --------------------------- | 249 | --------------------------- |
250 | |||
251 | What: i2c-ite and i2c-algo-ite drivers | ||
252 | When: September 2006 | ||
253 | Why: These drivers never compiled since they were added to the kernel | ||
254 | tree 5 years ago. This feature removal can be reevaluated if | ||
255 | someone shows interest in the drivers, fixes them and takes over | ||
256 | maintenance. | ||
257 | http://marc.theaimsgroup.com/?l=linux-mips&m=115040510817448 | ||
258 | Who: Jean Delvare <khali@linux-fr.org> | ||
259 | |||
260 | --------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index d31efbbdfe50..247d7f619aa2 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -142,8 +142,8 @@ see also dquot_operations section. | |||
142 | 142 | ||
143 | --------------------------- file_system_type --------------------------- | 143 | --------------------------- file_system_type --------------------------- |
144 | prototypes: | 144 | prototypes: |
145 | struct int (*get_sb) (struct file_system_type *, int, | 145 | int (*get_sb) (struct file_system_type *, int, |
146 | const char *, void *, struct vfsmount *); | 146 | const char *, void *, struct vfsmount *); |
147 | void (*kill_sb) (struct super_block *); | 147 | void (*kill_sb) (struct super_block *); |
148 | locking rules: | 148 | locking rules: |
149 | may block BKL | 149 | may block BKL |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 9d3aed628bc1..1cb7e8be927a 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -113,8 +113,8 @@ members are defined: | |||
113 | struct file_system_type { | 113 | struct file_system_type { |
114 | const char *name; | 114 | const char *name; |
115 | int fs_flags; | 115 | int fs_flags; |
116 | struct int (*get_sb) (struct file_system_type *, int, | 116 | int (*get_sb) (struct file_system_type *, int, |
117 | const char *, void *, struct vfsmount *); | 117 | const char *, void *, struct vfsmount *); |
118 | void (*kill_sb) (struct super_block *); | 118 | void (*kill_sb) (struct super_block *); |
119 | struct module *owner; | 119 | struct module *owner; |
120 | struct file_system_type * next; | 120 | struct file_system_type * next; |
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru index 69cdb527d58f..b2c0d61b39a2 100644 --- a/Documentation/hwmon/abituguru +++ b/Documentation/hwmon/abituguru | |||
@@ -2,13 +2,36 @@ Kernel driver abituguru | |||
2 | ======================= | 2 | ======================= |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Abit uGuru (Hardware Monitor part only) | 5 | * Abit uGuru revision 1-3 (Hardware Monitor part only) |
6 | Prefix: 'abituguru' | 6 | Prefix: 'abituguru' |
7 | Addresses scanned: ISA 0x0E0 | 7 | Addresses scanned: ISA 0x0E0 |
8 | Datasheet: Not available, this driver is based on reverse engineering. | 8 | Datasheet: Not available, this driver is based on reverse engineering. |
9 | A "Datasheet" has been written based on the reverse engineering it | 9 | A "Datasheet" has been written based on the reverse engineering it |
10 | should be available in the same dir as this file under the name | 10 | should be available in the same dir as this file under the name |
11 | abituguru-datasheet. | 11 | abituguru-datasheet. |
12 | Note: | ||
13 | The uGuru is a microcontroller with onboard firmware which programs | ||
14 | it to behave as a hwmon IC. There are many different revisions of the | ||
15 | firmware and thus effectivly many different revisions of the uGuru. | ||
16 | Below is an incomplete list with which revisions are used for which | ||
17 | Motherboards: | ||
18 | uGuru 1.00 ~ 1.24 (AI7, KV8-MAX3, AN7) (1) | ||
19 | uGuru 2.0.0.0 ~ 2.0.4.2 (KV8-PRO) | ||
20 | uGuru 2.1.0.0 ~ 2.1.2.8 (AS8, AV8, AA8, AG8, AA8XE, AX8) | ||
21 | uGuru 2.2.0.0 ~ 2.2.0.6 (AA8 Fatal1ty) | ||
22 | uGuru 2.3.0.0 ~ 2.3.0.9 (AN8) | ||
23 | uGuru 3.0.0.0 ~ 3.0.1.2 (AW8, AL8, NI8) | ||
24 | uGuru 4.xxxxx? (AT8 32X) (2) | ||
25 | 1) For revisions 2 and 3 uGuru's the driver can autodetect the | ||
26 | sensortype (Volt or Temp) for bank1 sensors, for revision 1 uGuru's | ||
27 | this doesnot always work. For these uGuru's the autodection can | ||
28 | be overriden with the bank1_types module param. For all 3 known | ||
29 | revison 1 motherboards the correct use of this param is: | ||
30 | bank1_types=1,1,0,0,0,0,0,2,0,0,0,0,2,0,0,1 | ||
31 | You may also need to specify the fan_sensors option for these boards | ||
32 | fan_sensors=5 | ||
33 | 2) The current version of the abituguru driver is known to NOT work | ||
34 | on these Motherboards | ||
12 | 35 | ||
13 | Authors: | 36 | Authors: |
14 | Hans de Goede <j.w.r.degoede@hhs.nl>, | 37 | Hans de Goede <j.w.r.degoede@hhs.nl>, |
@@ -22,6 +45,11 @@ Module Parameters | |||
22 | * force: bool Force detection. Note this parameter only causes the | 45 | * force: bool Force detection. Note this parameter only causes the |
23 | detection to be skipped, if the uGuru can't be read | 46 | detection to be skipped, if the uGuru can't be read |
24 | the module initialization (insmod) will still fail. | 47 | the module initialization (insmod) will still fail. |
48 | * bank1_types: int[] Bank1 sensortype autodetection override: | ||
49 | -1 autodetect (default) | ||
50 | 0 volt sensor | ||
51 | 1 temp sensor | ||
52 | 2 not connected | ||
25 | * fan_sensors: int Tell the driver how many fan speed sensors there are | 53 | * fan_sensors: int Tell the driver how many fan speed sensors there are |
26 | on your motherboard. Default: 0 (autodetect). | 54 | on your motherboard. Default: 0 (autodetect). |
27 | * pwms: int Tell the driver how many fan speed controls (fan | 55 | * pwms: int Tell the driver how many fan speed controls (fan |
@@ -29,7 +57,7 @@ Module Parameters | |||
29 | * verbose: int How verbose should the driver be? (0-3): | 57 | * verbose: int How verbose should the driver be? (0-3): |
30 | 0 normal output | 58 | 0 normal output |
31 | 1 + verbose error reporting | 59 | 1 + verbose error reporting |
32 | 2 + sensors type probing info\n" | 60 | 2 + sensors type probing info (default) |
33 | 3 + retryable error reporting | 61 | 3 + retryable error reporting |
34 | Default: 2 (the driver is still in the testing phase) | 62 | Default: 2 (the driver is still in the testing phase) |
35 | 63 | ||
diff --git a/Documentation/i2c/busses/i2c-sis96x b/Documentation/i2c/busses/i2c-sis96x index 00a009b977e9..08d7b2dac69a 100644 --- a/Documentation/i2c/busses/i2c-sis96x +++ b/Documentation/i2c/busses/i2c-sis96x | |||
@@ -42,8 +42,8 @@ I suspect that this driver could be made to work for the following SiS | |||
42 | chipsets as well: 635, and 635T. If anyone owns a board with those chips | 42 | chipsets as well: 635, and 635T. If anyone owns a board with those chips |
43 | AND is willing to risk crashing & burning an otherwise well-behaved kernel | 43 | AND is willing to risk crashing & burning an otherwise well-behaved kernel |
44 | in the name of progress... please contact me at <mhoffman@lightlink.com> or | 44 | in the name of progress... please contact me at <mhoffman@lightlink.com> or |
45 | via the project's mailing list: <lm-sensors@lm-sensors.org>. Please | 45 | via the project's mailing list: <i2c@lm-sensors.org>. Please send bug |
46 | send bug reports and/or success stories as well. | 46 | reports and/or success stories as well. |
47 | 47 | ||
48 | 48 | ||
49 | TO DOs | 49 | TO DOs |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 149f62ba14a5..e11f7728ec6f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -448,6 +448,8 @@ running once the system is up. | |||
448 | Format: <area>[,<node>] | 448 | Format: <area>[,<node>] |
449 | See also Documentation/networking/decnet.txt. | 449 | See also Documentation/networking/decnet.txt. |
450 | 450 | ||
451 | delayacct [KNL] Enable per-task delay accounting | ||
452 | |||
451 | dhash_entries= [KNL] | 453 | dhash_entries= [KNL] |
452 | Set number of hash buckets for dentry cache. | 454 | Set number of hash buckets for dentry cache. |
453 | 455 | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 28d1bc3edb1c..46b9b389df35 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -1015,10 +1015,9 @@ CPU from reordering them. | |||
1015 | There are some more advanced barrier functions: | 1015 | There are some more advanced barrier functions: |
1016 | 1016 | ||
1017 | (*) set_mb(var, value) | 1017 | (*) set_mb(var, value) |
1018 | (*) set_wmb(var, value) | ||
1019 | 1018 | ||
1020 | These assign the value to the variable and then insert at least a write | 1019 | This assigns the value to the variable and then inserts at least a write |
1021 | barrier after it, depending on the function. They aren't guaranteed to | 1020 | barrier after it, depending on the function. It isn't guaranteed to |
1022 | insert anything more than a compiler barrier in a UP compilation. | 1021 | insert anything more than a compiler barrier in a UP compilation. |
1023 | 1022 | ||
1024 | 1023 | ||
diff --git a/Documentation/mips/time.README b/Documentation/mips/time.README index 70bc0dd43d6d..69ddc5c14b79 100644 --- a/Documentation/mips/time.README +++ b/Documentation/mips/time.README | |||
@@ -65,7 +65,7 @@ the following functions or values: | |||
65 | 1. (optional) set up RTC routines | 65 | 1. (optional) set up RTC routines |
66 | 2. (optional) calibrate and set the mips_counter_frequency | 66 | 2. (optional) calibrate and set the mips_counter_frequency |
67 | 67 | ||
68 | b) board_timer_setup - a function pointer. Invoked at the end of time_init() | 68 | b) plat_timer_setup - a function pointer. Invoked at the end of time_init() |
69 | 1. (optional) over-ride any decisions made in time_init() | 69 | 1. (optional) over-ride any decisions made in time_init() |
70 | 2. set up the irqaction for timer interrupt. | 70 | 2. set up the irqaction for timer interrupt. |
71 | 3. enable the timer interrupt | 71 | 3. enable the timer interrupt |
@@ -116,19 +116,17 @@ Step 2: the machine setup() function | |||
116 | 116 | ||
117 | If you supply board_time_init(), set the function poointer. | 117 | If you supply board_time_init(), set the function poointer. |
118 | 118 | ||
119 | Set the function pointer board_timer_setup() (mandatory) | ||
120 | 119 | ||
121 | 120 | Step 3: implement rtc routines, board_time_init() and plat_timer_setup() | |
122 | Step 3: implement rtc routines, board_time_init() and board_timer_setup() | ||
123 | if needed. | 121 | if needed. |
124 | 122 | ||
125 | board_time_init() - | 123 | board_time_init() - |
126 | a) (optional) set up RTC routines, | 124 | a) (optional) set up RTC routines, |
127 | b) (optional) calibrate and set the mips_counter_frequency | 125 | b) (optional) calibrate and set the mips_counter_frequency |
128 | (only needed if you intended to use fixed_rate_gettimeoffset | 126 | (only needed if you intended to use fixed_rate_gettimeoffset |
129 | or use cpu counter as timer interrupt source) | 127 | or use cpu counter as timer interrupt source) |
130 | 128 | ||
131 | board_timer_setup() - | 129 | plat_timer_setup() - |
132 | a) (optional) over-write any choices made above by time_init(). | 130 | a) (optional) over-write any choices made above by time_init(). |
133 | b) machine specific code should setup the timer irqaction. | 131 | b) machine specific code should setup the timer irqaction. |
134 | c) enable the timer interrupt | 132 | c) enable the timer interrupt |
diff --git a/Documentation/nfsroot.txt b/Documentation/nfsroot.txt index d56dc71d9430..3cc953cb288f 100644 --- a/Documentation/nfsroot.txt +++ b/Documentation/nfsroot.txt | |||
@@ -4,15 +4,16 @@ Mounting the root filesystem via NFS (nfsroot) | |||
4 | Written 1996 by Gero Kuhlmann <gero@gkminix.han.de> | 4 | Written 1996 by Gero Kuhlmann <gero@gkminix.han.de> |
5 | Updated 1997 by Martin Mares <mj@atrey.karlin.mff.cuni.cz> | 5 | Updated 1997 by Martin Mares <mj@atrey.karlin.mff.cuni.cz> |
6 | Updated 2006 by Nico Schottelius <nico-kernel-nfsroot@schottelius.org> | 6 | Updated 2006 by Nico Schottelius <nico-kernel-nfsroot@schottelius.org> |
7 | Updated 2006 by Horms <horms@verge.net.au> | ||
7 | 8 | ||
8 | 9 | ||
9 | 10 | ||
10 | If you want to use a diskless system, as an X-terminal or printer | 11 | In order to use a diskless system, such as an X-terminal or printer server |
11 | server for example, you have to put your root filesystem onto a | 12 | for example, it is necessary for the root filesystem to be present on a |
12 | non-disk device. This can either be a ramdisk (see initrd.txt in | 13 | non-disk device. This may be an initramfs (see Documentation/filesystems/ |
13 | this directory for further information) or a filesystem mounted | 14 | ramfs-rootfs-initramfs.txt), a ramdisk (see Documenation/initrd.txt) or a |
14 | via NFS. The following text describes on how to use NFS for the | 15 | filesystem mounted via NFS. The following text describes on how to use NFS |
15 | root filesystem. For the rest of this text 'client' means the | 16 | for the root filesystem. For the rest of this text 'client' means the |
16 | diskless system, and 'server' means the NFS server. | 17 | diskless system, and 'server' means the NFS server. |
17 | 18 | ||
18 | 19 | ||
@@ -21,11 +22,13 @@ diskless system, and 'server' means the NFS server. | |||
21 | 1.) Enabling nfsroot capabilities | 22 | 1.) Enabling nfsroot capabilities |
22 | ----------------------------- | 23 | ----------------------------- |
23 | 24 | ||
24 | In order to use nfsroot you have to select support for NFS during | 25 | In order to use nfsroot, NFS client support needs to be selected as |
25 | kernel configuration. Note that NFS cannot be loaded as a module | 26 | built-in during configuration. Once this has been selected, the nfsroot |
26 | in this case. The configuration script will then ask you whether | 27 | option will become available, which should also be selected. |
27 | you want to use nfsroot, and if yes what kind of auto configuration | 28 | |
28 | system you want to use. Selecting both BOOTP and RARP is safe. | 29 | In the networking options, kernel level autoconfiguration can be selected, |
30 | along with the types of autoconfiguration to support. Selecting all of | ||
31 | DHCP, BOOTP and RARP is safe. | ||
29 | 32 | ||
30 | 33 | ||
31 | 34 | ||
@@ -33,11 +36,10 @@ system you want to use. Selecting both BOOTP and RARP is safe. | |||
33 | 2.) Kernel command line | 36 | 2.) Kernel command line |
34 | ------------------- | 37 | ------------------- |
35 | 38 | ||
36 | When the kernel has been loaded by a boot loader (either by loadlin, | 39 | When the kernel has been loaded by a boot loader (see below) it needs to be |
37 | LILO or a network boot program) it has to be told what root fs device | 40 | told what root fs device to use. And in the case of nfsroot, where to find |
38 | to use, and where to find the server and the name of the directory | 41 | both the server and the name of the directory on the server to mount as root. |
39 | on the server to mount as root. This can be established by a couple | 42 | This can be established using the following kernel command line parameters: |
40 | of kernel command line parameters: | ||
41 | 43 | ||
42 | 44 | ||
43 | root=/dev/nfs | 45 | root=/dev/nfs |
@@ -49,23 +51,21 @@ root=/dev/nfs | |||
49 | 51 | ||
50 | nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] | 52 | nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] |
51 | 53 | ||
52 | If the `nfsroot' parameter is NOT given on the command line, the default | 54 | If the `nfsroot' parameter is NOT given on the command line, |
53 | "/tftpboot/%s" will be used. | 55 | the default "/tftpboot/%s" will be used. |
54 | 56 | ||
55 | <server-ip> Specifies the IP address of the NFS server. If this field | 57 | <server-ip> Specifies the IP address of the NFS server. |
56 | is not given, the default address as determined by the | 58 | The default address is determined by the `ip' parameter |
57 | `ip' variable (see below) is used. One use of this | 59 | (see below). This parameter allows the use of different |
58 | parameter is for example to allow using different servers | 60 | servers for IP autoconfiguration and NFS. |
59 | for RARP and NFS. Usually you can leave this blank. | ||
60 | 61 | ||
61 | <root-dir> Name of the directory on the server to mount as root. If | 62 | <root-dir> Name of the directory on the server to mount as root. |
62 | there is a "%s" token in the string, the token will be | 63 | If there is a "%s" token in the string, it will be |
63 | replaced by the ASCII-representation of the client's IP | 64 | replaced by the ASCII-representation of the client's |
64 | address. | 65 | IP address. |
65 | 66 | ||
66 | <nfs-options> Standard NFS options. All options are separated by commas. | 67 | <nfs-options> Standard NFS options. All options are separated by commas. |
67 | If the options field is not given, the following defaults | 68 | The following defaults are used: |
68 | will be used: | ||
69 | port = as given by server portmap daemon | 69 | port = as given by server portmap daemon |
70 | rsize = 1024 | 70 | rsize = 1024 |
71 | wsize = 1024 | 71 | wsize = 1024 |
@@ -81,129 +81,174 @@ nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] | |||
81 | ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> | 81 | ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf> |
82 | 82 | ||
83 | This parameter tells the kernel how to configure IP addresses of devices | 83 | This parameter tells the kernel how to configure IP addresses of devices |
84 | and also how to set up the IP routing table. It was originally called `nfsaddrs', | 84 | and also how to set up the IP routing table. It was originally called |
85 | but now the boot-time IP configuration works independently of NFS, so it | 85 | `nfsaddrs', but now the boot-time IP configuration works independently of |
86 | was renamed to `ip' and the old name remained as an alias for compatibility | 86 | NFS, so it was renamed to `ip' and the old name remained as an alias for |
87 | reasons. | 87 | compatibility reasons. |
88 | 88 | ||
89 | If this parameter is missing from the kernel command line, all fields are | 89 | If this parameter is missing from the kernel command line, all fields are |
90 | assumed to be empty, and the defaults mentioned below apply. In general | 90 | assumed to be empty, and the defaults mentioned below apply. In general |
91 | this means that the kernel tries to configure everything using both | 91 | this means that the kernel tries to configure everything using |
92 | RARP and BOOTP (depending on what has been enabled during kernel confi- | 92 | autoconfiguration. |
93 | guration, and if both what protocol answer got in first). | 93 | |
94 | The <autoconf> parameter can appear alone as the value to the `ip' | ||
95 | parameter (without all the ':' characters before) in which case auto- | ||
96 | configuration is used. | ||
97 | |||
98 | <client-ip> IP address of the client. | ||
94 | 99 | ||
95 | <client-ip> IP address of the client. If empty, the address will either | 100 | Default: Determined using autoconfiguration. |
96 | be determined by RARP or BOOTP. What protocol is used de- | ||
97 | pends on what has been enabled during kernel configuration | ||
98 | and on the <autoconf> parameter. If this parameter is not | ||
99 | empty, neither RARP nor BOOTP will be used. | ||
100 | 101 | ||
101 | <server-ip> IP address of the NFS server. If RARP is used to determine | 102 | <server-ip> IP address of the NFS server. If RARP is used to determine |
102 | the client address and this parameter is NOT empty only | 103 | the client address and this parameter is NOT empty only |
103 | replies from the specified server are accepted. To use | 104 | replies from the specified server are accepted. |
104 | different RARP and NFS server, specify your RARP server | 105 | |
105 | here (or leave it blank), and specify your NFS server in | 106 | Only required for for NFS root. That is autoconfiguration |
106 | the `nfsroot' parameter (see above). If this entry is blank | 107 | will not be triggered if it is missing and NFS root is not |
107 | the address of the server is used which answered the RARP | 108 | in operation. |
108 | or BOOTP request. | 109 | |
109 | 110 | Default: Determined using autoconfiguration. | |
110 | <gw-ip> IP address of a gateway if the server is on a different | 111 | The address of the autoconfiguration server is used. |
111 | subnet. If this entry is empty no gateway is used and the | 112 | |
112 | server is assumed to be on the local network, unless a | 113 | <gw-ip> IP address of a gateway if the server is on a different subnet. |
113 | value has been received by BOOTP. | 114 | |
114 | 115 | Default: Determined using autoconfiguration. | |
115 | <netmask> Netmask for local network interface. If this is empty, | 116 | |
117 | <netmask> Netmask for local network interface. If unspecified | ||
116 | the netmask is derived from the client IP address assuming | 118 | the netmask is derived from the client IP address assuming |
117 | classful addressing, unless overridden in BOOTP reply. | 119 | classful addressing. |
118 | 120 | ||
119 | <hostname> Name of the client. If empty, the client IP address is | 121 | Default: Determined using autoconfiguration. |
120 | used in ASCII notation, or the value received by BOOTP. | ||
121 | 122 | ||
122 | <device> Name of network device to use. If this is empty, all | 123 | <hostname> Name of the client. May be supplied by autoconfiguration, |
123 | devices are used for RARP and BOOTP requests, and the | 124 | but its absence will not trigger autoconfiguration. |
124 | first one we receive a reply on is configured. If you have | ||
125 | only one device, you can safely leave this blank. | ||
126 | 125 | ||
127 | <autoconf> Method to use for autoconfiguration. If this is either | 126 | Default: Client IP address is used in ASCII notation. |
128 | 'rarp' or 'bootp', the specified protocol is used. | ||
129 | If the value is 'both' or empty, both protocols are used | ||
130 | so far as they have been enabled during kernel configura- | ||
131 | tion. 'off' means no autoconfiguration. | ||
132 | 127 | ||
133 | The <autoconf> parameter can appear alone as the value to the `ip' | 128 | <device> Name of network device to use. |
134 | parameter (without all the ':' characters before) in which case auto- | 129 | |
135 | configuration is used. | 130 | Default: If the host only has one device, it is used. |
131 | Otherwise the device is determined using | ||
132 | autoconfiguration. This is done by sending | ||
133 | autoconfiguration requests out of all devices, | ||
134 | and using the device that received the first reply. | ||
136 | 135 | ||
136 | <autoconf> Method to use for autoconfiguration. In the case of options | ||
137 | which specify multiple autoconfiguration protocols, | ||
138 | requests are sent using all protocols, and the first one | ||
139 | to reply is used. | ||
137 | 140 | ||
141 | Only autoconfiguration protocols that have been compiled | ||
142 | into the kernel will be used, regardless of the value of | ||
143 | this option. | ||
138 | 144 | ||
145 | off or none: don't use autoconfiguration (default) | ||
146 | on or any: use any protocol available in the kernel | ||
147 | dhcp: use DHCP | ||
148 | bootp: use BOOTP | ||
149 | rarp: use RARP | ||
150 | both: use both BOOTP and RARP but not DHCP | ||
151 | (old option kept for backwards compatibility) | ||
139 | 152 | ||
140 | 3.) Kernel loader | 153 | Default: any |
141 | ------------- | ||
142 | 154 | ||
143 | To get the kernel into memory different approaches can be used. They | ||
144 | depend on what facilities are available: | ||
145 | 155 | ||
146 | 156 | ||
147 | 3.1) Writing the kernel onto a floppy using dd: | ||
148 | As always you can just write the kernel onto a floppy using dd, | ||
149 | but then it's not possible to use kernel command lines at all. | ||
150 | To substitute the 'root=' parameter, create a dummy device on any | ||
151 | linux system with major number 0 and minor number 255 using mknod: | ||
152 | 157 | ||
153 | mknod /dev/boot255 c 0 255 | 158 | 3.) Boot Loader |
159 | ---------- | ||
154 | 160 | ||
155 | Then copy the kernel zImage file onto a floppy using dd: | 161 | To get the kernel into memory different approaches can be used. |
162 | They depend on various facilities being available: | ||
156 | 163 | ||
157 | dd if=/usr/src/linux/arch/i386/boot/zImage of=/dev/fd0 | ||
158 | 164 | ||
159 | And finally use rdev to set the root device: | 165 | 3.1) Booting from a floppy using syslinux |
160 | 166 | ||
161 | rdev /dev/fd0 /dev/boot255 | 167 | When building kernels, an easy way to create a boot floppy that uses |
168 | syslinux is to use the zdisk or bzdisk make targets which use | ||
169 | and bzimage images respectively. Both targets accept the | ||
170 | FDARGS parameter which can be used to set the kernel command line. | ||
162 | 171 | ||
163 | You can then remove the dummy device /dev/boot255 again. There | 172 | e.g. |
164 | is no real device available for it. | 173 | make bzdisk FDARGS="root=/dev/nfs" |
165 | The other two kernel command line parameters cannot be substi- | 174 | |
166 | tuted with rdev. Therefore, using this method the kernel will | 175 | Note that the user running this command will need to have |
167 | by default use RARP and/or BOOTP, and if it gets an answer via | 176 | access to the floppy drive device, /dev/fd0 |
168 | RARP will mount the directory /tftpboot/<client-ip>/ as its | 177 | |
169 | root. If it got a BOOTP answer the directory name in that answer | 178 | For more information on syslinux, including how to create bootdisks |
170 | is used. | 179 | for prebuilt kernels, see http://syslinux.zytor.com/ |
180 | |||
181 | N.B: Previously it was possible to write a kernel directly to | ||
182 | a floppy using dd, configure the boot device using rdev, and | ||
183 | boot using the resulting floppy. Linux no longer supports this | ||
184 | method of booting. | ||
185 | |||
186 | 3.2) Booting from a cdrom using isolinux | ||
187 | |||
188 | When building kernels, an easy way to create a bootable cdrom that | ||
189 | uses isolinux is to use the isoimage target which uses a bzimage | ||
190 | image. Like zdisk and bzdisk, this target accepts the FDARGS | ||
191 | parameter which can be used to set the kernel command line. | ||
192 | |||
193 | e.g. | ||
194 | make isoimage FDARGS="root=/dev/nfs" | ||
195 | |||
196 | The resulting iso image will be arch/<ARCH>/boot/image.iso | ||
197 | This can be written to a cdrom using a variety of tools including | ||
198 | cdrecord. | ||
199 | |||
200 | e.g. | ||
201 | cdrecord dev=ATAPI:1,0,0 arch/i386/boot/image.iso | ||
202 | |||
203 | For more information on isolinux, including how to create bootdisks | ||
204 | for prebuilt kernels, see http://syslinux.zytor.com/ | ||
171 | 205 | ||
172 | 3.2) Using LILO | 206 | 3.2) Using LILO |
173 | When using LILO you can specify all necessary command line | 207 | When using LILO all the necessary command line parameters may be |
174 | parameters with the 'append=' command in the LILO configuration | 208 | specified using the 'append=' directive in the LILO configuration |
175 | file. However, to use the 'root=' command you also need to | 209 | file. |
176 | set up a dummy device as described in 3.1 above. For how to use | 210 | |
177 | LILO and its 'append=' command please refer to the LILO | 211 | However, to use the 'root=' directive you also need to create |
178 | documentation. | 212 | a dummy root device, which may be removed after LILO is run. |
213 | |||
214 | mknod /dev/boot255 c 0 255 | ||
215 | |||
216 | For information on configuring LILO, please refer to its documentation. | ||
179 | 217 | ||
180 | 3.3) Using GRUB | 218 | 3.3) Using GRUB |
181 | When you use GRUB, you simply append the parameters after the kernel | 219 | When using GRUB, kernel parameter are simply appended after the kernel |
182 | specification: "kernel <kernel> <parameters>" (without the quotes). | 220 | specification: kernel <kernel> <parameters> |
183 | 221 | ||
184 | 3.4) Using loadlin | 222 | 3.4) Using loadlin |
185 | When you want to boot Linux from a DOS command prompt without | 223 | loadlin may be used to boot Linux from a DOS command prompt without |
186 | having a local hard disk to mount as root, you can use loadlin. | 224 | requiring a local hard disk to mount as root. This has not been |
187 | I was told that it works, but haven't used it myself yet. In | 225 | thoroughly tested by the authors of this document, but in general |
188 | general you should be able to create a kernel command line simi- | 226 | it should be possible configure the kernel command line similarly |
189 | lar to how LILO is doing it. Please refer to the loadlin docu- | 227 | to the configuration of LILO. |
190 | mentation for further information. | 228 | |
229 | Please refer to the loadlin documentation for further information. | ||
191 | 230 | ||
192 | 3.5) Using a boot ROM | 231 | 3.5) Using a boot ROM |
193 | This is probably the most elegant way of booting a diskless | 232 | This is probably the most elegant way of booting a diskless client. |
194 | client. With a boot ROM the kernel gets loaded using the TFTP | 233 | With a boot ROM the kernel is loaded using the TFTP protocol. The |
195 | protocol. As far as I know, no commercial boot ROMs yet | 234 | authors of this document are not aware of any no commercial boot |
196 | support booting Linux over the network, but there are two | 235 | ROMs that support booting Linux over the network. However, there |
197 | free implementations of a boot ROM available on sunsite.unc.edu | 236 | are two free implementations of a boot ROM, netboot-nfs and |
198 | and its mirrors. They are called 'netboot-nfs' and 'etherboot'. | 237 | etherboot, both of which are available on sunsite.unc.edu, and both |
199 | Both contain everything you need to boot a diskless Linux client. | 238 | of which contain everything you need to boot a diskless Linux client. |
200 | 239 | ||
201 | 3.6) Using pxelinux | 240 | 3.6) Using pxelinux |
202 | Using pxelinux you specify the kernel you built with | 241 | Pxelinux may be used to boot linux using the PXE boot loader |
242 | which is present on many modern network cards. | ||
243 | |||
244 | When using pxelinux, the kernel image is specified using | ||
203 | "kernel <relative-path-below /tftpboot>". The nfsroot parameters | 245 | "kernel <relative-path-below /tftpboot>". The nfsroot parameters |
204 | are passed to the kernel by adding them to the "append" line. | 246 | are passed to the kernel by adding them to the "append" line. |
205 | You may perhaps also want to fine tune the console output, | 247 | It is common to use serial console in conjunction with pxeliunx, |
206 | see Documentation/serial-console.txt for serial console help. | 248 | see Documentation/serial-console.txt for more information. |
249 | |||
250 | For more information on isolinux, including how to create bootdisks | ||
251 | for prebuilt kernels, see http://syslinux.zytor.com/ | ||
207 | 252 | ||
208 | 253 | ||
209 | 254 | ||
diff --git a/Documentation/ramdisk.txt b/Documentation/ramdisk.txt index 7c25584e082c..52f75b7d51c2 100644 --- a/Documentation/ramdisk.txt +++ b/Documentation/ramdisk.txt | |||
@@ -6,7 +6,7 @@ Contents: | |||
6 | 1) Overview | 6 | 1) Overview |
7 | 2) Kernel Command Line Parameters | 7 | 2) Kernel Command Line Parameters |
8 | 3) Using "rdev -r" | 8 | 3) Using "rdev -r" |
9 | 4) An Example of Creating a Compressed RAM Disk | 9 | 4) An Example of Creating a Compressed RAM Disk |
10 | 10 | ||
11 | 11 | ||
12 | 1) Overview | 12 | 1) Overview |
@@ -34,7 +34,7 @@ make it clearer. The original "ramdisk=<ram_size>" has been kept around for | |||
34 | compatibility reasons, but it may be removed in the future. | 34 | compatibility reasons, but it may be removed in the future. |
35 | 35 | ||
36 | The new RAM disk also has the ability to load compressed RAM disk images, | 36 | The new RAM disk also has the ability to load compressed RAM disk images, |
37 | allowing one to squeeze more programs onto an average installation or | 37 | allowing one to squeeze more programs onto an average installation or |
38 | rescue floppy disk. | 38 | rescue floppy disk. |
39 | 39 | ||
40 | 40 | ||
@@ -51,7 +51,7 @@ default is 4096 (4 MB) (8192 (8 MB) on S390). | |||
51 | =================== | 51 | =================== |
52 | 52 | ||
53 | This parameter tells the RAM disk driver how many bytes to use per block. The | 53 | This parameter tells the RAM disk driver how many bytes to use per block. The |
54 | default is 512. | 54 | default is 1024 (BLOCK_SIZE). |
55 | 55 | ||
56 | 56 | ||
57 | 3) Using "rdev -r" | 57 | 3) Using "rdev -r" |
@@ -70,7 +70,7 @@ These numbers are no magical secrets, as seen below: | |||
70 | ./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 | 70 | ./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 |
71 | ./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 | 71 | ./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 |
72 | 72 | ||
73 | Consider a typical two floppy disk setup, where you will have the | 73 | Consider a typical two floppy disk setup, where you will have the |
74 | kernel on disk one, and have already put a RAM disk image onto disk #2. | 74 | kernel on disk one, and have already put a RAM disk image onto disk #2. |
75 | 75 | ||
76 | Hence you want to set bits 0 to 13 as 0, meaning that your RAM disk | 76 | Hence you want to set bits 0 to 13 as 0, meaning that your RAM disk |
@@ -97,12 +97,12 @@ Since the default start = 0 and the default prompt = 1, you could use: | |||
97 | append = "load_ramdisk=1" | 97 | append = "load_ramdisk=1" |
98 | 98 | ||
99 | 99 | ||
100 | 4) An Example of Creating a Compressed RAM Disk | 100 | 4) An Example of Creating a Compressed RAM Disk |
101 | ---------------------------------------------- | 101 | ---------------------------------------------- |
102 | 102 | ||
103 | To create a RAM disk image, you will need a spare block device to | 103 | To create a RAM disk image, you will need a spare block device to |
104 | construct it on. This can be the RAM disk device itself, or an | 104 | construct it on. This can be the RAM disk device itself, or an |
105 | unused disk partition (such as an unmounted swap partition). For this | 105 | unused disk partition (such as an unmounted swap partition). For this |
106 | example, we will use the RAM disk device, "/dev/ram0". | 106 | example, we will use the RAM disk device, "/dev/ram0". |
107 | 107 | ||
108 | Note: This technique should not be done on a machine with less than 8 MB | 108 | Note: This technique should not be done on a machine with less than 8 MB |
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 69866d5997a4..b8dc51ca776c 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -1172,7 +1172,7 @@ | |||
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | /* PCI IDs */ | 1174 | /* PCI IDs */ |
1175 | static struct pci_device_id snd_mychip_ids[] __devinitdata = { | 1175 | static struct pci_device_id snd_mychip_ids[] = { |
1176 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, | 1176 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, |
1177 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 1177 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
1178 | .... | 1178 | .... |
@@ -1565,7 +1565,7 @@ | |||
1565 | <informalexample> | 1565 | <informalexample> |
1566 | <programlisting> | 1566 | <programlisting> |
1567 | <![CDATA[ | 1567 | <![CDATA[ |
1568 | static struct pci_device_id snd_mychip_ids[] __devinitdata = { | 1568 | static struct pci_device_id snd_mychip_ids[] = { |
1569 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, | 1569 | { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, |
1570 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, | 1570 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, |
1571 | .... | 1571 | .... |
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index f001cd93b79b..02b0f7beb6d1 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt | |||
@@ -399,10 +399,10 @@ REINER SCT cyberJack pinpad/e-com USB chipcard reader | |||
399 | 399 | ||
400 | Prolific PL2303 Driver | 400 | Prolific PL2303 Driver |
401 | 401 | ||
402 | This driver support any device that has the PL2303 chip from Prolific | 402 | This driver supports any device that has the PL2303 chip from Prolific |
403 | in it. This includes a number of single port USB to serial | 403 | in it. This includes a number of single port USB to serial |
404 | converters and USB GPS devices. Devices from Aten (the UC-232) and | 404 | converters and USB GPS devices. Devices from Aten (the UC-232) and |
405 | IO-Data work with this driver. | 405 | IO-Data work with this driver, as does the DCU-11 mobile-phone cable. |
406 | 406 | ||
407 | For any questions or problems with this driver, please contact Greg | 407 | For any questions or problems with this driver, please contact Greg |
408 | Kroah-Hartman at greg@kroah.com | 408 | Kroah-Hartman at greg@kroah.com |