diff options
603 files changed, 14728 insertions, 10284 deletions
@@ -2571,6 +2571,16 @@ S: Subiaco, 6008 | |||
2571 | S: Perth, Western Australia | 2571 | S: Perth, Western Australia |
2572 | S: Australia | 2572 | S: Australia |
2573 | 2573 | ||
2574 | N: Miguel Ojeda Sandonis | ||
2575 | E: maxextreme@gmail.com | ||
2576 | D: Author: Auxiliary LCD Controller driver (ks0108) | ||
2577 | D: Author: Auxiliary LCD driver (cfag12864b) | ||
2578 | D: Author: Auxiliary LCD framebuffer driver (cfag12864bfb) | ||
2579 | D: Maintainer: Auxiliary display drivers tree (drivers/auxdisplay/*) | ||
2580 | S: C/ Mieses 20, 9-B | ||
2581 | S: Valladolid 47009 | ||
2582 | S: Spain | ||
2583 | |||
2574 | N: Greg Page | 2584 | N: Greg Page |
2575 | E: gpage@sovereign.org | 2585 | E: gpage@sovereign.org |
2576 | D: IPX development and support | 2586 | D: IPX development and support |
diff --git a/Documentation/ABI/testing/debugfs-pktcdvd b/Documentation/ABI/testing/debugfs-pktcdvd index 03dbd883cc41..bf9c16b64c34 100644 --- a/Documentation/ABI/testing/debugfs-pktcdvd +++ b/Documentation/ABI/testing/debugfs-pktcdvd | |||
@@ -1,6 +1,6 @@ | |||
1 | What: /debug/pktcdvd/pktcdvd[0-7] | 1 | What: /debug/pktcdvd/pktcdvd[0-7] |
2 | Date: Oct. 2006 | 2 | Date: Oct. 2006 |
3 | KernelVersion: 2.6.19 | 3 | KernelVersion: 2.6.20 |
4 | Contact: Thomas Maier <balagi@justmail.de> | 4 | Contact: Thomas Maier <balagi@justmail.de> |
5 | Description: | 5 | Description: |
6 | 6 | ||
@@ -11,8 +11,7 @@ The pktcdvd module (packet writing driver) creates | |||
11 | these files in debugfs: | 11 | these files in debugfs: |
12 | 12 | ||
13 | /debug/pktcdvd/pktcdvd[0-7]/ | 13 | /debug/pktcdvd/pktcdvd[0-7]/ |
14 | info (0444) Lots of human readable driver | 14 | info (0444) Lots of driver statistics and infos. |
15 | statistics and infos. Multiple lines! | ||
16 | 15 | ||
17 | Example: | 16 | Example: |
18 | ------- | 17 | ------- |
diff --git a/Documentation/ABI/testing/sysfs-class-pktcdvd b/Documentation/ABI/testing/sysfs-class-pktcdvd index c4c55edc9a5c..b1c3f0263359 100644 --- a/Documentation/ABI/testing/sysfs-class-pktcdvd +++ b/Documentation/ABI/testing/sysfs-class-pktcdvd | |||
@@ -1,6 +1,6 @@ | |||
1 | What: /sys/class/pktcdvd/ | 1 | What: /sys/class/pktcdvd/ |
2 | Date: Oct. 2006 | 2 | Date: Oct. 2006 |
3 | KernelVersion: 2.6.19 | 3 | KernelVersion: 2.6.20 |
4 | Contact: Thomas Maier <balagi@justmail.de> | 4 | Contact: Thomas Maier <balagi@justmail.de> |
5 | Description: | 5 | Description: |
6 | 6 | ||
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl index a34442436128..e7fc96433408 100644 --- a/Documentation/DocBook/gadget.tmpl +++ b/Documentation/DocBook/gadget.tmpl | |||
@@ -482,13 +482,13 @@ slightly. | |||
482 | <para>Gadget drivers | 482 | <para>Gadget drivers |
483 | rely on common USB structures and constants | 483 | rely on common USB structures and constants |
484 | defined in the | 484 | defined in the |
485 | <filename><linux/usb_ch9.h></filename> | 485 | <filename><linux/usb/ch9.h></filename> |
486 | header file, which is standard in Linux 2.6 kernels. | 486 | header file, which is standard in Linux 2.6 kernels. |
487 | These are the same types and constants used by host | 487 | These are the same types and constants used by host |
488 | side drivers (and usbcore). | 488 | side drivers (and usbcore). |
489 | </para> | 489 | </para> |
490 | 490 | ||
491 | !Iinclude/linux/usb_ch9.h | 491 | !Iinclude/linux/usb/ch9.h |
492 | </sect1> | 492 | </sect1> |
493 | 493 | ||
494 | <sect1 id="core"><title>Core Objects and Methods</title> | 494 | <sect1 id="core"><title>Core Objects and Methods</title> |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 3fa0c4b4541e..0bb90237e230 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -316,6 +316,9 @@ X!Earch/i386/kernel/mca.c | |||
316 | <sect1><title>DMI Interfaces</title> | 316 | <sect1><title>DMI Interfaces</title> |
317 | !Edrivers/firmware/dmi_scan.c | 317 | !Edrivers/firmware/dmi_scan.c |
318 | </sect1> | 318 | </sect1> |
319 | <sect1><title>EDD Interfaces</title> | ||
320 | !Idrivers/firmware/edd.c | ||
321 | </sect1> | ||
319 | </chapter> | 322 | </chapter> |
320 | 323 | ||
321 | <chapter id="security"> | 324 | <chapter id="security"> |
diff --git a/Documentation/DocBook/stylesheet.xsl b/Documentation/DocBook/stylesheet.xsl index 3ccce886c349..974e17ccf106 100644 --- a/Documentation/DocBook/stylesheet.xsl +++ b/Documentation/DocBook/stylesheet.xsl | |||
@@ -4,4 +4,5 @@ | |||
4 | <param name="funcsynopsis.style">ansi</param> | 4 | <param name="funcsynopsis.style">ansi</param> |
5 | <param name="funcsynopsis.tabular.threshold">80</param> | 5 | <param name="funcsynopsis.tabular.threshold">80</param> |
6 | <!-- <param name="paper.type">A4</param> --> | 6 | <!-- <param name="paper.type">A4</param> --> |
7 | <param name="generate.section.toc.level">2</param> | ||
7 | </stylesheet> | 8 | </stylesheet> |
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl index 143e5ff7deb8..a2ebd651b05a 100644 --- a/Documentation/DocBook/usb.tmpl +++ b/Documentation/DocBook/usb.tmpl | |||
@@ -187,13 +187,13 @@ | |||
187 | 187 | ||
188 | <chapter><title>USB-Standard Types</title> | 188 | <chapter><title>USB-Standard Types</title> |
189 | 189 | ||
190 | <para>In <filename><linux/usb_ch9.h></filename> you will find | 190 | <para>In <filename><linux/usb/ch9.h></filename> you will find |
191 | the USB data types defined in chapter 9 of the USB specification. | 191 | the USB data types defined in chapter 9 of the USB specification. |
192 | These data types are used throughout USB, and in APIs including | 192 | These data types are used throughout USB, and in APIs including |
193 | this host side API, gadget APIs, and usbfs. | 193 | this host side API, gadget APIs, and usbfs. |
194 | </para> | 194 | </para> |
195 | 195 | ||
196 | !Iinclude/linux/usb_ch9.h | 196 | !Iinclude/linux/usb/ch9.h |
197 | 197 | ||
198 | </chapter> | 198 | </chapter> |
199 | 199 | ||
@@ -574,7 +574,7 @@ for (;;) { | |||
574 | #include <asm/byteorder.h></programlisting> | 574 | #include <asm/byteorder.h></programlisting> |
575 | The standard USB device model requests, from "Chapter 9" of | 575 | The standard USB device model requests, from "Chapter 9" of |
576 | the USB 2.0 specification, are automatically included from | 576 | the USB 2.0 specification, are automatically included from |
577 | the <filename><linux/usb_ch9.h></filename> header. | 577 | the <filename><linux/usb/ch9.h></filename> header. |
578 | </para> | 578 | </para> |
579 | 579 | ||
580 | <para>Unless noted otherwise, the ioctl requests | 580 | <para>Unless noted otherwise, the ioctl requests |
diff --git a/Documentation/auxdisplay/cfag12864b b/Documentation/auxdisplay/cfag12864b new file mode 100644 index 000000000000..3572b98f45b8 --- /dev/null +++ b/Documentation/auxdisplay/cfag12864b | |||
@@ -0,0 +1,105 @@ | |||
1 | =================================== | ||
2 | cfag12864b LCD Driver Documentation | ||
3 | =================================== | ||
4 | |||
5 | License: GPLv2 | ||
6 | Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
7 | Date: 2006-10-27 | ||
8 | |||
9 | |||
10 | |||
11 | -------- | ||
12 | 0. INDEX | ||
13 | -------- | ||
14 | |||
15 | 1. DRIVER INFORMATION | ||
16 | 2. DEVICE INFORMATION | ||
17 | 3. WIRING | ||
18 | 4. USERSPACE PROGRAMMING | ||
19 | |||
20 | |||
21 | --------------------- | ||
22 | 1. DRIVER INFORMATION | ||
23 | --------------------- | ||
24 | |||
25 | This driver support one cfag12864b display at time. | ||
26 | |||
27 | |||
28 | --------------------- | ||
29 | 2. DEVICE INFORMATION | ||
30 | --------------------- | ||
31 | |||
32 | Manufacturer: Crystalfontz | ||
33 | Device Name: Crystalfontz 12864b LCD Series | ||
34 | Device Code: cfag12864b | ||
35 | Webpage: http://www.crystalfontz.com | ||
36 | Device Webpage: http://www.crystalfontz.com/products/12864b/ | ||
37 | Type: LCD (Liquid Crystal Display) | ||
38 | Width: 128 | ||
39 | Height: 64 | ||
40 | Colors: 2 (B/N) | ||
41 | Controller: ks0108 | ||
42 | Controllers: 2 | ||
43 | Pages: 8 each controller | ||
44 | Addresses: 64 each page | ||
45 | Data size: 1 byte each address | ||
46 | Memory size: 2 * 8 * 64 * 1 = 1024 bytes = 1 Kbyte | ||
47 | |||
48 | |||
49 | --------- | ||
50 | 3. WIRING | ||
51 | --------- | ||
52 | |||
53 | The cfag12864b LCD Series don't have official wiring. | ||
54 | |||
55 | The common wiring is done to the parallel port as shown: | ||
56 | |||
57 | Parallel Port cfag12864b | ||
58 | |||
59 | Name Pin# Pin# Name | ||
60 | |||
61 | Strobe ( 1)------------------------------(17) Enable | ||
62 | Data 0 ( 2)------------------------------( 4) Data 0 | ||
63 | Data 1 ( 3)------------------------------( 5) Data 1 | ||
64 | Data 2 ( 4)------------------------------( 6) Data 2 | ||
65 | Data 3 ( 5)------------------------------( 7) Data 3 | ||
66 | Data 4 ( 6)------------------------------( 8) Data 4 | ||
67 | Data 5 ( 7)------------------------------( 9) Data 5 | ||
68 | Data 6 ( 8)------------------------------(10) Data 6 | ||
69 | Data 7 ( 9)------------------------------(11) Data 7 | ||
70 | (10) [+5v]---( 1) Vdd | ||
71 | (11) [GND]---( 2) Ground | ||
72 | (12) [+5v]---(14) Reset | ||
73 | (13) [GND]---(15) Read / Write | ||
74 | Line (14)------------------------------(13) Controller Select 1 | ||
75 | (15) | ||
76 | Init (16)------------------------------(12) Controller Select 2 | ||
77 | Select (17)------------------------------(16) Data / Instruction | ||
78 | Ground (18)---[GND] [+5v]---(19) LED + | ||
79 | Ground (19)---[GND] | ||
80 | Ground (20)---[GND] E A Values: | ||
81 | Ground (21)---[GND] [GND]---[P1]---(18) Vee · R = Resistor = 22 ohm | ||
82 | Ground (22)---[GND] | · P1 = Preset = 10 Kohm | ||
83 | Ground (23)---[GND] ---- S ------( 3) V0 · P2 = Preset = 1 Kohm | ||
84 | Ground (24)---[GND] | | | ||
85 | Ground (25)---[GND] [GND]---[P2]---[R]---(20) LED - | ||
86 | |||
87 | |||
88 | ------------------------ | ||
89 | 4. USERSPACE PROGRAMMING | ||
90 | ------------------------ | ||
91 | |||
92 | The cfag12864bfb describes a framebuffer device (/dev/fbX). | ||
93 | |||
94 | It has a size of 1024 bytes = 1 Kbyte. | ||
95 | Each bit represents one pixel. If the bit is high, the pixel will | ||
96 | turn on. If the pixel is low, the pixel will turn off. | ||
97 | |||
98 | You can use the framebuffer as a file: fopen, fwrite, fclose... | ||
99 | Although the LCD won't get updated until the next refresh time arrives. | ||
100 | |||
101 | Also, you can mmap the framebuffer: open & mmap, munmap & close... | ||
102 | which is the best option for most uses. | ||
103 | |||
104 | Check Documentation/auxdisplay/cfag12864b-example.c | ||
105 | for a real working userspace complete program with usage examples. | ||
diff --git a/Documentation/auxdisplay/cfag12864b-example.c b/Documentation/auxdisplay/cfag12864b-example.c new file mode 100644 index 000000000000..7bfac354d4c9 --- /dev/null +++ b/Documentation/auxdisplay/cfag12864b-example.c | |||
@@ -0,0 +1,282 @@ | |||
1 | /* | ||
2 | * Filename: cfag12864b-example.c | ||
3 | * Version: 0.1.0 | ||
4 | * Description: cfag12864b LCD userspace example program | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-31 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | /* | ||
26 | * ------------------------ | ||
27 | * start of cfag12864b code | ||
28 | * ------------------------ | ||
29 | */ | ||
30 | |||
31 | #include <string.h> | ||
32 | #include <fcntl.h> | ||
33 | #include <unistd.h> | ||
34 | #include <sys/types.h> | ||
35 | #include <sys/stat.h> | ||
36 | #include <sys/mman.h> | ||
37 | |||
38 | #define CFAG12864B_WIDTH (128) | ||
39 | #define CFAG12864B_HEIGHT (64) | ||
40 | #define CFAG12864B_SIZE (128 * 64 / 8) | ||
41 | #define CFAG12864B_BPB (8) | ||
42 | #define CFAG12864B_ADDRESS(x, y) ((y) * CFAG12864B_WIDTH / \ | ||
43 | CFAG12864B_BPB + (x) / CFAG12864B_BPB) | ||
44 | #define CFAG12864B_BIT(n) (((unsigned char) 1) << (n)) | ||
45 | |||
46 | #undef CFAG12864B_DOCHECK | ||
47 | #ifdef CFAG12864B_DOCHECK | ||
48 | #define CFAG12864B_CHECK(x, y) ((x) < CFAG12864B_WIDTH && \ | ||
49 | (y) < CFAG12864B_HEIGHT) | ||
50 | #else | ||
51 | #define CFAG12864B_CHECK(x, y) (1) | ||
52 | #endif | ||
53 | |||
54 | int cfag12864b_fd; | ||
55 | unsigned char * cfag12864b_mem; | ||
56 | unsigned char cfag12864b_buffer[CFAG12864B_SIZE]; | ||
57 | |||
58 | /* | ||
59 | * init a cfag12864b framebuffer device | ||
60 | * | ||
61 | * No error: return = 0 | ||
62 | * Unable to open: return = -1 | ||
63 | * Unable to mmap: return = -2 | ||
64 | */ | ||
65 | int cfag12864b_init(char *path) | ||
66 | { | ||
67 | cfag12864b_fd = open(path, O_RDWR); | ||
68 | if (cfag12864b_fd == -1) | ||
69 | return -1; | ||
70 | |||
71 | cfag12864b_mem = mmap(0, CFAG12864B_SIZE, PROT_READ | PROT_WRITE, | ||
72 | MAP_SHARED, cfag12864b_fd, 0); | ||
73 | if (cfag12864b_mem == MAP_FAILED) { | ||
74 | close(cfag12864b_fd); | ||
75 | return -2; | ||
76 | } | ||
77 | |||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | /* | ||
82 | * exit a cfag12864b framebuffer device | ||
83 | */ | ||
84 | void cfag12864b_exit(void) | ||
85 | { | ||
86 | munmap(cfag12864b_mem, CFAG12864B_SIZE); | ||
87 | close(cfag12864b_fd); | ||
88 | } | ||
89 | |||
90 | /* | ||
91 | * set (x, y) pixel | ||
92 | */ | ||
93 | void cfag12864b_set(unsigned char x, unsigned char y) | ||
94 | { | ||
95 | if (CFAG12864B_CHECK(x, y)) | ||
96 | cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] |= | ||
97 | CFAG12864B_BIT(x % CFAG12864B_BPB); | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * unset (x, y) pixel | ||
102 | */ | ||
103 | void cfag12864b_unset(unsigned char x, unsigned char y) | ||
104 | { | ||
105 | if (CFAG12864B_CHECK(x, y)) | ||
106 | cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &= | ||
107 | ~CFAG12864B_BIT(x % CFAG12864B_BPB); | ||
108 | } | ||
109 | |||
110 | /* | ||
111 | * is set (x, y) pixel? | ||
112 | * | ||
113 | * Pixel off: return = 0 | ||
114 | * Pixel on: return = 1 | ||
115 | */ | ||
116 | unsigned char cfag12864b_isset(unsigned char x, unsigned char y) | ||
117 | { | ||
118 | if (CFAG12864B_CHECK(x, y)) | ||
119 | if (cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] & | ||
120 | CFAG12864B_BIT(x % CFAG12864B_BPB)) | ||
121 | return 1; | ||
122 | |||
123 | return 0; | ||
124 | } | ||
125 | |||
126 | /* | ||
127 | * not (x, y) pixel | ||
128 | */ | ||
129 | void cfag12864b_not(unsigned char x, unsigned char y) | ||
130 | { | ||
131 | if (cfag12864b_isset(x, y)) | ||
132 | cfag12864b_unset(x, y); | ||
133 | else | ||
134 | cfag12864b_set(x, y); | ||
135 | } | ||
136 | |||
137 | /* | ||
138 | * fill (set all pixels) | ||
139 | */ | ||
140 | void cfag12864b_fill(void) | ||
141 | { | ||
142 | unsigned short i; | ||
143 | |||
144 | for (i = 0; i < CFAG12864B_SIZE; i++) | ||
145 | cfag12864b_buffer[i] = 0xFF; | ||
146 | } | ||
147 | |||
148 | /* | ||
149 | * clear (unset all pixels) | ||
150 | */ | ||
151 | void cfag12864b_clear(void) | ||
152 | { | ||
153 | unsigned short i; | ||
154 | |||
155 | for (i = 0; i < CFAG12864B_SIZE; i++) | ||
156 | cfag12864b_buffer[i] = 0; | ||
157 | } | ||
158 | |||
159 | /* | ||
160 | * format a [128*64] matrix | ||
161 | * | ||
162 | * Pixel off: src[i] = 0 | ||
163 | * Pixel on: src[i] > 0 | ||
164 | */ | ||
165 | void cfag12864b_format(unsigned char * matrix) | ||
166 | { | ||
167 | unsigned char i, j, n; | ||
168 | |||
169 | for (i = 0; i < CFAG12864B_HEIGHT; i++) | ||
170 | for (j = 0; j < CFAG12864B_WIDTH / CFAG12864B_BPB; j++) { | ||
171 | cfag12864b_buffer[i * CFAG12864B_WIDTH / CFAG12864B_BPB + | ||
172 | j] = 0; | ||
173 | for (n = 0; n < CFAG12864B_BPB; n++) | ||
174 | if (matrix[i * CFAG12864B_WIDTH + | ||
175 | j * CFAG12864B_BPB + n]) | ||
176 | cfag12864b_buffer[i * CFAG12864B_WIDTH / | ||
177 | CFAG12864B_BPB + j] |= | ||
178 | CFAG12864B_BIT(n); | ||
179 | } | ||
180 | } | ||
181 | |||
182 | /* | ||
183 | * blit buffer to lcd | ||
184 | */ | ||
185 | void cfag12864b_blit(void) | ||
186 | { | ||
187 | memcpy(cfag12864b_mem, cfag12864b_buffer, CFAG12864B_SIZE); | ||
188 | } | ||
189 | |||
190 | /* | ||
191 | * ---------------------- | ||
192 | * end of cfag12864b code | ||
193 | * ---------------------- | ||
194 | */ | ||
195 | |||
196 | #include <stdio.h> | ||
197 | #include <string.h> | ||
198 | |||
199 | #define EXAMPLES 6 | ||
200 | |||
201 | void example(unsigned char n) | ||
202 | { | ||
203 | unsigned short i, j; | ||
204 | unsigned char matrix[CFAG12864B_WIDTH * CFAG12864B_HEIGHT]; | ||
205 | |||
206 | if (n > EXAMPLES) | ||
207 | return; | ||
208 | |||
209 | printf("Example %i/%i - ", n, EXAMPLES); | ||
210 | |||
211 | switch (n) { | ||
212 | case 1: | ||
213 | printf("Draw points setting bits"); | ||
214 | cfag12864b_clear(); | ||
215 | for (i = 0; i < CFAG12864B_WIDTH; i += 2) | ||
216 | for (j = 0; j < CFAG12864B_HEIGHT; j += 2) | ||
217 | cfag12864b_set(i, j); | ||
218 | break; | ||
219 | |||
220 | case 2: | ||
221 | printf("Clear the LCD"); | ||
222 | cfag12864b_clear(); | ||
223 | break; | ||
224 | |||
225 | case 3: | ||
226 | printf("Draw rows formatting a [128*64] matrix"); | ||
227 | memset(matrix, 0, CFAG12864B_WIDTH * CFAG12864B_HEIGHT); | ||
228 | for (i = 0; i < CFAG12864B_WIDTH; i++) | ||
229 | for (j = 0; j < CFAG12864B_HEIGHT; j += 2) | ||
230 | matrix[j * CFAG12864B_WIDTH + i] = 1; | ||
231 | cfag12864b_format(matrix); | ||
232 | break; | ||
233 | |||
234 | case 4: | ||
235 | printf("Fill the lcd"); | ||
236 | cfag12864b_fill(); | ||
237 | break; | ||
238 | |||
239 | case 5: | ||
240 | printf("Draw columns unsetting bits"); | ||
241 | for (i = 0; i < CFAG12864B_WIDTH; i += 2) | ||
242 | for (j = 0; j < CFAG12864B_HEIGHT; j++) | ||
243 | cfag12864b_unset(i, j); | ||
244 | break; | ||
245 | |||
246 | case 6: | ||
247 | printf("Do negative not-ing all bits"); | ||
248 | for (i = 0; i < CFAG12864B_WIDTH; i++) | ||
249 | for (j = 0; j < CFAG12864B_HEIGHT; j ++) | ||
250 | cfag12864b_not(i, j); | ||
251 | break; | ||
252 | } | ||
253 | |||
254 | puts(" - [Press Enter]"); | ||
255 | } | ||
256 | |||
257 | int main(int argc, char *argv[]) | ||
258 | { | ||
259 | unsigned char n; | ||
260 | |||
261 | if (argc != 2) { | ||
262 | printf( | ||
263 | "Sintax: %s fbdev\n" | ||
264 | "Usually: /dev/fb0, /dev/fb1...\n", argv[0]); | ||
265 | return -1; | ||
266 | } | ||
267 | |||
268 | if (cfag12864b_init(argv[1])) { | ||
269 | printf("Can't init %s fbdev\n", argv[1]); | ||
270 | return -2; | ||
271 | } | ||
272 | |||
273 | for (n = 1; n <= EXAMPLES; n++) { | ||
274 | example(n); | ||
275 | cfag12864b_blit(); | ||
276 | while (getchar() != '\n'); | ||
277 | } | ||
278 | |||
279 | cfag12864b_exit(); | ||
280 | |||
281 | return 0; | ||
282 | } | ||
diff --git a/Documentation/auxdisplay/ks0108 b/Documentation/auxdisplay/ks0108 new file mode 100644 index 000000000000..92b03b60c613 --- /dev/null +++ b/Documentation/auxdisplay/ks0108 | |||
@@ -0,0 +1,55 @@ | |||
1 | ========================================== | ||
2 | ks0108 LCD Controller Driver Documentation | ||
3 | ========================================== | ||
4 | |||
5 | License: GPLv2 | ||
6 | Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
7 | Date: 2006-10-27 | ||
8 | |||
9 | |||
10 | |||
11 | -------- | ||
12 | 0. INDEX | ||
13 | -------- | ||
14 | |||
15 | 1. DRIVER INFORMATION | ||
16 | 2. DEVICE INFORMATION | ||
17 | 3. WIRING | ||
18 | |||
19 | |||
20 | --------------------- | ||
21 | 1. DRIVER INFORMATION | ||
22 | --------------------- | ||
23 | |||
24 | This driver support the ks0108 LCD controller. | ||
25 | |||
26 | |||
27 | --------------------- | ||
28 | 2. DEVICE INFORMATION | ||
29 | --------------------- | ||
30 | |||
31 | Manufacturer: Samsung | ||
32 | Device Name: KS0108 LCD Controller | ||
33 | Device Code: ks0108 | ||
34 | Webpage: - | ||
35 | Device Webpage: - | ||
36 | Type: LCD Controller (Liquid Crystal Display Controller) | ||
37 | Width: 64 | ||
38 | Height: 64 | ||
39 | Colors: 2 (B/N) | ||
40 | Pages: 8 | ||
41 | Addresses: 64 each page | ||
42 | Data size: 1 byte each address | ||
43 | Memory size: 8 * 64 * 1 = 512 bytes | ||
44 | |||
45 | |||
46 | --------- | ||
47 | 3. WIRING | ||
48 | --------- | ||
49 | |||
50 | The driver supports data parallel port wiring. | ||
51 | |||
52 | If you aren't building LCD related hardware, you should check | ||
53 | your LCD specific wiring information in the same folder. | ||
54 | |||
55 | For example, check Documentation/auxdisplay/cfag12864b. | ||
diff --git a/Documentation/cdrom/packet-writing.txt b/Documentation/cdrom/packet-writing.txt index 7715d2247c4d..cf1f8126991c 100644 --- a/Documentation/cdrom/packet-writing.txt +++ b/Documentation/cdrom/packet-writing.txt | |||
@@ -93,7 +93,7 @@ Notes | |||
93 | Using the pktcdvd sysfs interface | 93 | Using the pktcdvd sysfs interface |
94 | --------------------------------- | 94 | --------------------------------- |
95 | 95 | ||
96 | Since Linux 2.6.19, the pktcdvd module has a sysfs interface | 96 | Since Linux 2.6.20, the pktcdvd module has a sysfs interface |
97 | and can be controlled by it. For example the "pktcdvd" tool uses | 97 | and can be controlled by it. For example the "pktcdvd" tool uses |
98 | this interface. (see http://people.freenet.de/BalaGi#pktcdvd ) | 98 | this interface. (see http://people.freenet.de/BalaGi#pktcdvd ) |
99 | 99 | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index fa844fd7bded..8247a4b79d09 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -215,6 +215,13 @@ Who: Jean Delvare <khali@linux-fr.org>, | |||
215 | 215 | ||
216 | --------------------------- | 216 | --------------------------- |
217 | 217 | ||
218 | What: drivers depending on OBSOLETE_OSS | ||
219 | When: options in 2.6.22, code in 2.6.24 | ||
220 | Why: OSS drivers with ALSA replacements | ||
221 | Who: Adrian Bunk <bunk@stusta.de> | ||
222 | |||
223 | --------------------------- | ||
224 | |||
218 | What: IPv4 only connection tracking/NAT/helpers | 225 | What: IPv4 only connection tracking/NAT/helpers |
219 | When: 2.6.22 | 226 | When: 2.6.22 |
220 | Why: The new layer 3 independant connection tracking replaces the old | 227 | Why: The new layer 3 independant connection tracking replaces the old |
diff --git a/Documentation/filesystems/relay.txt b/Documentation/filesystems/relay.txt index d6788dae0349..7fbb6ffe5769 100644 --- a/Documentation/filesystems/relay.txt +++ b/Documentation/filesystems/relay.txt | |||
@@ -157,7 +157,7 @@ TBD(curr. line MT:/API/) | |||
157 | channel management functions: | 157 | channel management functions: |
158 | 158 | ||
159 | relay_open(base_filename, parent, subbuf_size, n_subbufs, | 159 | relay_open(base_filename, parent, subbuf_size, n_subbufs, |
160 | callbacks) | 160 | callbacks, private_data) |
161 | relay_close(chan) | 161 | relay_close(chan) |
162 | relay_flush(chan) | 162 | relay_flush(chan) |
163 | relay_reset(chan) | 163 | relay_reset(chan) |
@@ -251,7 +251,7 @@ static struct rchan_callbacks relay_callbacks = | |||
251 | 251 | ||
252 | And an example relay_open() invocation using them: | 252 | And an example relay_open() invocation using them: |
253 | 253 | ||
254 | chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks); | 254 | chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks, NULL); |
255 | 255 | ||
256 | If the create_buf_file() callback fails, or isn't defined, channel | 256 | If the create_buf_file() callback fails, or isn't defined, channel |
257 | creation and thus relay_open() will fail. | 257 | creation and thus relay_open() will fail. |
@@ -289,6 +289,11 @@ they use the proper locking for such a buffer, either by wrapping | |||
289 | writes in a spinlock, or by copying a write function from relay.h and | 289 | writes in a spinlock, or by copying a write function from relay.h and |
290 | creating a local version that internally does the proper locking. | 290 | creating a local version that internally does the proper locking. |
291 | 291 | ||
292 | The private_data passed into relay_open() allows clients to associate | ||
293 | user-defined data with a channel, and is immediately available | ||
294 | (including in create_buf_file()) via chan->private_data or | ||
295 | buf->chan->private_data. | ||
296 | |||
292 | Channel 'modes' | 297 | Channel 'modes' |
293 | --------------- | 298 | --------------- |
294 | 299 | ||
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index 5a8bd5bd88ef..8f750c0efed5 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl-number.txt | |||
@@ -94,8 +94,7 @@ Code Seq# Include File Comments | |||
94 | 'L' 00-1F linux/loop.h | 94 | 'L' 00-1F linux/loop.h |
95 | 'L' E0-FF linux/ppdd.h encrypted disk device driver | 95 | 'L' E0-FF linux/ppdd.h encrypted disk device driver |
96 | <http://linux01.gwdg.de/~alatham/ppdd.html> | 96 | <http://linux01.gwdg.de/~alatham/ppdd.html> |
97 | 'M' all linux/soundcard.h conflict! | 97 | 'M' all linux/soundcard.h |
98 | 'M' 00-1F linux/isicom.h conflict! | ||
99 | 'N' 00-1F drivers/usb/scanner.h | 98 | 'N' 00-1F drivers/usb/scanner.h |
100 | 'P' all linux/soundcard.h | 99 | 'P' all linux/soundcard.h |
101 | 'Q' all linux/soundcard.h | 100 | 'Q' all linux/soundcard.h |
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt index 284e7e198e93..2075c0658bf5 100644 --- a/Documentation/kernel-doc-nano-HOWTO.txt +++ b/Documentation/kernel-doc-nano-HOWTO.txt | |||
@@ -101,16 +101,20 @@ The format of the block comment is like this: | |||
101 | 101 | ||
102 | /** | 102 | /** |
103 | * function_name(:)? (- short description)? | 103 | * function_name(:)? (- short description)? |
104 | (* @parameterx: (description of parameter x)?)* | 104 | (* @parameterx(space)*: (description of parameter x)?)* |
105 | (* a blank line)? | 105 | (* a blank line)? |
106 | * (Description:)? (Description of function)? | 106 | * (Description:)? (Description of function)? |
107 | * (section header: (section description)? )* | 107 | * (section header: (section description)? )* |
108 | (*)?*/ | 108 | (*)?*/ |
109 | 109 | ||
110 | The short function description cannot be multiline, but the other | 110 | The short function description ***cannot be multiline***, but the other |
111 | descriptions can be (and they can contain blank lines). Avoid putting a | 111 | descriptions can be (and they can contain blank lines). If you continue |
112 | spurious blank line after the function name, or else the description will | 112 | that initial short description onto a second line, that second line will |
113 | be repeated! | 113 | appear further down at the beginning of the description section, which is |
114 | almost certainly not what you had in mind. | ||
115 | |||
116 | Avoid putting a spurious blank line after the function name, or else the | ||
117 | description will be repeated! | ||
114 | 118 | ||
115 | All descriptive text is further processed, scanning for the following special | 119 | All descriptive text is further processed, scanning for the following special |
116 | patterns, which are highlighted appropriately. | 120 | patterns, which are highlighted appropriately. |
@@ -121,6 +125,31 @@ patterns, which are highlighted appropriately. | |||
121 | '@parameter' - name of a parameter | 125 | '@parameter' - name of a parameter |
122 | '%CONST' - name of a constant. | 126 | '%CONST' - name of a constant. |
123 | 127 | ||
128 | NOTE 1: The multi-line descriptive text you provide does *not* recognize | ||
129 | line breaks, so if you try to format some text nicely, as in: | ||
130 | |||
131 | Return codes | ||
132 | 0 - cool | ||
133 | 1 - invalid arg | ||
134 | 2 - out of memory | ||
135 | |||
136 | this will all run together and produce: | ||
137 | |||
138 | Return codes 0 - cool 1 - invalid arg 2 - out of memory | ||
139 | |||
140 | NOTE 2: If the descriptive text you provide has lines that begin with | ||
141 | some phrase followed by a colon, each of those phrases will be taken as | ||
142 | a new section heading, which means you should similarly try to avoid text | ||
143 | like: | ||
144 | |||
145 | Return codes: | ||
146 | 0: cool | ||
147 | 1: invalid arg | ||
148 | 2: out of memory | ||
149 | |||
150 | every line of which would start a new section. Again, probably not | ||
151 | what you were after. | ||
152 | |||
124 | Take a look around the source tree for examples. | 153 | Take a look around the source tree for examples. |
125 | 154 | ||
126 | 155 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 25d298517104..d25acd51e181 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1396,6 +1396,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1396 | in <PAGE_SIZE> units (needed only for swap files). | 1396 | in <PAGE_SIZE> units (needed only for swap files). |
1397 | See Documentation/power/swsusp-and-swap-files.txt | 1397 | See Documentation/power/swsusp-and-swap-files.txt |
1398 | 1398 | ||
1399 | retain_initrd [RAM] Keep initrd memory after extraction | ||
1400 | |||
1399 | rhash_entries= [KNL,NET] | 1401 | rhash_entries= [KNL,NET] |
1400 | Set number of hash buckets for route cache | 1402 | Set number of hash buckets for route cache |
1401 | 1403 | ||
diff --git a/Documentation/local_ops.txt b/Documentation/local_ops.txt new file mode 100644 index 000000000000..b0aca0705d1e --- /dev/null +++ b/Documentation/local_ops.txt | |||
@@ -0,0 +1,163 @@ | |||
1 | Semantics and Behavior of Local Atomic Operations | ||
2 | |||
3 | Mathieu Desnoyers | ||
4 | |||
5 | |||
6 | This document explains the purpose of the local atomic operations, how | ||
7 | to implement them for any given architecture and shows how they can be used | ||
8 | properly. It also stresses on the precautions that must be taken when reading | ||
9 | those local variables across CPUs when the order of memory writes matters. | ||
10 | |||
11 | |||
12 | |||
13 | * Purpose of local atomic operations | ||
14 | |||
15 | Local atomic operations are meant to provide fast and highly reentrant per CPU | ||
16 | counters. They minimize the performance cost of standard atomic operations by | ||
17 | removing the LOCK prefix and memory barriers normally required to synchronize | ||
18 | across CPUs. | ||
19 | |||
20 | Having fast per CPU atomic counters is interesting in many cases : it does not | ||
21 | require disabling interrupts to protect from interrupt handlers and it permits | ||
22 | coherent counters in NMI handlers. It is especially useful for tracing purposes | ||
23 | and for various performance monitoring counters. | ||
24 | |||
25 | Local atomic operations only guarantee variable modification atomicity wrt the | ||
26 | CPU which owns the data. Therefore, care must taken to make sure that only one | ||
27 | CPU writes to the local_t data. This is done by using per cpu data and making | ||
28 | sure that we modify it from within a preemption safe context. It is however | ||
29 | permitted to read local_t data from any CPU : it will then appear to be written | ||
30 | out of order wrt other memory writes on the owner CPU. | ||
31 | |||
32 | |||
33 | * Implementation for a given architecture | ||
34 | |||
35 | It can be done by slightly modifying the standard atomic operations : only | ||
36 | their UP variant must be kept. It typically means removing LOCK prefix (on | ||
37 | i386 and x86_64) and any SMP sychronization barrier. If the architecture does | ||
38 | not have a different behavior between SMP and UP, including asm-generic/local.h | ||
39 | in your archtecture's local.h is sufficient. | ||
40 | |||
41 | The local_t type is defined as an opaque signed long by embedding an | ||
42 | atomic_long_t inside a structure. This is made so a cast from this type to a | ||
43 | long fails. The definition looks like : | ||
44 | |||
45 | typedef struct { atomic_long_t a; } local_t; | ||
46 | |||
47 | |||
48 | * How to use local atomic operations | ||
49 | |||
50 | #include <linux/percpu.h> | ||
51 | #include <asm/local.h> | ||
52 | |||
53 | static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0); | ||
54 | |||
55 | |||
56 | * Counting | ||
57 | |||
58 | Counting is done on all the bits of a signed long. | ||
59 | |||
60 | In preemptible context, use get_cpu_var() and put_cpu_var() around local atomic | ||
61 | operations : it makes sure that preemption is disabled around write access to | ||
62 | the per cpu variable. For instance : | ||
63 | |||
64 | local_inc(&get_cpu_var(counters)); | ||
65 | put_cpu_var(counters); | ||
66 | |||
67 | If you are already in a preemption-safe context, you can directly use | ||
68 | __get_cpu_var() instead. | ||
69 | |||
70 | local_inc(&__get_cpu_var(counters)); | ||
71 | |||
72 | |||
73 | |||
74 | * Reading the counters | ||
75 | |||
76 | Those local counters can be read from foreign CPUs to sum the count. Note that | ||
77 | the data seen by local_read across CPUs must be considered to be out of order | ||
78 | relatively to other memory writes happening on the CPU that owns the data. | ||
79 | |||
80 | long sum = 0; | ||
81 | for_each_online_cpu(cpu) | ||
82 | sum += local_read(&per_cpu(counters, cpu)); | ||
83 | |||
84 | If you want to use a remote local_read to synchronize access to a resource | ||
85 | between CPUs, explicit smp_wmb() and smp_rmb() memory barriers must be used | ||
86 | respectively on the writer and the reader CPUs. It would be the case if you use | ||
87 | the local_t variable as a counter of bytes written in a buffer : there should | ||
88 | be a smp_wmb() between the buffer write and the counter increment and also a | ||
89 | smp_rmb() between the counter read and the buffer read. | ||
90 | |||
91 | |||
92 | Here is a sample module which implements a basic per cpu counter using local.h. | ||
93 | |||
94 | --- BEGIN --- | ||
95 | /* test-local.c | ||
96 | * | ||
97 | * Sample module for local.h usage. | ||
98 | */ | ||
99 | |||
100 | |||
101 | #include <asm/local.h> | ||
102 | #include <linux/module.h> | ||
103 | #include <linux/timer.h> | ||
104 | |||
105 | static DEFINE_PER_CPU(local_t, counters) = LOCAL_INIT(0); | ||
106 | |||
107 | static struct timer_list test_timer; | ||
108 | |||
109 | /* IPI called on each CPU. */ | ||
110 | static void test_each(void *info) | ||
111 | { | ||
112 | /* Increment the counter from a non preemptible context */ | ||
113 | printk("Increment on cpu %d\n", smp_processor_id()); | ||
114 | local_inc(&__get_cpu_var(counters)); | ||
115 | |||
116 | /* This is what incrementing the variable would look like within a | ||
117 | * preemptible context (it disables preemption) : | ||
118 | * | ||
119 | * local_inc(&get_cpu_var(counters)); | ||
120 | * put_cpu_var(counters); | ||
121 | */ | ||
122 | } | ||
123 | |||
124 | static void do_test_timer(unsigned long data) | ||
125 | { | ||
126 | int cpu; | ||
127 | |||
128 | /* Increment the counters */ | ||
129 | on_each_cpu(test_each, NULL, 0, 1); | ||
130 | /* Read all the counters */ | ||
131 | printk("Counters read from CPU %d\n", smp_processor_id()); | ||
132 | for_each_online_cpu(cpu) { | ||
133 | printk("Read : CPU %d, count %ld\n", cpu, | ||
134 | local_read(&per_cpu(counters, cpu))); | ||
135 | } | ||
136 | del_timer(&test_timer); | ||
137 | test_timer.expires = jiffies + 1000; | ||
138 | add_timer(&test_timer); | ||
139 | } | ||
140 | |||
141 | static int __init test_init(void) | ||
142 | { | ||
143 | /* initialize the timer that will increment the counter */ | ||
144 | init_timer(&test_timer); | ||
145 | test_timer.function = do_test_timer; | ||
146 | test_timer.expires = jiffies + 1; | ||
147 | add_timer(&test_timer); | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static void __exit test_exit(void) | ||
153 | { | ||
154 | del_timer_sync(&test_timer); | ||
155 | } | ||
156 | |||
157 | module_init(test_init); | ||
158 | module_exit(test_exit); | ||
159 | |||
160 | MODULE_LICENSE("GPL"); | ||
161 | MODULE_AUTHOR("Mathieu Desnoyers"); | ||
162 | MODULE_DESCRIPTION("Local Atomic Ops"); | ||
163 | --- END --- | ||
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt new file mode 100644 index 000000000000..7224459b469e --- /dev/null +++ b/Documentation/rbtree.txt | |||
@@ -0,0 +1,192 @@ | |||
1 | Red-black Trees (rbtree) in Linux | ||
2 | January 18, 2007 | ||
3 | Rob Landley <rob@landley.net> | ||
4 | ============================= | ||
5 | |||
6 | What are red-black trees, and what are they for? | ||
7 | ------------------------------------------------ | ||
8 | |||
9 | Red-black trees are a type of self-balancing binary search tree, used for | ||
10 | storing sortable key/value data pairs. This differs from radix trees (which | ||
11 | are used to efficiently store sparse arrays and thus use long integer indexes | ||
12 | to insert/access/delete nodes) and hash tables (which are not kept sorted to | ||
13 | be easily traversed in order, and must be tuned for a specific size and | ||
14 | hash function where rbtrees scale gracefully storing arbitrary keys). | ||
15 | |||
16 | Red-black trees are similar to AVL trees, but provide faster real-time bounded | ||
17 | worst case performance for insertion and deletion (at most two rotations and | ||
18 | three rotations, respectively, to balance the tree), with slightly slower | ||
19 | (but still O(log n)) lookup time. | ||
20 | |||
21 | To quote Linux Weekly News: | ||
22 | |||
23 | There are a number of red-black trees in use in the kernel. | ||
24 | The anticipatory, deadline, and CFQ I/O schedulers all employ | ||
25 | rbtrees to track requests; the packet CD/DVD driver does the same. | ||
26 | The high-resolution timer code uses an rbtree to organize outstanding | ||
27 | timer requests. The ext3 filesystem tracks directory entries in a | ||
28 | red-black tree. Virtual memory areas (VMAs) are tracked with red-black | ||
29 | trees, as are epoll file descriptors, cryptographic keys, and network | ||
30 | packets in the "hierarchical token bucket" scheduler. | ||
31 | |||
32 | This document covers use of the Linux rbtree implementation. For more | ||
33 | information on the nature and implementation of Red Black Trees, see: | ||
34 | |||
35 | Linux Weekly News article on red-black trees | ||
36 | http://lwn.net/Articles/184495/ | ||
37 | |||
38 | Wikipedia entry on red-black trees | ||
39 | http://en.wikipedia.org/wiki/Red-black_tree | ||
40 | |||
41 | Linux implementation of red-black trees | ||
42 | --------------------------------------- | ||
43 | |||
44 | Linux's rbtree implementation lives in the file "lib/rbtree.c". To use it, | ||
45 | "#include <linux/rbtree.h>". | ||
46 | |||
47 | The Linux rbtree implementation is optimized for speed, and thus has one | ||
48 | less layer of indirection (and better cache locality) than more traditional | ||
49 | tree implementations. Instead of using pointers to separate rb_node and data | ||
50 | structures, each instance of struct rb_node is embedded in the data structure | ||
51 | it organizes. And instead of using a comparison callback function pointer, | ||
52 | users are expected to write their own tree search and insert functions | ||
53 | which call the provided rbtree functions. Locking is also left up to the | ||
54 | user of the rbtree code. | ||
55 | |||
56 | Creating a new rbtree | ||
57 | --------------------- | ||
58 | |||
59 | Data nodes in an rbtree tree are structures containing a struct rb_node member: | ||
60 | |||
61 | struct mytype { | ||
62 | struct rb_node node; | ||
63 | char *keystring; | ||
64 | }; | ||
65 | |||
66 | When dealing with a pointer to the embedded struct rb_node, the containing data | ||
67 | structure may be accessed with the standard container_of() macro. In addition, | ||
68 | individual members may be accessed directly via rb_entry(node, type, member). | ||
69 | |||
70 | At the root of each rbtree is an rb_root structure, which is initialized to be | ||
71 | empty via: | ||
72 | |||
73 | struct rb_root mytree = RB_ROOT; | ||
74 | |||
75 | Searching for a value in an rbtree | ||
76 | ---------------------------------- | ||
77 | |||
78 | Writing a search function for your tree is fairly straightforward: start at the | ||
79 | root, compare each value, and follow the left or right branch as necessary. | ||
80 | |||
81 | Example: | ||
82 | |||
83 | struct mytype *my_search(struct rb_root *root, char *string) | ||
84 | { | ||
85 | struct rb_node *node = root->rb_node; | ||
86 | |||
87 | while (node) { | ||
88 | struct mytype *data = container_of(node, struct mytype, node); | ||
89 | int result; | ||
90 | |||
91 | result = strcmp(string, data->keystring); | ||
92 | |||
93 | if (result < 0) | ||
94 | node = node->rb_left; | ||
95 | else if (result > 0) | ||
96 | node = node->rb_right; | ||
97 | else | ||
98 | return data; | ||
99 | } | ||
100 | return NULL; | ||
101 | } | ||
102 | |||
103 | Inserting data into an rbtree | ||
104 | ----------------------------- | ||
105 | |||
106 | Inserting data in the tree involves first searching for the place to insert the | ||
107 | new node, then inserting the node and rebalancing ("recoloring") the tree. | ||
108 | |||
109 | The search for insertion differs from the previous search by finding the | ||
110 | location of the pointer on which to graft the new node. The new node also | ||
111 | needs a link to its parent node for rebalancing purposes. | ||
112 | |||
113 | Example: | ||
114 | |||
115 | int my_insert(struct rb_root *root, struct mytype *data) | ||
116 | { | ||
117 | struct rb_node **new = &(root->rb_node), *parent = NULL; | ||
118 | |||
119 | /* Figure out where to put new node */ | ||
120 | while (*new) { | ||
121 | struct mytype *this = container_of(*new, struct mytype, node); | ||
122 | int result = strcmp(data->keystring, this->keystring); | ||
123 | |||
124 | parent = *new; | ||
125 | if (result < 0) | ||
126 | new = &((*new)->rb_left); | ||
127 | else if (result > 0) | ||
128 | new = &((*new)->rb_right); | ||
129 | else | ||
130 | return FALSE; | ||
131 | } | ||
132 | |||
133 | /* Add new node and rebalance tree. */ | ||
134 | rb_link_node(data->node, parent, new); | ||
135 | rb_insert_color(data->node, root); | ||
136 | |||
137 | return TRUE; | ||
138 | } | ||
139 | |||
140 | Removing or replacing existing data in an rbtree | ||
141 | ------------------------------------------------ | ||
142 | |||
143 | To remove an existing node from a tree, call: | ||
144 | |||
145 | void rb_erase(struct rb_node *victim, struct rb_root *tree); | ||
146 | |||
147 | Example: | ||
148 | |||
149 | struct mytype *data = mysearch(mytree, "walrus"); | ||
150 | |||
151 | if (data) { | ||
152 | rb_erase(data->node, mytree); | ||
153 | myfree(data); | ||
154 | } | ||
155 | |||
156 | To replace an existing node in a tree with a new one with the same key, call: | ||
157 | |||
158 | void rb_replace_node(struct rb_node *old, struct rb_node *new, | ||
159 | struct rb_root *tree); | ||
160 | |||
161 | Replacing a node this way does not re-sort the tree: If the new node doesn't | ||
162 | have the same key as the old node, the rbtree will probably become corrupted. | ||
163 | |||
164 | Iterating through the elements stored in an rbtree (in sort order) | ||
165 | ------------------------------------------------------------------ | ||
166 | |||
167 | Four functions are provided for iterating through an rbtree's contents in | ||
168 | sorted order. These work on arbitrary trees, and should not need to be | ||
169 | modified or wrapped (except for locking purposes): | ||
170 | |||
171 | struct rb_node *rb_first(struct rb_root *tree); | ||
172 | struct rb_node *rb_last(struct rb_root *tree); | ||
173 | struct rb_node *rb_next(struct rb_node *node); | ||
174 | struct rb_node *rb_prev(struct rb_node *node); | ||
175 | |||
176 | To start iterating, call rb_first() or rb_last() with a pointer to the root | ||
177 | of the tree, which will return a pointer to the node structure contained in | ||
178 | the first or last element in the tree. To continue, fetch the next or previous | ||
179 | node by calling rb_next() or rb_prev() on the current node. This will return | ||
180 | NULL when there are no more nodes left. | ||
181 | |||
182 | The iterator functions return a pointer to the embedded struct rb_node, from | ||
183 | which the containing data structure may be accessed with the container_of() | ||
184 | macro, and individual members may be accessed directly via | ||
185 | rb_entry(node, type, member). | ||
186 | |||
187 | Example: | ||
188 | |||
189 | struct rb_node *node; | ||
190 | for (node = rb_first(&mytree); node; node = rb_next(node)) | ||
191 | printk("key=%s\n", rb_entry(node, int, keystring)); | ||
192 | |||
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 7cf1ec5bcdd3..1ef6bb88cd00 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt | |||
@@ -149,7 +149,7 @@ RTC class framework, but can't be supported by the older driver. | |||
149 | is connected to an IRQ line, it can often issue an alarm IRQ up to | 149 | is connected to an IRQ line, it can often issue an alarm IRQ up to |
150 | 24 hours in the future. | 150 | 24 hours in the future. |
151 | 151 | ||
152 | * RTC_WKALM_SET, RTC_WKALM_READ ... RTCs that can issue alarms beyond | 152 | * RTC_WKALM_SET, RTC_WKALM_RD ... RTCs that can issue alarms beyond |
153 | the next 24 hours use a slightly more powerful API, which supports | 153 | the next 24 hours use a slightly more powerful API, which supports |
154 | setting the longer alarm time and enabling its IRQ using a single | 154 | setting the longer alarm time and enabling its IRQ using a single |
155 | request (using the same model as EFI firmware). | 155 | request (using the same model as EFI firmware). |
@@ -167,6 +167,28 @@ Linux out of a low power sleep state (or hibernation) back to a fully | |||
167 | operational state. For example, a system could enter a deep power saving | 167 | operational state. For example, a system could enter a deep power saving |
168 | state until it's time to execute some scheduled tasks. | 168 | state until it's time to execute some scheduled tasks. |
169 | 169 | ||
170 | Note that many of these ioctls need not actually be implemented by your | ||
171 | driver. The common rtc-dev interface handles many of these nicely if your | ||
172 | driver returns ENOIOCTLCMD. Some common examples: | ||
173 | |||
174 | * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be | ||
175 | called with appropriate values. | ||
176 | |||
177 | * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: the | ||
178 | set_alarm/read_alarm functions will be called. To differentiate | ||
179 | between the ALM and WKALM, check the larger fields of the rtc_wkalrm | ||
180 | struct (like tm_year). These will be set to -1 when using ALM and | ||
181 | will be set to proper values when using WKALM. | ||
182 | |||
183 | * RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called | ||
184 | to set the frequency while the framework will handle the read for you | ||
185 | since the frequency is stored in the irq_freq member of the rtc_device | ||
186 | structure. Also make sure you set the max_user_freq member in your | ||
187 | initialization routines so the framework can sanity check the user | ||
188 | input for you. | ||
189 | |||
190 | If all else fails, check out the rtc-test.c driver! | ||
191 | |||
170 | 192 | ||
171 | -------------------- 8< ---------------- 8< ----------------------------- | 193 | -------------------- 8< ---------------- 8< ----------------------------- |
172 | 194 | ||
@@ -237,7 +259,7 @@ int main(int argc, char **argv) | |||
237 | "\n...Update IRQs not supported.\n"); | 259 | "\n...Update IRQs not supported.\n"); |
238 | goto test_READ; | 260 | goto test_READ; |
239 | } | 261 | } |
240 | perror("ioctl"); | 262 | perror("RTC_UIE_ON ioctl"); |
241 | exit(errno); | 263 | exit(errno); |
242 | } | 264 | } |
243 | 265 | ||
@@ -284,7 +306,7 @@ int main(int argc, char **argv) | |||
284 | /* Turn off update interrupts */ | 306 | /* Turn off update interrupts */ |
285 | retval = ioctl(fd, RTC_UIE_OFF, 0); | 307 | retval = ioctl(fd, RTC_UIE_OFF, 0); |
286 | if (retval == -1) { | 308 | if (retval == -1) { |
287 | perror("ioctl"); | 309 | perror("RTC_UIE_OFF ioctl"); |
288 | exit(errno); | 310 | exit(errno); |
289 | } | 311 | } |
290 | 312 | ||
@@ -292,7 +314,7 @@ test_READ: | |||
292 | /* Read the RTC time/date */ | 314 | /* Read the RTC time/date */ |
293 | retval = ioctl(fd, RTC_RD_TIME, &rtc_tm); | 315 | retval = ioctl(fd, RTC_RD_TIME, &rtc_tm); |
294 | if (retval == -1) { | 316 | if (retval == -1) { |
295 | perror("ioctl"); | 317 | perror("RTC_RD_TIME ioctl"); |
296 | exit(errno); | 318 | exit(errno); |
297 | } | 319 | } |
298 | 320 | ||
@@ -320,14 +342,14 @@ test_READ: | |||
320 | "\n...Alarm IRQs not supported.\n"); | 342 | "\n...Alarm IRQs not supported.\n"); |
321 | goto test_PIE; | 343 | goto test_PIE; |
322 | } | 344 | } |
323 | perror("ioctl"); | 345 | perror("RTC_ALM_SET ioctl"); |
324 | exit(errno); | 346 | exit(errno); |
325 | } | 347 | } |
326 | 348 | ||
327 | /* Read the current alarm settings */ | 349 | /* Read the current alarm settings */ |
328 | retval = ioctl(fd, RTC_ALM_READ, &rtc_tm); | 350 | retval = ioctl(fd, RTC_ALM_READ, &rtc_tm); |
329 | if (retval == -1) { | 351 | if (retval == -1) { |
330 | perror("ioctl"); | 352 | perror("RTC_ALM_READ ioctl"); |
331 | exit(errno); | 353 | exit(errno); |
332 | } | 354 | } |
333 | 355 | ||
@@ -337,7 +359,7 @@ test_READ: | |||
337 | /* Enable alarm interrupts */ | 359 | /* Enable alarm interrupts */ |
338 | retval = ioctl(fd, RTC_AIE_ON, 0); | 360 | retval = ioctl(fd, RTC_AIE_ON, 0); |
339 | if (retval == -1) { | 361 | if (retval == -1) { |
340 | perror("ioctl"); | 362 | perror("RTC_AIE_ON ioctl"); |
341 | exit(errno); | 363 | exit(errno); |
342 | } | 364 | } |
343 | 365 | ||
@@ -355,7 +377,7 @@ test_READ: | |||
355 | /* Disable alarm interrupts */ | 377 | /* Disable alarm interrupts */ |
356 | retval = ioctl(fd, RTC_AIE_OFF, 0); | 378 | retval = ioctl(fd, RTC_AIE_OFF, 0); |
357 | if (retval == -1) { | 379 | if (retval == -1) { |
358 | perror("ioctl"); | 380 | perror("RTC_AIE_OFF ioctl"); |
359 | exit(errno); | 381 | exit(errno); |
360 | } | 382 | } |
361 | 383 | ||
@@ -368,7 +390,7 @@ test_PIE: | |||
368 | fprintf(stderr, "\nNo periodic IRQ support\n"); | 390 | fprintf(stderr, "\nNo periodic IRQ support\n"); |
369 | return 0; | 391 | return 0; |
370 | } | 392 | } |
371 | perror("ioctl"); | 393 | perror("RTC_IRQP_READ ioctl"); |
372 | exit(errno); | 394 | exit(errno); |
373 | } | 395 | } |
374 | fprintf(stderr, "\nPeriodic IRQ rate is %ldHz.\n", tmp); | 396 | fprintf(stderr, "\nPeriodic IRQ rate is %ldHz.\n", tmp); |
@@ -387,7 +409,7 @@ test_PIE: | |||
387 | "\n...Periodic IRQ rate is fixed\n"); | 409 | "\n...Periodic IRQ rate is fixed\n"); |
388 | goto done; | 410 | goto done; |
389 | } | 411 | } |
390 | perror("ioctl"); | 412 | perror("RTC_IRQP_SET ioctl"); |
391 | exit(errno); | 413 | exit(errno); |
392 | } | 414 | } |
393 | 415 | ||
@@ -397,7 +419,7 @@ test_PIE: | |||
397 | /* Enable periodic interrupts */ | 419 | /* Enable periodic interrupts */ |
398 | retval = ioctl(fd, RTC_PIE_ON, 0); | 420 | retval = ioctl(fd, RTC_PIE_ON, 0); |
399 | if (retval == -1) { | 421 | if (retval == -1) { |
400 | perror("ioctl"); | 422 | perror("RTC_PIE_ON ioctl"); |
401 | exit(errno); | 423 | exit(errno); |
402 | } | 424 | } |
403 | 425 | ||
@@ -416,7 +438,7 @@ test_PIE: | |||
416 | /* Disable periodic interrupts */ | 438 | /* Disable periodic interrupts */ |
417 | retval = ioctl(fd, RTC_PIE_OFF, 0); | 439 | retval = ioctl(fd, RTC_PIE_OFF, 0); |
418 | if (retval == -1) { | 440 | if (retval == -1) { |
419 | perror("ioctl"); | 441 | perror("RTC_PIE_OFF ioctl"); |
420 | exit(errno); | 442 | exit(errno); |
421 | } | 443 | } |
422 | } | 444 | } |
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 61613166981b..452c0f152304 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -64,11 +64,6 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
64 | 64 | ||
65 | * What are the 'command' keys? | 65 | * What are the 'command' keys? |
66 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 66 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
67 | 'r' - Turns off keyboard raw mode and sets it to XLATE. | ||
68 | |||
69 | 'k' - Secure Access Key (SAK) Kills all programs on the current virtual | ||
70 | console. NOTE: See important comments below in SAK section. | ||
71 | |||
72 | 'b' - Will immediately reboot the system without syncing or unmounting | 67 | 'b' - Will immediately reboot the system without syncing or unmounting |
73 | your disks. | 68 | your disks. |
74 | 69 | ||
@@ -76,21 +71,37 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
76 | 71 | ||
77 | 'd' - Shows all locks that are held. | 72 | 'd' - Shows all locks that are held. |
78 | 73 | ||
79 | 'o' - Will shut your system off (if configured and supported). | 74 | 'e' - Send a SIGTERM to all processes, except for init. |
80 | 75 | ||
81 | 's' - Will attempt to sync all mounted filesystems. | 76 | 'f' - Will call oom_kill to kill a memory hog process. |
82 | 77 | ||
83 | 'u' - Will attempt to remount all mounted filesystems read-only. | 78 | 'g' - Used by kgdb on ppc platforms. |
84 | 79 | ||
85 | 'p' - Will dump the current registers and flags to your console. | 80 | 'h' - Will display help (actually any other key than those listed |
81 | above will display help. but 'h' is easy to remember :-) | ||
86 | 82 | ||
87 | 't' - Will dump a list of current tasks and their information to your | 83 | 'i' - Send a SIGKILL to all processes, except for init. |
88 | console. | 84 | |
85 | 'k' - Secure Access Key (SAK) Kills all programs on the current virtual | ||
86 | console. NOTE: See important comments below in SAK section. | ||
89 | 87 | ||
90 | 'm' - Will dump current memory info to your console. | 88 | 'm' - Will dump current memory info to your console. |
91 | 89 | ||
92 | 'n' - Used to make RT tasks nice-able | 90 | 'n' - Used to make RT tasks nice-able |
93 | 91 | ||
92 | 'o' - Will shut your system off (if configured and supported). | ||
93 | |||
94 | 'p' - Will dump the current registers and flags to your console. | ||
95 | |||
96 | 'r' - Turns off keyboard raw mode and sets it to XLATE. | ||
97 | |||
98 | 's' - Will attempt to sync all mounted filesystems. | ||
99 | |||
100 | 't' - Will dump a list of current tasks and their information to your | ||
101 | console. | ||
102 | |||
103 | 'u' - Will attempt to remount all mounted filesystems read-only. | ||
104 | |||
94 | 'v' - Dumps Voyager SMP processor info to your console. | 105 | 'v' - Dumps Voyager SMP processor info to your console. |
95 | 106 | ||
96 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. | 107 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. |
@@ -102,17 +113,6 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
102 | it so that only emergency messages like PANICs or OOPSes would | 113 | it so that only emergency messages like PANICs or OOPSes would |
103 | make it to your console.) | 114 | make it to your console.) |
104 | 115 | ||
105 | 'f' - Will call oom_kill to kill a memory hog process. | ||
106 | |||
107 | 'e' - Send a SIGTERM to all processes, except for init. | ||
108 | |||
109 | 'g' - Used by kgdb on ppc platforms. | ||
110 | |||
111 | 'i' - Send a SIGKILL to all processes, except for init. | ||
112 | |||
113 | 'h' - Will display help (actually any other key than those listed | ||
114 | above will display help. but 'h' is easy to remember :-) | ||
115 | |||
116 | * Okay, so what can I use them for? | 116 | * Okay, so what can I use them for? |
117 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 117 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
118 | Well, un'R'aw is very handy when your X server or a svgalib program crashes. | 118 | Well, un'R'aw is very handy when your X server or a svgalib program crashes. |
diff --git a/MAINTAINERS b/MAINTAINERS index a6c1ebd18d0f..9ea954ace2ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -635,6 +635,12 @@ W: http://people.redhat.com/sgrubb/audit/ | |||
635 | T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git | 635 | T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git |
636 | S: Maintained | 636 | S: Maintained |
637 | 637 | ||
638 | AUXILIARY DISPLAY DRIVERS | ||
639 | P: Miguel Ojeda Sandonis | ||
640 | M: maxextreme@gmail.com | ||
641 | L: linux-kernel@vger.kernel.org | ||
642 | S: Maintained | ||
643 | |||
638 | AVR32 ARCHITECTURE | 644 | AVR32 ARCHITECTURE |
639 | P: Haavard Skinnemoen | 645 | P: Haavard Skinnemoen |
640 | M: hskinnemoen@atmel.com | 646 | M: hskinnemoen@atmel.com |
@@ -836,6 +842,18 @@ L: linux-kernel@vger.kernel.org | |||
836 | L: discuss@x86-64.org | 842 | L: discuss@x86-64.org |
837 | S: Maintained | 843 | S: Maintained |
838 | 844 | ||
845 | CFAG12864B LCD DRIVER | ||
846 | P: Miguel Ojeda Sandonis | ||
847 | M: maxextreme@gmail.com | ||
848 | L: linux-kernel@vger.kernel.org | ||
849 | S: Maintained | ||
850 | |||
851 | CFAG12864BFB LCD FRAMEBUFFER DRIVER | ||
852 | P: Miguel Ojeda Sandonis | ||
853 | M: maxextreme@gmail.com | ||
854 | L: linux-kernel@vger.kernel.org | ||
855 | S: Maintained | ||
856 | |||
839 | COMMON INTERNET FILE SYSTEM (CIFS) | 857 | COMMON INTERNET FILE SYSTEM (CIFS) |
840 | P: Steve French | 858 | P: Steve French |
841 | M: sfrench@samba.org | 859 | M: sfrench@samba.org |
@@ -1971,6 +1989,12 @@ M: davem@davemloft.net | |||
1971 | L: linux-kernel@vger.kernel.org | 1989 | L: linux-kernel@vger.kernel.org |
1972 | S: Maintained | 1990 | S: Maintained |
1973 | 1991 | ||
1992 | KS0108 LCD CONTROLLER DRIVER | ||
1993 | P: Miguel Ojeda Sandonis | ||
1994 | M: maxextreme@gmail.com | ||
1995 | L: linux-kernel@vger.kernel.org | ||
1996 | S: Maintained | ||
1997 | |||
1974 | LAPB module | 1998 | LAPB module |
1975 | L: linux-x25@vger.kernel.org | 1999 | L: linux-x25@vger.kernel.org |
1976 | S: Orphan | 2000 | S: Orphan |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 84caf50725b5..770f717bd250 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -41,6 +41,10 @@ config GENERIC_CALIBRATE_DELAY | |||
41 | bool | 41 | bool |
42 | default y | 42 | default y |
43 | 43 | ||
44 | config ZONE_DMA | ||
45 | bool | ||
46 | default y | ||
47 | |||
44 | config GENERIC_ISA_DMA | 48 | config GENERIC_ISA_DMA |
45 | bool | 49 | bool |
46 | default y | 50 | default y |
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index d7053eb4ffcf..4748e14a28bc 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -91,17 +91,6 @@ static inline __u32 rpcc(void) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * Scheduler clock - returns current time in nanosec units. | ||
95 | * | ||
96 | * Copied from ARM code for expediency... ;-} | ||
97 | */ | ||
98 | unsigned long long sched_clock(void) | ||
99 | { | ||
100 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
101 | } | ||
102 | |||
103 | |||
104 | /* | ||
105 | * timer_interrupt() needs to keep up the real-time clock, | 94 | * timer_interrupt() needs to keep up the real-time clock, |
106 | * as well as call the "do_timer()" routine every clocktick | 95 | * as well as call the "do_timer()" routine every clocktick |
107 | */ | 96 | */ |
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index 76bf071e376c..4cc44bd33d33 100644 --- a/arch/alpha/kernel/vmlinux.lds.S +++ b/arch/alpha/kernel/vmlinux.lds.S | |||
@@ -52,10 +52,12 @@ SECTIONS | |||
52 | } | 52 | } |
53 | __initcall_end = .; | 53 | __initcall_end = .; |
54 | 54 | ||
55 | #ifdef CONFIG_BLK_DEV_INITRD | ||
55 | . = ALIGN(8192); | 56 | . = ALIGN(8192); |
56 | __initramfs_start = .; | 57 | __initramfs_start = .; |
57 | .init.ramfs : { *(.init.ramfs) } | 58 | .init.ramfs : { *(.init.ramfs) } |
58 | __initramfs_end = .; | 59 | __initramfs_end = .; |
60 | #endif | ||
59 | 61 | ||
60 | . = ALIGN(8); | 62 | . = ALIGN(8); |
61 | .con_initcall.init : { | 63 | .con_initcall.init : { |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1523046e092b..5c795193ebba 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -29,6 +29,10 @@ config MMU | |||
29 | bool | 29 | bool |
30 | default y | 30 | default y |
31 | 31 | ||
32 | config NO_IOPORT | ||
33 | bool | ||
34 | default n | ||
35 | |||
32 | config EISA | 36 | config EISA |
33 | bool | 37 | bool |
34 | ---help--- | 38 | ---help--- |
@@ -100,6 +104,10 @@ config GENERIC_BUST_SPINLOCK | |||
100 | config ARCH_MAY_HAVE_PC_FDC | 104 | config ARCH_MAY_HAVE_PC_FDC |
101 | bool | 105 | bool |
102 | 106 | ||
107 | config ZONE_DMA | ||
108 | bool | ||
109 | default y | ||
110 | |||
103 | config GENERIC_ISA_DMA | 111 | config GENERIC_ISA_DMA |
104 | bool | 112 | bool |
105 | 113 | ||
@@ -294,6 +302,7 @@ config ARCH_RPC | |||
294 | select TIMER_ACORN | 302 | select TIMER_ACORN |
295 | select ARCH_MAY_HAVE_PC_FDC | 303 | select ARCH_MAY_HAVE_PC_FDC |
296 | select ISA_DMA_API | 304 | select ISA_DMA_API |
305 | select NO_IOPORT | ||
297 | help | 306 | help |
298 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 307 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
299 | CD-ROM interface, serial and parallel port, and the floppy drive. | 308 | CD-ROM interface, serial and parallel port, and the floppy drive. |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 3c8cdcfe8d4a..ee47c532e210 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -78,16 +78,6 @@ static unsigned long dummy_gettimeoffset(void) | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * Scheduler clock - returns current time in nanosec units. | ||
82 | * This is the default implementation. Sub-architecture | ||
83 | * implementations can override this. | ||
84 | */ | ||
85 | unsigned long long __attribute__((weak)) sched_clock(void) | ||
86 | { | ||
87 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
88 | } | ||
89 | |||
90 | /* | ||
91 | * An implementation of printk_clock() independent from | 81 | * An implementation of printk_clock() independent from |
92 | * sched_clock(). This avoids non-bootable kernels when | 82 | * sched_clock(). This avoids non-bootable kernels when |
93 | * printk_clock is enabled. | 83 | * printk_clock is enabled. |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index a8fa75ea07a9..b929a60f7547 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -53,10 +53,12 @@ SECTIONS | |||
53 | __security_initcall_start = .; | 53 | __security_initcall_start = .; |
54 | *(.security_initcall.init) | 54 | *(.security_initcall.init) |
55 | __security_initcall_end = .; | 55 | __security_initcall_end = .; |
56 | #ifdef CONFIG_BLK_DEV_INITRD | ||
56 | . = ALIGN(32); | 57 | . = ALIGN(32); |
57 | __initramfs_start = .; | 58 | __initramfs_start = .; |
58 | usr/built-in.o(.init.ramfs) | 59 | usr/built-in.o(.init.ramfs) |
59 | __initramfs_end = .; | 60 | __initramfs_end = .; |
61 | #endif | ||
60 | . = ALIGN(64); | 62 | . = ALIGN(64); |
61 | __per_cpu_start = .; | 63 | __per_cpu_start = .; |
62 | *(.data.percpu) | 64 | *(.data.percpu) |
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig index 74eba8b5a8ca..989113dce415 100644 --- a/arch/arm26/Kconfig +++ b/arch/arm26/Kconfig | |||
@@ -60,6 +60,10 @@ config GENERIC_CALIBRATE_DELAY | |||
60 | config GENERIC_BUST_SPINLOCK | 60 | config GENERIC_BUST_SPINLOCK |
61 | bool | 61 | bool |
62 | 62 | ||
63 | config ZONE_DMA | ||
64 | bool | ||
65 | default y | ||
66 | |||
63 | config GENERIC_ISA_DMA | 67 | config GENERIC_ISA_DMA |
64 | bool | 68 | bool |
65 | 69 | ||
diff --git a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c index 9dbc17247c6f..e2bcefc91cc3 100644 --- a/arch/arm26/kernel/ecard.c +++ b/arch/arm26/kernel/ecard.c | |||
@@ -665,7 +665,7 @@ ecard_probe(int slot, card_type_t type) | |||
665 | ec->fiqmask = 4; | 665 | ec->fiqmask = 4; |
666 | } | 666 | } |
667 | 667 | ||
668 | for (i = 0; i < sizeof(blacklist) / sizeof(*blacklist); i++) | 668 | for (i = 0; i < ARRAY_SIZE(blacklist); i++) |
669 | if (blacklist[i].manufacturer == ec->cid.manufacturer && | 669 | if (blacklist[i].manufacturer == ec->cid.manufacturer && |
670 | blacklist[i].product == ec->cid.product) { | 670 | blacklist[i].product == ec->cid.product) { |
671 | ec->card_desc = blacklist[i].type; | 671 | ec->card_desc = blacklist[i].type; |
diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c index 1206469b2b86..0f1d57fbd3d7 100644 --- a/arch/arm26/kernel/time.c +++ b/arch/arm26/kernel/time.c | |||
@@ -89,14 +89,6 @@ static unsigned long gettimeoffset(void) | |||
89 | return (offset + LATCH/2) / LATCH; | 89 | return (offset + LATCH/2) / LATCH; |
90 | } | 90 | } |
91 | 91 | ||
92 | /* | ||
93 | * Scheduler clock - returns current time in nanosec units. | ||
94 | */ | ||
95 | unsigned long long sched_clock(void) | ||
96 | { | ||
97 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
98 | } | ||
99 | |||
100 | static unsigned long next_rtc_update; | 92 | static unsigned long next_rtc_update; |
101 | 93 | ||
102 | /* | 94 | /* |
diff --git a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in index ca61ec8218fe..046a85054018 100644 --- a/arch/arm26/kernel/vmlinux-arm26-xip.lds.in +++ b/arch/arm26/kernel/vmlinux-arm26-xip.lds.in | |||
@@ -46,10 +46,12 @@ SECTIONS | |||
46 | __con_initcall_start = .; | 46 | __con_initcall_start = .; |
47 | *(.con_initcall.init) | 47 | *(.con_initcall.init) |
48 | __con_initcall_end = .; | 48 | __con_initcall_end = .; |
49 | #ifdef CONFIG_BLK_DEV_INITRD | ||
49 | . = ALIGN(32); | 50 | . = ALIGN(32); |
50 | __initramfs_start = .; | 51 | __initramfs_start = .; |
51 | usr/built-in.o(.init.ramfs) | 52 | usr/built-in.o(.init.ramfs) |
52 | __initramfs_end = .; | 53 | __initramfs_end = .; |
54 | #endif | ||
53 | . = ALIGN(32768); | 55 | . = ALIGN(32768); |
54 | __init_end = .; | 56 | __init_end = .; |
55 | } | 57 | } |
diff --git a/arch/arm26/kernel/vmlinux-arm26.lds.in b/arch/arm26/kernel/vmlinux-arm26.lds.in index d1d3418d7eb6..1d2949e83be8 100644 --- a/arch/arm26/kernel/vmlinux-arm26.lds.in +++ b/arch/arm26/kernel/vmlinux-arm26.lds.in | |||
@@ -47,10 +47,12 @@ SECTIONS | |||
47 | __con_initcall_start = .; | 47 | __con_initcall_start = .; |
48 | *(.con_initcall.init) | 48 | *(.con_initcall.init) |
49 | __con_initcall_end = .; | 49 | __con_initcall_end = .; |
50 | #ifdef CONFIG_BLK_DEV_INITRD | ||
50 | . = ALIGN(32); | 51 | . = ALIGN(32); |
51 | __initramfs_start = .; | 52 | __initramfs_start = .; |
52 | usr/built-in.o(.init.ramfs) | 53 | usr/built-in.o(.init.ramfs) |
53 | __initramfs_end = .; | 54 | __initramfs_end = .; |
55 | #endif | ||
54 | . = ALIGN(32768); | 56 | . = ALIGN(32768); |
55 | __init_end = .; | 57 | __init_end = .; |
56 | } | 58 | } |
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 5a247ba71a72..a2f74affaa98 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c | |||
@@ -110,15 +110,6 @@ static void avr32_hpt_init(unsigned int count) | |||
110 | } | 110 | } |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * Scheduler clock - returns current time in nanosec units. | ||
114 | */ | ||
115 | unsigned long long sched_clock(void) | ||
116 | { | ||
117 | /* There must be better ways...? */ | ||
118 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
119 | } | ||
120 | |||
121 | /* | ||
122 | * local_timer_interrupt() does profiling and process accounting on a | 113 | * local_timer_interrupt() does profiling and process accounting on a |
123 | * per-CPU basis. | 114 | * per-CPU basis. |
124 | * | 115 | * |
diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c index 5c4424e362b5..ef13b7c78935 100644 --- a/arch/avr32/kernel/vmlinux.lds.c +++ b/arch/avr32/kernel/vmlinux.lds.c | |||
@@ -46,10 +46,12 @@ SECTIONS | |||
46 | __security_initcall_start = .; | 46 | __security_initcall_start = .; |
47 | *(.security_initcall.init) | 47 | *(.security_initcall.init) |
48 | __security_initcall_end = .; | 48 | __security_initcall_end = .; |
49 | #ifdef CONFIG_BLK_DEV_INITRD | ||
49 | . = ALIGN(32); | 50 | . = ALIGN(32); |
50 | __initramfs_start = .; | 51 | __initramfs_start = .; |
51 | *(.init.ramfs) | 52 | *(.init.ramfs) |
52 | __initramfs_end = .; | 53 | __initramfs_end = .; |
54 | #endif | ||
53 | . = ALIGN(4096); | 55 | . = ALIGN(4096); |
54 | __init_end = .; | 56 | __init_end = .; |
55 | } | 57 | } |
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 3474309e049c..4b41248b61ad 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -9,6 +9,10 @@ config MMU | |||
9 | bool | 9 | bool |
10 | default y | 10 | default y |
11 | 11 | ||
12 | config ZONE_DMA | ||
13 | bool | ||
14 | default y | ||
15 | |||
12 | config RWSEM_GENERIC_SPINLOCK | 16 | config RWSEM_GENERIC_SPINLOCK |
13 | bool | 17 | bool |
14 | default y | 18 | default y |
@@ -40,6 +44,9 @@ config IRQ_PER_CPU | |||
40 | bool | 44 | bool |
41 | default y | 45 | default y |
42 | 46 | ||
47 | config NO_IOPORT | ||
48 | def_bool y | ||
49 | |||
43 | config CRIS | 50 | config CRIS |
44 | bool | 51 | bool |
45 | default y | 52 | default y |
diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index ffade19a14e6..efd7b0f3a910 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c | |||
@@ -359,8 +359,7 @@ static struct mtd_info *flash_probe(void) | |||
359 | * So we use the MTD concatenation layer instead of further | 359 | * So we use the MTD concatenation layer instead of further |
360 | * complicating the probing procedure. | 360 | * complicating the probing procedure. |
361 | */ | 361 | */ |
362 | mtd_cse = mtd_concat_create(mtds, | 362 | mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds), |
363 | sizeof(mtds) / sizeof(mtds[0]), | ||
364 | "cse0+cse1"); | 363 | "cse0+cse1"); |
365 | #else | 364 | #else |
366 | printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " | 365 | printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " |
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index ebacf1457d91..077e973c33f0 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c | |||
@@ -38,7 +38,6 @@ unsigned long get_ns_in_jiffie(void) | |||
38 | unsigned long flags; | 38 | unsigned long flags; |
39 | 39 | ||
40 | local_irq_save(flags); | 40 | local_irq_save(flags); |
41 | local_irq_disable(); | ||
42 | timer_count = *R_TIMER0_DATA; | 41 | timer_count = *R_TIMER0_DATA; |
43 | presc_count = *R_TIM_PRESC_STATUS; | 42 | presc_count = *R_TIM_PRESC_STATUS; |
44 | /* presc_count might be wrapped */ | 43 | /* presc_count might be wrapped */ |
diff --git a/arch/cris/arch-v10/mm/tlb.c b/arch/cris/arch-v10/mm/tlb.c index 70a5523eff78..7d9fec88dee5 100644 --- a/arch/cris/arch-v10/mm/tlb.c +++ b/arch/cris/arch-v10/mm/tlb.c | |||
@@ -42,8 +42,7 @@ flush_tlb_all(void) | |||
42 | * in the same 4-way entry group. details.. | 42 | * in the same 4-way entry group. details.. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | local_save_flags(flags); | 45 | local_irq_save(flags); |
46 | local_irq_disable(); | ||
47 | for(i = 0; i < NUM_TLB_ENTRIES; i++) { | 46 | for(i = 0; i < NUM_TLB_ENTRIES; i++) { |
48 | *R_TLB_SELECT = ( IO_FIELD(R_TLB_SELECT, index, i) ); | 47 | *R_TLB_SELECT = ( IO_FIELD(R_TLB_SELECT, index, i) ); |
49 | *R_TLB_HI = ( IO_FIELD(R_TLB_HI, page_id, INVALID_PAGEID ) | | 48 | *R_TLB_HI = ( IO_FIELD(R_TLB_HI, page_id, INVALID_PAGEID ) | |
@@ -78,8 +77,7 @@ flush_tlb_mm(struct mm_struct *mm) | |||
78 | * global pages. is it worth the extra I/O ? | 77 | * global pages. is it worth the extra I/O ? |
79 | */ | 78 | */ |
80 | 79 | ||
81 | local_save_flags(flags); | 80 | local_irq_save(flags); |
82 | local_irq_disable(); | ||
83 | for(i = 0; i < NUM_TLB_ENTRIES; i++) { | 81 | for(i = 0; i < NUM_TLB_ENTRIES; i++) { |
84 | *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i); | 82 | *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i); |
85 | if (IO_EXTRACT(R_TLB_HI, page_id, *R_TLB_HI) == page_id) { | 83 | if (IO_EXTRACT(R_TLB_HI, page_id, *R_TLB_HI) == page_id) { |
@@ -118,8 +116,7 @@ flush_tlb_page(struct vm_area_struct *vma, | |||
118 | * and the virtual address requested | 116 | * and the virtual address requested |
119 | */ | 117 | */ |
120 | 118 | ||
121 | local_save_flags(flags); | 119 | local_irq_save(flags); |
122 | local_irq_disable(); | ||
123 | for(i = 0; i < NUM_TLB_ENTRIES; i++) { | 120 | for(i = 0; i < NUM_TLB_ENTRIES; i++) { |
124 | unsigned long tlb_hi; | 121 | unsigned long tlb_hi; |
125 | *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i); | 122 | *R_TLB_SELECT = IO_FIELD(R_TLB_SELECT, index, i); |
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S index 689729a7e66e..4b348b38cf33 100644 --- a/arch/cris/arch-v10/vmlinux.lds.S +++ b/arch/cris/arch-v10/vmlinux.lds.S | |||
@@ -82,7 +82,8 @@ SECTIONS | |||
82 | __con_initcall_end = .; | 82 | __con_initcall_end = .; |
83 | } | 83 | } |
84 | SECURITY_INIT | 84 | SECURITY_INIT |
85 | 85 | ||
86 | #ifdef CONFIG_BLK_DEV_INITRD | ||
86 | .init.ramfs : { | 87 | .init.ramfs : { |
87 | __initramfs_start = .; | 88 | __initramfs_start = .; |
88 | *(.init.ramfs) | 89 | *(.init.ramfs) |
@@ -93,6 +94,7 @@ SECTIONS | |||
93 | FILL (0); | 94 | FILL (0); |
94 | . = ALIGN (8192); | 95 | . = ALIGN (8192); |
95 | } | 96 | } |
97 | #endif | ||
96 | 98 | ||
97 | __vmlinux_end = .; /* last address of the physical file */ | 99 | __vmlinux_end = .; /* last address of the physical file */ |
98 | __init_end = .; | 100 | __init_end = .; |
diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c index 9d75d7692303..c2d12e9c40d7 100644 --- a/arch/cris/arch-v32/mm/tlb.c +++ b/arch/cris/arch-v32/mm/tlb.c | |||
@@ -54,8 +54,7 @@ __flush_tlb_all(void) | |||
54 | * Mask with 0xf so similar TLB entries aren't written in the same 4-way | 54 | * Mask with 0xf so similar TLB entries aren't written in the same 4-way |
55 | * entry group. | 55 | * entry group. |
56 | */ | 56 | */ |
57 | local_save_flags(flags); | 57 | local_irq_save(flags); |
58 | local_irq_disable(); | ||
59 | 58 | ||
60 | for (mmu = 1; mmu <= 2; mmu++) { | 59 | for (mmu = 1; mmu <= 2; mmu++) { |
61 | SUPP_BANK_SEL(mmu); /* Select the MMU */ | 60 | SUPP_BANK_SEL(mmu); /* Select the MMU */ |
@@ -92,8 +91,7 @@ __flush_tlb_mm(struct mm_struct *mm) | |||
92 | return; | 91 | return; |
93 | 92 | ||
94 | /* Mark the TLB entries that match the page_id as invalid. */ | 93 | /* Mark the TLB entries that match the page_id as invalid. */ |
95 | local_save_flags(flags); | 94 | local_irq_save(flags); |
96 | local_irq_disable(); | ||
97 | 95 | ||
98 | for (mmu = 1; mmu <= 2; mmu++) { | 96 | for (mmu = 1; mmu <= 2; mmu++) { |
99 | SUPP_BANK_SEL(mmu); | 97 | SUPP_BANK_SEL(mmu); |
@@ -140,8 +138,7 @@ __flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) | |||
140 | * Invalidate those TLB entries that match both the mm context and the | 138 | * Invalidate those TLB entries that match both the mm context and the |
141 | * requested virtual address. | 139 | * requested virtual address. |
142 | */ | 140 | */ |
143 | local_save_flags(flags); | 141 | local_irq_save(flags); |
144 | local_irq_disable(); | ||
145 | 142 | ||
146 | for (mmu = 1; mmu <= 2; mmu++) { | 143 | for (mmu = 1; mmu <= 2; mmu++) { |
147 | SUPP_BANK_SEL(mmu); | 144 | SUPP_BANK_SEL(mmu); |
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S index 472d4b3c4cf4..e124fcd766d5 100644 --- a/arch/cris/arch-v32/vmlinux.lds.S +++ b/arch/cris/arch-v32/vmlinux.lds.S | |||
@@ -95,6 +95,7 @@ SECTIONS | |||
95 | .data.percpu : { *(.data.percpu) } | 95 | .data.percpu : { *(.data.percpu) } |
96 | __per_cpu_end = .; | 96 | __per_cpu_end = .; |
97 | 97 | ||
98 | #ifdef CONFIG_BLK_DEV_INITRD | ||
98 | .init.ramfs : { | 99 | .init.ramfs : { |
99 | __initramfs_start = .; | 100 | __initramfs_start = .; |
100 | *(.init.ramfs) | 101 | *(.init.ramfs) |
@@ -107,6 +108,7 @@ SECTIONS | |||
107 | FILL (0); | 108 | FILL (0); |
108 | . = ALIGN (8192); | 109 | . = ALIGN (8192); |
109 | } | 110 | } |
111 | #endif | ||
110 | 112 | ||
111 | __vmlinux_end = .; /* Last address of the physical file. */ | 113 | __vmlinux_end = .; /* Last address of the physical file. */ |
112 | __init_end = .; | 114 | __init_end = .; |
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c index 0f9213cbd48e..acfd04559405 100644 --- a/arch/cris/kernel/time.c +++ b/arch/cris/kernel/time.c | |||
@@ -55,7 +55,6 @@ void do_gettimeofday(struct timeval *tv) | |||
55 | unsigned long flags; | 55 | unsigned long flags; |
56 | signed long usec, sec; | 56 | signed long usec, sec; |
57 | local_irq_save(flags); | 57 | local_irq_save(flags); |
58 | local_irq_disable(); | ||
59 | usec = do_gettimeoffset(); | 58 | usec = do_gettimeoffset(); |
60 | 59 | ||
61 | /* | 60 | /* |
@@ -217,14 +216,6 @@ cris_do_profile(struct pt_regs* regs) | |||
217 | #endif | 216 | #endif |
218 | } | 217 | } |
219 | 218 | ||
220 | /* | ||
221 | * Scheduler clock - returns current time in nanosec units. | ||
222 | */ | ||
223 | unsigned long long sched_clock(void) | ||
224 | { | ||
225 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
226 | } | ||
227 | |||
228 | static int | 219 | static int |
229 | __init init_udelay(void) | 220 | __init init_udelay(void) |
230 | { | 221 | { |
diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c index 0df390a656cd..c4a98e2e529e 100644 --- a/arch/cris/mm/tlb.c +++ b/arch/cris/mm/tlb.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/kernel.h> | ||
11 | #include <asm/tlb.h> | 12 | #include <asm/tlb.h> |
12 | 13 | ||
13 | #define D(x) | 14 | #define D(x) |
@@ -100,7 +101,7 @@ tlb_init(void) | |||
100 | 101 | ||
101 | /* clear the page_id map */ | 102 | /* clear the page_id map */ |
102 | 103 | ||
103 | for (i = 1; i < sizeof (page_id_map) / sizeof (page_id_map[0]); i++) | 104 | for (i = 1; i < ARRAY_SIZE(page_id_map); i++) |
104 | page_id_map[i] = NULL; | 105 | page_id_map[i] = NULL; |
105 | 106 | ||
106 | /* invalidate the entire TLB */ | 107 | /* invalidate the entire TLB */ |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 7561d7b72e75..cea237413aa2 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -6,6 +6,10 @@ config FRV | |||
6 | bool | 6 | bool |
7 | default y | 7 | default y |
8 | 8 | ||
9 | config ZONE_DMA | ||
10 | bool | ||
11 | default y | ||
12 | |||
9 | config RWSEM_GENERIC_SPINLOCK | 13 | config RWSEM_GENERIC_SPINLOCK |
10 | bool | 14 | bool |
11 | default y | 15 | default y |
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S index 9c1fb12367fa..97910e016825 100644 --- a/arch/frv/kernel/vmlinux.lds.S +++ b/arch/frv/kernel/vmlinux.lds.S | |||
@@ -61,10 +61,12 @@ SECTIONS | |||
61 | .data.percpu : { *(.data.percpu) } | 61 | .data.percpu : { *(.data.percpu) } |
62 | __per_cpu_end = .; | 62 | __per_cpu_end = .; |
63 | 63 | ||
64 | #ifdef CONFIG_BLK_DEV_INITRD | ||
64 | . = ALIGN(4096); | 65 | . = ALIGN(4096); |
65 | __initramfs_start = .; | 66 | __initramfs_start = .; |
66 | .init.ramfs : { *(.init.ramfs) } | 67 | .init.ramfs : { *(.init.ramfs) } |
67 | __initramfs_end = .; | 68 | __initramfs_end = .; |
69 | #endif | ||
68 | 70 | ||
69 | . = ALIGN(THREAD_SIZE); | 71 | . = ALIGN(THREAD_SIZE); |
70 | __init_end = .; | 72 | __init_end = .; |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 34a84bc4baf5..1734d96422c6 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -17,6 +17,10 @@ config SWAP | |||
17 | bool | 17 | bool |
18 | default n | 18 | default n |
19 | 19 | ||
20 | config ZONE_DMA | ||
21 | bool | ||
22 | default y | ||
23 | |||
20 | config FPU | 24 | config FPU |
21 | bool | 25 | bool |
22 | default n | 26 | default n |
@@ -53,6 +57,9 @@ config TIME_LOW_RES | |||
53 | bool | 57 | bool |
54 | default y | 58 | default y |
55 | 59 | ||
60 | config NO_IOPORT | ||
61 | def_bool y | ||
62 | |||
56 | config ISA | 63 | config ISA |
57 | bool | 64 | bool |
58 | default y | 65 | default y |
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile index 71b6131e98b8..4edbc2ef6ca2 100644 --- a/arch/h8300/kernel/Makefile +++ b/arch/h8300/kernel/Makefile | |||
@@ -6,6 +6,8 @@ extra-y := vmlinux.lds | |||
6 | 6 | ||
7 | obj-y := process.o traps.o ptrace.o ints.o \ | 7 | obj-y := process.o traps.o ptrace.o ints.o \ |
8 | sys_h8300.o time.o semaphore.o signal.o \ | 8 | sys_h8300.o time.o semaphore.o signal.o \ |
9 | setup.o gpio.o init_task.o syscalls.o | 9 | setup.o gpio.o init_task.o syscalls.o devres.o |
10 | |||
11 | devres-y = ../../../kernel/irq/devres.o | ||
10 | 12 | ||
11 | obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o | 13 | obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o |
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 8abab3bc2b6f..d1ef615ba895 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c | |||
@@ -118,9 +118,3 @@ int do_settimeofday(struct timespec *tv) | |||
118 | } | 118 | } |
119 | 119 | ||
120 | EXPORT_SYMBOL(do_settimeofday); | 120 | EXPORT_SYMBOL(do_settimeofday); |
121 | |||
122 | unsigned long long sched_clock(void) | ||
123 | { | ||
124 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
125 | |||
126 | } | ||
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S index f05288be8878..65f1cdc5ee04 100644 --- a/arch/h8300/kernel/vmlinux.lds.S +++ b/arch/h8300/kernel/vmlinux.lds.S | |||
@@ -126,10 +126,12 @@ SECTIONS | |||
126 | ___con_initcall_end = .; | 126 | ___con_initcall_end = .; |
127 | *(.exit.text) | 127 | *(.exit.text) |
128 | *(.exit.data) | 128 | *(.exit.data) |
129 | #if defined(CONFIG_BLK_DEV_INITRD) | ||
129 | . = ALIGN(4); | 130 | . = ALIGN(4); |
130 | ___initramfs_start = .; | 131 | ___initramfs_start = .; |
131 | *(.init.ramfs) | 132 | *(.init.ramfs) |
132 | ___initramfs_end = .; | 133 | ___initramfs_end = .; |
134 | #endif | ||
133 | . = ALIGN(0x4) ; | 135 | . = ALIGN(0x4) ; |
134 | ___init_end = .; | 136 | ___init_end = .; |
135 | __edata = . ; | 137 | __edata = . ; |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 0dfee812811a..63d5e841caf5 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -38,6 +38,10 @@ config MMU | |||
38 | bool | 38 | bool |
39 | default y | 39 | default y |
40 | 40 | ||
41 | config ZONE_DMA | ||
42 | bool | ||
43 | default y | ||
44 | |||
41 | config SBUS | 45 | config SBUS |
42 | bool | 46 | bool |
43 | 47 | ||
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index a53c8b1854b5..5038a73d554e 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
@@ -181,12 +181,14 @@ SECTIONS | |||
181 | from .altinstructions and .eh_frame */ | 181 | from .altinstructions and .eh_frame */ |
182 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } | 182 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } |
183 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } | 183 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } |
184 | #if defined(CONFIG_BLK_DEV_INITRD) | ||
184 | . = ALIGN(4096); | 185 | . = ALIGN(4096); |
185 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { | 186 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { |
186 | __initramfs_start = .; | 187 | __initramfs_start = .; |
187 | *(.init.ramfs) | 188 | *(.init.ramfs) |
188 | __initramfs_end = .; | 189 | __initramfs_end = .; |
189 | } | 190 | } |
191 | #endif | ||
190 | . = ALIGN(L1_CACHE_BYTES); | 192 | . = ALIGN(L1_CACHE_BYTES); |
191 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { | 193 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { |
192 | __per_cpu_start = .; | 194 | __per_cpu_start = .; |
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index aaaa4d225f7e..cba9b3894a33 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c | |||
@@ -60,32 +60,6 @@ static inline int notify_page_fault(enum die_val val, const char *str, | |||
60 | } | 60 | } |
61 | 61 | ||
62 | /* | 62 | /* |
63 | * Unlock any spinlocks which will prevent us from getting the | ||
64 | * message out | ||
65 | */ | ||
66 | void bust_spinlocks(int yes) | ||
67 | { | ||
68 | int loglevel_save = console_loglevel; | ||
69 | |||
70 | if (yes) { | ||
71 | oops_in_progress = 1; | ||
72 | return; | ||
73 | } | ||
74 | #ifdef CONFIG_VT | ||
75 | unblank_screen(); | ||
76 | #endif | ||
77 | oops_in_progress = 0; | ||
78 | /* | ||
79 | * OK, the message is on the console. Now we call printk() | ||
80 | * without oops_in_progress set so that printk will give klogd | ||
81 | * a poke. Hold onto your hats... | ||
82 | */ | ||
83 | console_loglevel = 15; /* NMI oopser may have shut the console up */ | ||
84 | printk(" "); | ||
85 | console_loglevel = loglevel_save; | ||
86 | } | ||
87 | |||
88 | /* | ||
89 | * Return EIP plus the CS segment base. The segment limit is also | 63 | * Return EIP plus the CS segment base. The segment limit is also |
90 | * adjusted, clamped to the kernel/user address space (whichever is | 64 | * adjusted, clamped to the kernel/user address space (whichever is |
91 | * appropriate), and returned in *eip_limit. | 65 | * appropriate), and returned in *eip_limit. |
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c index e0fa6cb655a8..bb2de1089add 100644 --- a/arch/i386/mm/highmem.c +++ b/arch/i386/mm/highmem.c | |||
@@ -33,13 +33,14 @@ void *kmap_atomic(struct page *page, enum km_type type) | |||
33 | 33 | ||
34 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ | 34 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ |
35 | pagefault_disable(); | 35 | pagefault_disable(); |
36 | |||
37 | idx = type + KM_TYPE_NR*smp_processor_id(); | ||
38 | BUG_ON(!pte_none(*(kmap_pte-idx))); | ||
39 | |||
36 | if (!PageHighMem(page)) | 40 | if (!PageHighMem(page)) |
37 | return page_address(page); | 41 | return page_address(page); |
38 | 42 | ||
39 | idx = type + KM_TYPE_NR*smp_processor_id(); | ||
40 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 43 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
41 | if (!pte_none(*(kmap_pte-idx))) | ||
42 | BUG(); | ||
43 | set_pte(kmap_pte-idx, mk_pte(page, kmap_prot)); | 44 | set_pte(kmap_pte-idx, mk_pte(page, kmap_prot)); |
44 | 45 | ||
45 | return (void*) vaddr; | 46 | return (void*) vaddr; |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index f1d2899e9a62..db185f34e341 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -24,6 +24,10 @@ config 64BIT | |||
24 | bool | 24 | bool |
25 | default y | 25 | default y |
26 | 26 | ||
27 | config ZONE_DMA | ||
28 | def_bool y | ||
29 | depends on !IA64_SGI_SN2 | ||
30 | |||
27 | config MMU | 31 | config MMU |
28 | bool | 32 | bool |
29 | default y | 33 | default y |
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index 578737ec7629..c05bda662364 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c | |||
@@ -91,9 +91,8 @@ ia64_elf32_init (struct pt_regs *regs) | |||
91 | * it with privilege level 3 because the IVE uses non-privileged accesses to these | 91 | * it with privilege level 3 because the IVE uses non-privileged accesses to these |
92 | * tables. IA-32 segmentation is used to protect against IA-32 accesses to them. | 92 | * tables. IA-32 segmentation is used to protect against IA-32 accesses to them. |
93 | */ | 93 | */ |
94 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 94 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
95 | if (vma) { | 95 | if (vma) { |
96 | memset(vma, 0, sizeof(*vma)); | ||
97 | vma->vm_mm = current->mm; | 96 | vma->vm_mm = current->mm; |
98 | vma->vm_start = IA32_GDT_OFFSET; | 97 | vma->vm_start = IA32_GDT_OFFSET; |
99 | vma->vm_end = vma->vm_start + PAGE_SIZE; | 98 | vma->vm_end = vma->vm_start + PAGE_SIZE; |
@@ -117,9 +116,8 @@ ia64_elf32_init (struct pt_regs *regs) | |||
117 | * code is locked in specific gate page, which is pointed by pretcode | 116 | * code is locked in specific gate page, which is pointed by pretcode |
118 | * when setup_frame_ia32 | 117 | * when setup_frame_ia32 |
119 | */ | 118 | */ |
120 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 119 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
121 | if (vma) { | 120 | if (vma) { |
122 | memset(vma, 0, sizeof(*vma)); | ||
123 | vma->vm_mm = current->mm; | 121 | vma->vm_mm = current->mm; |
124 | vma->vm_start = IA32_GATE_OFFSET; | 122 | vma->vm_start = IA32_GATE_OFFSET; |
125 | vma->vm_end = vma->vm_start + PAGE_SIZE; | 123 | vma->vm_end = vma->vm_start + PAGE_SIZE; |
@@ -142,9 +140,8 @@ ia64_elf32_init (struct pt_regs *regs) | |||
142 | * Install LDT as anonymous memory. This gives us all-zero segment descriptors | 140 | * Install LDT as anonymous memory. This gives us all-zero segment descriptors |
143 | * until a task modifies them via modify_ldt(). | 141 | * until a task modifies them via modify_ldt(). |
144 | */ | 142 | */ |
145 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 143 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
146 | if (vma) { | 144 | if (vma) { |
147 | memset(vma, 0, sizeof(*vma)); | ||
148 | vma->vm_mm = current->mm; | 145 | vma->vm_mm = current->mm; |
149 | vma->vm_start = IA32_LDT_OFFSET; | 146 | vma->vm_start = IA32_LDT_OFFSET; |
150 | vma->vm_end = vma->vm_start + PAGE_ALIGN(IA32_LDT_ENTRIES*IA32_LDT_ENTRY_SIZE); | 147 | vma->vm_end = vma->vm_start + PAGE_ALIGN(IA32_LDT_ENTRIES*IA32_LDT_ENTRY_SIZE); |
@@ -214,12 +211,10 @@ ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack) | |||
214 | bprm->loader += stack_base; | 211 | bprm->loader += stack_base; |
215 | bprm->exec += stack_base; | 212 | bprm->exec += stack_base; |
216 | 213 | ||
217 | mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 214 | mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
218 | if (!mpnt) | 215 | if (!mpnt) |
219 | return -ENOMEM; | 216 | return -ENOMEM; |
220 | 217 | ||
221 | memset(mpnt, 0, sizeof(*mpnt)); | ||
222 | |||
223 | down_write(¤t->mm->mmap_sem); | 218 | down_write(¤t->mm->mmap_sem); |
224 | { | 219 | { |
225 | mpnt->vm_mm = current->mm; | 220 | mpnt->vm_mm = current->mm; |
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S index a32cd59b81ed..687e5fdc9683 100644 --- a/arch/ia64/ia32/ia32_entry.S +++ b/arch/ia64/ia32/ia32_entry.S | |||
@@ -326,7 +326,7 @@ ia32_syscall_table: | |||
326 | data8 sys_ni_syscall | 326 | data8 sys_ni_syscall |
327 | data8 compat_sys_wait4 | 327 | data8 compat_sys_wait4 |
328 | data8 sys_swapoff /* 115 */ | 328 | data8 sys_swapoff /* 115 */ |
329 | data8 sys32_sysinfo | 329 | data8 compat_sys_sysinfo |
330 | data8 sys32_ipc | 330 | data8 sys32_ipc |
331 | data8 sys_fsync | 331 | data8 sys_fsync |
332 | data8 sys32_sigreturn | 332 | data8 sys32_sigreturn |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 957681c39ad9..d430d36ae49d 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -2209,74 +2209,6 @@ sys32_fstat64 (unsigned int fd, struct stat64 __user *statbuf) | |||
2209 | return ret; | 2209 | return ret; |
2210 | } | 2210 | } |
2211 | 2211 | ||
2212 | struct sysinfo32 { | ||
2213 | s32 uptime; | ||
2214 | u32 loads[3]; | ||
2215 | u32 totalram; | ||
2216 | u32 freeram; | ||
2217 | u32 sharedram; | ||
2218 | u32 bufferram; | ||
2219 | u32 totalswap; | ||
2220 | u32 freeswap; | ||
2221 | u16 procs; | ||
2222 | u16 pad; | ||
2223 | u32 totalhigh; | ||
2224 | u32 freehigh; | ||
2225 | u32 mem_unit; | ||
2226 | char _f[8]; | ||
2227 | }; | ||
2228 | |||
2229 | asmlinkage long | ||
2230 | sys32_sysinfo (struct sysinfo32 __user *info) | ||
2231 | { | ||
2232 | struct sysinfo s; | ||
2233 | long ret, err; | ||
2234 | int bitcount = 0; | ||
2235 | mm_segment_t old_fs = get_fs(); | ||
2236 | |||
2237 | set_fs(KERNEL_DS); | ||
2238 | ret = sys_sysinfo((struct sysinfo __user *) &s); | ||
2239 | set_fs(old_fs); | ||
2240 | /* Check to see if any memory value is too large for 32-bit and | ||
2241 | * scale down if needed. | ||
2242 | */ | ||
2243 | if ((s.totalram >> 32) || (s.totalswap >> 32)) { | ||
2244 | while (s.mem_unit < PAGE_SIZE) { | ||
2245 | s.mem_unit <<= 1; | ||
2246 | bitcount++; | ||
2247 | } | ||
2248 | s.totalram >>= bitcount; | ||
2249 | s.freeram >>= bitcount; | ||
2250 | s.sharedram >>= bitcount; | ||
2251 | s.bufferram >>= bitcount; | ||
2252 | s.totalswap >>= bitcount; | ||
2253 | s.freeswap >>= bitcount; | ||
2254 | s.totalhigh >>= bitcount; | ||
2255 | s.freehigh >>= bitcount; | ||
2256 | } | ||
2257 | |||
2258 | if (!access_ok(VERIFY_WRITE, info, sizeof(*info))) | ||
2259 | return -EFAULT; | ||
2260 | |||
2261 | err = __put_user(s.uptime, &info->uptime); | ||
2262 | err |= __put_user(s.loads[0], &info->loads[0]); | ||
2263 | err |= __put_user(s.loads[1], &info->loads[1]); | ||
2264 | err |= __put_user(s.loads[2], &info->loads[2]); | ||
2265 | err |= __put_user(s.totalram, &info->totalram); | ||
2266 | err |= __put_user(s.freeram, &info->freeram); | ||
2267 | err |= __put_user(s.sharedram, &info->sharedram); | ||
2268 | err |= __put_user(s.bufferram, &info->bufferram); | ||
2269 | err |= __put_user(s.totalswap, &info->totalswap); | ||
2270 | err |= __put_user(s.freeswap, &info->freeswap); | ||
2271 | err |= __put_user(s.procs, &info->procs); | ||
2272 | err |= __put_user (s.totalhigh, &info->totalhigh); | ||
2273 | err |= __put_user (s.freehigh, &info->freehigh); | ||
2274 | err |= __put_user (s.mem_unit, &info->mem_unit); | ||
2275 | if (err) | ||
2276 | return -EFAULT; | ||
2277 | return ret; | ||
2278 | } | ||
2279 | |||
2280 | asmlinkage long | 2212 | asmlinkage long |
2281 | sys32_sched_rr_get_interval (pid_t pid, struct compat_timespec __user *interval) | 2213 | sys32_sched_rr_get_interval (pid_t pid, struct compat_timespec __user *interval) |
2282 | { | 2214 | { |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index aa94f60fa8e7..86e144f321ff 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -2301,12 +2301,11 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon | |||
2301 | DPRINT(("smpl_buf @%p\n", smpl_buf)); | 2301 | DPRINT(("smpl_buf @%p\n", smpl_buf)); |
2302 | 2302 | ||
2303 | /* allocate vma */ | 2303 | /* allocate vma */ |
2304 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 2304 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
2305 | if (!vma) { | 2305 | if (!vma) { |
2306 | DPRINT(("Cannot allocate vma\n")); | 2306 | DPRINT(("Cannot allocate vma\n")); |
2307 | goto error_kmem; | 2307 | goto error_kmem; |
2308 | } | 2308 | } |
2309 | memset(vma, 0, sizeof(*vma)); | ||
2310 | 2309 | ||
2311 | /* | 2310 | /* |
2312 | * partially initialize the vma for the sampling buffer | 2311 | * partially initialize the vma for the sampling buffer |
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index ab684747036f..765cbe5ba6ae 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
25 | #include <asm/kdebug.h> | 25 | #include <asm/kdebug.h> |
26 | 26 | ||
27 | extern spinlock_t timerlist_lock; | ||
28 | |||
29 | fpswa_interface_t *fpswa_interface; | 27 | fpswa_interface_t *fpswa_interface; |
30 | EXPORT_SYMBOL(fpswa_interface); | 28 | EXPORT_SYMBOL(fpswa_interface); |
31 | 29 | ||
@@ -53,34 +51,6 @@ trap_init (void) | |||
53 | fpswa_interface = __va(ia64_boot_param->fpswa); | 51 | fpswa_interface = __va(ia64_boot_param->fpswa); |
54 | } | 52 | } |
55 | 53 | ||
56 | /* | ||
57 | * Unlock any spinlocks which will prevent us from getting the message out (timerlist_lock | ||
58 | * is acquired through the console unblank code) | ||
59 | */ | ||
60 | void | ||
61 | bust_spinlocks (int yes) | ||
62 | { | ||
63 | int loglevel_save = console_loglevel; | ||
64 | |||
65 | if (yes) { | ||
66 | oops_in_progress = 1; | ||
67 | return; | ||
68 | } | ||
69 | |||
70 | #ifdef CONFIG_VT | ||
71 | unblank_screen(); | ||
72 | #endif | ||
73 | oops_in_progress = 0; | ||
74 | /* | ||
75 | * OK, the message is on the console. Now we call printk() without | ||
76 | * oops_in_progress set so that printk will give klogd a poke. Hold onto | ||
77 | * your hats... | ||
78 | */ | ||
79 | console_loglevel = 15; /* NMI oopser may have shut the console up */ | ||
80 | printk(" "); | ||
81 | console_loglevel = loglevel_save; | ||
82 | } | ||
83 | |||
84 | void | 54 | void |
85 | die (const char *str, struct pt_regs *regs, long err) | 55 | die (const char *str, struct pt_regs *regs, long err) |
86 | { | 56 | { |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 8f3d0066f446..25dd55e4db24 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -111,12 +111,14 @@ SECTIONS | |||
111 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) | 111 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) |
112 | { *(.init.data) } | 112 | { *(.init.data) } |
113 | 113 | ||
114 | #ifdef CONFIG_BLK_DEV_INITRD | ||
114 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) | 115 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) |
115 | { | 116 | { |
116 | __initramfs_start = .; | 117 | __initramfs_start = .; |
117 | *(.init.ramfs) | 118 | *(.init.ramfs) |
118 | __initramfs_end = .; | 119 | __initramfs_end = .; |
119 | } | 120 | } |
121 | #endif | ||
120 | 122 | ||
121 | . = ALIGN(16); | 123 | . = ALIGN(16); |
122 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) | 124 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) |
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index 63e6d49c5813..ca4d41e5f177 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c | |||
@@ -259,9 +259,11 @@ paging_init (void) | |||
259 | num_physpages = 0; | 259 | num_physpages = 0; |
260 | efi_memmap_walk(count_pages, &num_physpages); | 260 | efi_memmap_walk(count_pages, &num_physpages); |
261 | 261 | ||
262 | max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; | ||
263 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 262 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
263 | #ifdef CONFIG_ZONE_DMA | ||
264 | max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; | ||
264 | max_zone_pfns[ZONE_DMA] = max_dma; | 265 | max_zone_pfns[ZONE_DMA] = max_dma; |
266 | #endif | ||
265 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | 267 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; |
266 | 268 | ||
267 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 269 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 6eae596c509d..16835108bb5b 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -37,7 +37,9 @@ struct early_node_data { | |||
37 | unsigned long pernode_size; | 37 | unsigned long pernode_size; |
38 | struct bootmem_data bootmem_data; | 38 | struct bootmem_data bootmem_data; |
39 | unsigned long num_physpages; | 39 | unsigned long num_physpages; |
40 | #ifdef CONFIG_ZONE_DMA | ||
40 | unsigned long num_dma_physpages; | 41 | unsigned long num_dma_physpages; |
42 | #endif | ||
41 | unsigned long min_pfn; | 43 | unsigned long min_pfn; |
42 | unsigned long max_pfn; | 44 | unsigned long max_pfn; |
43 | }; | 45 | }; |
@@ -633,9 +635,11 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n | |||
633 | unsigned long end = start + len; | 635 | unsigned long end = start + len; |
634 | 636 | ||
635 | mem_data[node].num_physpages += len >> PAGE_SHIFT; | 637 | mem_data[node].num_physpages += len >> PAGE_SHIFT; |
638 | #ifdef CONFIG_ZONE_DMA | ||
636 | if (start <= __pa(MAX_DMA_ADDRESS)) | 639 | if (start <= __pa(MAX_DMA_ADDRESS)) |
637 | mem_data[node].num_dma_physpages += | 640 | mem_data[node].num_dma_physpages += |
638 | (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; | 641 | (min(end, __pa(MAX_DMA_ADDRESS)) - start) >>PAGE_SHIFT; |
642 | #endif | ||
639 | start = GRANULEROUNDDOWN(start); | 643 | start = GRANULEROUNDDOWN(start); |
640 | start = ORDERROUNDDOWN(start); | 644 | start = ORDERROUNDDOWN(start); |
641 | end = GRANULEROUNDUP(end); | 645 | end = GRANULEROUNDUP(end); |
@@ -688,7 +692,9 @@ void __init paging_init(void) | |||
688 | } | 692 | } |
689 | 693 | ||
690 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 694 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
695 | #ifdef CONFIG_ZONE_DMA | ||
691 | max_zone_pfns[ZONE_DMA] = max_dma; | 696 | max_zone_pfns[ZONE_DMA] = max_dma; |
697 | #endif | ||
692 | max_zone_pfns[ZONE_NORMAL] = max_pfn; | 698 | max_zone_pfns[ZONE_NORMAL] = max_pfn; |
693 | free_area_init_nodes(max_zone_pfns); | 699 | free_area_init_nodes(max_zone_pfns); |
694 | 700 | ||
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index faaca21a3718..f225dd72968b 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -68,7 +68,7 @@ max_pgt_pages(void) | |||
68 | #ifndef CONFIG_NUMA | 68 | #ifndef CONFIG_NUMA |
69 | node_free_pages = nr_free_pages(); | 69 | node_free_pages = nr_free_pages(); |
70 | #else | 70 | #else |
71 | node_free_pages = nr_free_pages_pgdat(NODE_DATA(numa_node_id())); | 71 | node_free_pages = node_page_state(numa_node_id(), NR_FREE_PAGES); |
72 | #endif | 72 | #endif |
73 | max_pgt_pages = node_free_pages / PGT_FRACTION_OF_NODE_MEM; | 73 | max_pgt_pages = node_free_pages / PGT_FRACTION_OF_NODE_MEM; |
74 | max_pgt_pages = max(max_pgt_pages, MIN_PGT_PAGES); | 74 | max_pgt_pages = max(max_pgt_pages, MIN_PGT_PAGES); |
@@ -176,9 +176,8 @@ ia64_init_addr_space (void) | |||
176 | * the problem. When the process attempts to write to the register backing store | 176 | * the problem. When the process attempts to write to the register backing store |
177 | * for the first time, it will get a SEGFAULT in this case. | 177 | * for the first time, it will get a SEGFAULT in this case. |
178 | */ | 178 | */ |
179 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 179 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
180 | if (vma) { | 180 | if (vma) { |
181 | memset(vma, 0, sizeof(*vma)); | ||
182 | vma->vm_mm = current->mm; | 181 | vma->vm_mm = current->mm; |
183 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; | 182 | vma->vm_start = current->thread.rbs_bot & PAGE_MASK; |
184 | vma->vm_end = vma->vm_start + PAGE_SIZE; | 183 | vma->vm_end = vma->vm_start + PAGE_SIZE; |
@@ -195,9 +194,8 @@ ia64_init_addr_space (void) | |||
195 | 194 | ||
196 | /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ | 195 | /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ |
197 | if (!(current->personality & MMAP_PAGE_ZERO)) { | 196 | if (!(current->personality & MMAP_PAGE_ZERO)) { |
198 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 197 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
199 | if (vma) { | 198 | if (vma) { |
200 | memset(vma, 0, sizeof(*vma)); | ||
201 | vma->vm_mm = current->mm; | 199 | vma->vm_mm = current->mm; |
202 | vma->vm_end = PAGE_SIZE; | 200 | vma->vm_end = PAGE_SIZE; |
203 | vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); | 201 | vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); |
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index 43ddc2eccb96..62b3e9a496ac 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c | |||
@@ -89,61 +89,80 @@ static int coherence_id_open(struct inode *inode, struct file *file) | |||
89 | return single_open(file, coherence_id_show, NULL); | 89 | return single_open(file, coherence_id_show, NULL); |
90 | } | 90 | } |
91 | 91 | ||
92 | static struct proc_dir_entry | ||
93 | *sn_procfs_create_entry(const char *name, struct proc_dir_entry *parent, | ||
94 | int (*openfunc)(struct inode *, struct file *), | ||
95 | int (*releasefunc)(struct inode *, struct file *), | ||
96 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *)) | ||
97 | { | ||
98 | struct proc_dir_entry *e = create_proc_entry(name, 0444, parent); | ||
99 | |||
100 | if (e) { | ||
101 | struct file_operations *f; | ||
102 | |||
103 | f = kzalloc(sizeof(*f), GFP_KERNEL); | ||
104 | if (f) { | ||
105 | f->open = openfunc; | ||
106 | f->read = seq_read; | ||
107 | f->llseek = seq_lseek; | ||
108 | f->release = releasefunc; | ||
109 | f->write = write; | ||
110 | e->proc_fops = f; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | return e; | ||
115 | } | ||
116 | |||
117 | /* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */ | 92 | /* /proc/sgi_sn/sn_topology uses seq_file, see sn_hwperf.c */ |
118 | extern int sn_topology_open(struct inode *, struct file *); | 93 | extern int sn_topology_open(struct inode *, struct file *); |
119 | extern int sn_topology_release(struct inode *, struct file *); | 94 | extern int sn_topology_release(struct inode *, struct file *); |
120 | 95 | ||
96 | static const struct file_operations proc_partition_id_fops = { | ||
97 | .open = partition_id_open, | ||
98 | .read = seq_read, | ||
99 | .llseek = seq_lseek, | ||
100 | .release = single_release, | ||
101 | }; | ||
102 | |||
103 | static const struct file_operations proc_system_sn_fops = { | ||
104 | .open = system_serial_number_open, | ||
105 | .read = seq_read, | ||
106 | .llseek = seq_lseek, | ||
107 | .release = single_release, | ||
108 | }; | ||
109 | |||
110 | static const struct file_operations proc_license_id_fops = { | ||
111 | .open = licenseID_open, | ||
112 | .read = seq_read, | ||
113 | .llseek = seq_lseek, | ||
114 | .release = single_release, | ||
115 | }; | ||
116 | |||
117 | static const struct file_operations proc_sn_force_intr_fops = { | ||
118 | .open = sn_force_interrupt_open, | ||
119 | .read = seq_read, | ||
120 | .write = sn_force_interrupt_write_proc, | ||
121 | .llseek = seq_lseek, | ||
122 | .release = single_release, | ||
123 | }; | ||
124 | |||
125 | static const struct file_operations proc_coherence_id_fops = { | ||
126 | .open = coherence_id_open, | ||
127 | .read = seq_read, | ||
128 | .llseek = seq_lseek, | ||
129 | .release = single_release, | ||
130 | }; | ||
131 | |||
132 | static const struct file_operations proc_sn_topo_fops = { | ||
133 | .open = sn_topology_open, | ||
134 | .read = seq_read, | ||
135 | .llseek = seq_lseek, | ||
136 | .release = sn_topology_release, | ||
137 | }; | ||
138 | |||
121 | void register_sn_procfs(void) | 139 | void register_sn_procfs(void) |
122 | { | 140 | { |
123 | static struct proc_dir_entry *sgi_proc_dir = NULL; | 141 | static struct proc_dir_entry *sgi_proc_dir = NULL; |
142 | struct proc_dir_entry *pde; | ||
124 | 143 | ||
125 | BUG_ON(sgi_proc_dir != NULL); | 144 | BUG_ON(sgi_proc_dir != NULL); |
126 | if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) | 145 | if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) |
127 | return; | 146 | return; |
128 | 147 | ||
129 | sn_procfs_create_entry("partition_id", sgi_proc_dir, | 148 | pde = create_proc_entry("partition_id", 0444, sgi_proc_dir); |
130 | partition_id_open, single_release, NULL); | 149 | if (pde) |
131 | 150 | pde->proc_fops = &proc_partition_id_fops; | |
132 | sn_procfs_create_entry("system_serial_number", sgi_proc_dir, | 151 | pde = create_proc_entry("system_serial_number", 0444, sgi_proc_dir); |
133 | system_serial_number_open, single_release, NULL); | 152 | if (pde) |
134 | 153 | pde->proc_fops = &proc_system_sn_fops; | |
135 | sn_procfs_create_entry("licenseID", sgi_proc_dir, | 154 | pde = create_proc_entry("licenseID", 0444, sgi_proc_dir); |
136 | licenseID_open, single_release, NULL); | 155 | if (pde) |
137 | 156 | pde->proc_fops = &proc_license_id_fops; | |
138 | sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, | 157 | pde = create_proc_entry("sn_force_interrupt", 0644, sgi_proc_dir); |
139 | sn_force_interrupt_open, single_release, | 158 | if (pde) |
140 | sn_force_interrupt_write_proc); | 159 | pde->proc_fops = &proc_sn_force_intr_fops; |
141 | 160 | pde = create_proc_entry("coherence_id", 0444, sgi_proc_dir); | |
142 | sn_procfs_create_entry("coherence_id", sgi_proc_dir, | 161 | if (pde) |
143 | coherence_id_open, single_release, NULL); | 162 | pde->proc_fops = &proc_coherence_id_fops; |
144 | 163 | pde = create_proc_entry("sn_topology", 0444, sgi_proc_dir); | |
145 | sn_procfs_create_entry("sn_topology", sgi_proc_dir, | 164 | if (pde) |
146 | sn_topology_open, sn_topology_release, NULL); | 165 | pde->proc_fops = &proc_sn_topo_fops; |
147 | } | 166 | } |
148 | 167 | ||
149 | #endif /* CONFIG_PROC_FS */ | 168 | #endif /* CONFIG_PROC_FS */ |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index f383dab973f5..9740d6b8ae11 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -16,6 +16,10 @@ config GENERIC_ISA_DMA | |||
16 | bool | 16 | bool |
17 | default y | 17 | default y |
18 | 18 | ||
19 | config ZONE_DMA | ||
20 | bool | ||
21 | default y | ||
22 | |||
19 | config GENERIC_HARDIRQS | 23 | config GENERIC_HARDIRQS |
20 | bool | 24 | bool |
21 | default y | 25 | default y |
@@ -24,6 +28,9 @@ config GENERIC_IRQ_PROBE | |||
24 | bool | 28 | bool |
25 | default y | 29 | default y |
26 | 30 | ||
31 | config NO_IOPORT | ||
32 | def_bool y | ||
33 | |||
27 | source "init/Kconfig" | 34 | source "init/Kconfig" |
28 | 35 | ||
29 | 36 | ||
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index f219c47d334f..cdf63b210c53 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | LDFLAGS := | 8 | LDFLAGS := |
9 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 9 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
10 | LDFLAGS_vmlinux := -e startup_32 | 10 | LDFLAGS_vmlinux := |
11 | 11 | ||
12 | CFLAGS += -pipe -fno-schedule-insns | 12 | CFLAGS += -pipe -fno-schedule-insns |
13 | CFLAGS_KERNEL += -mmodel=medium | 13 | CFLAGS_KERNEL += -mmodel=medium |
diff --git a/arch/m32r/defconfig b/arch/m32r/defconfig index 853093093168..13579917afef 100644 --- a/arch/m32r/defconfig +++ b/arch/m32r/defconfig | |||
@@ -1,20 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:20:11 2005 | 4 | # Tue Dec 12 17:52:38 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | CONFIG_LOCK_KERNEL=y | 16 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 17 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
20 | 18 | ||
@@ -22,32 +20,40 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
22 | # General setup | 20 | # General setup |
23 | # | 21 | # |
24 | CONFIG_LOCALVERSION="" | 22 | CONFIG_LOCALVERSION="" |
23 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | CONFIG_SWAP=y | 24 | CONFIG_SWAP=y |
26 | CONFIG_SYSVIPC=y | 25 | CONFIG_SYSVIPC=y |
26 | # CONFIG_IPC_NS is not set | ||
27 | # CONFIG_POSIX_MQUEUE is not set | 27 | # CONFIG_POSIX_MQUEUE is not set |
28 | CONFIG_BSD_PROCESS_ACCT=y | 28 | CONFIG_BSD_PROCESS_ACCT=y |
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
30 | CONFIG_SYSCTL=y | 30 | # CONFIG_TASKSTATS is not set |
31 | # CONFIG_UTS_NS is not set | ||
31 | # CONFIG_AUDIT is not set | 32 | # CONFIG_AUDIT is not set |
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 33 | CONFIG_IKCONFIG=y |
35 | # CONFIG_IKCONFIG_PROC is not set | 34 | CONFIG_IKCONFIG_PROC=y |
35 | # CONFIG_CPUSETS is not set | ||
36 | CONFIG_SYSFS_DEPRECATED=y | ||
37 | # CONFIG_RELAY is not set | ||
38 | CONFIG_INITRAMFS_SOURCE="" | ||
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
40 | CONFIG_SYSCTL=y | ||
36 | CONFIG_EMBEDDED=y | 41 | CONFIG_EMBEDDED=y |
42 | CONFIG_SYSCTL_SYSCALL=y | ||
37 | # CONFIG_KALLSYMS is not set | 43 | # CONFIG_KALLSYMS is not set |
44 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_PRINTK=y | 45 | CONFIG_PRINTK=y |
39 | CONFIG_BUG=y | 46 | CONFIG_BUG=y |
47 | CONFIG_ELF_CORE=y | ||
40 | CONFIG_BASE_FULL=y | 48 | CONFIG_BASE_FULL=y |
41 | # CONFIG_FUTEX is not set | 49 | # CONFIG_FUTEX is not set |
42 | # CONFIG_EPOLL is not set | 50 | # CONFIG_EPOLL is not set |
43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
44 | CONFIG_SHMEM=y | 51 | CONFIG_SHMEM=y |
45 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 52 | CONFIG_SLAB=y |
46 | CONFIG_CC_ALIGN_LABELS=0 | 53 | CONFIG_VM_EVENT_COUNTERS=y |
47 | CONFIG_CC_ALIGN_LOOPS=0 | ||
48 | CONFIG_CC_ALIGN_JUMPS=0 | ||
49 | # CONFIG_TINY_SHMEM is not set | 54 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | 55 | CONFIG_BASE_SMALL=0 |
56 | # CONFIG_SLOB is not set | ||
51 | 57 | ||
52 | # | 58 | # |
53 | # Loadable module support | 59 | # Loadable module support |
@@ -55,10 +61,29 @@ CONFIG_BASE_SMALL=0 | |||
55 | CONFIG_MODULES=y | 61 | CONFIG_MODULES=y |
56 | CONFIG_MODULE_UNLOAD=y | 62 | CONFIG_MODULE_UNLOAD=y |
57 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 63 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
58 | CONFIG_OBSOLETE_MODPARM=y | ||
59 | # CONFIG_MODVERSIONS is not set | 64 | # CONFIG_MODVERSIONS is not set |
60 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 65 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
61 | CONFIG_KMOD=y | 66 | CONFIG_KMOD=y |
67 | CONFIG_STOP_MACHINE=y | ||
68 | |||
69 | # | ||
70 | # Block layer | ||
71 | # | ||
72 | CONFIG_BLOCK=y | ||
73 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
74 | |||
75 | # | ||
76 | # IO Schedulers | ||
77 | # | ||
78 | CONFIG_IOSCHED_NOOP=y | ||
79 | # CONFIG_IOSCHED_AS is not set | ||
80 | CONFIG_IOSCHED_DEADLINE=y | ||
81 | CONFIG_IOSCHED_CFQ=y | ||
82 | # CONFIG_DEFAULT_AS is not set | ||
83 | # CONFIG_DEFAULT_DEADLINE is not set | ||
84 | CONFIG_DEFAULT_CFQ=y | ||
85 | # CONFIG_DEFAULT_NOOP is not set | ||
86 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
62 | 87 | ||
63 | # | 88 | # |
64 | # Processor type and features | 89 | # Processor type and features |
@@ -70,8 +95,10 @@ CONFIG_PLAT_M32700UT=y | |||
70 | # CONFIG_PLAT_OAKS32R is not set | 95 | # CONFIG_PLAT_OAKS32R is not set |
71 | # CONFIG_PLAT_MAPPI2 is not set | 96 | # CONFIG_PLAT_MAPPI2 is not set |
72 | # CONFIG_PLAT_MAPPI3 is not set | 97 | # CONFIG_PLAT_MAPPI3 is not set |
98 | # CONFIG_PLAT_M32104UT is not set | ||
73 | CONFIG_CHIP_M32700=y | 99 | CONFIG_CHIP_M32700=y |
74 | # CONFIG_CHIP_M32102 is not set | 100 | # CONFIG_CHIP_M32102 is not set |
101 | # CONFIG_CHIP_M32104 is not set | ||
75 | # CONFIG_CHIP_VDEC2 is not set | 102 | # CONFIG_CHIP_VDEC2 is not set |
76 | # CONFIG_CHIP_OPSP is not set | 103 | # CONFIG_CHIP_OPSP is not set |
77 | CONFIG_MMU=y | 104 | CONFIG_MMU=y |
@@ -85,34 +112,39 @@ CONFIG_TIMER_DIVIDE=128 | |||
85 | CONFIG_MEMORY_START=0x08000000 | 112 | CONFIG_MEMORY_START=0x08000000 |
86 | CONFIG_MEMORY_SIZE=0x01000000 | 113 | CONFIG_MEMORY_SIZE=0x01000000 |
87 | CONFIG_NOHIGHMEM=y | 114 | CONFIG_NOHIGHMEM=y |
88 | # CONFIG_DISCONTIGMEM is not set | 115 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
116 | CONFIG_SELECT_MEMORY_MODEL=y | ||
117 | # CONFIG_FLATMEM_MANUAL is not set | ||
118 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
119 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
120 | CONFIG_DISCONTIGMEM=y | ||
121 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
122 | CONFIG_NEED_MULTIPLE_NODES=y | ||
123 | # CONFIG_SPARSEMEM_STATIC is not set | ||
124 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
125 | # CONFIG_RESOURCES_64BIT is not set | ||
126 | CONFIG_IRAM_START=0x00f00000 | ||
127 | CONFIG_IRAM_SIZE=0x00080000 | ||
89 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 128 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
90 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 129 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
130 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
131 | CONFIG_GENERIC_HWEIGHT=y | ||
91 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 132 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
92 | CONFIG_PREEMPT=y | 133 | CONFIG_PREEMPT=y |
93 | # CONFIG_HAVE_DEC_LOCK is not set | 134 | CONFIG_SMP=y |
94 | # CONFIG_SMP is not set | 135 | # CONFIG_CHIP_M32700_TS1 is not set |
136 | CONFIG_NR_CPUS=2 | ||
137 | CONFIG_NODES_SHIFT=1 | ||
95 | 138 | ||
96 | # | 139 | # |
97 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 140 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
98 | # | 141 | # |
99 | # CONFIG_PCI is not set | ||
100 | # CONFIG_ISA is not set | 142 | # CONFIG_ISA is not set |
101 | 143 | ||
102 | # | 144 | # |
103 | # PCCARD (PCMCIA/CardBus) support | 145 | # PCCARD (PCMCIA/CardBus) support |
104 | # | 146 | # |
105 | CONFIG_PCCARD=y | 147 | # CONFIG_PCCARD is not set |
106 | # CONFIG_PCMCIA_DEBUG is not set | ||
107 | CONFIG_PCMCIA=y | ||
108 | |||
109 | # | ||
110 | # PC-card bridges | ||
111 | # | ||
112 | # CONFIG_TCIC is not set | ||
113 | # CONFIG_M32R_PCC is not set | ||
114 | CONFIG_M32R_CFC=y | ||
115 | CONFIG_M32R_CFC_NUM=1 | ||
116 | 148 | ||
117 | # | 149 | # |
118 | # PCI Hotplug Support | 150 | # PCI Hotplug Support |
@@ -125,6 +157,94 @@ CONFIG_BINFMT_ELF=y | |||
125 | # CONFIG_BINFMT_MISC is not set | 157 | # CONFIG_BINFMT_MISC is not set |
126 | 158 | ||
127 | # | 159 | # |
160 | # Networking | ||
161 | # | ||
162 | CONFIG_NET=y | ||
163 | |||
164 | # | ||
165 | # Networking options | ||
166 | # | ||
167 | # CONFIG_NETDEBUG is not set | ||
168 | CONFIG_PACKET=y | ||
169 | # CONFIG_PACKET_MMAP is not set | ||
170 | CONFIG_UNIX=y | ||
171 | CONFIG_XFRM=y | ||
172 | # CONFIG_XFRM_USER is not set | ||
173 | # CONFIG_XFRM_SUB_POLICY is not set | ||
174 | # CONFIG_NET_KEY is not set | ||
175 | CONFIG_INET=y | ||
176 | # CONFIG_IP_MULTICAST is not set | ||
177 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
178 | CONFIG_IP_FIB_HASH=y | ||
179 | CONFIG_IP_PNP=y | ||
180 | CONFIG_IP_PNP_DHCP=y | ||
181 | # CONFIG_IP_PNP_BOOTP is not set | ||
182 | # CONFIG_IP_PNP_RARP is not set | ||
183 | # CONFIG_NET_IPIP is not set | ||
184 | # CONFIG_NET_IPGRE is not set | ||
185 | # CONFIG_ARPD is not set | ||
186 | # CONFIG_SYN_COOKIES is not set | ||
187 | # CONFIG_INET_AH is not set | ||
188 | # CONFIG_INET_ESP is not set | ||
189 | # CONFIG_INET_IPCOMP is not set | ||
190 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
191 | # CONFIG_INET_TUNNEL is not set | ||
192 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
193 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
194 | CONFIG_INET_XFRM_MODE_BEET=y | ||
195 | CONFIG_INET_DIAG=y | ||
196 | CONFIG_INET_TCP_DIAG=y | ||
197 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
198 | CONFIG_TCP_CONG_CUBIC=y | ||
199 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
200 | # CONFIG_TCP_MD5SIG is not set | ||
201 | # CONFIG_IPV6 is not set | ||
202 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
203 | # CONFIG_INET6_TUNNEL is not set | ||
204 | # CONFIG_NETWORK_SECMARK is not set | ||
205 | # CONFIG_NETFILTER is not set | ||
206 | |||
207 | # | ||
208 | # DCCP Configuration (EXPERIMENTAL) | ||
209 | # | ||
210 | # CONFIG_IP_DCCP is not set | ||
211 | |||
212 | # | ||
213 | # SCTP Configuration (EXPERIMENTAL) | ||
214 | # | ||
215 | # CONFIG_IP_SCTP is not set | ||
216 | |||
217 | # | ||
218 | # TIPC Configuration (EXPERIMENTAL) | ||
219 | # | ||
220 | # CONFIG_TIPC is not set | ||
221 | # CONFIG_ATM is not set | ||
222 | # CONFIG_BRIDGE is not set | ||
223 | # CONFIG_VLAN_8021Q is not set | ||
224 | # CONFIG_DECNET is not set | ||
225 | # CONFIG_LLC2 is not set | ||
226 | # CONFIG_IPX is not set | ||
227 | # CONFIG_ATALK is not set | ||
228 | # CONFIG_X25 is not set | ||
229 | # CONFIG_LAPB is not set | ||
230 | # CONFIG_ECONET is not set | ||
231 | # CONFIG_WAN_ROUTER is not set | ||
232 | |||
233 | # | ||
234 | # QoS and/or fair queueing | ||
235 | # | ||
236 | # CONFIG_NET_SCHED is not set | ||
237 | |||
238 | # | ||
239 | # Network testing | ||
240 | # | ||
241 | # CONFIG_NET_PKTGEN is not set | ||
242 | # CONFIG_HAMRADIO is not set | ||
243 | # CONFIG_IRDA is not set | ||
244 | # CONFIG_BT is not set | ||
245 | # CONFIG_IEEE80211 is not set | ||
246 | |||
247 | # | ||
128 | # Device Drivers | 248 | # Device Drivers |
129 | # | 249 | # |
130 | 250 | ||
@@ -133,12 +253,100 @@ CONFIG_BINFMT_ELF=y | |||
133 | # | 253 | # |
134 | CONFIG_STANDALONE=y | 254 | CONFIG_STANDALONE=y |
135 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 255 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
136 | # CONFIG_FW_LOADER is not set | 256 | CONFIG_FW_LOADER=y |
257 | # CONFIG_SYS_HYPERVISOR is not set | ||
258 | |||
259 | # | ||
260 | # Connector - unified userspace <-> kernelspace linker | ||
261 | # | ||
262 | # CONFIG_CONNECTOR is not set | ||
137 | 263 | ||
138 | # | 264 | # |
139 | # Memory Technology Devices (MTD) | 265 | # Memory Technology Devices (MTD) |
140 | # | 266 | # |
141 | # CONFIG_MTD is not set | 267 | CONFIG_MTD=y |
268 | # CONFIG_MTD_DEBUG is not set | ||
269 | # CONFIG_MTD_CONCAT is not set | ||
270 | CONFIG_MTD_PARTITIONS=y | ||
271 | CONFIG_MTD_REDBOOT_PARTS=y | ||
272 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
273 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
274 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
275 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
276 | |||
277 | # | ||
278 | # User Modules And Translation Layers | ||
279 | # | ||
280 | # CONFIG_MTD_CHAR is not set | ||
281 | CONFIG_MTD_BLOCK=y | ||
282 | # CONFIG_FTL is not set | ||
283 | # CONFIG_NFTL is not set | ||
284 | # CONFIG_INFTL is not set | ||
285 | # CONFIG_RFD_FTL is not set | ||
286 | # CONFIG_SSFDC is not set | ||
287 | |||
288 | # | ||
289 | # RAM/ROM/Flash chip drivers | ||
290 | # | ||
291 | CONFIG_MTD_CFI=m | ||
292 | CONFIG_MTD_JEDECPROBE=m | ||
293 | CONFIG_MTD_GEN_PROBE=m | ||
294 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
295 | # CONFIG_MTD_CFI_NOSWAP is not set | ||
296 | CONFIG_MTD_CFI_BE_BYTE_SWAP=y | ||
297 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
298 | CONFIG_MTD_CFI_GEOMETRY=y | ||
299 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
300 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
301 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
302 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
303 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
304 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
305 | CONFIG_MTD_CFI_I1=y | ||
306 | # CONFIG_MTD_CFI_I2 is not set | ||
307 | # CONFIG_MTD_CFI_I4 is not set | ||
308 | # CONFIG_MTD_CFI_I8 is not set | ||
309 | # CONFIG_MTD_OTP is not set | ||
310 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
311 | CONFIG_MTD_CFI_AMDSTD=m | ||
312 | # CONFIG_MTD_CFI_STAA is not set | ||
313 | CONFIG_MTD_CFI_UTIL=m | ||
314 | # CONFIG_MTD_RAM is not set | ||
315 | # CONFIG_MTD_ROM is not set | ||
316 | # CONFIG_MTD_ABSENT is not set | ||
317 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
318 | |||
319 | # | ||
320 | # Mapping drivers for chip access | ||
321 | # | ||
322 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
323 | # CONFIG_MTD_PHYSMAP is not set | ||
324 | # CONFIG_MTD_PLATRAM is not set | ||
325 | |||
326 | # | ||
327 | # Self-contained MTD device drivers | ||
328 | # | ||
329 | # CONFIG_MTD_SLRAM is not set | ||
330 | # CONFIG_MTD_PHRAM is not set | ||
331 | # CONFIG_MTD_MTDRAM is not set | ||
332 | # CONFIG_MTD_BLOCK2MTD is not set | ||
333 | |||
334 | # | ||
335 | # Disk-On-Chip Device Drivers | ||
336 | # | ||
337 | # CONFIG_MTD_DOC2000 is not set | ||
338 | # CONFIG_MTD_DOC2001 is not set | ||
339 | # CONFIG_MTD_DOC2001PLUS is not set | ||
340 | |||
341 | # | ||
342 | # NAND Flash Device Drivers | ||
343 | # | ||
344 | # CONFIG_MTD_NAND is not set | ||
345 | |||
346 | # | ||
347 | # OneNAND Flash Device Drivers | ||
348 | # | ||
349 | # CONFIG_MTD_ONENAND is not set | ||
142 | 350 | ||
143 | # | 351 | # |
144 | # Parallel port support | 352 | # Parallel port support |
@@ -152,7 +360,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
152 | # | 360 | # |
153 | # Block devices | 361 | # Block devices |
154 | # | 362 | # |
155 | # CONFIG_BLK_DEV_FD is not set | ||
156 | # CONFIG_BLK_DEV_COW_COMMON is not set | 363 | # CONFIG_BLK_DEV_COW_COMMON is not set |
157 | CONFIG_BLK_DEV_LOOP=y | 364 | CONFIG_BLK_DEV_LOOP=y |
158 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 365 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -160,23 +367,21 @@ CONFIG_BLK_DEV_NBD=y | |||
160 | CONFIG_BLK_DEV_RAM=y | 367 | CONFIG_BLK_DEV_RAM=y |
161 | CONFIG_BLK_DEV_RAM_COUNT=16 | 368 | CONFIG_BLK_DEV_RAM_COUNT=16 |
162 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 369 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
370 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
163 | # CONFIG_BLK_DEV_INITRD is not set | 371 | # CONFIG_BLK_DEV_INITRD is not set |
164 | CONFIG_INITRAMFS_SOURCE="" | ||
165 | # CONFIG_CDROM_PKTCDVD is not set | 372 | # CONFIG_CDROM_PKTCDVD is not set |
373 | CONFIG_ATA_OVER_ETH=m | ||
166 | 374 | ||
167 | # | 375 | # |
168 | # IO Schedulers | 376 | # Misc devices |
169 | # | 377 | # |
170 | CONFIG_IOSCHED_NOOP=y | 378 | # CONFIG_TIFM_CORE is not set |
171 | # CONFIG_IOSCHED_AS is not set | ||
172 | CONFIG_IOSCHED_DEADLINE=y | ||
173 | CONFIG_IOSCHED_CFQ=y | ||
174 | # CONFIG_ATA_OVER_ETH is not set | ||
175 | 379 | ||
176 | # | 380 | # |
177 | # ATA/ATAPI/MFM/RLL support | 381 | # ATA/ATAPI/MFM/RLL support |
178 | # | 382 | # |
179 | CONFIG_IDE=y | 383 | CONFIG_IDE=y |
384 | CONFIG_IDE_MAX_HWIFS=4 | ||
180 | CONFIG_BLK_DEV_IDE=y | 385 | CONFIG_BLK_DEV_IDE=y |
181 | 386 | ||
182 | # | 387 | # |
@@ -185,7 +390,6 @@ CONFIG_BLK_DEV_IDE=y | |||
185 | # CONFIG_BLK_DEV_IDE_SATA is not set | 390 | # CONFIG_BLK_DEV_IDE_SATA is not set |
186 | CONFIG_BLK_DEV_IDEDISK=y | 391 | CONFIG_BLK_DEV_IDEDISK=y |
187 | # CONFIG_IDEDISK_MULTI_MODE is not set | 392 | # CONFIG_IDEDISK_MULTI_MODE is not set |
188 | CONFIG_BLK_DEV_IDECS=y | ||
189 | CONFIG_BLK_DEV_IDECD=m | 393 | CONFIG_BLK_DEV_IDECD=m |
190 | # CONFIG_BLK_DEV_IDETAPE is not set | 394 | # CONFIG_BLK_DEV_IDETAPE is not set |
191 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | 395 | # CONFIG_BLK_DEV_IDEFLOPPY is not set |
@@ -204,7 +408,9 @@ CONFIG_IDE_GENERIC=y | |||
204 | # | 408 | # |
205 | # SCSI device support | 409 | # SCSI device support |
206 | # | 410 | # |
411 | # CONFIG_RAID_ATTRS is not set | ||
207 | CONFIG_SCSI=m | 412 | CONFIG_SCSI=m |
413 | # CONFIG_SCSI_NETLINK is not set | ||
208 | CONFIG_SCSI_PROC_FS=y | 414 | CONFIG_SCSI_PROC_FS=y |
209 | 415 | ||
210 | # | 416 | # |
@@ -216,6 +422,7 @@ CONFIG_BLK_DEV_SD=m | |||
216 | CONFIG_BLK_DEV_SR=m | 422 | CONFIG_BLK_DEV_SR=m |
217 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 423 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
218 | CONFIG_CHR_DEV_SG=m | 424 | CONFIG_CHR_DEV_SG=m |
425 | # CONFIG_CHR_DEV_SCH is not set | ||
219 | 426 | ||
220 | # | 427 | # |
221 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | 428 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs |
@@ -225,26 +432,23 @@ CONFIG_SCSI_MULTI_LUN=y | |||
225 | # CONFIG_SCSI_LOGGING is not set | 432 | # CONFIG_SCSI_LOGGING is not set |
226 | 433 | ||
227 | # | 434 | # |
228 | # SCSI Transport Attributes | 435 | # SCSI Transports |
229 | # | 436 | # |
230 | # CONFIG_SCSI_SPI_ATTRS is not set | 437 | # CONFIG_SCSI_SPI_ATTRS is not set |
231 | # CONFIG_SCSI_FC_ATTRS is not set | 438 | # CONFIG_SCSI_FC_ATTRS is not set |
232 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 439 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
440 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
441 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
233 | 442 | ||
234 | # | 443 | # |
235 | # SCSI low-level drivers | 444 | # SCSI low-level drivers |
236 | # | 445 | # |
237 | # CONFIG_SCSI_SATA is not set | 446 | # CONFIG_ISCSI_TCP is not set |
238 | # CONFIG_SCSI_DEBUG is not set | 447 | # CONFIG_SCSI_DEBUG is not set |
239 | 448 | ||
240 | # | 449 | # |
241 | # PCMCIA SCSI adapter support | 450 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
242 | # | 451 | # |
243 | # CONFIG_PCMCIA_AHA152X is not set | ||
244 | # CONFIG_PCMCIA_FDOMAIN is not set | ||
245 | # CONFIG_PCMCIA_NINJA_SCSI is not set | ||
246 | # CONFIG_PCMCIA_QLOGIC is not set | ||
247 | # CONFIG_PCMCIA_SYM53C500 is not set | ||
248 | 452 | ||
249 | # | 453 | # |
250 | # Multi-device support (RAID and LVM) | 454 | # Multi-device support (RAID and LVM) |
@@ -254,6 +458,7 @@ CONFIG_SCSI_MULTI_LUN=y | |||
254 | # | 458 | # |
255 | # Fusion MPT device support | 459 | # Fusion MPT device support |
256 | # | 460 | # |
461 | # CONFIG_FUSION is not set | ||
257 | 462 | ||
258 | # | 463 | # |
259 | # IEEE 1394 (FireWire) support | 464 | # IEEE 1394 (FireWire) support |
@@ -264,69 +469,8 @@ CONFIG_SCSI_MULTI_LUN=y | |||
264 | # | 469 | # |
265 | 470 | ||
266 | # | 471 | # |
267 | # Networking support | 472 | # Network device support |
268 | # | ||
269 | CONFIG_NET=y | ||
270 | |||
271 | # | ||
272 | # Networking options | ||
273 | # | ||
274 | CONFIG_PACKET=y | ||
275 | # CONFIG_PACKET_MMAP is not set | ||
276 | CONFIG_UNIX=y | ||
277 | # CONFIG_NET_KEY is not set | ||
278 | CONFIG_INET=y | ||
279 | # CONFIG_IP_MULTICAST is not set | ||
280 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
281 | CONFIG_IP_PNP=y | ||
282 | CONFIG_IP_PNP_DHCP=y | ||
283 | # CONFIG_IP_PNP_BOOTP is not set | ||
284 | # CONFIG_IP_PNP_RARP is not set | ||
285 | # CONFIG_NET_IPIP is not set | ||
286 | # CONFIG_NET_IPGRE is not set | ||
287 | # CONFIG_ARPD is not set | ||
288 | # CONFIG_SYN_COOKIES is not set | ||
289 | # CONFIG_INET_AH is not set | ||
290 | # CONFIG_INET_ESP is not set | ||
291 | # CONFIG_INET_IPCOMP is not set | ||
292 | # CONFIG_INET_TUNNEL is not set | ||
293 | CONFIG_IP_TCPDIAG=y | ||
294 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
295 | # CONFIG_IPV6 is not set | ||
296 | # CONFIG_NETFILTER is not set | ||
297 | |||
298 | # | ||
299 | # SCTP Configuration (EXPERIMENTAL) | ||
300 | # | ||
301 | # CONFIG_IP_SCTP is not set | ||
302 | # CONFIG_ATM is not set | ||
303 | # CONFIG_BRIDGE is not set | ||
304 | # CONFIG_VLAN_8021Q is not set | ||
305 | # CONFIG_DECNET is not set | ||
306 | # CONFIG_LLC2 is not set | ||
307 | # CONFIG_IPX is not set | ||
308 | # CONFIG_ATALK is not set | ||
309 | # CONFIG_X25 is not set | ||
310 | # CONFIG_LAPB is not set | ||
311 | # CONFIG_NET_DIVERT is not set | ||
312 | # CONFIG_ECONET is not set | ||
313 | # CONFIG_WAN_ROUTER is not set | ||
314 | |||
315 | # | ||
316 | # QoS and/or fair queueing | ||
317 | # | ||
318 | # CONFIG_NET_SCHED is not set | ||
319 | # CONFIG_NET_CLS_ROUTE is not set | ||
320 | |||
321 | # | ||
322 | # Network testing | ||
323 | # | 473 | # |
324 | # CONFIG_NET_PKTGEN is not set | ||
325 | # CONFIG_NETPOLL is not set | ||
326 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
327 | # CONFIG_HAMRADIO is not set | ||
328 | # CONFIG_IRDA is not set | ||
329 | # CONFIG_BT is not set | ||
330 | CONFIG_NETDEVICES=y | 474 | CONFIG_NETDEVICES=y |
331 | # CONFIG_DUMMY is not set | 475 | # CONFIG_DUMMY is not set |
332 | # CONFIG_BONDING is not set | 476 | # CONFIG_BONDING is not set |
@@ -334,6 +478,11 @@ CONFIG_NETDEVICES=y | |||
334 | # CONFIG_TUN is not set | 478 | # CONFIG_TUN is not set |
335 | 479 | ||
336 | # | 480 | # |
481 | # PHY device support | ||
482 | # | ||
483 | # CONFIG_PHYLIB is not set | ||
484 | |||
485 | # | ||
337 | # Ethernet (10 or 100Mbit) | 486 | # Ethernet (10 or 100Mbit) |
338 | # | 487 | # |
339 | CONFIG_NET_ETHERNET=y | 488 | CONFIG_NET_ETHERNET=y |
@@ -359,11 +508,6 @@ CONFIG_SMC91X=y | |||
359 | # CONFIG_NET_RADIO is not set | 508 | # CONFIG_NET_RADIO is not set |
360 | 509 | ||
361 | # | 510 | # |
362 | # PCMCIA network device support | ||
363 | # | ||
364 | # CONFIG_NET_PCMCIA is not set | ||
365 | |||
366 | # | ||
367 | # Wan interfaces | 511 | # Wan interfaces |
368 | # | 512 | # |
369 | # CONFIG_WAN is not set | 513 | # CONFIG_WAN is not set |
@@ -371,6 +515,8 @@ CONFIG_SMC91X=y | |||
371 | # CONFIG_SLIP is not set | 515 | # CONFIG_SLIP is not set |
372 | # CONFIG_SHAPER is not set | 516 | # CONFIG_SHAPER is not set |
373 | # CONFIG_NETCONSOLE is not set | 517 | # CONFIG_NETCONSOLE is not set |
518 | # CONFIG_NETPOLL is not set | ||
519 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
374 | 520 | ||
375 | # | 521 | # |
376 | # ISDN subsystem | 522 | # ISDN subsystem |
@@ -386,6 +532,7 @@ CONFIG_SMC91X=y | |||
386 | # Input device support | 532 | # Input device support |
387 | # | 533 | # |
388 | CONFIG_INPUT=y | 534 | CONFIG_INPUT=y |
535 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
389 | 536 | ||
390 | # | 537 | # |
391 | # Userland interfaces | 538 | # Userland interfaces |
@@ -414,7 +561,6 @@ CONFIG_SERIO_SERPORT=y | |||
414 | # CONFIG_SERIO_LIBPS2 is not set | 561 | # CONFIG_SERIO_LIBPS2 is not set |
415 | # CONFIG_SERIO_RAW is not set | 562 | # CONFIG_SERIO_RAW is not set |
416 | # CONFIG_GAMEPORT is not set | 563 | # CONFIG_GAMEPORT is not set |
417 | CONFIG_SOUND_GAMEPORT=y | ||
418 | 564 | ||
419 | # | 565 | # |
420 | # Character devices | 566 | # Character devices |
@@ -422,6 +568,7 @@ CONFIG_SOUND_GAMEPORT=y | |||
422 | CONFIG_VT=y | 568 | CONFIG_VT=y |
423 | CONFIG_VT_CONSOLE=y | 569 | CONFIG_VT_CONSOLE=y |
424 | CONFIG_HW_CONSOLE=y | 570 | CONFIG_HW_CONSOLE=y |
571 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
425 | # CONFIG_SERIAL_NONSTANDARD is not set | 572 | # CONFIG_SERIAL_NONSTANDARD is not set |
426 | 573 | ||
427 | # | 574 | # |
@@ -450,8 +597,8 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
450 | # Watchdog Cards | 597 | # Watchdog Cards |
451 | # | 598 | # |
452 | # CONFIG_WATCHDOG is not set | 599 | # CONFIG_WATCHDOG is not set |
600 | CONFIG_HW_RANDOM=y | ||
453 | # CONFIG_RTC is not set | 601 | # CONFIG_RTC is not set |
454 | # CONFIG_GEN_RTC is not set | ||
455 | CONFIG_DS1302=y | 602 | CONFIG_DS1302=y |
456 | # CONFIG_DTLK is not set | 603 | # CONFIG_DTLK is not set |
457 | # CONFIG_R3964 is not set | 604 | # CONFIG_R3964 is not set |
@@ -459,17 +606,12 @@ CONFIG_DS1302=y | |||
459 | # | 606 | # |
460 | # Ftape, the floppy tape device driver | 607 | # Ftape, the floppy tape device driver |
461 | # | 608 | # |
462 | # CONFIG_DRM is not set | ||
463 | |||
464 | # | ||
465 | # PCMCIA character devices | ||
466 | # | ||
467 | # CONFIG_SYNCLINK_CS is not set | ||
468 | # CONFIG_RAW_DRIVER is not set | 609 | # CONFIG_RAW_DRIVER is not set |
469 | 610 | ||
470 | # | 611 | # |
471 | # TPM devices | 612 | # TPM devices |
472 | # | 613 | # |
614 | # CONFIG_TCG_TPM is not set | ||
473 | 615 | ||
474 | # | 616 | # |
475 | # I2C support | 617 | # I2C support |
@@ -477,34 +619,51 @@ CONFIG_DS1302=y | |||
477 | # CONFIG_I2C is not set | 619 | # CONFIG_I2C is not set |
478 | 620 | ||
479 | # | 621 | # |
622 | # SPI support | ||
623 | # | ||
624 | # CONFIG_SPI is not set | ||
625 | # CONFIG_SPI_MASTER is not set | ||
626 | |||
627 | # | ||
480 | # Dallas's 1-wire bus | 628 | # Dallas's 1-wire bus |
481 | # | 629 | # |
482 | # CONFIG_W1 is not set | 630 | # CONFIG_W1 is not set |
483 | 631 | ||
484 | # | 632 | # |
485 | # Misc devices | 633 | # Hardware Monitoring support |
486 | # | 634 | # |
635 | CONFIG_HWMON=y | ||
636 | # CONFIG_HWMON_VID is not set | ||
637 | # CONFIG_SENSORS_ABITUGURU is not set | ||
638 | # CONFIG_SENSORS_F71805F is not set | ||
639 | # CONFIG_SENSORS_VT1211 is not set | ||
640 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
487 | 641 | ||
488 | # | 642 | # |
489 | # Multimedia devices | 643 | # Multimedia devices |
490 | # | 644 | # |
491 | CONFIG_VIDEO_DEV=y | 645 | CONFIG_VIDEO_DEV=m |
646 | CONFIG_VIDEO_V4L1=y | ||
647 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
648 | CONFIG_VIDEO_V4L2=y | ||
492 | 649 | ||
493 | # | 650 | # |
494 | # Video For Linux | 651 | # Video Capture Adapters |
495 | # | 652 | # |
496 | 653 | ||
497 | # | 654 | # |
498 | # Video Adapters | 655 | # Video Capture Adapters |
499 | # | 656 | # |
657 | # CONFIG_VIDEO_ADV_DEBUG is not set | ||
658 | CONFIG_VIDEO_HELPER_CHIPS_AUTO=y | ||
659 | # CONFIG_VIDEO_VIVI is not set | ||
500 | # CONFIG_VIDEO_CPIA is not set | 660 | # CONFIG_VIDEO_CPIA is not set |
501 | CONFIG_VIDEO_M32R_AR=y | 661 | CONFIG_VIDEO_M32R_AR=m |
502 | CONFIG_VIDEO_M32R_AR_M64278=y | 662 | CONFIG_VIDEO_M32R_AR_M64278=m |
503 | 663 | ||
504 | # | 664 | # |
505 | # Radio Adapters | 665 | # Radio Adapters |
506 | # | 666 | # |
507 | # CONFIG_RADIO_MAESTRO is not set | ||
508 | 667 | ||
509 | # | 668 | # |
510 | # Digital Video Broadcasting Devices | 669 | # Digital Video Broadcasting Devices |
@@ -514,15 +673,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y | |||
514 | # | 673 | # |
515 | # Graphics support | 674 | # Graphics support |
516 | # | 675 | # |
676 | CONFIG_FIRMWARE_EDID=y | ||
517 | CONFIG_FB=y | 677 | CONFIG_FB=y |
518 | # CONFIG_FB_CFB_FILLRECT is not set | 678 | CONFIG_FB_CFB_FILLRECT=y |
519 | # CONFIG_FB_CFB_COPYAREA is not set | 679 | CONFIG_FB_CFB_COPYAREA=y |
520 | # CONFIG_FB_CFB_IMAGEBLIT is not set | 680 | CONFIG_FB_CFB_IMAGEBLIT=y |
521 | # CONFIG_FB_SOFT_CURSOR is not set | ||
522 | # CONFIG_FB_MACMODES is not set | 681 | # CONFIG_FB_MACMODES is not set |
682 | # CONFIG_FB_BACKLIGHT is not set | ||
523 | # CONFIG_FB_MODE_HELPERS is not set | 683 | # CONFIG_FB_MODE_HELPERS is not set |
524 | # CONFIG_FB_TILEBLITTING is not set | 684 | # CONFIG_FB_TILEBLITTING is not set |
525 | # CONFIG_FB_S1D13XXX is not set | 685 | CONFIG_FB_S1D13XXX=y |
526 | # CONFIG_FB_VIRTUAL is not set | 686 | # CONFIG_FB_VIRTUAL is not set |
527 | 687 | ||
528 | # | 688 | # |
@@ -531,6 +691,7 @@ CONFIG_FB=y | |||
531 | # CONFIG_VGA_CONSOLE is not set | 691 | # CONFIG_VGA_CONSOLE is not set |
532 | CONFIG_DUMMY_CONSOLE=y | 692 | CONFIG_DUMMY_CONSOLE=y |
533 | CONFIG_FRAMEBUFFER_CONSOLE=y | 693 | CONFIG_FRAMEBUFFER_CONSOLE=y |
694 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
534 | # CONFIG_FONTS is not set | 695 | # CONFIG_FONTS is not set |
535 | CONFIG_FONT_8x8=y | 696 | CONFIG_FONT_8x8=y |
536 | CONFIG_FONT_8x16=y | 697 | CONFIG_FONT_8x16=y |
@@ -542,6 +703,7 @@ CONFIG_LOGO=y | |||
542 | CONFIG_LOGO_LINUX_MONO=y | 703 | CONFIG_LOGO_LINUX_MONO=y |
543 | CONFIG_LOGO_LINUX_VGA16=y | 704 | CONFIG_LOGO_LINUX_VGA16=y |
544 | CONFIG_LOGO_LINUX_CLUT224=y | 705 | CONFIG_LOGO_LINUX_CLUT224=y |
706 | CONFIG_LOGO_M32R_CLUT224=y | ||
545 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 707 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
546 | 708 | ||
547 | # | 709 | # |
@@ -554,6 +716,11 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
554 | # | 716 | # |
555 | # CONFIG_USB_ARCH_HAS_HCD is not set | 717 | # CONFIG_USB_ARCH_HAS_HCD is not set |
556 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 718 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
719 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
720 | |||
721 | # | ||
722 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
723 | # | ||
557 | 724 | ||
558 | # | 725 | # |
559 | # USB Gadget Support | 726 | # USB Gadget Support |
@@ -563,23 +730,62 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
563 | # | 730 | # |
564 | # MMC/SD Card support | 731 | # MMC/SD Card support |
565 | # | 732 | # |
566 | # CONFIG_MMC is not set | 733 | CONFIG_MMC=y |
734 | CONFIG_MMC_DEBUG=y | ||
735 | CONFIG_MMC_BLOCK=y | ||
736 | # CONFIG_MMC_TIFM_SD is not set | ||
737 | |||
738 | # | ||
739 | # LED devices | ||
740 | # | ||
741 | # CONFIG_NEW_LEDS is not set | ||
742 | |||
743 | # | ||
744 | # LED drivers | ||
745 | # | ||
746 | |||
747 | # | ||
748 | # LED Triggers | ||
749 | # | ||
567 | 750 | ||
568 | # | 751 | # |
569 | # InfiniBand support | 752 | # InfiniBand support |
570 | # | 753 | # |
571 | # CONFIG_INFINIBAND is not set | 754 | |
755 | # | ||
756 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
757 | # | ||
758 | |||
759 | # | ||
760 | # Real Time Clock | ||
761 | # | ||
762 | # CONFIG_RTC_CLASS is not set | ||
763 | |||
764 | # | ||
765 | # DMA Engine support | ||
766 | # | ||
767 | # CONFIG_DMA_ENGINE is not set | ||
768 | |||
769 | # | ||
770 | # DMA Clients | ||
771 | # | ||
772 | |||
773 | # | ||
774 | # DMA Devices | ||
775 | # | ||
572 | 776 | ||
573 | # | 777 | # |
574 | # File systems | 778 | # File systems |
575 | # | 779 | # |
576 | CONFIG_EXT2_FS=y | 780 | CONFIG_EXT2_FS=y |
577 | # CONFIG_EXT2_FS_XATTR is not set | 781 | # CONFIG_EXT2_FS_XATTR is not set |
578 | CONFIG_EXT3_FS=m | 782 | # CONFIG_EXT2_FS_XIP is not set |
783 | CONFIG_EXT3_FS=y | ||
579 | CONFIG_EXT3_FS_XATTR=y | 784 | CONFIG_EXT3_FS_XATTR=y |
580 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 785 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
581 | # CONFIG_EXT3_FS_SECURITY is not set | 786 | # CONFIG_EXT3_FS_SECURITY is not set |
582 | CONFIG_JBD=m | 787 | # CONFIG_EXT4DEV_FS is not set |
788 | CONFIG_JBD=y | ||
583 | CONFIG_JBD_DEBUG=y | 789 | CONFIG_JBD_DEBUG=y |
584 | CONFIG_FS_MBCACHE=y | 790 | CONFIG_FS_MBCACHE=y |
585 | CONFIG_REISERFS_FS=m | 791 | CONFIG_REISERFS_FS=m |
@@ -587,17 +793,19 @@ CONFIG_REISERFS_FS=m | |||
587 | # CONFIG_REISERFS_PROC_INFO is not set | 793 | # CONFIG_REISERFS_PROC_INFO is not set |
588 | # CONFIG_REISERFS_FS_XATTR is not set | 794 | # CONFIG_REISERFS_FS_XATTR is not set |
589 | # CONFIG_JFS_FS is not set | 795 | # CONFIG_JFS_FS is not set |
590 | 796 | # CONFIG_FS_POSIX_ACL is not set | |
591 | # | ||
592 | # XFS support | ||
593 | # | ||
594 | # CONFIG_XFS_FS is not set | 797 | # CONFIG_XFS_FS is not set |
798 | # CONFIG_GFS2_FS is not set | ||
799 | # CONFIG_OCFS2_FS is not set | ||
595 | # CONFIG_MINIX_FS is not set | 800 | # CONFIG_MINIX_FS is not set |
596 | # CONFIG_ROMFS_FS is not set | 801 | # CONFIG_ROMFS_FS is not set |
802 | CONFIG_INOTIFY=y | ||
803 | CONFIG_INOTIFY_USER=y | ||
597 | # CONFIG_QUOTA is not set | 804 | # CONFIG_QUOTA is not set |
598 | CONFIG_DNOTIFY=y | 805 | CONFIG_DNOTIFY=y |
599 | # CONFIG_AUTOFS_FS is not set | 806 | # CONFIG_AUTOFS_FS is not set |
600 | # CONFIG_AUTOFS4_FS is not set | 807 | # CONFIG_AUTOFS4_FS is not set |
808 | # CONFIG_FUSE_FS is not set | ||
601 | 809 | ||
602 | # | 810 | # |
603 | # CD-ROM/DVD Filesystems | 811 | # CD-ROM/DVD Filesystems |
@@ -623,15 +831,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
623 | # | 831 | # |
624 | CONFIG_PROC_FS=y | 832 | CONFIG_PROC_FS=y |
625 | CONFIG_PROC_KCORE=y | 833 | CONFIG_PROC_KCORE=y |
834 | CONFIG_PROC_SYSCTL=y | ||
626 | CONFIG_SYSFS=y | 835 | CONFIG_SYSFS=y |
627 | CONFIG_DEVFS_FS=y | ||
628 | CONFIG_DEVFS_MOUNT=y | ||
629 | # CONFIG_DEVFS_DEBUG is not set | ||
630 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
631 | CONFIG_TMPFS=y | 836 | CONFIG_TMPFS=y |
632 | # CONFIG_TMPFS_XATTR is not set | 837 | # CONFIG_TMPFS_POSIX_ACL is not set |
633 | # CONFIG_HUGETLB_PAGE is not set | 838 | # CONFIG_HUGETLB_PAGE is not set |
634 | CONFIG_RAMFS=y | 839 | CONFIG_RAMFS=y |
840 | # CONFIG_CONFIGFS_FS is not set | ||
635 | 841 | ||
636 | # | 842 | # |
637 | # Miscellaneous filesystems | 843 | # Miscellaneous filesystems |
@@ -643,6 +849,8 @@ CONFIG_RAMFS=y | |||
643 | # CONFIG_BEFS_FS is not set | 849 | # CONFIG_BEFS_FS is not set |
644 | # CONFIG_BFS_FS is not set | 850 | # CONFIG_BFS_FS is not set |
645 | # CONFIG_EFS_FS is not set | 851 | # CONFIG_EFS_FS is not set |
852 | # CONFIG_JFFS_FS is not set | ||
853 | # CONFIG_JFFS2_FS is not set | ||
646 | # CONFIG_CRAMFS is not set | 854 | # CONFIG_CRAMFS is not set |
647 | # CONFIG_VXFS_FS is not set | 855 | # CONFIG_VXFS_FS is not set |
648 | # CONFIG_HPFS_FS is not set | 856 | # CONFIG_HPFS_FS is not set |
@@ -655,12 +863,14 @@ CONFIG_RAMFS=y | |||
655 | # | 863 | # |
656 | CONFIG_NFS_FS=y | 864 | CONFIG_NFS_FS=y |
657 | CONFIG_NFS_V3=y | 865 | CONFIG_NFS_V3=y |
866 | # CONFIG_NFS_V3_ACL is not set | ||
658 | # CONFIG_NFS_V4 is not set | 867 | # CONFIG_NFS_V4 is not set |
659 | # CONFIG_NFS_DIRECTIO is not set | 868 | # CONFIG_NFS_DIRECTIO is not set |
660 | # CONFIG_NFSD is not set | 869 | # CONFIG_NFSD is not set |
661 | CONFIG_ROOT_NFS=y | 870 | CONFIG_ROOT_NFS=y |
662 | CONFIG_LOCKD=y | 871 | CONFIG_LOCKD=y |
663 | CONFIG_LOCKD_V4=y | 872 | CONFIG_LOCKD_V4=y |
873 | CONFIG_NFS_COMMON=y | ||
664 | CONFIG_SUNRPC=y | 874 | CONFIG_SUNRPC=y |
665 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 875 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
666 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 876 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -669,6 +879,7 @@ CONFIG_SUNRPC=y | |||
669 | # CONFIG_NCP_FS is not set | 879 | # CONFIG_NCP_FS is not set |
670 | # CONFIG_CODA_FS is not set | 880 | # CONFIG_CODA_FS is not set |
671 | # CONFIG_AFS_FS is not set | 881 | # CONFIG_AFS_FS is not set |
882 | # CONFIG_9P_FS is not set | ||
672 | 883 | ||
673 | # | 884 | # |
674 | # Partition Types | 885 | # Partition Types |
@@ -723,16 +934,23 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
723 | # | 934 | # |
724 | # Profiling support | 935 | # Profiling support |
725 | # | 936 | # |
726 | # CONFIG_PROFILING is not set | 937 | CONFIG_PROFILING=y |
938 | CONFIG_OPROFILE=y | ||
727 | 939 | ||
728 | # | 940 | # |
729 | # Kernel hacking | 941 | # Kernel hacking |
730 | # | 942 | # |
731 | # CONFIG_PRINTK_TIME is not set | 943 | # CONFIG_PRINTK_TIME is not set |
944 | CONFIG_ENABLE_MUST_CHECK=y | ||
945 | # CONFIG_MAGIC_SYSRQ is not set | ||
946 | # CONFIG_UNUSED_SYMBOLS is not set | ||
732 | # CONFIG_DEBUG_KERNEL is not set | 947 | # CONFIG_DEBUG_KERNEL is not set |
733 | CONFIG_LOG_BUF_SHIFT=14 | 948 | CONFIG_LOG_BUF_SHIFT=15 |
734 | # CONFIG_DEBUG_BUGVERBOSE is not set | 949 | # CONFIG_DEBUG_BUGVERBOSE is not set |
950 | # CONFIG_DEBUG_FS is not set | ||
735 | # CONFIG_FRAME_POINTER is not set | 951 | # CONFIG_FRAME_POINTER is not set |
952 | # CONFIG_UNWIND_INFO is not set | ||
953 | # CONFIG_HEADERS_CHECK is not set | ||
736 | 954 | ||
737 | # | 955 | # |
738 | # Security options | 956 | # Security options |
@@ -746,12 +964,9 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
746 | # CONFIG_CRYPTO is not set | 964 | # CONFIG_CRYPTO is not set |
747 | 965 | ||
748 | # | 966 | # |
749 | # Hardware crypto devices | ||
750 | # | ||
751 | |||
752 | # | ||
753 | # Library routines | 967 | # Library routines |
754 | # | 968 | # |
755 | # CONFIG_CRC_CCITT is not set | 969 | # CONFIG_CRC_CCITT is not set |
970 | # CONFIG_CRC16 is not set | ||
756 | CONFIG_CRC32=y | 971 | CONFIG_CRC32=y |
757 | # CONFIG_LIBCRC32C is not set | 972 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S index 0d3c8ee0e03d..dab7436d7bbe 100644 --- a/arch/m32r/kernel/head.S +++ b/arch/m32r/kernel/head.S | |||
@@ -7,8 +7,6 @@ | |||
7 | * Hitoshi Yamamoto | 7 | * Hitoshi Yamamoto |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* $Id$ */ | ||
11 | |||
12 | #include <linux/init.h> | 10 | #include <linux/init.h> |
13 | __INIT | 11 | __INIT |
14 | __INITDATA | 12 | __INITDATA |
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 44cbe0ce0f8f..a689e2978b6e 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -174,7 +174,7 @@ void show_regs(struct pt_regs * regs) | |||
174 | regs->acc1h, regs->acc1l); | 174 | regs->acc1h, regs->acc1l); |
175 | #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) | 175 | #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) |
176 | printk("ACCH[%08lx]:ACCL[%08lx]\n", \ | 176 | printk("ACCH[%08lx]:ACCL[%08lx]\n", \ |
177 | regs->acch, regs->accl); | 177 | regs->acc0h, regs->acc0l); |
178 | #else | 178 | #else |
179 | #error unknown isa configuration | 179 | #error unknown isa configuration |
180 | #endif | 180 | #endif |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 092ea86bb079..4b156054baa6 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -109,19 +109,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, | |||
109 | COPY(r10); | 109 | COPY(r10); |
110 | COPY(r11); | 110 | COPY(r11); |
111 | COPY(r12); | 111 | COPY(r12); |
112 | #if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) | ||
113 | COPY(acc0h); | 112 | COPY(acc0h); |
114 | COPY(acc0l); | 113 | COPY(acc0l); |
115 | COPY(acc1h); | 114 | COPY(acc1h); /* ISA_DSP_LEVEL2 only */ |
116 | COPY(acc1l); | 115 | COPY(acc1l); /* ISA_DSP_LEVEL2 only */ |
117 | #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) | ||
118 | COPY(acch); | ||
119 | COPY(accl); | ||
120 | COPY(dummy_acc1h); | ||
121 | COPY(dummy_acc1l); | ||
122 | #else | ||
123 | #error unknown isa configuration | ||
124 | #endif | ||
125 | COPY(psw); | 116 | COPY(psw); |
126 | COPY(bpc); | 117 | COPY(bpc); |
127 | COPY(bbpsw); | 118 | COPY(bbpsw); |
@@ -196,19 +187,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | |||
196 | COPY(r10); | 187 | COPY(r10); |
197 | COPY(r11); | 188 | COPY(r11); |
198 | COPY(r12); | 189 | COPY(r12); |
199 | #if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) | ||
200 | COPY(acc0h); | 190 | COPY(acc0h); |
201 | COPY(acc0l); | 191 | COPY(acc0l); |
202 | COPY(acc1h); | 192 | COPY(acc1h); /* ISA_DSP_LEVEL2 only */ |
203 | COPY(acc1l); | 193 | COPY(acc1l); /* ISA_DSP_LEVEL2 only */ |
204 | #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) | ||
205 | COPY(acch); | ||
206 | COPY(accl); | ||
207 | COPY(dummy_acc1h); | ||
208 | COPY(dummy_acc1l); | ||
209 | #else | ||
210 | #error unknown isa configuration | ||
211 | #endif | ||
212 | COPY(psw); | 194 | COPY(psw); |
213 | COPY(bpc); | 195 | COPY(bpc); |
214 | COPY(bbpsw); | 196 | COPY(bbpsw); |
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index a09038282c78..3858c9f39ba5 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c | |||
@@ -286,11 +286,3 @@ void __init time_init(void) | |||
286 | #error no chip configuration | 286 | #error no chip configuration |
287 | #endif | 287 | #endif |
288 | } | 288 | } |
289 | |||
290 | /* | ||
291 | * Scheduler clock - returns current time in nanosec units. | ||
292 | */ | ||
293 | unsigned long long sched_clock(void) | ||
294 | { | ||
295 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
296 | } | ||
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S index 358b9cee2c65..439cc257cd1d 100644 --- a/arch/m32r/kernel/vmlinux.lds.S +++ b/arch/m32r/kernel/vmlinux.lds.S | |||
@@ -6,12 +6,15 @@ | |||
6 | #include <asm/page.h> | 6 | #include <asm/page.h> |
7 | 7 | ||
8 | OUTPUT_ARCH(m32r) | 8 | OUTPUT_ARCH(m32r) |
9 | ENTRY(startup_32) | ||
10 | #if defined(__LITTLE_ENDIAN__) | 9 | #if defined(__LITTLE_ENDIAN__) |
11 | jiffies = jiffies_64; | 10 | jiffies = jiffies_64; |
12 | #else | 11 | #else |
13 | jiffies = jiffies_64 + 4; | 12 | jiffies = jiffies_64 + 4; |
14 | #endif | 13 | #endif |
14 | |||
15 | kernel_entry = boot - 0x80000000; | ||
16 | ENTRY(kernel_entry) | ||
17 | |||
15 | SECTIONS | 18 | SECTIONS |
16 | { | 19 | { |
17 | . = CONFIG_MEMORY_START + __PAGE_OFFSET; | 20 | . = CONFIG_MEMORY_START + __PAGE_OFFSET; |
@@ -99,10 +102,14 @@ SECTIONS | |||
99 | from .altinstructions and .eh_frame */ | 102 | from .altinstructions and .eh_frame */ |
100 | .exit.text : { *(.exit.text) } | 103 | .exit.text : { *(.exit.text) } |
101 | .exit.data : { *(.exit.data) } | 104 | .exit.data : { *(.exit.data) } |
105 | |||
106 | #ifdef CONFIG_BLK_DEV_INITRD | ||
102 | . = ALIGN(4096); | 107 | . = ALIGN(4096); |
103 | __initramfs_start = .; | 108 | __initramfs_start = .; |
104 | .init.ramfs : { *(.init.ramfs) } | 109 | .init.ramfs : { *(.init.ramfs) } |
105 | __initramfs_end = .; | 110 | __initramfs_end = .; |
111 | #endif | ||
112 | |||
106 | . = ALIGN(32); | 113 | . = ALIGN(32); |
107 | __per_cpu_start = .; | 114 | __per_cpu_start = .; |
108 | .data.percpu : { *(.data.percpu) } | 115 | .data.percpu : { *(.data.percpu) } |
diff --git a/arch/m32r/lib/ashxdi3.S b/arch/m32r/lib/ashxdi3.S index 107594b65d58..7fc0c19801ba 100644 --- a/arch/m32r/lib/ashxdi3.S +++ b/arch/m32r/lib/ashxdi3.S | |||
@@ -4,8 +4,6 @@ | |||
4 | * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata | 4 | * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | /* $Id$ */ | ||
8 | |||
9 | 7 | ||
10 | ; | 8 | ; |
11 | ; input (r0,r1) src | 9 | ; input (r0,r1) src |
@@ -293,4 +291,3 @@ __lshrdi3: | |||
293 | #endif /* not CONFIG_ISA_DUAL_ISSUE */ | 291 | #endif /* not CONFIG_ISA_DUAL_ISSUE */ |
294 | 292 | ||
295 | .end | 293 | .end |
296 | |||
diff --git a/arch/m32r/lib/checksum.S b/arch/m32r/lib/checksum.S index cfbe00e5184a..0af0360c76d9 100644 --- a/arch/m32r/lib/checksum.S +++ b/arch/m32r/lib/checksum.S | |||
@@ -25,8 +25,6 @@ | |||
25 | * as published by the Free Software Foundation; either version | 25 | * as published by the Free Software Foundation; either version |
26 | * 2 of the License, or (at your option) any later version. | 26 | * 2 of the License, or (at your option) any later version. |
27 | */ | 27 | */ |
28 | /* $Id$ */ | ||
29 | |||
30 | 28 | ||
31 | #include <linux/linkage.h> | 29 | #include <linux/linkage.h> |
32 | #include <asm/assembler.h> | 30 | #include <asm/assembler.h> |
@@ -319,3 +317,4 @@ ENTRY(csum_partial_copy_generic) | |||
319 | nop | 317 | nop |
320 | nop | 318 | nop |
321 | 319 | ||
320 | .end | ||
diff --git a/arch/m32r/lib/delay.c b/arch/m32r/lib/delay.c index 06382a38c318..59bfc34e0d9f 100644 --- a/arch/m32r/lib/delay.c +++ b/arch/m32r/lib/delay.c | |||
@@ -5,8 +5,6 @@ | |||
5 | * Copyright (c) 2004 Hirokazu Takata | 5 | * Copyright (c) 2004 Hirokazu Takata |
6 | */ | 6 | */ |
7 | 7 | ||
8 | /* $Id$ */ | ||
9 | |||
10 | #include <linux/param.h> | 8 | #include <linux/param.h> |
11 | #ifdef CONFIG_SMP | 9 | #ifdef CONFIG_SMP |
12 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
diff --git a/arch/m32r/lib/memcpy.S b/arch/m32r/lib/memcpy.S index 2089a215314e..05987cd639ef 100644 --- a/arch/m32r/lib/memcpy.S +++ b/arch/m32r/lib/memcpy.S | |||
@@ -10,8 +10,6 @@ | |||
10 | * src: r1 | 10 | * src: r1 |
11 | * n : r2 | 11 | * n : r2 |
12 | */ | 12 | */ |
13 | /* $Id$ */ | ||
14 | |||
15 | 13 | ||
16 | .text | 14 | .text |
17 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
diff --git a/arch/m32r/lib/memset.S b/arch/m32r/lib/memset.S index b47fa3537aa4..2b2831a37927 100644 --- a/arch/m32r/lib/memset.S +++ b/arch/m32r/lib/memset.S | |||
@@ -12,8 +12,6 @@ | |||
12 | * ret: r0 | 12 | * ret: r0 |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | /* $Id$ */ | ||
16 | |||
17 | 15 | ||
18 | .text | 16 | .text |
19 | .global memset | 17 | .global memset |
diff --git a/arch/m32r/lib/strlen.S b/arch/m32r/lib/strlen.S index 5f41aacd7b3e..916de9e8f801 100644 --- a/arch/m32r/lib/strlen.S +++ b/arch/m32r/lib/strlen.S | |||
@@ -6,8 +6,6 @@ | |||
6 | * size_t strlen(const char *s); | 6 | * size_t strlen(const char *s); |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | /* $Id$ */ | ||
10 | |||
11 | 9 | ||
12 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
13 | #include <asm/assembler.h> | 11 | #include <asm/assembler.h> |
diff --git a/arch/m32r/m32104ut/defconfig.m32104ut b/arch/m32r/m32104ut/defconfig.m32104ut index 454de336803a..7b68fe8d921e 100644 --- a/arch/m32r/m32104ut/defconfig.m32104ut +++ b/arch/m32r/m32104ut/defconfig.m32104ut | |||
@@ -1,20 +1,20 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14 | 3 | # Linux kernel version: 2.6.19 |
4 | # Wed Nov 9 16:04:51 2005 | 4 | # Wed Dec 13 17:22:20 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 16 | CONFIG_BROKEN_ON_SMP=y |
17 | CONFIG_LOCK_KERNEL=y | ||
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 18 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
19 | 19 | ||
20 | # | 20 | # |
@@ -22,33 +22,66 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
22 | # | 22 | # |
23 | CONFIG_LOCALVERSION="" | 23 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | 24 | CONFIG_LOCALVERSION_AUTO=y |
25 | CONFIG_SYSVIPC=y | ||
26 | # CONFIG_IPC_NS is not set | ||
25 | # CONFIG_POSIX_MQUEUE is not set | 27 | # CONFIG_POSIX_MQUEUE is not set |
26 | # CONFIG_BSD_PROCESS_ACCT is not set | 28 | # CONFIG_BSD_PROCESS_ACCT is not set |
27 | CONFIG_SYSCTL=y | 29 | # CONFIG_TASKSTATS is not set |
30 | # CONFIG_UTS_NS is not set | ||
28 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
29 | CONFIG_HOTPLUG=y | 32 | CONFIG_IKCONFIG=y |
30 | # CONFIG_KOBJECT_UEVENT is not set | 33 | CONFIG_IKCONFIG_PROC=y |
31 | # CONFIG_IKCONFIG is not set | 34 | CONFIG_SYSFS_DEPRECATED=y |
35 | # CONFIG_RELAY is not set | ||
32 | CONFIG_INITRAMFS_SOURCE="" | 36 | CONFIG_INITRAMFS_SOURCE="" |
33 | CONFIG_EMBEDDED=y | 37 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
34 | # CONFIG_KALLSYMS is not set | 38 | CONFIG_SYSCTL=y |
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_SYSCTL_SYSCALL=y | ||
41 | CONFIG_KALLSYMS=y | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
35 | CONFIG_PRINTK=y | 44 | CONFIG_PRINTK=y |
36 | CONFIG_BUG=y | 45 | CONFIG_BUG=y |
46 | CONFIG_ELF_CORE=y | ||
37 | CONFIG_BASE_FULL=y | 47 | CONFIG_BASE_FULL=y |
38 | # CONFIG_FUTEX is not set | 48 | CONFIG_FUTEX=y |
39 | # CONFIG_EPOLL is not set | 49 | CONFIG_EPOLL=y |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 50 | CONFIG_SLAB=y |
41 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 51 | CONFIG_VM_EVENT_COUNTERS=y |
42 | CONFIG_CC_ALIGN_LABELS=0 | 52 | CONFIG_RT_MUTEXES=y |
43 | CONFIG_CC_ALIGN_LOOPS=0 | ||
44 | CONFIG_CC_ALIGN_JUMPS=0 | ||
45 | CONFIG_TINY_SHMEM=y | 53 | CONFIG_TINY_SHMEM=y |
46 | CONFIG_BASE_SMALL=0 | 54 | CONFIG_BASE_SMALL=0 |
55 | # CONFIG_SLOB is not set | ||
47 | 56 | ||
48 | # | 57 | # |
49 | # Loadable module support | 58 | # Loadable module support |
50 | # | 59 | # |
51 | # CONFIG_MODULES is not set | 60 | CONFIG_MODULES=y |
61 | CONFIG_MODULE_UNLOAD=y | ||
62 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
63 | # CONFIG_MODVERSIONS is not set | ||
64 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
65 | CONFIG_KMOD=y | ||
66 | |||
67 | # | ||
68 | # Block layer | ||
69 | # | ||
70 | CONFIG_BLOCK=y | ||
71 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
72 | |||
73 | # | ||
74 | # IO Schedulers | ||
75 | # | ||
76 | CONFIG_IOSCHED_NOOP=y | ||
77 | CONFIG_IOSCHED_AS=y | ||
78 | CONFIG_IOSCHED_DEADLINE=y | ||
79 | CONFIG_IOSCHED_CFQ=y | ||
80 | CONFIG_DEFAULT_AS=y | ||
81 | # CONFIG_DEFAULT_DEADLINE is not set | ||
82 | # CONFIG_DEFAULT_CFQ is not set | ||
83 | # CONFIG_DEFAULT_NOOP is not set | ||
84 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
52 | 85 | ||
53 | # | 86 | # |
54 | # Processor type and features | 87 | # Processor type and features |
@@ -70,40 +103,40 @@ CONFIG_ISA_M32R=y | |||
70 | CONFIG_BUS_CLOCK=54000000 | 103 | CONFIG_BUS_CLOCK=54000000 |
71 | CONFIG_TIMER_DIVIDE=128 | 104 | CONFIG_TIMER_DIVIDE=128 |
72 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 105 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
73 | CONFIG_MEMORY_START=04000000 | 106 | CONFIG_MEMORY_START=0x04000000 |
74 | CONFIG_MEMORY_SIZE=01000000 | 107 | CONFIG_MEMORY_SIZE=0x01000000 |
75 | CONFIG_NOHIGHMEM=y | 108 | CONFIG_NOHIGHMEM=y |
76 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 109 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
77 | CONFIG_SELECT_MEMORY_MODEL=y | 110 | CONFIG_SELECT_MEMORY_MODEL=y |
78 | CONFIG_FLATMEM_MANUAL=y | 111 | # CONFIG_FLATMEM_MANUAL is not set |
79 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 112 | CONFIG_DISCONTIGMEM_MANUAL=y |
80 | # CONFIG_SPARSEMEM_MANUAL is not set | 113 | # CONFIG_SPARSEMEM_MANUAL is not set |
81 | CONFIG_FLATMEM=y | 114 | CONFIG_DISCONTIGMEM=y |
82 | CONFIG_FLAT_NODE_MEM_MAP=y | 115 | CONFIG_FLAT_NODE_MEM_MAP=y |
116 | CONFIG_NEED_MULTIPLE_NODES=y | ||
83 | # CONFIG_SPARSEMEM_STATIC is not set | 117 | # CONFIG_SPARSEMEM_STATIC is not set |
118 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
119 | # CONFIG_RESOURCES_64BIT is not set | ||
120 | CONFIG_IRAM_START=0x00700000 | ||
121 | CONFIG_IRAM_SIZE=0x00010000 | ||
84 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 122 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
85 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 123 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
124 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
125 | CONFIG_GENERIC_HWEIGHT=y | ||
86 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 126 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
87 | # CONFIG_PREEMPT is not set | 127 | CONFIG_PREEMPT=y |
88 | # CONFIG_SMP is not set | 128 | # CONFIG_SMP is not set |
129 | CONFIG_NODES_SHIFT=1 | ||
89 | 130 | ||
90 | # | 131 | # |
91 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 132 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
92 | # | 133 | # |
93 | # CONFIG_ISA is not set | 134 | CONFIG_ISA=y |
94 | 135 | ||
95 | # | 136 | # |
96 | # PCCARD (PCMCIA/CardBus) support | 137 | # PCCARD (PCMCIA/CardBus) support |
97 | # | 138 | # |
98 | CONFIG_PCCARD=y | 139 | # CONFIG_PCCARD is not set |
99 | # CONFIG_PCMCIA_DEBUG is not set | ||
100 | CONFIG_PCMCIA=y | ||
101 | CONFIG_PCMCIA_LOAD_CIS=y | ||
102 | CONFIG_PCMCIA_IOCTL=y | ||
103 | |||
104 | # | ||
105 | # PC-card bridges | ||
106 | # | ||
107 | 140 | ||
108 | # | 141 | # |
109 | # PCI Hotplug Support | 142 | # PCI Hotplug Support |
@@ -112,10 +145,8 @@ CONFIG_PCMCIA_IOCTL=y | |||
112 | # | 145 | # |
113 | # Executable file formats | 146 | # Executable file formats |
114 | # | 147 | # |
115 | CONFIG_BINFMT_FLAT=y | 148 | # CONFIG_BINFMT_FLAT is not set |
116 | # CONFIG_BINFMT_ZFLAT is not set | 149 | CONFIG_BINFMT_MISC=y |
117 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
118 | # CONFIG_BINFMT_MISC is not set | ||
119 | 150 | ||
120 | # | 151 | # |
121 | # Networking | 152 | # Networking |
@@ -125,17 +156,19 @@ CONFIG_NET=y | |||
125 | # | 156 | # |
126 | # Networking options | 157 | # Networking options |
127 | # | 158 | # |
128 | # CONFIG_PACKET is not set | 159 | # CONFIG_NETDEBUG is not set |
160 | CONFIG_PACKET=y | ||
161 | # CONFIG_PACKET_MMAP is not set | ||
129 | CONFIG_UNIX=y | 162 | CONFIG_UNIX=y |
163 | CONFIG_XFRM=y | ||
164 | # CONFIG_XFRM_USER is not set | ||
165 | # CONFIG_XFRM_SUB_POLICY is not set | ||
130 | # CONFIG_NET_KEY is not set | 166 | # CONFIG_NET_KEY is not set |
131 | CONFIG_INET=y | 167 | CONFIG_INET=y |
132 | # CONFIG_IP_MULTICAST is not set | 168 | # CONFIG_IP_MULTICAST is not set |
133 | # CONFIG_IP_ADVANCED_ROUTER is not set | 169 | # CONFIG_IP_ADVANCED_ROUTER is not set |
134 | CONFIG_IP_FIB_HASH=y | 170 | CONFIG_IP_FIB_HASH=y |
135 | CONFIG_IP_PNP=y | 171 | # CONFIG_IP_PNP is not set |
136 | CONFIG_IP_PNP_DHCP=y | ||
137 | # CONFIG_IP_PNP_BOOTP is not set | ||
138 | # CONFIG_IP_PNP_RARP is not set | ||
139 | # CONFIG_NET_IPIP is not set | 172 | # CONFIG_NET_IPIP is not set |
140 | # CONFIG_NET_IPGRE is not set | 173 | # CONFIG_NET_IPGRE is not set |
141 | # CONFIG_ARPD is not set | 174 | # CONFIG_ARPD is not set |
@@ -143,13 +176,87 @@ CONFIG_IP_PNP_DHCP=y | |||
143 | # CONFIG_INET_AH is not set | 176 | # CONFIG_INET_AH is not set |
144 | # CONFIG_INET_ESP is not set | 177 | # CONFIG_INET_ESP is not set |
145 | # CONFIG_INET_IPCOMP is not set | 178 | # CONFIG_INET_IPCOMP is not set |
179 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
146 | # CONFIG_INET_TUNNEL is not set | 180 | # CONFIG_INET_TUNNEL is not set |
181 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
182 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
183 | CONFIG_INET_XFRM_MODE_BEET=y | ||
147 | CONFIG_INET_DIAG=y | 184 | CONFIG_INET_DIAG=y |
148 | CONFIG_INET_TCP_DIAG=y | 185 | CONFIG_INET_TCP_DIAG=y |
149 | # CONFIG_TCP_CONG_ADVANCED is not set | 186 | # CONFIG_TCP_CONG_ADVANCED is not set |
150 | CONFIG_TCP_CONG_BIC=y | 187 | CONFIG_TCP_CONG_CUBIC=y |
188 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
189 | # CONFIG_TCP_MD5SIG is not set | ||
190 | |||
191 | # | ||
192 | # IP: Virtual Server Configuration | ||
193 | # | ||
194 | # CONFIG_IP_VS is not set | ||
151 | # CONFIG_IPV6 is not set | 195 | # CONFIG_IPV6 is not set |
152 | # CONFIG_NETFILTER is not set | 196 | # CONFIG_INET6_XFRM_TUNNEL is not set |
197 | # CONFIG_INET6_TUNNEL is not set | ||
198 | # CONFIG_NETWORK_SECMARK is not set | ||
199 | CONFIG_NETFILTER=y | ||
200 | # CONFIG_NETFILTER_DEBUG is not set | ||
201 | |||
202 | # | ||
203 | # Core Netfilter Configuration | ||
204 | # | ||
205 | CONFIG_NETFILTER_NETLINK=m | ||
206 | CONFIG_NETFILTER_NETLINK_QUEUE=m | ||
207 | CONFIG_NETFILTER_NETLINK_LOG=m | ||
208 | # CONFIG_NF_CONNTRACK_ENABLED is not set | ||
209 | CONFIG_NETFILTER_XTABLES=m | ||
210 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
211 | # CONFIG_NETFILTER_XT_TARGET_DSCP is not set | ||
212 | CONFIG_NETFILTER_XT_TARGET_MARK=m | ||
213 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
214 | # CONFIG_NETFILTER_XT_TARGET_NFLOG is not set | ||
215 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
216 | CONFIG_NETFILTER_XT_MATCH_DCCP=m | ||
217 | # CONFIG_NETFILTER_XT_MATCH_DSCP is not set | ||
218 | # CONFIG_NETFILTER_XT_MATCH_ESP is not set | ||
219 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
220 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
221 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
222 | CONFIG_NETFILTER_XT_MATCH_MARK=m | ||
223 | # CONFIG_NETFILTER_XT_MATCH_POLICY is not set | ||
224 | # CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set | ||
225 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
226 | # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set | ||
227 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
228 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | ||
229 | # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set | ||
230 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
231 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
232 | # CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set | ||
233 | |||
234 | # | ||
235 | # IP: Netfilter Configuration | ||
236 | # | ||
237 | CONFIG_IP_NF_QUEUE=m | ||
238 | CONFIG_IP_NF_IPTABLES=m | ||
239 | CONFIG_IP_NF_MATCH_IPRANGE=m | ||
240 | CONFIG_IP_NF_MATCH_TOS=m | ||
241 | CONFIG_IP_NF_MATCH_RECENT=m | ||
242 | CONFIG_IP_NF_MATCH_ECN=m | ||
243 | # CONFIG_IP_NF_MATCH_AH is not set | ||
244 | CONFIG_IP_NF_MATCH_TTL=m | ||
245 | CONFIG_IP_NF_MATCH_OWNER=m | ||
246 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
247 | CONFIG_IP_NF_FILTER=m | ||
248 | CONFIG_IP_NF_TARGET_REJECT=m | ||
249 | CONFIG_IP_NF_TARGET_LOG=m | ||
250 | CONFIG_IP_NF_TARGET_ULOG=m | ||
251 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
252 | CONFIG_IP_NF_MANGLE=m | ||
253 | CONFIG_IP_NF_TARGET_TOS=m | ||
254 | CONFIG_IP_NF_TARGET_ECN=m | ||
255 | CONFIG_IP_NF_TARGET_TTL=m | ||
256 | CONFIG_IP_NF_RAW=m | ||
257 | CONFIG_IP_NF_ARPTABLES=m | ||
258 | CONFIG_IP_NF_ARPFILTER=m | ||
259 | CONFIG_IP_NF_ARP_MANGLE=m | ||
153 | 260 | ||
154 | # | 261 | # |
155 | # DCCP Configuration (EXPERIMENTAL) | 262 | # DCCP Configuration (EXPERIMENTAL) |
@@ -160,6 +267,11 @@ CONFIG_TCP_CONG_BIC=y | |||
160 | # SCTP Configuration (EXPERIMENTAL) | 267 | # SCTP Configuration (EXPERIMENTAL) |
161 | # | 268 | # |
162 | # CONFIG_IP_SCTP is not set | 269 | # CONFIG_IP_SCTP is not set |
270 | |||
271 | # | ||
272 | # TIPC Configuration (EXPERIMENTAL) | ||
273 | # | ||
274 | # CONFIG_TIPC is not set | ||
163 | # CONFIG_ATM is not set | 275 | # CONFIG_ATM is not set |
164 | # CONFIG_BRIDGE is not set | 276 | # CONFIG_BRIDGE is not set |
165 | # CONFIG_VLAN_8021Q is not set | 277 | # CONFIG_VLAN_8021Q is not set |
@@ -169,11 +281,14 @@ CONFIG_TCP_CONG_BIC=y | |||
169 | # CONFIG_ATALK is not set | 281 | # CONFIG_ATALK is not set |
170 | # CONFIG_X25 is not set | 282 | # CONFIG_X25 is not set |
171 | # CONFIG_LAPB is not set | 283 | # CONFIG_LAPB is not set |
172 | # CONFIG_NET_DIVERT is not set | ||
173 | # CONFIG_ECONET is not set | 284 | # CONFIG_ECONET is not set |
174 | # CONFIG_WAN_ROUTER is not set | 285 | # CONFIG_WAN_ROUTER is not set |
286 | |||
287 | # | ||
288 | # QoS and/or fair queueing | ||
289 | # | ||
175 | # CONFIG_NET_SCHED is not set | 290 | # CONFIG_NET_SCHED is not set |
176 | # CONFIG_NET_CLS_ROUTE is not set | 291 | CONFIG_NET_CLS_ROUTE=y |
177 | 292 | ||
178 | # | 293 | # |
179 | # Network testing | 294 | # Network testing |
@@ -193,8 +308,8 @@ CONFIG_TCP_CONG_BIC=y | |||
193 | # | 308 | # |
194 | CONFIG_STANDALONE=y | 309 | CONFIG_STANDALONE=y |
195 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 310 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
196 | CONFIG_FW_LOADER=y | 311 | # CONFIG_FW_LOADER is not set |
197 | # CONFIG_DEBUG_DRIVER is not set | 312 | # CONFIG_SYS_HYPERVISOR is not set |
198 | 313 | ||
199 | # | 314 | # |
200 | # Connector - unified userspace <-> kernelspace linker | 315 | # Connector - unified userspace <-> kernelspace linker |
@@ -209,11 +324,21 @@ CONFIG_FW_LOADER=y | |||
209 | # | 324 | # |
210 | # Parallel port support | 325 | # Parallel port support |
211 | # | 326 | # |
212 | # CONFIG_PARPORT is not set | 327 | CONFIG_PARPORT=m |
328 | # CONFIG_PARPORT_GSC is not set | ||
329 | # CONFIG_PARPORT_AX88796 is not set | ||
330 | CONFIG_PARPORT_1284=y | ||
213 | 331 | ||
214 | # | 332 | # |
215 | # Plug and Play support | 333 | # Plug and Play support |
216 | # | 334 | # |
335 | CONFIG_PNP=y | ||
336 | # CONFIG_PNP_DEBUG is not set | ||
337 | |||
338 | # | ||
339 | # Protocols | ||
340 | # | ||
341 | CONFIG_ISAPNP=y | ||
217 | 342 | ||
218 | # | 343 | # |
219 | # Block devices | 344 | # Block devices |
@@ -221,37 +346,130 @@ CONFIG_FW_LOADER=y | |||
221 | # CONFIG_BLK_DEV_COW_COMMON is not set | 346 | # CONFIG_BLK_DEV_COW_COMMON is not set |
222 | CONFIG_BLK_DEV_LOOP=y | 347 | CONFIG_BLK_DEV_LOOP=y |
223 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 348 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
224 | CONFIG_BLK_DEV_NBD=y | 349 | CONFIG_BLK_DEV_NBD=m |
225 | CONFIG_BLK_DEV_RAM=y | 350 | # CONFIG_BLK_DEV_RAM is not set |
226 | CONFIG_BLK_DEV_RAM_COUNT=16 | 351 | # CONFIG_BLK_DEV_INITRD is not set |
227 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 352 | CONFIG_CDROM_PKTCDVD=m |
228 | CONFIG_BLK_DEV_INITRD=y | 353 | CONFIG_CDROM_PKTCDVD_BUFFERS=8 |
229 | # CONFIG_CDROM_PKTCDVD is not set | 354 | CONFIG_CDROM_PKTCDVD_WCACHE=y |
355 | # CONFIG_ATA_OVER_ETH is not set | ||
230 | 356 | ||
231 | # | 357 | # |
232 | # IO Schedulers | 358 | # Misc devices |
233 | # | 359 | # |
234 | CONFIG_IOSCHED_NOOP=y | 360 | # CONFIG_TIFM_CORE is not set |
235 | # CONFIG_IOSCHED_AS is not set | ||
236 | # CONFIG_IOSCHED_DEADLINE is not set | ||
237 | # CONFIG_IOSCHED_CFQ is not set | ||
238 | # CONFIG_ATA_OVER_ETH is not set | ||
239 | 361 | ||
240 | # | 362 | # |
241 | # ATA/ATAPI/MFM/RLL support | 363 | # ATA/ATAPI/MFM/RLL support |
242 | # | 364 | # |
243 | # CONFIG_IDE is not set | 365 | CONFIG_IDE=y |
366 | CONFIG_BLK_DEV_IDE=y | ||
367 | |||
368 | # | ||
369 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
370 | # | ||
371 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
372 | CONFIG_BLK_DEV_IDEDISK=y | ||
373 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
374 | CONFIG_BLK_DEV_IDECD=y | ||
375 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
376 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
377 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
378 | # CONFIG_IDE_TASK_IOCTL is not set | ||
379 | |||
380 | # | ||
381 | # IDE chipset support/bugfixes | ||
382 | # | ||
383 | CONFIG_IDE_GENERIC=y | ||
384 | # CONFIG_BLK_DEV_IDEPNP is not set | ||
385 | # CONFIG_IDE_ARM is not set | ||
386 | # CONFIG_IDE_CHIPSETS is not set | ||
387 | # CONFIG_BLK_DEV_IDEDMA is not set | ||
388 | # CONFIG_IDEDMA_AUTO is not set | ||
389 | # CONFIG_BLK_DEV_HD is not set | ||
244 | 390 | ||
245 | # | 391 | # |
246 | # SCSI device support | 392 | # SCSI device support |
247 | # | 393 | # |
248 | # CONFIG_RAID_ATTRS is not set | 394 | # CONFIG_RAID_ATTRS is not set |
249 | # CONFIG_SCSI is not set | 395 | CONFIG_SCSI=y |
396 | # CONFIG_SCSI_NETLINK is not set | ||
397 | CONFIG_SCSI_PROC_FS=y | ||
398 | |||
399 | # | ||
400 | # SCSI support type (disk, tape, CD-ROM) | ||
401 | # | ||
402 | CONFIG_BLK_DEV_SD=y | ||
403 | CONFIG_CHR_DEV_ST=m | ||
404 | # CONFIG_CHR_DEV_OSST is not set | ||
405 | CONFIG_BLK_DEV_SR=m | ||
406 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
407 | CONFIG_CHR_DEV_SG=m | ||
408 | # CONFIG_CHR_DEV_SCH is not set | ||
409 | |||
410 | # | ||
411 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
412 | # | ||
413 | CONFIG_SCSI_MULTI_LUN=y | ||
414 | CONFIG_SCSI_CONSTANTS=y | ||
415 | # CONFIG_SCSI_LOGGING is not set | ||
416 | |||
417 | # | ||
418 | # SCSI Transports | ||
419 | # | ||
420 | CONFIG_SCSI_SPI_ATTRS=y | ||
421 | # CONFIG_SCSI_FC_ATTRS is not set | ||
422 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
423 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
424 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
425 | |||
426 | # | ||
427 | # SCSI low-level drivers | ||
428 | # | ||
429 | # CONFIG_ISCSI_TCP is not set | ||
430 | # CONFIG_SCSI_AHA152X is not set | ||
431 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
432 | # CONFIG_SCSI_IN2000 is not set | ||
433 | # CONFIG_SCSI_DTC3280 is not set | ||
434 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
435 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | ||
436 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set | ||
437 | # CONFIG_SCSI_NCR53C406A is not set | ||
438 | # CONFIG_SCSI_PAS16 is not set | ||
439 | # CONFIG_SCSI_PSI240I is not set | ||
440 | # CONFIG_SCSI_QLOGIC_FAS is not set | ||
441 | # CONFIG_SCSI_SYM53C416 is not set | ||
442 | # CONFIG_SCSI_T128 is not set | ||
443 | # CONFIG_SCSI_DEBUG is not set | ||
444 | |||
445 | # | ||
446 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
447 | # | ||
448 | |||
449 | # | ||
450 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
451 | # | ||
452 | # CONFIG_CD_NO_IDESCSI is not set | ||
250 | 453 | ||
251 | # | 454 | # |
252 | # Multi-device support (RAID and LVM) | 455 | # Multi-device support (RAID and LVM) |
253 | # | 456 | # |
254 | # CONFIG_MD is not set | 457 | CONFIG_MD=y |
458 | CONFIG_BLK_DEV_MD=y | ||
459 | # CONFIG_MD_LINEAR is not set | ||
460 | # CONFIG_MD_RAID0 is not set | ||
461 | CONFIG_MD_RAID1=y | ||
462 | # CONFIG_MD_RAID10 is not set | ||
463 | # CONFIG_MD_RAID456 is not set | ||
464 | # CONFIG_MD_MULTIPATH is not set | ||
465 | # CONFIG_MD_FAULTY is not set | ||
466 | CONFIG_BLK_DEV_DM=m | ||
467 | # CONFIG_DM_DEBUG is not set | ||
468 | CONFIG_DM_CRYPT=m | ||
469 | CONFIG_DM_SNAPSHOT=m | ||
470 | # CONFIG_DM_MIRROR is not set | ||
471 | # CONFIG_DM_ZERO is not set | ||
472 | # CONFIG_DM_MULTIPATH is not set | ||
255 | 473 | ||
256 | # | 474 | # |
257 | # Fusion MPT device support | 475 | # Fusion MPT device support |
@@ -270,10 +488,16 @@ CONFIG_IOSCHED_NOOP=y | |||
270 | # Network device support | 488 | # Network device support |
271 | # | 489 | # |
272 | CONFIG_NETDEVICES=y | 490 | CONFIG_NETDEVICES=y |
273 | CONFIG_DUMMY=y | 491 | CONFIG_DUMMY=m |
274 | # CONFIG_BONDING is not set | 492 | # CONFIG_BONDING is not set |
275 | # CONFIG_EQUALIZER is not set | 493 | # CONFIG_EQUALIZER is not set |
276 | # CONFIG_TUN is not set | 494 | # CONFIG_TUN is not set |
495 | # CONFIG_NET_SB1000 is not set | ||
496 | |||
497 | # | ||
498 | # ARCnet devices | ||
499 | # | ||
500 | # CONFIG_ARCNET is not set | ||
277 | 501 | ||
278 | # | 502 | # |
279 | # PHY device support | 503 | # PHY device support |
@@ -285,8 +509,33 @@ CONFIG_DUMMY=y | |||
285 | # | 509 | # |
286 | CONFIG_NET_ETHERNET=y | 510 | CONFIG_NET_ETHERNET=y |
287 | CONFIG_MII=y | 511 | CONFIG_MII=y |
288 | CONFIG_SMC91X=y | 512 | CONFIG_NET_VENDOR_3COM=y |
289 | # CONFIG_NE2000 is not set | 513 | # CONFIG_EL1 is not set |
514 | # CONFIG_EL2 is not set | ||
515 | # CONFIG_EL16 is not set | ||
516 | # CONFIG_EL3 is not set | ||
517 | # CONFIG_NET_VENDOR_SMC is not set | ||
518 | # CONFIG_SMC91X is not set | ||
519 | # CONFIG_NET_VENDOR_RACAL is not set | ||
520 | # CONFIG_AT1700 is not set | ||
521 | # CONFIG_DEPCA is not set | ||
522 | # CONFIG_HP100 is not set | ||
523 | CONFIG_NET_ISA=y | ||
524 | # CONFIG_E2100 is not set | ||
525 | # CONFIG_EWRK3 is not set | ||
526 | # CONFIG_EEXPRESS is not set | ||
527 | # CONFIG_EEXPRESS_PRO is not set | ||
528 | # CONFIG_HPLAN_PLUS is not set | ||
529 | # CONFIG_HPLAN is not set | ||
530 | # CONFIG_LP486E is not set | ||
531 | # CONFIG_ETH16I is not set | ||
532 | CONFIG_NE2000=m | ||
533 | # CONFIG_SEEQ8005 is not set | ||
534 | CONFIG_NET_PCI=y | ||
535 | # CONFIG_AC3200 is not set | ||
536 | # CONFIG_APRICOT is not set | ||
537 | # CONFIG_CS89x0 is not set | ||
538 | # CONFIG_NET_POCKET is not set | ||
290 | 539 | ||
291 | # | 540 | # |
292 | # Ethernet (1000 Mbit) | 541 | # Ethernet (1000 Mbit) |
@@ -299,6 +548,7 @@ CONFIG_SMC91X=y | |||
299 | # | 548 | # |
300 | # Token Ring devices | 549 | # Token Ring devices |
301 | # | 550 | # |
551 | # CONFIG_TR is not set | ||
302 | 552 | ||
303 | # | 553 | # |
304 | # Wireless LAN (non-hamradio) | 554 | # Wireless LAN (non-hamradio) |
@@ -306,14 +556,10 @@ CONFIG_SMC91X=y | |||
306 | # CONFIG_NET_RADIO is not set | 556 | # CONFIG_NET_RADIO is not set |
307 | 557 | ||
308 | # | 558 | # |
309 | # PCMCIA network device support | ||
310 | # | ||
311 | # CONFIG_NET_PCMCIA is not set | ||
312 | |||
313 | # | ||
314 | # Wan interfaces | 559 | # Wan interfaces |
315 | # | 560 | # |
316 | # CONFIG_WAN is not set | 561 | # CONFIG_WAN is not set |
562 | # CONFIG_PLIP is not set | ||
317 | # CONFIG_PPP is not set | 563 | # CONFIG_PPP is not set |
318 | # CONFIG_SLIP is not set | 564 | # CONFIG_SLIP is not set |
319 | # CONFIG_SHAPER is not set | 565 | # CONFIG_SHAPER is not set |
@@ -334,35 +580,83 @@ CONFIG_SMC91X=y | |||
334 | # | 580 | # |
335 | # Input device support | 581 | # Input device support |
336 | # | 582 | # |
337 | # CONFIG_INPUT is not set | 583 | CONFIG_INPUT=y |
584 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
585 | |||
586 | # | ||
587 | # Userland interfaces | ||
588 | # | ||
589 | CONFIG_INPUT_MOUSEDEV=y | ||
590 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
591 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
592 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
593 | # CONFIG_INPUT_JOYDEV is not set | ||
594 | # CONFIG_INPUT_TSDEV is not set | ||
595 | # CONFIG_INPUT_EVDEV is not set | ||
596 | # CONFIG_INPUT_EVBUG is not set | ||
597 | |||
598 | # | ||
599 | # Input Device Drivers | ||
600 | # | ||
601 | CONFIG_INPUT_KEYBOARD=y | ||
602 | CONFIG_KEYBOARD_ATKBD=y | ||
603 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
604 | # CONFIG_KEYBOARD_LKKBD is not set | ||
605 | # CONFIG_KEYBOARD_XTKBD is not set | ||
606 | # CONFIG_KEYBOARD_NEWTON is not set | ||
607 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
608 | CONFIG_INPUT_MOUSE=y | ||
609 | CONFIG_MOUSE_PS2=y | ||
610 | # CONFIG_MOUSE_SERIAL is not set | ||
611 | # CONFIG_MOUSE_INPORT is not set | ||
612 | # CONFIG_MOUSE_LOGIBM is not set | ||
613 | # CONFIG_MOUSE_PC110PAD is not set | ||
614 | # CONFIG_MOUSE_VSXXXAA is not set | ||
615 | # CONFIG_INPUT_JOYSTICK is not set | ||
616 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
617 | # CONFIG_INPUT_MISC is not set | ||
338 | 618 | ||
339 | # | 619 | # |
340 | # Hardware I/O ports | 620 | # Hardware I/O ports |
341 | # | 621 | # |
342 | # CONFIG_SERIO is not set | 622 | CONFIG_SERIO=y |
623 | CONFIG_SERIO_I8042=y | ||
624 | CONFIG_SERIO_SERPORT=y | ||
625 | # CONFIG_SERIO_PARKBD is not set | ||
626 | CONFIG_SERIO_LIBPS2=y | ||
627 | # CONFIG_SERIO_RAW is not set | ||
343 | # CONFIG_GAMEPORT is not set | 628 | # CONFIG_GAMEPORT is not set |
344 | 629 | ||
345 | # | 630 | # |
346 | # Character devices | 631 | # Character devices |
347 | # | 632 | # |
348 | # CONFIG_VT is not set | 633 | CONFIG_VT=y |
634 | CONFIG_VT_CONSOLE=y | ||
635 | CONFIG_HW_CONSOLE=y | ||
636 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
349 | # CONFIG_SERIAL_NONSTANDARD is not set | 637 | # CONFIG_SERIAL_NONSTANDARD is not set |
350 | 638 | ||
351 | # | 639 | # |
352 | # Serial drivers | 640 | # Serial drivers |
353 | # | 641 | # |
354 | # CONFIG_SERIAL_8250 is not set | 642 | CONFIG_SERIAL_8250=m |
643 | CONFIG_SERIAL_8250_PNP=m | ||
644 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
645 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
646 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
355 | 647 | ||
356 | # | 648 | # |
357 | # Non-8250 serial port support | 649 | # Non-8250 serial port support |
358 | # | 650 | # |
359 | CONFIG_SERIAL_CORE=y | 651 | CONFIG_SERIAL_CORE=y |
360 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
361 | CONFIG_SERIAL_M32R_SIO=y | 652 | CONFIG_SERIAL_M32R_SIO=y |
362 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | 653 | # CONFIG_SERIAL_M32R_SIO_CONSOLE is not set |
363 | CONFIG_UNIX98_PTYS=y | 654 | CONFIG_UNIX98_PTYS=y |
364 | CONFIG_LEGACY_PTYS=y | 655 | CONFIG_LEGACY_PTYS=y |
365 | CONFIG_LEGACY_PTY_COUNT=256 | 656 | CONFIG_LEGACY_PTY_COUNT=256 |
657 | # CONFIG_PRINTER is not set | ||
658 | # CONFIG_PPDEV is not set | ||
659 | # CONFIG_TIPAR is not set | ||
366 | 660 | ||
367 | # | 661 | # |
368 | # IPMI | 662 | # IPMI |
@@ -372,13 +666,8 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
372 | # | 666 | # |
373 | # Watchdog Cards | 667 | # Watchdog Cards |
374 | # | 668 | # |
375 | CONFIG_WATCHDOG=y | 669 | # CONFIG_WATCHDOG is not set |
376 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 670 | # CONFIG_HW_RANDOM is not set |
377 | |||
378 | # | ||
379 | # Watchdog Device Drivers | ||
380 | # | ||
381 | CONFIG_SOFT_WATCHDOG=y | ||
382 | # CONFIG_RTC is not set | 671 | # CONFIG_RTC is not set |
383 | # CONFIG_DTLK is not set | 672 | # CONFIG_DTLK is not set |
384 | # CONFIG_R3964 is not set | 673 | # CONFIG_R3964 is not set |
@@ -386,21 +675,57 @@ CONFIG_SOFT_WATCHDOG=y | |||
386 | # | 675 | # |
387 | # Ftape, the floppy tape device driver | 676 | # Ftape, the floppy tape device driver |
388 | # | 677 | # |
389 | |||
390 | # | ||
391 | # PCMCIA character devices | ||
392 | # | ||
393 | # CONFIG_SYNCLINK_CS is not set | ||
394 | # CONFIG_RAW_DRIVER is not set | 678 | # CONFIG_RAW_DRIVER is not set |
395 | 679 | ||
396 | # | 680 | # |
397 | # TPM devices | 681 | # TPM devices |
398 | # | 682 | # |
683 | # CONFIG_TCG_TPM is not set | ||
399 | 684 | ||
400 | # | 685 | # |
401 | # I2C support | 686 | # I2C support |
402 | # | 687 | # |
403 | # CONFIG_I2C is not set | 688 | CONFIG_I2C=m |
689 | CONFIG_I2C_CHARDEV=m | ||
690 | |||
691 | # | ||
692 | # I2C Algorithms | ||
693 | # | ||
694 | CONFIG_I2C_ALGOBIT=m | ||
695 | CONFIG_I2C_ALGOPCF=m | ||
696 | # CONFIG_I2C_ALGOPCA is not set | ||
697 | |||
698 | # | ||
699 | # I2C Hardware Bus support | ||
700 | # | ||
701 | CONFIG_I2C_ELEKTOR=m | ||
702 | CONFIG_I2C_ISA=m | ||
703 | # CONFIG_I2C_OCORES is not set | ||
704 | # CONFIG_I2C_PARPORT is not set | ||
705 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
706 | # CONFIG_I2C_STUB is not set | ||
707 | # CONFIG_I2C_PCA_ISA is not set | ||
708 | |||
709 | # | ||
710 | # Miscellaneous I2C Chip support | ||
711 | # | ||
712 | # CONFIG_SENSORS_DS1337 is not set | ||
713 | # CONFIG_SENSORS_DS1374 is not set | ||
714 | # CONFIG_SENSORS_EEPROM is not set | ||
715 | # CONFIG_SENSORS_PCF8574 is not set | ||
716 | # CONFIG_SENSORS_PCA9539 is not set | ||
717 | # CONFIG_SENSORS_PCF8591 is not set | ||
718 | # CONFIG_SENSORS_MAX6875 is not set | ||
719 | # CONFIG_I2C_DEBUG_CORE is not set | ||
720 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
721 | # CONFIG_I2C_DEBUG_BUS is not set | ||
722 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
723 | |||
724 | # | ||
725 | # SPI support | ||
726 | # | ||
727 | # CONFIG_SPI is not set | ||
728 | # CONFIG_SPI_MASTER is not set | ||
404 | 729 | ||
405 | # | 730 | # |
406 | # Dallas's 1-wire bus | 731 | # Dallas's 1-wire bus |
@@ -410,21 +735,89 @@ CONFIG_SOFT_WATCHDOG=y | |||
410 | # | 735 | # |
411 | # Hardware Monitoring support | 736 | # Hardware Monitoring support |
412 | # | 737 | # |
413 | # CONFIG_HWMON is not set | 738 | CONFIG_HWMON=y |
414 | # CONFIG_HWMON_VID is not set | 739 | CONFIG_HWMON_VID=m |
740 | # CONFIG_SENSORS_ABITUGURU is not set | ||
741 | CONFIG_SENSORS_ADM1021=m | ||
742 | CONFIG_SENSORS_ADM1025=m | ||
743 | # CONFIG_SENSORS_ADM1026 is not set | ||
744 | CONFIG_SENSORS_ADM1031=m | ||
745 | # CONFIG_SENSORS_ADM9240 is not set | ||
746 | CONFIG_SENSORS_ASB100=m | ||
747 | # CONFIG_SENSORS_ATXP1 is not set | ||
748 | CONFIG_SENSORS_DS1621=m | ||
749 | # CONFIG_SENSORS_F71805F is not set | ||
750 | CONFIG_SENSORS_FSCHER=m | ||
751 | # CONFIG_SENSORS_FSCPOS is not set | ||
752 | CONFIG_SENSORS_GL518SM=m | ||
753 | # CONFIG_SENSORS_GL520SM is not set | ||
754 | CONFIG_SENSORS_IT87=m | ||
755 | # CONFIG_SENSORS_LM63 is not set | ||
756 | CONFIG_SENSORS_LM75=m | ||
757 | CONFIG_SENSORS_LM77=m | ||
758 | CONFIG_SENSORS_LM78=m | ||
759 | CONFIG_SENSORS_LM80=m | ||
760 | CONFIG_SENSORS_LM83=m | ||
761 | CONFIG_SENSORS_LM85=m | ||
762 | # CONFIG_SENSORS_LM87 is not set | ||
763 | CONFIG_SENSORS_LM90=m | ||
764 | # CONFIG_SENSORS_LM92 is not set | ||
765 | CONFIG_SENSORS_MAX1619=m | ||
766 | # CONFIG_SENSORS_PC87360 is not set | ||
767 | CONFIG_SENSORS_SMSC47M1=m | ||
768 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
769 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
770 | # CONFIG_SENSORS_VT1211 is not set | ||
771 | CONFIG_SENSORS_W83781D=m | ||
772 | # CONFIG_SENSORS_W83791D is not set | ||
773 | # CONFIG_SENSORS_W83792D is not set | ||
774 | CONFIG_SENSORS_W83L785TS=m | ||
775 | CONFIG_SENSORS_W83627HF=m | ||
776 | # CONFIG_SENSORS_W83627EHF is not set | ||
777 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
415 | 778 | ||
416 | # | 779 | # |
417 | # Misc devices | 780 | # Multimedia devices |
418 | # | 781 | # |
782 | CONFIG_VIDEO_DEV=m | ||
783 | CONFIG_VIDEO_V4L1=y | ||
784 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
785 | CONFIG_VIDEO_V4L2=y | ||
419 | 786 | ||
420 | # | 787 | # |
421 | # Multimedia Capabilities Port drivers | 788 | # Video Capture Adapters |
422 | # | 789 | # |
423 | 790 | ||
424 | # | 791 | # |
425 | # Multimedia devices | 792 | # Video Capture Adapters |
426 | # | 793 | # |
427 | # CONFIG_VIDEO_DEV is not set | 794 | # CONFIG_VIDEO_ADV_DEBUG is not set |
795 | CONFIG_VIDEO_HELPER_CHIPS_AUTO=y | ||
796 | # CONFIG_VIDEO_VIVI is not set | ||
797 | # CONFIG_VIDEO_PMS is not set | ||
798 | CONFIG_VIDEO_BWQCAM=m | ||
799 | CONFIG_VIDEO_CQCAM=m | ||
800 | # CONFIG_VIDEO_W9966 is not set | ||
801 | # CONFIG_VIDEO_CPIA is not set | ||
802 | # CONFIG_VIDEO_SAA5246A is not set | ||
803 | # CONFIG_VIDEO_SAA5249 is not set | ||
804 | # CONFIG_TUNER_3036 is not set | ||
805 | # CONFIG_VIDEO_M32R_AR is not set | ||
806 | |||
807 | # | ||
808 | # Radio Adapters | ||
809 | # | ||
810 | # CONFIG_RADIO_CADET is not set | ||
811 | # CONFIG_RADIO_RTRACK is not set | ||
812 | # CONFIG_RADIO_RTRACK2 is not set | ||
813 | # CONFIG_RADIO_AZTECH is not set | ||
814 | # CONFIG_RADIO_GEMTEK is not set | ||
815 | # CONFIG_RADIO_SF16FMI is not set | ||
816 | # CONFIG_RADIO_SF16FMR2 is not set | ||
817 | # CONFIG_RADIO_TERRATEC is not set | ||
818 | # CONFIG_RADIO_TRUST is not set | ||
819 | # CONFIG_RADIO_TYPHOON is not set | ||
820 | # CONFIG_RADIO_ZOLTRIX is not set | ||
428 | 821 | ||
429 | # | 822 | # |
430 | # Digital Video Broadcasting Devices | 823 | # Digital Video Broadcasting Devices |
@@ -434,9 +827,19 @@ CONFIG_SOFT_WATCHDOG=y | |||
434 | # | 827 | # |
435 | # Graphics support | 828 | # Graphics support |
436 | # | 829 | # |
830 | CONFIG_FIRMWARE_EDID=y | ||
437 | # CONFIG_FB is not set | 831 | # CONFIG_FB is not set |
438 | 832 | ||
439 | # | 833 | # |
834 | # Console display driver support | ||
835 | # | ||
836 | CONFIG_VGA_CONSOLE=y | ||
837 | # CONFIG_VGACON_SOFT_SCROLLBACK is not set | ||
838 | # CONFIG_MDA_CONSOLE is not set | ||
839 | CONFIG_DUMMY_CONSOLE=y | ||
840 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
841 | |||
842 | # | ||
440 | # Sound | 843 | # Sound |
441 | # | 844 | # |
442 | # CONFIG_SOUND is not set | 845 | # CONFIG_SOUND is not set |
@@ -446,6 +849,11 @@ CONFIG_SOFT_WATCHDOG=y | |||
446 | # | 849 | # |
447 | # CONFIG_USB_ARCH_HAS_HCD is not set | 850 | # CONFIG_USB_ARCH_HAS_HCD is not set |
448 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 851 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
852 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
853 | |||
854 | # | ||
855 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
856 | # | ||
449 | 857 | ||
450 | # | 858 | # |
451 | # USB Gadget Support | 859 | # USB Gadget Support |
@@ -458,33 +866,69 @@ CONFIG_SOFT_WATCHDOG=y | |||
458 | # CONFIG_MMC is not set | 866 | # CONFIG_MMC is not set |
459 | 867 | ||
460 | # | 868 | # |
869 | # LED devices | ||
870 | # | ||
871 | # CONFIG_NEW_LEDS is not set | ||
872 | |||
873 | # | ||
874 | # LED drivers | ||
875 | # | ||
876 | |||
877 | # | ||
878 | # LED Triggers | ||
879 | # | ||
880 | |||
881 | # | ||
461 | # InfiniBand support | 882 | # InfiniBand support |
462 | # | 883 | # |
463 | 884 | ||
464 | # | 885 | # |
465 | # SN Devices | 886 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) |
887 | # | ||
888 | |||
889 | # | ||
890 | # Real Time Clock | ||
891 | # | ||
892 | # CONFIG_RTC_CLASS is not set | ||
893 | |||
894 | # | ||
895 | # DMA Engine support | ||
896 | # | ||
897 | # CONFIG_DMA_ENGINE is not set | ||
898 | |||
899 | # | ||
900 | # DMA Clients | ||
901 | # | ||
902 | |||
903 | # | ||
904 | # DMA Devices | ||
466 | # | 905 | # |
467 | 906 | ||
468 | # | 907 | # |
469 | # File systems | 908 | # File systems |
470 | # | 909 | # |
471 | CONFIG_EXT2_FS=y | 910 | CONFIG_EXT2_FS=y |
472 | # CONFIG_EXT2_FS_XATTR is not set | 911 | CONFIG_EXT2_FS_XATTR=y |
473 | # CONFIG_EXT2_FS_XIP is not set | 912 | CONFIG_EXT2_FS_POSIX_ACL=y |
913 | CONFIG_EXT2_FS_SECURITY=y | ||
474 | CONFIG_EXT3_FS=y | 914 | CONFIG_EXT3_FS=y |
475 | CONFIG_EXT3_FS_XATTR=y | 915 | CONFIG_EXT3_FS_XATTR=y |
476 | CONFIG_EXT3_FS_POSIX_ACL=y | 916 | CONFIG_EXT3_FS_POSIX_ACL=y |
477 | # CONFIG_EXT3_FS_SECURITY is not set | 917 | CONFIG_EXT3_FS_SECURITY=y |
918 | # CONFIG_EXT4DEV_FS is not set | ||
478 | CONFIG_JBD=y | 919 | CONFIG_JBD=y |
479 | # CONFIG_JBD_DEBUG is not set | 920 | CONFIG_JBD_DEBUG=y |
480 | CONFIG_FS_MBCACHE=y | 921 | CONFIG_FS_MBCACHE=y |
481 | # CONFIG_REISERFS_FS is not set | 922 | # CONFIG_REISERFS_FS is not set |
482 | # CONFIG_JFS_FS is not set | 923 | # CONFIG_JFS_FS is not set |
483 | CONFIG_FS_POSIX_ACL=y | 924 | CONFIG_FS_POSIX_ACL=y |
484 | # CONFIG_XFS_FS is not set | 925 | # CONFIG_XFS_FS is not set |
926 | # CONFIG_GFS2_FS is not set | ||
927 | # CONFIG_OCFS2_FS is not set | ||
485 | # CONFIG_MINIX_FS is not set | 928 | # CONFIG_MINIX_FS is not set |
486 | # CONFIG_ROMFS_FS is not set | 929 | CONFIG_ROMFS_FS=y |
487 | # CONFIG_INOTIFY is not set | 930 | CONFIG_INOTIFY=y |
931 | CONFIG_INOTIFY_USER=y | ||
488 | # CONFIG_QUOTA is not set | 932 | # CONFIG_QUOTA is not set |
489 | CONFIG_DNOTIFY=y | 933 | CONFIG_DNOTIFY=y |
490 | # CONFIG_AUTOFS_FS is not set | 934 | # CONFIG_AUTOFS_FS is not set |
@@ -494,8 +938,11 @@ CONFIG_DNOTIFY=y | |||
494 | # | 938 | # |
495 | # CD-ROM/DVD Filesystems | 939 | # CD-ROM/DVD Filesystems |
496 | # | 940 | # |
497 | # CONFIG_ISO9660_FS is not set | 941 | CONFIG_ISO9660_FS=y |
498 | # CONFIG_UDF_FS is not set | 942 | CONFIG_JOLIET=y |
943 | # CONFIG_ZISOFS is not set | ||
944 | CONFIG_UDF_FS=m | ||
945 | CONFIG_UDF_NLS=y | ||
499 | 946 | ||
500 | # | 947 | # |
501 | # DOS/FAT/NT Filesystems | 948 | # DOS/FAT/NT Filesystems |
@@ -503,7 +950,7 @@ CONFIG_DNOTIFY=y | |||
503 | CONFIG_FAT_FS=y | 950 | CONFIG_FAT_FS=y |
504 | CONFIG_MSDOS_FS=y | 951 | CONFIG_MSDOS_FS=y |
505 | CONFIG_VFAT_FS=y | 952 | CONFIG_VFAT_FS=y |
506 | CONFIG_FAT_DEFAULT_CODEPAGE=932 | 953 | CONFIG_FAT_DEFAULT_CODEPAGE=437 |
507 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | 954 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" |
508 | # CONFIG_NTFS_FS is not set | 955 | # CONFIG_NTFS_FS is not set |
509 | 956 | ||
@@ -511,11 +958,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
511 | # Pseudo filesystems | 958 | # Pseudo filesystems |
512 | # | 959 | # |
513 | CONFIG_PROC_FS=y | 960 | CONFIG_PROC_FS=y |
961 | CONFIG_PROC_SYSCTL=y | ||
514 | CONFIG_SYSFS=y | 962 | CONFIG_SYSFS=y |
515 | CONFIG_TMPFS=y | 963 | CONFIG_TMPFS=y |
964 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
516 | # CONFIG_HUGETLB_PAGE is not set | 965 | # CONFIG_HUGETLB_PAGE is not set |
517 | CONFIG_RAMFS=y | 966 | CONFIG_RAMFS=y |
518 | # CONFIG_RELAYFS_FS is not set | 967 | CONFIG_CONFIGFS_FS=m |
519 | 968 | ||
520 | # | 969 | # |
521 | # Miscellaneous filesystems | 970 | # Miscellaneous filesystems |
@@ -527,7 +976,7 @@ CONFIG_RAMFS=y | |||
527 | # CONFIG_BEFS_FS is not set | 976 | # CONFIG_BEFS_FS is not set |
528 | # CONFIG_BFS_FS is not set | 977 | # CONFIG_BFS_FS is not set |
529 | # CONFIG_EFS_FS is not set | 978 | # CONFIG_EFS_FS is not set |
530 | CONFIG_CRAMFS=y | 979 | # CONFIG_CRAMFS is not set |
531 | # CONFIG_VXFS_FS is not set | 980 | # CONFIG_VXFS_FS is not set |
532 | # CONFIG_HPFS_FS is not set | 981 | # CONFIG_HPFS_FS is not set |
533 | # CONFIG_QNX4FS_FS is not set | 982 | # CONFIG_QNX4FS_FS is not set |
@@ -542,10 +991,14 @@ CONFIG_NFS_V3=y | |||
542 | # CONFIG_NFS_V3_ACL is not set | 991 | # CONFIG_NFS_V3_ACL is not set |
543 | # CONFIG_NFS_V4 is not set | 992 | # CONFIG_NFS_V4 is not set |
544 | # CONFIG_NFS_DIRECTIO is not set | 993 | # CONFIG_NFS_DIRECTIO is not set |
545 | # CONFIG_NFSD is not set | 994 | CONFIG_NFSD=m |
546 | CONFIG_ROOT_NFS=y | 995 | CONFIG_NFSD_V3=y |
996 | # CONFIG_NFSD_V3_ACL is not set | ||
997 | # CONFIG_NFSD_V4 is not set | ||
998 | # CONFIG_NFSD_TCP is not set | ||
547 | CONFIG_LOCKD=y | 999 | CONFIG_LOCKD=y |
548 | CONFIG_LOCKD_V4=y | 1000 | CONFIG_LOCKD_V4=y |
1001 | CONFIG_EXPORTFS=m | ||
549 | CONFIG_NFS_COMMON=y | 1002 | CONFIG_NFS_COMMON=y |
550 | CONFIG_SUNRPC=y | 1003 | CONFIG_SUNRPC=y |
551 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1004 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
@@ -567,7 +1020,7 @@ CONFIG_MSDOS_PARTITION=y | |||
567 | # Native Language Support | 1020 | # Native Language Support |
568 | # | 1021 | # |
569 | CONFIG_NLS=y | 1022 | CONFIG_NLS=y |
570 | CONFIG_NLS_DEFAULT="iso8859-1" | 1023 | CONFIG_NLS_DEFAULT="cp437" |
571 | CONFIG_NLS_CODEPAGE_437=y | 1024 | CONFIG_NLS_CODEPAGE_437=y |
572 | # CONFIG_NLS_CODEPAGE_737 is not set | 1025 | # CONFIG_NLS_CODEPAGE_737 is not set |
573 | # CONFIG_NLS_CODEPAGE_775 is not set | 1026 | # CONFIG_NLS_CODEPAGE_775 is not set |
@@ -592,7 +1045,7 @@ CONFIG_NLS_CODEPAGE_932=y | |||
592 | # CONFIG_NLS_CODEPAGE_1250 is not set | 1045 | # CONFIG_NLS_CODEPAGE_1250 is not set |
593 | # CONFIG_NLS_CODEPAGE_1251 is not set | 1046 | # CONFIG_NLS_CODEPAGE_1251 is not set |
594 | # CONFIG_NLS_ASCII is not set | 1047 | # CONFIG_NLS_ASCII is not set |
595 | # CONFIG_NLS_ISO8859_1 is not set | 1048 | CONFIG_NLS_ISO8859_1=y |
596 | # CONFIG_NLS_ISO8859_2 is not set | 1049 | # CONFIG_NLS_ISO8859_2 is not set |
597 | # CONFIG_NLS_ISO8859_3 is not set | 1050 | # CONFIG_NLS_ISO8859_3 is not set |
598 | # CONFIG_NLS_ISO8859_4 is not set | 1051 | # CONFIG_NLS_ISO8859_4 is not set |
@@ -605,32 +1058,28 @@ CONFIG_NLS_CODEPAGE_932=y | |||
605 | # CONFIG_NLS_ISO8859_15 is not set | 1058 | # CONFIG_NLS_ISO8859_15 is not set |
606 | # CONFIG_NLS_KOI8_R is not set | 1059 | # CONFIG_NLS_KOI8_R is not set |
607 | # CONFIG_NLS_KOI8_U is not set | 1060 | # CONFIG_NLS_KOI8_U is not set |
608 | CONFIG_NLS_UTF8=y | 1061 | # CONFIG_NLS_UTF8 is not set |
609 | 1062 | ||
610 | # | 1063 | # |
611 | # Profiling support | 1064 | # Profiling support |
612 | # | 1065 | # |
613 | # CONFIG_PROFILING is not set | 1066 | CONFIG_PROFILING=y |
1067 | CONFIG_OPROFILE=m | ||
614 | 1068 | ||
615 | # | 1069 | # |
616 | # Kernel hacking | 1070 | # Kernel hacking |
617 | # | 1071 | # |
618 | # CONFIG_PRINTK_TIME is not set | 1072 | # CONFIG_PRINTK_TIME is not set |
619 | CONFIG_DEBUG_KERNEL=y | 1073 | CONFIG_ENABLE_MUST_CHECK=y |
620 | CONFIG_MAGIC_SYSRQ=y | 1074 | # CONFIG_MAGIC_SYSRQ is not set |
1075 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1076 | # CONFIG_DEBUG_KERNEL is not set | ||
621 | CONFIG_LOG_BUF_SHIFT=14 | 1077 | CONFIG_LOG_BUF_SHIFT=14 |
622 | CONFIG_DETECT_SOFTLOCKUP=y | 1078 | CONFIG_DEBUG_BUGVERBOSE=y |
623 | # CONFIG_SCHEDSTATS is not set | ||
624 | # CONFIG_DEBUG_SLAB is not set | ||
625 | # CONFIG_DEBUG_SPINLOCK is not set | ||
626 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
627 | # CONFIG_DEBUG_KOBJECT is not set | ||
628 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
629 | CONFIG_DEBUG_INFO=y | ||
630 | # CONFIG_DEBUG_FS is not set | 1079 | # CONFIG_DEBUG_FS is not set |
631 | # CONFIG_FRAME_POINTER is not set | 1080 | # CONFIG_FRAME_POINTER is not set |
632 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1081 | # CONFIG_UNWIND_INFO is not set |
633 | # CONFIG_DEBUG_STACK_USAGE is not set | 1082 | # CONFIG_HEADERS_CHECK is not set |
634 | 1083 | ||
635 | # | 1084 | # |
636 | # Security options | 1085 | # Security options |
@@ -641,7 +1090,38 @@ CONFIG_DEBUG_INFO=y | |||
641 | # | 1090 | # |
642 | # Cryptographic options | 1091 | # Cryptographic options |
643 | # | 1092 | # |
644 | # CONFIG_CRYPTO is not set | 1093 | CONFIG_CRYPTO=y |
1094 | CONFIG_CRYPTO_ALGAPI=y | ||
1095 | CONFIG_CRYPTO_BLKCIPHER=m | ||
1096 | CONFIG_CRYPTO_HASH=y | ||
1097 | CONFIG_CRYPTO_MANAGER=y | ||
1098 | CONFIG_CRYPTO_HMAC=y | ||
1099 | CONFIG_CRYPTO_NULL=m | ||
1100 | CONFIG_CRYPTO_MD4=m | ||
1101 | CONFIG_CRYPTO_MD5=m | ||
1102 | CONFIG_CRYPTO_SHA1=m | ||
1103 | CONFIG_CRYPTO_SHA256=m | ||
1104 | CONFIG_CRYPTO_SHA512=m | ||
1105 | CONFIG_CRYPTO_WP512=m | ||
1106 | # CONFIG_CRYPTO_TGR192 is not set | ||
1107 | CONFIG_CRYPTO_ECB=m | ||
1108 | CONFIG_CRYPTO_CBC=m | ||
1109 | CONFIG_CRYPTO_DES=m | ||
1110 | CONFIG_CRYPTO_BLOWFISH=m | ||
1111 | CONFIG_CRYPTO_TWOFISH=m | ||
1112 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1113 | CONFIG_CRYPTO_SERPENT=m | ||
1114 | CONFIG_CRYPTO_AES=m | ||
1115 | # CONFIG_CRYPTO_CAST5 is not set | ||
1116 | # CONFIG_CRYPTO_CAST6 is not set | ||
1117 | # CONFIG_CRYPTO_TEA is not set | ||
1118 | # CONFIG_CRYPTO_ARC4 is not set | ||
1119 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1120 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1121 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1122 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1123 | CONFIG_CRYPTO_CRC32C=m | ||
1124 | # CONFIG_CRYPTO_TEST is not set | ||
645 | 1125 | ||
646 | # | 1126 | # |
647 | # Hardware crypto devices | 1127 | # Hardware crypto devices |
@@ -650,8 +1130,12 @@ CONFIG_DEBUG_INFO=y | |||
650 | # | 1130 | # |
651 | # Library routines | 1131 | # Library routines |
652 | # | 1132 | # |
653 | # CONFIG_CRC_CCITT is not set | 1133 | CONFIG_CRC_CCITT=m |
654 | # CONFIG_CRC16 is not set | 1134 | CONFIG_CRC16=m |
655 | CONFIG_CRC32=y | 1135 | CONFIG_CRC32=y |
656 | CONFIG_LIBCRC32C=y | 1136 | CONFIG_LIBCRC32C=m |
657 | CONFIG_ZLIB_INFLATE=y | 1137 | CONFIG_TEXTSEARCH=y |
1138 | CONFIG_TEXTSEARCH_KMP=m | ||
1139 | CONFIG_TEXTSEARCH_BM=m | ||
1140 | CONFIG_TEXTSEARCH_FSM=m | ||
1141 | CONFIG_PLIST=y | ||
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.smp b/arch/m32r/m32700ut/defconfig.m32700ut.smp index 3e607d90b5f4..13579917afef 100644 --- a/arch/m32r/m32700ut/defconfig.m32700ut.smp +++ b/arch/m32r/m32700ut/defconfig.m32700ut.smp | |||
@@ -1,19 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:20:58 2005 | 4 | # Tue Dec 12 17:52:38 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_LOCK_KERNEL=y | 16 | CONFIG_LOCK_KERNEL=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 17 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
19 | 18 | ||
@@ -21,33 +20,40 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
21 | # General setup | 20 | # General setup |
22 | # | 21 | # |
23 | CONFIG_LOCALVERSION="" | 22 | CONFIG_LOCALVERSION="" |
23 | CONFIG_LOCALVERSION_AUTO=y | ||
24 | CONFIG_SWAP=y | 24 | CONFIG_SWAP=y |
25 | CONFIG_SYSVIPC=y | 25 | CONFIG_SYSVIPC=y |
26 | # CONFIG_IPC_NS is not set | ||
26 | # CONFIG_POSIX_MQUEUE is not set | 27 | # CONFIG_POSIX_MQUEUE is not set |
27 | CONFIG_BSD_PROCESS_ACCT=y | 28 | CONFIG_BSD_PROCESS_ACCT=y |
28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
29 | CONFIG_SYSCTL=y | 30 | # CONFIG_TASKSTATS is not set |
31 | # CONFIG_UTS_NS is not set | ||
30 | # CONFIG_AUDIT is not set | 32 | # CONFIG_AUDIT is not set |
31 | CONFIG_HOTPLUG=y | ||
32 | CONFIG_KOBJECT_UEVENT=y | ||
33 | CONFIG_IKCONFIG=y | 33 | CONFIG_IKCONFIG=y |
34 | # CONFIG_IKCONFIG_PROC is not set | 34 | CONFIG_IKCONFIG_PROC=y |
35 | # CONFIG_CPUSETS is not set | 35 | # CONFIG_CPUSETS is not set |
36 | CONFIG_SYSFS_DEPRECATED=y | ||
37 | # CONFIG_RELAY is not set | ||
38 | CONFIG_INITRAMFS_SOURCE="" | ||
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
40 | CONFIG_SYSCTL=y | ||
36 | CONFIG_EMBEDDED=y | 41 | CONFIG_EMBEDDED=y |
42 | CONFIG_SYSCTL_SYSCALL=y | ||
37 | # CONFIG_KALLSYMS is not set | 43 | # CONFIG_KALLSYMS is not set |
44 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_PRINTK=y | 45 | CONFIG_PRINTK=y |
39 | CONFIG_BUG=y | 46 | CONFIG_BUG=y |
47 | CONFIG_ELF_CORE=y | ||
40 | CONFIG_BASE_FULL=y | 48 | CONFIG_BASE_FULL=y |
41 | # CONFIG_FUTEX is not set | 49 | # CONFIG_FUTEX is not set |
42 | # CONFIG_EPOLL is not set | 50 | # CONFIG_EPOLL is not set |
43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
44 | CONFIG_SHMEM=y | 51 | CONFIG_SHMEM=y |
45 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 52 | CONFIG_SLAB=y |
46 | CONFIG_CC_ALIGN_LABELS=0 | 53 | CONFIG_VM_EVENT_COUNTERS=y |
47 | CONFIG_CC_ALIGN_LOOPS=0 | ||
48 | CONFIG_CC_ALIGN_JUMPS=0 | ||
49 | # CONFIG_TINY_SHMEM is not set | 54 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | 55 | CONFIG_BASE_SMALL=0 |
56 | # CONFIG_SLOB is not set | ||
51 | 57 | ||
52 | # | 58 | # |
53 | # Loadable module support | 59 | # Loadable module support |
@@ -55,13 +61,31 @@ CONFIG_BASE_SMALL=0 | |||
55 | CONFIG_MODULES=y | 61 | CONFIG_MODULES=y |
56 | CONFIG_MODULE_UNLOAD=y | 62 | CONFIG_MODULE_UNLOAD=y |
57 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 63 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
58 | CONFIG_OBSOLETE_MODPARM=y | ||
59 | # CONFIG_MODVERSIONS is not set | 64 | # CONFIG_MODVERSIONS is not set |
60 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 65 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
61 | CONFIG_KMOD=y | 66 | CONFIG_KMOD=y |
62 | CONFIG_STOP_MACHINE=y | 67 | CONFIG_STOP_MACHINE=y |
63 | 68 | ||
64 | # | 69 | # |
70 | # Block layer | ||
71 | # | ||
72 | CONFIG_BLOCK=y | ||
73 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
74 | |||
75 | # | ||
76 | # IO Schedulers | ||
77 | # | ||
78 | CONFIG_IOSCHED_NOOP=y | ||
79 | # CONFIG_IOSCHED_AS is not set | ||
80 | CONFIG_IOSCHED_DEADLINE=y | ||
81 | CONFIG_IOSCHED_CFQ=y | ||
82 | # CONFIG_DEFAULT_AS is not set | ||
83 | # CONFIG_DEFAULT_DEADLINE is not set | ||
84 | CONFIG_DEFAULT_CFQ=y | ||
85 | # CONFIG_DEFAULT_NOOP is not set | ||
86 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
87 | |||
88 | # | ||
65 | # Processor type and features | 89 | # Processor type and features |
66 | # | 90 | # |
67 | # CONFIG_PLAT_MAPPI is not set | 91 | # CONFIG_PLAT_MAPPI is not set |
@@ -71,8 +95,10 @@ CONFIG_PLAT_M32700UT=y | |||
71 | # CONFIG_PLAT_OAKS32R is not set | 95 | # CONFIG_PLAT_OAKS32R is not set |
72 | # CONFIG_PLAT_MAPPI2 is not set | 96 | # CONFIG_PLAT_MAPPI2 is not set |
73 | # CONFIG_PLAT_MAPPI3 is not set | 97 | # CONFIG_PLAT_MAPPI3 is not set |
98 | # CONFIG_PLAT_M32104UT is not set | ||
74 | CONFIG_CHIP_M32700=y | 99 | CONFIG_CHIP_M32700=y |
75 | # CONFIG_CHIP_M32102 is not set | 100 | # CONFIG_CHIP_M32102 is not set |
101 | # CONFIG_CHIP_M32104 is not set | ||
76 | # CONFIG_CHIP_VDEC2 is not set | 102 | # CONFIG_CHIP_VDEC2 is not set |
77 | # CONFIG_CHIP_OPSP is not set | 103 | # CONFIG_CHIP_OPSP is not set |
78 | CONFIG_MMU=y | 104 | CONFIG_MMU=y |
@@ -86,37 +112,39 @@ CONFIG_TIMER_DIVIDE=128 | |||
86 | CONFIG_MEMORY_START=0x08000000 | 112 | CONFIG_MEMORY_START=0x08000000 |
87 | CONFIG_MEMORY_SIZE=0x01000000 | 113 | CONFIG_MEMORY_SIZE=0x01000000 |
88 | CONFIG_NOHIGHMEM=y | 114 | CONFIG_NOHIGHMEM=y |
89 | # CONFIG_DISCONTIGMEM is not set | 115 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
116 | CONFIG_SELECT_MEMORY_MODEL=y | ||
117 | # CONFIG_FLATMEM_MANUAL is not set | ||
118 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
119 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
120 | CONFIG_DISCONTIGMEM=y | ||
121 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
122 | CONFIG_NEED_MULTIPLE_NODES=y | ||
123 | # CONFIG_SPARSEMEM_STATIC is not set | ||
124 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
125 | # CONFIG_RESOURCES_64BIT is not set | ||
126 | CONFIG_IRAM_START=0x00f00000 | ||
127 | CONFIG_IRAM_SIZE=0x00080000 | ||
90 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 128 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
91 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 129 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
130 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
131 | CONFIG_GENERIC_HWEIGHT=y | ||
92 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 132 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
93 | CONFIG_PREEMPT=y | 133 | CONFIG_PREEMPT=y |
94 | # CONFIG_HAVE_DEC_LOCK is not set | ||
95 | CONFIG_SMP=y | 134 | CONFIG_SMP=y |
96 | CONFIG_CHIP_M32700_TS1=y | 135 | # CONFIG_CHIP_M32700_TS1 is not set |
97 | CONFIG_NR_CPUS=2 | 136 | CONFIG_NR_CPUS=2 |
98 | # CONFIG_NUMA is not set | 137 | CONFIG_NODES_SHIFT=1 |
99 | 138 | ||
100 | # | 139 | # |
101 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 140 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
102 | # | 141 | # |
103 | # CONFIG_PCI is not set | ||
104 | # CONFIG_ISA is not set | 142 | # CONFIG_ISA is not set |
105 | 143 | ||
106 | # | 144 | # |
107 | # PCCARD (PCMCIA/CardBus) support | 145 | # PCCARD (PCMCIA/CardBus) support |
108 | # | 146 | # |
109 | CONFIG_PCCARD=y | 147 | # CONFIG_PCCARD is not set |
110 | # CONFIG_PCMCIA_DEBUG is not set | ||
111 | CONFIG_PCMCIA=y | ||
112 | |||
113 | # | ||
114 | # PC-card bridges | ||
115 | # | ||
116 | # CONFIG_TCIC is not set | ||
117 | # CONFIG_M32R_PCC is not set | ||
118 | CONFIG_M32R_CFC=y | ||
119 | CONFIG_M32R_CFC_NUM=1 | ||
120 | 148 | ||
121 | # | 149 | # |
122 | # PCI Hotplug Support | 150 | # PCI Hotplug Support |
@@ -129,6 +157,94 @@ CONFIG_BINFMT_ELF=y | |||
129 | # CONFIG_BINFMT_MISC is not set | 157 | # CONFIG_BINFMT_MISC is not set |
130 | 158 | ||
131 | # | 159 | # |
160 | # Networking | ||
161 | # | ||
162 | CONFIG_NET=y | ||
163 | |||
164 | # | ||
165 | # Networking options | ||
166 | # | ||
167 | # CONFIG_NETDEBUG is not set | ||
168 | CONFIG_PACKET=y | ||
169 | # CONFIG_PACKET_MMAP is not set | ||
170 | CONFIG_UNIX=y | ||
171 | CONFIG_XFRM=y | ||
172 | # CONFIG_XFRM_USER is not set | ||
173 | # CONFIG_XFRM_SUB_POLICY is not set | ||
174 | # CONFIG_NET_KEY is not set | ||
175 | CONFIG_INET=y | ||
176 | # CONFIG_IP_MULTICAST is not set | ||
177 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
178 | CONFIG_IP_FIB_HASH=y | ||
179 | CONFIG_IP_PNP=y | ||
180 | CONFIG_IP_PNP_DHCP=y | ||
181 | # CONFIG_IP_PNP_BOOTP is not set | ||
182 | # CONFIG_IP_PNP_RARP is not set | ||
183 | # CONFIG_NET_IPIP is not set | ||
184 | # CONFIG_NET_IPGRE is not set | ||
185 | # CONFIG_ARPD is not set | ||
186 | # CONFIG_SYN_COOKIES is not set | ||
187 | # CONFIG_INET_AH is not set | ||
188 | # CONFIG_INET_ESP is not set | ||
189 | # CONFIG_INET_IPCOMP is not set | ||
190 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
191 | # CONFIG_INET_TUNNEL is not set | ||
192 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
193 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
194 | CONFIG_INET_XFRM_MODE_BEET=y | ||
195 | CONFIG_INET_DIAG=y | ||
196 | CONFIG_INET_TCP_DIAG=y | ||
197 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
198 | CONFIG_TCP_CONG_CUBIC=y | ||
199 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
200 | # CONFIG_TCP_MD5SIG is not set | ||
201 | # CONFIG_IPV6 is not set | ||
202 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
203 | # CONFIG_INET6_TUNNEL is not set | ||
204 | # CONFIG_NETWORK_SECMARK is not set | ||
205 | # CONFIG_NETFILTER is not set | ||
206 | |||
207 | # | ||
208 | # DCCP Configuration (EXPERIMENTAL) | ||
209 | # | ||
210 | # CONFIG_IP_DCCP is not set | ||
211 | |||
212 | # | ||
213 | # SCTP Configuration (EXPERIMENTAL) | ||
214 | # | ||
215 | # CONFIG_IP_SCTP is not set | ||
216 | |||
217 | # | ||
218 | # TIPC Configuration (EXPERIMENTAL) | ||
219 | # | ||
220 | # CONFIG_TIPC is not set | ||
221 | # CONFIG_ATM is not set | ||
222 | # CONFIG_BRIDGE is not set | ||
223 | # CONFIG_VLAN_8021Q is not set | ||
224 | # CONFIG_DECNET is not set | ||
225 | # CONFIG_LLC2 is not set | ||
226 | # CONFIG_IPX is not set | ||
227 | # CONFIG_ATALK is not set | ||
228 | # CONFIG_X25 is not set | ||
229 | # CONFIG_LAPB is not set | ||
230 | # CONFIG_ECONET is not set | ||
231 | # CONFIG_WAN_ROUTER is not set | ||
232 | |||
233 | # | ||
234 | # QoS and/or fair queueing | ||
235 | # | ||
236 | # CONFIG_NET_SCHED is not set | ||
237 | |||
238 | # | ||
239 | # Network testing | ||
240 | # | ||
241 | # CONFIG_NET_PKTGEN is not set | ||
242 | # CONFIG_HAMRADIO is not set | ||
243 | # CONFIG_IRDA is not set | ||
244 | # CONFIG_BT is not set | ||
245 | # CONFIG_IEEE80211 is not set | ||
246 | |||
247 | # | ||
132 | # Device Drivers | 248 | # Device Drivers |
133 | # | 249 | # |
134 | 250 | ||
@@ -137,12 +253,100 @@ CONFIG_BINFMT_ELF=y | |||
137 | # | 253 | # |
138 | CONFIG_STANDALONE=y | 254 | CONFIG_STANDALONE=y |
139 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 255 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
140 | # CONFIG_FW_LOADER is not set | 256 | CONFIG_FW_LOADER=y |
257 | # CONFIG_SYS_HYPERVISOR is not set | ||
258 | |||
259 | # | ||
260 | # Connector - unified userspace <-> kernelspace linker | ||
261 | # | ||
262 | # CONFIG_CONNECTOR is not set | ||
141 | 263 | ||
142 | # | 264 | # |
143 | # Memory Technology Devices (MTD) | 265 | # Memory Technology Devices (MTD) |
144 | # | 266 | # |
145 | # CONFIG_MTD is not set | 267 | CONFIG_MTD=y |
268 | # CONFIG_MTD_DEBUG is not set | ||
269 | # CONFIG_MTD_CONCAT is not set | ||
270 | CONFIG_MTD_PARTITIONS=y | ||
271 | CONFIG_MTD_REDBOOT_PARTS=y | ||
272 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
273 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
274 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
275 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
276 | |||
277 | # | ||
278 | # User Modules And Translation Layers | ||
279 | # | ||
280 | # CONFIG_MTD_CHAR is not set | ||
281 | CONFIG_MTD_BLOCK=y | ||
282 | # CONFIG_FTL is not set | ||
283 | # CONFIG_NFTL is not set | ||
284 | # CONFIG_INFTL is not set | ||
285 | # CONFIG_RFD_FTL is not set | ||
286 | # CONFIG_SSFDC is not set | ||
287 | |||
288 | # | ||
289 | # RAM/ROM/Flash chip drivers | ||
290 | # | ||
291 | CONFIG_MTD_CFI=m | ||
292 | CONFIG_MTD_JEDECPROBE=m | ||
293 | CONFIG_MTD_GEN_PROBE=m | ||
294 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
295 | # CONFIG_MTD_CFI_NOSWAP is not set | ||
296 | CONFIG_MTD_CFI_BE_BYTE_SWAP=y | ||
297 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
298 | CONFIG_MTD_CFI_GEOMETRY=y | ||
299 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
300 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
301 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
302 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
303 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
304 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
305 | CONFIG_MTD_CFI_I1=y | ||
306 | # CONFIG_MTD_CFI_I2 is not set | ||
307 | # CONFIG_MTD_CFI_I4 is not set | ||
308 | # CONFIG_MTD_CFI_I8 is not set | ||
309 | # CONFIG_MTD_OTP is not set | ||
310 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
311 | CONFIG_MTD_CFI_AMDSTD=m | ||
312 | # CONFIG_MTD_CFI_STAA is not set | ||
313 | CONFIG_MTD_CFI_UTIL=m | ||
314 | # CONFIG_MTD_RAM is not set | ||
315 | # CONFIG_MTD_ROM is not set | ||
316 | # CONFIG_MTD_ABSENT is not set | ||
317 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
318 | |||
319 | # | ||
320 | # Mapping drivers for chip access | ||
321 | # | ||
322 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
323 | # CONFIG_MTD_PHYSMAP is not set | ||
324 | # CONFIG_MTD_PLATRAM is not set | ||
325 | |||
326 | # | ||
327 | # Self-contained MTD device drivers | ||
328 | # | ||
329 | # CONFIG_MTD_SLRAM is not set | ||
330 | # CONFIG_MTD_PHRAM is not set | ||
331 | # CONFIG_MTD_MTDRAM is not set | ||
332 | # CONFIG_MTD_BLOCK2MTD is not set | ||
333 | |||
334 | # | ||
335 | # Disk-On-Chip Device Drivers | ||
336 | # | ||
337 | # CONFIG_MTD_DOC2000 is not set | ||
338 | # CONFIG_MTD_DOC2001 is not set | ||
339 | # CONFIG_MTD_DOC2001PLUS is not set | ||
340 | |||
341 | # | ||
342 | # NAND Flash Device Drivers | ||
343 | # | ||
344 | # CONFIG_MTD_NAND is not set | ||
345 | |||
346 | # | ||
347 | # OneNAND Flash Device Drivers | ||
348 | # | ||
349 | # CONFIG_MTD_ONENAND is not set | ||
146 | 350 | ||
147 | # | 351 | # |
148 | # Parallel port support | 352 | # Parallel port support |
@@ -156,7 +360,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
156 | # | 360 | # |
157 | # Block devices | 361 | # Block devices |
158 | # | 362 | # |
159 | # CONFIG_BLK_DEV_FD is not set | ||
160 | # CONFIG_BLK_DEV_COW_COMMON is not set | 363 | # CONFIG_BLK_DEV_COW_COMMON is not set |
161 | CONFIG_BLK_DEV_LOOP=y | 364 | CONFIG_BLK_DEV_LOOP=y |
162 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 365 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -164,23 +367,21 @@ CONFIG_BLK_DEV_NBD=y | |||
164 | CONFIG_BLK_DEV_RAM=y | 367 | CONFIG_BLK_DEV_RAM=y |
165 | CONFIG_BLK_DEV_RAM_COUNT=16 | 368 | CONFIG_BLK_DEV_RAM_COUNT=16 |
166 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 369 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
370 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
167 | # CONFIG_BLK_DEV_INITRD is not set | 371 | # CONFIG_BLK_DEV_INITRD is not set |
168 | CONFIG_INITRAMFS_SOURCE="" | ||
169 | # CONFIG_CDROM_PKTCDVD is not set | 372 | # CONFIG_CDROM_PKTCDVD is not set |
373 | CONFIG_ATA_OVER_ETH=m | ||
170 | 374 | ||
171 | # | 375 | # |
172 | # IO Schedulers | 376 | # Misc devices |
173 | # | 377 | # |
174 | CONFIG_IOSCHED_NOOP=y | 378 | # CONFIG_TIFM_CORE is not set |
175 | # CONFIG_IOSCHED_AS is not set | ||
176 | CONFIG_IOSCHED_DEADLINE=y | ||
177 | CONFIG_IOSCHED_CFQ=y | ||
178 | # CONFIG_ATA_OVER_ETH is not set | ||
179 | 379 | ||
180 | # | 380 | # |
181 | # ATA/ATAPI/MFM/RLL support | 381 | # ATA/ATAPI/MFM/RLL support |
182 | # | 382 | # |
183 | CONFIG_IDE=y | 383 | CONFIG_IDE=y |
384 | CONFIG_IDE_MAX_HWIFS=4 | ||
184 | CONFIG_BLK_DEV_IDE=y | 385 | CONFIG_BLK_DEV_IDE=y |
185 | 386 | ||
186 | # | 387 | # |
@@ -189,7 +390,6 @@ CONFIG_BLK_DEV_IDE=y | |||
189 | # CONFIG_BLK_DEV_IDE_SATA is not set | 390 | # CONFIG_BLK_DEV_IDE_SATA is not set |
190 | CONFIG_BLK_DEV_IDEDISK=y | 391 | CONFIG_BLK_DEV_IDEDISK=y |
191 | # CONFIG_IDEDISK_MULTI_MODE is not set | 392 | # CONFIG_IDEDISK_MULTI_MODE is not set |
192 | CONFIG_BLK_DEV_IDECS=y | ||
193 | CONFIG_BLK_DEV_IDECD=m | 393 | CONFIG_BLK_DEV_IDECD=m |
194 | # CONFIG_BLK_DEV_IDETAPE is not set | 394 | # CONFIG_BLK_DEV_IDETAPE is not set |
195 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | 395 | # CONFIG_BLK_DEV_IDEFLOPPY is not set |
@@ -208,7 +408,9 @@ CONFIG_IDE_GENERIC=y | |||
208 | # | 408 | # |
209 | # SCSI device support | 409 | # SCSI device support |
210 | # | 410 | # |
411 | # CONFIG_RAID_ATTRS is not set | ||
211 | CONFIG_SCSI=m | 412 | CONFIG_SCSI=m |
413 | # CONFIG_SCSI_NETLINK is not set | ||
212 | CONFIG_SCSI_PROC_FS=y | 414 | CONFIG_SCSI_PROC_FS=y |
213 | 415 | ||
214 | # | 416 | # |
@@ -220,6 +422,7 @@ CONFIG_BLK_DEV_SD=m | |||
220 | CONFIG_BLK_DEV_SR=m | 422 | CONFIG_BLK_DEV_SR=m |
221 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 423 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
222 | CONFIG_CHR_DEV_SG=m | 424 | CONFIG_CHR_DEV_SG=m |
425 | # CONFIG_CHR_DEV_SCH is not set | ||
223 | 426 | ||
224 | # | 427 | # |
225 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | 428 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs |
@@ -229,26 +432,23 @@ CONFIG_SCSI_MULTI_LUN=y | |||
229 | # CONFIG_SCSI_LOGGING is not set | 432 | # CONFIG_SCSI_LOGGING is not set |
230 | 433 | ||
231 | # | 434 | # |
232 | # SCSI Transport Attributes | 435 | # SCSI Transports |
233 | # | 436 | # |
234 | # CONFIG_SCSI_SPI_ATTRS is not set | 437 | # CONFIG_SCSI_SPI_ATTRS is not set |
235 | # CONFIG_SCSI_FC_ATTRS is not set | 438 | # CONFIG_SCSI_FC_ATTRS is not set |
236 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 439 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
440 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
441 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
237 | 442 | ||
238 | # | 443 | # |
239 | # SCSI low-level drivers | 444 | # SCSI low-level drivers |
240 | # | 445 | # |
241 | # CONFIG_SCSI_SATA is not set | 446 | # CONFIG_ISCSI_TCP is not set |
242 | # CONFIG_SCSI_DEBUG is not set | 447 | # CONFIG_SCSI_DEBUG is not set |
243 | 448 | ||
244 | # | 449 | # |
245 | # PCMCIA SCSI adapter support | 450 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
246 | # | 451 | # |
247 | # CONFIG_PCMCIA_AHA152X is not set | ||
248 | # CONFIG_PCMCIA_FDOMAIN is not set | ||
249 | # CONFIG_PCMCIA_NINJA_SCSI is not set | ||
250 | # CONFIG_PCMCIA_QLOGIC is not set | ||
251 | # CONFIG_PCMCIA_SYM53C500 is not set | ||
252 | 452 | ||
253 | # | 453 | # |
254 | # Multi-device support (RAID and LVM) | 454 | # Multi-device support (RAID and LVM) |
@@ -258,6 +458,7 @@ CONFIG_SCSI_MULTI_LUN=y | |||
258 | # | 458 | # |
259 | # Fusion MPT device support | 459 | # Fusion MPT device support |
260 | # | 460 | # |
461 | # CONFIG_FUSION is not set | ||
261 | 462 | ||
262 | # | 463 | # |
263 | # IEEE 1394 (FireWire) support | 464 | # IEEE 1394 (FireWire) support |
@@ -268,69 +469,8 @@ CONFIG_SCSI_MULTI_LUN=y | |||
268 | # | 469 | # |
269 | 470 | ||
270 | # | 471 | # |
271 | # Networking support | 472 | # Network device support |
272 | # | ||
273 | CONFIG_NET=y | ||
274 | |||
275 | # | ||
276 | # Networking options | ||
277 | # | ||
278 | CONFIG_PACKET=y | ||
279 | # CONFIG_PACKET_MMAP is not set | ||
280 | CONFIG_UNIX=y | ||
281 | # CONFIG_NET_KEY is not set | ||
282 | CONFIG_INET=y | ||
283 | # CONFIG_IP_MULTICAST is not set | ||
284 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
285 | CONFIG_IP_PNP=y | ||
286 | CONFIG_IP_PNP_DHCP=y | ||
287 | # CONFIG_IP_PNP_BOOTP is not set | ||
288 | # CONFIG_IP_PNP_RARP is not set | ||
289 | # CONFIG_NET_IPIP is not set | ||
290 | # CONFIG_NET_IPGRE is not set | ||
291 | # CONFIG_ARPD is not set | ||
292 | # CONFIG_SYN_COOKIES is not set | ||
293 | # CONFIG_INET_AH is not set | ||
294 | # CONFIG_INET_ESP is not set | ||
295 | # CONFIG_INET_IPCOMP is not set | ||
296 | # CONFIG_INET_TUNNEL is not set | ||
297 | CONFIG_IP_TCPDIAG=y | ||
298 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
299 | # CONFIG_IPV6 is not set | ||
300 | # CONFIG_NETFILTER is not set | ||
301 | |||
302 | # | ||
303 | # SCTP Configuration (EXPERIMENTAL) | ||
304 | # | ||
305 | # CONFIG_IP_SCTP is not set | ||
306 | # CONFIG_ATM is not set | ||
307 | # CONFIG_BRIDGE is not set | ||
308 | # CONFIG_VLAN_8021Q is not set | ||
309 | # CONFIG_DECNET is not set | ||
310 | # CONFIG_LLC2 is not set | ||
311 | # CONFIG_IPX is not set | ||
312 | # CONFIG_ATALK is not set | ||
313 | # CONFIG_X25 is not set | ||
314 | # CONFIG_LAPB is not set | ||
315 | # CONFIG_NET_DIVERT is not set | ||
316 | # CONFIG_ECONET is not set | ||
317 | # CONFIG_WAN_ROUTER is not set | ||
318 | |||
319 | # | ||
320 | # QoS and/or fair queueing | ||
321 | # | ||
322 | # CONFIG_NET_SCHED is not set | ||
323 | # CONFIG_NET_CLS_ROUTE is not set | ||
324 | |||
325 | # | ||
326 | # Network testing | ||
327 | # | 473 | # |
328 | # CONFIG_NET_PKTGEN is not set | ||
329 | # CONFIG_NETPOLL is not set | ||
330 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
331 | # CONFIG_HAMRADIO is not set | ||
332 | # CONFIG_IRDA is not set | ||
333 | # CONFIG_BT is not set | ||
334 | CONFIG_NETDEVICES=y | 474 | CONFIG_NETDEVICES=y |
335 | # CONFIG_DUMMY is not set | 475 | # CONFIG_DUMMY is not set |
336 | # CONFIG_BONDING is not set | 476 | # CONFIG_BONDING is not set |
@@ -338,6 +478,11 @@ CONFIG_NETDEVICES=y | |||
338 | # CONFIG_TUN is not set | 478 | # CONFIG_TUN is not set |
339 | 479 | ||
340 | # | 480 | # |
481 | # PHY device support | ||
482 | # | ||
483 | # CONFIG_PHYLIB is not set | ||
484 | |||
485 | # | ||
341 | # Ethernet (10 or 100Mbit) | 486 | # Ethernet (10 or 100Mbit) |
342 | # | 487 | # |
343 | CONFIG_NET_ETHERNET=y | 488 | CONFIG_NET_ETHERNET=y |
@@ -363,11 +508,6 @@ CONFIG_SMC91X=y | |||
363 | # CONFIG_NET_RADIO is not set | 508 | # CONFIG_NET_RADIO is not set |
364 | 509 | ||
365 | # | 510 | # |
366 | # PCMCIA network device support | ||
367 | # | ||
368 | # CONFIG_NET_PCMCIA is not set | ||
369 | |||
370 | # | ||
371 | # Wan interfaces | 511 | # Wan interfaces |
372 | # | 512 | # |
373 | # CONFIG_WAN is not set | 513 | # CONFIG_WAN is not set |
@@ -375,6 +515,8 @@ CONFIG_SMC91X=y | |||
375 | # CONFIG_SLIP is not set | 515 | # CONFIG_SLIP is not set |
376 | # CONFIG_SHAPER is not set | 516 | # CONFIG_SHAPER is not set |
377 | # CONFIG_NETCONSOLE is not set | 517 | # CONFIG_NETCONSOLE is not set |
518 | # CONFIG_NETPOLL is not set | ||
519 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
378 | 520 | ||
379 | # | 521 | # |
380 | # ISDN subsystem | 522 | # ISDN subsystem |
@@ -390,6 +532,7 @@ CONFIG_SMC91X=y | |||
390 | # Input device support | 532 | # Input device support |
391 | # | 533 | # |
392 | CONFIG_INPUT=y | 534 | CONFIG_INPUT=y |
535 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
393 | 536 | ||
394 | # | 537 | # |
395 | # Userland interfaces | 538 | # Userland interfaces |
@@ -418,7 +561,6 @@ CONFIG_SERIO_SERPORT=y | |||
418 | # CONFIG_SERIO_LIBPS2 is not set | 561 | # CONFIG_SERIO_LIBPS2 is not set |
419 | # CONFIG_SERIO_RAW is not set | 562 | # CONFIG_SERIO_RAW is not set |
420 | # CONFIG_GAMEPORT is not set | 563 | # CONFIG_GAMEPORT is not set |
421 | CONFIG_SOUND_GAMEPORT=y | ||
422 | 564 | ||
423 | # | 565 | # |
424 | # Character devices | 566 | # Character devices |
@@ -426,6 +568,7 @@ CONFIG_SOUND_GAMEPORT=y | |||
426 | CONFIG_VT=y | 568 | CONFIG_VT=y |
427 | CONFIG_VT_CONSOLE=y | 569 | CONFIG_VT_CONSOLE=y |
428 | CONFIG_HW_CONSOLE=y | 570 | CONFIG_HW_CONSOLE=y |
571 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
429 | # CONFIG_SERIAL_NONSTANDARD is not set | 572 | # CONFIG_SERIAL_NONSTANDARD is not set |
430 | 573 | ||
431 | # | 574 | # |
@@ -454,8 +597,8 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
454 | # Watchdog Cards | 597 | # Watchdog Cards |
455 | # | 598 | # |
456 | # CONFIG_WATCHDOG is not set | 599 | # CONFIG_WATCHDOG is not set |
600 | CONFIG_HW_RANDOM=y | ||
457 | # CONFIG_RTC is not set | 601 | # CONFIG_RTC is not set |
458 | # CONFIG_GEN_RTC is not set | ||
459 | CONFIG_DS1302=y | 602 | CONFIG_DS1302=y |
460 | # CONFIG_DTLK is not set | 603 | # CONFIG_DTLK is not set |
461 | # CONFIG_R3964 is not set | 604 | # CONFIG_R3964 is not set |
@@ -463,17 +606,12 @@ CONFIG_DS1302=y | |||
463 | # | 606 | # |
464 | # Ftape, the floppy tape device driver | 607 | # Ftape, the floppy tape device driver |
465 | # | 608 | # |
466 | # CONFIG_DRM is not set | ||
467 | |||
468 | # | ||
469 | # PCMCIA character devices | ||
470 | # | ||
471 | # CONFIG_SYNCLINK_CS is not set | ||
472 | # CONFIG_RAW_DRIVER is not set | 609 | # CONFIG_RAW_DRIVER is not set |
473 | 610 | ||
474 | # | 611 | # |
475 | # TPM devices | 612 | # TPM devices |
476 | # | 613 | # |
614 | # CONFIG_TCG_TPM is not set | ||
477 | 615 | ||
478 | # | 616 | # |
479 | # I2C support | 617 | # I2C support |
@@ -481,34 +619,51 @@ CONFIG_DS1302=y | |||
481 | # CONFIG_I2C is not set | 619 | # CONFIG_I2C is not set |
482 | 620 | ||
483 | # | 621 | # |
622 | # SPI support | ||
623 | # | ||
624 | # CONFIG_SPI is not set | ||
625 | # CONFIG_SPI_MASTER is not set | ||
626 | |||
627 | # | ||
484 | # Dallas's 1-wire bus | 628 | # Dallas's 1-wire bus |
485 | # | 629 | # |
486 | # CONFIG_W1 is not set | 630 | # CONFIG_W1 is not set |
487 | 631 | ||
488 | # | 632 | # |
489 | # Misc devices | 633 | # Hardware Monitoring support |
490 | # | 634 | # |
635 | CONFIG_HWMON=y | ||
636 | # CONFIG_HWMON_VID is not set | ||
637 | # CONFIG_SENSORS_ABITUGURU is not set | ||
638 | # CONFIG_SENSORS_F71805F is not set | ||
639 | # CONFIG_SENSORS_VT1211 is not set | ||
640 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
491 | 641 | ||
492 | # | 642 | # |
493 | # Multimedia devices | 643 | # Multimedia devices |
494 | # | 644 | # |
495 | CONFIG_VIDEO_DEV=y | 645 | CONFIG_VIDEO_DEV=m |
646 | CONFIG_VIDEO_V4L1=y | ||
647 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
648 | CONFIG_VIDEO_V4L2=y | ||
496 | 649 | ||
497 | # | 650 | # |
498 | # Video For Linux | 651 | # Video Capture Adapters |
499 | # | 652 | # |
500 | 653 | ||
501 | # | 654 | # |
502 | # Video Adapters | 655 | # Video Capture Adapters |
503 | # | 656 | # |
657 | # CONFIG_VIDEO_ADV_DEBUG is not set | ||
658 | CONFIG_VIDEO_HELPER_CHIPS_AUTO=y | ||
659 | # CONFIG_VIDEO_VIVI is not set | ||
504 | # CONFIG_VIDEO_CPIA is not set | 660 | # CONFIG_VIDEO_CPIA is not set |
505 | CONFIG_VIDEO_M32R_AR=y | 661 | CONFIG_VIDEO_M32R_AR=m |
506 | CONFIG_VIDEO_M32R_AR_M64278=y | 662 | CONFIG_VIDEO_M32R_AR_M64278=m |
507 | 663 | ||
508 | # | 664 | # |
509 | # Radio Adapters | 665 | # Radio Adapters |
510 | # | 666 | # |
511 | # CONFIG_RADIO_MAESTRO is not set | ||
512 | 667 | ||
513 | # | 668 | # |
514 | # Digital Video Broadcasting Devices | 669 | # Digital Video Broadcasting Devices |
@@ -518,15 +673,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y | |||
518 | # | 673 | # |
519 | # Graphics support | 674 | # Graphics support |
520 | # | 675 | # |
676 | CONFIG_FIRMWARE_EDID=y | ||
521 | CONFIG_FB=y | 677 | CONFIG_FB=y |
522 | # CONFIG_FB_CFB_FILLRECT is not set | 678 | CONFIG_FB_CFB_FILLRECT=y |
523 | # CONFIG_FB_CFB_COPYAREA is not set | 679 | CONFIG_FB_CFB_COPYAREA=y |
524 | # CONFIG_FB_CFB_IMAGEBLIT is not set | 680 | CONFIG_FB_CFB_IMAGEBLIT=y |
525 | # CONFIG_FB_SOFT_CURSOR is not set | ||
526 | # CONFIG_FB_MACMODES is not set | 681 | # CONFIG_FB_MACMODES is not set |
682 | # CONFIG_FB_BACKLIGHT is not set | ||
527 | # CONFIG_FB_MODE_HELPERS is not set | 683 | # CONFIG_FB_MODE_HELPERS is not set |
528 | # CONFIG_FB_TILEBLITTING is not set | 684 | # CONFIG_FB_TILEBLITTING is not set |
529 | # CONFIG_FB_S1D13XXX is not set | 685 | CONFIG_FB_S1D13XXX=y |
530 | # CONFIG_FB_VIRTUAL is not set | 686 | # CONFIG_FB_VIRTUAL is not set |
531 | 687 | ||
532 | # | 688 | # |
@@ -535,6 +691,7 @@ CONFIG_FB=y | |||
535 | # CONFIG_VGA_CONSOLE is not set | 691 | # CONFIG_VGA_CONSOLE is not set |
536 | CONFIG_DUMMY_CONSOLE=y | 692 | CONFIG_DUMMY_CONSOLE=y |
537 | CONFIG_FRAMEBUFFER_CONSOLE=y | 693 | CONFIG_FRAMEBUFFER_CONSOLE=y |
694 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
538 | # CONFIG_FONTS is not set | 695 | # CONFIG_FONTS is not set |
539 | CONFIG_FONT_8x8=y | 696 | CONFIG_FONT_8x8=y |
540 | CONFIG_FONT_8x16=y | 697 | CONFIG_FONT_8x16=y |
@@ -546,6 +703,7 @@ CONFIG_LOGO=y | |||
546 | CONFIG_LOGO_LINUX_MONO=y | 703 | CONFIG_LOGO_LINUX_MONO=y |
547 | CONFIG_LOGO_LINUX_VGA16=y | 704 | CONFIG_LOGO_LINUX_VGA16=y |
548 | CONFIG_LOGO_LINUX_CLUT224=y | 705 | CONFIG_LOGO_LINUX_CLUT224=y |
706 | CONFIG_LOGO_M32R_CLUT224=y | ||
549 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 707 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
550 | 708 | ||
551 | # | 709 | # |
@@ -558,6 +716,11 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
558 | # | 716 | # |
559 | # CONFIG_USB_ARCH_HAS_HCD is not set | 717 | # CONFIG_USB_ARCH_HAS_HCD is not set |
560 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 718 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
719 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
720 | |||
721 | # | ||
722 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
723 | # | ||
561 | 724 | ||
562 | # | 725 | # |
563 | # USB Gadget Support | 726 | # USB Gadget Support |
@@ -567,23 +730,62 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
567 | # | 730 | # |
568 | # MMC/SD Card support | 731 | # MMC/SD Card support |
569 | # | 732 | # |
570 | # CONFIG_MMC is not set | 733 | CONFIG_MMC=y |
734 | CONFIG_MMC_DEBUG=y | ||
735 | CONFIG_MMC_BLOCK=y | ||
736 | # CONFIG_MMC_TIFM_SD is not set | ||
737 | |||
738 | # | ||
739 | # LED devices | ||
740 | # | ||
741 | # CONFIG_NEW_LEDS is not set | ||
742 | |||
743 | # | ||
744 | # LED drivers | ||
745 | # | ||
746 | |||
747 | # | ||
748 | # LED Triggers | ||
749 | # | ||
571 | 750 | ||
572 | # | 751 | # |
573 | # InfiniBand support | 752 | # InfiniBand support |
574 | # | 753 | # |
575 | # CONFIG_INFINIBAND is not set | 754 | |
755 | # | ||
756 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
757 | # | ||
758 | |||
759 | # | ||
760 | # Real Time Clock | ||
761 | # | ||
762 | # CONFIG_RTC_CLASS is not set | ||
763 | |||
764 | # | ||
765 | # DMA Engine support | ||
766 | # | ||
767 | # CONFIG_DMA_ENGINE is not set | ||
768 | |||
769 | # | ||
770 | # DMA Clients | ||
771 | # | ||
772 | |||
773 | # | ||
774 | # DMA Devices | ||
775 | # | ||
576 | 776 | ||
577 | # | 777 | # |
578 | # File systems | 778 | # File systems |
579 | # | 779 | # |
580 | CONFIG_EXT2_FS=y | 780 | CONFIG_EXT2_FS=y |
581 | # CONFIG_EXT2_FS_XATTR is not set | 781 | # CONFIG_EXT2_FS_XATTR is not set |
582 | CONFIG_EXT3_FS=m | 782 | # CONFIG_EXT2_FS_XIP is not set |
783 | CONFIG_EXT3_FS=y | ||
583 | CONFIG_EXT3_FS_XATTR=y | 784 | CONFIG_EXT3_FS_XATTR=y |
584 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 785 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
585 | # CONFIG_EXT3_FS_SECURITY is not set | 786 | # CONFIG_EXT3_FS_SECURITY is not set |
586 | CONFIG_JBD=m | 787 | # CONFIG_EXT4DEV_FS is not set |
788 | CONFIG_JBD=y | ||
587 | CONFIG_JBD_DEBUG=y | 789 | CONFIG_JBD_DEBUG=y |
588 | CONFIG_FS_MBCACHE=y | 790 | CONFIG_FS_MBCACHE=y |
589 | CONFIG_REISERFS_FS=m | 791 | CONFIG_REISERFS_FS=m |
@@ -591,17 +793,19 @@ CONFIG_REISERFS_FS=m | |||
591 | # CONFIG_REISERFS_PROC_INFO is not set | 793 | # CONFIG_REISERFS_PROC_INFO is not set |
592 | # CONFIG_REISERFS_FS_XATTR is not set | 794 | # CONFIG_REISERFS_FS_XATTR is not set |
593 | # CONFIG_JFS_FS is not set | 795 | # CONFIG_JFS_FS is not set |
594 | 796 | # CONFIG_FS_POSIX_ACL is not set | |
595 | # | ||
596 | # XFS support | ||
597 | # | ||
598 | # CONFIG_XFS_FS is not set | 797 | # CONFIG_XFS_FS is not set |
798 | # CONFIG_GFS2_FS is not set | ||
799 | # CONFIG_OCFS2_FS is not set | ||
599 | # CONFIG_MINIX_FS is not set | 800 | # CONFIG_MINIX_FS is not set |
600 | # CONFIG_ROMFS_FS is not set | 801 | # CONFIG_ROMFS_FS is not set |
802 | CONFIG_INOTIFY=y | ||
803 | CONFIG_INOTIFY_USER=y | ||
601 | # CONFIG_QUOTA is not set | 804 | # CONFIG_QUOTA is not set |
602 | CONFIG_DNOTIFY=y | 805 | CONFIG_DNOTIFY=y |
603 | # CONFIG_AUTOFS_FS is not set | 806 | # CONFIG_AUTOFS_FS is not set |
604 | # CONFIG_AUTOFS4_FS is not set | 807 | # CONFIG_AUTOFS4_FS is not set |
808 | # CONFIG_FUSE_FS is not set | ||
605 | 809 | ||
606 | # | 810 | # |
607 | # CD-ROM/DVD Filesystems | 811 | # CD-ROM/DVD Filesystems |
@@ -627,15 +831,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
627 | # | 831 | # |
628 | CONFIG_PROC_FS=y | 832 | CONFIG_PROC_FS=y |
629 | CONFIG_PROC_KCORE=y | 833 | CONFIG_PROC_KCORE=y |
834 | CONFIG_PROC_SYSCTL=y | ||
630 | CONFIG_SYSFS=y | 835 | CONFIG_SYSFS=y |
631 | CONFIG_DEVFS_FS=y | ||
632 | CONFIG_DEVFS_MOUNT=y | ||
633 | # CONFIG_DEVFS_DEBUG is not set | ||
634 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
635 | CONFIG_TMPFS=y | 836 | CONFIG_TMPFS=y |
636 | # CONFIG_TMPFS_XATTR is not set | 837 | # CONFIG_TMPFS_POSIX_ACL is not set |
637 | # CONFIG_HUGETLB_PAGE is not set | 838 | # CONFIG_HUGETLB_PAGE is not set |
638 | CONFIG_RAMFS=y | 839 | CONFIG_RAMFS=y |
840 | # CONFIG_CONFIGFS_FS is not set | ||
639 | 841 | ||
640 | # | 842 | # |
641 | # Miscellaneous filesystems | 843 | # Miscellaneous filesystems |
@@ -647,6 +849,8 @@ CONFIG_RAMFS=y | |||
647 | # CONFIG_BEFS_FS is not set | 849 | # CONFIG_BEFS_FS is not set |
648 | # CONFIG_BFS_FS is not set | 850 | # CONFIG_BFS_FS is not set |
649 | # CONFIG_EFS_FS is not set | 851 | # CONFIG_EFS_FS is not set |
852 | # CONFIG_JFFS_FS is not set | ||
853 | # CONFIG_JFFS2_FS is not set | ||
650 | # CONFIG_CRAMFS is not set | 854 | # CONFIG_CRAMFS is not set |
651 | # CONFIG_VXFS_FS is not set | 855 | # CONFIG_VXFS_FS is not set |
652 | # CONFIG_HPFS_FS is not set | 856 | # CONFIG_HPFS_FS is not set |
@@ -659,12 +863,14 @@ CONFIG_RAMFS=y | |||
659 | # | 863 | # |
660 | CONFIG_NFS_FS=y | 864 | CONFIG_NFS_FS=y |
661 | CONFIG_NFS_V3=y | 865 | CONFIG_NFS_V3=y |
866 | # CONFIG_NFS_V3_ACL is not set | ||
662 | # CONFIG_NFS_V4 is not set | 867 | # CONFIG_NFS_V4 is not set |
663 | # CONFIG_NFS_DIRECTIO is not set | 868 | # CONFIG_NFS_DIRECTIO is not set |
664 | # CONFIG_NFSD is not set | 869 | # CONFIG_NFSD is not set |
665 | CONFIG_ROOT_NFS=y | 870 | CONFIG_ROOT_NFS=y |
666 | CONFIG_LOCKD=y | 871 | CONFIG_LOCKD=y |
667 | CONFIG_LOCKD_V4=y | 872 | CONFIG_LOCKD_V4=y |
873 | CONFIG_NFS_COMMON=y | ||
668 | CONFIG_SUNRPC=y | 874 | CONFIG_SUNRPC=y |
669 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 875 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
670 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 876 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -673,6 +879,7 @@ CONFIG_SUNRPC=y | |||
673 | # CONFIG_NCP_FS is not set | 879 | # CONFIG_NCP_FS is not set |
674 | # CONFIG_CODA_FS is not set | 880 | # CONFIG_CODA_FS is not set |
675 | # CONFIG_AFS_FS is not set | 881 | # CONFIG_AFS_FS is not set |
882 | # CONFIG_9P_FS is not set | ||
676 | 883 | ||
677 | # | 884 | # |
678 | # Partition Types | 885 | # Partition Types |
@@ -727,16 +934,23 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
727 | # | 934 | # |
728 | # Profiling support | 935 | # Profiling support |
729 | # | 936 | # |
730 | # CONFIG_PROFILING is not set | 937 | CONFIG_PROFILING=y |
938 | CONFIG_OPROFILE=y | ||
731 | 939 | ||
732 | # | 940 | # |
733 | # Kernel hacking | 941 | # Kernel hacking |
734 | # | 942 | # |
735 | # CONFIG_PRINTK_TIME is not set | 943 | # CONFIG_PRINTK_TIME is not set |
944 | CONFIG_ENABLE_MUST_CHECK=y | ||
945 | # CONFIG_MAGIC_SYSRQ is not set | ||
946 | # CONFIG_UNUSED_SYMBOLS is not set | ||
736 | # CONFIG_DEBUG_KERNEL is not set | 947 | # CONFIG_DEBUG_KERNEL is not set |
737 | CONFIG_LOG_BUF_SHIFT=15 | 948 | CONFIG_LOG_BUF_SHIFT=15 |
738 | # CONFIG_DEBUG_BUGVERBOSE is not set | 949 | # CONFIG_DEBUG_BUGVERBOSE is not set |
950 | # CONFIG_DEBUG_FS is not set | ||
739 | # CONFIG_FRAME_POINTER is not set | 951 | # CONFIG_FRAME_POINTER is not set |
952 | # CONFIG_UNWIND_INFO is not set | ||
953 | # CONFIG_HEADERS_CHECK is not set | ||
740 | 954 | ||
741 | # | 955 | # |
742 | # Security options | 956 | # Security options |
@@ -750,12 +964,9 @@ CONFIG_LOG_BUF_SHIFT=15 | |||
750 | # CONFIG_CRYPTO is not set | 964 | # CONFIG_CRYPTO is not set |
751 | 965 | ||
752 | # | 966 | # |
753 | # Hardware crypto devices | ||
754 | # | ||
755 | |||
756 | # | ||
757 | # Library routines | 967 | # Library routines |
758 | # | 968 | # |
759 | # CONFIG_CRC_CCITT is not set | 969 | # CONFIG_CRC_CCITT is not set |
970 | # CONFIG_CRC16 is not set | ||
760 | CONFIG_CRC32=y | 971 | CONFIG_CRC32=y |
761 | # CONFIG_LIBCRC32C is not set | 972 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/m32r/m32700ut/defconfig.m32700ut.up b/arch/m32r/m32700ut/defconfig.m32700ut.up index 2d3e7cda8f46..190f961d33e2 100644 --- a/arch/m32r/m32700ut/defconfig.m32700ut.up +++ b/arch/m32r/m32700ut/defconfig.m32700ut.up | |||
@@ -1,19 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:21:34 2005 | 4 | # Tue Dec 12 12:07:08 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 16 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 17 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 18 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
@@ -22,32 +21,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
22 | # General setup | 21 | # General setup |
23 | # | 22 | # |
24 | CONFIG_LOCALVERSION="" | 23 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | CONFIG_SWAP=y | 25 | CONFIG_SWAP=y |
26 | CONFIG_SYSVIPC=y | 26 | CONFIG_SYSVIPC=y |
27 | # CONFIG_IPC_NS is not set | ||
27 | # CONFIG_POSIX_MQUEUE is not set | 28 | # CONFIG_POSIX_MQUEUE is not set |
28 | CONFIG_BSD_PROCESS_ACCT=y | 29 | CONFIG_BSD_PROCESS_ACCT=y |
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 30 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
30 | CONFIG_SYSCTL=y | 31 | # CONFIG_TASKSTATS is not set |
32 | # CONFIG_UTS_NS is not set | ||
31 | # CONFIG_AUDIT is not set | 33 | # CONFIG_AUDIT is not set |
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
35 | # CONFIG_IKCONFIG_PROC is not set | 35 | CONFIG_IKCONFIG_PROC=y |
36 | CONFIG_SYSFS_DEPRECATED=y | ||
37 | # CONFIG_RELAY is not set | ||
38 | CONFIG_INITRAMFS_SOURCE="" | ||
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
40 | CONFIG_SYSCTL=y | ||
36 | CONFIG_EMBEDDED=y | 41 | CONFIG_EMBEDDED=y |
42 | CONFIG_SYSCTL_SYSCALL=y | ||
37 | # CONFIG_KALLSYMS is not set | 43 | # CONFIG_KALLSYMS is not set |
44 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_PRINTK=y | 45 | CONFIG_PRINTK=y |
39 | CONFIG_BUG=y | 46 | CONFIG_BUG=y |
47 | CONFIG_ELF_CORE=y | ||
40 | CONFIG_BASE_FULL=y | 48 | CONFIG_BASE_FULL=y |
41 | # CONFIG_FUTEX is not set | 49 | # CONFIG_FUTEX is not set |
42 | # CONFIG_EPOLL is not set | 50 | # CONFIG_EPOLL is not set |
43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
44 | CONFIG_SHMEM=y | 51 | CONFIG_SHMEM=y |
45 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 52 | CONFIG_SLAB=y |
46 | CONFIG_CC_ALIGN_LABELS=0 | 53 | CONFIG_VM_EVENT_COUNTERS=y |
47 | CONFIG_CC_ALIGN_LOOPS=0 | ||
48 | CONFIG_CC_ALIGN_JUMPS=0 | ||
49 | # CONFIG_TINY_SHMEM is not set | 54 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | 55 | CONFIG_BASE_SMALL=0 |
56 | # CONFIG_SLOB is not set | ||
51 | 57 | ||
52 | # | 58 | # |
53 | # Loadable module support | 59 | # Loadable module support |
@@ -55,12 +61,30 @@ CONFIG_BASE_SMALL=0 | |||
55 | CONFIG_MODULES=y | 61 | CONFIG_MODULES=y |
56 | CONFIG_MODULE_UNLOAD=y | 62 | CONFIG_MODULE_UNLOAD=y |
57 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 63 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
58 | CONFIG_OBSOLETE_MODPARM=y | ||
59 | # CONFIG_MODVERSIONS is not set | 64 | # CONFIG_MODVERSIONS is not set |
60 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 65 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
61 | CONFIG_KMOD=y | 66 | CONFIG_KMOD=y |
62 | 67 | ||
63 | # | 68 | # |
69 | # Block layer | ||
70 | # | ||
71 | CONFIG_BLOCK=y | ||
72 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
73 | |||
74 | # | ||
75 | # IO Schedulers | ||
76 | # | ||
77 | CONFIG_IOSCHED_NOOP=y | ||
78 | # CONFIG_IOSCHED_AS is not set | ||
79 | CONFIG_IOSCHED_DEADLINE=y | ||
80 | CONFIG_IOSCHED_CFQ=y | ||
81 | # CONFIG_DEFAULT_AS is not set | ||
82 | # CONFIG_DEFAULT_DEADLINE is not set | ||
83 | CONFIG_DEFAULT_CFQ=y | ||
84 | # CONFIG_DEFAULT_NOOP is not set | ||
85 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
86 | |||
87 | # | ||
64 | # Processor type and features | 88 | # Processor type and features |
65 | # | 89 | # |
66 | # CONFIG_PLAT_MAPPI is not set | 90 | # CONFIG_PLAT_MAPPI is not set |
@@ -70,8 +94,10 @@ CONFIG_PLAT_M32700UT=y | |||
70 | # CONFIG_PLAT_OAKS32R is not set | 94 | # CONFIG_PLAT_OAKS32R is not set |
71 | # CONFIG_PLAT_MAPPI2 is not set | 95 | # CONFIG_PLAT_MAPPI2 is not set |
72 | # CONFIG_PLAT_MAPPI3 is not set | 96 | # CONFIG_PLAT_MAPPI3 is not set |
97 | # CONFIG_PLAT_M32104UT is not set | ||
73 | CONFIG_CHIP_M32700=y | 98 | CONFIG_CHIP_M32700=y |
74 | # CONFIG_CHIP_M32102 is not set | 99 | # CONFIG_CHIP_M32102 is not set |
100 | # CONFIG_CHIP_M32104 is not set | ||
75 | # CONFIG_CHIP_VDEC2 is not set | 101 | # CONFIG_CHIP_VDEC2 is not set |
76 | # CONFIG_CHIP_OPSP is not set | 102 | # CONFIG_CHIP_OPSP is not set |
77 | CONFIG_MMU=y | 103 | CONFIG_MMU=y |
@@ -85,34 +111,37 @@ CONFIG_TIMER_DIVIDE=128 | |||
85 | CONFIG_MEMORY_START=0x08000000 | 111 | CONFIG_MEMORY_START=0x08000000 |
86 | CONFIG_MEMORY_SIZE=0x01000000 | 112 | CONFIG_MEMORY_SIZE=0x01000000 |
87 | CONFIG_NOHIGHMEM=y | 113 | CONFIG_NOHIGHMEM=y |
88 | # CONFIG_DISCONTIGMEM is not set | 114 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
115 | CONFIG_SELECT_MEMORY_MODEL=y | ||
116 | # CONFIG_FLATMEM_MANUAL is not set | ||
117 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
118 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
119 | CONFIG_DISCONTIGMEM=y | ||
120 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
121 | CONFIG_NEED_MULTIPLE_NODES=y | ||
122 | # CONFIG_SPARSEMEM_STATIC is not set | ||
123 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
124 | # CONFIG_RESOURCES_64BIT is not set | ||
125 | CONFIG_IRAM_START=0x00f00000 | ||
126 | CONFIG_IRAM_SIZE=0x00080000 | ||
89 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 127 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
90 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 128 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
129 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
130 | CONFIG_GENERIC_HWEIGHT=y | ||
91 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 131 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
92 | CONFIG_PREEMPT=y | 132 | CONFIG_PREEMPT=y |
93 | # CONFIG_HAVE_DEC_LOCK is not set | ||
94 | # CONFIG_SMP is not set | 133 | # CONFIG_SMP is not set |
134 | CONFIG_NODES_SHIFT=1 | ||
95 | 135 | ||
96 | # | 136 | # |
97 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 137 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
98 | # | 138 | # |
99 | # CONFIG_PCI is not set | ||
100 | # CONFIG_ISA is not set | 139 | # CONFIG_ISA is not set |
101 | 140 | ||
102 | # | 141 | # |
103 | # PCCARD (PCMCIA/CardBus) support | 142 | # PCCARD (PCMCIA/CardBus) support |
104 | # | 143 | # |
105 | CONFIG_PCCARD=y | 144 | # CONFIG_PCCARD is not set |
106 | # CONFIG_PCMCIA_DEBUG is not set | ||
107 | CONFIG_PCMCIA=y | ||
108 | |||
109 | # | ||
110 | # PC-card bridges | ||
111 | # | ||
112 | # CONFIG_TCIC is not set | ||
113 | # CONFIG_M32R_PCC is not set | ||
114 | CONFIG_M32R_CFC=y | ||
115 | CONFIG_M32R_CFC_NUM=1 | ||
116 | 145 | ||
117 | # | 146 | # |
118 | # PCI Hotplug Support | 147 | # PCI Hotplug Support |
@@ -125,6 +154,94 @@ CONFIG_BINFMT_ELF=y | |||
125 | # CONFIG_BINFMT_MISC is not set | 154 | # CONFIG_BINFMT_MISC is not set |
126 | 155 | ||
127 | # | 156 | # |
157 | # Networking | ||
158 | # | ||
159 | CONFIG_NET=y | ||
160 | |||
161 | # | ||
162 | # Networking options | ||
163 | # | ||
164 | # CONFIG_NETDEBUG is not set | ||
165 | CONFIG_PACKET=y | ||
166 | # CONFIG_PACKET_MMAP is not set | ||
167 | CONFIG_UNIX=y | ||
168 | CONFIG_XFRM=y | ||
169 | # CONFIG_XFRM_USER is not set | ||
170 | # CONFIG_XFRM_SUB_POLICY is not set | ||
171 | # CONFIG_NET_KEY is not set | ||
172 | CONFIG_INET=y | ||
173 | # CONFIG_IP_MULTICAST is not set | ||
174 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
175 | CONFIG_IP_FIB_HASH=y | ||
176 | CONFIG_IP_PNP=y | ||
177 | CONFIG_IP_PNP_DHCP=y | ||
178 | # CONFIG_IP_PNP_BOOTP is not set | ||
179 | # CONFIG_IP_PNP_RARP is not set | ||
180 | # CONFIG_NET_IPIP is not set | ||
181 | # CONFIG_NET_IPGRE is not set | ||
182 | # CONFIG_ARPD is not set | ||
183 | # CONFIG_SYN_COOKIES is not set | ||
184 | # CONFIG_INET_AH is not set | ||
185 | # CONFIG_INET_ESP is not set | ||
186 | # CONFIG_INET_IPCOMP is not set | ||
187 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
188 | # CONFIG_INET_TUNNEL is not set | ||
189 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
190 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
191 | CONFIG_INET_XFRM_MODE_BEET=y | ||
192 | CONFIG_INET_DIAG=y | ||
193 | CONFIG_INET_TCP_DIAG=y | ||
194 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
195 | CONFIG_TCP_CONG_CUBIC=y | ||
196 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
197 | # CONFIG_TCP_MD5SIG is not set | ||
198 | # CONFIG_IPV6 is not set | ||
199 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
200 | # CONFIG_INET6_TUNNEL is not set | ||
201 | # CONFIG_NETWORK_SECMARK is not set | ||
202 | # CONFIG_NETFILTER is not set | ||
203 | |||
204 | # | ||
205 | # DCCP Configuration (EXPERIMENTAL) | ||
206 | # | ||
207 | # CONFIG_IP_DCCP is not set | ||
208 | |||
209 | # | ||
210 | # SCTP Configuration (EXPERIMENTAL) | ||
211 | # | ||
212 | # CONFIG_IP_SCTP is not set | ||
213 | |||
214 | # | ||
215 | # TIPC Configuration (EXPERIMENTAL) | ||
216 | # | ||
217 | # CONFIG_TIPC is not set | ||
218 | # CONFIG_ATM is not set | ||
219 | # CONFIG_BRIDGE is not set | ||
220 | # CONFIG_VLAN_8021Q is not set | ||
221 | # CONFIG_DECNET is not set | ||
222 | # CONFIG_LLC2 is not set | ||
223 | # CONFIG_IPX is not set | ||
224 | # CONFIG_ATALK is not set | ||
225 | # CONFIG_X25 is not set | ||
226 | # CONFIG_LAPB is not set | ||
227 | # CONFIG_ECONET is not set | ||
228 | # CONFIG_WAN_ROUTER is not set | ||
229 | |||
230 | # | ||
231 | # QoS and/or fair queueing | ||
232 | # | ||
233 | # CONFIG_NET_SCHED is not set | ||
234 | |||
235 | # | ||
236 | # Network testing | ||
237 | # | ||
238 | # CONFIG_NET_PKTGEN is not set | ||
239 | # CONFIG_HAMRADIO is not set | ||
240 | # CONFIG_IRDA is not set | ||
241 | # CONFIG_BT is not set | ||
242 | # CONFIG_IEEE80211 is not set | ||
243 | |||
244 | # | ||
128 | # Device Drivers | 245 | # Device Drivers |
129 | # | 246 | # |
130 | 247 | ||
@@ -133,12 +250,100 @@ CONFIG_BINFMT_ELF=y | |||
133 | # | 250 | # |
134 | CONFIG_STANDALONE=y | 251 | CONFIG_STANDALONE=y |
135 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 252 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
136 | # CONFIG_FW_LOADER is not set | 253 | CONFIG_FW_LOADER=y |
254 | # CONFIG_SYS_HYPERVISOR is not set | ||
255 | |||
256 | # | ||
257 | # Connector - unified userspace <-> kernelspace linker | ||
258 | # | ||
259 | # CONFIG_CONNECTOR is not set | ||
137 | 260 | ||
138 | # | 261 | # |
139 | # Memory Technology Devices (MTD) | 262 | # Memory Technology Devices (MTD) |
140 | # | 263 | # |
141 | # CONFIG_MTD is not set | 264 | CONFIG_MTD=y |
265 | # CONFIG_MTD_DEBUG is not set | ||
266 | # CONFIG_MTD_CONCAT is not set | ||
267 | CONFIG_MTD_PARTITIONS=y | ||
268 | CONFIG_MTD_REDBOOT_PARTS=y | ||
269 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
270 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
271 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
272 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
273 | |||
274 | # | ||
275 | # User Modules And Translation Layers | ||
276 | # | ||
277 | # CONFIG_MTD_CHAR is not set | ||
278 | CONFIG_MTD_BLOCK=y | ||
279 | # CONFIG_FTL is not set | ||
280 | # CONFIG_NFTL is not set | ||
281 | # CONFIG_INFTL is not set | ||
282 | # CONFIG_RFD_FTL is not set | ||
283 | # CONFIG_SSFDC is not set | ||
284 | |||
285 | # | ||
286 | # RAM/ROM/Flash chip drivers | ||
287 | # | ||
288 | CONFIG_MTD_CFI=m | ||
289 | CONFIG_MTD_JEDECPROBE=m | ||
290 | CONFIG_MTD_GEN_PROBE=m | ||
291 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
292 | # CONFIG_MTD_CFI_NOSWAP is not set | ||
293 | CONFIG_MTD_CFI_BE_BYTE_SWAP=y | ||
294 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
295 | CONFIG_MTD_CFI_GEOMETRY=y | ||
296 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
297 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
298 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
299 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
300 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
301 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
302 | CONFIG_MTD_CFI_I1=y | ||
303 | # CONFIG_MTD_CFI_I2 is not set | ||
304 | # CONFIG_MTD_CFI_I4 is not set | ||
305 | # CONFIG_MTD_CFI_I8 is not set | ||
306 | # CONFIG_MTD_OTP is not set | ||
307 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
308 | CONFIG_MTD_CFI_AMDSTD=m | ||
309 | # CONFIG_MTD_CFI_STAA is not set | ||
310 | CONFIG_MTD_CFI_UTIL=m | ||
311 | # CONFIG_MTD_RAM is not set | ||
312 | # CONFIG_MTD_ROM is not set | ||
313 | # CONFIG_MTD_ABSENT is not set | ||
314 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
315 | |||
316 | # | ||
317 | # Mapping drivers for chip access | ||
318 | # | ||
319 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
320 | # CONFIG_MTD_PHYSMAP is not set | ||
321 | # CONFIG_MTD_PLATRAM is not set | ||
322 | |||
323 | # | ||
324 | # Self-contained MTD device drivers | ||
325 | # | ||
326 | # CONFIG_MTD_SLRAM is not set | ||
327 | # CONFIG_MTD_PHRAM is not set | ||
328 | # CONFIG_MTD_MTDRAM is not set | ||
329 | # CONFIG_MTD_BLOCK2MTD is not set | ||
330 | |||
331 | # | ||
332 | # Disk-On-Chip Device Drivers | ||
333 | # | ||
334 | # CONFIG_MTD_DOC2000 is not set | ||
335 | # CONFIG_MTD_DOC2001 is not set | ||
336 | # CONFIG_MTD_DOC2001PLUS is not set | ||
337 | |||
338 | # | ||
339 | # NAND Flash Device Drivers | ||
340 | # | ||
341 | # CONFIG_MTD_NAND is not set | ||
342 | |||
343 | # | ||
344 | # OneNAND Flash Device Drivers | ||
345 | # | ||
346 | # CONFIG_MTD_ONENAND is not set | ||
142 | 347 | ||
143 | # | 348 | # |
144 | # Parallel port support | 349 | # Parallel port support |
@@ -152,7 +357,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
152 | # | 357 | # |
153 | # Block devices | 358 | # Block devices |
154 | # | 359 | # |
155 | # CONFIG_BLK_DEV_FD is not set | ||
156 | # CONFIG_BLK_DEV_COW_COMMON is not set | 360 | # CONFIG_BLK_DEV_COW_COMMON is not set |
157 | CONFIG_BLK_DEV_LOOP=y | 361 | CONFIG_BLK_DEV_LOOP=y |
158 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 362 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -160,23 +364,21 @@ CONFIG_BLK_DEV_NBD=y | |||
160 | CONFIG_BLK_DEV_RAM=y | 364 | CONFIG_BLK_DEV_RAM=y |
161 | CONFIG_BLK_DEV_RAM_COUNT=16 | 365 | CONFIG_BLK_DEV_RAM_COUNT=16 |
162 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 366 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
367 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
163 | # CONFIG_BLK_DEV_INITRD is not set | 368 | # CONFIG_BLK_DEV_INITRD is not set |
164 | CONFIG_INITRAMFS_SOURCE="" | ||
165 | # CONFIG_CDROM_PKTCDVD is not set | 369 | # CONFIG_CDROM_PKTCDVD is not set |
370 | CONFIG_ATA_OVER_ETH=m | ||
166 | 371 | ||
167 | # | 372 | # |
168 | # IO Schedulers | 373 | # Misc devices |
169 | # | 374 | # |
170 | CONFIG_IOSCHED_NOOP=y | 375 | # CONFIG_TIFM_CORE is not set |
171 | # CONFIG_IOSCHED_AS is not set | ||
172 | CONFIG_IOSCHED_DEADLINE=y | ||
173 | CONFIG_IOSCHED_CFQ=y | ||
174 | # CONFIG_ATA_OVER_ETH is not set | ||
175 | 376 | ||
176 | # | 377 | # |
177 | # ATA/ATAPI/MFM/RLL support | 378 | # ATA/ATAPI/MFM/RLL support |
178 | # | 379 | # |
179 | CONFIG_IDE=y | 380 | CONFIG_IDE=y |
381 | CONFIG_IDE_MAX_HWIFS=4 | ||
180 | CONFIG_BLK_DEV_IDE=y | 382 | CONFIG_BLK_DEV_IDE=y |
181 | 383 | ||
182 | # | 384 | # |
@@ -185,7 +387,6 @@ CONFIG_BLK_DEV_IDE=y | |||
185 | # CONFIG_BLK_DEV_IDE_SATA is not set | 387 | # CONFIG_BLK_DEV_IDE_SATA is not set |
186 | CONFIG_BLK_DEV_IDEDISK=y | 388 | CONFIG_BLK_DEV_IDEDISK=y |
187 | # CONFIG_IDEDISK_MULTI_MODE is not set | 389 | # CONFIG_IDEDISK_MULTI_MODE is not set |
188 | CONFIG_BLK_DEV_IDECS=y | ||
189 | CONFIG_BLK_DEV_IDECD=m | 390 | CONFIG_BLK_DEV_IDECD=m |
190 | # CONFIG_BLK_DEV_IDETAPE is not set | 391 | # CONFIG_BLK_DEV_IDETAPE is not set |
191 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | 392 | # CONFIG_BLK_DEV_IDEFLOPPY is not set |
@@ -204,7 +405,9 @@ CONFIG_IDE_GENERIC=y | |||
204 | # | 405 | # |
205 | # SCSI device support | 406 | # SCSI device support |
206 | # | 407 | # |
408 | # CONFIG_RAID_ATTRS is not set | ||
207 | CONFIG_SCSI=m | 409 | CONFIG_SCSI=m |
410 | # CONFIG_SCSI_NETLINK is not set | ||
208 | CONFIG_SCSI_PROC_FS=y | 411 | CONFIG_SCSI_PROC_FS=y |
209 | 412 | ||
210 | # | 413 | # |
@@ -216,6 +419,7 @@ CONFIG_BLK_DEV_SD=m | |||
216 | CONFIG_BLK_DEV_SR=m | 419 | CONFIG_BLK_DEV_SR=m |
217 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 420 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
218 | CONFIG_CHR_DEV_SG=m | 421 | CONFIG_CHR_DEV_SG=m |
422 | # CONFIG_CHR_DEV_SCH is not set | ||
219 | 423 | ||
220 | # | 424 | # |
221 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | 425 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs |
@@ -225,26 +429,23 @@ CONFIG_SCSI_MULTI_LUN=y | |||
225 | # CONFIG_SCSI_LOGGING is not set | 429 | # CONFIG_SCSI_LOGGING is not set |
226 | 430 | ||
227 | # | 431 | # |
228 | # SCSI Transport Attributes | 432 | # SCSI Transports |
229 | # | 433 | # |
230 | # CONFIG_SCSI_SPI_ATTRS is not set | 434 | # CONFIG_SCSI_SPI_ATTRS is not set |
231 | # CONFIG_SCSI_FC_ATTRS is not set | 435 | # CONFIG_SCSI_FC_ATTRS is not set |
232 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 436 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
437 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
438 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
233 | 439 | ||
234 | # | 440 | # |
235 | # SCSI low-level drivers | 441 | # SCSI low-level drivers |
236 | # | 442 | # |
237 | # CONFIG_SCSI_SATA is not set | 443 | # CONFIG_ISCSI_TCP is not set |
238 | # CONFIG_SCSI_DEBUG is not set | 444 | # CONFIG_SCSI_DEBUG is not set |
239 | 445 | ||
240 | # | 446 | # |
241 | # PCMCIA SCSI adapter support | 447 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
242 | # | 448 | # |
243 | # CONFIG_PCMCIA_AHA152X is not set | ||
244 | # CONFIG_PCMCIA_FDOMAIN is not set | ||
245 | # CONFIG_PCMCIA_NINJA_SCSI is not set | ||
246 | # CONFIG_PCMCIA_QLOGIC is not set | ||
247 | # CONFIG_PCMCIA_SYM53C500 is not set | ||
248 | 449 | ||
249 | # | 450 | # |
250 | # Multi-device support (RAID and LVM) | 451 | # Multi-device support (RAID and LVM) |
@@ -254,6 +455,7 @@ CONFIG_SCSI_MULTI_LUN=y | |||
254 | # | 455 | # |
255 | # Fusion MPT device support | 456 | # Fusion MPT device support |
256 | # | 457 | # |
458 | # CONFIG_FUSION is not set | ||
257 | 459 | ||
258 | # | 460 | # |
259 | # IEEE 1394 (FireWire) support | 461 | # IEEE 1394 (FireWire) support |
@@ -264,69 +466,8 @@ CONFIG_SCSI_MULTI_LUN=y | |||
264 | # | 466 | # |
265 | 467 | ||
266 | # | 468 | # |
267 | # Networking support | 469 | # Network device support |
268 | # | ||
269 | CONFIG_NET=y | ||
270 | |||
271 | # | ||
272 | # Networking options | ||
273 | # | ||
274 | CONFIG_PACKET=y | ||
275 | # CONFIG_PACKET_MMAP is not set | ||
276 | CONFIG_UNIX=y | ||
277 | # CONFIG_NET_KEY is not set | ||
278 | CONFIG_INET=y | ||
279 | # CONFIG_IP_MULTICAST is not set | ||
280 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
281 | CONFIG_IP_PNP=y | ||
282 | CONFIG_IP_PNP_DHCP=y | ||
283 | # CONFIG_IP_PNP_BOOTP is not set | ||
284 | # CONFIG_IP_PNP_RARP is not set | ||
285 | # CONFIG_NET_IPIP is not set | ||
286 | # CONFIG_NET_IPGRE is not set | ||
287 | # CONFIG_ARPD is not set | ||
288 | # CONFIG_SYN_COOKIES is not set | ||
289 | # CONFIG_INET_AH is not set | ||
290 | # CONFIG_INET_ESP is not set | ||
291 | # CONFIG_INET_IPCOMP is not set | ||
292 | # CONFIG_INET_TUNNEL is not set | ||
293 | CONFIG_IP_TCPDIAG=y | ||
294 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
295 | # CONFIG_IPV6 is not set | ||
296 | # CONFIG_NETFILTER is not set | ||
297 | |||
298 | # | ||
299 | # SCTP Configuration (EXPERIMENTAL) | ||
300 | # | ||
301 | # CONFIG_IP_SCTP is not set | ||
302 | # CONFIG_ATM is not set | ||
303 | # CONFIG_BRIDGE is not set | ||
304 | # CONFIG_VLAN_8021Q is not set | ||
305 | # CONFIG_DECNET is not set | ||
306 | # CONFIG_LLC2 is not set | ||
307 | # CONFIG_IPX is not set | ||
308 | # CONFIG_ATALK is not set | ||
309 | # CONFIG_X25 is not set | ||
310 | # CONFIG_LAPB is not set | ||
311 | # CONFIG_NET_DIVERT is not set | ||
312 | # CONFIG_ECONET is not set | ||
313 | # CONFIG_WAN_ROUTER is not set | ||
314 | |||
315 | # | ||
316 | # QoS and/or fair queueing | ||
317 | # | ||
318 | # CONFIG_NET_SCHED is not set | ||
319 | # CONFIG_NET_CLS_ROUTE is not set | ||
320 | |||
321 | # | ||
322 | # Network testing | ||
323 | # | 470 | # |
324 | # CONFIG_NET_PKTGEN is not set | ||
325 | # CONFIG_NETPOLL is not set | ||
326 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
327 | # CONFIG_HAMRADIO is not set | ||
328 | # CONFIG_IRDA is not set | ||
329 | # CONFIG_BT is not set | ||
330 | CONFIG_NETDEVICES=y | 471 | CONFIG_NETDEVICES=y |
331 | # CONFIG_DUMMY is not set | 472 | # CONFIG_DUMMY is not set |
332 | # CONFIG_BONDING is not set | 473 | # CONFIG_BONDING is not set |
@@ -334,6 +475,11 @@ CONFIG_NETDEVICES=y | |||
334 | # CONFIG_TUN is not set | 475 | # CONFIG_TUN is not set |
335 | 476 | ||
336 | # | 477 | # |
478 | # PHY device support | ||
479 | # | ||
480 | # CONFIG_PHYLIB is not set | ||
481 | |||
482 | # | ||
337 | # Ethernet (10 or 100Mbit) | 483 | # Ethernet (10 or 100Mbit) |
338 | # | 484 | # |
339 | CONFIG_NET_ETHERNET=y | 485 | CONFIG_NET_ETHERNET=y |
@@ -359,11 +505,6 @@ CONFIG_SMC91X=y | |||
359 | # CONFIG_NET_RADIO is not set | 505 | # CONFIG_NET_RADIO is not set |
360 | 506 | ||
361 | # | 507 | # |
362 | # PCMCIA network device support | ||
363 | # | ||
364 | # CONFIG_NET_PCMCIA is not set | ||
365 | |||
366 | # | ||
367 | # Wan interfaces | 508 | # Wan interfaces |
368 | # | 509 | # |
369 | # CONFIG_WAN is not set | 510 | # CONFIG_WAN is not set |
@@ -371,6 +512,8 @@ CONFIG_SMC91X=y | |||
371 | # CONFIG_SLIP is not set | 512 | # CONFIG_SLIP is not set |
372 | # CONFIG_SHAPER is not set | 513 | # CONFIG_SHAPER is not set |
373 | # CONFIG_NETCONSOLE is not set | 514 | # CONFIG_NETCONSOLE is not set |
515 | # CONFIG_NETPOLL is not set | ||
516 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
374 | 517 | ||
375 | # | 518 | # |
376 | # ISDN subsystem | 519 | # ISDN subsystem |
@@ -386,6 +529,7 @@ CONFIG_SMC91X=y | |||
386 | # Input device support | 529 | # Input device support |
387 | # | 530 | # |
388 | CONFIG_INPUT=y | 531 | CONFIG_INPUT=y |
532 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
389 | 533 | ||
390 | # | 534 | # |
391 | # Userland interfaces | 535 | # Userland interfaces |
@@ -414,7 +558,6 @@ CONFIG_SERIO_SERPORT=y | |||
414 | # CONFIG_SERIO_LIBPS2 is not set | 558 | # CONFIG_SERIO_LIBPS2 is not set |
415 | # CONFIG_SERIO_RAW is not set | 559 | # CONFIG_SERIO_RAW is not set |
416 | # CONFIG_GAMEPORT is not set | 560 | # CONFIG_GAMEPORT is not set |
417 | CONFIG_SOUND_GAMEPORT=y | ||
418 | 561 | ||
419 | # | 562 | # |
420 | # Character devices | 563 | # Character devices |
@@ -422,6 +565,7 @@ CONFIG_SOUND_GAMEPORT=y | |||
422 | CONFIG_VT=y | 565 | CONFIG_VT=y |
423 | CONFIG_VT_CONSOLE=y | 566 | CONFIG_VT_CONSOLE=y |
424 | CONFIG_HW_CONSOLE=y | 567 | CONFIG_HW_CONSOLE=y |
568 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
425 | # CONFIG_SERIAL_NONSTANDARD is not set | 569 | # CONFIG_SERIAL_NONSTANDARD is not set |
426 | 570 | ||
427 | # | 571 | # |
@@ -450,8 +594,8 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
450 | # Watchdog Cards | 594 | # Watchdog Cards |
451 | # | 595 | # |
452 | # CONFIG_WATCHDOG is not set | 596 | # CONFIG_WATCHDOG is not set |
597 | CONFIG_HW_RANDOM=y | ||
453 | # CONFIG_RTC is not set | 598 | # CONFIG_RTC is not set |
454 | # CONFIG_GEN_RTC is not set | ||
455 | CONFIG_DS1302=y | 599 | CONFIG_DS1302=y |
456 | # CONFIG_DTLK is not set | 600 | # CONFIG_DTLK is not set |
457 | # CONFIG_R3964 is not set | 601 | # CONFIG_R3964 is not set |
@@ -459,17 +603,12 @@ CONFIG_DS1302=y | |||
459 | # | 603 | # |
460 | # Ftape, the floppy tape device driver | 604 | # Ftape, the floppy tape device driver |
461 | # | 605 | # |
462 | # CONFIG_DRM is not set | ||
463 | |||
464 | # | ||
465 | # PCMCIA character devices | ||
466 | # | ||
467 | # CONFIG_SYNCLINK_CS is not set | ||
468 | # CONFIG_RAW_DRIVER is not set | 606 | # CONFIG_RAW_DRIVER is not set |
469 | 607 | ||
470 | # | 608 | # |
471 | # TPM devices | 609 | # TPM devices |
472 | # | 610 | # |
611 | # CONFIG_TCG_TPM is not set | ||
473 | 612 | ||
474 | # | 613 | # |
475 | # I2C support | 614 | # I2C support |
@@ -477,34 +616,51 @@ CONFIG_DS1302=y | |||
477 | # CONFIG_I2C is not set | 616 | # CONFIG_I2C is not set |
478 | 617 | ||
479 | # | 618 | # |
619 | # SPI support | ||
620 | # | ||
621 | # CONFIG_SPI is not set | ||
622 | # CONFIG_SPI_MASTER is not set | ||
623 | |||
624 | # | ||
480 | # Dallas's 1-wire bus | 625 | # Dallas's 1-wire bus |
481 | # | 626 | # |
482 | # CONFIG_W1 is not set | 627 | # CONFIG_W1 is not set |
483 | 628 | ||
484 | # | 629 | # |
485 | # Misc devices | 630 | # Hardware Monitoring support |
486 | # | 631 | # |
632 | CONFIG_HWMON=y | ||
633 | # CONFIG_HWMON_VID is not set | ||
634 | # CONFIG_SENSORS_ABITUGURU is not set | ||
635 | # CONFIG_SENSORS_F71805F is not set | ||
636 | # CONFIG_SENSORS_VT1211 is not set | ||
637 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
487 | 638 | ||
488 | # | 639 | # |
489 | # Multimedia devices | 640 | # Multimedia devices |
490 | # | 641 | # |
491 | CONFIG_VIDEO_DEV=y | 642 | CONFIG_VIDEO_DEV=m |
643 | CONFIG_VIDEO_V4L1=y | ||
644 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
645 | CONFIG_VIDEO_V4L2=y | ||
492 | 646 | ||
493 | # | 647 | # |
494 | # Video For Linux | 648 | # Video Capture Adapters |
495 | # | 649 | # |
496 | 650 | ||
497 | # | 651 | # |
498 | # Video Adapters | 652 | # Video Capture Adapters |
499 | # | 653 | # |
654 | # CONFIG_VIDEO_ADV_DEBUG is not set | ||
655 | CONFIG_VIDEO_HELPER_CHIPS_AUTO=y | ||
656 | # CONFIG_VIDEO_VIVI is not set | ||
500 | # CONFIG_VIDEO_CPIA is not set | 657 | # CONFIG_VIDEO_CPIA is not set |
501 | CONFIG_VIDEO_M32R_AR=y | 658 | CONFIG_VIDEO_M32R_AR=m |
502 | CONFIG_VIDEO_M32R_AR_M64278=y | 659 | CONFIG_VIDEO_M32R_AR_M64278=m |
503 | 660 | ||
504 | # | 661 | # |
505 | # Radio Adapters | 662 | # Radio Adapters |
506 | # | 663 | # |
507 | # CONFIG_RADIO_MAESTRO is not set | ||
508 | 664 | ||
509 | # | 665 | # |
510 | # Digital Video Broadcasting Devices | 666 | # Digital Video Broadcasting Devices |
@@ -514,15 +670,16 @@ CONFIG_VIDEO_M32R_AR_M64278=y | |||
514 | # | 670 | # |
515 | # Graphics support | 671 | # Graphics support |
516 | # | 672 | # |
673 | CONFIG_FIRMWARE_EDID=y | ||
517 | CONFIG_FB=y | 674 | CONFIG_FB=y |
518 | # CONFIG_FB_CFB_FILLRECT is not set | 675 | CONFIG_FB_CFB_FILLRECT=y |
519 | # CONFIG_FB_CFB_COPYAREA is not set | 676 | CONFIG_FB_CFB_COPYAREA=y |
520 | # CONFIG_FB_CFB_IMAGEBLIT is not set | 677 | CONFIG_FB_CFB_IMAGEBLIT=y |
521 | # CONFIG_FB_SOFT_CURSOR is not set | ||
522 | # CONFIG_FB_MACMODES is not set | 678 | # CONFIG_FB_MACMODES is not set |
679 | # CONFIG_FB_BACKLIGHT is not set | ||
523 | # CONFIG_FB_MODE_HELPERS is not set | 680 | # CONFIG_FB_MODE_HELPERS is not set |
524 | # CONFIG_FB_TILEBLITTING is not set | 681 | # CONFIG_FB_TILEBLITTING is not set |
525 | # CONFIG_FB_S1D13XXX is not set | 682 | CONFIG_FB_S1D13XXX=y |
526 | # CONFIG_FB_VIRTUAL is not set | 683 | # CONFIG_FB_VIRTUAL is not set |
527 | 684 | ||
528 | # | 685 | # |
@@ -531,6 +688,7 @@ CONFIG_FB=y | |||
531 | # CONFIG_VGA_CONSOLE is not set | 688 | # CONFIG_VGA_CONSOLE is not set |
532 | CONFIG_DUMMY_CONSOLE=y | 689 | CONFIG_DUMMY_CONSOLE=y |
533 | CONFIG_FRAMEBUFFER_CONSOLE=y | 690 | CONFIG_FRAMEBUFFER_CONSOLE=y |
691 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
534 | # CONFIG_FONTS is not set | 692 | # CONFIG_FONTS is not set |
535 | CONFIG_FONT_8x8=y | 693 | CONFIG_FONT_8x8=y |
536 | CONFIG_FONT_8x16=y | 694 | CONFIG_FONT_8x16=y |
@@ -542,6 +700,7 @@ CONFIG_LOGO=y | |||
542 | CONFIG_LOGO_LINUX_MONO=y | 700 | CONFIG_LOGO_LINUX_MONO=y |
543 | CONFIG_LOGO_LINUX_VGA16=y | 701 | CONFIG_LOGO_LINUX_VGA16=y |
544 | CONFIG_LOGO_LINUX_CLUT224=y | 702 | CONFIG_LOGO_LINUX_CLUT224=y |
703 | CONFIG_LOGO_M32R_CLUT224=y | ||
545 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 704 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
546 | 705 | ||
547 | # | 706 | # |
@@ -554,6 +713,11 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
554 | # | 713 | # |
555 | # CONFIG_USB_ARCH_HAS_HCD is not set | 714 | # CONFIG_USB_ARCH_HAS_HCD is not set |
556 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 715 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
716 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
717 | |||
718 | # | ||
719 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
720 | # | ||
557 | 721 | ||
558 | # | 722 | # |
559 | # USB Gadget Support | 723 | # USB Gadget Support |
@@ -563,23 +727,62 @@ CONFIG_LOGO_LINUX_CLUT224=y | |||
563 | # | 727 | # |
564 | # MMC/SD Card support | 728 | # MMC/SD Card support |
565 | # | 729 | # |
566 | # CONFIG_MMC is not set | 730 | CONFIG_MMC=y |
731 | CONFIG_MMC_DEBUG=y | ||
732 | CONFIG_MMC_BLOCK=y | ||
733 | # CONFIG_MMC_TIFM_SD is not set | ||
734 | |||
735 | # | ||
736 | # LED devices | ||
737 | # | ||
738 | # CONFIG_NEW_LEDS is not set | ||
739 | |||
740 | # | ||
741 | # LED drivers | ||
742 | # | ||
743 | |||
744 | # | ||
745 | # LED Triggers | ||
746 | # | ||
567 | 747 | ||
568 | # | 748 | # |
569 | # InfiniBand support | 749 | # InfiniBand support |
570 | # | 750 | # |
571 | # CONFIG_INFINIBAND is not set | 751 | |
752 | # | ||
753 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
754 | # | ||
755 | |||
756 | # | ||
757 | # Real Time Clock | ||
758 | # | ||
759 | # CONFIG_RTC_CLASS is not set | ||
760 | |||
761 | # | ||
762 | # DMA Engine support | ||
763 | # | ||
764 | # CONFIG_DMA_ENGINE is not set | ||
765 | |||
766 | # | ||
767 | # DMA Clients | ||
768 | # | ||
769 | |||
770 | # | ||
771 | # DMA Devices | ||
772 | # | ||
572 | 773 | ||
573 | # | 774 | # |
574 | # File systems | 775 | # File systems |
575 | # | 776 | # |
576 | CONFIG_EXT2_FS=y | 777 | CONFIG_EXT2_FS=y |
577 | # CONFIG_EXT2_FS_XATTR is not set | 778 | # CONFIG_EXT2_FS_XATTR is not set |
578 | CONFIG_EXT3_FS=m | 779 | # CONFIG_EXT2_FS_XIP is not set |
780 | CONFIG_EXT3_FS=y | ||
579 | CONFIG_EXT3_FS_XATTR=y | 781 | CONFIG_EXT3_FS_XATTR=y |
580 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 782 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
581 | # CONFIG_EXT3_FS_SECURITY is not set | 783 | # CONFIG_EXT3_FS_SECURITY is not set |
582 | CONFIG_JBD=m | 784 | # CONFIG_EXT4DEV_FS is not set |
785 | CONFIG_JBD=y | ||
583 | CONFIG_JBD_DEBUG=y | 786 | CONFIG_JBD_DEBUG=y |
584 | CONFIG_FS_MBCACHE=y | 787 | CONFIG_FS_MBCACHE=y |
585 | CONFIG_REISERFS_FS=m | 788 | CONFIG_REISERFS_FS=m |
@@ -587,17 +790,19 @@ CONFIG_REISERFS_FS=m | |||
587 | # CONFIG_REISERFS_PROC_INFO is not set | 790 | # CONFIG_REISERFS_PROC_INFO is not set |
588 | # CONFIG_REISERFS_FS_XATTR is not set | 791 | # CONFIG_REISERFS_FS_XATTR is not set |
589 | # CONFIG_JFS_FS is not set | 792 | # CONFIG_JFS_FS is not set |
590 | 793 | # CONFIG_FS_POSIX_ACL is not set | |
591 | # | ||
592 | # XFS support | ||
593 | # | ||
594 | # CONFIG_XFS_FS is not set | 794 | # CONFIG_XFS_FS is not set |
795 | # CONFIG_GFS2_FS is not set | ||
796 | # CONFIG_OCFS2_FS is not set | ||
595 | # CONFIG_MINIX_FS is not set | 797 | # CONFIG_MINIX_FS is not set |
596 | # CONFIG_ROMFS_FS is not set | 798 | # CONFIG_ROMFS_FS is not set |
799 | CONFIG_INOTIFY=y | ||
800 | CONFIG_INOTIFY_USER=y | ||
597 | # CONFIG_QUOTA is not set | 801 | # CONFIG_QUOTA is not set |
598 | CONFIG_DNOTIFY=y | 802 | CONFIG_DNOTIFY=y |
599 | # CONFIG_AUTOFS_FS is not set | 803 | # CONFIG_AUTOFS_FS is not set |
600 | # CONFIG_AUTOFS4_FS is not set | 804 | # CONFIG_AUTOFS4_FS is not set |
805 | # CONFIG_FUSE_FS is not set | ||
601 | 806 | ||
602 | # | 807 | # |
603 | # CD-ROM/DVD Filesystems | 808 | # CD-ROM/DVD Filesystems |
@@ -623,15 +828,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
623 | # | 828 | # |
624 | CONFIG_PROC_FS=y | 829 | CONFIG_PROC_FS=y |
625 | CONFIG_PROC_KCORE=y | 830 | CONFIG_PROC_KCORE=y |
831 | CONFIG_PROC_SYSCTL=y | ||
626 | CONFIG_SYSFS=y | 832 | CONFIG_SYSFS=y |
627 | CONFIG_DEVFS_FS=y | ||
628 | CONFIG_DEVFS_MOUNT=y | ||
629 | # CONFIG_DEVFS_DEBUG is not set | ||
630 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
631 | CONFIG_TMPFS=y | 833 | CONFIG_TMPFS=y |
632 | # CONFIG_TMPFS_XATTR is not set | 834 | # CONFIG_TMPFS_POSIX_ACL is not set |
633 | # CONFIG_HUGETLB_PAGE is not set | 835 | # CONFIG_HUGETLB_PAGE is not set |
634 | CONFIG_RAMFS=y | 836 | CONFIG_RAMFS=y |
837 | # CONFIG_CONFIGFS_FS is not set | ||
635 | 838 | ||
636 | # | 839 | # |
637 | # Miscellaneous filesystems | 840 | # Miscellaneous filesystems |
@@ -643,6 +846,8 @@ CONFIG_RAMFS=y | |||
643 | # CONFIG_BEFS_FS is not set | 846 | # CONFIG_BEFS_FS is not set |
644 | # CONFIG_BFS_FS is not set | 847 | # CONFIG_BFS_FS is not set |
645 | # CONFIG_EFS_FS is not set | 848 | # CONFIG_EFS_FS is not set |
849 | # CONFIG_JFFS_FS is not set | ||
850 | # CONFIG_JFFS2_FS is not set | ||
646 | # CONFIG_CRAMFS is not set | 851 | # CONFIG_CRAMFS is not set |
647 | # CONFIG_VXFS_FS is not set | 852 | # CONFIG_VXFS_FS is not set |
648 | # CONFIG_HPFS_FS is not set | 853 | # CONFIG_HPFS_FS is not set |
@@ -655,12 +860,14 @@ CONFIG_RAMFS=y | |||
655 | # | 860 | # |
656 | CONFIG_NFS_FS=y | 861 | CONFIG_NFS_FS=y |
657 | CONFIG_NFS_V3=y | 862 | CONFIG_NFS_V3=y |
863 | # CONFIG_NFS_V3_ACL is not set | ||
658 | # CONFIG_NFS_V4 is not set | 864 | # CONFIG_NFS_V4 is not set |
659 | # CONFIG_NFS_DIRECTIO is not set | 865 | # CONFIG_NFS_DIRECTIO is not set |
660 | # CONFIG_NFSD is not set | 866 | # CONFIG_NFSD is not set |
661 | CONFIG_ROOT_NFS=y | 867 | CONFIG_ROOT_NFS=y |
662 | CONFIG_LOCKD=y | 868 | CONFIG_LOCKD=y |
663 | CONFIG_LOCKD_V4=y | 869 | CONFIG_LOCKD_V4=y |
870 | CONFIG_NFS_COMMON=y | ||
664 | CONFIG_SUNRPC=y | 871 | CONFIG_SUNRPC=y |
665 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 872 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
666 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 873 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -669,6 +876,7 @@ CONFIG_SUNRPC=y | |||
669 | # CONFIG_NCP_FS is not set | 876 | # CONFIG_NCP_FS is not set |
670 | # CONFIG_CODA_FS is not set | 877 | # CONFIG_CODA_FS is not set |
671 | # CONFIG_AFS_FS is not set | 878 | # CONFIG_AFS_FS is not set |
879 | # CONFIG_9P_FS is not set | ||
672 | 880 | ||
673 | # | 881 | # |
674 | # Partition Types | 882 | # Partition Types |
@@ -723,16 +931,23 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
723 | # | 931 | # |
724 | # Profiling support | 932 | # Profiling support |
725 | # | 933 | # |
726 | # CONFIG_PROFILING is not set | 934 | CONFIG_PROFILING=y |
935 | CONFIG_OPROFILE=y | ||
727 | 936 | ||
728 | # | 937 | # |
729 | # Kernel hacking | 938 | # Kernel hacking |
730 | # | 939 | # |
731 | # CONFIG_PRINTK_TIME is not set | 940 | # CONFIG_PRINTK_TIME is not set |
941 | CONFIG_ENABLE_MUST_CHECK=y | ||
942 | # CONFIG_MAGIC_SYSRQ is not set | ||
943 | # CONFIG_UNUSED_SYMBOLS is not set | ||
732 | # CONFIG_DEBUG_KERNEL is not set | 944 | # CONFIG_DEBUG_KERNEL is not set |
733 | CONFIG_LOG_BUF_SHIFT=14 | 945 | CONFIG_LOG_BUF_SHIFT=14 |
734 | # CONFIG_DEBUG_BUGVERBOSE is not set | 946 | # CONFIG_DEBUG_BUGVERBOSE is not set |
947 | # CONFIG_DEBUG_FS is not set | ||
735 | # CONFIG_FRAME_POINTER is not set | 948 | # CONFIG_FRAME_POINTER is not set |
949 | # CONFIG_UNWIND_INFO is not set | ||
950 | # CONFIG_HEADERS_CHECK is not set | ||
736 | 951 | ||
737 | # | 952 | # |
738 | # Security options | 953 | # Security options |
@@ -746,12 +961,9 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
746 | # CONFIG_CRYPTO is not set | 961 | # CONFIG_CRYPTO is not set |
747 | 962 | ||
748 | # | 963 | # |
749 | # Hardware crypto devices | ||
750 | # | ||
751 | |||
752 | # | ||
753 | # Library routines | 964 | # Library routines |
754 | # | 965 | # |
755 | # CONFIG_CRC_CCITT is not set | 966 | # CONFIG_CRC_CCITT is not set |
967 | # CONFIG_CRC16 is not set | ||
756 | CONFIG_CRC32=y | 968 | CONFIG_CRC32=y |
757 | # CONFIG_LIBCRC32C is not set | 969 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/m32r/mappi/defconfig.nommu b/arch/m32r/mappi/defconfig.nommu index a8425fba340b..fbf6c384c9d0 100644 --- a/arch/m32r/mappi/defconfig.nommu +++ b/arch/m32r/mappi/defconfig.nommu | |||
@@ -1,19 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:21:46 2005 | 4 | # Wed Dec 13 17:57:45 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 16 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 17 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 18 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
@@ -22,29 +21,36 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
22 | # General setup | 21 | # General setup |
23 | # | 22 | # |
24 | CONFIG_LOCALVERSION="" | 23 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | # CONFIG_SYSVIPC is not set | ||
25 | # CONFIG_POSIX_MQUEUE is not set | 26 | # CONFIG_POSIX_MQUEUE is not set |
26 | CONFIG_BSD_PROCESS_ACCT=y | 27 | CONFIG_BSD_PROCESS_ACCT=y |
27 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
28 | CONFIG_SYSCTL=y | 29 | # CONFIG_TASKSTATS is not set |
30 | # CONFIG_UTS_NS is not set | ||
29 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
30 | CONFIG_HOTPLUG=y | ||
31 | CONFIG_KOBJECT_UEVENT=y | ||
32 | CONFIG_IKCONFIG=y | 32 | CONFIG_IKCONFIG=y |
33 | # CONFIG_IKCONFIG_PROC is not set | 33 | # CONFIG_IKCONFIG_PROC is not set |
34 | CONFIG_SYSFS_DEPRECATED=y | ||
35 | # CONFIG_RELAY is not set | ||
36 | CONFIG_INITRAMFS_SOURCE="" | ||
37 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
38 | CONFIG_SYSCTL=y | ||
34 | CONFIG_EMBEDDED=y | 39 | CONFIG_EMBEDDED=y |
40 | CONFIG_SYSCTL_SYSCALL=y | ||
35 | # CONFIG_KALLSYMS is not set | 41 | # CONFIG_KALLSYMS is not set |
42 | CONFIG_HOTPLUG=y | ||
36 | CONFIG_PRINTK=y | 43 | CONFIG_PRINTK=y |
37 | CONFIG_BUG=y | 44 | CONFIG_BUG=y |
45 | CONFIG_ELF_CORE=y | ||
38 | CONFIG_BASE_FULL=y | 46 | CONFIG_BASE_FULL=y |
39 | # CONFIG_FUTEX is not set | 47 | # CONFIG_FUTEX is not set |
40 | # CONFIG_EPOLL is not set | 48 | # CONFIG_EPOLL is not set |
41 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 49 | CONFIG_SLAB=y |
42 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 50 | CONFIG_VM_EVENT_COUNTERS=y |
43 | CONFIG_CC_ALIGN_LABELS=0 | ||
44 | CONFIG_CC_ALIGN_LOOPS=0 | ||
45 | CONFIG_CC_ALIGN_JUMPS=0 | ||
46 | CONFIG_TINY_SHMEM=y | 51 | CONFIG_TINY_SHMEM=y |
47 | CONFIG_BASE_SMALL=0 | 52 | CONFIG_BASE_SMALL=0 |
53 | # CONFIG_SLOB is not set | ||
48 | 54 | ||
49 | # | 55 | # |
50 | # Loadable module support | 56 | # Loadable module support |
@@ -52,12 +58,30 @@ CONFIG_BASE_SMALL=0 | |||
52 | CONFIG_MODULES=y | 58 | CONFIG_MODULES=y |
53 | CONFIG_MODULE_UNLOAD=y | 59 | CONFIG_MODULE_UNLOAD=y |
54 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 60 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
55 | CONFIG_OBSOLETE_MODPARM=y | ||
56 | # CONFIG_MODVERSIONS is not set | 61 | # CONFIG_MODVERSIONS is not set |
57 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 62 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
58 | CONFIG_KMOD=y | 63 | CONFIG_KMOD=y |
59 | 64 | ||
60 | # | 65 | # |
66 | # Block layer | ||
67 | # | ||
68 | CONFIG_BLOCK=y | ||
69 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
70 | |||
71 | # | ||
72 | # IO Schedulers | ||
73 | # | ||
74 | CONFIG_IOSCHED_NOOP=y | ||
75 | # CONFIG_IOSCHED_AS is not set | ||
76 | CONFIG_IOSCHED_DEADLINE=y | ||
77 | CONFIG_IOSCHED_CFQ=y | ||
78 | # CONFIG_DEFAULT_AS is not set | ||
79 | # CONFIG_DEFAULT_DEADLINE is not set | ||
80 | CONFIG_DEFAULT_CFQ=y | ||
81 | # CONFIG_DEFAULT_NOOP is not set | ||
82 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
83 | |||
84 | # | ||
61 | # Processor type and features | 85 | # Processor type and features |
62 | # | 86 | # |
63 | CONFIG_PLAT_MAPPI=y | 87 | CONFIG_PLAT_MAPPI=y |
@@ -67,8 +91,10 @@ CONFIG_PLAT_MAPPI=y | |||
67 | # CONFIG_PLAT_OAKS32R is not set | 91 | # CONFIG_PLAT_OAKS32R is not set |
68 | # CONFIG_PLAT_MAPPI2 is not set | 92 | # CONFIG_PLAT_MAPPI2 is not set |
69 | # CONFIG_PLAT_MAPPI3 is not set | 93 | # CONFIG_PLAT_MAPPI3 is not set |
94 | # CONFIG_PLAT_M32104UT is not set | ||
70 | CONFIG_CHIP_M32700=y | 95 | CONFIG_CHIP_M32700=y |
71 | # CONFIG_CHIP_M32102 is not set | 96 | # CONFIG_CHIP_M32102 is not set |
97 | # CONFIG_CHIP_M32104 is not set | ||
72 | # CONFIG_CHIP_VDEC2 is not set | 98 | # CONFIG_CHIP_VDEC2 is not set |
73 | # CONFIG_CHIP_OPSP is not set | 99 | # CONFIG_CHIP_OPSP is not set |
74 | # CONFIG_MMU is not set | 100 | # CONFIG_MMU is not set |
@@ -82,18 +108,31 @@ CONFIG_TIMER_DIVIDE=128 | |||
82 | CONFIG_MEMORY_START=0x00000000 | 108 | CONFIG_MEMORY_START=0x00000000 |
83 | CONFIG_MEMORY_SIZE=0x00E00000 | 109 | CONFIG_MEMORY_SIZE=0x00E00000 |
84 | CONFIG_NOHIGHMEM=y | 110 | CONFIG_NOHIGHMEM=y |
85 | # CONFIG_DISCONTIGMEM is not set | 111 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
112 | CONFIG_SELECT_MEMORY_MODEL=y | ||
113 | # CONFIG_FLATMEM_MANUAL is not set | ||
114 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
115 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
116 | CONFIG_DISCONTIGMEM=y | ||
117 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
118 | CONFIG_NEED_MULTIPLE_NODES=y | ||
119 | # CONFIG_SPARSEMEM_STATIC is not set | ||
120 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
121 | # CONFIG_RESOURCES_64BIT is not set | ||
122 | CONFIG_IRAM_START=0x00f00000 | ||
123 | CONFIG_IRAM_SIZE=0x00080000 | ||
86 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 124 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
87 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 125 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
126 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
127 | CONFIG_GENERIC_HWEIGHT=y | ||
88 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 128 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
89 | CONFIG_PREEMPT=y | 129 | CONFIG_PREEMPT=y |
90 | # CONFIG_HAVE_DEC_LOCK is not set | ||
91 | # CONFIG_SMP is not set | 130 | # CONFIG_SMP is not set |
131 | CONFIG_NODES_SHIFT=1 | ||
92 | 132 | ||
93 | # | 133 | # |
94 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 134 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
95 | # | 135 | # |
96 | # CONFIG_PCI is not set | ||
97 | # CONFIG_ISA is not set | 136 | # CONFIG_ISA is not set |
98 | 137 | ||
99 | # | 138 | # |
@@ -102,12 +141,14 @@ CONFIG_PREEMPT=y | |||
102 | CONFIG_PCCARD=y | 141 | CONFIG_PCCARD=y |
103 | # CONFIG_PCMCIA_DEBUG is not set | 142 | # CONFIG_PCMCIA_DEBUG is not set |
104 | CONFIG_PCMCIA=y | 143 | CONFIG_PCMCIA=y |
144 | CONFIG_PCMCIA_LOAD_CIS=y | ||
145 | CONFIG_PCMCIA_IOCTL=y | ||
105 | 146 | ||
106 | # | 147 | # |
107 | # PC-card bridges | 148 | # PC-card bridges |
108 | # | 149 | # |
109 | # CONFIG_TCIC is not set | ||
110 | CONFIG_M32R_PCC=y | 150 | CONFIG_M32R_PCC=y |
151 | CONFIG_PCCARD_NONSTATIC=y | ||
111 | 152 | ||
112 | # | 153 | # |
113 | # PCI Hotplug Support | 154 | # PCI Hotplug Support |
@@ -122,6 +163,94 @@ CONFIG_BINFMT_FLAT=y | |||
122 | # CONFIG_BINFMT_MISC is not set | 163 | # CONFIG_BINFMT_MISC is not set |
123 | 164 | ||
124 | # | 165 | # |
166 | # Networking | ||
167 | # | ||
168 | CONFIG_NET=y | ||
169 | |||
170 | # | ||
171 | # Networking options | ||
172 | # | ||
173 | # CONFIG_NETDEBUG is not set | ||
174 | CONFIG_PACKET=y | ||
175 | # CONFIG_PACKET_MMAP is not set | ||
176 | CONFIG_UNIX=y | ||
177 | CONFIG_XFRM=y | ||
178 | # CONFIG_XFRM_USER is not set | ||
179 | # CONFIG_XFRM_SUB_POLICY is not set | ||
180 | # CONFIG_NET_KEY is not set | ||
181 | CONFIG_INET=y | ||
182 | # CONFIG_IP_MULTICAST is not set | ||
183 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
184 | CONFIG_IP_FIB_HASH=y | ||
185 | CONFIG_IP_PNP=y | ||
186 | CONFIG_IP_PNP_DHCP=y | ||
187 | # CONFIG_IP_PNP_BOOTP is not set | ||
188 | # CONFIG_IP_PNP_RARP is not set | ||
189 | # CONFIG_NET_IPIP is not set | ||
190 | # CONFIG_NET_IPGRE is not set | ||
191 | # CONFIG_ARPD is not set | ||
192 | # CONFIG_SYN_COOKIES is not set | ||
193 | # CONFIG_INET_AH is not set | ||
194 | # CONFIG_INET_ESP is not set | ||
195 | # CONFIG_INET_IPCOMP is not set | ||
196 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
197 | # CONFIG_INET_TUNNEL is not set | ||
198 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
199 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
200 | CONFIG_INET_XFRM_MODE_BEET=y | ||
201 | CONFIG_INET_DIAG=y | ||
202 | CONFIG_INET_TCP_DIAG=y | ||
203 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
204 | CONFIG_TCP_CONG_CUBIC=y | ||
205 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
206 | # CONFIG_TCP_MD5SIG is not set | ||
207 | # CONFIG_IPV6 is not set | ||
208 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
209 | # CONFIG_INET6_TUNNEL is not set | ||
210 | # CONFIG_NETWORK_SECMARK is not set | ||
211 | # CONFIG_NETFILTER is not set | ||
212 | |||
213 | # | ||
214 | # DCCP Configuration (EXPERIMENTAL) | ||
215 | # | ||
216 | # CONFIG_IP_DCCP is not set | ||
217 | |||
218 | # | ||
219 | # SCTP Configuration (EXPERIMENTAL) | ||
220 | # | ||
221 | # CONFIG_IP_SCTP is not set | ||
222 | |||
223 | # | ||
224 | # TIPC Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_TIPC is not set | ||
227 | # CONFIG_ATM is not set | ||
228 | # CONFIG_BRIDGE is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_DECNET is not set | ||
231 | # CONFIG_LLC2 is not set | ||
232 | # CONFIG_IPX is not set | ||
233 | # CONFIG_ATALK is not set | ||
234 | # CONFIG_X25 is not set | ||
235 | # CONFIG_LAPB is not set | ||
236 | # CONFIG_ECONET is not set | ||
237 | # CONFIG_WAN_ROUTER is not set | ||
238 | |||
239 | # | ||
240 | # QoS and/or fair queueing | ||
241 | # | ||
242 | # CONFIG_NET_SCHED is not set | ||
243 | |||
244 | # | ||
245 | # Network testing | ||
246 | # | ||
247 | # CONFIG_NET_PKTGEN is not set | ||
248 | # CONFIG_HAMRADIO is not set | ||
249 | # CONFIG_IRDA is not set | ||
250 | # CONFIG_BT is not set | ||
251 | # CONFIG_IEEE80211 is not set | ||
252 | |||
253 | # | ||
125 | # Device Drivers | 254 | # Device Drivers |
126 | # | 255 | # |
127 | 256 | ||
@@ -130,7 +259,13 @@ CONFIG_BINFMT_FLAT=y | |||
130 | # | 259 | # |
131 | CONFIG_STANDALONE=y | 260 | CONFIG_STANDALONE=y |
132 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 261 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
133 | # CONFIG_FW_LOADER is not set | 262 | CONFIG_FW_LOADER=y |
263 | # CONFIG_SYS_HYPERVISOR is not set | ||
264 | |||
265 | # | ||
266 | # Connector - unified userspace <-> kernelspace linker | ||
267 | # | ||
268 | # CONFIG_CONNECTOR is not set | ||
134 | 269 | ||
135 | # | 270 | # |
136 | # Memory Technology Devices (MTD) | 271 | # Memory Technology Devices (MTD) |
@@ -149,7 +284,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
149 | # | 284 | # |
150 | # Block devices | 285 | # Block devices |
151 | # | 286 | # |
152 | # CONFIG_BLK_DEV_FD is not set | ||
153 | # CONFIG_BLK_DEV_COW_COMMON is not set | 287 | # CONFIG_BLK_DEV_COW_COMMON is not set |
154 | CONFIG_BLK_DEV_LOOP=y | 288 | CONFIG_BLK_DEV_LOOP=y |
155 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 289 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -157,18 +291,15 @@ CONFIG_BLK_DEV_NBD=y | |||
157 | CONFIG_BLK_DEV_RAM=y | 291 | CONFIG_BLK_DEV_RAM=y |
158 | CONFIG_BLK_DEV_RAM_COUNT=16 | 292 | CONFIG_BLK_DEV_RAM_COUNT=16 |
159 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 293 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
294 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
160 | # CONFIG_BLK_DEV_INITRD is not set | 295 | # CONFIG_BLK_DEV_INITRD is not set |
161 | CONFIG_INITRAMFS_SOURCE="" | ||
162 | # CONFIG_CDROM_PKTCDVD is not set | 296 | # CONFIG_CDROM_PKTCDVD is not set |
297 | # CONFIG_ATA_OVER_ETH is not set | ||
163 | 298 | ||
164 | # | 299 | # |
165 | # IO Schedulers | 300 | # Misc devices |
166 | # | 301 | # |
167 | CONFIG_IOSCHED_NOOP=y | 302 | # CONFIG_TIFM_CORE is not set |
168 | # CONFIG_IOSCHED_AS is not set | ||
169 | CONFIG_IOSCHED_DEADLINE=y | ||
170 | CONFIG_IOSCHED_CFQ=y | ||
171 | # CONFIG_ATA_OVER_ETH is not set | ||
172 | 303 | ||
173 | # | 304 | # |
174 | # ATA/ATAPI/MFM/RLL support | 305 | # ATA/ATAPI/MFM/RLL support |
@@ -178,7 +309,13 @@ CONFIG_IOSCHED_CFQ=y | |||
178 | # | 309 | # |
179 | # SCSI device support | 310 | # SCSI device support |
180 | # | 311 | # |
312 | # CONFIG_RAID_ATTRS is not set | ||
181 | # CONFIG_SCSI is not set | 313 | # CONFIG_SCSI is not set |
314 | # CONFIG_SCSI_NETLINK is not set | ||
315 | |||
316 | # | ||
317 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
318 | # | ||
182 | 319 | ||
183 | # | 320 | # |
184 | # Multi-device support (RAID and LVM) | 321 | # Multi-device support (RAID and LVM) |
@@ -188,6 +325,7 @@ CONFIG_IOSCHED_CFQ=y | |||
188 | # | 325 | # |
189 | # Fusion MPT device support | 326 | # Fusion MPT device support |
190 | # | 327 | # |
328 | # CONFIG_FUSION is not set | ||
191 | 329 | ||
192 | # | 330 | # |
193 | # IEEE 1394 (FireWire) support | 331 | # IEEE 1394 (FireWire) support |
@@ -198,69 +336,8 @@ CONFIG_IOSCHED_CFQ=y | |||
198 | # | 336 | # |
199 | 337 | ||
200 | # | 338 | # |
201 | # Networking support | 339 | # Network device support |
202 | # | ||
203 | CONFIG_NET=y | ||
204 | |||
205 | # | ||
206 | # Networking options | ||
207 | # | ||
208 | CONFIG_PACKET=y | ||
209 | # CONFIG_PACKET_MMAP is not set | ||
210 | CONFIG_UNIX=y | ||
211 | # CONFIG_NET_KEY is not set | ||
212 | CONFIG_INET=y | ||
213 | # CONFIG_IP_MULTICAST is not set | ||
214 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
215 | CONFIG_IP_PNP=y | ||
216 | CONFIG_IP_PNP_DHCP=y | ||
217 | # CONFIG_IP_PNP_BOOTP is not set | ||
218 | # CONFIG_IP_PNP_RARP is not set | ||
219 | # CONFIG_NET_IPIP is not set | ||
220 | # CONFIG_NET_IPGRE is not set | ||
221 | # CONFIG_ARPD is not set | ||
222 | # CONFIG_SYN_COOKIES is not set | ||
223 | # CONFIG_INET_AH is not set | ||
224 | # CONFIG_INET_ESP is not set | ||
225 | # CONFIG_INET_IPCOMP is not set | ||
226 | # CONFIG_INET_TUNNEL is not set | ||
227 | CONFIG_IP_TCPDIAG=y | ||
228 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
229 | # CONFIG_IPV6 is not set | ||
230 | # CONFIG_NETFILTER is not set | ||
231 | |||
232 | # | ||
233 | # SCTP Configuration (EXPERIMENTAL) | ||
234 | # | ||
235 | # CONFIG_IP_SCTP is not set | ||
236 | # CONFIG_ATM is not set | ||
237 | # CONFIG_BRIDGE is not set | ||
238 | # CONFIG_VLAN_8021Q is not set | ||
239 | # CONFIG_DECNET is not set | ||
240 | # CONFIG_LLC2 is not set | ||
241 | # CONFIG_IPX is not set | ||
242 | # CONFIG_ATALK is not set | ||
243 | # CONFIG_X25 is not set | ||
244 | # CONFIG_LAPB is not set | ||
245 | # CONFIG_NET_DIVERT is not set | ||
246 | # CONFIG_ECONET is not set | ||
247 | # CONFIG_WAN_ROUTER is not set | ||
248 | |||
249 | # | ||
250 | # QoS and/or fair queueing | ||
251 | # | ||
252 | # CONFIG_NET_SCHED is not set | ||
253 | # CONFIG_NET_CLS_ROUTE is not set | ||
254 | |||
255 | # | ||
256 | # Network testing | ||
257 | # | 340 | # |
258 | # CONFIG_NET_PKTGEN is not set | ||
259 | # CONFIG_NETPOLL is not set | ||
260 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
261 | # CONFIG_HAMRADIO is not set | ||
262 | # CONFIG_IRDA is not set | ||
263 | # CONFIG_BT is not set | ||
264 | CONFIG_NETDEVICES=y | 341 | CONFIG_NETDEVICES=y |
265 | # CONFIG_DUMMY is not set | 342 | # CONFIG_DUMMY is not set |
266 | # CONFIG_BONDING is not set | 343 | # CONFIG_BONDING is not set |
@@ -268,6 +345,10 @@ CONFIG_NETDEVICES=y | |||
268 | # CONFIG_TUN is not set | 345 | # CONFIG_TUN is not set |
269 | 346 | ||
270 | # | 347 | # |
348 | # PHY device support | ||
349 | # | ||
350 | |||
351 | # | ||
271 | # Ethernet (10 or 100Mbit) | 352 | # Ethernet (10 or 100Mbit) |
272 | # | 353 | # |
273 | # CONFIG_NET_ETHERNET is not set | 354 | # CONFIG_NET_ETHERNET is not set |
@@ -303,6 +384,8 @@ CONFIG_NE2000=y | |||
303 | # CONFIG_SLIP is not set | 384 | # CONFIG_SLIP is not set |
304 | # CONFIG_SHAPER is not set | 385 | # CONFIG_SHAPER is not set |
305 | # CONFIG_NETCONSOLE is not set | 386 | # CONFIG_NETCONSOLE is not set |
387 | # CONFIG_NETPOLL is not set | ||
388 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
306 | 389 | ||
307 | # | 390 | # |
308 | # ISDN subsystem | 391 | # ISDN subsystem |
@@ -318,6 +401,7 @@ CONFIG_NE2000=y | |||
318 | # Input device support | 401 | # Input device support |
319 | # | 402 | # |
320 | CONFIG_INPUT=y | 403 | CONFIG_INPUT=y |
404 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
321 | 405 | ||
322 | # | 406 | # |
323 | # Userland interfaces | 407 | # Userland interfaces |
@@ -346,7 +430,6 @@ CONFIG_SERIO_SERPORT=y | |||
346 | # CONFIG_SERIO_LIBPS2 is not set | 430 | # CONFIG_SERIO_LIBPS2 is not set |
347 | # CONFIG_SERIO_RAW is not set | 431 | # CONFIG_SERIO_RAW is not set |
348 | # CONFIG_GAMEPORT is not set | 432 | # CONFIG_GAMEPORT is not set |
349 | CONFIG_SOUND_GAMEPORT=y | ||
350 | 433 | ||
351 | # | 434 | # |
352 | # Character devices | 435 | # Character devices |
@@ -366,7 +449,6 @@ CONFIG_SERIAL_CORE=y | |||
366 | CONFIG_SERIAL_CORE_CONSOLE=y | 449 | CONFIG_SERIAL_CORE_CONSOLE=y |
367 | CONFIG_SERIAL_M32R_SIO=y | 450 | CONFIG_SERIAL_M32R_SIO=y |
368 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | 451 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y |
369 | # CONFIG_SERIAL_M32R_PLDSIO is not set | ||
370 | CONFIG_UNIX98_PTYS=y | 452 | CONFIG_UNIX98_PTYS=y |
371 | CONFIG_LEGACY_PTYS=y | 453 | CONFIG_LEGACY_PTYS=y |
372 | CONFIG_LEGACY_PTY_COUNT=256 | 454 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -380,25 +462,27 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
380 | # Watchdog Cards | 462 | # Watchdog Cards |
381 | # | 463 | # |
382 | # CONFIG_WATCHDOG is not set | 464 | # CONFIG_WATCHDOG is not set |
465 | CONFIG_HW_RANDOM=y | ||
383 | # CONFIG_RTC is not set | 466 | # CONFIG_RTC is not set |
384 | # CONFIG_GEN_RTC is not set | ||
385 | # CONFIG_DTLK is not set | 467 | # CONFIG_DTLK is not set |
386 | # CONFIG_R3964 is not set | 468 | # CONFIG_R3964 is not set |
387 | 469 | ||
388 | # | 470 | # |
389 | # Ftape, the floppy tape device driver | 471 | # Ftape, the floppy tape device driver |
390 | # | 472 | # |
391 | # CONFIG_DRM is not set | ||
392 | 473 | ||
393 | # | 474 | # |
394 | # PCMCIA character devices | 475 | # PCMCIA character devices |
395 | # | 476 | # |
396 | # CONFIG_SYNCLINK_CS is not set | 477 | # CONFIG_SYNCLINK_CS is not set |
478 | # CONFIG_CARDMAN_4000 is not set | ||
479 | # CONFIG_CARDMAN_4040 is not set | ||
397 | # CONFIG_RAW_DRIVER is not set | 480 | # CONFIG_RAW_DRIVER is not set |
398 | 481 | ||
399 | # | 482 | # |
400 | # TPM devices | 483 | # TPM devices |
401 | # | 484 | # |
485 | # CONFIG_TCG_TPM is not set | ||
402 | 486 | ||
403 | # | 487 | # |
404 | # I2C support | 488 | # I2C support |
@@ -406,13 +490,25 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
406 | # CONFIG_I2C is not set | 490 | # CONFIG_I2C is not set |
407 | 491 | ||
408 | # | 492 | # |
493 | # SPI support | ||
494 | # | ||
495 | # CONFIG_SPI is not set | ||
496 | # CONFIG_SPI_MASTER is not set | ||
497 | |||
498 | # | ||
409 | # Dallas's 1-wire bus | 499 | # Dallas's 1-wire bus |
410 | # | 500 | # |
411 | # CONFIG_W1 is not set | 501 | # CONFIG_W1 is not set |
412 | 502 | ||
413 | # | 503 | # |
414 | # Misc devices | 504 | # Hardware Monitoring support |
415 | # | 505 | # |
506 | CONFIG_HWMON=y | ||
507 | # CONFIG_HWMON_VID is not set | ||
508 | # CONFIG_SENSORS_ABITUGURU is not set | ||
509 | # CONFIG_SENSORS_F71805F is not set | ||
510 | # CONFIG_SENSORS_VT1211 is not set | ||
511 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
416 | 512 | ||
417 | # | 513 | # |
418 | # Multimedia devices | 514 | # Multimedia devices |
@@ -427,7 +523,9 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
427 | # | 523 | # |
428 | # Graphics support | 524 | # Graphics support |
429 | # | 525 | # |
526 | CONFIG_FIRMWARE_EDID=y | ||
430 | # CONFIG_FB is not set | 527 | # CONFIG_FB is not set |
528 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
431 | 529 | ||
432 | # | 530 | # |
433 | # Sound | 531 | # Sound |
@@ -439,6 +537,11 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
439 | # | 537 | # |
440 | # CONFIG_USB_ARCH_HAS_HCD is not set | 538 | # CONFIG_USB_ARCH_HAS_HCD is not set |
441 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 539 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
540 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
541 | |||
542 | # | ||
543 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
544 | # | ||
442 | 545 | ||
443 | # | 546 | # |
444 | # USB Gadget Support | 547 | # USB Gadget Support |
@@ -451,30 +554,72 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
451 | # CONFIG_MMC is not set | 554 | # CONFIG_MMC is not set |
452 | 555 | ||
453 | # | 556 | # |
557 | # LED devices | ||
558 | # | ||
559 | # CONFIG_NEW_LEDS is not set | ||
560 | |||
561 | # | ||
562 | # LED drivers | ||
563 | # | ||
564 | |||
565 | # | ||
566 | # LED Triggers | ||
567 | # | ||
568 | |||
569 | # | ||
454 | # InfiniBand support | 570 | # InfiniBand support |
455 | # | 571 | # |
456 | # CONFIG_INFINIBAND is not set | 572 | |
573 | # | ||
574 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
575 | # | ||
576 | |||
577 | # | ||
578 | # Real Time Clock | ||
579 | # | ||
580 | # CONFIG_RTC_CLASS is not set | ||
581 | |||
582 | # | ||
583 | # DMA Engine support | ||
584 | # | ||
585 | # CONFIG_DMA_ENGINE is not set | ||
586 | |||
587 | # | ||
588 | # DMA Clients | ||
589 | # | ||
590 | |||
591 | # | ||
592 | # DMA Devices | ||
593 | # | ||
457 | 594 | ||
458 | # | 595 | # |
459 | # File systems | 596 | # File systems |
460 | # | 597 | # |
461 | CONFIG_EXT2_FS=y | 598 | CONFIG_EXT2_FS=y |
462 | # CONFIG_EXT2_FS_XATTR is not set | 599 | # CONFIG_EXT2_FS_XATTR is not set |
463 | # CONFIG_EXT3_FS is not set | 600 | CONFIG_EXT3_FS=y |
464 | # CONFIG_JBD is not set | 601 | CONFIG_EXT3_FS_XATTR=y |
602 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
603 | # CONFIG_EXT3_FS_SECURITY is not set | ||
604 | # CONFIG_EXT4DEV_FS is not set | ||
605 | CONFIG_JBD=y | ||
606 | # CONFIG_JBD_DEBUG is not set | ||
607 | CONFIG_FS_MBCACHE=y | ||
465 | # CONFIG_REISERFS_FS is not set | 608 | # CONFIG_REISERFS_FS is not set |
466 | # CONFIG_JFS_FS is not set | 609 | # CONFIG_JFS_FS is not set |
467 | 610 | # CONFIG_FS_POSIX_ACL is not set | |
468 | # | ||
469 | # XFS support | ||
470 | # | ||
471 | # CONFIG_XFS_FS is not set | 611 | # CONFIG_XFS_FS is not set |
612 | # CONFIG_GFS2_FS is not set | ||
613 | # CONFIG_OCFS2_FS is not set | ||
472 | # CONFIG_MINIX_FS is not set | 614 | # CONFIG_MINIX_FS is not set |
473 | # CONFIG_ROMFS_FS is not set | 615 | # CONFIG_ROMFS_FS is not set |
616 | CONFIG_INOTIFY=y | ||
617 | CONFIG_INOTIFY_USER=y | ||
474 | # CONFIG_QUOTA is not set | 618 | # CONFIG_QUOTA is not set |
475 | CONFIG_DNOTIFY=y | 619 | CONFIG_DNOTIFY=y |
476 | # CONFIG_AUTOFS_FS is not set | 620 | # CONFIG_AUTOFS_FS is not set |
477 | # CONFIG_AUTOFS4_FS is not set | 621 | # CONFIG_AUTOFS4_FS is not set |
622 | # CONFIG_FUSE_FS is not set | ||
478 | 623 | ||
479 | # | 624 | # |
480 | # CD-ROM/DVD Filesystems | 625 | # CD-ROM/DVD Filesystems |
@@ -493,15 +638,12 @@ CONFIG_DNOTIFY=y | |||
493 | # Pseudo filesystems | 638 | # Pseudo filesystems |
494 | # | 639 | # |
495 | CONFIG_PROC_FS=y | 640 | CONFIG_PROC_FS=y |
641 | CONFIG_PROC_SYSCTL=y | ||
496 | CONFIG_SYSFS=y | 642 | CONFIG_SYSFS=y |
497 | CONFIG_DEVFS_FS=y | ||
498 | CONFIG_DEVFS_MOUNT=y | ||
499 | # CONFIG_DEVFS_DEBUG is not set | ||
500 | CONFIG_DEVPTS_FS_XATTR=y | ||
501 | CONFIG_DEVPTS_FS_SECURITY=y | ||
502 | # CONFIG_TMPFS is not set | 643 | # CONFIG_TMPFS is not set |
503 | # CONFIG_HUGETLB_PAGE is not set | 644 | # CONFIG_HUGETLB_PAGE is not set |
504 | CONFIG_RAMFS=y | 645 | CONFIG_RAMFS=y |
646 | # CONFIG_CONFIGFS_FS is not set | ||
505 | 647 | ||
506 | # | 648 | # |
507 | # Miscellaneous filesystems | 649 | # Miscellaneous filesystems |
@@ -525,12 +667,14 @@ CONFIG_RAMFS=y | |||
525 | # | 667 | # |
526 | CONFIG_NFS_FS=y | 668 | CONFIG_NFS_FS=y |
527 | CONFIG_NFS_V3=y | 669 | CONFIG_NFS_V3=y |
670 | # CONFIG_NFS_V3_ACL is not set | ||
528 | # CONFIG_NFS_V4 is not set | 671 | # CONFIG_NFS_V4 is not set |
529 | # CONFIG_NFS_DIRECTIO is not set | 672 | # CONFIG_NFS_DIRECTIO is not set |
530 | # CONFIG_NFSD is not set | 673 | # CONFIG_NFSD is not set |
531 | CONFIG_ROOT_NFS=y | 674 | CONFIG_ROOT_NFS=y |
532 | CONFIG_LOCKD=y | 675 | CONFIG_LOCKD=y |
533 | CONFIG_LOCKD_V4=y | 676 | CONFIG_LOCKD_V4=y |
677 | CONFIG_NFS_COMMON=y | ||
534 | CONFIG_SUNRPC=y | 678 | CONFIG_SUNRPC=y |
535 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 679 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
536 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 680 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -539,6 +683,7 @@ CONFIG_SUNRPC=y | |||
539 | # CONFIG_NCP_FS is not set | 683 | # CONFIG_NCP_FS is not set |
540 | # CONFIG_CODA_FS is not set | 684 | # CONFIG_CODA_FS is not set |
541 | # CONFIG_AFS_FS is not set | 685 | # CONFIG_AFS_FS is not set |
686 | # CONFIG_9P_FS is not set | ||
542 | 687 | ||
543 | # | 688 | # |
544 | # Partition Types | 689 | # Partition Types |
@@ -599,10 +744,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
599 | # Kernel hacking | 744 | # Kernel hacking |
600 | # | 745 | # |
601 | # CONFIG_PRINTK_TIME is not set | 746 | # CONFIG_PRINTK_TIME is not set |
747 | CONFIG_ENABLE_MUST_CHECK=y | ||
748 | # CONFIG_MAGIC_SYSRQ is not set | ||
749 | # CONFIG_UNUSED_SYMBOLS is not set | ||
602 | # CONFIG_DEBUG_KERNEL is not set | 750 | # CONFIG_DEBUG_KERNEL is not set |
603 | CONFIG_LOG_BUF_SHIFT=14 | 751 | CONFIG_LOG_BUF_SHIFT=14 |
604 | # CONFIG_DEBUG_BUGVERBOSE is not set | 752 | # CONFIG_DEBUG_BUGVERBOSE is not set |
753 | # CONFIG_DEBUG_FS is not set | ||
605 | # CONFIG_FRAME_POINTER is not set | 754 | # CONFIG_FRAME_POINTER is not set |
755 | # CONFIG_UNWIND_INFO is not set | ||
756 | # CONFIG_HEADERS_CHECK is not set | ||
606 | 757 | ||
607 | # | 758 | # |
608 | # Security options | 759 | # Security options |
@@ -616,12 +767,9 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
616 | # CONFIG_CRYPTO is not set | 767 | # CONFIG_CRYPTO is not set |
617 | 768 | ||
618 | # | 769 | # |
619 | # Hardware crypto devices | ||
620 | # | ||
621 | |||
622 | # | ||
623 | # Library routines | 770 | # Library routines |
624 | # | 771 | # |
625 | # CONFIG_CRC_CCITT is not set | 772 | # CONFIG_CRC_CCITT is not set |
773 | # CONFIG_CRC16 is not set | ||
626 | CONFIG_CRC32=y | 774 | CONFIG_CRC32=y |
627 | # CONFIG_LIBCRC32C is not set | 775 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/m32r/mappi/defconfig.smp b/arch/m32r/mappi/defconfig.smp index 1a7f3cd42246..168669202b94 100644 --- a/arch/m32r/mappi/defconfig.smp +++ b/arch/m32r/mappi/defconfig.smp | |||
@@ -1,21 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:21:52 2005 | 4 | # Wed Dec 13 17:50:59 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | # CONFIG_CLEAN_COMPILE is not set | ||
17 | CONFIG_BROKEN=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | ||
19 | CONFIG_LOCK_KERNEL=y | 16 | CONFIG_LOCK_KERNEL=y |
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 17 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
21 | 18 | ||
@@ -23,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
23 | # General setup | 20 | # General setup |
24 | # | 21 | # |
25 | CONFIG_LOCALVERSION="" | 22 | CONFIG_LOCALVERSION="" |
23 | CONFIG_LOCALVERSION_AUTO=y | ||
26 | CONFIG_SWAP=y | 24 | CONFIG_SWAP=y |
27 | CONFIG_SYSVIPC=y | 25 | CONFIG_SYSVIPC=y |
26 | # CONFIG_IPC_NS is not set | ||
28 | # CONFIG_POSIX_MQUEUE is not set | 27 | # CONFIG_POSIX_MQUEUE is not set |
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 28 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 29 | # CONFIG_TASKSTATS is not set |
30 | # CONFIG_UTS_NS is not set | ||
31 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 32 | CONFIG_IKCONFIG=y |
35 | CONFIG_IKCONFIG_PROC=y | 33 | CONFIG_IKCONFIG_PROC=y |
36 | # CONFIG_CPUSETS is not set | 34 | # CONFIG_CPUSETS is not set |
35 | CONFIG_SYSFS_DEPRECATED=y | ||
36 | # CONFIG_RELAY is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
39 | CONFIG_SYSCTL=y | ||
37 | CONFIG_EMBEDDED=y | 40 | CONFIG_EMBEDDED=y |
41 | CONFIG_SYSCTL_SYSCALL=y | ||
38 | # CONFIG_KALLSYMS is not set | 42 | # CONFIG_KALLSYMS is not set |
43 | CONFIG_HOTPLUG=y | ||
39 | CONFIG_PRINTK=y | 44 | CONFIG_PRINTK=y |
40 | CONFIG_BUG=y | 45 | CONFIG_BUG=y |
46 | CONFIG_ELF_CORE=y | ||
41 | CONFIG_BASE_FULL=y | 47 | CONFIG_BASE_FULL=y |
42 | # CONFIG_FUTEX is not set | 48 | # CONFIG_FUTEX is not set |
43 | # CONFIG_EPOLL is not set | 49 | # CONFIG_EPOLL is not set |
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | 50 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 51 | CONFIG_SLAB=y |
47 | CONFIG_CC_ALIGN_LABELS=0 | 52 | CONFIG_VM_EVENT_COUNTERS=y |
48 | CONFIG_CC_ALIGN_LOOPS=0 | ||
49 | CONFIG_CC_ALIGN_JUMPS=0 | ||
50 | # CONFIG_TINY_SHMEM is not set | 53 | # CONFIG_TINY_SHMEM is not set |
51 | CONFIG_BASE_SMALL=0 | 54 | CONFIG_BASE_SMALL=0 |
55 | # CONFIG_SLOB is not set | ||
52 | 56 | ||
53 | # | 57 | # |
54 | # Loadable module support | 58 | # Loadable module support |
@@ -56,13 +60,31 @@ CONFIG_BASE_SMALL=0 | |||
56 | CONFIG_MODULES=y | 60 | CONFIG_MODULES=y |
57 | CONFIG_MODULE_UNLOAD=y | 61 | CONFIG_MODULE_UNLOAD=y |
58 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 62 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
59 | CONFIG_OBSOLETE_MODPARM=y | ||
60 | # CONFIG_MODVERSIONS is not set | 63 | # CONFIG_MODVERSIONS is not set |
61 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 64 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
62 | CONFIG_KMOD=y | 65 | CONFIG_KMOD=y |
63 | CONFIG_STOP_MACHINE=y | 66 | CONFIG_STOP_MACHINE=y |
64 | 67 | ||
65 | # | 68 | # |
69 | # Block layer | ||
70 | # | ||
71 | CONFIG_BLOCK=y | ||
72 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
73 | |||
74 | # | ||
75 | # IO Schedulers | ||
76 | # | ||
77 | CONFIG_IOSCHED_NOOP=y | ||
78 | # CONFIG_IOSCHED_AS is not set | ||
79 | CONFIG_IOSCHED_DEADLINE=y | ||
80 | CONFIG_IOSCHED_CFQ=y | ||
81 | # CONFIG_DEFAULT_AS is not set | ||
82 | # CONFIG_DEFAULT_DEADLINE is not set | ||
83 | CONFIG_DEFAULT_CFQ=y | ||
84 | # CONFIG_DEFAULT_NOOP is not set | ||
85 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
86 | |||
87 | # | ||
66 | # Processor type and features | 88 | # Processor type and features |
67 | # | 89 | # |
68 | CONFIG_PLAT_MAPPI=y | 90 | CONFIG_PLAT_MAPPI=y |
@@ -72,8 +94,10 @@ CONFIG_PLAT_MAPPI=y | |||
72 | # CONFIG_PLAT_OAKS32R is not set | 94 | # CONFIG_PLAT_OAKS32R is not set |
73 | # CONFIG_PLAT_MAPPI2 is not set | 95 | # CONFIG_PLAT_MAPPI2 is not set |
74 | # CONFIG_PLAT_MAPPI3 is not set | 96 | # CONFIG_PLAT_MAPPI3 is not set |
97 | # CONFIG_PLAT_M32104UT is not set | ||
75 | CONFIG_CHIP_M32700=y | 98 | CONFIG_CHIP_M32700=y |
76 | # CONFIG_CHIP_M32102 is not set | 99 | # CONFIG_CHIP_M32102 is not set |
100 | # CONFIG_CHIP_M32104 is not set | ||
77 | # CONFIG_CHIP_VDEC2 is not set | 101 | # CONFIG_CHIP_VDEC2 is not set |
78 | # CONFIG_CHIP_OPSP is not set | 102 | # CONFIG_CHIP_OPSP is not set |
79 | CONFIG_MMU=y | 103 | CONFIG_MMU=y |
@@ -87,23 +111,33 @@ CONFIG_TIMER_DIVIDE=128 | |||
87 | CONFIG_MEMORY_START=0x08000000 | 111 | CONFIG_MEMORY_START=0x08000000 |
88 | CONFIG_MEMORY_SIZE=0x04000000 | 112 | CONFIG_MEMORY_SIZE=0x04000000 |
89 | CONFIG_NOHIGHMEM=y | 113 | CONFIG_NOHIGHMEM=y |
114 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
115 | CONFIG_SELECT_MEMORY_MODEL=y | ||
116 | # CONFIG_FLATMEM_MANUAL is not set | ||
117 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
118 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
90 | CONFIG_DISCONTIGMEM=y | 119 | CONFIG_DISCONTIGMEM=y |
120 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
121 | CONFIG_NEED_MULTIPLE_NODES=y | ||
122 | # CONFIG_SPARSEMEM_STATIC is not set | ||
123 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
124 | # CONFIG_RESOURCES_64BIT is not set | ||
91 | CONFIG_IRAM_START=0x00f00000 | 125 | CONFIG_IRAM_START=0x00f00000 |
92 | CONFIG_IRAM_SIZE=0x00080000 | 126 | CONFIG_IRAM_SIZE=0x00080000 |
93 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 127 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
94 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 128 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
129 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
130 | CONFIG_GENERIC_HWEIGHT=y | ||
95 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 131 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
96 | CONFIG_PREEMPT=y | 132 | CONFIG_PREEMPT=y |
97 | # CONFIG_HAVE_DEC_LOCK is not set | ||
98 | CONFIG_SMP=y | 133 | CONFIG_SMP=y |
99 | CONFIG_CHIP_M32700_TS1=y | 134 | CONFIG_CHIP_M32700_TS1=y |
100 | CONFIG_NR_CPUS=2 | 135 | CONFIG_NR_CPUS=2 |
101 | # CONFIG_NUMA is not set | 136 | CONFIG_NODES_SHIFT=1 |
102 | 137 | ||
103 | # | 138 | # |
104 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 139 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
105 | # | 140 | # |
106 | # CONFIG_PCI is not set | ||
107 | # CONFIG_ISA is not set | 141 | # CONFIG_ISA is not set |
108 | 142 | ||
109 | # | 143 | # |
@@ -112,12 +146,14 @@ CONFIG_NR_CPUS=2 | |||
112 | CONFIG_PCCARD=y | 146 | CONFIG_PCCARD=y |
113 | # CONFIG_PCMCIA_DEBUG is not set | 147 | # CONFIG_PCMCIA_DEBUG is not set |
114 | CONFIG_PCMCIA=y | 148 | CONFIG_PCMCIA=y |
149 | CONFIG_PCMCIA_LOAD_CIS=y | ||
150 | CONFIG_PCMCIA_IOCTL=y | ||
115 | 151 | ||
116 | # | 152 | # |
117 | # PC-card bridges | 153 | # PC-card bridges |
118 | # | 154 | # |
119 | # CONFIG_TCIC is not set | ||
120 | CONFIG_M32R_PCC=y | 155 | CONFIG_M32R_PCC=y |
156 | CONFIG_PCCARD_NONSTATIC=y | ||
121 | 157 | ||
122 | # | 158 | # |
123 | # PCI Hotplug Support | 159 | # PCI Hotplug Support |
@@ -130,6 +166,93 @@ CONFIG_BINFMT_ELF=y | |||
130 | # CONFIG_BINFMT_MISC is not set | 166 | # CONFIG_BINFMT_MISC is not set |
131 | 167 | ||
132 | # | 168 | # |
169 | # Networking | ||
170 | # | ||
171 | CONFIG_NET=y | ||
172 | |||
173 | # | ||
174 | # Networking options | ||
175 | # | ||
176 | # CONFIG_NETDEBUG is not set | ||
177 | # CONFIG_PACKET is not set | ||
178 | CONFIG_UNIX=y | ||
179 | CONFIG_XFRM=y | ||
180 | # CONFIG_XFRM_USER is not set | ||
181 | # CONFIG_XFRM_SUB_POLICY is not set | ||
182 | # CONFIG_NET_KEY is not set | ||
183 | CONFIG_INET=y | ||
184 | # CONFIG_IP_MULTICAST is not set | ||
185 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
186 | CONFIG_IP_FIB_HASH=y | ||
187 | CONFIG_IP_PNP=y | ||
188 | CONFIG_IP_PNP_DHCP=y | ||
189 | # CONFIG_IP_PNP_BOOTP is not set | ||
190 | # CONFIG_IP_PNP_RARP is not set | ||
191 | # CONFIG_NET_IPIP is not set | ||
192 | # CONFIG_NET_IPGRE is not set | ||
193 | # CONFIG_ARPD is not set | ||
194 | # CONFIG_SYN_COOKIES is not set | ||
195 | # CONFIG_INET_AH is not set | ||
196 | # CONFIG_INET_ESP is not set | ||
197 | # CONFIG_INET_IPCOMP is not set | ||
198 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
199 | # CONFIG_INET_TUNNEL is not set | ||
200 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
201 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
202 | CONFIG_INET_XFRM_MODE_BEET=y | ||
203 | CONFIG_INET_DIAG=y | ||
204 | CONFIG_INET_TCP_DIAG=y | ||
205 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
206 | CONFIG_TCP_CONG_CUBIC=y | ||
207 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
208 | # CONFIG_TCP_MD5SIG is not set | ||
209 | # CONFIG_IPV6 is not set | ||
210 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
211 | # CONFIG_INET6_TUNNEL is not set | ||
212 | # CONFIG_NETWORK_SECMARK is not set | ||
213 | # CONFIG_NETFILTER is not set | ||
214 | |||
215 | # | ||
216 | # DCCP Configuration (EXPERIMENTAL) | ||
217 | # | ||
218 | # CONFIG_IP_DCCP is not set | ||
219 | |||
220 | # | ||
221 | # SCTP Configuration (EXPERIMENTAL) | ||
222 | # | ||
223 | # CONFIG_IP_SCTP is not set | ||
224 | |||
225 | # | ||
226 | # TIPC Configuration (EXPERIMENTAL) | ||
227 | # | ||
228 | # CONFIG_TIPC is not set | ||
229 | # CONFIG_ATM is not set | ||
230 | # CONFIG_BRIDGE is not set | ||
231 | # CONFIG_VLAN_8021Q is not set | ||
232 | # CONFIG_DECNET is not set | ||
233 | # CONFIG_LLC2 is not set | ||
234 | # CONFIG_IPX is not set | ||
235 | # CONFIG_ATALK is not set | ||
236 | # CONFIG_X25 is not set | ||
237 | # CONFIG_LAPB is not set | ||
238 | # CONFIG_ECONET is not set | ||
239 | # CONFIG_WAN_ROUTER is not set | ||
240 | |||
241 | # | ||
242 | # QoS and/or fair queueing | ||
243 | # | ||
244 | # CONFIG_NET_SCHED is not set | ||
245 | |||
246 | # | ||
247 | # Network testing | ||
248 | # | ||
249 | # CONFIG_NET_PKTGEN is not set | ||
250 | # CONFIG_HAMRADIO is not set | ||
251 | # CONFIG_IRDA is not set | ||
252 | # CONFIG_BT is not set | ||
253 | # CONFIG_IEEE80211 is not set | ||
254 | |||
255 | # | ||
133 | # Device Drivers | 256 | # Device Drivers |
134 | # | 257 | # |
135 | 258 | ||
@@ -138,7 +261,13 @@ CONFIG_BINFMT_ELF=y | |||
138 | # | 261 | # |
139 | # CONFIG_STANDALONE is not set | 262 | # CONFIG_STANDALONE is not set |
140 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 263 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
141 | # CONFIG_FW_LOADER is not set | 264 | CONFIG_FW_LOADER=y |
265 | # CONFIG_SYS_HYPERVISOR is not set | ||
266 | |||
267 | # | ||
268 | # Connector - unified userspace <-> kernelspace linker | ||
269 | # | ||
270 | # CONFIG_CONNECTOR is not set | ||
142 | 271 | ||
143 | # | 272 | # |
144 | # Memory Technology Devices (MTD) | 273 | # Memory Technology Devices (MTD) |
@@ -161,6 +290,8 @@ CONFIG_MTD_BLOCK=y | |||
161 | # CONFIG_FTL is not set | 290 | # CONFIG_FTL is not set |
162 | # CONFIG_NFTL is not set | 291 | # CONFIG_NFTL is not set |
163 | # CONFIG_INFTL is not set | 292 | # CONFIG_INFTL is not set |
293 | # CONFIG_RFD_FTL is not set | ||
294 | # CONFIG_SSFDC is not set | ||
164 | 295 | ||
165 | # | 296 | # |
166 | # RAM/ROM/Flash chip drivers | 297 | # RAM/ROM/Flash chip drivers |
@@ -186,6 +317,7 @@ CONFIG_MTD_CFI_I2=y | |||
186 | # Mapping drivers for chip access | 317 | # Mapping drivers for chip access |
187 | # | 318 | # |
188 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 319 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
320 | # CONFIG_MTD_PLATRAM is not set | ||
189 | 321 | ||
190 | # | 322 | # |
191 | # Self-contained MTD device drivers | 323 | # Self-contained MTD device drivers |
@@ -193,7 +325,6 @@ CONFIG_MTD_CFI_I2=y | |||
193 | # CONFIG_MTD_SLRAM is not set | 325 | # CONFIG_MTD_SLRAM is not set |
194 | # CONFIG_MTD_PHRAM is not set | 326 | # CONFIG_MTD_PHRAM is not set |
195 | # CONFIG_MTD_MTDRAM is not set | 327 | # CONFIG_MTD_MTDRAM is not set |
196 | # CONFIG_MTD_BLKMTD is not set | ||
197 | # CONFIG_MTD_BLOCK2MTD is not set | 328 | # CONFIG_MTD_BLOCK2MTD is not set |
198 | 329 | ||
199 | # | 330 | # |
@@ -209,6 +340,11 @@ CONFIG_MTD_CFI_I2=y | |||
209 | # CONFIG_MTD_NAND is not set | 340 | # CONFIG_MTD_NAND is not set |
210 | 341 | ||
211 | # | 342 | # |
343 | # OneNAND Flash Device Drivers | ||
344 | # | ||
345 | # CONFIG_MTD_ONENAND is not set | ||
346 | |||
347 | # | ||
212 | # Parallel port support | 348 | # Parallel port support |
213 | # | 349 | # |
214 | # CONFIG_PARPORT is not set | 350 | # CONFIG_PARPORT is not set |
@@ -220,7 +356,6 @@ CONFIG_MTD_CFI_I2=y | |||
220 | # | 356 | # |
221 | # Block devices | 357 | # Block devices |
222 | # | 358 | # |
223 | # CONFIG_BLK_DEV_FD is not set | ||
224 | # CONFIG_BLK_DEV_COW_COMMON is not set | 359 | # CONFIG_BLK_DEV_COW_COMMON is not set |
225 | CONFIG_BLK_DEV_LOOP=y | 360 | CONFIG_BLK_DEV_LOOP=y |
226 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 361 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -228,23 +363,21 @@ CONFIG_BLK_DEV_NBD=m | |||
228 | CONFIG_BLK_DEV_RAM=y | 363 | CONFIG_BLK_DEV_RAM=y |
229 | CONFIG_BLK_DEV_RAM_COUNT=16 | 364 | CONFIG_BLK_DEV_RAM_COUNT=16 |
230 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 365 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
366 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
231 | CONFIG_BLK_DEV_INITRD=y | 367 | CONFIG_BLK_DEV_INITRD=y |
232 | CONFIG_INITRAMFS_SOURCE="" | ||
233 | # CONFIG_CDROM_PKTCDVD is not set | 368 | # CONFIG_CDROM_PKTCDVD is not set |
369 | # CONFIG_ATA_OVER_ETH is not set | ||
234 | 370 | ||
235 | # | 371 | # |
236 | # IO Schedulers | 372 | # Misc devices |
237 | # | 373 | # |
238 | CONFIG_IOSCHED_NOOP=y | 374 | # CONFIG_TIFM_CORE is not set |
239 | # CONFIG_IOSCHED_AS is not set | ||
240 | CONFIG_IOSCHED_DEADLINE=y | ||
241 | CONFIG_IOSCHED_CFQ=y | ||
242 | # CONFIG_ATA_OVER_ETH is not set | ||
243 | 375 | ||
244 | # | 376 | # |
245 | # ATA/ATAPI/MFM/RLL support | 377 | # ATA/ATAPI/MFM/RLL support |
246 | # | 378 | # |
247 | CONFIG_IDE=m | 379 | CONFIG_IDE=m |
380 | CONFIG_IDE_MAX_HWIFS=4 | ||
248 | CONFIG_BLK_DEV_IDE=m | 381 | CONFIG_BLK_DEV_IDE=m |
249 | 382 | ||
250 | # | 383 | # |
@@ -271,7 +404,13 @@ CONFIG_IDE_GENERIC=m | |||
271 | # | 404 | # |
272 | # SCSI device support | 405 | # SCSI device support |
273 | # | 406 | # |
407 | # CONFIG_RAID_ATTRS is not set | ||
274 | # CONFIG_SCSI is not set | 408 | # CONFIG_SCSI is not set |
409 | # CONFIG_SCSI_NETLINK is not set | ||
410 | |||
411 | # | ||
412 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
413 | # | ||
275 | 414 | ||
276 | # | 415 | # |
277 | # Multi-device support (RAID and LVM) | 416 | # Multi-device support (RAID and LVM) |
@@ -281,79 +420,19 @@ CONFIG_IDE_GENERIC=m | |||
281 | # | 420 | # |
282 | # Fusion MPT device support | 421 | # Fusion MPT device support |
283 | # | 422 | # |
423 | # CONFIG_FUSION is not set | ||
284 | 424 | ||
285 | # | 425 | # |
286 | # IEEE 1394 (FireWire) support | 426 | # IEEE 1394 (FireWire) support |
287 | # | 427 | # |
288 | # CONFIG_IEEE1394 is not set | ||
289 | 428 | ||
290 | # | 429 | # |
291 | # I2O device support | 430 | # I2O device support |
292 | # | 431 | # |
293 | 432 | ||
294 | # | 433 | # |
295 | # Networking support | 434 | # Network device support |
296 | # | 435 | # |
297 | CONFIG_NET=y | ||
298 | |||
299 | # | ||
300 | # Networking options | ||
301 | # | ||
302 | # CONFIG_PACKET is not set | ||
303 | CONFIG_UNIX=y | ||
304 | # CONFIG_NET_KEY is not set | ||
305 | CONFIG_INET=y | ||
306 | # CONFIG_IP_MULTICAST is not set | ||
307 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
308 | CONFIG_IP_PNP=y | ||
309 | CONFIG_IP_PNP_DHCP=y | ||
310 | # CONFIG_IP_PNP_BOOTP is not set | ||
311 | # CONFIG_IP_PNP_RARP is not set | ||
312 | # CONFIG_NET_IPIP is not set | ||
313 | # CONFIG_NET_IPGRE is not set | ||
314 | # CONFIG_ARPD is not set | ||
315 | # CONFIG_SYN_COOKIES is not set | ||
316 | # CONFIG_INET_AH is not set | ||
317 | # CONFIG_INET_ESP is not set | ||
318 | # CONFIG_INET_IPCOMP is not set | ||
319 | # CONFIG_INET_TUNNEL is not set | ||
320 | CONFIG_IP_TCPDIAG=y | ||
321 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
322 | # CONFIG_IPV6 is not set | ||
323 | # CONFIG_NETFILTER is not set | ||
324 | |||
325 | # | ||
326 | # SCTP Configuration (EXPERIMENTAL) | ||
327 | # | ||
328 | # CONFIG_IP_SCTP is not set | ||
329 | # CONFIG_ATM is not set | ||
330 | # CONFIG_BRIDGE is not set | ||
331 | # CONFIG_VLAN_8021Q is not set | ||
332 | # CONFIG_DECNET is not set | ||
333 | # CONFIG_LLC2 is not set | ||
334 | # CONFIG_IPX is not set | ||
335 | # CONFIG_ATALK is not set | ||
336 | # CONFIG_X25 is not set | ||
337 | # CONFIG_LAPB is not set | ||
338 | # CONFIG_NET_DIVERT is not set | ||
339 | # CONFIG_ECONET is not set | ||
340 | # CONFIG_WAN_ROUTER is not set | ||
341 | |||
342 | # | ||
343 | # QoS and/or fair queueing | ||
344 | # | ||
345 | # CONFIG_NET_SCHED is not set | ||
346 | # CONFIG_NET_CLS_ROUTE is not set | ||
347 | |||
348 | # | ||
349 | # Network testing | ||
350 | # | ||
351 | # CONFIG_NET_PKTGEN is not set | ||
352 | # CONFIG_NETPOLL is not set | ||
353 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
354 | # CONFIG_HAMRADIO is not set | ||
355 | # CONFIG_IRDA is not set | ||
356 | # CONFIG_BT is not set | ||
357 | CONFIG_NETDEVICES=y | 436 | CONFIG_NETDEVICES=y |
358 | # CONFIG_DUMMY is not set | 437 | # CONFIG_DUMMY is not set |
359 | # CONFIG_BONDING is not set | 438 | # CONFIG_BONDING is not set |
@@ -361,6 +440,10 @@ CONFIG_NETDEVICES=y | |||
361 | # CONFIG_TUN is not set | 440 | # CONFIG_TUN is not set |
362 | 441 | ||
363 | # | 442 | # |
443 | # PHY device support | ||
444 | # | ||
445 | |||
446 | # | ||
364 | # Ethernet (10 or 100Mbit) | 447 | # Ethernet (10 or 100Mbit) |
365 | # | 448 | # |
366 | # CONFIG_NET_ETHERNET is not set | 449 | # CONFIG_NET_ETHERNET is not set |
@@ -396,6 +479,8 @@ CONFIG_NE2000=y | |||
396 | # CONFIG_SLIP is not set | 479 | # CONFIG_SLIP is not set |
397 | # CONFIG_SHAPER is not set | 480 | # CONFIG_SHAPER is not set |
398 | # CONFIG_NETCONSOLE is not set | 481 | # CONFIG_NETCONSOLE is not set |
482 | # CONFIG_NETPOLL is not set | ||
483 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
399 | 484 | ||
400 | # | 485 | # |
401 | # ISDN subsystem | 486 | # ISDN subsystem |
@@ -411,6 +496,7 @@ CONFIG_NE2000=y | |||
411 | # Input device support | 496 | # Input device support |
412 | # | 497 | # |
413 | CONFIG_INPUT=y | 498 | CONFIG_INPUT=y |
499 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
414 | 500 | ||
415 | # | 501 | # |
416 | # Userland interfaces | 502 | # Userland interfaces |
@@ -442,7 +528,6 @@ CONFIG_SERIO=y | |||
442 | # CONFIG_SERIO_LIBPS2 is not set | 528 | # CONFIG_SERIO_LIBPS2 is not set |
443 | # CONFIG_SERIO_RAW is not set | 529 | # CONFIG_SERIO_RAW is not set |
444 | # CONFIG_GAMEPORT is not set | 530 | # CONFIG_GAMEPORT is not set |
445 | CONFIG_SOUND_GAMEPORT=y | ||
446 | 531 | ||
447 | # | 532 | # |
448 | # Character devices | 533 | # Character devices |
@@ -462,7 +547,6 @@ CONFIG_SERIAL_CORE=y | |||
462 | CONFIG_SERIAL_CORE_CONSOLE=y | 547 | CONFIG_SERIAL_CORE_CONSOLE=y |
463 | CONFIG_SERIAL_M32R_SIO=y | 548 | CONFIG_SERIAL_M32R_SIO=y |
464 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | 549 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y |
465 | # CONFIG_SERIAL_M32R_PLDSIO is not set | ||
466 | CONFIG_UNIX98_PTYS=y | 550 | CONFIG_UNIX98_PTYS=y |
467 | CONFIG_LEGACY_PTYS=y | 551 | CONFIG_LEGACY_PTYS=y |
468 | CONFIG_LEGACY_PTY_COUNT=256 | 552 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -476,25 +560,27 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
476 | # Watchdog Cards | 560 | # Watchdog Cards |
477 | # | 561 | # |
478 | # CONFIG_WATCHDOG is not set | 562 | # CONFIG_WATCHDOG is not set |
563 | CONFIG_HW_RANDOM=y | ||
479 | # CONFIG_RTC is not set | 564 | # CONFIG_RTC is not set |
480 | # CONFIG_GEN_RTC is not set | ||
481 | # CONFIG_DTLK is not set | 565 | # CONFIG_DTLK is not set |
482 | # CONFIG_R3964 is not set | 566 | # CONFIG_R3964 is not set |
483 | 567 | ||
484 | # | 568 | # |
485 | # Ftape, the floppy tape device driver | 569 | # Ftape, the floppy tape device driver |
486 | # | 570 | # |
487 | # CONFIG_DRM is not set | ||
488 | 571 | ||
489 | # | 572 | # |
490 | # PCMCIA character devices | 573 | # PCMCIA character devices |
491 | # | 574 | # |
492 | # CONFIG_SYNCLINK_CS is not set | 575 | # CONFIG_SYNCLINK_CS is not set |
576 | # CONFIG_CARDMAN_4000 is not set | ||
577 | # CONFIG_CARDMAN_4040 is not set | ||
493 | # CONFIG_RAW_DRIVER is not set | 578 | # CONFIG_RAW_DRIVER is not set |
494 | 579 | ||
495 | # | 580 | # |
496 | # TPM devices | 581 | # TPM devices |
497 | # | 582 | # |
583 | # CONFIG_TCG_TPM is not set | ||
498 | 584 | ||
499 | # | 585 | # |
500 | # I2C support | 586 | # I2C support |
@@ -502,13 +588,25 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
502 | # CONFIG_I2C is not set | 588 | # CONFIG_I2C is not set |
503 | 589 | ||
504 | # | 590 | # |
591 | # SPI support | ||
592 | # | ||
593 | # CONFIG_SPI is not set | ||
594 | # CONFIG_SPI_MASTER is not set | ||
595 | |||
596 | # | ||
505 | # Dallas's 1-wire bus | 597 | # Dallas's 1-wire bus |
506 | # | 598 | # |
507 | # CONFIG_W1 is not set | 599 | # CONFIG_W1 is not set |
508 | 600 | ||
509 | # | 601 | # |
510 | # Misc devices | 602 | # Hardware Monitoring support |
511 | # | 603 | # |
604 | CONFIG_HWMON=y | ||
605 | # CONFIG_HWMON_VID is not set | ||
606 | # CONFIG_SENSORS_ABITUGURU is not set | ||
607 | # CONFIG_SENSORS_F71805F is not set | ||
608 | # CONFIG_SENSORS_VT1211 is not set | ||
609 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
512 | 610 | ||
513 | # | 611 | # |
514 | # Multimedia devices | 612 | # Multimedia devices |
@@ -523,7 +621,9 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
523 | # | 621 | # |
524 | # Graphics support | 622 | # Graphics support |
525 | # | 623 | # |
624 | CONFIG_FIRMWARE_EDID=y | ||
526 | # CONFIG_FB is not set | 625 | # CONFIG_FB is not set |
626 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
527 | 627 | ||
528 | # | 628 | # |
529 | # Sound | 629 | # Sound |
@@ -535,6 +635,11 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
535 | # | 635 | # |
536 | # CONFIG_USB_ARCH_HAS_HCD is not set | 636 | # CONFIG_USB_ARCH_HAS_HCD is not set |
537 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 637 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
638 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
639 | |||
640 | # | ||
641 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
642 | # | ||
538 | 643 | ||
539 | # | 644 | # |
540 | # USB Gadget Support | 645 | # USB Gadget Support |
@@ -547,30 +652,73 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
547 | # CONFIG_MMC is not set | 652 | # CONFIG_MMC is not set |
548 | 653 | ||
549 | # | 654 | # |
655 | # LED devices | ||
656 | # | ||
657 | # CONFIG_NEW_LEDS is not set | ||
658 | |||
659 | # | ||
660 | # LED drivers | ||
661 | # | ||
662 | |||
663 | # | ||
664 | # LED Triggers | ||
665 | # | ||
666 | |||
667 | # | ||
550 | # InfiniBand support | 668 | # InfiniBand support |
551 | # | 669 | # |
552 | # CONFIG_INFINIBAND is not set | 670 | |
671 | # | ||
672 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
673 | # | ||
674 | |||
675 | # | ||
676 | # Real Time Clock | ||
677 | # | ||
678 | # CONFIG_RTC_CLASS is not set | ||
679 | |||
680 | # | ||
681 | # DMA Engine support | ||
682 | # | ||
683 | # CONFIG_DMA_ENGINE is not set | ||
684 | |||
685 | # | ||
686 | # DMA Clients | ||
687 | # | ||
688 | |||
689 | # | ||
690 | # DMA Devices | ||
691 | # | ||
553 | 692 | ||
554 | # | 693 | # |
555 | # File systems | 694 | # File systems |
556 | # | 695 | # |
557 | CONFIG_EXT2_FS=y | 696 | CONFIG_EXT2_FS=y |
558 | # CONFIG_EXT2_FS_XATTR is not set | 697 | # CONFIG_EXT2_FS_XATTR is not set |
559 | # CONFIG_EXT3_FS is not set | 698 | # CONFIG_EXT2_FS_XIP is not set |
560 | # CONFIG_JBD is not set | 699 | CONFIG_EXT3_FS=y |
700 | CONFIG_EXT3_FS_XATTR=y | ||
701 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
702 | # CONFIG_EXT3_FS_SECURITY is not set | ||
703 | # CONFIG_EXT4DEV_FS is not set | ||
704 | CONFIG_JBD=y | ||
705 | # CONFIG_JBD_DEBUG is not set | ||
706 | CONFIG_FS_MBCACHE=y | ||
561 | # CONFIG_REISERFS_FS is not set | 707 | # CONFIG_REISERFS_FS is not set |
562 | # CONFIG_JFS_FS is not set | 708 | # CONFIG_JFS_FS is not set |
563 | 709 | # CONFIG_FS_POSIX_ACL is not set | |
564 | # | ||
565 | # XFS support | ||
566 | # | ||
567 | # CONFIG_XFS_FS is not set | 710 | # CONFIG_XFS_FS is not set |
711 | # CONFIG_GFS2_FS is not set | ||
712 | # CONFIG_OCFS2_FS is not set | ||
568 | # CONFIG_MINIX_FS is not set | 713 | # CONFIG_MINIX_FS is not set |
569 | CONFIG_ROMFS_FS=y | 714 | CONFIG_ROMFS_FS=y |
715 | CONFIG_INOTIFY=y | ||
716 | CONFIG_INOTIFY_USER=y | ||
570 | # CONFIG_QUOTA is not set | 717 | # CONFIG_QUOTA is not set |
571 | CONFIG_DNOTIFY=y | 718 | CONFIG_DNOTIFY=y |
572 | # CONFIG_AUTOFS_FS is not set | 719 | # CONFIG_AUTOFS_FS is not set |
573 | # CONFIG_AUTOFS4_FS is not set | 720 | # CONFIG_AUTOFS4_FS is not set |
721 | # CONFIG_FUSE_FS is not set | ||
574 | 722 | ||
575 | # | 723 | # |
576 | # CD-ROM/DVD Filesystems | 724 | # CD-ROM/DVD Filesystems |
@@ -595,16 +743,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
595 | # | 743 | # |
596 | CONFIG_PROC_FS=y | 744 | CONFIG_PROC_FS=y |
597 | CONFIG_PROC_KCORE=y | 745 | CONFIG_PROC_KCORE=y |
746 | CONFIG_PROC_SYSCTL=y | ||
598 | CONFIG_SYSFS=y | 747 | CONFIG_SYSFS=y |
599 | CONFIG_DEVFS_FS=y | ||
600 | CONFIG_DEVFS_MOUNT=y | ||
601 | # CONFIG_DEVFS_DEBUG is not set | ||
602 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
603 | CONFIG_TMPFS=y | 748 | CONFIG_TMPFS=y |
604 | # CONFIG_TMPFS_XATTR is not set | 749 | # CONFIG_TMPFS_POSIX_ACL is not set |
605 | # CONFIG_HUGETLBFS is not set | ||
606 | # CONFIG_HUGETLB_PAGE is not set | 750 | # CONFIG_HUGETLB_PAGE is not set |
607 | CONFIG_RAMFS=y | 751 | CONFIG_RAMFS=y |
752 | # CONFIG_CONFIGFS_FS is not set | ||
608 | 753 | ||
609 | # | 754 | # |
610 | # Miscellaneous filesystems | 755 | # Miscellaneous filesystems |
@@ -621,8 +766,9 @@ CONFIG_JFFS_FS_VERBOSE=0 | |||
621 | CONFIG_JFFS_PROC_FS=y | 766 | CONFIG_JFFS_PROC_FS=y |
622 | CONFIG_JFFS2_FS=y | 767 | CONFIG_JFFS2_FS=y |
623 | CONFIG_JFFS2_FS_DEBUG=0 | 768 | CONFIG_JFFS2_FS_DEBUG=0 |
624 | # CONFIG_JFFS2_FS_NAND is not set | 769 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
625 | # CONFIG_JFFS2_FS_NOR_ECC is not set | 770 | # CONFIG_JFFS2_SUMMARY is not set |
771 | # CONFIG_JFFS2_FS_XATTR is not set | ||
626 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 772 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
627 | CONFIG_JFFS2_ZLIB=y | 773 | CONFIG_JFFS2_ZLIB=y |
628 | CONFIG_JFFS2_RTIME=y | 774 | CONFIG_JFFS2_RTIME=y |
@@ -639,12 +785,14 @@ CONFIG_JFFS2_RTIME=y | |||
639 | # | 785 | # |
640 | CONFIG_NFS_FS=y | 786 | CONFIG_NFS_FS=y |
641 | CONFIG_NFS_V3=y | 787 | CONFIG_NFS_V3=y |
788 | # CONFIG_NFS_V3_ACL is not set | ||
642 | # CONFIG_NFS_V4 is not set | 789 | # CONFIG_NFS_V4 is not set |
643 | # CONFIG_NFS_DIRECTIO is not set | 790 | # CONFIG_NFS_DIRECTIO is not set |
644 | # CONFIG_NFSD is not set | 791 | # CONFIG_NFSD is not set |
645 | CONFIG_ROOT_NFS=y | 792 | CONFIG_ROOT_NFS=y |
646 | CONFIG_LOCKD=y | 793 | CONFIG_LOCKD=y |
647 | CONFIG_LOCKD_V4=y | 794 | CONFIG_LOCKD_V4=y |
795 | CONFIG_NFS_COMMON=y | ||
648 | CONFIG_SUNRPC=y | 796 | CONFIG_SUNRPC=y |
649 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 797 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
650 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 798 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -653,6 +801,7 @@ CONFIG_SUNRPC=y | |||
653 | # CONFIG_NCP_FS is not set | 801 | # CONFIG_NCP_FS is not set |
654 | # CONFIG_CODA_FS is not set | 802 | # CONFIG_CODA_FS is not set |
655 | # CONFIG_AFS_FS is not set | 803 | # CONFIG_AFS_FS is not set |
804 | # CONFIG_9P_FS is not set | ||
656 | 805 | ||
657 | # | 806 | # |
658 | # Partition Types | 807 | # Partition Types |
@@ -713,10 +862,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
713 | # Kernel hacking | 862 | # Kernel hacking |
714 | # | 863 | # |
715 | # CONFIG_PRINTK_TIME is not set | 864 | # CONFIG_PRINTK_TIME is not set |
865 | CONFIG_ENABLE_MUST_CHECK=y | ||
866 | # CONFIG_MAGIC_SYSRQ is not set | ||
867 | # CONFIG_UNUSED_SYMBOLS is not set | ||
716 | # CONFIG_DEBUG_KERNEL is not set | 868 | # CONFIG_DEBUG_KERNEL is not set |
717 | CONFIG_LOG_BUF_SHIFT=15 | 869 | CONFIG_LOG_BUF_SHIFT=15 |
718 | # CONFIG_DEBUG_BUGVERBOSE is not set | 870 | # CONFIG_DEBUG_BUGVERBOSE is not set |
871 | # CONFIG_DEBUG_FS is not set | ||
719 | # CONFIG_FRAME_POINTER is not set | 872 | # CONFIG_FRAME_POINTER is not set |
873 | # CONFIG_UNWIND_INFO is not set | ||
874 | # CONFIG_HEADERS_CHECK is not set | ||
720 | 875 | ||
721 | # | 876 | # |
722 | # Security options | 877 | # Security options |
@@ -730,13 +885,10 @@ CONFIG_LOG_BUF_SHIFT=15 | |||
730 | # CONFIG_CRYPTO is not set | 885 | # CONFIG_CRYPTO is not set |
731 | 886 | ||
732 | # | 887 | # |
733 | # Hardware crypto devices | ||
734 | # | ||
735 | |||
736 | # | ||
737 | # Library routines | 888 | # Library routines |
738 | # | 889 | # |
739 | # CONFIG_CRC_CCITT is not set | 890 | # CONFIG_CRC_CCITT is not set |
891 | # CONFIG_CRC16 is not set | ||
740 | CONFIG_CRC32=y | 892 | CONFIG_CRC32=y |
741 | # CONFIG_LIBCRC32C is not set | 893 | # CONFIG_LIBCRC32C is not set |
742 | CONFIG_ZLIB_INFLATE=y | 894 | CONFIG_ZLIB_INFLATE=y |
diff --git a/arch/m32r/mappi/defconfig.up b/arch/m32r/mappi/defconfig.up index 38910fb76692..5ba00603c1a0 100644 --- a/arch/m32r/mappi/defconfig.up +++ b/arch/m32r/mappi/defconfig.up | |||
@@ -1,20 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:21:59 2005 | 4 | # Wed Dec 13 17:51:20 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | # CONFIG_CLEAN_COMPILE is not set | ||
17 | CONFIG_BROKEN=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | 16 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_LOCK_KERNEL=y | 17 | CONFIG_LOCK_KERNEL=y |
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 18 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
@@ -23,31 +21,38 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
23 | # General setup | 21 | # General setup |
24 | # | 22 | # |
25 | CONFIG_LOCALVERSION="" | 23 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | ||
26 | CONFIG_SWAP=y | 25 | CONFIG_SWAP=y |
27 | CONFIG_SYSVIPC=y | 26 | CONFIG_SYSVIPC=y |
27 | # CONFIG_IPC_NS is not set | ||
28 | # CONFIG_POSIX_MQUEUE is not set | 28 | # CONFIG_POSIX_MQUEUE is not set |
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 29 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 30 | # CONFIG_TASKSTATS is not set |
31 | # CONFIG_UTS_NS is not set | ||
31 | # CONFIG_AUDIT is not set | 32 | # CONFIG_AUDIT is not set |
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 33 | CONFIG_IKCONFIG=y |
35 | CONFIG_IKCONFIG_PROC=y | 34 | CONFIG_IKCONFIG_PROC=y |
35 | CONFIG_SYSFS_DEPRECATED=y | ||
36 | # CONFIG_RELAY is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
39 | CONFIG_SYSCTL=y | ||
36 | CONFIG_EMBEDDED=y | 40 | CONFIG_EMBEDDED=y |
41 | CONFIG_SYSCTL_SYSCALL=y | ||
37 | # CONFIG_KALLSYMS is not set | 42 | # CONFIG_KALLSYMS is not set |
43 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_PRINTK=y | 44 | CONFIG_PRINTK=y |
39 | CONFIG_BUG=y | 45 | CONFIG_BUG=y |
46 | CONFIG_ELF_CORE=y | ||
40 | CONFIG_BASE_FULL=y | 47 | CONFIG_BASE_FULL=y |
41 | # CONFIG_FUTEX is not set | 48 | # CONFIG_FUTEX is not set |
42 | # CONFIG_EPOLL is not set | 49 | # CONFIG_EPOLL is not set |
43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
44 | CONFIG_SHMEM=y | 50 | CONFIG_SHMEM=y |
45 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 51 | CONFIG_SLAB=y |
46 | CONFIG_CC_ALIGN_LABELS=0 | 52 | CONFIG_VM_EVENT_COUNTERS=y |
47 | CONFIG_CC_ALIGN_LOOPS=0 | ||
48 | CONFIG_CC_ALIGN_JUMPS=0 | ||
49 | # CONFIG_TINY_SHMEM is not set | 53 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | 54 | CONFIG_BASE_SMALL=0 |
55 | # CONFIG_SLOB is not set | ||
51 | 56 | ||
52 | # | 57 | # |
53 | # Loadable module support | 58 | # Loadable module support |
@@ -55,12 +60,30 @@ CONFIG_BASE_SMALL=0 | |||
55 | CONFIG_MODULES=y | 60 | CONFIG_MODULES=y |
56 | CONFIG_MODULE_UNLOAD=y | 61 | CONFIG_MODULE_UNLOAD=y |
57 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 62 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
58 | CONFIG_OBSOLETE_MODPARM=y | ||
59 | # CONFIG_MODVERSIONS is not set | 63 | # CONFIG_MODVERSIONS is not set |
60 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 64 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
61 | CONFIG_KMOD=y | 65 | CONFIG_KMOD=y |
62 | 66 | ||
63 | # | 67 | # |
68 | # Block layer | ||
69 | # | ||
70 | CONFIG_BLOCK=y | ||
71 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
72 | |||
73 | # | ||
74 | # IO Schedulers | ||
75 | # | ||
76 | CONFIG_IOSCHED_NOOP=y | ||
77 | # CONFIG_IOSCHED_AS is not set | ||
78 | CONFIG_IOSCHED_DEADLINE=y | ||
79 | CONFIG_IOSCHED_CFQ=y | ||
80 | # CONFIG_DEFAULT_AS is not set | ||
81 | # CONFIG_DEFAULT_DEADLINE is not set | ||
82 | CONFIG_DEFAULT_CFQ=y | ||
83 | # CONFIG_DEFAULT_NOOP is not set | ||
84 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
85 | |||
86 | # | ||
64 | # Processor type and features | 87 | # Processor type and features |
65 | # | 88 | # |
66 | CONFIG_PLAT_MAPPI=y | 89 | CONFIG_PLAT_MAPPI=y |
@@ -70,8 +93,10 @@ CONFIG_PLAT_MAPPI=y | |||
70 | # CONFIG_PLAT_OAKS32R is not set | 93 | # CONFIG_PLAT_OAKS32R is not set |
71 | # CONFIG_PLAT_MAPPI2 is not set | 94 | # CONFIG_PLAT_MAPPI2 is not set |
72 | # CONFIG_PLAT_MAPPI3 is not set | 95 | # CONFIG_PLAT_MAPPI3 is not set |
96 | # CONFIG_PLAT_M32104UT is not set | ||
73 | CONFIG_CHIP_M32700=y | 97 | CONFIG_CHIP_M32700=y |
74 | # CONFIG_CHIP_M32102 is not set | 98 | # CONFIG_CHIP_M32102 is not set |
99 | # CONFIG_CHIP_M32104 is not set | ||
75 | # CONFIG_CHIP_VDEC2 is not set | 100 | # CONFIG_CHIP_VDEC2 is not set |
76 | # CONFIG_CHIP_OPSP is not set | 101 | # CONFIG_CHIP_OPSP is not set |
77 | CONFIG_MMU=y | 102 | CONFIG_MMU=y |
@@ -85,20 +110,31 @@ CONFIG_TIMER_DIVIDE=128 | |||
85 | CONFIG_MEMORY_START=0x08000000 | 110 | CONFIG_MEMORY_START=0x08000000 |
86 | CONFIG_MEMORY_SIZE=0x04000000 | 111 | CONFIG_MEMORY_SIZE=0x04000000 |
87 | CONFIG_NOHIGHMEM=y | 112 | CONFIG_NOHIGHMEM=y |
113 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
114 | CONFIG_SELECT_MEMORY_MODEL=y | ||
115 | # CONFIG_FLATMEM_MANUAL is not set | ||
116 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
117 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
88 | CONFIG_DISCONTIGMEM=y | 118 | CONFIG_DISCONTIGMEM=y |
119 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
120 | CONFIG_NEED_MULTIPLE_NODES=y | ||
121 | # CONFIG_SPARSEMEM_STATIC is not set | ||
122 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
123 | # CONFIG_RESOURCES_64BIT is not set | ||
89 | CONFIG_IRAM_START=0x00f00000 | 124 | CONFIG_IRAM_START=0x00f00000 |
90 | CONFIG_IRAM_SIZE=0x00080000 | 125 | CONFIG_IRAM_SIZE=0x00080000 |
91 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 126 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
92 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 127 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
128 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
129 | CONFIG_GENERIC_HWEIGHT=y | ||
93 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 130 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
94 | CONFIG_PREEMPT=y | 131 | CONFIG_PREEMPT=y |
95 | # CONFIG_HAVE_DEC_LOCK is not set | ||
96 | # CONFIG_SMP is not set | 132 | # CONFIG_SMP is not set |
133 | CONFIG_NODES_SHIFT=1 | ||
97 | 134 | ||
98 | # | 135 | # |
99 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 136 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
100 | # | 137 | # |
101 | # CONFIG_PCI is not set | ||
102 | # CONFIG_ISA is not set | 138 | # CONFIG_ISA is not set |
103 | 139 | ||
104 | # | 140 | # |
@@ -107,12 +143,14 @@ CONFIG_PREEMPT=y | |||
107 | CONFIG_PCCARD=y | 143 | CONFIG_PCCARD=y |
108 | # CONFIG_PCMCIA_DEBUG is not set | 144 | # CONFIG_PCMCIA_DEBUG is not set |
109 | CONFIG_PCMCIA=y | 145 | CONFIG_PCMCIA=y |
146 | CONFIG_PCMCIA_LOAD_CIS=y | ||
147 | CONFIG_PCMCIA_IOCTL=y | ||
110 | 148 | ||
111 | # | 149 | # |
112 | # PC-card bridges | 150 | # PC-card bridges |
113 | # | 151 | # |
114 | # CONFIG_TCIC is not set | ||
115 | CONFIG_M32R_PCC=y | 152 | CONFIG_M32R_PCC=y |
153 | CONFIG_PCCARD_NONSTATIC=y | ||
116 | 154 | ||
117 | # | 155 | # |
118 | # PCI Hotplug Support | 156 | # PCI Hotplug Support |
@@ -125,6 +163,93 @@ CONFIG_BINFMT_ELF=y | |||
125 | # CONFIG_BINFMT_MISC is not set | 163 | # CONFIG_BINFMT_MISC is not set |
126 | 164 | ||
127 | # | 165 | # |
166 | # Networking | ||
167 | # | ||
168 | CONFIG_NET=y | ||
169 | |||
170 | # | ||
171 | # Networking options | ||
172 | # | ||
173 | # CONFIG_NETDEBUG is not set | ||
174 | # CONFIG_PACKET is not set | ||
175 | CONFIG_UNIX=y | ||
176 | CONFIG_XFRM=y | ||
177 | # CONFIG_XFRM_USER is not set | ||
178 | # CONFIG_XFRM_SUB_POLICY is not set | ||
179 | # CONFIG_NET_KEY is not set | ||
180 | CONFIG_INET=y | ||
181 | # CONFIG_IP_MULTICAST is not set | ||
182 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
183 | CONFIG_IP_FIB_HASH=y | ||
184 | CONFIG_IP_PNP=y | ||
185 | CONFIG_IP_PNP_DHCP=y | ||
186 | # CONFIG_IP_PNP_BOOTP is not set | ||
187 | # CONFIG_IP_PNP_RARP is not set | ||
188 | # CONFIG_NET_IPIP is not set | ||
189 | # CONFIG_NET_IPGRE is not set | ||
190 | # CONFIG_ARPD is not set | ||
191 | # CONFIG_SYN_COOKIES is not set | ||
192 | # CONFIG_INET_AH is not set | ||
193 | # CONFIG_INET_ESP is not set | ||
194 | # CONFIG_INET_IPCOMP is not set | ||
195 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
196 | # CONFIG_INET_TUNNEL is not set | ||
197 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
198 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
199 | CONFIG_INET_XFRM_MODE_BEET=y | ||
200 | CONFIG_INET_DIAG=y | ||
201 | CONFIG_INET_TCP_DIAG=y | ||
202 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
203 | CONFIG_TCP_CONG_CUBIC=y | ||
204 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
205 | # CONFIG_TCP_MD5SIG is not set | ||
206 | # CONFIG_IPV6 is not set | ||
207 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
208 | # CONFIG_INET6_TUNNEL is not set | ||
209 | # CONFIG_NETWORK_SECMARK is not set | ||
210 | # CONFIG_NETFILTER is not set | ||
211 | |||
212 | # | ||
213 | # DCCP Configuration (EXPERIMENTAL) | ||
214 | # | ||
215 | # CONFIG_IP_DCCP is not set | ||
216 | |||
217 | # | ||
218 | # SCTP Configuration (EXPERIMENTAL) | ||
219 | # | ||
220 | # CONFIG_IP_SCTP is not set | ||
221 | |||
222 | # | ||
223 | # TIPC Configuration (EXPERIMENTAL) | ||
224 | # | ||
225 | # CONFIG_TIPC is not set | ||
226 | # CONFIG_ATM is not set | ||
227 | # CONFIG_BRIDGE is not set | ||
228 | # CONFIG_VLAN_8021Q is not set | ||
229 | # CONFIG_DECNET is not set | ||
230 | # CONFIG_LLC2 is not set | ||
231 | # CONFIG_IPX is not set | ||
232 | # CONFIG_ATALK is not set | ||
233 | # CONFIG_X25 is not set | ||
234 | # CONFIG_LAPB is not set | ||
235 | # CONFIG_ECONET is not set | ||
236 | # CONFIG_WAN_ROUTER is not set | ||
237 | |||
238 | # | ||
239 | # QoS and/or fair queueing | ||
240 | # | ||
241 | # CONFIG_NET_SCHED is not set | ||
242 | |||
243 | # | ||
244 | # Network testing | ||
245 | # | ||
246 | # CONFIG_NET_PKTGEN is not set | ||
247 | # CONFIG_HAMRADIO is not set | ||
248 | # CONFIG_IRDA is not set | ||
249 | # CONFIG_BT is not set | ||
250 | # CONFIG_IEEE80211 is not set | ||
251 | |||
252 | # | ||
128 | # Device Drivers | 253 | # Device Drivers |
129 | # | 254 | # |
130 | 255 | ||
@@ -133,7 +258,13 @@ CONFIG_BINFMT_ELF=y | |||
133 | # | 258 | # |
134 | # CONFIG_STANDALONE is not set | 259 | # CONFIG_STANDALONE is not set |
135 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 260 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
136 | # CONFIG_FW_LOADER is not set | 261 | CONFIG_FW_LOADER=y |
262 | # CONFIG_SYS_HYPERVISOR is not set | ||
263 | |||
264 | # | ||
265 | # Connector - unified userspace <-> kernelspace linker | ||
266 | # | ||
267 | # CONFIG_CONNECTOR is not set | ||
137 | 268 | ||
138 | # | 269 | # |
139 | # Memory Technology Devices (MTD) | 270 | # Memory Technology Devices (MTD) |
@@ -156,6 +287,8 @@ CONFIG_MTD_BLOCK=y | |||
156 | # CONFIG_FTL is not set | 287 | # CONFIG_FTL is not set |
157 | # CONFIG_NFTL is not set | 288 | # CONFIG_NFTL is not set |
158 | # CONFIG_INFTL is not set | 289 | # CONFIG_INFTL is not set |
290 | # CONFIG_RFD_FTL is not set | ||
291 | # CONFIG_SSFDC is not set | ||
159 | 292 | ||
160 | # | 293 | # |
161 | # RAM/ROM/Flash chip drivers | 294 | # RAM/ROM/Flash chip drivers |
@@ -181,6 +314,7 @@ CONFIG_MTD_CFI_I2=y | |||
181 | # Mapping drivers for chip access | 314 | # Mapping drivers for chip access |
182 | # | 315 | # |
183 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 316 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
317 | # CONFIG_MTD_PLATRAM is not set | ||
184 | 318 | ||
185 | # | 319 | # |
186 | # Self-contained MTD device drivers | 320 | # Self-contained MTD device drivers |
@@ -188,7 +322,6 @@ CONFIG_MTD_CFI_I2=y | |||
188 | # CONFIG_MTD_SLRAM is not set | 322 | # CONFIG_MTD_SLRAM is not set |
189 | # CONFIG_MTD_PHRAM is not set | 323 | # CONFIG_MTD_PHRAM is not set |
190 | # CONFIG_MTD_MTDRAM is not set | 324 | # CONFIG_MTD_MTDRAM is not set |
191 | # CONFIG_MTD_BLKMTD is not set | ||
192 | # CONFIG_MTD_BLOCK2MTD is not set | 325 | # CONFIG_MTD_BLOCK2MTD is not set |
193 | 326 | ||
194 | # | 327 | # |
@@ -204,6 +337,11 @@ CONFIG_MTD_CFI_I2=y | |||
204 | # CONFIG_MTD_NAND is not set | 337 | # CONFIG_MTD_NAND is not set |
205 | 338 | ||
206 | # | 339 | # |
340 | # OneNAND Flash Device Drivers | ||
341 | # | ||
342 | # CONFIG_MTD_ONENAND is not set | ||
343 | |||
344 | # | ||
207 | # Parallel port support | 345 | # Parallel port support |
208 | # | 346 | # |
209 | # CONFIG_PARPORT is not set | 347 | # CONFIG_PARPORT is not set |
@@ -215,7 +353,6 @@ CONFIG_MTD_CFI_I2=y | |||
215 | # | 353 | # |
216 | # Block devices | 354 | # Block devices |
217 | # | 355 | # |
218 | # CONFIG_BLK_DEV_FD is not set | ||
219 | # CONFIG_BLK_DEV_COW_COMMON is not set | 356 | # CONFIG_BLK_DEV_COW_COMMON is not set |
220 | CONFIG_BLK_DEV_LOOP=y | 357 | CONFIG_BLK_DEV_LOOP=y |
221 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 358 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -223,23 +360,21 @@ CONFIG_BLK_DEV_NBD=m | |||
223 | CONFIG_BLK_DEV_RAM=y | 360 | CONFIG_BLK_DEV_RAM=y |
224 | CONFIG_BLK_DEV_RAM_COUNT=16 | 361 | CONFIG_BLK_DEV_RAM_COUNT=16 |
225 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 362 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
363 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
226 | CONFIG_BLK_DEV_INITRD=y | 364 | CONFIG_BLK_DEV_INITRD=y |
227 | CONFIG_INITRAMFS_SOURCE="" | ||
228 | # CONFIG_CDROM_PKTCDVD is not set | 365 | # CONFIG_CDROM_PKTCDVD is not set |
366 | # CONFIG_ATA_OVER_ETH is not set | ||
229 | 367 | ||
230 | # | 368 | # |
231 | # IO Schedulers | 369 | # Misc devices |
232 | # | 370 | # |
233 | CONFIG_IOSCHED_NOOP=y | 371 | # CONFIG_TIFM_CORE is not set |
234 | # CONFIG_IOSCHED_AS is not set | ||
235 | CONFIG_IOSCHED_DEADLINE=y | ||
236 | CONFIG_IOSCHED_CFQ=y | ||
237 | # CONFIG_ATA_OVER_ETH is not set | ||
238 | 372 | ||
239 | # | 373 | # |
240 | # ATA/ATAPI/MFM/RLL support | 374 | # ATA/ATAPI/MFM/RLL support |
241 | # | 375 | # |
242 | CONFIG_IDE=m | 376 | CONFIG_IDE=m |
377 | CONFIG_IDE_MAX_HWIFS=4 | ||
243 | CONFIG_BLK_DEV_IDE=m | 378 | CONFIG_BLK_DEV_IDE=m |
244 | 379 | ||
245 | # | 380 | # |
@@ -266,7 +401,13 @@ CONFIG_IDE_GENERIC=m | |||
266 | # | 401 | # |
267 | # SCSI device support | 402 | # SCSI device support |
268 | # | 403 | # |
404 | # CONFIG_RAID_ATTRS is not set | ||
269 | # CONFIG_SCSI is not set | 405 | # CONFIG_SCSI is not set |
406 | # CONFIG_SCSI_NETLINK is not set | ||
407 | |||
408 | # | ||
409 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
410 | # | ||
270 | 411 | ||
271 | # | 412 | # |
272 | # Multi-device support (RAID and LVM) | 413 | # Multi-device support (RAID and LVM) |
@@ -276,79 +417,19 @@ CONFIG_IDE_GENERIC=m | |||
276 | # | 417 | # |
277 | # Fusion MPT device support | 418 | # Fusion MPT device support |
278 | # | 419 | # |
420 | # CONFIG_FUSION is not set | ||
279 | 421 | ||
280 | # | 422 | # |
281 | # IEEE 1394 (FireWire) support | 423 | # IEEE 1394 (FireWire) support |
282 | # | 424 | # |
283 | # CONFIG_IEEE1394 is not set | ||
284 | 425 | ||
285 | # | 426 | # |
286 | # I2O device support | 427 | # I2O device support |
287 | # | 428 | # |
288 | 429 | ||
289 | # | 430 | # |
290 | # Networking support | 431 | # Network device support |
291 | # | 432 | # |
292 | CONFIG_NET=y | ||
293 | |||
294 | # | ||
295 | # Networking options | ||
296 | # | ||
297 | # CONFIG_PACKET is not set | ||
298 | CONFIG_UNIX=y | ||
299 | # CONFIG_NET_KEY is not set | ||
300 | CONFIG_INET=y | ||
301 | # CONFIG_IP_MULTICAST is not set | ||
302 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
303 | CONFIG_IP_PNP=y | ||
304 | CONFIG_IP_PNP_DHCP=y | ||
305 | # CONFIG_IP_PNP_BOOTP is not set | ||
306 | # CONFIG_IP_PNP_RARP is not set | ||
307 | # CONFIG_NET_IPIP is not set | ||
308 | # CONFIG_NET_IPGRE is not set | ||
309 | # CONFIG_ARPD is not set | ||
310 | # CONFIG_SYN_COOKIES is not set | ||
311 | # CONFIG_INET_AH is not set | ||
312 | # CONFIG_INET_ESP is not set | ||
313 | # CONFIG_INET_IPCOMP is not set | ||
314 | # CONFIG_INET_TUNNEL is not set | ||
315 | CONFIG_IP_TCPDIAG=y | ||
316 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
317 | # CONFIG_IPV6 is not set | ||
318 | # CONFIG_NETFILTER is not set | ||
319 | |||
320 | # | ||
321 | # SCTP Configuration (EXPERIMENTAL) | ||
322 | # | ||
323 | # CONFIG_IP_SCTP is not set | ||
324 | # CONFIG_ATM is not set | ||
325 | # CONFIG_BRIDGE is not set | ||
326 | # CONFIG_VLAN_8021Q is not set | ||
327 | # CONFIG_DECNET is not set | ||
328 | # CONFIG_LLC2 is not set | ||
329 | # CONFIG_IPX is not set | ||
330 | # CONFIG_ATALK is not set | ||
331 | # CONFIG_X25 is not set | ||
332 | # CONFIG_LAPB is not set | ||
333 | # CONFIG_NET_DIVERT is not set | ||
334 | # CONFIG_ECONET is not set | ||
335 | # CONFIG_WAN_ROUTER is not set | ||
336 | |||
337 | # | ||
338 | # QoS and/or fair queueing | ||
339 | # | ||
340 | # CONFIG_NET_SCHED is not set | ||
341 | # CONFIG_NET_CLS_ROUTE is not set | ||
342 | |||
343 | # | ||
344 | # Network testing | ||
345 | # | ||
346 | # CONFIG_NET_PKTGEN is not set | ||
347 | # CONFIG_NETPOLL is not set | ||
348 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
349 | # CONFIG_HAMRADIO is not set | ||
350 | # CONFIG_IRDA is not set | ||
351 | # CONFIG_BT is not set | ||
352 | CONFIG_NETDEVICES=y | 433 | CONFIG_NETDEVICES=y |
353 | # CONFIG_DUMMY is not set | 434 | # CONFIG_DUMMY is not set |
354 | # CONFIG_BONDING is not set | 435 | # CONFIG_BONDING is not set |
@@ -356,6 +437,10 @@ CONFIG_NETDEVICES=y | |||
356 | # CONFIG_TUN is not set | 437 | # CONFIG_TUN is not set |
357 | 438 | ||
358 | # | 439 | # |
440 | # PHY device support | ||
441 | # | ||
442 | |||
443 | # | ||
359 | # Ethernet (10 or 100Mbit) | 444 | # Ethernet (10 or 100Mbit) |
360 | # | 445 | # |
361 | # CONFIG_NET_ETHERNET is not set | 446 | # CONFIG_NET_ETHERNET is not set |
@@ -391,6 +476,8 @@ CONFIG_NE2000=y | |||
391 | # CONFIG_SLIP is not set | 476 | # CONFIG_SLIP is not set |
392 | # CONFIG_SHAPER is not set | 477 | # CONFIG_SHAPER is not set |
393 | # CONFIG_NETCONSOLE is not set | 478 | # CONFIG_NETCONSOLE is not set |
479 | # CONFIG_NETPOLL is not set | ||
480 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
394 | 481 | ||
395 | # | 482 | # |
396 | # ISDN subsystem | 483 | # ISDN subsystem |
@@ -406,6 +493,7 @@ CONFIG_NE2000=y | |||
406 | # Input device support | 493 | # Input device support |
407 | # | 494 | # |
408 | CONFIG_INPUT=y | 495 | CONFIG_INPUT=y |
496 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
409 | 497 | ||
410 | # | 498 | # |
411 | # Userland interfaces | 499 | # Userland interfaces |
@@ -437,7 +525,6 @@ CONFIG_SERIO=y | |||
437 | # CONFIG_SERIO_LIBPS2 is not set | 525 | # CONFIG_SERIO_LIBPS2 is not set |
438 | # CONFIG_SERIO_RAW is not set | 526 | # CONFIG_SERIO_RAW is not set |
439 | # CONFIG_GAMEPORT is not set | 527 | # CONFIG_GAMEPORT is not set |
440 | CONFIG_SOUND_GAMEPORT=y | ||
441 | 528 | ||
442 | # | 529 | # |
443 | # Character devices | 530 | # Character devices |
@@ -457,7 +544,6 @@ CONFIG_SERIAL_CORE=y | |||
457 | CONFIG_SERIAL_CORE_CONSOLE=y | 544 | CONFIG_SERIAL_CORE_CONSOLE=y |
458 | CONFIG_SERIAL_M32R_SIO=y | 545 | CONFIG_SERIAL_M32R_SIO=y |
459 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | 546 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y |
460 | # CONFIG_SERIAL_M32R_PLDSIO is not set | ||
461 | CONFIG_UNIX98_PTYS=y | 547 | CONFIG_UNIX98_PTYS=y |
462 | CONFIG_LEGACY_PTYS=y | 548 | CONFIG_LEGACY_PTYS=y |
463 | CONFIG_LEGACY_PTY_COUNT=256 | 549 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -471,25 +557,27 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
471 | # Watchdog Cards | 557 | # Watchdog Cards |
472 | # | 558 | # |
473 | # CONFIG_WATCHDOG is not set | 559 | # CONFIG_WATCHDOG is not set |
560 | CONFIG_HW_RANDOM=y | ||
474 | # CONFIG_RTC is not set | 561 | # CONFIG_RTC is not set |
475 | # CONFIG_GEN_RTC is not set | ||
476 | # CONFIG_DTLK is not set | 562 | # CONFIG_DTLK is not set |
477 | # CONFIG_R3964 is not set | 563 | # CONFIG_R3964 is not set |
478 | 564 | ||
479 | # | 565 | # |
480 | # Ftape, the floppy tape device driver | 566 | # Ftape, the floppy tape device driver |
481 | # | 567 | # |
482 | # CONFIG_DRM is not set | ||
483 | 568 | ||
484 | # | 569 | # |
485 | # PCMCIA character devices | 570 | # PCMCIA character devices |
486 | # | 571 | # |
487 | # CONFIG_SYNCLINK_CS is not set | 572 | # CONFIG_SYNCLINK_CS is not set |
573 | # CONFIG_CARDMAN_4000 is not set | ||
574 | # CONFIG_CARDMAN_4040 is not set | ||
488 | # CONFIG_RAW_DRIVER is not set | 575 | # CONFIG_RAW_DRIVER is not set |
489 | 576 | ||
490 | # | 577 | # |
491 | # TPM devices | 578 | # TPM devices |
492 | # | 579 | # |
580 | # CONFIG_TCG_TPM is not set | ||
493 | 581 | ||
494 | # | 582 | # |
495 | # I2C support | 583 | # I2C support |
@@ -497,13 +585,25 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
497 | # CONFIG_I2C is not set | 585 | # CONFIG_I2C is not set |
498 | 586 | ||
499 | # | 587 | # |
588 | # SPI support | ||
589 | # | ||
590 | # CONFIG_SPI is not set | ||
591 | # CONFIG_SPI_MASTER is not set | ||
592 | |||
593 | # | ||
500 | # Dallas's 1-wire bus | 594 | # Dallas's 1-wire bus |
501 | # | 595 | # |
502 | # CONFIG_W1 is not set | 596 | # CONFIG_W1 is not set |
503 | 597 | ||
504 | # | 598 | # |
505 | # Misc devices | 599 | # Hardware Monitoring support |
506 | # | 600 | # |
601 | CONFIG_HWMON=y | ||
602 | # CONFIG_HWMON_VID is not set | ||
603 | # CONFIG_SENSORS_ABITUGURU is not set | ||
604 | # CONFIG_SENSORS_F71805F is not set | ||
605 | # CONFIG_SENSORS_VT1211 is not set | ||
606 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
507 | 607 | ||
508 | # | 608 | # |
509 | # Multimedia devices | 609 | # Multimedia devices |
@@ -518,7 +618,9 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
518 | # | 618 | # |
519 | # Graphics support | 619 | # Graphics support |
520 | # | 620 | # |
621 | CONFIG_FIRMWARE_EDID=y | ||
521 | # CONFIG_FB is not set | 622 | # CONFIG_FB is not set |
623 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
522 | 624 | ||
523 | # | 625 | # |
524 | # Sound | 626 | # Sound |
@@ -530,6 +632,11 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
530 | # | 632 | # |
531 | # CONFIG_USB_ARCH_HAS_HCD is not set | 633 | # CONFIG_USB_ARCH_HAS_HCD is not set |
532 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 634 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
635 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
636 | |||
637 | # | ||
638 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
639 | # | ||
533 | 640 | ||
534 | # | 641 | # |
535 | # USB Gadget Support | 642 | # USB Gadget Support |
@@ -542,30 +649,73 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
542 | # CONFIG_MMC is not set | 649 | # CONFIG_MMC is not set |
543 | 650 | ||
544 | # | 651 | # |
652 | # LED devices | ||
653 | # | ||
654 | # CONFIG_NEW_LEDS is not set | ||
655 | |||
656 | # | ||
657 | # LED drivers | ||
658 | # | ||
659 | |||
660 | # | ||
661 | # LED Triggers | ||
662 | # | ||
663 | |||
664 | # | ||
545 | # InfiniBand support | 665 | # InfiniBand support |
546 | # | 666 | # |
547 | # CONFIG_INFINIBAND is not set | 667 | |
668 | # | ||
669 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
670 | # | ||
671 | |||
672 | # | ||
673 | # Real Time Clock | ||
674 | # | ||
675 | # CONFIG_RTC_CLASS is not set | ||
676 | |||
677 | # | ||
678 | # DMA Engine support | ||
679 | # | ||
680 | # CONFIG_DMA_ENGINE is not set | ||
681 | |||
682 | # | ||
683 | # DMA Clients | ||
684 | # | ||
685 | |||
686 | # | ||
687 | # DMA Devices | ||
688 | # | ||
548 | 689 | ||
549 | # | 690 | # |
550 | # File systems | 691 | # File systems |
551 | # | 692 | # |
552 | CONFIG_EXT2_FS=y | 693 | CONFIG_EXT2_FS=y |
553 | # CONFIG_EXT2_FS_XATTR is not set | 694 | # CONFIG_EXT2_FS_XATTR is not set |
554 | # CONFIG_EXT3_FS is not set | 695 | # CONFIG_EXT2_FS_XIP is not set |
555 | # CONFIG_JBD is not set | 696 | CONFIG_EXT3_FS=y |
697 | CONFIG_EXT3_FS_XATTR=y | ||
698 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
699 | # CONFIG_EXT3_FS_SECURITY is not set | ||
700 | # CONFIG_EXT4DEV_FS is not set | ||
701 | CONFIG_JBD=y | ||
702 | # CONFIG_JBD_DEBUG is not set | ||
703 | CONFIG_FS_MBCACHE=y | ||
556 | # CONFIG_REISERFS_FS is not set | 704 | # CONFIG_REISERFS_FS is not set |
557 | # CONFIG_JFS_FS is not set | 705 | # CONFIG_JFS_FS is not set |
558 | 706 | # CONFIG_FS_POSIX_ACL is not set | |
559 | # | ||
560 | # XFS support | ||
561 | # | ||
562 | # CONFIG_XFS_FS is not set | 707 | # CONFIG_XFS_FS is not set |
708 | # CONFIG_GFS2_FS is not set | ||
709 | # CONFIG_OCFS2_FS is not set | ||
563 | # CONFIG_MINIX_FS is not set | 710 | # CONFIG_MINIX_FS is not set |
564 | CONFIG_ROMFS_FS=y | 711 | CONFIG_ROMFS_FS=y |
712 | CONFIG_INOTIFY=y | ||
713 | CONFIG_INOTIFY_USER=y | ||
565 | # CONFIG_QUOTA is not set | 714 | # CONFIG_QUOTA is not set |
566 | CONFIG_DNOTIFY=y | 715 | CONFIG_DNOTIFY=y |
567 | # CONFIG_AUTOFS_FS is not set | 716 | # CONFIG_AUTOFS_FS is not set |
568 | # CONFIG_AUTOFS4_FS is not set | 717 | # CONFIG_AUTOFS4_FS is not set |
718 | # CONFIG_FUSE_FS is not set | ||
569 | 719 | ||
570 | # | 720 | # |
571 | # CD-ROM/DVD Filesystems | 721 | # CD-ROM/DVD Filesystems |
@@ -590,16 +740,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
590 | # | 740 | # |
591 | CONFIG_PROC_FS=y | 741 | CONFIG_PROC_FS=y |
592 | CONFIG_PROC_KCORE=y | 742 | CONFIG_PROC_KCORE=y |
743 | CONFIG_PROC_SYSCTL=y | ||
593 | CONFIG_SYSFS=y | 744 | CONFIG_SYSFS=y |
594 | CONFIG_DEVFS_FS=y | ||
595 | CONFIG_DEVFS_MOUNT=y | ||
596 | # CONFIG_DEVFS_DEBUG is not set | ||
597 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
598 | CONFIG_TMPFS=y | 745 | CONFIG_TMPFS=y |
599 | # CONFIG_TMPFS_XATTR is not set | 746 | # CONFIG_TMPFS_POSIX_ACL is not set |
600 | # CONFIG_HUGETLBFS is not set | ||
601 | # CONFIG_HUGETLB_PAGE is not set | 747 | # CONFIG_HUGETLB_PAGE is not set |
602 | CONFIG_RAMFS=y | 748 | CONFIG_RAMFS=y |
749 | # CONFIG_CONFIGFS_FS is not set | ||
603 | 750 | ||
604 | # | 751 | # |
605 | # Miscellaneous filesystems | 752 | # Miscellaneous filesystems |
@@ -616,8 +763,9 @@ CONFIG_JFFS_FS_VERBOSE=0 | |||
616 | CONFIG_JFFS_PROC_FS=y | 763 | CONFIG_JFFS_PROC_FS=y |
617 | CONFIG_JFFS2_FS=y | 764 | CONFIG_JFFS2_FS=y |
618 | CONFIG_JFFS2_FS_DEBUG=0 | 765 | CONFIG_JFFS2_FS_DEBUG=0 |
619 | # CONFIG_JFFS2_FS_NAND is not set | 766 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
620 | # CONFIG_JFFS2_FS_NOR_ECC is not set | 767 | # CONFIG_JFFS2_SUMMARY is not set |
768 | # CONFIG_JFFS2_FS_XATTR is not set | ||
621 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 769 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
622 | CONFIG_JFFS2_ZLIB=y | 770 | CONFIG_JFFS2_ZLIB=y |
623 | CONFIG_JFFS2_RTIME=y | 771 | CONFIG_JFFS2_RTIME=y |
@@ -634,12 +782,14 @@ CONFIG_JFFS2_RTIME=y | |||
634 | # | 782 | # |
635 | CONFIG_NFS_FS=y | 783 | CONFIG_NFS_FS=y |
636 | CONFIG_NFS_V3=y | 784 | CONFIG_NFS_V3=y |
785 | # CONFIG_NFS_V3_ACL is not set | ||
637 | # CONFIG_NFS_V4 is not set | 786 | # CONFIG_NFS_V4 is not set |
638 | # CONFIG_NFS_DIRECTIO is not set | 787 | # CONFIG_NFS_DIRECTIO is not set |
639 | # CONFIG_NFSD is not set | 788 | # CONFIG_NFSD is not set |
640 | CONFIG_ROOT_NFS=y | 789 | CONFIG_ROOT_NFS=y |
641 | CONFIG_LOCKD=y | 790 | CONFIG_LOCKD=y |
642 | CONFIG_LOCKD_V4=y | 791 | CONFIG_LOCKD_V4=y |
792 | CONFIG_NFS_COMMON=y | ||
643 | CONFIG_SUNRPC=y | 793 | CONFIG_SUNRPC=y |
644 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 794 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
645 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 795 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -648,6 +798,7 @@ CONFIG_SUNRPC=y | |||
648 | # CONFIG_NCP_FS is not set | 798 | # CONFIG_NCP_FS is not set |
649 | # CONFIG_CODA_FS is not set | 799 | # CONFIG_CODA_FS is not set |
650 | # CONFIG_AFS_FS is not set | 800 | # CONFIG_AFS_FS is not set |
801 | # CONFIG_9P_FS is not set | ||
651 | 802 | ||
652 | # | 803 | # |
653 | # Partition Types | 804 | # Partition Types |
@@ -708,10 +859,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
708 | # Kernel hacking | 859 | # Kernel hacking |
709 | # | 860 | # |
710 | # CONFIG_PRINTK_TIME is not set | 861 | # CONFIG_PRINTK_TIME is not set |
862 | CONFIG_ENABLE_MUST_CHECK=y | ||
863 | # CONFIG_MAGIC_SYSRQ is not set | ||
864 | # CONFIG_UNUSED_SYMBOLS is not set | ||
711 | # CONFIG_DEBUG_KERNEL is not set | 865 | # CONFIG_DEBUG_KERNEL is not set |
712 | CONFIG_LOG_BUF_SHIFT=14 | 866 | CONFIG_LOG_BUF_SHIFT=14 |
713 | # CONFIG_DEBUG_BUGVERBOSE is not set | 867 | # CONFIG_DEBUG_BUGVERBOSE is not set |
868 | # CONFIG_DEBUG_FS is not set | ||
714 | # CONFIG_FRAME_POINTER is not set | 869 | # CONFIG_FRAME_POINTER is not set |
870 | # CONFIG_UNWIND_INFO is not set | ||
871 | # CONFIG_HEADERS_CHECK is not set | ||
715 | 872 | ||
716 | # | 873 | # |
717 | # Security options | 874 | # Security options |
@@ -725,13 +882,10 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
725 | # CONFIG_CRYPTO is not set | 882 | # CONFIG_CRYPTO is not set |
726 | 883 | ||
727 | # | 884 | # |
728 | # Hardware crypto devices | ||
729 | # | ||
730 | |||
731 | # | ||
732 | # Library routines | 885 | # Library routines |
733 | # | 886 | # |
734 | # CONFIG_CRC_CCITT is not set | 887 | # CONFIG_CRC_CCITT is not set |
888 | # CONFIG_CRC16 is not set | ||
735 | CONFIG_CRC32=y | 889 | CONFIG_CRC32=y |
736 | # CONFIG_LIBCRC32C is not set | 890 | # CONFIG_LIBCRC32C is not set |
737 | CONFIG_ZLIB_INFLATE=y | 891 | CONFIG_ZLIB_INFLATE=y |
diff --git a/arch/m32r/mappi2/defconfig.opsp b/arch/m32r/mappi2/defconfig.opsp new file mode 100644 index 000000000000..b379ae96e6a7 --- /dev/null +++ b/arch/m32r/mappi2/defconfig.opsp | |||
@@ -0,0 +1,883 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19 | ||
4 | # Wed Dec 13 19:40:30 2006 | ||
5 | # | ||
6 | CONFIG_M32R=y | ||
7 | CONFIG_GENERIC_ISA_DMA=y | ||
8 | CONFIG_GENERIC_HARDIRQS=y | ||
9 | CONFIG_GENERIC_IRQ_PROBE=y | ||
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | |||
12 | # | ||
13 | # Code maturity level options | ||
14 | # | ||
15 | CONFIG_EXPERIMENTAL=y | ||
16 | CONFIG_BROKEN_ON_SMP=y | ||
17 | CONFIG_LOCK_KERNEL=y | ||
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | |||
20 | # | ||
21 | # General setup | ||
22 | # | ||
23 | CONFIG_LOCALVERSION="" | ||
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | CONFIG_SWAP=y | ||
26 | CONFIG_SYSVIPC=y | ||
27 | # CONFIG_IPC_NS is not set | ||
28 | # CONFIG_POSIX_MQUEUE is not set | ||
29 | CONFIG_BSD_PROCESS_ACCT=y | ||
30 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
31 | # CONFIG_TASKSTATS is not set | ||
32 | # CONFIG_UTS_NS is not set | ||
33 | # CONFIG_AUDIT is not set | ||
34 | CONFIG_IKCONFIG=y | ||
35 | # CONFIG_IKCONFIG_PROC is not set | ||
36 | CONFIG_SYSFS_DEPRECATED=y | ||
37 | # CONFIG_RELAY is not set | ||
38 | CONFIG_INITRAMFS_SOURCE="" | ||
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
40 | CONFIG_SYSCTL=y | ||
41 | CONFIG_EMBEDDED=y | ||
42 | CONFIG_SYSCTL_SYSCALL=y | ||
43 | # CONFIG_KALLSYMS is not set | ||
44 | CONFIG_HOTPLUG=y | ||
45 | CONFIG_PRINTK=y | ||
46 | CONFIG_BUG=y | ||
47 | CONFIG_ELF_CORE=y | ||
48 | CONFIG_BASE_FULL=y | ||
49 | # CONFIG_FUTEX is not set | ||
50 | # CONFIG_EPOLL is not set | ||
51 | CONFIG_SHMEM=y | ||
52 | CONFIG_SLAB=y | ||
53 | CONFIG_VM_EVENT_COUNTERS=y | ||
54 | # CONFIG_TINY_SHMEM is not set | ||
55 | CONFIG_BASE_SMALL=0 | ||
56 | # CONFIG_SLOB is not set | ||
57 | |||
58 | # | ||
59 | # Loadable module support | ||
60 | # | ||
61 | CONFIG_MODULES=y | ||
62 | CONFIG_MODULE_UNLOAD=y | ||
63 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
64 | # CONFIG_MODVERSIONS is not set | ||
65 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
66 | CONFIG_KMOD=y | ||
67 | |||
68 | # | ||
69 | # Block layer | ||
70 | # | ||
71 | CONFIG_BLOCK=y | ||
72 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
73 | |||
74 | # | ||
75 | # IO Schedulers | ||
76 | # | ||
77 | CONFIG_IOSCHED_NOOP=y | ||
78 | # CONFIG_IOSCHED_AS is not set | ||
79 | CONFIG_IOSCHED_DEADLINE=y | ||
80 | CONFIG_IOSCHED_CFQ=y | ||
81 | # CONFIG_DEFAULT_AS is not set | ||
82 | # CONFIG_DEFAULT_DEADLINE is not set | ||
83 | CONFIG_DEFAULT_CFQ=y | ||
84 | # CONFIG_DEFAULT_NOOP is not set | ||
85 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
86 | |||
87 | # | ||
88 | # Processor type and features | ||
89 | # | ||
90 | # CONFIG_PLAT_MAPPI is not set | ||
91 | # CONFIG_PLAT_USRV is not set | ||
92 | # CONFIG_PLAT_M32700UT is not set | ||
93 | # CONFIG_PLAT_OPSPUT is not set | ||
94 | # CONFIG_PLAT_OAKS32R is not set | ||
95 | CONFIG_PLAT_MAPPI2=y | ||
96 | # CONFIG_PLAT_MAPPI3 is not set | ||
97 | # CONFIG_PLAT_M32104UT is not set | ||
98 | # CONFIG_CHIP_M32700 is not set | ||
99 | # CONFIG_CHIP_M32102 is not set | ||
100 | # CONFIG_CHIP_M32104 is not set | ||
101 | # CONFIG_CHIP_VDEC2 is not set | ||
102 | CONFIG_CHIP_OPSP=y | ||
103 | CONFIG_MMU=y | ||
104 | CONFIG_TLB_ENTRIES=16 | ||
105 | CONFIG_ISA_M32R2=y | ||
106 | CONFIG_ISA_DSP_LEVEL2=y | ||
107 | CONFIG_ISA_DUAL_ISSUE=y | ||
108 | CONFIG_BUS_CLOCK=50000000 | ||
109 | CONFIG_TIMER_DIVIDE=128 | ||
110 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
111 | CONFIG_MEMORY_START=0x08000000 | ||
112 | CONFIG_MEMORY_SIZE=0x01000000 | ||
113 | CONFIG_NOHIGHMEM=y | ||
114 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
115 | CONFIG_SELECT_MEMORY_MODEL=y | ||
116 | # CONFIG_FLATMEM_MANUAL is not set | ||
117 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
118 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
119 | CONFIG_DISCONTIGMEM=y | ||
120 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
121 | CONFIG_NEED_MULTIPLE_NODES=y | ||
122 | # CONFIG_SPARSEMEM_STATIC is not set | ||
123 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
124 | # CONFIG_RESOURCES_64BIT is not set | ||
125 | CONFIG_IRAM_START=0x00f00000 | ||
126 | CONFIG_IRAM_SIZE=0x00008000 | ||
127 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
128 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
129 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
130 | CONFIG_GENERIC_HWEIGHT=y | ||
131 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
132 | CONFIG_PREEMPT=y | ||
133 | # CONFIG_SMP is not set | ||
134 | CONFIG_NODES_SHIFT=1 | ||
135 | |||
136 | # | ||
137 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
138 | # | ||
139 | # CONFIG_ISA is not set | ||
140 | |||
141 | # | ||
142 | # PCCARD (PCMCIA/CardBus) support | ||
143 | # | ||
144 | CONFIG_PCCARD=y | ||
145 | # CONFIG_PCMCIA_DEBUG is not set | ||
146 | CONFIG_PCMCIA=y | ||
147 | CONFIG_PCMCIA_LOAD_CIS=y | ||
148 | CONFIG_PCMCIA_IOCTL=y | ||
149 | |||
150 | # | ||
151 | # PC-card bridges | ||
152 | # | ||
153 | # CONFIG_M32R_CFC is not set | ||
154 | |||
155 | # | ||
156 | # PCI Hotplug Support | ||
157 | # | ||
158 | |||
159 | # | ||
160 | # Executable file formats | ||
161 | # | ||
162 | CONFIG_BINFMT_ELF=y | ||
163 | # CONFIG_BINFMT_MISC is not set | ||
164 | |||
165 | # | ||
166 | # Networking | ||
167 | # | ||
168 | CONFIG_NET=y | ||
169 | |||
170 | # | ||
171 | # Networking options | ||
172 | # | ||
173 | # CONFIG_NETDEBUG is not set | ||
174 | CONFIG_PACKET=y | ||
175 | # CONFIG_PACKET_MMAP is not set | ||
176 | CONFIG_UNIX=y | ||
177 | CONFIG_XFRM=y | ||
178 | # CONFIG_XFRM_USER is not set | ||
179 | # CONFIG_XFRM_SUB_POLICY is not set | ||
180 | # CONFIG_NET_KEY is not set | ||
181 | CONFIG_INET=y | ||
182 | # CONFIG_IP_MULTICAST is not set | ||
183 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
184 | CONFIG_IP_FIB_HASH=y | ||
185 | CONFIG_IP_PNP=y | ||
186 | CONFIG_IP_PNP_DHCP=y | ||
187 | # CONFIG_IP_PNP_BOOTP is not set | ||
188 | # CONFIG_IP_PNP_RARP is not set | ||
189 | # CONFIG_NET_IPIP is not set | ||
190 | # CONFIG_NET_IPGRE is not set | ||
191 | # CONFIG_ARPD is not set | ||
192 | # CONFIG_SYN_COOKIES is not set | ||
193 | # CONFIG_INET_AH is not set | ||
194 | # CONFIG_INET_ESP is not set | ||
195 | # CONFIG_INET_IPCOMP is not set | ||
196 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
197 | # CONFIG_INET_TUNNEL is not set | ||
198 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
199 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
200 | CONFIG_INET_XFRM_MODE_BEET=y | ||
201 | CONFIG_INET_DIAG=y | ||
202 | CONFIG_INET_TCP_DIAG=y | ||
203 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
204 | CONFIG_TCP_CONG_CUBIC=y | ||
205 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
206 | # CONFIG_TCP_MD5SIG is not set | ||
207 | # CONFIG_IPV6 is not set | ||
208 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
209 | # CONFIG_INET6_TUNNEL is not set | ||
210 | # CONFIG_NETWORK_SECMARK is not set | ||
211 | # CONFIG_NETFILTER is not set | ||
212 | |||
213 | # | ||
214 | # DCCP Configuration (EXPERIMENTAL) | ||
215 | # | ||
216 | # CONFIG_IP_DCCP is not set | ||
217 | |||
218 | # | ||
219 | # SCTP Configuration (EXPERIMENTAL) | ||
220 | # | ||
221 | # CONFIG_IP_SCTP is not set | ||
222 | |||
223 | # | ||
224 | # TIPC Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_TIPC is not set | ||
227 | # CONFIG_ATM is not set | ||
228 | # CONFIG_BRIDGE is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_DECNET is not set | ||
231 | # CONFIG_LLC2 is not set | ||
232 | # CONFIG_IPX is not set | ||
233 | # CONFIG_ATALK is not set | ||
234 | # CONFIG_X25 is not set | ||
235 | # CONFIG_LAPB is not set | ||
236 | # CONFIG_ECONET is not set | ||
237 | # CONFIG_WAN_ROUTER is not set | ||
238 | |||
239 | # | ||
240 | # QoS and/or fair queueing | ||
241 | # | ||
242 | # CONFIG_NET_SCHED is not set | ||
243 | |||
244 | # | ||
245 | # Network testing | ||
246 | # | ||
247 | # CONFIG_NET_PKTGEN is not set | ||
248 | # CONFIG_HAMRADIO is not set | ||
249 | # CONFIG_IRDA is not set | ||
250 | # CONFIG_BT is not set | ||
251 | # CONFIG_IEEE80211 is not set | ||
252 | |||
253 | # | ||
254 | # Device Drivers | ||
255 | # | ||
256 | |||
257 | # | ||
258 | # Generic Driver Options | ||
259 | # | ||
260 | CONFIG_STANDALONE=y | ||
261 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
262 | CONFIG_FW_LOADER=y | ||
263 | # CONFIG_SYS_HYPERVISOR is not set | ||
264 | |||
265 | # | ||
266 | # Connector - unified userspace <-> kernelspace linker | ||
267 | # | ||
268 | # CONFIG_CONNECTOR is not set | ||
269 | |||
270 | # | ||
271 | # Memory Technology Devices (MTD) | ||
272 | # | ||
273 | # CONFIG_MTD is not set | ||
274 | |||
275 | # | ||
276 | # Parallel port support | ||
277 | # | ||
278 | # CONFIG_PARPORT is not set | ||
279 | |||
280 | # | ||
281 | # Plug and Play support | ||
282 | # | ||
283 | |||
284 | # | ||
285 | # Block devices | ||
286 | # | ||
287 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
288 | CONFIG_BLK_DEV_LOOP=y | ||
289 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
290 | CONFIG_BLK_DEV_NBD=y | ||
291 | CONFIG_BLK_DEV_RAM=y | ||
292 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
293 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
294 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
295 | # CONFIG_BLK_DEV_INITRD is not set | ||
296 | # CONFIG_CDROM_PKTCDVD is not set | ||
297 | # CONFIG_ATA_OVER_ETH is not set | ||
298 | |||
299 | # | ||
300 | # Misc devices | ||
301 | # | ||
302 | # CONFIG_TIFM_CORE is not set | ||
303 | |||
304 | # | ||
305 | # ATA/ATAPI/MFM/RLL support | ||
306 | # | ||
307 | CONFIG_IDE=y | ||
308 | CONFIG_IDE_MAX_HWIFS=4 | ||
309 | CONFIG_BLK_DEV_IDE=y | ||
310 | |||
311 | # | ||
312 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
313 | # | ||
314 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
315 | CONFIG_BLK_DEV_IDEDISK=y | ||
316 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
317 | CONFIG_BLK_DEV_IDECS=y | ||
318 | CONFIG_BLK_DEV_IDECD=m | ||
319 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
320 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
321 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
322 | # CONFIG_IDE_TASK_IOCTL is not set | ||
323 | |||
324 | # | ||
325 | # IDE chipset support/bugfixes | ||
326 | # | ||
327 | CONFIG_IDE_GENERIC=y | ||
328 | # CONFIG_IDE_ARM is not set | ||
329 | # CONFIG_BLK_DEV_IDEDMA is not set | ||
330 | # CONFIG_IDEDMA_AUTO is not set | ||
331 | # CONFIG_BLK_DEV_HD is not set | ||
332 | |||
333 | # | ||
334 | # SCSI device support | ||
335 | # | ||
336 | # CONFIG_RAID_ATTRS is not set | ||
337 | CONFIG_SCSI=m | ||
338 | # CONFIG_SCSI_NETLINK is not set | ||
339 | CONFIG_SCSI_PROC_FS=y | ||
340 | |||
341 | # | ||
342 | # SCSI support type (disk, tape, CD-ROM) | ||
343 | # | ||
344 | CONFIG_BLK_DEV_SD=m | ||
345 | # CONFIG_CHR_DEV_ST is not set | ||
346 | # CONFIG_CHR_DEV_OSST is not set | ||
347 | CONFIG_BLK_DEV_SR=m | ||
348 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
349 | CONFIG_CHR_DEV_SG=m | ||
350 | # CONFIG_CHR_DEV_SCH is not set | ||
351 | |||
352 | # | ||
353 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
354 | # | ||
355 | CONFIG_SCSI_MULTI_LUN=y | ||
356 | # CONFIG_SCSI_CONSTANTS is not set | ||
357 | # CONFIG_SCSI_LOGGING is not set | ||
358 | |||
359 | # | ||
360 | # SCSI Transports | ||
361 | # | ||
362 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
363 | # CONFIG_SCSI_FC_ATTRS is not set | ||
364 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
365 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
366 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
367 | |||
368 | # | ||
369 | # SCSI low-level drivers | ||
370 | # | ||
371 | # CONFIG_ISCSI_TCP is not set | ||
372 | # CONFIG_SCSI_DEBUG is not set | ||
373 | |||
374 | # | ||
375 | # PCMCIA SCSI adapter support | ||
376 | # | ||
377 | # CONFIG_PCMCIA_AHA152X is not set | ||
378 | # CONFIG_PCMCIA_FDOMAIN is not set | ||
379 | # CONFIG_PCMCIA_NINJA_SCSI is not set | ||
380 | # CONFIG_PCMCIA_QLOGIC is not set | ||
381 | # CONFIG_PCMCIA_SYM53C500 is not set | ||
382 | |||
383 | # | ||
384 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
385 | # | ||
386 | |||
387 | # | ||
388 | # Multi-device support (RAID and LVM) | ||
389 | # | ||
390 | # CONFIG_MD is not set | ||
391 | |||
392 | # | ||
393 | # Fusion MPT device support | ||
394 | # | ||
395 | # CONFIG_FUSION is not set | ||
396 | |||
397 | # | ||
398 | # IEEE 1394 (FireWire) support | ||
399 | # | ||
400 | |||
401 | # | ||
402 | # I2O device support | ||
403 | # | ||
404 | |||
405 | # | ||
406 | # Network device support | ||
407 | # | ||
408 | CONFIG_NETDEVICES=y | ||
409 | # CONFIG_DUMMY is not set | ||
410 | # CONFIG_BONDING is not set | ||
411 | # CONFIG_EQUALIZER is not set | ||
412 | # CONFIG_TUN is not set | ||
413 | |||
414 | # | ||
415 | # PHY device support | ||
416 | # | ||
417 | # CONFIG_PHYLIB is not set | ||
418 | |||
419 | # | ||
420 | # Ethernet (10 or 100Mbit) | ||
421 | # | ||
422 | CONFIG_NET_ETHERNET=y | ||
423 | CONFIG_MII=y | ||
424 | CONFIG_SMC91X=y | ||
425 | # CONFIG_NE2000 is not set | ||
426 | |||
427 | # | ||
428 | # Ethernet (1000 Mbit) | ||
429 | # | ||
430 | |||
431 | # | ||
432 | # Ethernet (10000 Mbit) | ||
433 | # | ||
434 | |||
435 | # | ||
436 | # Token Ring devices | ||
437 | # | ||
438 | |||
439 | # | ||
440 | # Wireless LAN (non-hamradio) | ||
441 | # | ||
442 | # CONFIG_NET_RADIO is not set | ||
443 | |||
444 | # | ||
445 | # PCMCIA network device support | ||
446 | # | ||
447 | # CONFIG_NET_PCMCIA is not set | ||
448 | |||
449 | # | ||
450 | # Wan interfaces | ||
451 | # | ||
452 | # CONFIG_WAN is not set | ||
453 | # CONFIG_PPP is not set | ||
454 | # CONFIG_SLIP is not set | ||
455 | # CONFIG_SHAPER is not set | ||
456 | # CONFIG_NETCONSOLE is not set | ||
457 | # CONFIG_NETPOLL is not set | ||
458 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
459 | |||
460 | # | ||
461 | # ISDN subsystem | ||
462 | # | ||
463 | # CONFIG_ISDN is not set | ||
464 | |||
465 | # | ||
466 | # Telephony Support | ||
467 | # | ||
468 | # CONFIG_PHONE is not set | ||
469 | |||
470 | # | ||
471 | # Input device support | ||
472 | # | ||
473 | CONFIG_INPUT=y | ||
474 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
475 | |||
476 | # | ||
477 | # Userland interfaces | ||
478 | # | ||
479 | # CONFIG_INPUT_MOUSEDEV is not set | ||
480 | # CONFIG_INPUT_JOYDEV is not set | ||
481 | # CONFIG_INPUT_TSDEV is not set | ||
482 | # CONFIG_INPUT_EVDEV is not set | ||
483 | # CONFIG_INPUT_EVBUG is not set | ||
484 | |||
485 | # | ||
486 | # Input Device Drivers | ||
487 | # | ||
488 | # CONFIG_INPUT_KEYBOARD is not set | ||
489 | # CONFIG_INPUT_MOUSE is not set | ||
490 | # CONFIG_INPUT_JOYSTICK is not set | ||
491 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
492 | # CONFIG_INPUT_MISC is not set | ||
493 | |||
494 | # | ||
495 | # Hardware I/O ports | ||
496 | # | ||
497 | CONFIG_SERIO=y | ||
498 | # CONFIG_SERIO_I8042 is not set | ||
499 | CONFIG_SERIO_SERPORT=y | ||
500 | # CONFIG_SERIO_LIBPS2 is not set | ||
501 | # CONFIG_SERIO_RAW is not set | ||
502 | # CONFIG_GAMEPORT is not set | ||
503 | |||
504 | # | ||
505 | # Character devices | ||
506 | # | ||
507 | CONFIG_VT=y | ||
508 | CONFIG_VT_CONSOLE=y | ||
509 | CONFIG_HW_CONSOLE=y | ||
510 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
511 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
512 | |||
513 | # | ||
514 | # Serial drivers | ||
515 | # | ||
516 | # CONFIG_SERIAL_8250 is not set | ||
517 | |||
518 | # | ||
519 | # Non-8250 serial port support | ||
520 | # | ||
521 | CONFIG_SERIAL_CORE=y | ||
522 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
523 | CONFIG_SERIAL_M32R_SIO=y | ||
524 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | ||
525 | CONFIG_UNIX98_PTYS=y | ||
526 | CONFIG_LEGACY_PTYS=y | ||
527 | CONFIG_LEGACY_PTY_COUNT=256 | ||
528 | |||
529 | # | ||
530 | # IPMI | ||
531 | # | ||
532 | # CONFIG_IPMI_HANDLER is not set | ||
533 | |||
534 | # | ||
535 | # Watchdog Cards | ||
536 | # | ||
537 | # CONFIG_WATCHDOG is not set | ||
538 | CONFIG_HW_RANDOM=y | ||
539 | # CONFIG_RTC is not set | ||
540 | # CONFIG_DTLK is not set | ||
541 | # CONFIG_R3964 is not set | ||
542 | |||
543 | # | ||
544 | # Ftape, the floppy tape device driver | ||
545 | # | ||
546 | |||
547 | # | ||
548 | # PCMCIA character devices | ||
549 | # | ||
550 | # CONFIG_SYNCLINK_CS is not set | ||
551 | # CONFIG_CARDMAN_4000 is not set | ||
552 | # CONFIG_CARDMAN_4040 is not set | ||
553 | # CONFIG_RAW_DRIVER is not set | ||
554 | |||
555 | # | ||
556 | # TPM devices | ||
557 | # | ||
558 | # CONFIG_TCG_TPM is not set | ||
559 | |||
560 | # | ||
561 | # I2C support | ||
562 | # | ||
563 | # CONFIG_I2C is not set | ||
564 | |||
565 | # | ||
566 | # SPI support | ||
567 | # | ||
568 | # CONFIG_SPI is not set | ||
569 | # CONFIG_SPI_MASTER is not set | ||
570 | |||
571 | # | ||
572 | # Dallas's 1-wire bus | ||
573 | # | ||
574 | # CONFIG_W1 is not set | ||
575 | |||
576 | # | ||
577 | # Hardware Monitoring support | ||
578 | # | ||
579 | CONFIG_HWMON=y | ||
580 | # CONFIG_HWMON_VID is not set | ||
581 | # CONFIG_SENSORS_ABITUGURU is not set | ||
582 | # CONFIG_SENSORS_F71805F is not set | ||
583 | # CONFIG_SENSORS_VT1211 is not set | ||
584 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
585 | |||
586 | # | ||
587 | # Multimedia devices | ||
588 | # | ||
589 | CONFIG_VIDEO_DEV=y | ||
590 | CONFIG_VIDEO_V4L1=y | ||
591 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
592 | CONFIG_VIDEO_V4L2=y | ||
593 | |||
594 | # | ||
595 | # Video Capture Adapters | ||
596 | # | ||
597 | |||
598 | # | ||
599 | # Video Capture Adapters | ||
600 | # | ||
601 | # CONFIG_VIDEO_ADV_DEBUG is not set | ||
602 | CONFIG_VIDEO_HELPER_CHIPS_AUTO=y | ||
603 | # CONFIG_VIDEO_VIVI is not set | ||
604 | # CONFIG_VIDEO_CPIA is not set | ||
605 | # CONFIG_VIDEO_M32R_AR is not set | ||
606 | |||
607 | # | ||
608 | # Radio Adapters | ||
609 | # | ||
610 | |||
611 | # | ||
612 | # Digital Video Broadcasting Devices | ||
613 | # | ||
614 | # CONFIG_DVB is not set | ||
615 | |||
616 | # | ||
617 | # Graphics support | ||
618 | # | ||
619 | CONFIG_FIRMWARE_EDID=y | ||
620 | # CONFIG_FB is not set | ||
621 | |||
622 | # | ||
623 | # Console display driver support | ||
624 | # | ||
625 | # CONFIG_VGA_CONSOLE is not set | ||
626 | CONFIG_DUMMY_CONSOLE=y | ||
627 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
628 | |||
629 | # | ||
630 | # Sound | ||
631 | # | ||
632 | # CONFIG_SOUND is not set | ||
633 | |||
634 | # | ||
635 | # USB support | ||
636 | # | ||
637 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
638 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
639 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
640 | |||
641 | # | ||
642 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
643 | # | ||
644 | |||
645 | # | ||
646 | # USB Gadget Support | ||
647 | # | ||
648 | # CONFIG_USB_GADGET is not set | ||
649 | |||
650 | # | ||
651 | # MMC/SD Card support | ||
652 | # | ||
653 | # CONFIG_MMC is not set | ||
654 | |||
655 | # | ||
656 | # LED devices | ||
657 | # | ||
658 | # CONFIG_NEW_LEDS is not set | ||
659 | |||
660 | # | ||
661 | # LED drivers | ||
662 | # | ||
663 | |||
664 | # | ||
665 | # LED Triggers | ||
666 | # | ||
667 | |||
668 | # | ||
669 | # InfiniBand support | ||
670 | # | ||
671 | |||
672 | # | ||
673 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
674 | # | ||
675 | |||
676 | # | ||
677 | # Real Time Clock | ||
678 | # | ||
679 | # CONFIG_RTC_CLASS is not set | ||
680 | |||
681 | # | ||
682 | # DMA Engine support | ||
683 | # | ||
684 | # CONFIG_DMA_ENGINE is not set | ||
685 | |||
686 | # | ||
687 | # DMA Clients | ||
688 | # | ||
689 | |||
690 | # | ||
691 | # DMA Devices | ||
692 | # | ||
693 | |||
694 | # | ||
695 | # File systems | ||
696 | # | ||
697 | CONFIG_EXT2_FS=y | ||
698 | # CONFIG_EXT2_FS_XATTR is not set | ||
699 | # CONFIG_EXT2_FS_XIP is not set | ||
700 | CONFIG_EXT3_FS=y | ||
701 | CONFIG_EXT3_FS_XATTR=y | ||
702 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
703 | # CONFIG_EXT3_FS_SECURITY is not set | ||
704 | # CONFIG_EXT4DEV_FS is not set | ||
705 | CONFIG_JBD=y | ||
706 | CONFIG_JBD_DEBUG=y | ||
707 | CONFIG_FS_MBCACHE=y | ||
708 | # CONFIG_REISERFS_FS is not set | ||
709 | # CONFIG_JFS_FS is not set | ||
710 | # CONFIG_FS_POSIX_ACL is not set | ||
711 | # CONFIG_XFS_FS is not set | ||
712 | # CONFIG_GFS2_FS is not set | ||
713 | # CONFIG_OCFS2_FS is not set | ||
714 | # CONFIG_MINIX_FS is not set | ||
715 | # CONFIG_ROMFS_FS is not set | ||
716 | CONFIG_INOTIFY=y | ||
717 | CONFIG_INOTIFY_USER=y | ||
718 | # CONFIG_QUOTA is not set | ||
719 | CONFIG_DNOTIFY=y | ||
720 | # CONFIG_AUTOFS_FS is not set | ||
721 | # CONFIG_AUTOFS4_FS is not set | ||
722 | # CONFIG_FUSE_FS is not set | ||
723 | |||
724 | # | ||
725 | # CD-ROM/DVD Filesystems | ||
726 | # | ||
727 | CONFIG_ISO9660_FS=m | ||
728 | CONFIG_JOLIET=y | ||
729 | # CONFIG_ZISOFS is not set | ||
730 | CONFIG_UDF_FS=m | ||
731 | CONFIG_UDF_NLS=y | ||
732 | |||
733 | # | ||
734 | # DOS/FAT/NT Filesystems | ||
735 | # | ||
736 | CONFIG_FAT_FS=m | ||
737 | CONFIG_MSDOS_FS=m | ||
738 | CONFIG_VFAT_FS=m | ||
739 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
740 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
741 | # CONFIG_NTFS_FS is not set | ||
742 | |||
743 | # | ||
744 | # Pseudo filesystems | ||
745 | # | ||
746 | CONFIG_PROC_FS=y | ||
747 | CONFIG_PROC_KCORE=y | ||
748 | CONFIG_PROC_SYSCTL=y | ||
749 | CONFIG_SYSFS=y | ||
750 | CONFIG_TMPFS=y | ||
751 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
752 | # CONFIG_HUGETLB_PAGE is not set | ||
753 | CONFIG_RAMFS=y | ||
754 | # CONFIG_CONFIGFS_FS is not set | ||
755 | |||
756 | # | ||
757 | # Miscellaneous filesystems | ||
758 | # | ||
759 | # CONFIG_ADFS_FS is not set | ||
760 | # CONFIG_AFFS_FS is not set | ||
761 | # CONFIG_HFS_FS is not set | ||
762 | # CONFIG_HFSPLUS_FS is not set | ||
763 | # CONFIG_BEFS_FS is not set | ||
764 | # CONFIG_BFS_FS is not set | ||
765 | # CONFIG_EFS_FS is not set | ||
766 | # CONFIG_CRAMFS is not set | ||
767 | # CONFIG_VXFS_FS is not set | ||
768 | # CONFIG_HPFS_FS is not set | ||
769 | # CONFIG_QNX4FS_FS is not set | ||
770 | # CONFIG_SYSV_FS is not set | ||
771 | # CONFIG_UFS_FS is not set | ||
772 | |||
773 | # | ||
774 | # Network File Systems | ||
775 | # | ||
776 | CONFIG_NFS_FS=y | ||
777 | CONFIG_NFS_V3=y | ||
778 | # CONFIG_NFS_V3_ACL is not set | ||
779 | # CONFIG_NFS_V4 is not set | ||
780 | # CONFIG_NFS_DIRECTIO is not set | ||
781 | # CONFIG_NFSD is not set | ||
782 | CONFIG_ROOT_NFS=y | ||
783 | CONFIG_LOCKD=y | ||
784 | CONFIG_LOCKD_V4=y | ||
785 | CONFIG_NFS_COMMON=y | ||
786 | CONFIG_SUNRPC=y | ||
787 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
788 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
789 | # CONFIG_SMB_FS is not set | ||
790 | # CONFIG_CIFS is not set | ||
791 | # CONFIG_NCP_FS is not set | ||
792 | # CONFIG_CODA_FS is not set | ||
793 | # CONFIG_AFS_FS is not set | ||
794 | # CONFIG_9P_FS is not set | ||
795 | |||
796 | # | ||
797 | # Partition Types | ||
798 | # | ||
799 | # CONFIG_PARTITION_ADVANCED is not set | ||
800 | CONFIG_MSDOS_PARTITION=y | ||
801 | |||
802 | # | ||
803 | # Native Language Support | ||
804 | # | ||
805 | CONFIG_NLS=y | ||
806 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
807 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
808 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
809 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
810 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
811 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
812 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
813 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
814 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
815 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
816 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
817 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
818 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
819 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
820 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
821 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
822 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
823 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
824 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
825 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
826 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
827 | # CONFIG_NLS_ISO8859_8 is not set | ||
828 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
829 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
830 | # CONFIG_NLS_ASCII is not set | ||
831 | # CONFIG_NLS_ISO8859_1 is not set | ||
832 | # CONFIG_NLS_ISO8859_2 is not set | ||
833 | # CONFIG_NLS_ISO8859_3 is not set | ||
834 | # CONFIG_NLS_ISO8859_4 is not set | ||
835 | # CONFIG_NLS_ISO8859_5 is not set | ||
836 | # CONFIG_NLS_ISO8859_6 is not set | ||
837 | # CONFIG_NLS_ISO8859_7 is not set | ||
838 | # CONFIG_NLS_ISO8859_9 is not set | ||
839 | # CONFIG_NLS_ISO8859_13 is not set | ||
840 | # CONFIG_NLS_ISO8859_14 is not set | ||
841 | # CONFIG_NLS_ISO8859_15 is not set | ||
842 | # CONFIG_NLS_KOI8_R is not set | ||
843 | # CONFIG_NLS_KOI8_U is not set | ||
844 | # CONFIG_NLS_UTF8 is not set | ||
845 | |||
846 | # | ||
847 | # Profiling support | ||
848 | # | ||
849 | # CONFIG_PROFILING is not set | ||
850 | |||
851 | # | ||
852 | # Kernel hacking | ||
853 | # | ||
854 | # CONFIG_PRINTK_TIME is not set | ||
855 | CONFIG_ENABLE_MUST_CHECK=y | ||
856 | # CONFIG_MAGIC_SYSRQ is not set | ||
857 | # CONFIG_UNUSED_SYMBOLS is not set | ||
858 | # CONFIG_DEBUG_KERNEL is not set | ||
859 | CONFIG_LOG_BUF_SHIFT=14 | ||
860 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
861 | # CONFIG_DEBUG_FS is not set | ||
862 | # CONFIG_FRAME_POINTER is not set | ||
863 | # CONFIG_UNWIND_INFO is not set | ||
864 | # CONFIG_HEADERS_CHECK is not set | ||
865 | |||
866 | # | ||
867 | # Security options | ||
868 | # | ||
869 | # CONFIG_KEYS is not set | ||
870 | # CONFIG_SECURITY is not set | ||
871 | |||
872 | # | ||
873 | # Cryptographic options | ||
874 | # | ||
875 | # CONFIG_CRYPTO is not set | ||
876 | |||
877 | # | ||
878 | # Library routines | ||
879 | # | ||
880 | # CONFIG_CRC_CCITT is not set | ||
881 | # CONFIG_CRC16 is not set | ||
882 | CONFIG_CRC32=y | ||
883 | # CONFIG_LIBCRC32C is not set | ||
diff --git a/arch/m32r/mappi2/defconfig.vdec2 b/arch/m32r/mappi2/defconfig.vdec2 index 56f287b65898..fe5b2a63cd68 100644 --- a/arch/m32r/mappi2/defconfig.vdec2 +++ b/arch/m32r/mappi2/defconfig.vdec2 | |||
@@ -1,19 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:22:02 2005 | 4 | # Wed Dec 13 19:31:44 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 16 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 17 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 18 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
@@ -22,32 +21,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
22 | # General setup | 21 | # General setup |
23 | # | 22 | # |
24 | CONFIG_LOCALVERSION="" | 23 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | CONFIG_SWAP=y | 25 | CONFIG_SWAP=y |
26 | CONFIG_SYSVIPC=y | 26 | CONFIG_SYSVIPC=y |
27 | # CONFIG_IPC_NS is not set | ||
27 | # CONFIG_POSIX_MQUEUE is not set | 28 | # CONFIG_POSIX_MQUEUE is not set |
28 | CONFIG_BSD_PROCESS_ACCT=y | 29 | CONFIG_BSD_PROCESS_ACCT=y |
29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 30 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
30 | CONFIG_SYSCTL=y | 31 | # CONFIG_TASKSTATS is not set |
32 | # CONFIG_UTS_NS is not set | ||
31 | # CONFIG_AUDIT is not set | 33 | # CONFIG_AUDIT is not set |
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
35 | # CONFIG_IKCONFIG_PROC is not set | 35 | # CONFIG_IKCONFIG_PROC is not set |
36 | CONFIG_SYSFS_DEPRECATED=y | ||
37 | # CONFIG_RELAY is not set | ||
38 | CONFIG_INITRAMFS_SOURCE="" | ||
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
40 | CONFIG_SYSCTL=y | ||
36 | CONFIG_EMBEDDED=y | 41 | CONFIG_EMBEDDED=y |
42 | CONFIG_SYSCTL_SYSCALL=y | ||
37 | # CONFIG_KALLSYMS is not set | 43 | # CONFIG_KALLSYMS is not set |
44 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_PRINTK=y | 45 | CONFIG_PRINTK=y |
39 | CONFIG_BUG=y | 46 | CONFIG_BUG=y |
47 | CONFIG_ELF_CORE=y | ||
40 | CONFIG_BASE_FULL=y | 48 | CONFIG_BASE_FULL=y |
41 | # CONFIG_FUTEX is not set | 49 | # CONFIG_FUTEX is not set |
42 | # CONFIG_EPOLL is not set | 50 | # CONFIG_EPOLL is not set |
43 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
44 | CONFIG_SHMEM=y | 51 | CONFIG_SHMEM=y |
45 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 52 | CONFIG_SLAB=y |
46 | CONFIG_CC_ALIGN_LABELS=0 | 53 | CONFIG_VM_EVENT_COUNTERS=y |
47 | CONFIG_CC_ALIGN_LOOPS=0 | ||
48 | CONFIG_CC_ALIGN_JUMPS=0 | ||
49 | # CONFIG_TINY_SHMEM is not set | 54 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | 55 | CONFIG_BASE_SMALL=0 |
56 | # CONFIG_SLOB is not set | ||
51 | 57 | ||
52 | # | 58 | # |
53 | # Loadable module support | 59 | # Loadable module support |
@@ -55,12 +61,30 @@ CONFIG_BASE_SMALL=0 | |||
55 | CONFIG_MODULES=y | 61 | CONFIG_MODULES=y |
56 | CONFIG_MODULE_UNLOAD=y | 62 | CONFIG_MODULE_UNLOAD=y |
57 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 63 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
58 | CONFIG_OBSOLETE_MODPARM=y | ||
59 | # CONFIG_MODVERSIONS is not set | 64 | # CONFIG_MODVERSIONS is not set |
60 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 65 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
61 | CONFIG_KMOD=y | 66 | CONFIG_KMOD=y |
62 | 67 | ||
63 | # | 68 | # |
69 | # Block layer | ||
70 | # | ||
71 | CONFIG_BLOCK=y | ||
72 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
73 | |||
74 | # | ||
75 | # IO Schedulers | ||
76 | # | ||
77 | CONFIG_IOSCHED_NOOP=y | ||
78 | # CONFIG_IOSCHED_AS is not set | ||
79 | CONFIG_IOSCHED_DEADLINE=y | ||
80 | CONFIG_IOSCHED_CFQ=y | ||
81 | # CONFIG_DEFAULT_AS is not set | ||
82 | # CONFIG_DEFAULT_DEADLINE is not set | ||
83 | CONFIG_DEFAULT_CFQ=y | ||
84 | # CONFIG_DEFAULT_NOOP is not set | ||
85 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
86 | |||
87 | # | ||
64 | # Processor type and features | 88 | # Processor type and features |
65 | # | 89 | # |
66 | # CONFIG_PLAT_MAPPI is not set | 90 | # CONFIG_PLAT_MAPPI is not set |
@@ -70,8 +94,10 @@ CONFIG_KMOD=y | |||
70 | # CONFIG_PLAT_OAKS32R is not set | 94 | # CONFIG_PLAT_OAKS32R is not set |
71 | CONFIG_PLAT_MAPPI2=y | 95 | CONFIG_PLAT_MAPPI2=y |
72 | # CONFIG_PLAT_MAPPI3 is not set | 96 | # CONFIG_PLAT_MAPPI3 is not set |
97 | # CONFIG_PLAT_M32104UT is not set | ||
73 | # CONFIG_CHIP_M32700 is not set | 98 | # CONFIG_CHIP_M32700 is not set |
74 | # CONFIG_CHIP_M32102 is not set | 99 | # CONFIG_CHIP_M32102 is not set |
100 | # CONFIG_CHIP_M32104 is not set | ||
75 | CONFIG_CHIP_VDEC2=y | 101 | CONFIG_CHIP_VDEC2=y |
76 | # CONFIG_CHIP_OPSP is not set | 102 | # CONFIG_CHIP_OPSP is not set |
77 | CONFIG_MMU=y | 103 | CONFIG_MMU=y |
@@ -83,18 +109,31 @@ CONFIG_TIMER_DIVIDE=128 | |||
83 | CONFIG_MEMORY_START=0x08000000 | 109 | CONFIG_MEMORY_START=0x08000000 |
84 | CONFIG_MEMORY_SIZE=0x01000000 | 110 | CONFIG_MEMORY_SIZE=0x01000000 |
85 | CONFIG_NOHIGHMEM=y | 111 | CONFIG_NOHIGHMEM=y |
86 | # CONFIG_DISCONTIGMEM is not set | 112 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
113 | CONFIG_SELECT_MEMORY_MODEL=y | ||
114 | # CONFIG_FLATMEM_MANUAL is not set | ||
115 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
116 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
117 | CONFIG_DISCONTIGMEM=y | ||
118 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
119 | CONFIG_NEED_MULTIPLE_NODES=y | ||
120 | # CONFIG_SPARSEMEM_STATIC is not set | ||
121 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
122 | # CONFIG_RESOURCES_64BIT is not set | ||
123 | CONFIG_IRAM_START=0x00f00000 | ||
124 | CONFIG_IRAM_SIZE=0x00008000 | ||
87 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 125 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
88 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 126 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
127 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
128 | CONFIG_GENERIC_HWEIGHT=y | ||
89 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 129 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
90 | CONFIG_PREEMPT=y | 130 | CONFIG_PREEMPT=y |
91 | # CONFIG_HAVE_DEC_LOCK is not set | ||
92 | # CONFIG_SMP is not set | 131 | # CONFIG_SMP is not set |
132 | CONFIG_NODES_SHIFT=1 | ||
93 | 133 | ||
94 | # | 134 | # |
95 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 135 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
96 | # | 136 | # |
97 | # CONFIG_PCI is not set | ||
98 | # CONFIG_ISA is not set | 137 | # CONFIG_ISA is not set |
99 | 138 | ||
100 | # | 139 | # |
@@ -103,11 +142,12 @@ CONFIG_PREEMPT=y | |||
103 | CONFIG_PCCARD=y | 142 | CONFIG_PCCARD=y |
104 | # CONFIG_PCMCIA_DEBUG is not set | 143 | # CONFIG_PCMCIA_DEBUG is not set |
105 | CONFIG_PCMCIA=y | 144 | CONFIG_PCMCIA=y |
145 | CONFIG_PCMCIA_LOAD_CIS=y | ||
146 | CONFIG_PCMCIA_IOCTL=y | ||
106 | 147 | ||
107 | # | 148 | # |
108 | # PC-card bridges | 149 | # PC-card bridges |
109 | # | 150 | # |
110 | # CONFIG_TCIC is not set | ||
111 | # CONFIG_M32R_CFC is not set | 151 | # CONFIG_M32R_CFC is not set |
112 | 152 | ||
113 | # | 153 | # |
@@ -121,6 +161,94 @@ CONFIG_BINFMT_ELF=y | |||
121 | # CONFIG_BINFMT_MISC is not set | 161 | # CONFIG_BINFMT_MISC is not set |
122 | 162 | ||
123 | # | 163 | # |
164 | # Networking | ||
165 | # | ||
166 | CONFIG_NET=y | ||
167 | |||
168 | # | ||
169 | # Networking options | ||
170 | # | ||
171 | # CONFIG_NETDEBUG is not set | ||
172 | CONFIG_PACKET=y | ||
173 | # CONFIG_PACKET_MMAP is not set | ||
174 | CONFIG_UNIX=y | ||
175 | CONFIG_XFRM=y | ||
176 | # CONFIG_XFRM_USER is not set | ||
177 | # CONFIG_XFRM_SUB_POLICY is not set | ||
178 | # CONFIG_NET_KEY is not set | ||
179 | CONFIG_INET=y | ||
180 | # CONFIG_IP_MULTICAST is not set | ||
181 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
182 | CONFIG_IP_FIB_HASH=y | ||
183 | CONFIG_IP_PNP=y | ||
184 | CONFIG_IP_PNP_DHCP=y | ||
185 | # CONFIG_IP_PNP_BOOTP is not set | ||
186 | # CONFIG_IP_PNP_RARP is not set | ||
187 | # CONFIG_NET_IPIP is not set | ||
188 | # CONFIG_NET_IPGRE is not set | ||
189 | # CONFIG_ARPD is not set | ||
190 | # CONFIG_SYN_COOKIES is not set | ||
191 | # CONFIG_INET_AH is not set | ||
192 | # CONFIG_INET_ESP is not set | ||
193 | # CONFIG_INET_IPCOMP is not set | ||
194 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
195 | # CONFIG_INET_TUNNEL is not set | ||
196 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
197 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
198 | CONFIG_INET_XFRM_MODE_BEET=y | ||
199 | CONFIG_INET_DIAG=y | ||
200 | CONFIG_INET_TCP_DIAG=y | ||
201 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
202 | CONFIG_TCP_CONG_CUBIC=y | ||
203 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
204 | # CONFIG_TCP_MD5SIG is not set | ||
205 | # CONFIG_IPV6 is not set | ||
206 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
207 | # CONFIG_INET6_TUNNEL is not set | ||
208 | # CONFIG_NETWORK_SECMARK is not set | ||
209 | # CONFIG_NETFILTER is not set | ||
210 | |||
211 | # | ||
212 | # DCCP Configuration (EXPERIMENTAL) | ||
213 | # | ||
214 | # CONFIG_IP_DCCP is not set | ||
215 | |||
216 | # | ||
217 | # SCTP Configuration (EXPERIMENTAL) | ||
218 | # | ||
219 | # CONFIG_IP_SCTP is not set | ||
220 | |||
221 | # | ||
222 | # TIPC Configuration (EXPERIMENTAL) | ||
223 | # | ||
224 | # CONFIG_TIPC is not set | ||
225 | # CONFIG_ATM is not set | ||
226 | # CONFIG_BRIDGE is not set | ||
227 | # CONFIG_VLAN_8021Q is not set | ||
228 | # CONFIG_DECNET is not set | ||
229 | # CONFIG_LLC2 is not set | ||
230 | # CONFIG_IPX is not set | ||
231 | # CONFIG_ATALK is not set | ||
232 | # CONFIG_X25 is not set | ||
233 | # CONFIG_LAPB is not set | ||
234 | # CONFIG_ECONET is not set | ||
235 | # CONFIG_WAN_ROUTER is not set | ||
236 | |||
237 | # | ||
238 | # QoS and/or fair queueing | ||
239 | # | ||
240 | # CONFIG_NET_SCHED is not set | ||
241 | |||
242 | # | ||
243 | # Network testing | ||
244 | # | ||
245 | # CONFIG_NET_PKTGEN is not set | ||
246 | # CONFIG_HAMRADIO is not set | ||
247 | # CONFIG_IRDA is not set | ||
248 | # CONFIG_BT is not set | ||
249 | # CONFIG_IEEE80211 is not set | ||
250 | |||
251 | # | ||
124 | # Device Drivers | 252 | # Device Drivers |
125 | # | 253 | # |
126 | 254 | ||
@@ -129,7 +257,13 @@ CONFIG_BINFMT_ELF=y | |||
129 | # | 257 | # |
130 | CONFIG_STANDALONE=y | 258 | CONFIG_STANDALONE=y |
131 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 259 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
132 | # CONFIG_FW_LOADER is not set | 260 | CONFIG_FW_LOADER=y |
261 | # CONFIG_SYS_HYPERVISOR is not set | ||
262 | |||
263 | # | ||
264 | # Connector - unified userspace <-> kernelspace linker | ||
265 | # | ||
266 | # CONFIG_CONNECTOR is not set | ||
133 | 267 | ||
134 | # | 268 | # |
135 | # Memory Technology Devices (MTD) | 269 | # Memory Technology Devices (MTD) |
@@ -148,7 +282,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
148 | # | 282 | # |
149 | # Block devices | 283 | # Block devices |
150 | # | 284 | # |
151 | # CONFIG_BLK_DEV_FD is not set | ||
152 | # CONFIG_BLK_DEV_COW_COMMON is not set | 285 | # CONFIG_BLK_DEV_COW_COMMON is not set |
153 | CONFIG_BLK_DEV_LOOP=y | 286 | CONFIG_BLK_DEV_LOOP=y |
154 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 287 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -156,23 +289,21 @@ CONFIG_BLK_DEV_NBD=y | |||
156 | CONFIG_BLK_DEV_RAM=y | 289 | CONFIG_BLK_DEV_RAM=y |
157 | CONFIG_BLK_DEV_RAM_COUNT=16 | 290 | CONFIG_BLK_DEV_RAM_COUNT=16 |
158 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 291 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
292 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
159 | # CONFIG_BLK_DEV_INITRD is not set | 293 | # CONFIG_BLK_DEV_INITRD is not set |
160 | CONFIG_INITRAMFS_SOURCE="" | ||
161 | # CONFIG_CDROM_PKTCDVD is not set | 294 | # CONFIG_CDROM_PKTCDVD is not set |
295 | # CONFIG_ATA_OVER_ETH is not set | ||
162 | 296 | ||
163 | # | 297 | # |
164 | # IO Schedulers | 298 | # Misc devices |
165 | # | 299 | # |
166 | CONFIG_IOSCHED_NOOP=y | 300 | # CONFIG_TIFM_CORE is not set |
167 | # CONFIG_IOSCHED_AS is not set | ||
168 | CONFIG_IOSCHED_DEADLINE=y | ||
169 | CONFIG_IOSCHED_CFQ=y | ||
170 | # CONFIG_ATA_OVER_ETH is not set | ||
171 | 301 | ||
172 | # | 302 | # |
173 | # ATA/ATAPI/MFM/RLL support | 303 | # ATA/ATAPI/MFM/RLL support |
174 | # | 304 | # |
175 | CONFIG_IDE=y | 305 | CONFIG_IDE=y |
306 | CONFIG_IDE_MAX_HWIFS=4 | ||
176 | CONFIG_BLK_DEV_IDE=y | 307 | CONFIG_BLK_DEV_IDE=y |
177 | 308 | ||
178 | # | 309 | # |
@@ -200,7 +331,9 @@ CONFIG_IDE_GENERIC=y | |||
200 | # | 331 | # |
201 | # SCSI device support | 332 | # SCSI device support |
202 | # | 333 | # |
334 | # CONFIG_RAID_ATTRS is not set | ||
203 | CONFIG_SCSI=m | 335 | CONFIG_SCSI=m |
336 | # CONFIG_SCSI_NETLINK is not set | ||
204 | CONFIG_SCSI_PROC_FS=y | 337 | CONFIG_SCSI_PROC_FS=y |
205 | 338 | ||
206 | # | 339 | # |
@@ -212,6 +345,7 @@ CONFIG_BLK_DEV_SD=m | |||
212 | CONFIG_BLK_DEV_SR=m | 345 | CONFIG_BLK_DEV_SR=m |
213 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 346 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
214 | CONFIG_CHR_DEV_SG=m | 347 | CONFIG_CHR_DEV_SG=m |
348 | # CONFIG_CHR_DEV_SCH is not set | ||
215 | 349 | ||
216 | # | 350 | # |
217 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | 351 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs |
@@ -221,16 +355,18 @@ CONFIG_SCSI_MULTI_LUN=y | |||
221 | # CONFIG_SCSI_LOGGING is not set | 355 | # CONFIG_SCSI_LOGGING is not set |
222 | 356 | ||
223 | # | 357 | # |
224 | # SCSI Transport Attributes | 358 | # SCSI Transports |
225 | # | 359 | # |
226 | # CONFIG_SCSI_SPI_ATTRS is not set | 360 | # CONFIG_SCSI_SPI_ATTRS is not set |
227 | # CONFIG_SCSI_FC_ATTRS is not set | 361 | # CONFIG_SCSI_FC_ATTRS is not set |
228 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 362 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
363 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
364 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
229 | 365 | ||
230 | # | 366 | # |
231 | # SCSI low-level drivers | 367 | # SCSI low-level drivers |
232 | # | 368 | # |
233 | # CONFIG_SCSI_SATA is not set | 369 | # CONFIG_ISCSI_TCP is not set |
234 | # CONFIG_SCSI_DEBUG is not set | 370 | # CONFIG_SCSI_DEBUG is not set |
235 | 371 | ||
236 | # | 372 | # |
@@ -243,6 +379,10 @@ CONFIG_SCSI_MULTI_LUN=y | |||
243 | # CONFIG_PCMCIA_SYM53C500 is not set | 379 | # CONFIG_PCMCIA_SYM53C500 is not set |
244 | 380 | ||
245 | # | 381 | # |
382 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
383 | # | ||
384 | |||
385 | # | ||
246 | # Multi-device support (RAID and LVM) | 386 | # Multi-device support (RAID and LVM) |
247 | # | 387 | # |
248 | # CONFIG_MD is not set | 388 | # CONFIG_MD is not set |
@@ -250,6 +390,7 @@ CONFIG_SCSI_MULTI_LUN=y | |||
250 | # | 390 | # |
251 | # Fusion MPT device support | 391 | # Fusion MPT device support |
252 | # | 392 | # |
393 | # CONFIG_FUSION is not set | ||
253 | 394 | ||
254 | # | 395 | # |
255 | # IEEE 1394 (FireWire) support | 396 | # IEEE 1394 (FireWire) support |
@@ -260,69 +401,8 @@ CONFIG_SCSI_MULTI_LUN=y | |||
260 | # | 401 | # |
261 | 402 | ||
262 | # | 403 | # |
263 | # Networking support | 404 | # Network device support |
264 | # | ||
265 | CONFIG_NET=y | ||
266 | |||
267 | # | ||
268 | # Networking options | ||
269 | # | ||
270 | CONFIG_PACKET=y | ||
271 | # CONFIG_PACKET_MMAP is not set | ||
272 | CONFIG_UNIX=y | ||
273 | # CONFIG_NET_KEY is not set | ||
274 | CONFIG_INET=y | ||
275 | # CONFIG_IP_MULTICAST is not set | ||
276 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
277 | CONFIG_IP_PNP=y | ||
278 | CONFIG_IP_PNP_DHCP=y | ||
279 | # CONFIG_IP_PNP_BOOTP is not set | ||
280 | # CONFIG_IP_PNP_RARP is not set | ||
281 | # CONFIG_NET_IPIP is not set | ||
282 | # CONFIG_NET_IPGRE is not set | ||
283 | # CONFIG_ARPD is not set | ||
284 | # CONFIG_SYN_COOKIES is not set | ||
285 | # CONFIG_INET_AH is not set | ||
286 | # CONFIG_INET_ESP is not set | ||
287 | # CONFIG_INET_IPCOMP is not set | ||
288 | # CONFIG_INET_TUNNEL is not set | ||
289 | CONFIG_IP_TCPDIAG=y | ||
290 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
291 | # CONFIG_IPV6 is not set | ||
292 | # CONFIG_NETFILTER is not set | ||
293 | |||
294 | # | ||
295 | # SCTP Configuration (EXPERIMENTAL) | ||
296 | # | ||
297 | # CONFIG_IP_SCTP is not set | ||
298 | # CONFIG_ATM is not set | ||
299 | # CONFIG_BRIDGE is not set | ||
300 | # CONFIG_VLAN_8021Q is not set | ||
301 | # CONFIG_DECNET is not set | ||
302 | # CONFIG_LLC2 is not set | ||
303 | # CONFIG_IPX is not set | ||
304 | # CONFIG_ATALK is not set | ||
305 | # CONFIG_X25 is not set | ||
306 | # CONFIG_LAPB is not set | ||
307 | # CONFIG_NET_DIVERT is not set | ||
308 | # CONFIG_ECONET is not set | ||
309 | # CONFIG_WAN_ROUTER is not set | ||
310 | |||
311 | # | ||
312 | # QoS and/or fair queueing | ||
313 | # | ||
314 | # CONFIG_NET_SCHED is not set | ||
315 | # CONFIG_NET_CLS_ROUTE is not set | ||
316 | |||
317 | # | ||
318 | # Network testing | ||
319 | # | 405 | # |
320 | # CONFIG_NET_PKTGEN is not set | ||
321 | # CONFIG_NETPOLL is not set | ||
322 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
323 | # CONFIG_HAMRADIO is not set | ||
324 | # CONFIG_IRDA is not set | ||
325 | # CONFIG_BT is not set | ||
326 | CONFIG_NETDEVICES=y | 406 | CONFIG_NETDEVICES=y |
327 | # CONFIG_DUMMY is not set | 407 | # CONFIG_DUMMY is not set |
328 | # CONFIG_BONDING is not set | 408 | # CONFIG_BONDING is not set |
@@ -330,6 +410,11 @@ CONFIG_NETDEVICES=y | |||
330 | # CONFIG_TUN is not set | 410 | # CONFIG_TUN is not set |
331 | 411 | ||
332 | # | 412 | # |
413 | # PHY device support | ||
414 | # | ||
415 | # CONFIG_PHYLIB is not set | ||
416 | |||
417 | # | ||
333 | # Ethernet (10 or 100Mbit) | 418 | # Ethernet (10 or 100Mbit) |
334 | # | 419 | # |
335 | CONFIG_NET_ETHERNET=y | 420 | CONFIG_NET_ETHERNET=y |
@@ -367,6 +452,8 @@ CONFIG_SMC91X=y | |||
367 | # CONFIG_SLIP is not set | 452 | # CONFIG_SLIP is not set |
368 | # CONFIG_SHAPER is not set | 453 | # CONFIG_SHAPER is not set |
369 | # CONFIG_NETCONSOLE is not set | 454 | # CONFIG_NETCONSOLE is not set |
455 | # CONFIG_NETPOLL is not set | ||
456 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
370 | 457 | ||
371 | # | 458 | # |
372 | # ISDN subsystem | 459 | # ISDN subsystem |
@@ -382,6 +469,7 @@ CONFIG_SMC91X=y | |||
382 | # Input device support | 469 | # Input device support |
383 | # | 470 | # |
384 | CONFIG_INPUT=y | 471 | CONFIG_INPUT=y |
472 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
385 | 473 | ||
386 | # | 474 | # |
387 | # Userland interfaces | 475 | # Userland interfaces |
@@ -410,7 +498,6 @@ CONFIG_SERIO_SERPORT=y | |||
410 | # CONFIG_SERIO_LIBPS2 is not set | 498 | # CONFIG_SERIO_LIBPS2 is not set |
411 | # CONFIG_SERIO_RAW is not set | 499 | # CONFIG_SERIO_RAW is not set |
412 | # CONFIG_GAMEPORT is not set | 500 | # CONFIG_GAMEPORT is not set |
413 | CONFIG_SOUND_GAMEPORT=y | ||
414 | 501 | ||
415 | # | 502 | # |
416 | # Character devices | 503 | # Character devices |
@@ -418,6 +505,7 @@ CONFIG_SOUND_GAMEPORT=y | |||
418 | CONFIG_VT=y | 505 | CONFIG_VT=y |
419 | CONFIG_VT_CONSOLE=y | 506 | CONFIG_VT_CONSOLE=y |
420 | CONFIG_HW_CONSOLE=y | 507 | CONFIG_HW_CONSOLE=y |
508 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
421 | # CONFIG_SERIAL_NONSTANDARD is not set | 509 | # CONFIG_SERIAL_NONSTANDARD is not set |
422 | 510 | ||
423 | # | 511 | # |
@@ -432,7 +520,6 @@ CONFIG_SERIAL_CORE=y | |||
432 | CONFIG_SERIAL_CORE_CONSOLE=y | 520 | CONFIG_SERIAL_CORE_CONSOLE=y |
433 | CONFIG_SERIAL_M32R_SIO=y | 521 | CONFIG_SERIAL_M32R_SIO=y |
434 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | 522 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y |
435 | # CONFIG_SERIAL_M32R_PLDSIO is not set | ||
436 | CONFIG_UNIX98_PTYS=y | 523 | CONFIG_UNIX98_PTYS=y |
437 | CONFIG_LEGACY_PTYS=y | 524 | CONFIG_LEGACY_PTYS=y |
438 | CONFIG_LEGACY_PTY_COUNT=256 | 525 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -446,25 +533,27 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
446 | # Watchdog Cards | 533 | # Watchdog Cards |
447 | # | 534 | # |
448 | # CONFIG_WATCHDOG is not set | 535 | # CONFIG_WATCHDOG is not set |
536 | CONFIG_HW_RANDOM=y | ||
449 | # CONFIG_RTC is not set | 537 | # CONFIG_RTC is not set |
450 | # CONFIG_GEN_RTC is not set | ||
451 | # CONFIG_DTLK is not set | 538 | # CONFIG_DTLK is not set |
452 | # CONFIG_R3964 is not set | 539 | # CONFIG_R3964 is not set |
453 | 540 | ||
454 | # | 541 | # |
455 | # Ftape, the floppy tape device driver | 542 | # Ftape, the floppy tape device driver |
456 | # | 543 | # |
457 | # CONFIG_DRM is not set | ||
458 | 544 | ||
459 | # | 545 | # |
460 | # PCMCIA character devices | 546 | # PCMCIA character devices |
461 | # | 547 | # |
462 | # CONFIG_SYNCLINK_CS is not set | 548 | # CONFIG_SYNCLINK_CS is not set |
549 | # CONFIG_CARDMAN_4000 is not set | ||
550 | # CONFIG_CARDMAN_4040 is not set | ||
463 | # CONFIG_RAW_DRIVER is not set | 551 | # CONFIG_RAW_DRIVER is not set |
464 | 552 | ||
465 | # | 553 | # |
466 | # TPM devices | 554 | # TPM devices |
467 | # | 555 | # |
556 | # CONFIG_TCG_TPM is not set | ||
468 | 557 | ||
469 | # | 558 | # |
470 | # I2C support | 559 | # I2C support |
@@ -472,33 +561,50 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
472 | # CONFIG_I2C is not set | 561 | # CONFIG_I2C is not set |
473 | 562 | ||
474 | # | 563 | # |
564 | # SPI support | ||
565 | # | ||
566 | # CONFIG_SPI is not set | ||
567 | # CONFIG_SPI_MASTER is not set | ||
568 | |||
569 | # | ||
475 | # Dallas's 1-wire bus | 570 | # Dallas's 1-wire bus |
476 | # | 571 | # |
477 | # CONFIG_W1 is not set | 572 | # CONFIG_W1 is not set |
478 | 573 | ||
479 | # | 574 | # |
480 | # Misc devices | 575 | # Hardware Monitoring support |
481 | # | 576 | # |
577 | CONFIG_HWMON=y | ||
578 | # CONFIG_HWMON_VID is not set | ||
579 | # CONFIG_SENSORS_ABITUGURU is not set | ||
580 | # CONFIG_SENSORS_F71805F is not set | ||
581 | # CONFIG_SENSORS_VT1211 is not set | ||
582 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
482 | 583 | ||
483 | # | 584 | # |
484 | # Multimedia devices | 585 | # Multimedia devices |
485 | # | 586 | # |
486 | CONFIG_VIDEO_DEV=y | 587 | CONFIG_VIDEO_DEV=y |
588 | CONFIG_VIDEO_V4L1=y | ||
589 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
590 | CONFIG_VIDEO_V4L2=y | ||
487 | 591 | ||
488 | # | 592 | # |
489 | # Video For Linux | 593 | # Video Capture Adapters |
490 | # | 594 | # |
491 | 595 | ||
492 | # | 596 | # |
493 | # Video Adapters | 597 | # Video Capture Adapters |
494 | # | 598 | # |
599 | # CONFIG_VIDEO_ADV_DEBUG is not set | ||
600 | CONFIG_VIDEO_HELPER_CHIPS_AUTO=y | ||
601 | # CONFIG_VIDEO_VIVI is not set | ||
495 | # CONFIG_VIDEO_CPIA is not set | 602 | # CONFIG_VIDEO_CPIA is not set |
496 | # CONFIG_VIDEO_M32R_AR is not set | 603 | # CONFIG_VIDEO_M32R_AR is not set |
497 | 604 | ||
498 | # | 605 | # |
499 | # Radio Adapters | 606 | # Radio Adapters |
500 | # | 607 | # |
501 | # CONFIG_RADIO_MAESTRO is not set | ||
502 | 608 | ||
503 | # | 609 | # |
504 | # Digital Video Broadcasting Devices | 610 | # Digital Video Broadcasting Devices |
@@ -508,6 +614,7 @@ CONFIG_VIDEO_DEV=y | |||
508 | # | 614 | # |
509 | # Graphics support | 615 | # Graphics support |
510 | # | 616 | # |
617 | CONFIG_FIRMWARE_EDID=y | ||
511 | # CONFIG_FB is not set | 618 | # CONFIG_FB is not set |
512 | 619 | ||
513 | # | 620 | # |
@@ -515,6 +622,7 @@ CONFIG_VIDEO_DEV=y | |||
515 | # | 622 | # |
516 | # CONFIG_VGA_CONSOLE is not set | 623 | # CONFIG_VGA_CONSOLE is not set |
517 | CONFIG_DUMMY_CONSOLE=y | 624 | CONFIG_DUMMY_CONSOLE=y |
625 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
518 | 626 | ||
519 | # | 627 | # |
520 | # Sound | 628 | # Sound |
@@ -526,6 +634,11 @@ CONFIG_DUMMY_CONSOLE=y | |||
526 | # | 634 | # |
527 | # CONFIG_USB_ARCH_HAS_HCD is not set | 635 | # CONFIG_USB_ARCH_HAS_HCD is not set |
528 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 636 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
637 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
638 | |||
639 | # | ||
640 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
641 | # | ||
529 | 642 | ||
530 | # | 643 | # |
531 | # USB Gadget Support | 644 | # USB Gadget Support |
@@ -538,38 +651,73 @@ CONFIG_DUMMY_CONSOLE=y | |||
538 | # CONFIG_MMC is not set | 651 | # CONFIG_MMC is not set |
539 | 652 | ||
540 | # | 653 | # |
654 | # LED devices | ||
655 | # | ||
656 | # CONFIG_NEW_LEDS is not set | ||
657 | |||
658 | # | ||
659 | # LED drivers | ||
660 | # | ||
661 | |||
662 | # | ||
663 | # LED Triggers | ||
664 | # | ||
665 | |||
666 | # | ||
541 | # InfiniBand support | 667 | # InfiniBand support |
542 | # | 668 | # |
543 | # CONFIG_INFINIBAND is not set | 669 | |
670 | # | ||
671 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
672 | # | ||
673 | |||
674 | # | ||
675 | # Real Time Clock | ||
676 | # | ||
677 | # CONFIG_RTC_CLASS is not set | ||
678 | |||
679 | # | ||
680 | # DMA Engine support | ||
681 | # | ||
682 | # CONFIG_DMA_ENGINE is not set | ||
683 | |||
684 | # | ||
685 | # DMA Clients | ||
686 | # | ||
687 | |||
688 | # | ||
689 | # DMA Devices | ||
690 | # | ||
544 | 691 | ||
545 | # | 692 | # |
546 | # File systems | 693 | # File systems |
547 | # | 694 | # |
548 | CONFIG_EXT2_FS=y | 695 | CONFIG_EXT2_FS=y |
549 | # CONFIG_EXT2_FS_XATTR is not set | 696 | # CONFIG_EXT2_FS_XATTR is not set |
550 | CONFIG_EXT3_FS=m | 697 | # CONFIG_EXT2_FS_XIP is not set |
698 | CONFIG_EXT3_FS=y | ||
551 | CONFIG_EXT3_FS_XATTR=y | 699 | CONFIG_EXT3_FS_XATTR=y |
552 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 700 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
553 | # CONFIG_EXT3_FS_SECURITY is not set | 701 | # CONFIG_EXT3_FS_SECURITY is not set |
554 | CONFIG_JBD=m | 702 | # CONFIG_EXT4DEV_FS is not set |
703 | CONFIG_JBD=y | ||
555 | CONFIG_JBD_DEBUG=y | 704 | CONFIG_JBD_DEBUG=y |
556 | CONFIG_FS_MBCACHE=y | 705 | CONFIG_FS_MBCACHE=y |
557 | CONFIG_REISERFS_FS=m | 706 | # CONFIG_REISERFS_FS is not set |
558 | # CONFIG_REISERFS_CHECK is not set | ||
559 | # CONFIG_REISERFS_PROC_INFO is not set | ||
560 | # CONFIG_REISERFS_FS_XATTR is not set | ||
561 | # CONFIG_JFS_FS is not set | 707 | # CONFIG_JFS_FS is not set |
562 | 708 | # CONFIG_FS_POSIX_ACL is not set | |
563 | # | ||
564 | # XFS support | ||
565 | # | ||
566 | # CONFIG_XFS_FS is not set | 709 | # CONFIG_XFS_FS is not set |
710 | # CONFIG_GFS2_FS is not set | ||
711 | # CONFIG_OCFS2_FS is not set | ||
567 | # CONFIG_MINIX_FS is not set | 712 | # CONFIG_MINIX_FS is not set |
568 | # CONFIG_ROMFS_FS is not set | 713 | # CONFIG_ROMFS_FS is not set |
714 | CONFIG_INOTIFY=y | ||
715 | CONFIG_INOTIFY_USER=y | ||
569 | # CONFIG_QUOTA is not set | 716 | # CONFIG_QUOTA is not set |
570 | CONFIG_DNOTIFY=y | 717 | CONFIG_DNOTIFY=y |
571 | # CONFIG_AUTOFS_FS is not set | 718 | # CONFIG_AUTOFS_FS is not set |
572 | # CONFIG_AUTOFS4_FS is not set | 719 | # CONFIG_AUTOFS4_FS is not set |
720 | # CONFIG_FUSE_FS is not set | ||
573 | 721 | ||
574 | # | 722 | # |
575 | # CD-ROM/DVD Filesystems | 723 | # CD-ROM/DVD Filesystems |
@@ -595,15 +743,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
595 | # | 743 | # |
596 | CONFIG_PROC_FS=y | 744 | CONFIG_PROC_FS=y |
597 | CONFIG_PROC_KCORE=y | 745 | CONFIG_PROC_KCORE=y |
746 | CONFIG_PROC_SYSCTL=y | ||
598 | CONFIG_SYSFS=y | 747 | CONFIG_SYSFS=y |
599 | CONFIG_DEVFS_FS=y | ||
600 | CONFIG_DEVFS_MOUNT=y | ||
601 | # CONFIG_DEVFS_DEBUG is not set | ||
602 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
603 | CONFIG_TMPFS=y | 748 | CONFIG_TMPFS=y |
604 | # CONFIG_TMPFS_XATTR is not set | 749 | # CONFIG_TMPFS_POSIX_ACL is not set |
605 | # CONFIG_HUGETLB_PAGE is not set | 750 | # CONFIG_HUGETLB_PAGE is not set |
606 | CONFIG_RAMFS=y | 751 | CONFIG_RAMFS=y |
752 | # CONFIG_CONFIGFS_FS is not set | ||
607 | 753 | ||
608 | # | 754 | # |
609 | # Miscellaneous filesystems | 755 | # Miscellaneous filesystems |
@@ -627,12 +773,14 @@ CONFIG_RAMFS=y | |||
627 | # | 773 | # |
628 | CONFIG_NFS_FS=y | 774 | CONFIG_NFS_FS=y |
629 | CONFIG_NFS_V3=y | 775 | CONFIG_NFS_V3=y |
776 | # CONFIG_NFS_V3_ACL is not set | ||
630 | # CONFIG_NFS_V4 is not set | 777 | # CONFIG_NFS_V4 is not set |
631 | # CONFIG_NFS_DIRECTIO is not set | 778 | # CONFIG_NFS_DIRECTIO is not set |
632 | # CONFIG_NFSD is not set | 779 | # CONFIG_NFSD is not set |
633 | CONFIG_ROOT_NFS=y | 780 | CONFIG_ROOT_NFS=y |
634 | CONFIG_LOCKD=y | 781 | CONFIG_LOCKD=y |
635 | CONFIG_LOCKD_V4=y | 782 | CONFIG_LOCKD_V4=y |
783 | CONFIG_NFS_COMMON=y | ||
636 | CONFIG_SUNRPC=y | 784 | CONFIG_SUNRPC=y |
637 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 785 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
638 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 786 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -641,6 +789,7 @@ CONFIG_SUNRPC=y | |||
641 | # CONFIG_NCP_FS is not set | 789 | # CONFIG_NCP_FS is not set |
642 | # CONFIG_CODA_FS is not set | 790 | # CONFIG_CODA_FS is not set |
643 | # CONFIG_AFS_FS is not set | 791 | # CONFIG_AFS_FS is not set |
792 | # CONFIG_9P_FS is not set | ||
644 | 793 | ||
645 | # | 794 | # |
646 | # Partition Types | 795 | # Partition Types |
@@ -701,10 +850,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
701 | # Kernel hacking | 850 | # Kernel hacking |
702 | # | 851 | # |
703 | # CONFIG_PRINTK_TIME is not set | 852 | # CONFIG_PRINTK_TIME is not set |
853 | CONFIG_ENABLE_MUST_CHECK=y | ||
854 | # CONFIG_MAGIC_SYSRQ is not set | ||
855 | # CONFIG_UNUSED_SYMBOLS is not set | ||
704 | # CONFIG_DEBUG_KERNEL is not set | 856 | # CONFIG_DEBUG_KERNEL is not set |
705 | CONFIG_LOG_BUF_SHIFT=14 | 857 | CONFIG_LOG_BUF_SHIFT=14 |
706 | # CONFIG_DEBUG_BUGVERBOSE is not set | 858 | # CONFIG_DEBUG_BUGVERBOSE is not set |
859 | # CONFIG_DEBUG_FS is not set | ||
707 | # CONFIG_FRAME_POINTER is not set | 860 | # CONFIG_FRAME_POINTER is not set |
861 | # CONFIG_UNWIND_INFO is not set | ||
862 | # CONFIG_HEADERS_CHECK is not set | ||
708 | 863 | ||
709 | # | 864 | # |
710 | # Security options | 865 | # Security options |
@@ -718,12 +873,9 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
718 | # CONFIG_CRYPTO is not set | 873 | # CONFIG_CRYPTO is not set |
719 | 874 | ||
720 | # | 875 | # |
721 | # Hardware crypto devices | ||
722 | # | ||
723 | |||
724 | # | ||
725 | # Library routines | 876 | # Library routines |
726 | # | 877 | # |
727 | # CONFIG_CRC_CCITT is not set | 878 | # CONFIG_CRC_CCITT is not set |
879 | # CONFIG_CRC16 is not set | ||
728 | CONFIG_CRC32=y | 880 | CONFIG_CRC32=y |
729 | # CONFIG_LIBCRC32C is not set | 881 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/m32r/mappi3/defconfig.smp b/arch/m32r/mappi3/defconfig.smp index 2eebe75fc071..2f352267a6d9 100644 --- a/arch/m32r/mappi3/defconfig.smp +++ b/arch/m32r/mappi3/defconfig.smp | |||
@@ -1,21 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Tue May 31 17:55:34 2005 | 4 | # Mon Dec 11 19:57:33 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | # CONFIG_CLEAN_COMPILE is not set | ||
17 | CONFIG_BROKEN=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | ||
19 | CONFIG_LOCK_KERNEL=y | 16 | CONFIG_LOCK_KERNEL=y |
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 17 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
21 | 18 | ||
@@ -23,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
23 | # General setup | 20 | # General setup |
24 | # | 21 | # |
25 | CONFIG_LOCALVERSION="" | 22 | CONFIG_LOCALVERSION="" |
23 | CONFIG_LOCALVERSION_AUTO=y | ||
26 | CONFIG_SWAP=y | 24 | CONFIG_SWAP=y |
27 | CONFIG_SYSVIPC=y | 25 | CONFIG_SYSVIPC=y |
26 | # CONFIG_IPC_NS is not set | ||
28 | # CONFIG_POSIX_MQUEUE is not set | 27 | # CONFIG_POSIX_MQUEUE is not set |
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 28 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 29 | # CONFIG_TASKSTATS is not set |
30 | # CONFIG_UTS_NS is not set | ||
31 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
32 | CONFIG_HOTPLUG=y | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | CONFIG_IKCONFIG=y | 32 | CONFIG_IKCONFIG=y |
35 | CONFIG_IKCONFIG_PROC=y | 33 | CONFIG_IKCONFIG_PROC=y |
36 | # CONFIG_CPUSETS is not set | 34 | # CONFIG_CPUSETS is not set |
35 | CONFIG_SYSFS_DEPRECATED=y | ||
36 | # CONFIG_RELAY is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
39 | CONFIG_SYSCTL=y | ||
37 | CONFIG_EMBEDDED=y | 40 | CONFIG_EMBEDDED=y |
41 | CONFIG_SYSCTL_SYSCALL=y | ||
38 | # CONFIG_KALLSYMS is not set | 42 | # CONFIG_KALLSYMS is not set |
43 | CONFIG_HOTPLUG=y | ||
39 | CONFIG_PRINTK=y | 44 | CONFIG_PRINTK=y |
40 | CONFIG_BUG=y | 45 | CONFIG_BUG=y |
46 | CONFIG_ELF_CORE=y | ||
41 | CONFIG_BASE_FULL=y | 47 | CONFIG_BASE_FULL=y |
42 | # CONFIG_FUTEX is not set | 48 | # CONFIG_FUTEX is not set |
43 | # CONFIG_EPOLL is not set | 49 | # CONFIG_EPOLL is not set |
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | 50 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 51 | CONFIG_SLAB=y |
47 | CONFIG_CC_ALIGN_LABELS=0 | 52 | CONFIG_VM_EVENT_COUNTERS=y |
48 | CONFIG_CC_ALIGN_LOOPS=0 | ||
49 | CONFIG_CC_ALIGN_JUMPS=0 | ||
50 | # CONFIG_TINY_SHMEM is not set | 53 | # CONFIG_TINY_SHMEM is not set |
51 | CONFIG_BASE_SMALL=0 | 54 | CONFIG_BASE_SMALL=0 |
55 | # CONFIG_SLOB is not set | ||
52 | 56 | ||
53 | # | 57 | # |
54 | # Loadable module support | 58 | # Loadable module support |
@@ -56,13 +60,31 @@ CONFIG_BASE_SMALL=0 | |||
56 | CONFIG_MODULES=y | 60 | CONFIG_MODULES=y |
57 | CONFIG_MODULE_UNLOAD=y | 61 | CONFIG_MODULE_UNLOAD=y |
58 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 62 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
59 | CONFIG_OBSOLETE_MODPARM=y | ||
60 | # CONFIG_MODVERSIONS is not set | 63 | # CONFIG_MODVERSIONS is not set |
61 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 64 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
62 | CONFIG_KMOD=y | 65 | CONFIG_KMOD=y |
63 | CONFIG_STOP_MACHINE=y | 66 | CONFIG_STOP_MACHINE=y |
64 | 67 | ||
65 | # | 68 | # |
69 | # Block layer | ||
70 | # | ||
71 | CONFIG_BLOCK=y | ||
72 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
73 | |||
74 | # | ||
75 | # IO Schedulers | ||
76 | # | ||
77 | CONFIG_IOSCHED_NOOP=y | ||
78 | # CONFIG_IOSCHED_AS is not set | ||
79 | CONFIG_IOSCHED_DEADLINE=y | ||
80 | CONFIG_IOSCHED_CFQ=y | ||
81 | # CONFIG_DEFAULT_AS is not set | ||
82 | # CONFIG_DEFAULT_DEADLINE is not set | ||
83 | CONFIG_DEFAULT_CFQ=y | ||
84 | # CONFIG_DEFAULT_NOOP is not set | ||
85 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
86 | |||
87 | # | ||
66 | # Processor type and features | 88 | # Processor type and features |
67 | # | 89 | # |
68 | # CONFIG_PLAT_MAPPI is not set | 90 | # CONFIG_PLAT_MAPPI is not set |
@@ -72,8 +94,10 @@ CONFIG_STOP_MACHINE=y | |||
72 | # CONFIG_PLAT_OAKS32R is not set | 94 | # CONFIG_PLAT_OAKS32R is not set |
73 | # CONFIG_PLAT_MAPPI2 is not set | 95 | # CONFIG_PLAT_MAPPI2 is not set |
74 | CONFIG_PLAT_MAPPI3=y | 96 | CONFIG_PLAT_MAPPI3=y |
97 | # CONFIG_PLAT_M32104UT is not set | ||
75 | CONFIG_CHIP_M32700=y | 98 | CONFIG_CHIP_M32700=y |
76 | # CONFIG_CHIP_M32102 is not set | 99 | # CONFIG_CHIP_M32102 is not set |
100 | # CONFIG_CHIP_M32104 is not set | ||
77 | # CONFIG_CHIP_VDEC2 is not set | 101 | # CONFIG_CHIP_VDEC2 is not set |
78 | # CONFIG_CHIP_OPSP is not set | 102 | # CONFIG_CHIP_OPSP is not set |
79 | CONFIG_MMU=y | 103 | CONFIG_MMU=y |
@@ -87,23 +111,33 @@ CONFIG_TIMER_DIVIDE=128 | |||
87 | CONFIG_MEMORY_START=0x08000000 | 111 | CONFIG_MEMORY_START=0x08000000 |
88 | CONFIG_MEMORY_SIZE=0x08000000 | 112 | CONFIG_MEMORY_SIZE=0x08000000 |
89 | CONFIG_NOHIGHMEM=y | 113 | CONFIG_NOHIGHMEM=y |
114 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
115 | CONFIG_SELECT_MEMORY_MODEL=y | ||
116 | # CONFIG_FLATMEM_MANUAL is not set | ||
117 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
118 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
90 | CONFIG_DISCONTIGMEM=y | 119 | CONFIG_DISCONTIGMEM=y |
120 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
121 | CONFIG_NEED_MULTIPLE_NODES=y | ||
122 | # CONFIG_SPARSEMEM_STATIC is not set | ||
123 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
124 | # CONFIG_RESOURCES_64BIT is not set | ||
91 | CONFIG_IRAM_START=0x00f00000 | 125 | CONFIG_IRAM_START=0x00f00000 |
92 | CONFIG_IRAM_SIZE=0x00080000 | 126 | CONFIG_IRAM_SIZE=0x00080000 |
93 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 127 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
94 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 128 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
129 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
130 | CONFIG_GENERIC_HWEIGHT=y | ||
95 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 131 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
96 | CONFIG_PREEMPT=y | 132 | CONFIG_PREEMPT=y |
97 | # CONFIG_HAVE_DEC_LOCK is not set | ||
98 | CONFIG_SMP=y | 133 | CONFIG_SMP=y |
99 | # CONFIG_CHIP_M32700_TS1 is not set | 134 | # CONFIG_CHIP_M32700_TS1 is not set |
100 | CONFIG_NR_CPUS=2 | 135 | CONFIG_NR_CPUS=2 |
101 | # CONFIG_NUMA is not set | 136 | CONFIG_NODES_SHIFT=1 |
102 | 137 | ||
103 | # | 138 | # |
104 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 139 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
105 | # | 140 | # |
106 | # CONFIG_PCI is not set | ||
107 | # CONFIG_ISA is not set | 141 | # CONFIG_ISA is not set |
108 | 142 | ||
109 | # | 143 | # |
@@ -112,11 +146,12 @@ CONFIG_NR_CPUS=2 | |||
112 | CONFIG_PCCARD=y | 146 | CONFIG_PCCARD=y |
113 | # CONFIG_PCMCIA_DEBUG is not set | 147 | # CONFIG_PCMCIA_DEBUG is not set |
114 | CONFIG_PCMCIA=y | 148 | CONFIG_PCMCIA=y |
149 | CONFIG_PCMCIA_LOAD_CIS=y | ||
150 | CONFIG_PCMCIA_IOCTL=y | ||
115 | 151 | ||
116 | # | 152 | # |
117 | # PC-card bridges | 153 | # PC-card bridges |
118 | # | 154 | # |
119 | # CONFIG_TCIC is not set | ||
120 | # CONFIG_M32R_PCC is not set | 155 | # CONFIG_M32R_PCC is not set |
121 | # CONFIG_M32R_CFC is not set | 156 | # CONFIG_M32R_CFC is not set |
122 | 157 | ||
@@ -131,6 +166,93 @@ CONFIG_BINFMT_ELF=y | |||
131 | # CONFIG_BINFMT_MISC is not set | 166 | # CONFIG_BINFMT_MISC is not set |
132 | 167 | ||
133 | # | 168 | # |
169 | # Networking | ||
170 | # | ||
171 | CONFIG_NET=y | ||
172 | |||
173 | # | ||
174 | # Networking options | ||
175 | # | ||
176 | # CONFIG_NETDEBUG is not set | ||
177 | # CONFIG_PACKET is not set | ||
178 | CONFIG_UNIX=y | ||
179 | CONFIG_XFRM=y | ||
180 | # CONFIG_XFRM_USER is not set | ||
181 | # CONFIG_XFRM_SUB_POLICY is not set | ||
182 | # CONFIG_NET_KEY is not set | ||
183 | CONFIG_INET=y | ||
184 | # CONFIG_IP_MULTICAST is not set | ||
185 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
186 | CONFIG_IP_FIB_HASH=y | ||
187 | CONFIG_IP_PNP=y | ||
188 | CONFIG_IP_PNP_DHCP=y | ||
189 | # CONFIG_IP_PNP_BOOTP is not set | ||
190 | # CONFIG_IP_PNP_RARP is not set | ||
191 | # CONFIG_NET_IPIP is not set | ||
192 | # CONFIG_NET_IPGRE is not set | ||
193 | # CONFIG_ARPD is not set | ||
194 | # CONFIG_SYN_COOKIES is not set | ||
195 | # CONFIG_INET_AH is not set | ||
196 | # CONFIG_INET_ESP is not set | ||
197 | # CONFIG_INET_IPCOMP is not set | ||
198 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
199 | # CONFIG_INET_TUNNEL is not set | ||
200 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
201 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
202 | CONFIG_INET_XFRM_MODE_BEET=y | ||
203 | CONFIG_INET_DIAG=y | ||
204 | CONFIG_INET_TCP_DIAG=y | ||
205 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
206 | CONFIG_TCP_CONG_CUBIC=y | ||
207 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
208 | # CONFIG_TCP_MD5SIG is not set | ||
209 | # CONFIG_IPV6 is not set | ||
210 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
211 | # CONFIG_INET6_TUNNEL is not set | ||
212 | # CONFIG_NETWORK_SECMARK is not set | ||
213 | # CONFIG_NETFILTER is not set | ||
214 | |||
215 | # | ||
216 | # DCCP Configuration (EXPERIMENTAL) | ||
217 | # | ||
218 | # CONFIG_IP_DCCP is not set | ||
219 | |||
220 | # | ||
221 | # SCTP Configuration (EXPERIMENTAL) | ||
222 | # | ||
223 | # CONFIG_IP_SCTP is not set | ||
224 | |||
225 | # | ||
226 | # TIPC Configuration (EXPERIMENTAL) | ||
227 | # | ||
228 | # CONFIG_TIPC is not set | ||
229 | # CONFIG_ATM is not set | ||
230 | # CONFIG_BRIDGE is not set | ||
231 | # CONFIG_VLAN_8021Q is not set | ||
232 | # CONFIG_DECNET is not set | ||
233 | # CONFIG_LLC2 is not set | ||
234 | # CONFIG_IPX is not set | ||
235 | # CONFIG_ATALK is not set | ||
236 | # CONFIG_X25 is not set | ||
237 | # CONFIG_LAPB is not set | ||
238 | # CONFIG_ECONET is not set | ||
239 | # CONFIG_WAN_ROUTER is not set | ||
240 | |||
241 | # | ||
242 | # QoS and/or fair queueing | ||
243 | # | ||
244 | # CONFIG_NET_SCHED is not set | ||
245 | |||
246 | # | ||
247 | # Network testing | ||
248 | # | ||
249 | # CONFIG_NET_PKTGEN is not set | ||
250 | # CONFIG_HAMRADIO is not set | ||
251 | # CONFIG_IRDA is not set | ||
252 | # CONFIG_BT is not set | ||
253 | # CONFIG_IEEE80211 is not set | ||
254 | |||
255 | # | ||
134 | # Device Drivers | 256 | # Device Drivers |
135 | # | 257 | # |
136 | 258 | ||
@@ -140,6 +262,12 @@ CONFIG_BINFMT_ELF=y | |||
140 | CONFIG_STANDALONE=y | 262 | CONFIG_STANDALONE=y |
141 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 263 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
142 | CONFIG_FW_LOADER=y | 264 | CONFIG_FW_LOADER=y |
265 | # CONFIG_SYS_HYPERVISOR is not set | ||
266 | |||
267 | # | ||
268 | # Connector - unified userspace <-> kernelspace linker | ||
269 | # | ||
270 | # CONFIG_CONNECTOR is not set | ||
143 | 271 | ||
144 | # | 272 | # |
145 | # Memory Technology Devices (MTD) | 273 | # Memory Technology Devices (MTD) |
@@ -162,6 +290,8 @@ CONFIG_MTD_BLOCK=y | |||
162 | # CONFIG_FTL is not set | 290 | # CONFIG_FTL is not set |
163 | # CONFIG_NFTL is not set | 291 | # CONFIG_NFTL is not set |
164 | # CONFIG_INFTL is not set | 292 | # CONFIG_INFTL is not set |
293 | # CONFIG_RFD_FTL is not set | ||
294 | # CONFIG_SSFDC is not set | ||
165 | 295 | ||
166 | # | 296 | # |
167 | # RAM/ROM/Flash chip drivers | 297 | # RAM/ROM/Flash chip drivers |
@@ -187,6 +317,7 @@ CONFIG_MTD_CFI_I2=y | |||
187 | # Mapping drivers for chip access | 317 | # Mapping drivers for chip access |
188 | # | 318 | # |
189 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 319 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
320 | # CONFIG_MTD_PLATRAM is not set | ||
190 | 321 | ||
191 | # | 322 | # |
192 | # Self-contained MTD device drivers | 323 | # Self-contained MTD device drivers |
@@ -194,7 +325,6 @@ CONFIG_MTD_CFI_I2=y | |||
194 | # CONFIG_MTD_SLRAM is not set | 325 | # CONFIG_MTD_SLRAM is not set |
195 | # CONFIG_MTD_PHRAM is not set | 326 | # CONFIG_MTD_PHRAM is not set |
196 | # CONFIG_MTD_MTDRAM is not set | 327 | # CONFIG_MTD_MTDRAM is not set |
197 | # CONFIG_MTD_BLKMTD is not set | ||
198 | # CONFIG_MTD_BLOCK2MTD is not set | 328 | # CONFIG_MTD_BLOCK2MTD is not set |
199 | 329 | ||
200 | # | 330 | # |
@@ -210,6 +340,11 @@ CONFIG_MTD_CFI_I2=y | |||
210 | # CONFIG_MTD_NAND is not set | 340 | # CONFIG_MTD_NAND is not set |
211 | 341 | ||
212 | # | 342 | # |
343 | # OneNAND Flash Device Drivers | ||
344 | # | ||
345 | # CONFIG_MTD_ONENAND is not set | ||
346 | |||
347 | # | ||
213 | # Parallel port support | 348 | # Parallel port support |
214 | # | 349 | # |
215 | # CONFIG_PARPORT is not set | 350 | # CONFIG_PARPORT is not set |
@@ -221,7 +356,6 @@ CONFIG_MTD_CFI_I2=y | |||
221 | # | 356 | # |
222 | # Block devices | 357 | # Block devices |
223 | # | 358 | # |
224 | # CONFIG_BLK_DEV_FD is not set | ||
225 | # CONFIG_BLK_DEV_COW_COMMON is not set | 359 | # CONFIG_BLK_DEV_COW_COMMON is not set |
226 | CONFIG_BLK_DEV_LOOP=y | 360 | CONFIG_BLK_DEV_LOOP=y |
227 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 361 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -229,23 +363,21 @@ CONFIG_BLK_DEV_NBD=m | |||
229 | CONFIG_BLK_DEV_RAM=y | 363 | CONFIG_BLK_DEV_RAM=y |
230 | CONFIG_BLK_DEV_RAM_COUNT=16 | 364 | CONFIG_BLK_DEV_RAM_COUNT=16 |
231 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 365 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
366 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
232 | CONFIG_BLK_DEV_INITRD=y | 367 | CONFIG_BLK_DEV_INITRD=y |
233 | CONFIG_INITRAMFS_SOURCE="" | ||
234 | # CONFIG_CDROM_PKTCDVD is not set | 368 | # CONFIG_CDROM_PKTCDVD is not set |
369 | # CONFIG_ATA_OVER_ETH is not set | ||
235 | 370 | ||
236 | # | 371 | # |
237 | # IO Schedulers | 372 | # Misc devices |
238 | # | 373 | # |
239 | CONFIG_IOSCHED_NOOP=y | 374 | # CONFIG_TIFM_CORE is not set |
240 | # CONFIG_IOSCHED_AS is not set | ||
241 | CONFIG_IOSCHED_DEADLINE=y | ||
242 | CONFIG_IOSCHED_CFQ=y | ||
243 | # CONFIG_ATA_OVER_ETH is not set | ||
244 | 375 | ||
245 | # | 376 | # |
246 | # ATA/ATAPI/MFM/RLL support | 377 | # ATA/ATAPI/MFM/RLL support |
247 | # | 378 | # |
248 | CONFIG_IDE=y | 379 | CONFIG_IDE=y |
380 | CONFIG_IDE_MAX_HWIFS=4 | ||
249 | CONFIG_BLK_DEV_IDE=y | 381 | CONFIG_BLK_DEV_IDE=y |
250 | 382 | ||
251 | # | 383 | # |
@@ -254,7 +386,7 @@ CONFIG_BLK_DEV_IDE=y | |||
254 | # CONFIG_BLK_DEV_IDE_SATA is not set | 386 | # CONFIG_BLK_DEV_IDE_SATA is not set |
255 | CONFIG_BLK_DEV_IDEDISK=y | 387 | CONFIG_BLK_DEV_IDEDISK=y |
256 | # CONFIG_IDEDISK_MULTI_MODE is not set | 388 | # CONFIG_IDEDISK_MULTI_MODE is not set |
257 | CONFIG_BLK_DEV_IDECS=y | 389 | CONFIG_BLK_DEV_IDECS=m |
258 | CONFIG_BLK_DEV_IDECD=m | 390 | CONFIG_BLK_DEV_IDECD=m |
259 | # CONFIG_BLK_DEV_IDETAPE is not set | 391 | # CONFIG_BLK_DEV_IDETAPE is not set |
260 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | 392 | # CONFIG_BLK_DEV_IDEFLOPPY is not set |
@@ -272,7 +404,13 @@ CONFIG_IDE_GENERIC=y | |||
272 | # | 404 | # |
273 | # SCSI device support | 405 | # SCSI device support |
274 | # | 406 | # |
407 | # CONFIG_RAID_ATTRS is not set | ||
275 | # CONFIG_SCSI is not set | 408 | # CONFIG_SCSI is not set |
409 | # CONFIG_SCSI_NETLINK is not set | ||
410 | |||
411 | # | ||
412 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
413 | # | ||
276 | 414 | ||
277 | # | 415 | # |
278 | # Multi-device support (RAID and LVM) | 416 | # Multi-device support (RAID and LVM) |
@@ -282,79 +420,19 @@ CONFIG_IDE_GENERIC=y | |||
282 | # | 420 | # |
283 | # Fusion MPT device support | 421 | # Fusion MPT device support |
284 | # | 422 | # |
423 | # CONFIG_FUSION is not set | ||
285 | 424 | ||
286 | # | 425 | # |
287 | # IEEE 1394 (FireWire) support | 426 | # IEEE 1394 (FireWire) support |
288 | # | 427 | # |
289 | # CONFIG_IEEE1394 is not set | ||
290 | 428 | ||
291 | # | 429 | # |
292 | # I2O device support | 430 | # I2O device support |
293 | # | 431 | # |
294 | 432 | ||
295 | # | 433 | # |
296 | # Networking support | 434 | # Network device support |
297 | # | 435 | # |
298 | CONFIG_NET=y | ||
299 | |||
300 | # | ||
301 | # Networking options | ||
302 | # | ||
303 | # CONFIG_PACKET is not set | ||
304 | CONFIG_UNIX=y | ||
305 | # CONFIG_NET_KEY is not set | ||
306 | CONFIG_INET=y | ||
307 | # CONFIG_IP_MULTICAST is not set | ||
308 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
309 | CONFIG_IP_PNP=y | ||
310 | CONFIG_IP_PNP_DHCP=y | ||
311 | # CONFIG_IP_PNP_BOOTP is not set | ||
312 | # CONFIG_IP_PNP_RARP is not set | ||
313 | # CONFIG_NET_IPIP is not set | ||
314 | # CONFIG_NET_IPGRE is not set | ||
315 | # CONFIG_ARPD is not set | ||
316 | # CONFIG_SYN_COOKIES is not set | ||
317 | # CONFIG_INET_AH is not set | ||
318 | # CONFIG_INET_ESP is not set | ||
319 | # CONFIG_INET_IPCOMP is not set | ||
320 | # CONFIG_INET_TUNNEL is not set | ||
321 | CONFIG_IP_TCPDIAG=y | ||
322 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
323 | # CONFIG_IPV6 is not set | ||
324 | # CONFIG_NETFILTER is not set | ||
325 | |||
326 | # | ||
327 | # SCTP Configuration (EXPERIMENTAL) | ||
328 | # | ||
329 | # CONFIG_IP_SCTP is not set | ||
330 | # CONFIG_ATM is not set | ||
331 | # CONFIG_BRIDGE is not set | ||
332 | # CONFIG_VLAN_8021Q is not set | ||
333 | # CONFIG_DECNET is not set | ||
334 | # CONFIG_LLC2 is not set | ||
335 | # CONFIG_IPX is not set | ||
336 | # CONFIG_ATALK is not set | ||
337 | # CONFIG_X25 is not set | ||
338 | # CONFIG_LAPB is not set | ||
339 | # CONFIG_NET_DIVERT is not set | ||
340 | # CONFIG_ECONET is not set | ||
341 | # CONFIG_WAN_ROUTER is not set | ||
342 | |||
343 | # | ||
344 | # QoS and/or fair queueing | ||
345 | # | ||
346 | # CONFIG_NET_SCHED is not set | ||
347 | # CONFIG_NET_CLS_ROUTE is not set | ||
348 | |||
349 | # | ||
350 | # Network testing | ||
351 | # | ||
352 | # CONFIG_NET_PKTGEN is not set | ||
353 | # CONFIG_NETPOLL is not set | ||
354 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
355 | # CONFIG_HAMRADIO is not set | ||
356 | # CONFIG_IRDA is not set | ||
357 | # CONFIG_BT is not set | ||
358 | CONFIG_NETDEVICES=y | 436 | CONFIG_NETDEVICES=y |
359 | # CONFIG_DUMMY is not set | 437 | # CONFIG_DUMMY is not set |
360 | # CONFIG_BONDING is not set | 438 | # CONFIG_BONDING is not set |
@@ -362,6 +440,11 @@ CONFIG_NETDEVICES=y | |||
362 | # CONFIG_TUN is not set | 440 | # CONFIG_TUN is not set |
363 | 441 | ||
364 | # | 442 | # |
443 | # PHY device support | ||
444 | # | ||
445 | # CONFIG_PHYLIB is not set | ||
446 | |||
447 | # | ||
365 | # Ethernet (10 or 100Mbit) | 448 | # Ethernet (10 or 100Mbit) |
366 | # | 449 | # |
367 | CONFIG_NET_ETHERNET=y | 450 | CONFIG_NET_ETHERNET=y |
@@ -399,6 +482,8 @@ CONFIG_SMC91X=y | |||
399 | # CONFIG_SLIP is not set | 482 | # CONFIG_SLIP is not set |
400 | # CONFIG_SHAPER is not set | 483 | # CONFIG_SHAPER is not set |
401 | # CONFIG_NETCONSOLE is not set | 484 | # CONFIG_NETCONSOLE is not set |
485 | # CONFIG_NETPOLL is not set | ||
486 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
402 | 487 | ||
403 | # | 488 | # |
404 | # ISDN subsystem | 489 | # ISDN subsystem |
@@ -414,6 +499,7 @@ CONFIG_SMC91X=y | |||
414 | # Input device support | 499 | # Input device support |
415 | # | 500 | # |
416 | CONFIG_INPUT=y | 501 | CONFIG_INPUT=y |
502 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
417 | 503 | ||
418 | # | 504 | # |
419 | # Userland interfaces | 505 | # Userland interfaces |
@@ -445,7 +531,6 @@ CONFIG_SERIO=y | |||
445 | # CONFIG_SERIO_LIBPS2 is not set | 531 | # CONFIG_SERIO_LIBPS2 is not set |
446 | # CONFIG_SERIO_RAW is not set | 532 | # CONFIG_SERIO_RAW is not set |
447 | # CONFIG_GAMEPORT is not set | 533 | # CONFIG_GAMEPORT is not set |
448 | CONFIG_SOUND_GAMEPORT=y | ||
449 | 534 | ||
450 | # | 535 | # |
451 | # Character devices | 536 | # Character devices |
@@ -465,7 +550,6 @@ CONFIG_SERIAL_CORE=y | |||
465 | CONFIG_SERIAL_CORE_CONSOLE=y | 550 | CONFIG_SERIAL_CORE_CONSOLE=y |
466 | CONFIG_SERIAL_M32R_SIO=y | 551 | CONFIG_SERIAL_M32R_SIO=y |
467 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | 552 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y |
468 | # CONFIG_SERIAL_M32R_PLDSIO is not set | ||
469 | CONFIG_UNIX98_PTYS=y | 553 | CONFIG_UNIX98_PTYS=y |
470 | CONFIG_LEGACY_PTYS=y | 554 | CONFIG_LEGACY_PTYS=y |
471 | CONFIG_LEGACY_PTY_COUNT=256 | 555 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -479,25 +563,27 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
479 | # Watchdog Cards | 563 | # Watchdog Cards |
480 | # | 564 | # |
481 | # CONFIG_WATCHDOG is not set | 565 | # CONFIG_WATCHDOG is not set |
566 | CONFIG_HW_RANDOM=y | ||
482 | # CONFIG_RTC is not set | 567 | # CONFIG_RTC is not set |
483 | # CONFIG_GEN_RTC is not set | ||
484 | # CONFIG_DTLK is not set | 568 | # CONFIG_DTLK is not set |
485 | # CONFIG_R3964 is not set | 569 | # CONFIG_R3964 is not set |
486 | 570 | ||
487 | # | 571 | # |
488 | # Ftape, the floppy tape device driver | 572 | # Ftape, the floppy tape device driver |
489 | # | 573 | # |
490 | # CONFIG_DRM is not set | ||
491 | 574 | ||
492 | # | 575 | # |
493 | # PCMCIA character devices | 576 | # PCMCIA character devices |
494 | # | 577 | # |
495 | # CONFIG_SYNCLINK_CS is not set | 578 | # CONFIG_SYNCLINK_CS is not set |
579 | # CONFIG_CARDMAN_4000 is not set | ||
580 | # CONFIG_CARDMAN_4040 is not set | ||
496 | # CONFIG_RAW_DRIVER is not set | 581 | # CONFIG_RAW_DRIVER is not set |
497 | 582 | ||
498 | # | 583 | # |
499 | # TPM devices | 584 | # TPM devices |
500 | # | 585 | # |
586 | # CONFIG_TCG_TPM is not set | ||
501 | 587 | ||
502 | # | 588 | # |
503 | # I2C support | 589 | # I2C support |
@@ -505,13 +591,25 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
505 | # CONFIG_I2C is not set | 591 | # CONFIG_I2C is not set |
506 | 592 | ||
507 | # | 593 | # |
594 | # SPI support | ||
595 | # | ||
596 | # CONFIG_SPI is not set | ||
597 | # CONFIG_SPI_MASTER is not set | ||
598 | |||
599 | # | ||
508 | # Dallas's 1-wire bus | 600 | # Dallas's 1-wire bus |
509 | # | 601 | # |
510 | # CONFIG_W1 is not set | 602 | # CONFIG_W1 is not set |
511 | 603 | ||
512 | # | 604 | # |
513 | # Misc devices | 605 | # Hardware Monitoring support |
514 | # | 606 | # |
607 | CONFIG_HWMON=y | ||
608 | # CONFIG_HWMON_VID is not set | ||
609 | # CONFIG_SENSORS_ABITUGURU is not set | ||
610 | # CONFIG_SENSORS_F71805F is not set | ||
611 | # CONFIG_SENSORS_VT1211 is not set | ||
612 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
515 | 613 | ||
516 | # | 614 | # |
517 | # Multimedia devices | 615 | # Multimedia devices |
@@ -526,7 +624,9 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
526 | # | 624 | # |
527 | # Graphics support | 625 | # Graphics support |
528 | # | 626 | # |
627 | CONFIG_FIRMWARE_EDID=y | ||
529 | # CONFIG_FB is not set | 628 | # CONFIG_FB is not set |
629 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
530 | 630 | ||
531 | # | 631 | # |
532 | # Sound | 632 | # Sound |
@@ -538,6 +638,11 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
538 | # | 638 | # |
539 | # CONFIG_USB_ARCH_HAS_HCD is not set | 639 | # CONFIG_USB_ARCH_HAS_HCD is not set |
540 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 640 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
641 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
642 | |||
643 | # | ||
644 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
645 | # | ||
541 | 646 | ||
542 | # | 647 | # |
543 | # USB Gadget Support | 648 | # USB Gadget Support |
@@ -550,35 +655,73 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
550 | # CONFIG_MMC is not set | 655 | # CONFIG_MMC is not set |
551 | 656 | ||
552 | # | 657 | # |
658 | # LED devices | ||
659 | # | ||
660 | # CONFIG_NEW_LEDS is not set | ||
661 | |||
662 | # | ||
663 | # LED drivers | ||
664 | # | ||
665 | |||
666 | # | ||
667 | # LED Triggers | ||
668 | # | ||
669 | |||
670 | # | ||
553 | # InfiniBand support | 671 | # InfiniBand support |
554 | # | 672 | # |
555 | # CONFIG_INFINIBAND is not set | 673 | |
674 | # | ||
675 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
676 | # | ||
677 | |||
678 | # | ||
679 | # Real Time Clock | ||
680 | # | ||
681 | # CONFIG_RTC_CLASS is not set | ||
682 | |||
683 | # | ||
684 | # DMA Engine support | ||
685 | # | ||
686 | # CONFIG_DMA_ENGINE is not set | ||
687 | |||
688 | # | ||
689 | # DMA Clients | ||
690 | # | ||
691 | |||
692 | # | ||
693 | # DMA Devices | ||
694 | # | ||
556 | 695 | ||
557 | # | 696 | # |
558 | # File systems | 697 | # File systems |
559 | # | 698 | # |
560 | CONFIG_EXT2_FS=y | 699 | CONFIG_EXT2_FS=y |
561 | # CONFIG_EXT2_FS_XATTR is not set | 700 | # CONFIG_EXT2_FS_XATTR is not set |
701 | # CONFIG_EXT2_FS_XIP is not set | ||
562 | CONFIG_EXT3_FS=y | 702 | CONFIG_EXT3_FS=y |
563 | CONFIG_EXT3_FS_XATTR=y | 703 | CONFIG_EXT3_FS_XATTR=y |
564 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 704 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
565 | # CONFIG_EXT3_FS_SECURITY is not set | 705 | # CONFIG_EXT3_FS_SECURITY is not set |
706 | # CONFIG_EXT4DEV_FS is not set | ||
566 | CONFIG_JBD=y | 707 | CONFIG_JBD=y |
567 | # CONFIG_JBD_DEBUG is not set | 708 | # CONFIG_JBD_DEBUG is not set |
568 | CONFIG_FS_MBCACHE=y | 709 | CONFIG_FS_MBCACHE=y |
569 | # CONFIG_REISERFS_FS is not set | 710 | # CONFIG_REISERFS_FS is not set |
570 | # CONFIG_JFS_FS is not set | 711 | # CONFIG_JFS_FS is not set |
571 | 712 | # CONFIG_FS_POSIX_ACL is not set | |
572 | # | ||
573 | # XFS support | ||
574 | # | ||
575 | # CONFIG_XFS_FS is not set | 713 | # CONFIG_XFS_FS is not set |
714 | # CONFIG_GFS2_FS is not set | ||
715 | # CONFIG_OCFS2_FS is not set | ||
576 | # CONFIG_MINIX_FS is not set | 716 | # CONFIG_MINIX_FS is not set |
577 | CONFIG_ROMFS_FS=y | 717 | CONFIG_ROMFS_FS=y |
718 | CONFIG_INOTIFY=y | ||
719 | CONFIG_INOTIFY_USER=y | ||
578 | # CONFIG_QUOTA is not set | 720 | # CONFIG_QUOTA is not set |
579 | CONFIG_DNOTIFY=y | 721 | CONFIG_DNOTIFY=y |
580 | # CONFIG_AUTOFS_FS is not set | 722 | # CONFIG_AUTOFS_FS is not set |
581 | # CONFIG_AUTOFS4_FS is not set | 723 | # CONFIG_AUTOFS4_FS is not set |
724 | # CONFIG_FUSE_FS is not set | ||
582 | 725 | ||
583 | # | 726 | # |
584 | # CD-ROM/DVD Filesystems | 727 | # CD-ROM/DVD Filesystems |
@@ -603,16 +746,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
603 | # | 746 | # |
604 | CONFIG_PROC_FS=y | 747 | CONFIG_PROC_FS=y |
605 | CONFIG_PROC_KCORE=y | 748 | CONFIG_PROC_KCORE=y |
749 | CONFIG_PROC_SYSCTL=y | ||
606 | CONFIG_SYSFS=y | 750 | CONFIG_SYSFS=y |
607 | CONFIG_DEVFS_FS=y | ||
608 | CONFIG_DEVFS_MOUNT=y | ||
609 | # CONFIG_DEVFS_DEBUG is not set | ||
610 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
611 | CONFIG_TMPFS=y | 751 | CONFIG_TMPFS=y |
612 | # CONFIG_TMPFS_XATTR is not set | 752 | # CONFIG_TMPFS_POSIX_ACL is not set |
613 | # CONFIG_HUGETLBFS is not set | ||
614 | # CONFIG_HUGETLB_PAGE is not set | 753 | # CONFIG_HUGETLB_PAGE is not set |
615 | CONFIG_RAMFS=y | 754 | CONFIG_RAMFS=y |
755 | # CONFIG_CONFIGFS_FS is not set | ||
616 | 756 | ||
617 | # | 757 | # |
618 | # Miscellaneous filesystems | 758 | # Miscellaneous filesystems |
@@ -629,8 +769,9 @@ CONFIG_JFFS_FS_VERBOSE=0 | |||
629 | CONFIG_JFFS_PROC_FS=y | 769 | CONFIG_JFFS_PROC_FS=y |
630 | CONFIG_JFFS2_FS=y | 770 | CONFIG_JFFS2_FS=y |
631 | CONFIG_JFFS2_FS_DEBUG=0 | 771 | CONFIG_JFFS2_FS_DEBUG=0 |
632 | # CONFIG_JFFS2_FS_NAND is not set | 772 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
633 | # CONFIG_JFFS2_FS_NOR_ECC is not set | 773 | # CONFIG_JFFS2_SUMMARY is not set |
774 | # CONFIG_JFFS2_FS_XATTR is not set | ||
634 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 775 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
635 | CONFIG_JFFS2_ZLIB=y | 776 | CONFIG_JFFS2_ZLIB=y |
636 | CONFIG_JFFS2_RTIME=y | 777 | CONFIG_JFFS2_RTIME=y |
@@ -647,12 +788,14 @@ CONFIG_JFFS2_RTIME=y | |||
647 | # | 788 | # |
648 | CONFIG_NFS_FS=y | 789 | CONFIG_NFS_FS=y |
649 | CONFIG_NFS_V3=y | 790 | CONFIG_NFS_V3=y |
791 | # CONFIG_NFS_V3_ACL is not set | ||
650 | # CONFIG_NFS_V4 is not set | 792 | # CONFIG_NFS_V4 is not set |
651 | # CONFIG_NFS_DIRECTIO is not set | 793 | # CONFIG_NFS_DIRECTIO is not set |
652 | # CONFIG_NFSD is not set | 794 | # CONFIG_NFSD is not set |
653 | CONFIG_ROOT_NFS=y | 795 | CONFIG_ROOT_NFS=y |
654 | CONFIG_LOCKD=y | 796 | CONFIG_LOCKD=y |
655 | CONFIG_LOCKD_V4=y | 797 | CONFIG_LOCKD_V4=y |
798 | CONFIG_NFS_COMMON=y | ||
656 | CONFIG_SUNRPC=y | 799 | CONFIG_SUNRPC=y |
657 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 800 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
658 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 801 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -661,6 +804,7 @@ CONFIG_SUNRPC=y | |||
661 | # CONFIG_NCP_FS is not set | 804 | # CONFIG_NCP_FS is not set |
662 | # CONFIG_CODA_FS is not set | 805 | # CONFIG_CODA_FS is not set |
663 | # CONFIG_AFS_FS is not set | 806 | # CONFIG_AFS_FS is not set |
807 | # CONFIG_9P_FS is not set | ||
664 | 808 | ||
665 | # | 809 | # |
666 | # Partition Types | 810 | # Partition Types |
@@ -721,10 +865,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
721 | # Kernel hacking | 865 | # Kernel hacking |
722 | # | 866 | # |
723 | # CONFIG_PRINTK_TIME is not set | 867 | # CONFIG_PRINTK_TIME is not set |
868 | CONFIG_ENABLE_MUST_CHECK=y | ||
869 | # CONFIG_MAGIC_SYSRQ is not set | ||
870 | # CONFIG_UNUSED_SYMBOLS is not set | ||
724 | # CONFIG_DEBUG_KERNEL is not set | 871 | # CONFIG_DEBUG_KERNEL is not set |
725 | CONFIG_LOG_BUF_SHIFT=15 | 872 | CONFIG_LOG_BUF_SHIFT=15 |
726 | # CONFIG_DEBUG_BUGVERBOSE is not set | 873 | # CONFIG_DEBUG_BUGVERBOSE is not set |
874 | # CONFIG_DEBUG_FS is not set | ||
727 | # CONFIG_FRAME_POINTER is not set | 875 | # CONFIG_FRAME_POINTER is not set |
876 | # CONFIG_UNWIND_INFO is not set | ||
877 | # CONFIG_HEADERS_CHECK is not set | ||
728 | 878 | ||
729 | # | 879 | # |
730 | # Security options | 880 | # Security options |
@@ -738,13 +888,10 @@ CONFIG_LOG_BUF_SHIFT=15 | |||
738 | # CONFIG_CRYPTO is not set | 888 | # CONFIG_CRYPTO is not set |
739 | 889 | ||
740 | # | 890 | # |
741 | # Hardware crypto devices | ||
742 | # | ||
743 | |||
744 | # | ||
745 | # Library routines | 891 | # Library routines |
746 | # | 892 | # |
747 | # CONFIG_CRC_CCITT is not set | 893 | # CONFIG_CRC_CCITT is not set |
894 | # CONFIG_CRC16 is not set | ||
748 | CONFIG_CRC32=y | 895 | CONFIG_CRC32=y |
749 | # CONFIG_LIBCRC32C is not set | 896 | # CONFIG_LIBCRC32C is not set |
750 | CONFIG_ZLIB_INFLATE=y | 897 | CONFIG_ZLIB_INFLATE=y |
diff --git a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c index 03fc4c858e0e..9880abac3f54 100644 --- a/arch/m32r/mm/fault-nommu.c +++ b/arch/m32r/mm/fault-nommu.c | |||
@@ -7,8 +7,6 @@ | |||
7 | * Copyright (C) 1995 Linus Torvalds | 7 | * Copyright (C) 1995 Linus Torvalds |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* $Id: fault-nommu.c,v 1.1 2004/03/30 06:40:59 sakugawa Exp $ */ | ||
11 | |||
12 | #include <linux/signal.h> | 10 | #include <linux/signal.h> |
13 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
14 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
@@ -46,32 +44,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS]; | |||
46 | #define tlb_entry_d tlb_entry_d_dat[smp_processor_id()] | 44 | #define tlb_entry_d tlb_entry_d_dat[smp_processor_id()] |
47 | #endif | 45 | #endif |
48 | 46 | ||
49 | /* | ||
50 | * Unlock any spinlocks which will prevent us from getting the | ||
51 | * message out | ||
52 | */ | ||
53 | void bust_spinlocks(int yes) | ||
54 | { | ||
55 | int loglevel_save = console_loglevel; | ||
56 | |||
57 | if (yes) { | ||
58 | oops_in_progress = 1; | ||
59 | return; | ||
60 | } | ||
61 | #ifdef CONFIG_VT | ||
62 | unblank_screen(); | ||
63 | #endif | ||
64 | oops_in_progress = 0; | ||
65 | /* | ||
66 | * OK, the message is on the console. Now we call printk() | ||
67 | * without oops_in_progress set so that printk will give klogd | ||
68 | * a poke. Hold onto your hats... | ||
69 | */ | ||
70 | console_loglevel = 15; /* NMI oopser may have shut the console up */ | ||
71 | printk(" "); | ||
72 | console_loglevel = loglevel_save; | ||
73 | } | ||
74 | |||
75 | void do_BUG(const char *file, int line) | 47 | void do_BUG(const char *file, int line) |
76 | { | 48 | { |
77 | bust_spinlocks(1); | 49 | bust_spinlocks(1); |
@@ -161,4 +133,3 @@ void local_flush_tlb_all(void) | |||
161 | { | 133 | { |
162 | BUG(); | 134 | BUG(); |
163 | } | 135 | } |
164 | |||
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index 9b9feb0f1610..037d58e82fb5 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c | |||
@@ -49,32 +49,6 @@ unsigned int tlb_entry_d_dat[NR_CPUS]; | |||
49 | 49 | ||
50 | extern void init_tlb(void); | 50 | extern void init_tlb(void); |
51 | 51 | ||
52 | /* | ||
53 | * Unlock any spinlocks which will prevent us from getting the | ||
54 | * message out | ||
55 | */ | ||
56 | void bust_spinlocks(int yes) | ||
57 | { | ||
58 | int loglevel_save = console_loglevel; | ||
59 | |||
60 | if (yes) { | ||
61 | oops_in_progress = 1; | ||
62 | return; | ||
63 | } | ||
64 | #ifdef CONFIG_VT | ||
65 | unblank_screen(); | ||
66 | #endif | ||
67 | oops_in_progress = 0; | ||
68 | /* | ||
69 | * OK, the message is on the console. Now we call printk() | ||
70 | * without oops_in_progress set so that printk will give klogd | ||
71 | * a poke. Hold onto your hats... | ||
72 | */ | ||
73 | console_loglevel = 15; /* NMI oopser may have shut the console up */ | ||
74 | printk(" "); | ||
75 | console_loglevel = loglevel_save; | ||
76 | } | ||
77 | |||
78 | /*======================================================================* | 52 | /*======================================================================* |
79 | * do_page_fault() | 53 | * do_page_fault() |
80 | *======================================================================* | 54 | *======================================================================* |
@@ -362,8 +336,10 @@ vmalloc_fault: | |||
362 | if (!pte_present(*pte_k)) | 336 | if (!pte_present(*pte_k)) |
363 | goto no_context; | 337 | goto no_context; |
364 | 338 | ||
365 | addr = (address & PAGE_MASK) | (error_code & ACE_INSTRUCTION); | 339 | addr = (address & PAGE_MASK); |
340 | set_thread_fault_code(error_code); | ||
366 | update_mmu_cache(NULL, addr, *pte_k); | 341 | update_mmu_cache(NULL, addr, *pte_k); |
342 | set_thread_fault_code(0); | ||
367 | return; | 343 | return; |
368 | } | 344 | } |
369 | } | 345 | } |
@@ -377,7 +353,7 @@ vmalloc_fault: | |||
377 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, | 353 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, |
378 | pte_t pte) | 354 | pte_t pte) |
379 | { | 355 | { |
380 | unsigned long *entry1, *entry2; | 356 | volatile unsigned long *entry1, *entry2; |
381 | unsigned long pte_data, flags; | 357 | unsigned long pte_data, flags; |
382 | unsigned int *entry_dat; | 358 | unsigned int *entry_dat; |
383 | int inst = get_thread_fault_code() & ACE_INSTRUCTION; | 359 | int inst = get_thread_fault_code() & ACE_INSTRUCTION; |
@@ -391,30 +367,26 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, | |||
391 | 367 | ||
392 | vaddr = (vaddr & PAGE_MASK) | get_asid(); | 368 | vaddr = (vaddr & PAGE_MASK) | get_asid(); |
393 | 369 | ||
370 | pte_data = pte_val(pte); | ||
371 | |||
394 | #ifdef CONFIG_CHIP_OPSP | 372 | #ifdef CONFIG_CHIP_OPSP |
395 | entry1 = (unsigned long *)ITLB_BASE; | 373 | entry1 = (unsigned long *)ITLB_BASE; |
396 | for(i = 0 ; i < NR_TLB_ENTRIES; i++) { | 374 | for (i = 0; i < NR_TLB_ENTRIES; i++) { |
397 | if(*entry1++ == vaddr) { | 375 | if (*entry1++ == vaddr) { |
398 | pte_data = pte_val(pte); | 376 | set_tlb_data(entry1, pte_data); |
399 | set_tlb_data(entry1, pte_data); | 377 | break; |
400 | break; | 378 | } |
401 | } | 379 | entry1++; |
402 | entry1++; | ||
403 | } | 380 | } |
404 | entry2 = (unsigned long *)DTLB_BASE; | 381 | entry2 = (unsigned long *)DTLB_BASE; |
405 | for(i = 0 ; i < NR_TLB_ENTRIES ; i++) { | 382 | for (i = 0; i < NR_TLB_ENTRIES; i++) { |
406 | if(*entry2++ == vaddr) { | 383 | if (*entry2++ == vaddr) { |
407 | pte_data = pte_val(pte); | 384 | set_tlb_data(entry2, pte_data); |
408 | set_tlb_data(entry2, pte_data); | 385 | break; |
409 | break; | 386 | } |
410 | } | 387 | entry2++; |
411 | entry2++; | ||
412 | } | 388 | } |
413 | local_irq_restore(flags); | ||
414 | return; | ||
415 | #else | 389 | #else |
416 | pte_data = pte_val(pte); | ||
417 | |||
418 | /* | 390 | /* |
419 | * Update TLB entries | 391 | * Update TLB entries |
420 | * entry1: ITLB entry address | 392 | * entry1: ITLB entry address |
@@ -439,6 +411,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr, | |||
439 | "i" (MSVA_offset), "i" (MTOP_offset), "i" (MIDXI_offset) | 411 | "i" (MSVA_offset), "i" (MTOP_offset), "i" (MIDXI_offset) |
440 | : "r4", "memory" | 412 | : "r4", "memory" |
441 | ); | 413 | ); |
414 | #endif | ||
442 | 415 | ||
443 | if ((!inst && entry2 >= DTLB_END) || (inst && entry1 >= ITLB_END)) | 416 | if ((!inst && entry2 >= DTLB_END) || (inst && entry1 >= ITLB_END)) |
444 | goto notfound; | 417 | goto notfound; |
@@ -482,7 +455,6 @@ notfound: | |||
482 | set_tlb_data(entry1, pte_data); | 455 | set_tlb_data(entry1, pte_data); |
483 | 456 | ||
484 | goto found; | 457 | goto found; |
485 | #endif | ||
486 | } | 458 | } |
487 | 459 | ||
488 | /*======================================================================* | 460 | /*======================================================================* |
diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S index 9a4d40b3d6a2..8bb74b10dca7 100644 --- a/arch/m32r/mm/mmu.S +++ b/arch/m32r/mm/mmu.S | |||
@@ -4,8 +4,6 @@ | |||
4 | * Copyright (C) 2001 by Hiroyuki Kondo | 4 | * Copyright (C) 2001 by Hiroyuki Kondo |
5 | */ | 5 | */ |
6 | 6 | ||
7 | /* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */ | ||
8 | |||
9 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
10 | #include <asm/assembler.h> | 8 | #include <asm/assembler.h> |
11 | #include <asm/smp.h> | 9 | #include <asm/smp.h> |
@@ -345,5 +343,4 @@ ENTRY(m32r_otlb_entrys) | |||
345 | 343 | ||
346 | #endif /* CONFIG_MMU */ | 344 | #endif /* CONFIG_MMU */ |
347 | 345 | ||
348 | .end | 346 | .end |
349 | |||
diff --git a/arch/m32r/oaks32r/defconfig.nommu b/arch/m32r/oaks32r/defconfig.nommu index 3f9fe519acb2..aaa00828e0d3 100644 --- a/arch/m32r/oaks32r/defconfig.nommu +++ b/arch/m32r/oaks32r/defconfig.nommu | |||
@@ -1,19 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:22:04 2005 | 4 | # Tue Dec 12 12:09:17 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 16 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 17 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 18 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
@@ -22,28 +21,35 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
22 | # General setup | 21 | # General setup |
23 | # | 22 | # |
24 | CONFIG_LOCALVERSION="" | 23 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | # CONFIG_SYSVIPC is not set | ||
25 | # CONFIG_POSIX_MQUEUE is not set | 26 | # CONFIG_POSIX_MQUEUE is not set |
26 | CONFIG_BSD_PROCESS_ACCT=y | 27 | CONFIG_BSD_PROCESS_ACCT=y |
27 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
28 | CONFIG_SYSCTL=y | 29 | # CONFIG_TASKSTATS is not set |
30 | # CONFIG_UTS_NS is not set | ||
29 | # CONFIG_AUDIT is not set | 31 | # CONFIG_AUDIT is not set |
30 | CONFIG_HOTPLUG=y | ||
31 | CONFIG_KOBJECT_UEVENT=y | ||
32 | # CONFIG_IKCONFIG is not set | 32 | # CONFIG_IKCONFIG is not set |
33 | CONFIG_SYSFS_DEPRECATED=y | ||
34 | # CONFIG_RELAY is not set | ||
35 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
37 | CONFIG_SYSCTL=y | ||
33 | CONFIG_EMBEDDED=y | 38 | CONFIG_EMBEDDED=y |
39 | CONFIG_SYSCTL_SYSCALL=y | ||
34 | # CONFIG_KALLSYMS is not set | 40 | # CONFIG_KALLSYMS is not set |
41 | CONFIG_HOTPLUG=y | ||
35 | CONFIG_PRINTK=y | 42 | CONFIG_PRINTK=y |
36 | CONFIG_BUG=y | 43 | CONFIG_BUG=y |
44 | CONFIG_ELF_CORE=y | ||
37 | CONFIG_BASE_FULL=y | 45 | CONFIG_BASE_FULL=y |
38 | # CONFIG_FUTEX is not set | 46 | # CONFIG_FUTEX is not set |
39 | # CONFIG_EPOLL is not set | 47 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 48 | CONFIG_SLAB=y |
41 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 49 | CONFIG_VM_EVENT_COUNTERS=y |
42 | CONFIG_CC_ALIGN_LABELS=0 | ||
43 | CONFIG_CC_ALIGN_LOOPS=0 | ||
44 | CONFIG_CC_ALIGN_JUMPS=0 | ||
45 | CONFIG_TINY_SHMEM=y | 50 | CONFIG_TINY_SHMEM=y |
46 | CONFIG_BASE_SMALL=0 | 51 | CONFIG_BASE_SMALL=0 |
52 | # CONFIG_SLOB is not set | ||
47 | 53 | ||
48 | # | 54 | # |
49 | # Loadable module support | 55 | # Loadable module support |
@@ -51,12 +57,30 @@ CONFIG_BASE_SMALL=0 | |||
51 | CONFIG_MODULES=y | 57 | CONFIG_MODULES=y |
52 | CONFIG_MODULE_UNLOAD=y | 58 | CONFIG_MODULE_UNLOAD=y |
53 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 59 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
54 | CONFIG_OBSOLETE_MODPARM=y | ||
55 | # CONFIG_MODVERSIONS is not set | 60 | # CONFIG_MODVERSIONS is not set |
56 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 61 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
57 | CONFIG_KMOD=y | 62 | CONFIG_KMOD=y |
58 | 63 | ||
59 | # | 64 | # |
65 | # Block layer | ||
66 | # | ||
67 | CONFIG_BLOCK=y | ||
68 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
69 | |||
70 | # | ||
71 | # IO Schedulers | ||
72 | # | ||
73 | CONFIG_IOSCHED_NOOP=y | ||
74 | # CONFIG_IOSCHED_AS is not set | ||
75 | CONFIG_IOSCHED_DEADLINE=y | ||
76 | CONFIG_IOSCHED_CFQ=y | ||
77 | # CONFIG_DEFAULT_AS is not set | ||
78 | # CONFIG_DEFAULT_DEADLINE is not set | ||
79 | CONFIG_DEFAULT_CFQ=y | ||
80 | # CONFIG_DEFAULT_NOOP is not set | ||
81 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
82 | |||
83 | # | ||
60 | # Processor type and features | 84 | # Processor type and features |
61 | # | 85 | # |
62 | # CONFIG_PLAT_MAPPI is not set | 86 | # CONFIG_PLAT_MAPPI is not set |
@@ -66,8 +90,10 @@ CONFIG_KMOD=y | |||
66 | CONFIG_PLAT_OAKS32R=y | 90 | CONFIG_PLAT_OAKS32R=y |
67 | # CONFIG_PLAT_MAPPI2 is not set | 91 | # CONFIG_PLAT_MAPPI2 is not set |
68 | # CONFIG_PLAT_MAPPI3 is not set | 92 | # CONFIG_PLAT_MAPPI3 is not set |
93 | # CONFIG_PLAT_M32104UT is not set | ||
69 | # CONFIG_CHIP_M32700 is not set | 94 | # CONFIG_CHIP_M32700 is not set |
70 | CONFIG_CHIP_M32102=y | 95 | CONFIG_CHIP_M32102=y |
96 | # CONFIG_CHIP_M32104 is not set | ||
71 | # CONFIG_CHIP_VDEC2 is not set | 97 | # CONFIG_CHIP_VDEC2 is not set |
72 | # CONFIG_CHIP_OPSP is not set | 98 | # CONFIG_CHIP_OPSP is not set |
73 | CONFIG_ISA_M32R=y | 99 | CONFIG_ISA_M32R=y |
@@ -77,18 +103,31 @@ CONFIG_TIMER_DIVIDE=128 | |||
77 | CONFIG_MEMORY_START=0x01000000 | 103 | CONFIG_MEMORY_START=0x01000000 |
78 | CONFIG_MEMORY_SIZE=0x00800000 | 104 | CONFIG_MEMORY_SIZE=0x00800000 |
79 | CONFIG_NOHIGHMEM=y | 105 | CONFIG_NOHIGHMEM=y |
80 | # CONFIG_DISCONTIGMEM is not set | 106 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
107 | CONFIG_SELECT_MEMORY_MODEL=y | ||
108 | # CONFIG_FLATMEM_MANUAL is not set | ||
109 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
110 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
111 | CONFIG_DISCONTIGMEM=y | ||
112 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
113 | CONFIG_NEED_MULTIPLE_NODES=y | ||
114 | # CONFIG_SPARSEMEM_STATIC is not set | ||
115 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
116 | # CONFIG_RESOURCES_64BIT is not set | ||
117 | CONFIG_IRAM_START=0x00f00000 | ||
118 | CONFIG_IRAM_SIZE=0x00010000 | ||
81 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 119 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
82 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 120 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
121 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
122 | CONFIG_GENERIC_HWEIGHT=y | ||
83 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 123 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
84 | CONFIG_PREEMPT=y | 124 | CONFIG_PREEMPT=y |
85 | # CONFIG_HAVE_DEC_LOCK is not set | ||
86 | # CONFIG_SMP is not set | 125 | # CONFIG_SMP is not set |
126 | CONFIG_NODES_SHIFT=1 | ||
87 | 127 | ||
88 | # | 128 | # |
89 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 129 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
90 | # | 130 | # |
91 | # CONFIG_PCI is not set | ||
92 | # CONFIG_ISA is not set | 131 | # CONFIG_ISA is not set |
93 | 132 | ||
94 | # | 133 | # |
@@ -109,6 +148,94 @@ CONFIG_BINFMT_FLAT=y | |||
109 | # CONFIG_BINFMT_MISC is not set | 148 | # CONFIG_BINFMT_MISC is not set |
110 | 149 | ||
111 | # | 150 | # |
151 | # Networking | ||
152 | # | ||
153 | CONFIG_NET=y | ||
154 | |||
155 | # | ||
156 | # Networking options | ||
157 | # | ||
158 | # CONFIG_NETDEBUG is not set | ||
159 | CONFIG_PACKET=y | ||
160 | # CONFIG_PACKET_MMAP is not set | ||
161 | CONFIG_UNIX=y | ||
162 | CONFIG_XFRM=y | ||
163 | # CONFIG_XFRM_USER is not set | ||
164 | # CONFIG_XFRM_SUB_POLICY is not set | ||
165 | # CONFIG_NET_KEY is not set | ||
166 | CONFIG_INET=y | ||
167 | # CONFIG_IP_MULTICAST is not set | ||
168 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
169 | CONFIG_IP_FIB_HASH=y | ||
170 | CONFIG_IP_PNP=y | ||
171 | CONFIG_IP_PNP_DHCP=y | ||
172 | # CONFIG_IP_PNP_BOOTP is not set | ||
173 | # CONFIG_IP_PNP_RARP is not set | ||
174 | # CONFIG_NET_IPIP is not set | ||
175 | # CONFIG_NET_IPGRE is not set | ||
176 | # CONFIG_ARPD is not set | ||
177 | # CONFIG_SYN_COOKIES is not set | ||
178 | # CONFIG_INET_AH is not set | ||
179 | # CONFIG_INET_ESP is not set | ||
180 | # CONFIG_INET_IPCOMP is not set | ||
181 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
182 | # CONFIG_INET_TUNNEL is not set | ||
183 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
184 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
185 | CONFIG_INET_XFRM_MODE_BEET=y | ||
186 | CONFIG_INET_DIAG=y | ||
187 | CONFIG_INET_TCP_DIAG=y | ||
188 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
189 | CONFIG_TCP_CONG_CUBIC=y | ||
190 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
191 | # CONFIG_TCP_MD5SIG is not set | ||
192 | # CONFIG_IPV6 is not set | ||
193 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
194 | # CONFIG_INET6_TUNNEL is not set | ||
195 | # CONFIG_NETWORK_SECMARK is not set | ||
196 | # CONFIG_NETFILTER is not set | ||
197 | |||
198 | # | ||
199 | # DCCP Configuration (EXPERIMENTAL) | ||
200 | # | ||
201 | # CONFIG_IP_DCCP is not set | ||
202 | |||
203 | # | ||
204 | # SCTP Configuration (EXPERIMENTAL) | ||
205 | # | ||
206 | # CONFIG_IP_SCTP is not set | ||
207 | |||
208 | # | ||
209 | # TIPC Configuration (EXPERIMENTAL) | ||
210 | # | ||
211 | # CONFIG_TIPC is not set | ||
212 | # CONFIG_ATM is not set | ||
213 | # CONFIG_BRIDGE is not set | ||
214 | # CONFIG_VLAN_8021Q is not set | ||
215 | # CONFIG_DECNET is not set | ||
216 | # CONFIG_LLC2 is not set | ||
217 | # CONFIG_IPX is not set | ||
218 | # CONFIG_ATALK is not set | ||
219 | # CONFIG_X25 is not set | ||
220 | # CONFIG_LAPB is not set | ||
221 | # CONFIG_ECONET is not set | ||
222 | # CONFIG_WAN_ROUTER is not set | ||
223 | |||
224 | # | ||
225 | # QoS and/or fair queueing | ||
226 | # | ||
227 | # CONFIG_NET_SCHED is not set | ||
228 | |||
229 | # | ||
230 | # Network testing | ||
231 | # | ||
232 | # CONFIG_NET_PKTGEN is not set | ||
233 | # CONFIG_HAMRADIO is not set | ||
234 | # CONFIG_IRDA is not set | ||
235 | # CONFIG_BT is not set | ||
236 | # CONFIG_IEEE80211 is not set | ||
237 | |||
238 | # | ||
112 | # Device Drivers | 239 | # Device Drivers |
113 | # | 240 | # |
114 | 241 | ||
@@ -118,6 +245,12 @@ CONFIG_BINFMT_FLAT=y | |||
118 | CONFIG_STANDALONE=y | 245 | CONFIG_STANDALONE=y |
119 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 246 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
120 | # CONFIG_FW_LOADER is not set | 247 | # CONFIG_FW_LOADER is not set |
248 | # CONFIG_SYS_HYPERVISOR is not set | ||
249 | |||
250 | # | ||
251 | # Connector - unified userspace <-> kernelspace linker | ||
252 | # | ||
253 | # CONFIG_CONNECTOR is not set | ||
121 | 254 | ||
122 | # | 255 | # |
123 | # Memory Technology Devices (MTD) | 256 | # Memory Technology Devices (MTD) |
@@ -136,7 +269,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
136 | # | 269 | # |
137 | # Block devices | 270 | # Block devices |
138 | # | 271 | # |
139 | # CONFIG_BLK_DEV_FD is not set | ||
140 | # CONFIG_BLK_DEV_COW_COMMON is not set | 272 | # CONFIG_BLK_DEV_COW_COMMON is not set |
141 | CONFIG_BLK_DEV_LOOP=y | 273 | CONFIG_BLK_DEV_LOOP=y |
142 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 274 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -144,18 +276,15 @@ CONFIG_BLK_DEV_NBD=y | |||
144 | CONFIG_BLK_DEV_RAM=y | 276 | CONFIG_BLK_DEV_RAM=y |
145 | CONFIG_BLK_DEV_RAM_COUNT=16 | 277 | CONFIG_BLK_DEV_RAM_COUNT=16 |
146 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 278 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
279 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
147 | # CONFIG_BLK_DEV_INITRD is not set | 280 | # CONFIG_BLK_DEV_INITRD is not set |
148 | CONFIG_INITRAMFS_SOURCE="" | ||
149 | # CONFIG_CDROM_PKTCDVD is not set | 281 | # CONFIG_CDROM_PKTCDVD is not set |
282 | # CONFIG_ATA_OVER_ETH is not set | ||
150 | 283 | ||
151 | # | 284 | # |
152 | # IO Schedulers | 285 | # Misc devices |
153 | # | 286 | # |
154 | CONFIG_IOSCHED_NOOP=y | 287 | # CONFIG_TIFM_CORE is not set |
155 | # CONFIG_IOSCHED_AS is not set | ||
156 | CONFIG_IOSCHED_DEADLINE=y | ||
157 | CONFIG_IOSCHED_CFQ=y | ||
158 | # CONFIG_ATA_OVER_ETH is not set | ||
159 | 288 | ||
160 | # | 289 | # |
161 | # ATA/ATAPI/MFM/RLL support | 290 | # ATA/ATAPI/MFM/RLL support |
@@ -165,7 +294,13 @@ CONFIG_IOSCHED_CFQ=y | |||
165 | # | 294 | # |
166 | # SCSI device support | 295 | # SCSI device support |
167 | # | 296 | # |
297 | # CONFIG_RAID_ATTRS is not set | ||
168 | # CONFIG_SCSI is not set | 298 | # CONFIG_SCSI is not set |
299 | # CONFIG_SCSI_NETLINK is not set | ||
300 | |||
301 | # | ||
302 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
303 | # | ||
169 | 304 | ||
170 | # | 305 | # |
171 | # Multi-device support (RAID and LVM) | 306 | # Multi-device support (RAID and LVM) |
@@ -175,6 +310,7 @@ CONFIG_IOSCHED_CFQ=y | |||
175 | # | 310 | # |
176 | # Fusion MPT device support | 311 | # Fusion MPT device support |
177 | # | 312 | # |
313 | # CONFIG_FUSION is not set | ||
178 | 314 | ||
179 | # | 315 | # |
180 | # IEEE 1394 (FireWire) support | 316 | # IEEE 1394 (FireWire) support |
@@ -185,69 +321,8 @@ CONFIG_IOSCHED_CFQ=y | |||
185 | # | 321 | # |
186 | 322 | ||
187 | # | 323 | # |
188 | # Networking support | 324 | # Network device support |
189 | # | ||
190 | CONFIG_NET=y | ||
191 | |||
192 | # | ||
193 | # Networking options | ||
194 | # | ||
195 | CONFIG_PACKET=y | ||
196 | # CONFIG_PACKET_MMAP is not set | ||
197 | CONFIG_UNIX=y | ||
198 | # CONFIG_NET_KEY is not set | ||
199 | CONFIG_INET=y | ||
200 | # CONFIG_IP_MULTICAST is not set | ||
201 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
202 | CONFIG_IP_PNP=y | ||
203 | CONFIG_IP_PNP_DHCP=y | ||
204 | # CONFIG_IP_PNP_BOOTP is not set | ||
205 | # CONFIG_IP_PNP_RARP is not set | ||
206 | # CONFIG_NET_IPIP is not set | ||
207 | # CONFIG_NET_IPGRE is not set | ||
208 | # CONFIG_ARPD is not set | ||
209 | # CONFIG_SYN_COOKIES is not set | ||
210 | # CONFIG_INET_AH is not set | ||
211 | # CONFIG_INET_ESP is not set | ||
212 | # CONFIG_INET_IPCOMP is not set | ||
213 | # CONFIG_INET_TUNNEL is not set | ||
214 | CONFIG_IP_TCPDIAG=y | ||
215 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
216 | # CONFIG_IPV6 is not set | ||
217 | # CONFIG_NETFILTER is not set | ||
218 | |||
219 | # | ||
220 | # SCTP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_SCTP is not set | ||
223 | # CONFIG_ATM is not set | ||
224 | # CONFIG_BRIDGE is not set | ||
225 | # CONFIG_VLAN_8021Q is not set | ||
226 | # CONFIG_DECNET is not set | ||
227 | # CONFIG_LLC2 is not set | ||
228 | # CONFIG_IPX is not set | ||
229 | # CONFIG_ATALK is not set | ||
230 | # CONFIG_X25 is not set | ||
231 | # CONFIG_LAPB is not set | ||
232 | # CONFIG_NET_DIVERT is not set | ||
233 | # CONFIG_ECONET is not set | ||
234 | # CONFIG_WAN_ROUTER is not set | ||
235 | |||
236 | # | ||
237 | # QoS and/or fair queueing | ||
238 | # | ||
239 | # CONFIG_NET_SCHED is not set | ||
240 | # CONFIG_NET_CLS_ROUTE is not set | ||
241 | |||
242 | # | ||
243 | # Network testing | ||
244 | # | 325 | # |
245 | # CONFIG_NET_PKTGEN is not set | ||
246 | # CONFIG_NETPOLL is not set | ||
247 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
248 | # CONFIG_HAMRADIO is not set | ||
249 | # CONFIG_IRDA is not set | ||
250 | # CONFIG_BT is not set | ||
251 | CONFIG_NETDEVICES=y | 326 | CONFIG_NETDEVICES=y |
252 | # CONFIG_DUMMY is not set | 327 | # CONFIG_DUMMY is not set |
253 | # CONFIG_BONDING is not set | 328 | # CONFIG_BONDING is not set |
@@ -255,6 +330,10 @@ CONFIG_NETDEVICES=y | |||
255 | # CONFIG_TUN is not set | 330 | # CONFIG_TUN is not set |
256 | 331 | ||
257 | # | 332 | # |
333 | # PHY device support | ||
334 | # | ||
335 | |||
336 | # | ||
258 | # Ethernet (10 or 100Mbit) | 337 | # Ethernet (10 or 100Mbit) |
259 | # | 338 | # |
260 | # CONFIG_NET_ETHERNET is not set | 339 | # CONFIG_NET_ETHERNET is not set |
@@ -285,6 +364,8 @@ CONFIG_NE2000=y | |||
285 | # CONFIG_SLIP is not set | 364 | # CONFIG_SLIP is not set |
286 | # CONFIG_SHAPER is not set | 365 | # CONFIG_SHAPER is not set |
287 | # CONFIG_NETCONSOLE is not set | 366 | # CONFIG_NETCONSOLE is not set |
367 | # CONFIG_NETPOLL is not set | ||
368 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
288 | 369 | ||
289 | # | 370 | # |
290 | # ISDN subsystem | 371 | # ISDN subsystem |
@@ -300,6 +381,7 @@ CONFIG_NE2000=y | |||
300 | # Input device support | 381 | # Input device support |
301 | # | 382 | # |
302 | CONFIG_INPUT=y | 383 | CONFIG_INPUT=y |
384 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
303 | 385 | ||
304 | # | 386 | # |
305 | # Userland interfaces | 387 | # Userland interfaces |
@@ -328,7 +410,6 @@ CONFIG_SERIO_SERPORT=y | |||
328 | # CONFIG_SERIO_LIBPS2 is not set | 410 | # CONFIG_SERIO_LIBPS2 is not set |
329 | # CONFIG_SERIO_RAW is not set | 411 | # CONFIG_SERIO_RAW is not set |
330 | # CONFIG_GAMEPORT is not set | 412 | # CONFIG_GAMEPORT is not set |
331 | CONFIG_SOUND_GAMEPORT=y | ||
332 | 413 | ||
333 | # | 414 | # |
334 | # Character devices | 415 | # Character devices |
@@ -348,7 +429,6 @@ CONFIG_SERIAL_CORE=y | |||
348 | CONFIG_SERIAL_CORE_CONSOLE=y | 429 | CONFIG_SERIAL_CORE_CONSOLE=y |
349 | CONFIG_SERIAL_M32R_SIO=y | 430 | CONFIG_SERIAL_M32R_SIO=y |
350 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | 431 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y |
351 | # CONFIG_SERIAL_M32R_PLDSIO is not set | ||
352 | CONFIG_UNIX98_PTYS=y | 432 | CONFIG_UNIX98_PTYS=y |
353 | CONFIG_LEGACY_PTYS=y | 433 | CONFIG_LEGACY_PTYS=y |
354 | CONFIG_LEGACY_PTY_COUNT=256 | 434 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -362,20 +442,20 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
362 | # Watchdog Cards | 442 | # Watchdog Cards |
363 | # | 443 | # |
364 | # CONFIG_WATCHDOG is not set | 444 | # CONFIG_WATCHDOG is not set |
445 | CONFIG_HW_RANDOM=y | ||
365 | # CONFIG_RTC is not set | 446 | # CONFIG_RTC is not set |
366 | # CONFIG_GEN_RTC is not set | ||
367 | # CONFIG_DTLK is not set | 447 | # CONFIG_DTLK is not set |
368 | # CONFIG_R3964 is not set | 448 | # CONFIG_R3964 is not set |
369 | 449 | ||
370 | # | 450 | # |
371 | # Ftape, the floppy tape device driver | 451 | # Ftape, the floppy tape device driver |
372 | # | 452 | # |
373 | # CONFIG_DRM is not set | ||
374 | # CONFIG_RAW_DRIVER is not set | 453 | # CONFIG_RAW_DRIVER is not set |
375 | 454 | ||
376 | # | 455 | # |
377 | # TPM devices | 456 | # TPM devices |
378 | # | 457 | # |
458 | # CONFIG_TCG_TPM is not set | ||
379 | 459 | ||
380 | # | 460 | # |
381 | # I2C support | 461 | # I2C support |
@@ -383,13 +463,25 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
383 | # CONFIG_I2C is not set | 463 | # CONFIG_I2C is not set |
384 | 464 | ||
385 | # | 465 | # |
466 | # SPI support | ||
467 | # | ||
468 | # CONFIG_SPI is not set | ||
469 | # CONFIG_SPI_MASTER is not set | ||
470 | |||
471 | # | ||
386 | # Dallas's 1-wire bus | 472 | # Dallas's 1-wire bus |
387 | # | 473 | # |
388 | # CONFIG_W1 is not set | 474 | # CONFIG_W1 is not set |
389 | 475 | ||
390 | # | 476 | # |
391 | # Misc devices | 477 | # Hardware Monitoring support |
392 | # | 478 | # |
479 | CONFIG_HWMON=y | ||
480 | # CONFIG_HWMON_VID is not set | ||
481 | # CONFIG_SENSORS_ABITUGURU is not set | ||
482 | # CONFIG_SENSORS_F71805F is not set | ||
483 | # CONFIG_SENSORS_VT1211 is not set | ||
484 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
393 | 485 | ||
394 | # | 486 | # |
395 | # Multimedia devices | 487 | # Multimedia devices |
@@ -404,7 +496,9 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
404 | # | 496 | # |
405 | # Graphics support | 497 | # Graphics support |
406 | # | 498 | # |
499 | CONFIG_FIRMWARE_EDID=y | ||
407 | # CONFIG_FB is not set | 500 | # CONFIG_FB is not set |
501 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
408 | 502 | ||
409 | # | 503 | # |
410 | # Sound | 504 | # Sound |
@@ -416,6 +510,11 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
416 | # | 510 | # |
417 | # CONFIG_USB_ARCH_HAS_HCD is not set | 511 | # CONFIG_USB_ARCH_HAS_HCD is not set |
418 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 512 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
513 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
514 | |||
515 | # | ||
516 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
517 | # | ||
419 | 518 | ||
420 | # | 519 | # |
421 | # USB Gadget Support | 520 | # USB Gadget Support |
@@ -428,9 +527,43 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
428 | # CONFIG_MMC is not set | 527 | # CONFIG_MMC is not set |
429 | 528 | ||
430 | # | 529 | # |
530 | # LED devices | ||
531 | # | ||
532 | # CONFIG_NEW_LEDS is not set | ||
533 | |||
534 | # | ||
535 | # LED drivers | ||
536 | # | ||
537 | |||
538 | # | ||
539 | # LED Triggers | ||
540 | # | ||
541 | |||
542 | # | ||
431 | # InfiniBand support | 543 | # InfiniBand support |
432 | # | 544 | # |
433 | # CONFIG_INFINIBAND is not set | 545 | |
546 | # | ||
547 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
548 | # | ||
549 | |||
550 | # | ||
551 | # Real Time Clock | ||
552 | # | ||
553 | # CONFIG_RTC_CLASS is not set | ||
554 | |||
555 | # | ||
556 | # DMA Engine support | ||
557 | # | ||
558 | # CONFIG_DMA_ENGINE is not set | ||
559 | |||
560 | # | ||
561 | # DMA Clients | ||
562 | # | ||
563 | |||
564 | # | ||
565 | # DMA Devices | ||
566 | # | ||
434 | 567 | ||
435 | # | 568 | # |
436 | # File systems | 569 | # File systems |
@@ -438,20 +571,22 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
438 | CONFIG_EXT2_FS=y | 571 | CONFIG_EXT2_FS=y |
439 | # CONFIG_EXT2_FS_XATTR is not set | 572 | # CONFIG_EXT2_FS_XATTR is not set |
440 | # CONFIG_EXT3_FS is not set | 573 | # CONFIG_EXT3_FS is not set |
441 | # CONFIG_JBD is not set | 574 | # CONFIG_EXT4DEV_FS is not set |
442 | # CONFIG_REISERFS_FS is not set | 575 | # CONFIG_REISERFS_FS is not set |
443 | # CONFIG_JFS_FS is not set | 576 | # CONFIG_JFS_FS is not set |
444 | 577 | # CONFIG_FS_POSIX_ACL is not set | |
445 | # | ||
446 | # XFS support | ||
447 | # | ||
448 | # CONFIG_XFS_FS is not set | 578 | # CONFIG_XFS_FS is not set |
579 | # CONFIG_GFS2_FS is not set | ||
580 | # CONFIG_OCFS2_FS is not set | ||
449 | # CONFIG_MINIX_FS is not set | 581 | # CONFIG_MINIX_FS is not set |
450 | # CONFIG_ROMFS_FS is not set | 582 | # CONFIG_ROMFS_FS is not set |
583 | CONFIG_INOTIFY=y | ||
584 | CONFIG_INOTIFY_USER=y | ||
451 | # CONFIG_QUOTA is not set | 585 | # CONFIG_QUOTA is not set |
452 | CONFIG_DNOTIFY=y | 586 | CONFIG_DNOTIFY=y |
453 | # CONFIG_AUTOFS_FS is not set | 587 | # CONFIG_AUTOFS_FS is not set |
454 | # CONFIG_AUTOFS4_FS is not set | 588 | # CONFIG_AUTOFS4_FS is not set |
589 | # CONFIG_FUSE_FS is not set | ||
455 | 590 | ||
456 | # | 591 | # |
457 | # CD-ROM/DVD Filesystems | 592 | # CD-ROM/DVD Filesystems |
@@ -470,13 +605,12 @@ CONFIG_DNOTIFY=y | |||
470 | # Pseudo filesystems | 605 | # Pseudo filesystems |
471 | # | 606 | # |
472 | CONFIG_PROC_FS=y | 607 | CONFIG_PROC_FS=y |
608 | CONFIG_PROC_SYSCTL=y | ||
473 | CONFIG_SYSFS=y | 609 | CONFIG_SYSFS=y |
474 | # CONFIG_DEVFS_FS is not set | ||
475 | CONFIG_DEVPTS_FS_XATTR=y | ||
476 | CONFIG_DEVPTS_FS_SECURITY=y | ||
477 | # CONFIG_TMPFS is not set | 610 | # CONFIG_TMPFS is not set |
478 | # CONFIG_HUGETLB_PAGE is not set | 611 | # CONFIG_HUGETLB_PAGE is not set |
479 | CONFIG_RAMFS=y | 612 | CONFIG_RAMFS=y |
613 | # CONFIG_CONFIGFS_FS is not set | ||
480 | 614 | ||
481 | # | 615 | # |
482 | # Miscellaneous filesystems | 616 | # Miscellaneous filesystems |
@@ -500,12 +634,14 @@ CONFIG_RAMFS=y | |||
500 | # | 634 | # |
501 | CONFIG_NFS_FS=y | 635 | CONFIG_NFS_FS=y |
502 | CONFIG_NFS_V3=y | 636 | CONFIG_NFS_V3=y |
637 | # CONFIG_NFS_V3_ACL is not set | ||
503 | # CONFIG_NFS_V4 is not set | 638 | # CONFIG_NFS_V4 is not set |
504 | # CONFIG_NFS_DIRECTIO is not set | 639 | # CONFIG_NFS_DIRECTIO is not set |
505 | # CONFIG_NFSD is not set | 640 | # CONFIG_NFSD is not set |
506 | CONFIG_ROOT_NFS=y | 641 | CONFIG_ROOT_NFS=y |
507 | CONFIG_LOCKD=y | 642 | CONFIG_LOCKD=y |
508 | CONFIG_LOCKD_V4=y | 643 | CONFIG_LOCKD_V4=y |
644 | CONFIG_NFS_COMMON=y | ||
509 | CONFIG_SUNRPC=y | 645 | CONFIG_SUNRPC=y |
510 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 646 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
511 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 647 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -514,6 +650,7 @@ CONFIG_SUNRPC=y | |||
514 | # CONFIG_NCP_FS is not set | 650 | # CONFIG_NCP_FS is not set |
515 | # CONFIG_CODA_FS is not set | 651 | # CONFIG_CODA_FS is not set |
516 | # CONFIG_AFS_FS is not set | 652 | # CONFIG_AFS_FS is not set |
653 | # CONFIG_9P_FS is not set | ||
517 | 654 | ||
518 | # | 655 | # |
519 | # Partition Types | 656 | # Partition Types |
@@ -574,10 +711,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
574 | # Kernel hacking | 711 | # Kernel hacking |
575 | # | 712 | # |
576 | # CONFIG_PRINTK_TIME is not set | 713 | # CONFIG_PRINTK_TIME is not set |
714 | CONFIG_ENABLE_MUST_CHECK=y | ||
715 | # CONFIG_MAGIC_SYSRQ is not set | ||
716 | # CONFIG_UNUSED_SYMBOLS is not set | ||
577 | # CONFIG_DEBUG_KERNEL is not set | 717 | # CONFIG_DEBUG_KERNEL is not set |
578 | CONFIG_LOG_BUF_SHIFT=14 | 718 | CONFIG_LOG_BUF_SHIFT=14 |
579 | # CONFIG_DEBUG_BUGVERBOSE is not set | 719 | # CONFIG_DEBUG_BUGVERBOSE is not set |
720 | # CONFIG_DEBUG_FS is not set | ||
580 | # CONFIG_FRAME_POINTER is not set | 721 | # CONFIG_FRAME_POINTER is not set |
722 | # CONFIG_UNWIND_INFO is not set | ||
723 | # CONFIG_HEADERS_CHECK is not set | ||
581 | 724 | ||
582 | # | 725 | # |
583 | # Security options | 726 | # Security options |
@@ -591,12 +734,9 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
591 | # CONFIG_CRYPTO is not set | 734 | # CONFIG_CRYPTO is not set |
592 | 735 | ||
593 | # | 736 | # |
594 | # Hardware crypto devices | ||
595 | # | ||
596 | |||
597 | # | ||
598 | # Library routines | 737 | # Library routines |
599 | # | 738 | # |
600 | # CONFIG_CRC_CCITT is not set | 739 | # CONFIG_CRC_CCITT is not set |
740 | # CONFIG_CRC16 is not set | ||
601 | CONFIG_CRC32=y | 741 | CONFIG_CRC32=y |
602 | # CONFIG_LIBCRC32C is not set | 742 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/m32r/opsput/defconfig.opsput b/arch/m32r/opsput/defconfig.opsput index 66adec6a701a..461f95e72d17 100644 --- a/arch/m32r/opsput/defconfig.opsput +++ b/arch/m32r/opsput/defconfig.opsput | |||
@@ -1,19 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.12-rc5 | 3 | # Linux kernel version: 2.6.19 |
4 | # Fri Jun 3 16:22:06 2005 | 4 | # Wed Dec 13 18:34:36 2006 |
5 | # | 5 | # |
6 | CONFIG_M32R=y | 6 | CONFIG_M32R=y |
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | 7 | CONFIG_GENERIC_ISA_DMA=y |
9 | CONFIG_GENERIC_HARDIRQS=y | 8 | CONFIG_GENERIC_HARDIRQS=y |
10 | CONFIG_GENERIC_IRQ_PROBE=y | 9 | CONFIG_GENERIC_IRQ_PROBE=y |
10 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 11 | ||
12 | # | 12 | # |
13 | # Code maturity level options | 13 | # Code maturity level options |
14 | # | 14 | # |
15 | CONFIG_EXPERIMENTAL=y | 15 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 16 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 17 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
19 | 18 | ||
@@ -21,32 +20,39 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
21 | # General setup | 20 | # General setup |
22 | # | 21 | # |
23 | CONFIG_LOCALVERSION="" | 22 | CONFIG_LOCALVERSION="" |
23 | CONFIG_LOCALVERSION_AUTO=y | ||
24 | CONFIG_SWAP=y | 24 | CONFIG_SWAP=y |
25 | CONFIG_SYSVIPC=y | 25 | CONFIG_SYSVIPC=y |
26 | # CONFIG_IPC_NS is not set | ||
26 | # CONFIG_POSIX_MQUEUE is not set | 27 | # CONFIG_POSIX_MQUEUE is not set |
27 | CONFIG_BSD_PROCESS_ACCT=y | 28 | CONFIG_BSD_PROCESS_ACCT=y |
28 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 29 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
29 | CONFIG_SYSCTL=y | 30 | # CONFIG_TASKSTATS is not set |
31 | # CONFIG_UTS_NS is not set | ||
30 | # CONFIG_AUDIT is not set | 32 | # CONFIG_AUDIT is not set |
31 | CONFIG_HOTPLUG=y | ||
32 | CONFIG_KOBJECT_UEVENT=y | ||
33 | CONFIG_IKCONFIG=y | 33 | CONFIG_IKCONFIG=y |
34 | # CONFIG_IKCONFIG_PROC is not set | 34 | # CONFIG_IKCONFIG_PROC is not set |
35 | CONFIG_SYSFS_DEPRECATED=y | ||
36 | # CONFIG_RELAY is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
39 | CONFIG_SYSCTL=y | ||
35 | CONFIG_EMBEDDED=y | 40 | CONFIG_EMBEDDED=y |
41 | CONFIG_SYSCTL_SYSCALL=y | ||
36 | # CONFIG_KALLSYMS is not set | 42 | # CONFIG_KALLSYMS is not set |
43 | CONFIG_HOTPLUG=y | ||
37 | CONFIG_PRINTK=y | 44 | CONFIG_PRINTK=y |
38 | CONFIG_BUG=y | 45 | CONFIG_BUG=y |
46 | CONFIG_ELF_CORE=y | ||
39 | CONFIG_BASE_FULL=y | 47 | CONFIG_BASE_FULL=y |
40 | # CONFIG_FUTEX is not set | 48 | # CONFIG_FUTEX is not set |
41 | # CONFIG_EPOLL is not set | 49 | # CONFIG_EPOLL is not set |
42 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
43 | CONFIG_SHMEM=y | 50 | CONFIG_SHMEM=y |
44 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 51 | CONFIG_SLAB=y |
45 | CONFIG_CC_ALIGN_LABELS=0 | 52 | CONFIG_VM_EVENT_COUNTERS=y |
46 | CONFIG_CC_ALIGN_LOOPS=0 | ||
47 | CONFIG_CC_ALIGN_JUMPS=0 | ||
48 | # CONFIG_TINY_SHMEM is not set | 53 | # CONFIG_TINY_SHMEM is not set |
49 | CONFIG_BASE_SMALL=0 | 54 | CONFIG_BASE_SMALL=0 |
55 | # CONFIG_SLOB is not set | ||
50 | 56 | ||
51 | # | 57 | # |
52 | # Loadable module support | 58 | # Loadable module support |
@@ -54,12 +60,30 @@ CONFIG_BASE_SMALL=0 | |||
54 | CONFIG_MODULES=y | 60 | CONFIG_MODULES=y |
55 | CONFIG_MODULE_UNLOAD=y | 61 | CONFIG_MODULE_UNLOAD=y |
56 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 62 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
57 | CONFIG_OBSOLETE_MODPARM=y | ||
58 | # CONFIG_MODVERSIONS is not set | 63 | # CONFIG_MODVERSIONS is not set |
59 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 64 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
60 | CONFIG_KMOD=y | 65 | CONFIG_KMOD=y |
61 | 66 | ||
62 | # | 67 | # |
68 | # Block layer | ||
69 | # | ||
70 | CONFIG_BLOCK=y | ||
71 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
72 | |||
73 | # | ||
74 | # IO Schedulers | ||
75 | # | ||
76 | CONFIG_IOSCHED_NOOP=y | ||
77 | # CONFIG_IOSCHED_AS is not set | ||
78 | CONFIG_IOSCHED_DEADLINE=y | ||
79 | CONFIG_IOSCHED_CFQ=y | ||
80 | # CONFIG_DEFAULT_AS is not set | ||
81 | # CONFIG_DEFAULT_DEADLINE is not set | ||
82 | CONFIG_DEFAULT_CFQ=y | ||
83 | # CONFIG_DEFAULT_NOOP is not set | ||
84 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
85 | |||
86 | # | ||
63 | # Processor type and features | 87 | # Processor type and features |
64 | # | 88 | # |
65 | # CONFIG_PLAT_MAPPI is not set | 89 | # CONFIG_PLAT_MAPPI is not set |
@@ -69,8 +93,10 @@ CONFIG_PLAT_OPSPUT=y | |||
69 | # CONFIG_PLAT_OAKS32R is not set | 93 | # CONFIG_PLAT_OAKS32R is not set |
70 | # CONFIG_PLAT_MAPPI2 is not set | 94 | # CONFIG_PLAT_MAPPI2 is not set |
71 | # CONFIG_PLAT_MAPPI3 is not set | 95 | # CONFIG_PLAT_MAPPI3 is not set |
96 | # CONFIG_PLAT_M32104UT is not set | ||
72 | # CONFIG_CHIP_M32700 is not set | 97 | # CONFIG_CHIP_M32700 is not set |
73 | # CONFIG_CHIP_M32102 is not set | 98 | # CONFIG_CHIP_M32102 is not set |
99 | # CONFIG_CHIP_M32104 is not set | ||
74 | # CONFIG_CHIP_VDEC2 is not set | 100 | # CONFIG_CHIP_VDEC2 is not set |
75 | CONFIG_CHIP_OPSP=y | 101 | CONFIG_CHIP_OPSP=y |
76 | CONFIG_MMU=y | 102 | CONFIG_MMU=y |
@@ -84,17 +110,31 @@ CONFIG_TIMER_DIVIDE=128 | |||
84 | CONFIG_MEMORY_START=0x08000000 | 110 | CONFIG_MEMORY_START=0x08000000 |
85 | CONFIG_MEMORY_SIZE=0x01000000 | 111 | CONFIG_MEMORY_SIZE=0x01000000 |
86 | CONFIG_NOHIGHMEM=y | 112 | CONFIG_NOHIGHMEM=y |
87 | # CONFIG_DISCONTIGMEM is not set | 113 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y |
114 | CONFIG_SELECT_MEMORY_MODEL=y | ||
115 | # CONFIG_FLATMEM_MANUAL is not set | ||
116 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
117 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
118 | CONFIG_DISCONTIGMEM=y | ||
119 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
120 | CONFIG_NEED_MULTIPLE_NODES=y | ||
121 | # CONFIG_SPARSEMEM_STATIC is not set | ||
122 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
123 | # CONFIG_RESOURCES_64BIT is not set | ||
124 | CONFIG_IRAM_START=0x00f00000 | ||
125 | CONFIG_IRAM_SIZE=0x00010000 | ||
88 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 126 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
89 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 127 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
128 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
129 | CONFIG_GENERIC_HWEIGHT=y | ||
90 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 130 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
91 | # CONFIG_PREEMPT is not set | 131 | # CONFIG_PREEMPT is not set |
92 | # CONFIG_SMP is not set | 132 | # CONFIG_SMP is not set |
133 | CONFIG_NODES_SHIFT=1 | ||
93 | 134 | ||
94 | # | 135 | # |
95 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 136 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
96 | # | 137 | # |
97 | # CONFIG_PCI is not set | ||
98 | # CONFIG_ISA is not set | 138 | # CONFIG_ISA is not set |
99 | 139 | ||
100 | # | 140 | # |
@@ -103,13 +143,15 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
103 | CONFIG_PCCARD=y | 143 | CONFIG_PCCARD=y |
104 | # CONFIG_PCMCIA_DEBUG is not set | 144 | # CONFIG_PCMCIA_DEBUG is not set |
105 | CONFIG_PCMCIA=y | 145 | CONFIG_PCMCIA=y |
146 | CONFIG_PCMCIA_LOAD_CIS=y | ||
147 | CONFIG_PCMCIA_IOCTL=y | ||
106 | 148 | ||
107 | # | 149 | # |
108 | # PC-card bridges | 150 | # PC-card bridges |
109 | # | 151 | # |
110 | # CONFIG_TCIC is not set | ||
111 | CONFIG_M32R_CFC=y | 152 | CONFIG_M32R_CFC=y |
112 | CONFIG_M32R_CFC_NUM=1 | 153 | CONFIG_M32R_CFC_NUM=1 |
154 | CONFIG_PCCARD_NONSTATIC=y | ||
113 | 155 | ||
114 | # | 156 | # |
115 | # PCI Hotplug Support | 157 | # PCI Hotplug Support |
@@ -122,6 +164,94 @@ CONFIG_BINFMT_ELF=y | |||
122 | # CONFIG_BINFMT_MISC is not set | 164 | # CONFIG_BINFMT_MISC is not set |
123 | 165 | ||
124 | # | 166 | # |
167 | # Networking | ||
168 | # | ||
169 | CONFIG_NET=y | ||
170 | |||
171 | # | ||
172 | # Networking options | ||
173 | # | ||
174 | # CONFIG_NETDEBUG is not set | ||
175 | CONFIG_PACKET=y | ||
176 | # CONFIG_PACKET_MMAP is not set | ||
177 | CONFIG_UNIX=y | ||
178 | CONFIG_XFRM=y | ||
179 | # CONFIG_XFRM_USER is not set | ||
180 | # CONFIG_XFRM_SUB_POLICY is not set | ||
181 | # CONFIG_NET_KEY is not set | ||
182 | CONFIG_INET=y | ||
183 | # CONFIG_IP_MULTICAST is not set | ||
184 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
185 | CONFIG_IP_FIB_HASH=y | ||
186 | CONFIG_IP_PNP=y | ||
187 | CONFIG_IP_PNP_DHCP=y | ||
188 | # CONFIG_IP_PNP_BOOTP is not set | ||
189 | # CONFIG_IP_PNP_RARP is not set | ||
190 | # CONFIG_NET_IPIP is not set | ||
191 | # CONFIG_NET_IPGRE is not set | ||
192 | # CONFIG_ARPD is not set | ||
193 | # CONFIG_SYN_COOKIES is not set | ||
194 | # CONFIG_INET_AH is not set | ||
195 | # CONFIG_INET_ESP is not set | ||
196 | # CONFIG_INET_IPCOMP is not set | ||
197 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
198 | # CONFIG_INET_TUNNEL is not set | ||
199 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
200 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
201 | CONFIG_INET_XFRM_MODE_BEET=y | ||
202 | CONFIG_INET_DIAG=y | ||
203 | CONFIG_INET_TCP_DIAG=y | ||
204 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
205 | CONFIG_TCP_CONG_CUBIC=y | ||
206 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
207 | # CONFIG_TCP_MD5SIG is not set | ||
208 | # CONFIG_IPV6 is not set | ||
209 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
210 | # CONFIG_INET6_TUNNEL is not set | ||
211 | # CONFIG_NETWORK_SECMARK is not set | ||
212 | # CONFIG_NETFILTER is not set | ||
213 | |||
214 | # | ||
215 | # DCCP Configuration (EXPERIMENTAL) | ||
216 | # | ||
217 | # CONFIG_IP_DCCP is not set | ||
218 | |||
219 | # | ||
220 | # SCTP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_SCTP is not set | ||
223 | |||
224 | # | ||
225 | # TIPC Configuration (EXPERIMENTAL) | ||
226 | # | ||
227 | # CONFIG_TIPC is not set | ||
228 | # CONFIG_ATM is not set | ||
229 | # CONFIG_BRIDGE is not set | ||
230 | # CONFIG_VLAN_8021Q is not set | ||
231 | # CONFIG_DECNET is not set | ||
232 | # CONFIG_LLC2 is not set | ||
233 | # CONFIG_IPX is not set | ||
234 | # CONFIG_ATALK is not set | ||
235 | # CONFIG_X25 is not set | ||
236 | # CONFIG_LAPB is not set | ||
237 | # CONFIG_ECONET is not set | ||
238 | # CONFIG_WAN_ROUTER is not set | ||
239 | |||
240 | # | ||
241 | # QoS and/or fair queueing | ||
242 | # | ||
243 | # CONFIG_NET_SCHED is not set | ||
244 | |||
245 | # | ||
246 | # Network testing | ||
247 | # | ||
248 | # CONFIG_NET_PKTGEN is not set | ||
249 | # CONFIG_HAMRADIO is not set | ||
250 | # CONFIG_IRDA is not set | ||
251 | # CONFIG_BT is not set | ||
252 | # CONFIG_IEEE80211 is not set | ||
253 | |||
254 | # | ||
125 | # Device Drivers | 255 | # Device Drivers |
126 | # | 256 | # |
127 | 257 | ||
@@ -130,8 +260,14 @@ CONFIG_BINFMT_ELF=y | |||
130 | # | 260 | # |
131 | CONFIG_STANDALONE=y | 261 | CONFIG_STANDALONE=y |
132 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 262 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
133 | # CONFIG_FW_LOADER is not set | 263 | CONFIG_FW_LOADER=y |
134 | # CONFIG_DEBUG_DRIVER is not set | 264 | # CONFIG_DEBUG_DRIVER is not set |
265 | # CONFIG_SYS_HYPERVISOR is not set | ||
266 | |||
267 | # | ||
268 | # Connector - unified userspace <-> kernelspace linker | ||
269 | # | ||
270 | # CONFIG_CONNECTOR is not set | ||
135 | 271 | ||
136 | # | 272 | # |
137 | # Memory Technology Devices (MTD) | 273 | # Memory Technology Devices (MTD) |
@@ -150,7 +286,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
150 | # | 286 | # |
151 | # Block devices | 287 | # Block devices |
152 | # | 288 | # |
153 | # CONFIG_BLK_DEV_FD is not set | ||
154 | # CONFIG_BLK_DEV_COW_COMMON is not set | 289 | # CONFIG_BLK_DEV_COW_COMMON is not set |
155 | CONFIG_BLK_DEV_LOOP=y | 290 | CONFIG_BLK_DEV_LOOP=y |
156 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 291 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
@@ -158,18 +293,15 @@ CONFIG_BLK_DEV_LOOP=y | |||
158 | CONFIG_BLK_DEV_RAM=y | 293 | CONFIG_BLK_DEV_RAM=y |
159 | CONFIG_BLK_DEV_RAM_COUNT=16 | 294 | CONFIG_BLK_DEV_RAM_COUNT=16 |
160 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 295 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
296 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
161 | # CONFIG_BLK_DEV_INITRD is not set | 297 | # CONFIG_BLK_DEV_INITRD is not set |
162 | CONFIG_INITRAMFS_SOURCE="" | ||
163 | # CONFIG_CDROM_PKTCDVD is not set | 298 | # CONFIG_CDROM_PKTCDVD is not set |
299 | # CONFIG_ATA_OVER_ETH is not set | ||
164 | 300 | ||
165 | # | 301 | # |
166 | # IO Schedulers | 302 | # Misc devices |
167 | # | 303 | # |
168 | CONFIG_IOSCHED_NOOP=y | 304 | # CONFIG_TIFM_CORE is not set |
169 | # CONFIG_IOSCHED_AS is not set | ||
170 | CONFIG_IOSCHED_DEADLINE=y | ||
171 | CONFIG_IOSCHED_CFQ=y | ||
172 | # CONFIG_ATA_OVER_ETH is not set | ||
173 | 305 | ||
174 | # | 306 | # |
175 | # ATA/ATAPI/MFM/RLL support | 307 | # ATA/ATAPI/MFM/RLL support |
@@ -179,7 +311,9 @@ CONFIG_IOSCHED_CFQ=y | |||
179 | # | 311 | # |
180 | # SCSI device support | 312 | # SCSI device support |
181 | # | 313 | # |
314 | # CONFIG_RAID_ATTRS is not set | ||
182 | CONFIG_SCSI=m | 315 | CONFIG_SCSI=m |
316 | # CONFIG_SCSI_NETLINK is not set | ||
183 | CONFIG_SCSI_PROC_FS=y | 317 | CONFIG_SCSI_PROC_FS=y |
184 | 318 | ||
185 | # | 319 | # |
@@ -191,6 +325,7 @@ CONFIG_BLK_DEV_SD=m | |||
191 | CONFIG_BLK_DEV_SR=m | 325 | CONFIG_BLK_DEV_SR=m |
192 | # CONFIG_BLK_DEV_SR_VENDOR is not set | 326 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
193 | CONFIG_CHR_DEV_SG=m | 327 | CONFIG_CHR_DEV_SG=m |
328 | # CONFIG_CHR_DEV_SCH is not set | ||
194 | 329 | ||
195 | # | 330 | # |
196 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | 331 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs |
@@ -200,16 +335,18 @@ CONFIG_SCSI_MULTI_LUN=y | |||
200 | # CONFIG_SCSI_LOGGING is not set | 335 | # CONFIG_SCSI_LOGGING is not set |
201 | 336 | ||
202 | # | 337 | # |
203 | # SCSI Transport Attributes | 338 | # SCSI Transports |
204 | # | 339 | # |
205 | # CONFIG_SCSI_SPI_ATTRS is not set | 340 | # CONFIG_SCSI_SPI_ATTRS is not set |
206 | # CONFIG_SCSI_FC_ATTRS is not set | 341 | # CONFIG_SCSI_FC_ATTRS is not set |
207 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 342 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
343 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
344 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
208 | 345 | ||
209 | # | 346 | # |
210 | # SCSI low-level drivers | 347 | # SCSI low-level drivers |
211 | # | 348 | # |
212 | # CONFIG_SCSI_SATA is not set | 349 | # CONFIG_ISCSI_TCP is not set |
213 | # CONFIG_SCSI_DEBUG is not set | 350 | # CONFIG_SCSI_DEBUG is not set |
214 | 351 | ||
215 | # | 352 | # |
@@ -222,6 +359,10 @@ CONFIG_SCSI_MULTI_LUN=y | |||
222 | # CONFIG_PCMCIA_SYM53C500 is not set | 359 | # CONFIG_PCMCIA_SYM53C500 is not set |
223 | 360 | ||
224 | # | 361 | # |
362 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
363 | # | ||
364 | |||
365 | # | ||
225 | # Multi-device support (RAID and LVM) | 366 | # Multi-device support (RAID and LVM) |
226 | # | 367 | # |
227 | # CONFIG_MD is not set | 368 | # CONFIG_MD is not set |
@@ -229,6 +370,7 @@ CONFIG_SCSI_MULTI_LUN=y | |||
229 | # | 370 | # |
230 | # Fusion MPT device support | 371 | # Fusion MPT device support |
231 | # | 372 | # |
373 | # CONFIG_FUSION is not set | ||
232 | 374 | ||
233 | # | 375 | # |
234 | # IEEE 1394 (FireWire) support | 376 | # IEEE 1394 (FireWire) support |
@@ -239,69 +381,8 @@ CONFIG_SCSI_MULTI_LUN=y | |||
239 | # | 381 | # |
240 | 382 | ||
241 | # | 383 | # |
242 | # Networking support | 384 | # Network device support |
243 | # | ||
244 | CONFIG_NET=y | ||
245 | |||
246 | # | ||
247 | # Networking options | ||
248 | # | ||
249 | CONFIG_PACKET=y | ||
250 | # CONFIG_PACKET_MMAP is not set | ||
251 | CONFIG_UNIX=y | ||
252 | # CONFIG_NET_KEY is not set | ||
253 | CONFIG_INET=y | ||
254 | # CONFIG_IP_MULTICAST is not set | ||
255 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
256 | CONFIG_IP_PNP=y | ||
257 | CONFIG_IP_PNP_DHCP=y | ||
258 | # CONFIG_IP_PNP_BOOTP is not set | ||
259 | # CONFIG_IP_PNP_RARP is not set | ||
260 | # CONFIG_NET_IPIP is not set | ||
261 | # CONFIG_NET_IPGRE is not set | ||
262 | # CONFIG_ARPD is not set | ||
263 | # CONFIG_SYN_COOKIES is not set | ||
264 | # CONFIG_INET_AH is not set | ||
265 | # CONFIG_INET_ESP is not set | ||
266 | # CONFIG_INET_IPCOMP is not set | ||
267 | # CONFIG_INET_TUNNEL is not set | ||
268 | CONFIG_IP_TCPDIAG=y | ||
269 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
270 | # CONFIG_IPV6 is not set | ||
271 | # CONFIG_NETFILTER is not set | ||
272 | |||
273 | # | ||
274 | # SCTP Configuration (EXPERIMENTAL) | ||
275 | # | 385 | # |
276 | # CONFIG_IP_SCTP is not set | ||
277 | # CONFIG_ATM is not set | ||
278 | # CONFIG_BRIDGE is not set | ||
279 | # CONFIG_VLAN_8021Q is not set | ||
280 | # CONFIG_DECNET is not set | ||
281 | # CONFIG_LLC2 is not set | ||
282 | # CONFIG_IPX is not set | ||
283 | # CONFIG_ATALK is not set | ||
284 | # CONFIG_X25 is not set | ||
285 | # CONFIG_LAPB is not set | ||
286 | # CONFIG_NET_DIVERT is not set | ||
287 | # CONFIG_ECONET is not set | ||
288 | # CONFIG_WAN_ROUTER is not set | ||
289 | |||
290 | # | ||
291 | # QoS and/or fair queueing | ||
292 | # | ||
293 | # CONFIG_NET_SCHED is not set | ||
294 | # CONFIG_NET_CLS_ROUTE is not set | ||
295 | |||
296 | # | ||
297 | # Network testing | ||
298 | # | ||
299 | # CONFIG_NET_PKTGEN is not set | ||
300 | # CONFIG_NETPOLL is not set | ||
301 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
302 | # CONFIG_HAMRADIO is not set | ||
303 | # CONFIG_IRDA is not set | ||
304 | # CONFIG_BT is not set | ||
305 | CONFIG_NETDEVICES=y | 386 | CONFIG_NETDEVICES=y |
306 | # CONFIG_DUMMY is not set | 387 | # CONFIG_DUMMY is not set |
307 | # CONFIG_BONDING is not set | 388 | # CONFIG_BONDING is not set |
@@ -309,6 +390,11 @@ CONFIG_NETDEVICES=y | |||
309 | # CONFIG_TUN is not set | 390 | # CONFIG_TUN is not set |
310 | 391 | ||
311 | # | 392 | # |
393 | # PHY device support | ||
394 | # | ||
395 | # CONFIG_PHYLIB is not set | ||
396 | |||
397 | # | ||
312 | # Ethernet (10 or 100Mbit) | 398 | # Ethernet (10 or 100Mbit) |
313 | # | 399 | # |
314 | CONFIG_NET_ETHERNET=y | 400 | CONFIG_NET_ETHERNET=y |
@@ -346,6 +432,8 @@ CONFIG_SMC91X=y | |||
346 | # CONFIG_SLIP is not set | 432 | # CONFIG_SLIP is not set |
347 | # CONFIG_SHAPER is not set | 433 | # CONFIG_SHAPER is not set |
348 | # CONFIG_NETCONSOLE is not set | 434 | # CONFIG_NETCONSOLE is not set |
435 | # CONFIG_NETPOLL is not set | ||
436 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
349 | 437 | ||
350 | # | 438 | # |
351 | # ISDN subsystem | 439 | # ISDN subsystem |
@@ -361,6 +449,7 @@ CONFIG_SMC91X=y | |||
361 | # Input device support | 449 | # Input device support |
362 | # | 450 | # |
363 | CONFIG_INPUT=y | 451 | CONFIG_INPUT=y |
452 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
364 | 453 | ||
365 | # | 454 | # |
366 | # Userland interfaces | 455 | # Userland interfaces |
@@ -389,7 +478,6 @@ CONFIG_SERIO_SERPORT=y | |||
389 | # CONFIG_SERIO_LIBPS2 is not set | 478 | # CONFIG_SERIO_LIBPS2 is not set |
390 | # CONFIG_SERIO_RAW is not set | 479 | # CONFIG_SERIO_RAW is not set |
391 | # CONFIG_GAMEPORT is not set | 480 | # CONFIG_GAMEPORT is not set |
392 | CONFIG_SOUND_GAMEPORT=y | ||
393 | 481 | ||
394 | # | 482 | # |
395 | # Character devices | 483 | # Character devices |
@@ -423,8 +511,8 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
423 | # Watchdog Cards | 511 | # Watchdog Cards |
424 | # | 512 | # |
425 | # CONFIG_WATCHDOG is not set | 513 | # CONFIG_WATCHDOG is not set |
514 | CONFIG_HW_RANDOM=y | ||
426 | # CONFIG_RTC is not set | 515 | # CONFIG_RTC is not set |
427 | # CONFIG_GEN_RTC is not set | ||
428 | CONFIG_DS1302=y | 516 | CONFIG_DS1302=y |
429 | # CONFIG_DTLK is not set | 517 | # CONFIG_DTLK is not set |
430 | # CONFIG_R3964 is not set | 518 | # CONFIG_R3964 is not set |
@@ -432,17 +520,19 @@ CONFIG_DS1302=y | |||
432 | # | 520 | # |
433 | # Ftape, the floppy tape device driver | 521 | # Ftape, the floppy tape device driver |
434 | # | 522 | # |
435 | # CONFIG_DRM is not set | ||
436 | 523 | ||
437 | # | 524 | # |
438 | # PCMCIA character devices | 525 | # PCMCIA character devices |
439 | # | 526 | # |
440 | # CONFIG_SYNCLINK_CS is not set | 527 | # CONFIG_SYNCLINK_CS is not set |
528 | # CONFIG_CARDMAN_4000 is not set | ||
529 | # CONFIG_CARDMAN_4040 is not set | ||
441 | # CONFIG_RAW_DRIVER is not set | 530 | # CONFIG_RAW_DRIVER is not set |
442 | 531 | ||
443 | # | 532 | # |
444 | # TPM devices | 533 | # TPM devices |
445 | # | 534 | # |
535 | # CONFIG_TCG_TPM is not set | ||
446 | 536 | ||
447 | # | 537 | # |
448 | # I2C support | 538 | # I2C support |
@@ -450,13 +540,25 @@ CONFIG_DS1302=y | |||
450 | # CONFIG_I2C is not set | 540 | # CONFIG_I2C is not set |
451 | 541 | ||
452 | # | 542 | # |
543 | # SPI support | ||
544 | # | ||
545 | # CONFIG_SPI is not set | ||
546 | # CONFIG_SPI_MASTER is not set | ||
547 | |||
548 | # | ||
453 | # Dallas's 1-wire bus | 549 | # Dallas's 1-wire bus |
454 | # | 550 | # |
455 | # CONFIG_W1 is not set | 551 | # CONFIG_W1 is not set |
456 | 552 | ||
457 | # | 553 | # |
458 | # Misc devices | 554 | # Hardware Monitoring support |
459 | # | 555 | # |
556 | CONFIG_HWMON=y | ||
557 | # CONFIG_HWMON_VID is not set | ||
558 | # CONFIG_SENSORS_ABITUGURU is not set | ||
559 | # CONFIG_SENSORS_F71805F is not set | ||
560 | # CONFIG_SENSORS_VT1211 is not set | ||
561 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
460 | 562 | ||
461 | # | 563 | # |
462 | # Multimedia devices | 564 | # Multimedia devices |
@@ -471,7 +573,9 @@ CONFIG_DS1302=y | |||
471 | # | 573 | # |
472 | # Graphics support | 574 | # Graphics support |
473 | # | 575 | # |
576 | CONFIG_FIRMWARE_EDID=y | ||
474 | # CONFIG_FB is not set | 577 | # CONFIG_FB is not set |
578 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
475 | 579 | ||
476 | # | 580 | # |
477 | # Sound | 581 | # Sound |
@@ -483,6 +587,11 @@ CONFIG_DS1302=y | |||
483 | # | 587 | # |
484 | # CONFIG_USB_ARCH_HAS_HCD is not set | 588 | # CONFIG_USB_ARCH_HAS_HCD is not set |
485 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 589 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
590 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
591 | |||
592 | # | ||
593 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
594 | # | ||
486 | 595 | ||
487 | # | 596 | # |
488 | # USB Gadget Support | 597 | # USB Gadget Support |
@@ -495,38 +604,73 @@ CONFIG_DS1302=y | |||
495 | # CONFIG_MMC is not set | 604 | # CONFIG_MMC is not set |
496 | 605 | ||
497 | # | 606 | # |
607 | # LED devices | ||
608 | # | ||
609 | # CONFIG_NEW_LEDS is not set | ||
610 | |||
611 | # | ||
612 | # LED drivers | ||
613 | # | ||
614 | |||
615 | # | ||
616 | # LED Triggers | ||
617 | # | ||
618 | |||
619 | # | ||
498 | # InfiniBand support | 620 | # InfiniBand support |
499 | # | 621 | # |
500 | # CONFIG_INFINIBAND is not set | 622 | |
623 | # | ||
624 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
625 | # | ||
626 | |||
627 | # | ||
628 | # Real Time Clock | ||
629 | # | ||
630 | # CONFIG_RTC_CLASS is not set | ||
631 | |||
632 | # | ||
633 | # DMA Engine support | ||
634 | # | ||
635 | # CONFIG_DMA_ENGINE is not set | ||
636 | |||
637 | # | ||
638 | # DMA Clients | ||
639 | # | ||
640 | |||
641 | # | ||
642 | # DMA Devices | ||
643 | # | ||
501 | 644 | ||
502 | # | 645 | # |
503 | # File systems | 646 | # File systems |
504 | # | 647 | # |
505 | CONFIG_EXT2_FS=y | 648 | CONFIG_EXT2_FS=y |
506 | # CONFIG_EXT2_FS_XATTR is not set | 649 | # CONFIG_EXT2_FS_XATTR is not set |
507 | CONFIG_EXT3_FS=m | 650 | # CONFIG_EXT2_FS_XIP is not set |
651 | CONFIG_EXT3_FS=y | ||
508 | CONFIG_EXT3_FS_XATTR=y | 652 | CONFIG_EXT3_FS_XATTR=y |
509 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 653 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
510 | # CONFIG_EXT3_FS_SECURITY is not set | 654 | # CONFIG_EXT3_FS_SECURITY is not set |
511 | CONFIG_JBD=m | 655 | # CONFIG_EXT4DEV_FS is not set |
656 | CONFIG_JBD=y | ||
512 | CONFIG_JBD_DEBUG=y | 657 | CONFIG_JBD_DEBUG=y |
513 | CONFIG_FS_MBCACHE=y | 658 | CONFIG_FS_MBCACHE=y |
514 | CONFIG_REISERFS_FS=m | 659 | # CONFIG_REISERFS_FS is not set |
515 | # CONFIG_REISERFS_CHECK is not set | ||
516 | # CONFIG_REISERFS_PROC_INFO is not set | ||
517 | # CONFIG_REISERFS_FS_XATTR is not set | ||
518 | # CONFIG_JFS_FS is not set | 660 | # CONFIG_JFS_FS is not set |
519 | 661 | # CONFIG_FS_POSIX_ACL is not set | |
520 | # | ||
521 | # XFS support | ||
522 | # | ||
523 | # CONFIG_XFS_FS is not set | 662 | # CONFIG_XFS_FS is not set |
663 | # CONFIG_GFS2_FS is not set | ||
664 | # CONFIG_OCFS2_FS is not set | ||
524 | # CONFIG_MINIX_FS is not set | 665 | # CONFIG_MINIX_FS is not set |
525 | # CONFIG_ROMFS_FS is not set | 666 | # CONFIG_ROMFS_FS is not set |
667 | CONFIG_INOTIFY=y | ||
668 | CONFIG_INOTIFY_USER=y | ||
526 | # CONFIG_QUOTA is not set | 669 | # CONFIG_QUOTA is not set |
527 | CONFIG_DNOTIFY=y | 670 | CONFIG_DNOTIFY=y |
528 | # CONFIG_AUTOFS_FS is not set | 671 | # CONFIG_AUTOFS_FS is not set |
529 | # CONFIG_AUTOFS4_FS is not set | 672 | # CONFIG_AUTOFS4_FS is not set |
673 | # CONFIG_FUSE_FS is not set | ||
530 | 674 | ||
531 | # | 675 | # |
532 | # CD-ROM/DVD Filesystems | 676 | # CD-ROM/DVD Filesystems |
@@ -552,15 +696,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
552 | # | 696 | # |
553 | CONFIG_PROC_FS=y | 697 | CONFIG_PROC_FS=y |
554 | CONFIG_PROC_KCORE=y | 698 | CONFIG_PROC_KCORE=y |
699 | CONFIG_PROC_SYSCTL=y | ||
555 | CONFIG_SYSFS=y | 700 | CONFIG_SYSFS=y |
556 | CONFIG_DEVFS_FS=y | ||
557 | CONFIG_DEVFS_MOUNT=y | ||
558 | # CONFIG_DEVFS_DEBUG is not set | ||
559 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
560 | CONFIG_TMPFS=y | 701 | CONFIG_TMPFS=y |
561 | # CONFIG_TMPFS_XATTR is not set | 702 | # CONFIG_TMPFS_POSIX_ACL is not set |
562 | # CONFIG_HUGETLB_PAGE is not set | 703 | # CONFIG_HUGETLB_PAGE is not set |
563 | CONFIG_RAMFS=y | 704 | CONFIG_RAMFS=y |
705 | # CONFIG_CONFIGFS_FS is not set | ||
564 | 706 | ||
565 | # | 707 | # |
566 | # Miscellaneous filesystems | 708 | # Miscellaneous filesystems |
@@ -584,12 +726,14 @@ CONFIG_RAMFS=y | |||
584 | # | 726 | # |
585 | CONFIG_NFS_FS=y | 727 | CONFIG_NFS_FS=y |
586 | CONFIG_NFS_V3=y | 728 | CONFIG_NFS_V3=y |
729 | # CONFIG_NFS_V3_ACL is not set | ||
587 | # CONFIG_NFS_V4 is not set | 730 | # CONFIG_NFS_V4 is not set |
588 | # CONFIG_NFS_DIRECTIO is not set | 731 | # CONFIG_NFS_DIRECTIO is not set |
589 | # CONFIG_NFSD is not set | 732 | # CONFIG_NFSD is not set |
590 | CONFIG_ROOT_NFS=y | 733 | CONFIG_ROOT_NFS=y |
591 | CONFIG_LOCKD=y | 734 | CONFIG_LOCKD=y |
592 | CONFIG_LOCKD_V4=y | 735 | CONFIG_LOCKD_V4=y |
736 | CONFIG_NFS_COMMON=y | ||
593 | CONFIG_SUNRPC=y | 737 | CONFIG_SUNRPC=y |
594 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 738 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
595 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 739 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -598,6 +742,7 @@ CONFIG_SUNRPC=y | |||
598 | # CONFIG_NCP_FS is not set | 742 | # CONFIG_NCP_FS is not set |
599 | # CONFIG_CODA_FS is not set | 743 | # CONFIG_CODA_FS is not set |
600 | # CONFIG_AFS_FS is not set | 744 | # CONFIG_AFS_FS is not set |
745 | # CONFIG_9P_FS is not set | ||
601 | 746 | ||
602 | # | 747 | # |
603 | # Partition Types | 748 | # Partition Types |
@@ -658,21 +803,32 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
658 | # Kernel hacking | 803 | # Kernel hacking |
659 | # | 804 | # |
660 | # CONFIG_PRINTK_TIME is not set | 805 | # CONFIG_PRINTK_TIME is not set |
661 | CONFIG_DEBUG_KERNEL=y | 806 | CONFIG_ENABLE_MUST_CHECK=y |
662 | # CONFIG_MAGIC_SYSRQ is not set | 807 | # CONFIG_MAGIC_SYSRQ is not set |
808 | # CONFIG_UNUSED_SYMBOLS is not set | ||
809 | CONFIG_DEBUG_KERNEL=y | ||
663 | CONFIG_LOG_BUF_SHIFT=14 | 810 | CONFIG_LOG_BUF_SHIFT=14 |
811 | CONFIG_DETECT_SOFTLOCKUP=y | ||
664 | # CONFIG_SCHEDSTATS is not set | 812 | # CONFIG_SCHEDSTATS is not set |
665 | # CONFIG_DEBUG_SLAB is not set | 813 | # CONFIG_DEBUG_SLAB is not set |
666 | # CONFIG_DEBUG_SPINLOCK is not set | 814 | # CONFIG_DEBUG_SPINLOCK is not set |
815 | # CONFIG_DEBUG_MUTEXES is not set | ||
816 | # CONFIG_DEBUG_RWSEMS is not set | ||
667 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 817 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
818 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
668 | # CONFIG_DEBUG_KOBJECT is not set | 819 | # CONFIG_DEBUG_KOBJECT is not set |
669 | # CONFIG_DEBUG_BUGVERBOSE is not set | 820 | # CONFIG_DEBUG_BUGVERBOSE is not set |
670 | CONFIG_DEBUG_INFO=y | 821 | CONFIG_DEBUG_INFO=y |
671 | # CONFIG_DEBUG_FS is not set | 822 | # CONFIG_DEBUG_FS is not set |
823 | # CONFIG_DEBUG_VM is not set | ||
824 | # CONFIG_DEBUG_LIST is not set | ||
672 | # CONFIG_FRAME_POINTER is not set | 825 | # CONFIG_FRAME_POINTER is not set |
826 | # CONFIG_UNWIND_INFO is not set | ||
827 | CONFIG_FORCED_INLINING=y | ||
828 | # CONFIG_HEADERS_CHECK is not set | ||
829 | # CONFIG_RCU_TORTURE_TEST is not set | ||
673 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 830 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
674 | # CONFIG_DEBUG_STACK_USAGE is not set | 831 | # CONFIG_DEBUG_STACK_USAGE is not set |
675 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
676 | 832 | ||
677 | # | 833 | # |
678 | # Security options | 834 | # Security options |
@@ -686,12 +842,9 @@ CONFIG_DEBUG_INFO=y | |||
686 | # CONFIG_CRYPTO is not set | 842 | # CONFIG_CRYPTO is not set |
687 | 843 | ||
688 | # | 844 | # |
689 | # Hardware crypto devices | ||
690 | # | ||
691 | |||
692 | # | ||
693 | # Library routines | 845 | # Library routines |
694 | # | 846 | # |
695 | # CONFIG_CRC_CCITT is not set | 847 | # CONFIG_CRC_CCITT is not set |
848 | # CONFIG_CRC16 is not set | ||
696 | CONFIG_CRC32=y | 849 | CONFIG_CRC32=y |
697 | # CONFIG_LIBCRC32C is not set | 850 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 70a577c89c7c..a8e1e604dfa8 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -42,6 +42,9 @@ config ARCH_MAY_HAVE_PC_FDC | |||
42 | depends on Q40 || (BROKEN && SUN3X) | 42 | depends on Q40 || (BROKEN && SUN3X) |
43 | default y | 43 | default y |
44 | 44 | ||
45 | config NO_IOPORT | ||
46 | def_bool y | ||
47 | |||
45 | mainmenu "Linux/68k Kernel Configuration" | 48 | mainmenu "Linux/68k Kernel Configuration" |
46 | 49 | ||
47 | source "init/Kconfig" | 50 | source "init/Kconfig" |
@@ -439,6 +442,10 @@ config GENERIC_ISA_DMA | |||
439 | depends on Q40 || AMIGA_PCMCIA || GG2 | 442 | depends on Q40 || AMIGA_PCMCIA || GG2 |
440 | default y | 443 | default y |
441 | 444 | ||
445 | config ZONE_DMA | ||
446 | bool | ||
447 | default y | ||
448 | |||
442 | source "drivers/pci/Kconfig" | 449 | source "drivers/pci/Kconfig" |
443 | 450 | ||
444 | source "drivers/zorro/Kconfig" | 451 | source "drivers/zorro/Kconfig" |
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index 1c9ecaa473d5..0b68ab8d63d1 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile | |||
@@ -10,7 +10,9 @@ endif | |||
10 | extra-y += vmlinux.lds | 10 | extra-y += vmlinux.lds |
11 | 11 | ||
12 | obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \ | 12 | obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \ |
13 | sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o | 13 | sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o devres.o |
14 | |||
15 | devres-y = ../../../kernel/irq/devres.o | ||
14 | 16 | ||
15 | obj-$(CONFIG_PCI) += bios32.o | 17 | obj-$(CONFIG_PCI) += bios32.o |
16 | obj-$(CONFIG_MODULES) += module.o | 18 | obj-$(CONFIG_MODULES) += module.o |
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index ef89060ea328..7fd2720c3841 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c | |||
@@ -76,7 +76,7 @@ static inline long get_reg(struct task_struct *task, int regno) | |||
76 | 76 | ||
77 | if (regno == PT_USP) | 77 | if (regno == PT_USP) |
78 | addr = &task->thread.usp; | 78 | addr = &task->thread.usp; |
79 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 79 | else if (regno < ARRAY_SIZE(regoff)) |
80 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 80 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
81 | else | 81 | else |
82 | return 0; | 82 | return 0; |
@@ -93,7 +93,7 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
93 | 93 | ||
94 | if (regno == PT_USP) | 94 | if (regno == PT_USP) |
95 | addr = &task->thread.usp; | 95 | addr = &task->thread.usp; |
96 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 96 | else if (regno < ARRAY_SIZE(regoff)) |
97 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 97 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
98 | else | 98 | else |
99 | return -1; | 99 | return -1; |
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 2a599c3ed787..4c065f9ceffc 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c | |||
@@ -159,12 +159,3 @@ int do_settimeofday(struct timespec *tv) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | EXPORT_SYMBOL(do_settimeofday); | 161 | EXPORT_SYMBOL(do_settimeofday); |
162 | |||
163 | /* | ||
164 | * Scheduler clock - returns current time in ns units. | ||
165 | */ | ||
166 | unsigned long long sched_clock(void) | ||
167 | { | ||
168 | return (unsigned long long)jiffies*(1000000000/HZ); | ||
169 | } | ||
170 | |||
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 759fa244e6cd..a27a4fa33296 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c | |||
@@ -1011,7 +1011,7 @@ EXPORT_SYMBOL(dump_stack); | |||
1011 | void bad_super_trap (struct frame *fp) | 1011 | void bad_super_trap (struct frame *fp) |
1012 | { | 1012 | { |
1013 | console_verbose(); | 1013 | console_verbose(); |
1014 | if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0])) | 1014 | if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names)) |
1015 | printk ("*** %s *** FORMAT=%X\n", | 1015 | printk ("*** %s *** FORMAT=%X\n", |
1016 | vec_names[(fp->ptregs.vector) >> 2], | 1016 | vec_names[(fp->ptregs.vector) >> 2], |
1017 | fp->ptregs.format); | 1017 | fp->ptregs.format); |
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds index d2794452b195..437b4f8d86c5 100644 --- a/arch/m68k/kernel/vmlinux-std.lds +++ b/arch/m68k/kernel/vmlinux-std.lds | |||
@@ -61,10 +61,12 @@ SECTIONS | |||
61 | .con_initcall.init : { *(.con_initcall.init) } | 61 | .con_initcall.init : { *(.con_initcall.init) } |
62 | __con_initcall_end = .; | 62 | __con_initcall_end = .; |
63 | SECURITY_INIT | 63 | SECURITY_INIT |
64 | #ifdef CONFIG_BLK_DEV_INITRD | ||
64 | . = ALIGN(8192); | 65 | . = ALIGN(8192); |
65 | __initramfs_start = .; | 66 | __initramfs_start = .; |
66 | .init.ramfs : { *(.init.ramfs) } | 67 | .init.ramfs : { *(.init.ramfs) } |
67 | __initramfs_end = .; | 68 | __initramfs_end = .; |
69 | #endif | ||
68 | . = ALIGN(8192); | 70 | . = ALIGN(8192); |
69 | __init_end = .; | 71 | __init_end = .; |
70 | 72 | ||
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds index 8c7eccbfc982..2868e206fc76 100644 --- a/arch/m68k/kernel/vmlinux-sun3.lds +++ b/arch/m68k/kernel/vmlinux-sun3.lds | |||
@@ -55,10 +55,12 @@ __init_begin = .; | |||
55 | .con_initcall.init : { *(.con_initcall.init) } | 55 | .con_initcall.init : { *(.con_initcall.init) } |
56 | __con_initcall_end = .; | 56 | __con_initcall_end = .; |
57 | SECURITY_INIT | 57 | SECURITY_INIT |
58 | #ifdef CONFIG_BLK_DEV_INITRD | ||
58 | . = ALIGN(8192); | 59 | . = ALIGN(8192); |
59 | __initramfs_start = .; | 60 | __initramfs_start = .; |
60 | .init.ramfs : { *(.init.ramfs) } | 61 | .init.ramfs : { *(.init.ramfs) } |
61 | __initramfs_end = .; | 62 | __initramfs_end = .; |
63 | #endif | ||
62 | . = ALIGN(8192); | 64 | . = ALIGN(8192); |
63 | __init_end = .; | 65 | __init_end = .; |
64 | .data.init.task : { *(.data.init_task) } | 66 | .data.init.task : { *(.data.init_task) } |
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index 25993c2a8fbb..823f73736bb5 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -17,6 +17,10 @@ config FPU | |||
17 | bool | 17 | bool |
18 | default n | 18 | default n |
19 | 19 | ||
20 | config ZONE_DMA | ||
21 | bool | ||
22 | default y | ||
23 | |||
20 | config RWSEM_GENERIC_SPINLOCK | 24 | config RWSEM_GENERIC_SPINLOCK |
21 | bool | 25 | bool |
22 | default y | 26 | default y |
@@ -49,6 +53,9 @@ config TIME_LOW_RES | |||
49 | bool | 53 | bool |
50 | default y | 54 | default y |
51 | 55 | ||
56 | config NO_IOPORT | ||
57 | def_bool y | ||
58 | |||
52 | source "init/Kconfig" | 59 | source "init/Kconfig" |
53 | 60 | ||
54 | menu "Processor type and features" | 61 | menu "Processor type and features" |
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 9130119537b9..72d349623575 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c | |||
@@ -62,7 +62,7 @@ static inline long get_reg(struct task_struct *task, int regno) | |||
62 | 62 | ||
63 | if (regno == PT_USP) | 63 | if (regno == PT_USP) |
64 | addr = &task->thread.usp; | 64 | addr = &task->thread.usp; |
65 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 65 | else if (regno < ARRAY_SIZE(regoff)) |
66 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 66 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
67 | else | 67 | else |
68 | return 0; | 68 | return 0; |
@@ -79,7 +79,7 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
79 | 79 | ||
80 | if (regno == PT_USP) | 80 | if (regno == PT_USP) |
81 | addr = &task->thread.usp; | 81 | addr = &task->thread.usp; |
82 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 82 | else if (regno < ARRAY_SIZE(regoff)) |
83 | addr = (unsigned long *) (task->thread.esp0 + regoff[regno]); | 83 | addr = (unsigned long *) (task->thread.esp0 + regoff[regno]); |
84 | else | 84 | else |
85 | return -1; | 85 | return -1; |
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index 11ea217ed5cf..467053da2d08 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c | |||
@@ -174,13 +174,4 @@ int do_settimeofday(struct timespec *tv) | |||
174 | clock_was_set(); | 174 | clock_was_set(); |
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | |||
178 | /* | ||
179 | * Scheduler clock - returns current time in nanosec units. | ||
180 | */ | ||
181 | unsigned long long sched_clock(void) | ||
182 | { | ||
183 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
184 | } | ||
185 | |||
186 | EXPORT_SYMBOL(do_settimeofday); | 177 | EXPORT_SYMBOL(do_settimeofday); |
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c index 9129b3a5258b..bed5f47bf568 100644 --- a/arch/m68knommu/kernel/traps.c +++ b/arch/m68knommu/kernel/traps.c | |||
@@ -158,7 +158,7 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
158 | void bad_super_trap(struct frame *fp) | 158 | void bad_super_trap(struct frame *fp) |
159 | { | 159 | { |
160 | console_verbose(); | 160 | console_verbose(); |
161 | if (fp->ptregs.vector < 4*sizeof(vec_names)/sizeof(vec_names[0])) | 161 | if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names)) |
162 | printk (KERN_WARNING "*** %s *** FORMAT=%X\n", | 162 | printk (KERN_WARNING "*** %s *** FORMAT=%X\n", |
163 | vec_names[(fp->ptregs.vector) >> 2], | 163 | vec_names[(fp->ptregs.vector) >> 2], |
164 | fp->ptregs.format); | 164 | fp->ptregs.format); |
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S index bfade20a9e5e..c86a1bf589d4 100644 --- a/arch/m68knommu/kernel/vmlinux.lds.S +++ b/arch/m68knommu/kernel/vmlinux.lds.S | |||
@@ -159,10 +159,12 @@ SECTIONS { | |||
159 | __security_initcall_start = .; | 159 | __security_initcall_start = .; |
160 | *(.security_initcall.init) | 160 | *(.security_initcall.init) |
161 | __security_initcall_end = .; | 161 | __security_initcall_end = .; |
162 | #ifdef CONFIG_BLK_DEV_INITRD | ||
162 | . = ALIGN(4); | 163 | . = ALIGN(4); |
163 | __initramfs_start = .; | 164 | __initramfs_start = .; |
164 | *(.init.ramfs) | 165 | *(.init.ramfs) |
165 | __initramfs_end = .; | 166 | __initramfs_end = .; |
167 | #endif | ||
166 | . = ALIGN(4096); | 168 | . = ALIGN(4096); |
167 | __init_end = .; | 169 | __init_end = .; |
168 | } > INIT | 170 | } > INIT |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 9d839a9c4b1a..1bc6d249be44 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -8,6 +8,10 @@ mainmenu "Linux/MIPS Kernel Configuration" | |||
8 | 8 | ||
9 | menu "Machine selection" | 9 | menu "Machine selection" |
10 | 10 | ||
11 | config ZONE_DMA | ||
12 | bool | ||
13 | default y | ||
14 | |||
11 | choice | 15 | choice |
12 | prompt "System type" | 16 | prompt "System type" |
13 | default SGI_IP22 | 17 | default SGI_IP22 |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 0b8ce59429a8..ca7ad78f4def 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -193,50 +193,6 @@ sysn32_waitid(int which, compat_pid_t pid, | |||
193 | return ret; | 193 | return ret; |
194 | } | 194 | } |
195 | 195 | ||
196 | struct sysinfo32 { | ||
197 | s32 uptime; | ||
198 | u32 loads[3]; | ||
199 | u32 totalram; | ||
200 | u32 freeram; | ||
201 | u32 sharedram; | ||
202 | u32 bufferram; | ||
203 | u32 totalswap; | ||
204 | u32 freeswap; | ||
205 | u16 procs; | ||
206 | u32 totalhigh; | ||
207 | u32 freehigh; | ||
208 | u32 mem_unit; | ||
209 | char _f[8]; | ||
210 | }; | ||
211 | |||
212 | asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info) | ||
213 | { | ||
214 | struct sysinfo s; | ||
215 | int ret, err; | ||
216 | mm_segment_t old_fs = get_fs (); | ||
217 | |||
218 | set_fs (KERNEL_DS); | ||
219 | ret = sys_sysinfo((struct sysinfo __user *)&s); | ||
220 | set_fs (old_fs); | ||
221 | err = put_user (s.uptime, &info->uptime); | ||
222 | err |= __put_user (s.loads[0], &info->loads[0]); | ||
223 | err |= __put_user (s.loads[1], &info->loads[1]); | ||
224 | err |= __put_user (s.loads[2], &info->loads[2]); | ||
225 | err |= __put_user (s.totalram, &info->totalram); | ||
226 | err |= __put_user (s.freeram, &info->freeram); | ||
227 | err |= __put_user (s.sharedram, &info->sharedram); | ||
228 | err |= __put_user (s.bufferram, &info->bufferram); | ||
229 | err |= __put_user (s.totalswap, &info->totalswap); | ||
230 | err |= __put_user (s.freeswap, &info->freeswap); | ||
231 | err |= __put_user (s.procs, &info->procs); | ||
232 | err |= __put_user (s.totalhigh, &info->totalhigh); | ||
233 | err |= __put_user (s.freehigh, &info->freehigh); | ||
234 | err |= __put_user (s.mem_unit, &info->mem_unit); | ||
235 | if (err) | ||
236 | return -EFAULT; | ||
237 | return ret; | ||
238 | } | ||
239 | |||
240 | #define RLIM_INFINITY32 0x7fffffff | 196 | #define RLIM_INFINITY32 0x7fffffff |
241 | #define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x) | 197 | #define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x) |
242 | 198 | ||
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 39add2341aa2..ee8802b59758 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -217,7 +217,7 @@ EXPORT(sysn32_call_table) | |||
217 | PTR sys32_gettimeofday | 217 | PTR sys32_gettimeofday |
218 | PTR compat_sys_getrlimit /* 6095 */ | 218 | PTR compat_sys_getrlimit /* 6095 */ |
219 | PTR compat_sys_getrusage | 219 | PTR compat_sys_getrusage |
220 | PTR sys32_sysinfo | 220 | PTR compat_sys_sysinfo |
221 | PTR compat_sys_times | 221 | PTR compat_sys_times |
222 | PTR sys32_ptrace | 222 | PTR sys32_ptrace |
223 | PTR sys_getuid /* 6100 */ | 223 | PTR sys_getuid /* 6100 */ |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index c58b8e0105ea..c5f590ca99b0 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -321,7 +321,7 @@ sys_call_table: | |||
321 | PTR sys_ni_syscall /* sys_vm86 */ | 321 | PTR sys_ni_syscall /* sys_vm86 */ |
322 | PTR compat_sys_wait4 | 322 | PTR compat_sys_wait4 |
323 | PTR sys_swapoff /* 4115 */ | 323 | PTR sys_swapoff /* 4115 */ |
324 | PTR sys32_sysinfo | 324 | PTR compat_sys_sysinfo |
325 | PTR sys32_ipc | 325 | PTR sys32_ipc |
326 | PTR sys_fsync | 326 | PTR sys_fsync |
327 | PTR sys32_sigreturn | 327 | PTR sys32_sigreturn |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 8aa544f73a5e..545fcbc8cea2 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -455,8 +455,3 @@ EXPORT_SYMBOL(rtc_lock); | |||
455 | EXPORT_SYMBOL(to_tm); | 455 | EXPORT_SYMBOL(to_tm); |
456 | EXPORT_SYMBOL(rtc_mips_set_time); | 456 | EXPORT_SYMBOL(rtc_mips_set_time); |
457 | EXPORT_SYMBOL(rtc_mips_get_time); | 457 | EXPORT_SYMBOL(rtc_mips_get_time); |
458 | |||
459 | unsigned long long sched_clock(void) | ||
460 | { | ||
461 | return (unsigned long long)jiffies*(1000000000/HZ); | ||
462 | } | ||
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index cecff24cc972..c76b793310c2 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -113,10 +113,12 @@ SECTIONS | |||
113 | references from .rodata */ | 113 | references from .rodata */ |
114 | .exit.text : { *(.exit.text) } | 114 | .exit.text : { *(.exit.text) } |
115 | .exit.data : { *(.exit.data) } | 115 | .exit.data : { *(.exit.data) } |
116 | #if defined(CONFIG_BLK_DEV_INITRD) | ||
116 | . = ALIGN(_PAGE_SIZE); | 117 | . = ALIGN(_PAGE_SIZE); |
117 | __initramfs_start = .; | 118 | __initramfs_start = .; |
118 | .init.ramfs : { *(.init.ramfs) } | 119 | .init.ramfs : { *(.init.ramfs) } |
119 | __initramfs_end = .; | 120 | __initramfs_end = .; |
121 | #endif | ||
120 | . = ALIGN(32); | 122 | . = ALIGN(32); |
121 | __per_cpu_start = .; | 123 | __per_cpu_start = .; |
122 | .data.percpu : { *(.data.percpu) } | 124 | .data.percpu : { *(.data.percpu) } |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 1f954a238a63..31819c58bffa 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -107,8 +107,6 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address, | |||
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | #define __weak __attribute__((weak)) | ||
111 | |||
112 | static char cache_panic[] __initdata = "Yeee, unsupported cache architecture."; | 110 | static char cache_panic[] __initdata = "Yeee, unsupported cache architecture."; |
113 | 111 | ||
114 | void __init cpu_cache_init(void) | 112 | void __init cpu_cache_init(void) |
diff --git a/arch/mips/philips/pnx8550/common/proc.c b/arch/mips/philips/pnx8550/common/proc.c index 72a016767e09..3f097558ef13 100644 --- a/arch/mips/philips/pnx8550/common/proc.c +++ b/arch/mips/philips/pnx8550/common/proc.c | |||
@@ -79,10 +79,7 @@ static int pnx8550_proc_init( void ) | |||
79 | 79 | ||
80 | // Create /proc/pnx8550 | 80 | // Create /proc/pnx8550 |
81 | pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL); | 81 | pnx8550_dir = create_proc_entry("pnx8550", S_IFDIR|S_IRUGO, NULL); |
82 | if (pnx8550_dir){ | 82 | if (!pnx8550_dir) { |
83 | pnx8550_dir->nlink = 1; | ||
84 | } | ||
85 | else { | ||
86 | printk(KERN_ERR "Can't create pnx8550 proc dir\n"); | 83 | printk(KERN_ERR "Can't create pnx8550 proc dir\n"); |
87 | return -1; | 84 | return -1; |
88 | } | 85 | } |
@@ -90,7 +87,6 @@ static int pnx8550_proc_init( void ) | |||
90 | // Create /proc/pnx8550/timers | 87 | // Create /proc/pnx8550/timers |
91 | pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); | 88 | pnx8550_timers = create_proc_entry("timers", S_IFREG|S_IRUGO, pnx8550_dir ); |
92 | if (pnx8550_timers){ | 89 | if (pnx8550_timers){ |
93 | pnx8550_timers->nlink = 1; | ||
94 | pnx8550_timers->read_proc = pnx8550_timers_read; | 90 | pnx8550_timers->read_proc = pnx8550_timers_read; |
95 | } | 91 | } |
96 | else { | 92 | else { |
@@ -100,7 +96,6 @@ static int pnx8550_proc_init( void ) | |||
100 | // Create /proc/pnx8550/registers | 96 | // Create /proc/pnx8550/registers |
101 | pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); | 97 | pnx8550_registers = create_proc_entry("registers", S_IFREG|S_IRUGO, pnx8550_dir ); |
102 | if (pnx8550_registers){ | 98 | if (pnx8550_registers){ |
103 | pnx8550_registers->nlink = 1; | ||
104 | pnx8550_registers->read_proc = pnx8550_registers_read; | 99 | pnx8550_registers->read_proc = pnx8550_registers_read; |
105 | } | 100 | } |
106 | else { | 101 | else { |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 0f9ff618c6d7..28da4e71c443 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -50,9 +50,6 @@ config TIME_LOW_RES | |||
50 | depends on SMP | 50 | depends on SMP |
51 | default y | 51 | default y |
52 | 52 | ||
53 | config GENERIC_ISA_DMA | ||
54 | bool | ||
55 | |||
56 | config GENERIC_HARDIRQS | 53 | config GENERIC_HARDIRQS |
57 | def_bool y | 54 | def_bool y |
58 | 55 | ||
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 29be4377aca6..ce3245f87fdd 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -579,70 +579,6 @@ asmlinkage int sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *off | |||
579 | } | 579 | } |
580 | 580 | ||
581 | 581 | ||
582 | struct sysinfo32 { | ||
583 | s32 uptime; | ||
584 | u32 loads[3]; | ||
585 | u32 totalram; | ||
586 | u32 freeram; | ||
587 | u32 sharedram; | ||
588 | u32 bufferram; | ||
589 | u32 totalswap; | ||
590 | u32 freeswap; | ||
591 | unsigned short procs; | ||
592 | u32 totalhigh; | ||
593 | u32 freehigh; | ||
594 | u32 mem_unit; | ||
595 | char _f[12]; | ||
596 | }; | ||
597 | |||
598 | /* We used to call sys_sysinfo and translate the result. But sys_sysinfo | ||
599 | * undoes the good work done elsewhere, and rather than undoing the | ||
600 | * damage, I decided to just duplicate the code from sys_sysinfo here. | ||
601 | */ | ||
602 | |||
603 | asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info) | ||
604 | { | ||
605 | struct sysinfo val; | ||
606 | int err; | ||
607 | unsigned long seq; | ||
608 | |||
609 | /* We don't need a memset here because we copy the | ||
610 | * struct to userspace once element at a time. | ||
611 | */ | ||
612 | |||
613 | do { | ||
614 | seq = read_seqbegin(&xtime_lock); | ||
615 | val.uptime = jiffies / HZ; | ||
616 | |||
617 | val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT); | ||
618 | val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT); | ||
619 | val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT); | ||
620 | |||
621 | val.procs = nr_threads; | ||
622 | } while (read_seqretry(&xtime_lock, seq)); | ||
623 | |||
624 | |||
625 | si_meminfo(&val); | ||
626 | si_swapinfo(&val); | ||
627 | |||
628 | err = put_user (val.uptime, &info->uptime); | ||
629 | err |= __put_user (val.loads[0], &info->loads[0]); | ||
630 | err |= __put_user (val.loads[1], &info->loads[1]); | ||
631 | err |= __put_user (val.loads[2], &info->loads[2]); | ||
632 | err |= __put_user (val.totalram, &info->totalram); | ||
633 | err |= __put_user (val.freeram, &info->freeram); | ||
634 | err |= __put_user (val.sharedram, &info->sharedram); | ||
635 | err |= __put_user (val.bufferram, &info->bufferram); | ||
636 | err |= __put_user (val.totalswap, &info->totalswap); | ||
637 | err |= __put_user (val.freeswap, &info->freeswap); | ||
638 | err |= __put_user (val.procs, &info->procs); | ||
639 | err |= __put_user (val.totalhigh, &info->totalhigh); | ||
640 | err |= __put_user (val.freehigh, &info->freehigh); | ||
641 | err |= __put_user (val.mem_unit, &info->mem_unit); | ||
642 | return err ? -EFAULT : 0; | ||
643 | } | ||
644 | |||
645 | |||
646 | /* lseek() needs a wrapper because 'offset' can be negative, but the top | 582 | /* lseek() needs a wrapper because 'offset' can be negative, but the top |
647 | * half of the argument has been zeroed by syscall.S. | 583 | * half of the argument has been zeroed by syscall.S. |
648 | */ | 584 | */ |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 701d66a596e8..be8eb9a0d24a 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -197,7 +197,7 @@ | |||
197 | /* struct rusage contains longs... */ | 197 | /* struct rusage contains longs... */ |
198 | ENTRY_COMP(wait4) | 198 | ENTRY_COMP(wait4) |
199 | ENTRY_SAME(swapoff) /* 115 */ | 199 | ENTRY_SAME(swapoff) /* 115 */ |
200 | ENTRY_DIFF(sysinfo) | 200 | ENTRY_COMP(sysinfo) |
201 | ENTRY_SAME(shutdown) | 201 | ENTRY_SAME(shutdown) |
202 | ENTRY_SAME(fsync) | 202 | ENTRY_SAME(fsync) |
203 | ENTRY_SAME(madvise) | 203 | ENTRY_SAME(madvise) |
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index bad7d1eb62b9..5f1b51af06a9 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -288,17 +288,6 @@ do_settimeofday (struct timespec *tv) | |||
288 | } | 288 | } |
289 | EXPORT_SYMBOL(do_settimeofday); | 289 | EXPORT_SYMBOL(do_settimeofday); |
290 | 290 | ||
291 | /* | ||
292 | * XXX: We can do better than this. | ||
293 | * Returns nanoseconds | ||
294 | */ | ||
295 | |||
296 | unsigned long long sched_clock(void) | ||
297 | { | ||
298 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
299 | } | ||
300 | |||
301 | |||
302 | void __init start_cpu_itimer(void) | 291 | void __init start_cpu_itimer(void) |
303 | { | 292 | { |
304 | unsigned int cpu = smp_processor_id(); | 293 | unsigned int cpu = smp_processor_id(); |
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index 7b943b45f7cd..3b78c2794c36 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S | |||
@@ -173,10 +173,12 @@ SECTIONS | |||
173 | from .altinstructions and .eh_frame */ | 173 | from .altinstructions and .eh_frame */ |
174 | .exit.text : { *(.exit.text) } | 174 | .exit.text : { *(.exit.text) } |
175 | .exit.data : { *(.exit.data) } | 175 | .exit.data : { *(.exit.data) } |
176 | #ifdef CONFIG_BLK_DEV_INITRD | ||
176 | . = ALIGN(ASM_PAGE_SIZE); | 177 | . = ALIGN(ASM_PAGE_SIZE); |
177 | __initramfs_start = .; | 178 | __initramfs_start = .; |
178 | .init.ramfs : { *(.init.ramfs) } | 179 | .init.ramfs : { *(.init.ramfs) } |
179 | __initramfs_end = .; | 180 | __initramfs_end = .; |
181 | #endif | ||
180 | . = ALIGN(32); | 182 | . = ALIGN(32); |
181 | __per_cpu_start = .; | 183 | __per_cpu_start = .; |
182 | .data.percpu : { *(.data.percpu) } | 184 | .data.percpu : { *(.data.percpu) } |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 0667f2b4f977..0c118e584e73 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -808,9 +808,7 @@ void __init paging_init(void) | |||
808 | for (i = 0; i < npmem_ranges; i++) { | 808 | for (i = 0; i < npmem_ranges; i++) { |
809 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | 809 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; |
810 | 810 | ||
811 | /* We have an IOMMU, so all memory can go into a single | 811 | zones_size[ZONE_NORMAL] = pmem_ranges[i].pages; |
812 | ZONE_DMA zone. */ | ||
813 | zones_size[ZONE_DMA] = pmem_ranges[i].pages; | ||
814 | 812 | ||
815 | #ifdef CONFIG_DISCONTIGMEM | 813 | #ifdef CONFIG_DISCONTIGMEM |
816 | /* Need to initialize the pfnnid_map before we can initialize | 814 | /* Need to initialize the pfnnid_map before we can initialize |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index f08e80a0bf0a..0088c5ebca78 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -977,6 +977,10 @@ config ISA | |||
977 | have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If | 977 | have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If |
978 | you have an embedded board, consult your board documentation. | 978 | you have an embedded board, consult your board documentation. |
979 | 979 | ||
980 | config ZONE_DMA | ||
981 | bool | ||
982 | default y | ||
983 | |||
980 | config GENERIC_ISA_DMA | 984 | config GENERIC_ISA_DMA |
981 | bool | 985 | bool |
982 | depends on PPC64 || POWER4 || 6xx && !CPM2 | 986 | depends on PPC64 || POWER4 || 6xx && !CPM2 |
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c index dd7001cacf75..3d437c32546e 100644 --- a/arch/powerpc/kernel/proc_ppc64.c +++ b/arch/powerpc/kernel/proc_ppc64.c | |||
@@ -71,7 +71,6 @@ static int __init proc_ppc64_init(void) | |||
71 | pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); | 71 | pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); |
72 | if (!pde) | 72 | if (!pde) |
73 | return 1; | 73 | return 1; |
74 | pde->nlink = 1; | ||
75 | pde->data = vdso_data; | 74 | pde->data = vdso_data; |
76 | pde->size = PAGE_SIZE; | 75 | pde->size = PAGE_SIZE; |
77 | pde->proc_fops = &page_map_fops; | 76 | pde->proc_fops = &page_map_fops; |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 0c4fcd34bfe5..65e4ebe8db31 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -708,7 +708,6 @@ static struct proc_dir_entry *create_flash_pde(const char *filename, | |||
708 | 708 | ||
709 | ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); | 709 | ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); |
710 | if (ent != NULL) { | 710 | if (ent != NULL) { |
711 | ent->nlink = 1; | ||
712 | ent->proc_fops = fops; | 711 | ent->proc_fops = fops; |
713 | ent->owner = THIS_MODULE; | 712 | ent->owner = THIS_MODULE; |
714 | } | 713 | } |
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 03a2a2f30d66..673e8d9df7f5 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -198,73 +198,6 @@ static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i) | |||
198 | __put_user(i->tv_usec, &o->tv_usec))); | 198 | __put_user(i->tv_usec, &o->tv_usec))); |
199 | } | 199 | } |
200 | 200 | ||
201 | struct sysinfo32 { | ||
202 | s32 uptime; | ||
203 | u32 loads[3]; | ||
204 | u32 totalram; | ||
205 | u32 freeram; | ||
206 | u32 sharedram; | ||
207 | u32 bufferram; | ||
208 | u32 totalswap; | ||
209 | u32 freeswap; | ||
210 | unsigned short procs; | ||
211 | unsigned short pad; | ||
212 | u32 totalhigh; | ||
213 | u32 freehigh; | ||
214 | u32 mem_unit; | ||
215 | char _f[20-2*sizeof(int)-sizeof(int)]; | ||
216 | }; | ||
217 | |||
218 | asmlinkage long compat_sys_sysinfo(struct sysinfo32 __user *info) | ||
219 | { | ||
220 | struct sysinfo s; | ||
221 | int ret, err; | ||
222 | int bitcount=0; | ||
223 | mm_segment_t old_fs = get_fs (); | ||
224 | |||
225 | /* The __user cast is valid due to set_fs() */ | ||
226 | set_fs (KERNEL_DS); | ||
227 | ret = sys_sysinfo((struct sysinfo __user *)&s); | ||
228 | set_fs (old_fs); | ||
229 | |||
230 | /* Check to see if any memory value is too large for 32-bit and | ||
231 | * scale down if needed. | ||
232 | */ | ||
233 | if ((s.totalram >> 32) || (s.totalswap >> 32)) { | ||
234 | while (s.mem_unit < PAGE_SIZE) { | ||
235 | s.mem_unit <<= 1; | ||
236 | bitcount++; | ||
237 | } | ||
238 | s.totalram >>=bitcount; | ||
239 | s.freeram >>= bitcount; | ||
240 | s.sharedram >>= bitcount; | ||
241 | s.bufferram >>= bitcount; | ||
242 | s.totalswap >>= bitcount; | ||
243 | s.freeswap >>= bitcount; | ||
244 | s.totalhigh >>= bitcount; | ||
245 | s.freehigh >>= bitcount; | ||
246 | } | ||
247 | |||
248 | err = put_user (s.uptime, &info->uptime); | ||
249 | err |= __put_user (s.loads[0], &info->loads[0]); | ||
250 | err |= __put_user (s.loads[1], &info->loads[1]); | ||
251 | err |= __put_user (s.loads[2], &info->loads[2]); | ||
252 | err |= __put_user (s.totalram, &info->totalram); | ||
253 | err |= __put_user (s.freeram, &info->freeram); | ||
254 | err |= __put_user (s.sharedram, &info->sharedram); | ||
255 | err |= __put_user (s.bufferram, &info->bufferram); | ||
256 | err |= __put_user (s.totalswap, &info->totalswap); | ||
257 | err |= __put_user (s.freeswap, &info->freeswap); | ||
258 | err |= __put_user (s.procs, &info->procs); | ||
259 | err |= __put_user (s.totalhigh, &info->totalhigh); | ||
260 | err |= __put_user (s.freehigh, &info->freehigh); | ||
261 | err |= __put_user (s.mem_unit, &info->mem_unit); | ||
262 | if (err) | ||
263 | return -EFAULT; | ||
264 | |||
265 | return ret; | ||
266 | } | ||
267 | |||
268 | 201 | ||
269 | 202 | ||
270 | 203 | ||
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 04b8e71bf5b0..7eefeb4a30e7 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -131,14 +131,14 @@ SECTIONS | |||
131 | __stop___fw_ftr_fixup = .; | 131 | __stop___fw_ftr_fixup = .; |
132 | } | 132 | } |
133 | #endif | 133 | #endif |
134 | 134 | #ifdef CONFIG_BLK_DEV_INITRD | |
135 | . = ALIGN(PAGE_SIZE); | 135 | . = ALIGN(PAGE_SIZE); |
136 | .init.ramfs : { | 136 | .init.ramfs : { |
137 | __initramfs_start = .; | 137 | __initramfs_start = .; |
138 | *(.init.ramfs) | 138 | *(.init.ramfs) |
139 | __initramfs_end = .; | 139 | __initramfs_end = .; |
140 | } | 140 | } |
141 | 141 | #endif | |
142 | #ifdef CONFIG_PPC32 | 142 | #ifdef CONFIG_PPC32 |
143 | . = ALIGN(32); | 143 | . = ALIGN(32); |
144 | #else | 144 | #else |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index 1ad0e4aaad1a..90d3d49f713e 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -1253,7 +1253,6 @@ static int __init mf_proc_init(void) | |||
1253 | ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf); | 1253 | ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf); |
1254 | if (!ent) | 1254 | if (!ent) |
1255 | return 1; | 1255 | return 1; |
1256 | ent->nlink = 1; | ||
1257 | ent->data = (void *)(long)i; | 1256 | ent->data = (void *)(long)i; |
1258 | ent->read_proc = proc_mf_dump_cmdline; | 1257 | ent->read_proc = proc_mf_dump_cmdline; |
1259 | ent->write_proc = proc_mf_change_cmdline; | 1258 | ent->write_proc = proc_mf_change_cmdline; |
@@ -1264,7 +1263,6 @@ static int __init mf_proc_init(void) | |||
1264 | ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf); | 1263 | ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf); |
1265 | if (!ent) | 1264 | if (!ent) |
1266 | return 1; | 1265 | return 1; |
1267 | ent->nlink = 1; | ||
1268 | ent->data = (void *)(long)i; | 1266 | ent->data = (void *)(long)i; |
1269 | ent->proc_fops = &proc_vmlinux_operations; | 1267 | ent->proc_fops = &proc_vmlinux_operations; |
1270 | } | 1268 | } |
@@ -1272,7 +1270,6 @@ static int __init mf_proc_init(void) | |||
1272 | ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); | 1270 | ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); |
1273 | if (!ent) | 1271 | if (!ent) |
1274 | return 1; | 1272 | return 1; |
1275 | ent->nlink = 1; | ||
1276 | ent->data = (void *)0; | 1273 | ent->data = (void *)0; |
1277 | ent->read_proc = proc_mf_dump_side; | 1274 | ent->read_proc = proc_mf_dump_side; |
1278 | ent->write_proc = proc_mf_change_side; | 1275 | ent->write_proc = proc_mf_change_side; |
@@ -1280,7 +1277,6 @@ static int __init mf_proc_init(void) | |||
1280 | ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); | 1277 | ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); |
1281 | if (!ent) | 1278 | if (!ent) |
1282 | return 1; | 1279 | return 1; |
1283 | ent->nlink = 1; | ||
1284 | ent->data = (void *)0; | 1280 | ent->data = (void *)0; |
1285 | ent->read_proc = proc_mf_dump_src; | 1281 | ent->read_proc = proc_mf_dump_src; |
1286 | ent->write_proc = proc_mf_change_src; | 1282 | ent->write_proc = proc_mf_change_src; |
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index 4ad33e41b008..789a5e99aefd 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -513,7 +513,6 @@ static int proc_ppc64_create_ofdt(void) | |||
513 | 513 | ||
514 | ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); | 514 | ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); |
515 | if (ent) { | 515 | if (ent) { |
516 | ent->nlink = 1; | ||
517 | ent->data = NULL; | 516 | ent->data = NULL; |
518 | ent->size = 0; | 517 | ent->size = 0; |
519 | ent->proc_fops = &ofdt_fops; | 518 | ent->proc_fops = &ofdt_fops; |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index c22e60619d9b..0df9c33629fd 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -1177,6 +1177,10 @@ config ISA | |||
1177 | have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If | 1177 | have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If |
1178 | you have an embedded board, consult your board documentation. | 1178 | you have an embedded board, consult your board documentation. |
1179 | 1179 | ||
1180 | config ZONE_DMA | ||
1181 | bool | ||
1182 | default y | ||
1183 | |||
1180 | config GENERIC_ISA_DMA | 1184 | config GENERIC_ISA_DMA |
1181 | bool | 1185 | bool |
1182 | depends on 6xx && !CPM2 | 1186 | depends on 6xx && !CPM2 |
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S index 61921268a0d0..a0625562a44b 100644 --- a/arch/ppc/kernel/vmlinux.lds.S +++ b/arch/ppc/kernel/vmlinux.lds.S | |||
@@ -135,10 +135,12 @@ SECTIONS | |||
135 | .data.percpu : { *(.data.percpu) } | 135 | .data.percpu : { *(.data.percpu) } |
136 | __per_cpu_end = .; | 136 | __per_cpu_end = .; |
137 | 137 | ||
138 | #ifdef CONFIG_BLK_DEV_INITRD | ||
138 | . = ALIGN(4096); | 139 | . = ALIGN(4096); |
139 | __initramfs_start = .; | 140 | __initramfs_start = .; |
140 | .init.ramfs : { *(.init.ramfs) } | 141 | .init.ramfs : { *(.init.ramfs) } |
141 | __initramfs_end = .; | 142 | __initramfs_end = .; |
143 | #endif | ||
142 | 144 | ||
143 | . = ALIGN(4096); | 145 | . = ALIGN(4096); |
144 | __init_end = .; | 146 | __init_end = .; |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index eaed402ad346..eaaac3788110 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -7,6 +7,10 @@ config MMU | |||
7 | bool | 7 | bool |
8 | default y | 8 | default y |
9 | 9 | ||
10 | config ZONE_DMA | ||
11 | bool | ||
12 | default y | ||
13 | |||
10 | config LOCKDEP_SUPPORT | 14 | config LOCKDEP_SUPPORT |
11 | bool | 15 | bool |
12 | default y | 16 | default y |
@@ -37,6 +41,9 @@ config GENERIC_HWEIGHT | |||
37 | config GENERIC_TIME | 41 | config GENERIC_TIME |
38 | def_bool y | 42 | def_bool y |
39 | 43 | ||
44 | config NO_IOMEM | ||
45 | def_bool y | ||
46 | |||
40 | mainmenu "Linux Kernel Configuration" | 47 | mainmenu "Linux Kernel Configuration" |
41 | 48 | ||
42 | config S390 | 49 | config S390 |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 666bb6daa148..664c669b1856 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -398,51 +398,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) | |||
398 | return err; | 398 | return err; |
399 | } | 399 | } |
400 | 400 | ||
401 | struct sysinfo32 { | ||
402 | s32 uptime; | ||
403 | u32 loads[3]; | ||
404 | u32 totalram; | ||
405 | u32 freeram; | ||
406 | u32 sharedram; | ||
407 | u32 bufferram; | ||
408 | u32 totalswap; | ||
409 | u32 freeswap; | ||
410 | unsigned short procs; | ||
411 | unsigned short pads; | ||
412 | u32 totalhigh; | ||
413 | u32 freehigh; | ||
414 | unsigned int mem_unit; | ||
415 | char _f[8]; | ||
416 | }; | ||
417 | |||
418 | asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info) | ||
419 | { | ||
420 | struct sysinfo s; | ||
421 | int ret, err; | ||
422 | mm_segment_t old_fs = get_fs (); | ||
423 | |||
424 | set_fs (KERNEL_DS); | ||
425 | ret = sys_sysinfo((struct sysinfo __force __user *) &s); | ||
426 | set_fs (old_fs); | ||
427 | err = put_user (s.uptime, &info->uptime); | ||
428 | err |= __put_user (s.loads[0], &info->loads[0]); | ||
429 | err |= __put_user (s.loads[1], &info->loads[1]); | ||
430 | err |= __put_user (s.loads[2], &info->loads[2]); | ||
431 | err |= __put_user (s.totalram, &info->totalram); | ||
432 | err |= __put_user (s.freeram, &info->freeram); | ||
433 | err |= __put_user (s.sharedram, &info->sharedram); | ||
434 | err |= __put_user (s.bufferram, &info->bufferram); | ||
435 | err |= __put_user (s.totalswap, &info->totalswap); | ||
436 | err |= __put_user (s.freeswap, &info->freeswap); | ||
437 | err |= __put_user (s.procs, &info->procs); | ||
438 | err |= __put_user (s.totalhigh, &info->totalhigh); | ||
439 | err |= __put_user (s.freehigh, &info->freehigh); | ||
440 | err |= __put_user (s.mem_unit, &info->mem_unit); | ||
441 | if (err) | ||
442 | return -EFAULT; | ||
443 | return ret; | ||
444 | } | ||
445 | |||
446 | asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, | 401 | asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, |
447 | struct compat_timespec __user *interval) | 402 | struct compat_timespec __user *interval) |
448 | { | 403 | { |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 71e54ef0931e..97901296894e 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -517,10 +517,10 @@ sys32_swapoff_wrapper: | |||
517 | llgtr %r2,%r2 # const char * | 517 | llgtr %r2,%r2 # const char * |
518 | jg sys_swapoff # branch to system call | 518 | jg sys_swapoff # branch to system call |
519 | 519 | ||
520 | .globl sys32_sysinfo_wrapper | 520 | .globl compat_sys_sysinfo_wrapper |
521 | sys32_sysinfo_wrapper: | 521 | compat_sys_sysinfo_wrapper: |
522 | llgtr %r2,%r2 # struct sysinfo_emu31 * | 522 | llgtr %r2,%r2 # struct sysinfo_emu31 * |
523 | jg sys32_sysinfo # branch to system call | 523 | jg compat_sys_sysinfo # branch to system call |
524 | 524 | ||
525 | .globl sys32_ipc_wrapper | 525 | .globl sys32_ipc_wrapper |
526 | sys32_ipc_wrapper: | 526 | sys32_ipc_wrapper: |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index a4ceae3dbcf1..a52c44455bf0 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -124,7 +124,7 @@ NI_SYSCALL /* old "idle" system call */ | |||
124 | NI_SYSCALL /* vm86old for i386 */ | 124 | NI_SYSCALL /* vm86old for i386 */ |
125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4_wrapper) | 125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4_wrapper) |
126 | SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ | 126 | SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ |
127 | SYSCALL(sys_sysinfo,sys_sysinfo,sys32_sysinfo_wrapper) | 127 | SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) |
128 | SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) | 128 | SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) |
129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) | 129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) |
130 | SYSCALL(sys_sigreturn_glue,sys_sigreturn_glue,sys32_sigreturn_glue) | 130 | SYSCALL(sys_sigreturn_glue,sys_sigreturn_glue,sys32_sigreturn_glue) |
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index a48907392522..c30716ae130c 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S | |||
@@ -91,11 +91,14 @@ SECTIONS | |||
91 | .con_initcall.init : { *(.con_initcall.init) } | 91 | .con_initcall.init : { *(.con_initcall.init) } |
92 | __con_initcall_end = .; | 92 | __con_initcall_end = .; |
93 | SECURITY_INIT | 93 | SECURITY_INIT |
94 | |||
95 | #ifdef CONFIG_BLK_DEV_INITRD | ||
94 | . = ALIGN(256); | 96 | . = ALIGN(256); |
95 | __initramfs_start = .; | 97 | __initramfs_start = .; |
96 | .init.ramfs : { *(.init.initramfs) } | 98 | .init.ramfs : { *(.init.initramfs) } |
97 | . = ALIGN(2); | 99 | . = ALIGN(2); |
98 | __initramfs_end = .; | 100 | __initramfs_end = .; |
101 | #endif | ||
99 | . = ALIGN(256); | 102 | . = ALIGN(256); |
100 | __per_cpu_start = .; | 103 | __per_cpu_start = .; |
101 | .data.percpu : { *(.data.percpu) } | 104 | .data.percpu : { *(.data.percpu) } |
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile index 8e09db1edbb9..f95449b29fa5 100644 --- a/arch/s390/mm/Makefile +++ b/arch/s390/mm/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for the linux s390-specific parts of the memory manager. | 2 | # Makefile for the linux s390-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o fault.o ioremap.o extmem.o mmap.o vmem.o | 5 | obj-y := init.o fault.o extmem.o mmap.o vmem.o |
6 | obj-$(CONFIG_CMM) += cmm.o | 6 | obj-$(CONFIG_CMM) += cmm.o |
7 | 7 | ||
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 9ff143e87746..641aef36ccc4 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -83,12 +83,10 @@ static inline int notify_page_fault(enum die_val val, const char *str, | |||
83 | } | 83 | } |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | extern spinlock_t timerlist_lock; | ||
87 | 86 | ||
88 | /* | 87 | /* |
89 | * Unlock any spinlocks which will prevent us from getting the | 88 | * Unlock any spinlocks which will prevent us from getting the |
90 | * message out (timerlist_lock is acquired through the | 89 | * message out. |
91 | * console unblank code) | ||
92 | */ | 90 | */ |
93 | void bust_spinlocks(int yes) | 91 | void bust_spinlocks(int yes) |
94 | { | 92 | { |
diff --git a/arch/s390/mm/ioremap.c b/arch/s390/mm/ioremap.c deleted file mode 100644 index 3d2100a4e209..000000000000 --- a/arch/s390/mm/ioremap.c +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * arch/s390/mm/ioremap.c | ||
3 | * | ||
4 | * S390 version | ||
5 | * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation | ||
6 | * Author(s): Hartmut Penner (hp@de.ibm.com) | ||
7 | * | ||
8 | * Derived from "arch/i386/mm/extable.c" | ||
9 | * (C) Copyright 1995 1996 Linus Torvalds | ||
10 | * | ||
11 | * Re-map IO memory to kernel address space so that we can access it. | ||
12 | * This is needed for high PCI addresses that aren't mapped in the | ||
13 | * 640k-1MB IO memory area on PC's | ||
14 | */ | ||
15 | |||
16 | #include <linux/vmalloc.h> | ||
17 | #include <linux/mm.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <asm/pgalloc.h> | ||
20 | |||
21 | /* | ||
22 | * Generic mapping function (not visible outside): | ||
23 | */ | ||
24 | |||
25 | /* | ||
26 | * Remap an arbitrary physical address space into the kernel virtual | ||
27 | * address space. Needed when the kernel wants to access high addresses | ||
28 | * directly. | ||
29 | */ | ||
30 | void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) | ||
31 | { | ||
32 | void * addr; | ||
33 | struct vm_struct * area; | ||
34 | |||
35 | if (phys_addr < virt_to_phys(high_memory)) | ||
36 | return phys_to_virt(phys_addr); | ||
37 | if (phys_addr & ~PAGE_MASK) | ||
38 | return NULL; | ||
39 | size = PAGE_ALIGN(size); | ||
40 | if (!size || size > phys_addr + size) | ||
41 | return NULL; | ||
42 | area = get_vm_area(size, VM_IOREMAP); | ||
43 | if (!area) | ||
44 | return NULL; | ||
45 | addr = area->addr; | ||
46 | if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, | ||
47 | phys_addr, __pgprot(flags))) { | ||
48 | vfree(addr); | ||
49 | return NULL; | ||
50 | } | ||
51 | return addr; | ||
52 | } | ||
53 | |||
54 | void iounmap(void *addr) | ||
55 | { | ||
56 | if (addr > high_memory) | ||
57 | vfree(addr); | ||
58 | } | ||
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index c206c9504c4b..d47e775962e9 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c | |||
@@ -41,14 +41,6 @@ static int null_rtc_set_time(const time_t secs) | |||
41 | void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time; | 41 | void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time; |
42 | int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; | 42 | int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; |
43 | 43 | ||
44 | /* | ||
45 | * Scheduler clock - returns current time in nanosec units. | ||
46 | */ | ||
47 | unsigned long long __attribute__ ((weak)) sched_clock(void) | ||
48 | { | ||
49 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
50 | } | ||
51 | |||
52 | #ifndef CONFIG_GENERIC_TIME | 44 | #ifndef CONFIG_GENERIC_TIME |
53 | void do_gettimeofday(struct timeval *tv) | 45 | void do_gettimeofday(struct timeval *tv) |
54 | { | 46 | { |
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index f34bdcc33a7d..75de165867a0 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S | |||
@@ -83,9 +83,13 @@ SECTIONS | |||
83 | .con_initcall.init : { *(.con_initcall.init) } | 83 | .con_initcall.init : { *(.con_initcall.init) } |
84 | __con_initcall_end = .; | 84 | __con_initcall_end = .; |
85 | SECURITY_INIT | 85 | SECURITY_INIT |
86 | |||
87 | #ifdef CONFIG_BLK_DEV_INITRD | ||
86 | __initramfs_start = .; | 88 | __initramfs_start = .; |
87 | .init.ramfs : { *(.init.ramfs) } | 89 | .init.ramfs : { *(.init.ramfs) } |
88 | __initramfs_end = .; | 90 | __initramfs_end = .; |
91 | #endif | ||
92 | |||
89 | __machvec_start = .; | 93 | __machvec_start = .; |
90 | .init.machvec : { *(.init.machvec) } | 94 | .init.machvec : { *(.init.machvec) } |
91 | __machvec_end = .; | 95 | __machvec_end = .; |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 29bd37b1488e..bf0c263cb6fd 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -158,7 +158,6 @@ void __init paging_init(void) | |||
158 | * Setup some defaults for the zone sizes.. these should be safe | 158 | * Setup some defaults for the zone sizes.. these should be safe |
159 | * regardless of distcontiguous memory or MMU settings. | 159 | * regardless of distcontiguous memory or MMU settings. |
160 | */ | 160 | */ |
161 | zones_size[ZONE_DMA] = 0 >> PAGE_SHIFT; | ||
162 | zones_size[ZONE_NORMAL] = __MEMORY_SIZE >> PAGE_SHIFT; | 161 | zones_size[ZONE_NORMAL] = __MEMORY_SIZE >> PAGE_SHIFT; |
163 | #ifdef CONFIG_HIGHMEM | 162 | #ifdef CONFIG_HIGHMEM |
164 | zones_size[ZONE_HIGHMEM] = 0 >> PAGE_SHIFT; | 163 | zones_size[ZONE_HIGHMEM] = 0 >> PAGE_SHIFT; |
@@ -170,8 +169,6 @@ void __init paging_init(void) | |||
170 | * the zone sizes accordingly, in addition to turning it on. | 169 | * the zone sizes accordingly, in addition to turning it on. |
171 | */ | 170 | */ |
172 | { | 171 | { |
173 | unsigned long max_dma, low, start_pfn; | ||
174 | |||
175 | /* We don't need to map the kernel through the TLB, as | 172 | /* We don't need to map the kernel through the TLB, as |
176 | * it is permanatly mapped using P1. So clear the | 173 | * it is permanatly mapped using P1. So clear the |
177 | * entire pgd. */ | 174 | * entire pgd. */ |
@@ -179,19 +176,7 @@ void __init paging_init(void) | |||
179 | 176 | ||
180 | /* Turn on the MMU */ | 177 | /* Turn on the MMU */ |
181 | enable_mmu(); | 178 | enable_mmu(); |
182 | 179 | zones_size[ZONE_NORMAL] = MAX_LOW_PFN - START_PFN; | |
183 | /* Fixup the zone sizes */ | ||
184 | start_pfn = START_PFN; | ||
185 | max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; | ||
186 | low = MAX_LOW_PFN; | ||
187 | |||
188 | if (low < max_dma) { | ||
189 | zones_size[ZONE_DMA] = low - start_pfn; | ||
190 | zones_size[ZONE_NORMAL] = 0; | ||
191 | } else { | ||
192 | zones_size[ZONE_DMA] = max_dma - start_pfn; | ||
193 | zones_size[ZONE_NORMAL] = low - max_dma; | ||
194 | } | ||
195 | } | 180 | } |
196 | 181 | ||
197 | /* Set an initial value for the MMU.TTB so we don't have to | 182 | /* Set an initial value for the MMU.TTB so we don't have to |
diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig index 7bc0744b7ab6..e14b533558c8 100644 --- a/arch/sh64/Kconfig +++ b/arch/sh64/Kconfig | |||
@@ -36,9 +36,6 @@ config GENERIC_CALIBRATE_DELAY | |||
36 | config RWSEM_XCHGADD_ALGORITHM | 36 | config RWSEM_XCHGADD_ALGORITHM |
37 | bool | 37 | bool |
38 | 38 | ||
39 | config GENERIC_ISA_DMA | ||
40 | bool | ||
41 | |||
42 | config ARCH_HAS_ILOG2_U32 | 39 | config ARCH_HAS_ILOG2_U32 |
43 | bool | 40 | bool |
44 | default n | 41 | default n |
diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c index 9c4a38a8698c..390b40de7cef 100644 --- a/arch/sh64/kernel/time.c +++ b/arch/sh64/kernel/time.c | |||
@@ -579,12 +579,3 @@ void enter_deep_standby(void) | |||
579 | asm __volatile__ ("nop"); | 579 | asm __volatile__ ("nop"); |
580 | panic("Unexpected wakeup!\n"); | 580 | panic("Unexpected wakeup!\n"); |
581 | } | 581 | } |
582 | |||
583 | /* | ||
584 | * Scheduler clock - returns current time in nanosec units. | ||
585 | */ | ||
586 | unsigned long long sched_clock(void) | ||
587 | { | ||
588 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
589 | } | ||
590 | |||
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S index 95c4d753e357..a59c5e998131 100644 --- a/arch/sh64/kernel/vmlinux.lds.S +++ b/arch/sh64/kernel/vmlinux.lds.S | |||
@@ -115,9 +115,13 @@ SECTIONS | |||
115 | .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) } | 115 | .con_initcall.init : C_PHYS(.con_initcall.init) { *(.con_initcall.init) } |
116 | __con_initcall_end = .; | 116 | __con_initcall_end = .; |
117 | SECURITY_INIT | 117 | SECURITY_INIT |
118 | |||
119 | #ifdef CONFIG_BLK_DEV_INITRD | ||
118 | __initramfs_start = .; | 120 | __initramfs_start = .; |
119 | .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) } | 121 | .init.ramfs : C_PHYS(.init.ramfs) { *(.init.ramfs) } |
120 | __initramfs_end = .; | 122 | __initramfs_end = .; |
123 | #endif | ||
124 | |||
121 | . = ALIGN(PAGE_SIZE); | 125 | . = ALIGN(PAGE_SIZE); |
122 | __init_end = .; | 126 | __init_end = .; |
123 | 127 | ||
diff --git a/arch/sh64/mm/init.c b/arch/sh64/mm/init.c index 83295bd21aa7..5dc08787259c 100644 --- a/arch/sh64/mm/init.c +++ b/arch/sh64/mm/init.c | |||
@@ -118,10 +118,7 @@ void __init paging_init(void) | |||
118 | 118 | ||
119 | mmu_context_cache = MMU_CONTEXT_FIRST_VERSION; | 119 | mmu_context_cache = MMU_CONTEXT_FIRST_VERSION; |
120 | 120 | ||
121 | /* | 121 | zones_size[ZONE_NORMAL] = MAX_LOW_PFN - START_PFN; |
122 | * All memory is good as ZONE_NORMAL (fall-through) and ZONE_DMA. | ||
123 | */ | ||
124 | zones_size[ZONE_DMA] = MAX_LOW_PFN - START_PFN; | ||
125 | NODE_DATA(0)->node_mem_map = NULL; | 122 | NODE_DATA(0)->node_mem_map = NULL; |
126 | free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); | 123 | free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); |
127 | } | 124 | } |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index d0dec1ea2eed..bd992c0048f0 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -13,6 +13,10 @@ config HIGHMEM | |||
13 | bool | 13 | bool |
14 | default y | 14 | default y |
15 | 15 | ||
16 | config ZONE_DMA | ||
17 | bool | ||
18 | default y | ||
19 | |||
16 | config GENERIC_ISA_DMA | 20 | config GENERIC_ISA_DMA |
17 | bool | 21 | bool |
18 | default y | 22 | default y |
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 6616ee05c313..e795f282dece 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -12,7 +12,9 @@ obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \ | |||
12 | sys_sparc.o sunos_asm.o systbls.o \ | 12 | sys_sparc.o sunos_asm.o systbls.o \ |
13 | time.o windows.o cpu.o devices.o sclow.o \ | 13 | time.o windows.o cpu.o devices.o sclow.o \ |
14 | tadpole.o tick14.o ptrace.o sys_solaris.o \ | 14 | tadpole.o tick14.o ptrace.o sys_solaris.o \ |
15 | unaligned.o muldiv.o semaphore.o prom.o of_device.o | 15 | unaligned.o muldiv.o semaphore.o prom.o of_device.o devres.o |
16 | |||
17 | devres-y = ../../../kernel/irq/devres.o | ||
16 | 18 | ||
17 | obj-$(CONFIG_PCI) += pcic.o | 19 | obj-$(CONFIG_PCI) += pcic.o |
18 | obj-$(CONFIG_SUN4) += sun4setup.o | 20 | obj-$(CONFIG_SUN4) += sun4setup.o |
diff --git a/arch/sparc/kernel/sunos_ioctl.c b/arch/sparc/kernel/sunos_ioctl.c index a6ba3d26222c..32e8274e4357 100644 --- a/arch/sparc/kernel/sunos_ioctl.c +++ b/arch/sparc/kernel/sunos_ioctl.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/termios.h> | 13 | #include <linux/termios.h> |
14 | #include <linux/tty.h> | ||
14 | #include <linux/ioctl.h> | 15 | #include <linux/ioctl.h> |
15 | #include <linux/route.h> | 16 | #include <linux/route.h> |
16 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 2fcce000d877..9bb1240aaf8a 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
@@ -436,15 +436,6 @@ static inline unsigned long do_gettimeoffset(void) | |||
436 | return (*master_l10_counter >> 10) & 0x1fffff; | 436 | return (*master_l10_counter >> 10) & 0x1fffff; |
437 | } | 437 | } |
438 | 438 | ||
439 | /* | ||
440 | * Returns nanoseconds | ||
441 | * XXX This is a suboptimal implementation. | ||
442 | */ | ||
443 | unsigned long long sched_clock(void) | ||
444 | { | ||
445 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
446 | } | ||
447 | |||
448 | /* Ok, my cute asm atomicity trick doesn't work anymore. | 439 | /* Ok, my cute asm atomicity trick doesn't work anymore. |
449 | * There are just too many variables that need to be protected | 440 | * There are just too many variables that need to be protected |
450 | * now (both members of xtime, et al.) | 441 | * now (both members of xtime, et al.) |
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index b73e6b9067ed..e5c24e0521de 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S | |||
@@ -57,10 +57,14 @@ SECTIONS | |||
57 | .con_initcall.init : { *(.con_initcall.init) } | 57 | .con_initcall.init : { *(.con_initcall.init) } |
58 | __con_initcall_end = .; | 58 | __con_initcall_end = .; |
59 | SECURITY_INIT | 59 | SECURITY_INIT |
60 | |||
61 | #ifdef CONFIG_BLK_DEV_INITRD | ||
60 | . = ALIGN(4096); | 62 | . = ALIGN(4096); |
61 | __initramfs_start = .; | 63 | __initramfs_start = .; |
62 | .init.ramfs : { *(.init.ramfs) } | 64 | .init.ramfs : { *(.init.ramfs) } |
63 | __initramfs_end = .; | 65 | __initramfs_end = .; |
66 | #endif | ||
67 | |||
64 | . = ALIGN(32); | 68 | . = ALIGN(32); |
65 | __per_cpu_start = .; | 69 | __per_cpu_start = .; |
66 | .data.percpu : { *(.data.percpu) } | 70 | .data.percpu : { *(.data.percpu) } |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index d41f66ac7fff..fb84647dbf3d 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -232,6 +232,10 @@ config LARGE_ALLOCS | |||
232 | 232 | ||
233 | source "mm/Kconfig" | 233 | source "mm/Kconfig" |
234 | 234 | ||
235 | config ZONE_DMA | ||
236 | bool | ||
237 | default y | ||
238 | |||
235 | config GENERIC_ISA_DMA | 239 | config GENERIC_ISA_DMA |
236 | bool | 240 | bool |
237 | default y | 241 | default y |
diff --git a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c index 3f619ead22cc..a05e43d51755 100644 --- a/arch/sparc64/kernel/sunos_ioctl32.c +++ b/arch/sparc64/kernel/sunos_ioctl32.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/termios.h> | 13 | #include <linux/termios.h> |
14 | #include <linux/tty.h> | ||
14 | #include <linux/ioctl.h> | 15 | #include <linux/ioctl.h> |
15 | #include <linux/route.h> | 16 | #include <linux/route.h> |
16 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index e27cb71bd8e2..7876a0226285 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c | |||
@@ -459,70 +459,6 @@ asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) | |||
459 | return sys_sysfs(option, arg1, arg2); | 459 | return sys_sysfs(option, arg1, arg2); |
460 | } | 460 | } |
461 | 461 | ||
462 | struct sysinfo32 { | ||
463 | s32 uptime; | ||
464 | u32 loads[3]; | ||
465 | u32 totalram; | ||
466 | u32 freeram; | ||
467 | u32 sharedram; | ||
468 | u32 bufferram; | ||
469 | u32 totalswap; | ||
470 | u32 freeswap; | ||
471 | unsigned short procs; | ||
472 | unsigned short pad; | ||
473 | u32 totalhigh; | ||
474 | u32 freehigh; | ||
475 | u32 mem_unit; | ||
476 | char _f[20-2*sizeof(int)-sizeof(int)]; | ||
477 | }; | ||
478 | |||
479 | asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info) | ||
480 | { | ||
481 | struct sysinfo s; | ||
482 | int ret, err; | ||
483 | int bitcount = 0; | ||
484 | mm_segment_t old_fs = get_fs (); | ||
485 | |||
486 | set_fs(KERNEL_DS); | ||
487 | ret = sys_sysinfo((struct sysinfo __user *) &s); | ||
488 | set_fs(old_fs); | ||
489 | /* Check to see if any memory value is too large for 32-bit and | ||
490 | * scale down if needed. | ||
491 | */ | ||
492 | if ((s.totalram >> 32) || (s.totalswap >> 32)) { | ||
493 | while (s.mem_unit < PAGE_SIZE) { | ||
494 | s.mem_unit <<= 1; | ||
495 | bitcount++; | ||
496 | } | ||
497 | s.totalram >>= bitcount; | ||
498 | s.freeram >>= bitcount; | ||
499 | s.sharedram >>= bitcount; | ||
500 | s.bufferram >>= bitcount; | ||
501 | s.totalswap >>= bitcount; | ||
502 | s.freeswap >>= bitcount; | ||
503 | s.totalhigh >>= bitcount; | ||
504 | s.freehigh >>= bitcount; | ||
505 | } | ||
506 | |||
507 | err = put_user (s.uptime, &info->uptime); | ||
508 | err |= __put_user (s.loads[0], &info->loads[0]); | ||
509 | err |= __put_user (s.loads[1], &info->loads[1]); | ||
510 | err |= __put_user (s.loads[2], &info->loads[2]); | ||
511 | err |= __put_user (s.totalram, &info->totalram); | ||
512 | err |= __put_user (s.freeram, &info->freeram); | ||
513 | err |= __put_user (s.sharedram, &info->sharedram); | ||
514 | err |= __put_user (s.bufferram, &info->bufferram); | ||
515 | err |= __put_user (s.totalswap, &info->totalswap); | ||
516 | err |= __put_user (s.freeswap, &info->freeswap); | ||
517 | err |= __put_user (s.procs, &info->procs); | ||
518 | err |= __put_user (s.totalhigh, &info->totalhigh); | ||
519 | err |= __put_user (s.freehigh, &info->freehigh); | ||
520 | err |= __put_user (s.mem_unit, &info->mem_unit); | ||
521 | if (err) | ||
522 | return -EFAULT; | ||
523 | return ret; | ||
524 | } | ||
525 | |||
526 | asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval) | 462 | asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval) |
527 | { | 463 | { |
528 | struct timespec t; | 464 | struct timespec t; |
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index 9a8026797ac0..948b7d2d5874 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S | |||
@@ -61,7 +61,7 @@ sys_call_table32: | |||
61 | .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask | 61 | .word sys32_epoll_wait, sys32_ioprio_set, sys_getppid, sys32_sigaction, sys_sgetmask |
62 | /*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir | 62 | /*200*/ .word sys32_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir |
63 | .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64 | 63 | .word sys32_readahead, sys32_socketcall, sys32_syslog, sys32_lookup_dcookie, sys32_fadvise64 |
64 | /*210*/ .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, sys32_sysinfo | 64 | /*210*/ .word sys32_fadvise64_64, sys32_tgkill, sys32_waitpid, sys_swapoff, compat_sys_sysinfo |
65 | .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex | 65 | .word sys32_ipc, sys32_sigreturn, sys_clone, sys32_ioprio_get, compat_sys_adjtimex |
66 | /*220*/ .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid | 66 | /*220*/ .word sys32_sigprocmask, sys_ni_syscall, sys32_delete_module, sys_ni_syscall, sys32_getpgid |
67 | .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16 | 67 | .word sys32_bdflush, sys32_sysfs, sys_nis_syscall, sys32_setfsuid16, sys32_setfsgid16 |
diff --git a/arch/sparc64/kernel/vmlinux.lds.S b/arch/sparc64/kernel/vmlinux.lds.S index 4a6063f33e7a..13fa2a2e4513 100644 --- a/arch/sparc64/kernel/vmlinux.lds.S +++ b/arch/sparc64/kernel/vmlinux.lds.S | |||
@@ -81,10 +81,14 @@ SECTIONS | |||
81 | __sun4v_2insn_patch = .; | 81 | __sun4v_2insn_patch = .; |
82 | .sun4v_2insn_patch : { *(.sun4v_2insn_patch) } | 82 | .sun4v_2insn_patch : { *(.sun4v_2insn_patch) } |
83 | __sun4v_2insn_patch_end = .; | 83 | __sun4v_2insn_patch_end = .; |
84 | |||
85 | #ifdef CONFIG_BLK_DEV_INITRD | ||
84 | . = ALIGN(8192); | 86 | . = ALIGN(8192); |
85 | __initramfs_start = .; | 87 | __initramfs_start = .; |
86 | .init.ramfs : { *(.init.ramfs) } | 88 | .init.ramfs : { *(.init.ramfs) } |
87 | __initramfs_end = .; | 89 | __initramfs_end = .; |
90 | #endif | ||
91 | |||
88 | . = ALIGN(8192); | 92 | . = ALIGN(8192); |
89 | __per_cpu_start = .; | 93 | __per_cpu_start = .; |
90 | .data.percpu : { *(.data.percpu) } | 94 | .data.percpu : { *(.data.percpu) } |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 054822a3e05e..09d434f41e4b 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -416,7 +416,7 @@ void show_mem(void) | |||
416 | printk("Free swap: %6ldkB\n", | 416 | printk("Free swap: %6ldkB\n", |
417 | nr_swap_pages << (PAGE_SHIFT-10)); | 417 | nr_swap_pages << (PAGE_SHIFT-10)); |
418 | printk("%ld pages of RAM\n", num_physpages); | 418 | printk("%ld pages of RAM\n", num_physpages); |
419 | printk("%d free pages\n", nr_free_pages()); | 419 | printk("%lu free pages\n", nr_free_pages()); |
420 | } | 420 | } |
421 | 421 | ||
422 | void mmu_info(struct seq_file *m) | 422 | void mmu_info(struct seq_file *m) |
@@ -1593,7 +1593,7 @@ void __init mem_init(void) | |||
1593 | initpages = (((unsigned long) __init_end) - ((unsigned long) __init_begin)); | 1593 | initpages = (((unsigned long) __init_end) - ((unsigned long) __init_begin)); |
1594 | initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT; | 1594 | initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT; |
1595 | 1595 | ||
1596 | printk("Memory: %uk available (%ldk kernel code, %ldk data, %ldk init) [%016lx,%016lx]\n", | 1596 | printk("Memory: %luk available (%ldk kernel code, %ldk data, %ldk init) [%016lx,%016lx]\n", |
1597 | nr_free_pages() << (PAGE_SHIFT-10), | 1597 | nr_free_pages() << (PAGE_SHIFT-10), |
1598 | codepages << (PAGE_SHIFT-10), | 1598 | codepages << (PAGE_SHIFT-10), |
1599 | datapages << (PAGE_SHIFT-10), | 1599 | datapages << (PAGE_SHIFT-10), |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index d32a80e6668c..b3a21ba77cd2 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -16,6 +16,9 @@ config MMU | |||
16 | bool | 16 | bool |
17 | default y | 17 | default y |
18 | 18 | ||
19 | config NO_IOMEM | ||
20 | def_bool y | ||
21 | |||
19 | mainmenu "Linux/Usermode Kernel Configuration" | 22 | mainmenu "Linux/Usermode Kernel Configuration" |
20 | 23 | ||
21 | config ISA | 24 | config ISA |
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 7d4190e55654..7b8baf146acc 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c | |||
@@ -19,44 +19,11 @@ | |||
19 | #include "line.h" | 19 | #include "line.h" |
20 | #include "os.h" | 20 | #include "os.h" |
21 | 21 | ||
22 | /* XXX: could well be moved to somewhere else, if needed. */ | ||
23 | static int my_printf(const char * fmt, ...) | ||
24 | __attribute__ ((format (printf, 1, 2))); | ||
25 | |||
26 | static int my_printf(const char * fmt, ...) | ||
27 | { | ||
28 | /* Yes, can be called on atomic context.*/ | ||
29 | char *buf = kmalloc(4096, GFP_ATOMIC); | ||
30 | va_list args; | ||
31 | int r; | ||
32 | |||
33 | if (!buf) { | ||
34 | /* We print directly fmt. | ||
35 | * Yes, yes, yes, feel free to complain. */ | ||
36 | r = strlen(fmt); | ||
37 | } else { | ||
38 | va_start(args, fmt); | ||
39 | r = vsprintf(buf, fmt, args); | ||
40 | va_end(args); | ||
41 | fmt = buf; | ||
42 | } | ||
43 | |||
44 | if (r) | ||
45 | r = os_write_file(1, fmt, r); | ||
46 | return r; | ||
47 | |||
48 | } | ||
49 | |||
50 | #ifdef CONFIG_NOCONFIG_CHAN | 22 | #ifdef CONFIG_NOCONFIG_CHAN |
51 | /* Despite its name, there's no added trailing newline. */ | 23 | static void *not_configged_init(char *str, int device, |
52 | static int my_puts(const char * buf) | 24 | const struct chan_opts *opts) |
53 | { | ||
54 | return os_write_file(1, buf, strlen(buf)); | ||
55 | } | ||
56 | |||
57 | static void *not_configged_init(char *str, int device, struct chan_opts *opts) | ||
58 | { | 25 | { |
59 | my_puts("Using a channel type which is configured out of " | 26 | printk("Using a channel type which is configured out of " |
60 | "UML\n"); | 27 | "UML\n"); |
61 | return NULL; | 28 | return NULL; |
62 | } | 29 | } |
@@ -64,34 +31,34 @@ static void *not_configged_init(char *str, int device, struct chan_opts *opts) | |||
64 | static int not_configged_open(int input, int output, int primary, void *data, | 31 | static int not_configged_open(int input, int output, int primary, void *data, |
65 | char **dev_out) | 32 | char **dev_out) |
66 | { | 33 | { |
67 | my_puts("Using a channel type which is configured out of " | 34 | printk("Using a channel type which is configured out of " |
68 | "UML\n"); | 35 | "UML\n"); |
69 | return -ENODEV; | 36 | return -ENODEV; |
70 | } | 37 | } |
71 | 38 | ||
72 | static void not_configged_close(int fd, void *data) | 39 | static void not_configged_close(int fd, void *data) |
73 | { | 40 | { |
74 | my_puts("Using a channel type which is configured out of " | 41 | printk("Using a channel type which is configured out of " |
75 | "UML\n"); | 42 | "UML\n"); |
76 | } | 43 | } |
77 | 44 | ||
78 | static int not_configged_read(int fd, char *c_out, void *data) | 45 | static int not_configged_read(int fd, char *c_out, void *data) |
79 | { | 46 | { |
80 | my_puts("Using a channel type which is configured out of " | 47 | printk("Using a channel type which is configured out of " |
81 | "UML\n"); | 48 | "UML\n"); |
82 | return -EIO; | 49 | return -EIO; |
83 | } | 50 | } |
84 | 51 | ||
85 | static int not_configged_write(int fd, const char *buf, int len, void *data) | 52 | static int not_configged_write(int fd, const char *buf, int len, void *data) |
86 | { | 53 | { |
87 | my_puts("Using a channel type which is configured out of " | 54 | printk("Using a channel type which is configured out of " |
88 | "UML\n"); | 55 | "UML\n"); |
89 | return -EIO; | 56 | return -EIO; |
90 | } | 57 | } |
91 | 58 | ||
92 | static int not_configged_console_write(int fd, const char *buf, int len) | 59 | static int not_configged_console_write(int fd, const char *buf, int len) |
93 | { | 60 | { |
94 | my_puts("Using a channel type which is configured out of " | 61 | printk("Using a channel type which is configured out of " |
95 | "UML\n"); | 62 | "UML\n"); |
96 | return -EIO; | 63 | return -EIO; |
97 | } | 64 | } |
@@ -99,14 +66,14 @@ static int not_configged_console_write(int fd, const char *buf, int len) | |||
99 | static int not_configged_window_size(int fd, void *data, unsigned short *rows, | 66 | static int not_configged_window_size(int fd, void *data, unsigned short *rows, |
100 | unsigned short *cols) | 67 | unsigned short *cols) |
101 | { | 68 | { |
102 | my_puts("Using a channel type which is configured out of " | 69 | printk("Using a channel type which is configured out of " |
103 | "UML\n"); | 70 | "UML\n"); |
104 | return -ENODEV; | 71 | return -ENODEV; |
105 | } | 72 | } |
106 | 73 | ||
107 | static void not_configged_free(void *data) | 74 | static void not_configged_free(void *data) |
108 | { | 75 | { |
109 | my_puts("Using a channel type which is configured out of " | 76 | printk("Using a channel type which is configured out of " |
110 | "UML\n"); | 77 | "UML\n"); |
111 | } | 78 | } |
112 | 79 | ||
@@ -255,15 +222,28 @@ void enable_chan(struct line *line) | |||
255 | } | 222 | } |
256 | } | 223 | } |
257 | 224 | ||
225 | /* Items are added in IRQ context, when free_irq can't be called, and | ||
226 | * removed in process context, when it can. | ||
227 | * This handles interrupt sources which disappear, and which need to | ||
228 | * be permanently disabled. This is discovered in IRQ context, but | ||
229 | * the freeing of the IRQ must be done later. | ||
230 | */ | ||
231 | static DEFINE_SPINLOCK(irqs_to_free_lock); | ||
258 | static LIST_HEAD(irqs_to_free); | 232 | static LIST_HEAD(irqs_to_free); |
259 | 233 | ||
260 | void free_irqs(void) | 234 | void free_irqs(void) |
261 | { | 235 | { |
262 | struct chan *chan; | 236 | struct chan *chan; |
237 | LIST_HEAD(list); | ||
238 | struct list_head *ele; | ||
263 | 239 | ||
264 | while(!list_empty(&irqs_to_free)){ | 240 | spin_lock_irq(&irqs_to_free_lock); |
265 | chan = list_entry(irqs_to_free.next, struct chan, free_list); | 241 | list_splice_init(&irqs_to_free, &list); |
266 | list_del(&chan->free_list); | 242 | INIT_LIST_HEAD(&irqs_to_free); |
243 | spin_unlock_irq(&irqs_to_free_lock); | ||
244 | |||
245 | list_for_each(ele, &list){ | ||
246 | chan = list_entry(ele, struct chan, free_list); | ||
267 | 247 | ||
268 | if(chan->input) | 248 | if(chan->input) |
269 | free_irq(chan->line->driver->read_irq, chan); | 249 | free_irq(chan->line->driver->read_irq, chan); |
@@ -279,7 +259,9 @@ static void close_one_chan(struct chan *chan, int delay_free_irq) | |||
279 | return; | 259 | return; |
280 | 260 | ||
281 | if(delay_free_irq){ | 261 | if(delay_free_irq){ |
262 | spin_lock_irq(&irqs_to_free_lock); | ||
282 | list_add(&chan->free_list, &irqs_to_free); | 263 | list_add(&chan->free_list, &irqs_to_free); |
264 | spin_unlock_irq(&irqs_to_free_lock); | ||
283 | } | 265 | } |
284 | else { | 266 | else { |
285 | if(chan->input) | 267 | if(chan->input) |
@@ -372,8 +354,7 @@ int console_write_chan(struct list_head *chans, const char *buf, int len) | |||
372 | return ret; | 354 | return ret; |
373 | } | 355 | } |
374 | 356 | ||
375 | int console_open_chan(struct line *line, struct console *co, | 357 | int console_open_chan(struct line *line, struct console *co) |
376 | const struct chan_opts *opts) | ||
377 | { | 358 | { |
378 | int err; | 359 | int err; |
379 | 360 | ||
@@ -381,7 +362,7 @@ int console_open_chan(struct line *line, struct console *co, | |||
381 | if(err) | 362 | if(err) |
382 | return err; | 363 | return err; |
383 | 364 | ||
384 | printk("Console initialized on /dev/%s%d\n",co->name,co->index); | 365 | printk("Console initialized on /dev/%s%d\n", co->name, co->index); |
385 | return 0; | 366 | return 0; |
386 | } | 367 | } |
387 | 368 | ||
@@ -534,7 +515,7 @@ static const struct chan_type chan_table[] = { | |||
534 | }; | 515 | }; |
535 | 516 | ||
536 | static struct chan *parse_chan(struct line *line, char *str, int device, | 517 | static struct chan *parse_chan(struct line *line, char *str, int device, |
537 | const struct chan_opts *opts) | 518 | const struct chan_opts *opts, char **error_out) |
538 | { | 519 | { |
539 | const struct chan_type *entry; | 520 | const struct chan_type *entry; |
540 | const struct chan_ops *ops; | 521 | const struct chan_ops *ops; |
@@ -553,19 +534,21 @@ static struct chan *parse_chan(struct line *line, char *str, int device, | |||
553 | } | 534 | } |
554 | } | 535 | } |
555 | if(ops == NULL){ | 536 | if(ops == NULL){ |
556 | my_printf("parse_chan couldn't parse \"%s\"\n", | 537 | *error_out = "No match for configured backends"; |
557 | str); | ||
558 | return NULL; | 538 | return NULL; |
559 | } | 539 | } |
560 | if(ops->init == NULL) | 540 | |
561 | return NULL; | ||
562 | data = (*ops->init)(str, device, opts); | 541 | data = (*ops->init)(str, device, opts); |
563 | if(data == NULL) | 542 | if(data == NULL){ |
543 | *error_out = "Configuration failed"; | ||
564 | return NULL; | 544 | return NULL; |
545 | } | ||
565 | 546 | ||
566 | chan = kmalloc(sizeof(*chan), GFP_ATOMIC); | 547 | chan = kmalloc(sizeof(*chan), GFP_ATOMIC); |
567 | if(chan == NULL) | 548 | if(chan == NULL){ |
549 | *error_out = "Memory allocation failed"; | ||
568 | return NULL; | 550 | return NULL; |
551 | } | ||
569 | *chan = ((struct chan) { .list = LIST_HEAD_INIT(chan->list), | 552 | *chan = ((struct chan) { .list = LIST_HEAD_INIT(chan->list), |
570 | .free_list = | 553 | .free_list = |
571 | LIST_HEAD_INIT(chan->free_list), | 554 | LIST_HEAD_INIT(chan->free_list), |
@@ -582,7 +565,7 @@ static struct chan *parse_chan(struct line *line, char *str, int device, | |||
582 | } | 565 | } |
583 | 566 | ||
584 | int parse_chan_pair(char *str, struct line *line, int device, | 567 | int parse_chan_pair(char *str, struct line *line, int device, |
585 | const struct chan_opts *opts) | 568 | const struct chan_opts *opts, char **error_out) |
586 | { | 569 | { |
587 | struct list_head *chans = &line->chan_list; | 570 | struct list_head *chans = &line->chan_list; |
588 | struct chan *new, *chan; | 571 | struct chan *new, *chan; |
@@ -599,14 +582,14 @@ int parse_chan_pair(char *str, struct line *line, int device, | |||
599 | in = str; | 582 | in = str; |
600 | *out = '\0'; | 583 | *out = '\0'; |
601 | out++; | 584 | out++; |
602 | new = parse_chan(line, in, device, opts); | 585 | new = parse_chan(line, in, device, opts, error_out); |
603 | if(new == NULL) | 586 | if(new == NULL) |
604 | return -1; | 587 | return -1; |
605 | 588 | ||
606 | new->input = 1; | 589 | new->input = 1; |
607 | list_add(&new->list, chans); | 590 | list_add(&new->list, chans); |
608 | 591 | ||
609 | new = parse_chan(line, out, device, opts); | 592 | new = parse_chan(line, out, device, opts, error_out); |
610 | if(new == NULL) | 593 | if(new == NULL) |
611 | return -1; | 594 | return -1; |
612 | 595 | ||
@@ -614,7 +597,7 @@ int parse_chan_pair(char *str, struct line *line, int device, | |||
614 | new->output = 1; | 597 | new->output = 1; |
615 | } | 598 | } |
616 | else { | 599 | else { |
617 | new = parse_chan(line, str, device, opts); | 600 | new = parse_chan(line, str, device, opts, error_out); |
618 | if(new == NULL) | 601 | if(new == NULL) |
619 | return -1; | 602 | return -1; |
620 | 603 | ||
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c index 64ff22aa077b..73c5caa7a150 100644 --- a/arch/um/drivers/harddog_kern.c +++ b/arch/um/drivers/harddog_kern.c | |||
@@ -9,10 +9,10 @@ | |||
9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
10 | * as published by the Free Software Foundation; either version | 10 | * as published by the Free Software Foundation; either version |
11 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
12 | * | 12 | * |
13 | * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide | 13 | * Neither Alan Cox nor CymruNet Ltd. admit liability nor provide |
14 | * warranty for any of this software. This material is provided | 14 | * warranty for any of this software. This material is provided |
15 | * "AS-IS" and at no charge. | 15 | * "AS-IS" and at no charge. |
16 | * | 16 | * |
17 | * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> | 17 | * (c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk> |
18 | * | 18 | * |
@@ -29,11 +29,11 @@ | |||
29 | * Made SMP safe for 2.3.x | 29 | * Made SMP safe for 2.3.x |
30 | * | 30 | * |
31 | * 20011127 Joel Becker (jlbec@evilplan.org> | 31 | * 20011127 Joel Becker (jlbec@evilplan.org> |
32 | * Added soft_noboot; Allows testing the softdog trigger without | 32 | * Added soft_noboot; Allows testing the softdog trigger without |
33 | * requiring a recompile. | 33 | * requiring a recompile. |
34 | * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT. | 34 | * Added WDIOC_GETTIMEOUT and WDIOC_SETTIMOUT. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/types.h> | 38 | #include <linux/types.h> |
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
@@ -44,12 +44,13 @@ | |||
44 | #include <linux/reboot.h> | 44 | #include <linux/reboot.h> |
45 | #include <linux/smp_lock.h> | 45 | #include <linux/smp_lock.h> |
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/spinlock.h> | ||
47 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
48 | #include "mconsole.h" | 49 | #include "mconsole.h" |
49 | 50 | ||
50 | MODULE_LICENSE("GPL"); | 51 | MODULE_LICENSE("GPL"); |
51 | 52 | ||
52 | /* Locked by the BKL in harddog_open and harddog_release */ | 53 | static DEFINE_SPINLOCK(lock); |
53 | static int timer_alive; | 54 | static int timer_alive; |
54 | static int harddog_in_fd = -1; | 55 | static int harddog_in_fd = -1; |
55 | static int harddog_out_fd = -1; | 56 | static int harddog_out_fd = -1; |
@@ -57,18 +58,18 @@ static int harddog_out_fd = -1; | |||
57 | /* | 58 | /* |
58 | * Allow only one person to hold it open | 59 | * Allow only one person to hold it open |
59 | */ | 60 | */ |
60 | 61 | ||
61 | extern int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock); | 62 | extern int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock); |
62 | 63 | ||
63 | static int harddog_open(struct inode *inode, struct file *file) | 64 | static int harddog_open(struct inode *inode, struct file *file) |
64 | { | 65 | { |
65 | int err; | 66 | int err = -EBUSY; |
66 | char *sock = NULL; | 67 | char *sock = NULL; |
67 | 68 | ||
68 | lock_kernel(); | 69 | spin_lock(&lock); |
69 | if(timer_alive) | 70 | if(timer_alive) |
70 | return -EBUSY; | 71 | goto err; |
71 | #ifdef CONFIG_HARDDOG_NOWAYOUT | 72 | #ifdef CONFIG_HARDDOG_NOWAYOUT |
72 | __module_get(THIS_MODULE); | 73 | __module_get(THIS_MODULE); |
73 | #endif | 74 | #endif |
74 | 75 | ||
@@ -76,11 +77,15 @@ static int harddog_open(struct inode *inode, struct file *file) | |||
76 | sock = mconsole_notify_socket(); | 77 | sock = mconsole_notify_socket(); |
77 | #endif | 78 | #endif |
78 | err = start_watchdog(&harddog_in_fd, &harddog_out_fd, sock); | 79 | err = start_watchdog(&harddog_in_fd, &harddog_out_fd, sock); |
79 | if(err) return(err); | 80 | if(err) |
81 | goto err; | ||
80 | 82 | ||
81 | timer_alive = 1; | 83 | timer_alive = 1; |
82 | unlock_kernel(); | 84 | spin_unlock(&lock); |
83 | return nonseekable_open(inode, file); | 85 | return nonseekable_open(inode, file); |
86 | err: | ||
87 | spin_unlock(&lock); | ||
88 | return err; | ||
84 | } | 89 | } |
85 | 90 | ||
86 | extern void stop_watchdog(int in_fd, int out_fd); | 91 | extern void stop_watchdog(int in_fd, int out_fd); |
@@ -90,14 +95,16 @@ static int harddog_release(struct inode *inode, struct file *file) | |||
90 | /* | 95 | /* |
91 | * Shut off the timer. | 96 | * Shut off the timer. |
92 | */ | 97 | */ |
93 | lock_kernel(); | 98 | |
99 | spin_lock(&lock); | ||
94 | 100 | ||
95 | stop_watchdog(harddog_in_fd, harddog_out_fd); | 101 | stop_watchdog(harddog_in_fd, harddog_out_fd); |
96 | harddog_in_fd = -1; | 102 | harddog_in_fd = -1; |
97 | harddog_out_fd = -1; | 103 | harddog_out_fd = -1; |
98 | 104 | ||
99 | timer_alive=0; | 105 | timer_alive=0; |
100 | unlock_kernel(); | 106 | spin_unlock(&lock); |
107 | |||
101 | return 0; | 108 | return 0; |
102 | } | 109 | } |
103 | 110 | ||
@@ -110,7 +117,7 @@ static ssize_t harddog_write(struct file *file, const char __user *data, size_t | |||
110 | * Refresh the timer. | 117 | * Refresh the timer. |
111 | */ | 118 | */ |
112 | if(len) | 119 | if(len) |
113 | return(ping_watchdog(harddog_out_fd)); | 120 | return ping_watchdog(harddog_out_fd); |
114 | return 0; | 121 | return 0; |
115 | } | 122 | } |
116 | 123 | ||
@@ -134,7 +141,7 @@ static int harddog_ioctl(struct inode *inode, struct file *file, | |||
134 | case WDIOC_GETBOOTSTATUS: | 141 | case WDIOC_GETBOOTSTATUS: |
135 | return put_user(0,(int __user *)argp); | 142 | return put_user(0,(int __user *)argp); |
136 | case WDIOC_KEEPALIVE: | 143 | case WDIOC_KEEPALIVE: |
137 | return(ping_watchdog(harddog_out_fd)); | 144 | return ping_watchdog(harddog_out_fd); |
138 | } | 145 | } |
139 | } | 146 | } |
140 | 147 | ||
@@ -165,7 +172,7 @@ static int __init harddog_init(void) | |||
165 | 172 | ||
166 | printk(banner); | 173 | printk(banner); |
167 | 174 | ||
168 | return(0); | 175 | return 0; |
169 | } | 176 | } |
170 | 177 | ||
171 | static void __exit harddog_exit(void) | 178 | static void __exit harddog_exit(void) |
@@ -175,14 +182,3 @@ static void __exit harddog_exit(void) | |||
175 | 182 | ||
176 | module_init(harddog_init); | 183 | module_init(harddog_init); |
177 | module_exit(harddog_exit); | 184 | module_exit(harddog_exit); |
178 | |||
179 | /* | ||
180 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
181 | * Emacs will notice this stuff at the end of the file and automatically | ||
182 | * adjust the settings for this buffer only. This must remain at the end | ||
183 | * of the file. | ||
184 | * --------------------------------------------------------------------------- | ||
185 | * Local variables: | ||
186 | * c-file-style: "linux" | ||
187 | * End: | ||
188 | */ | ||
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c index def013b5a3c7..c495ecf263b1 100644 --- a/arch/um/drivers/harddog_user.c +++ b/arch/um/drivers/harddog_user.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -38,7 +38,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock) | |||
38 | int in_fds[2], out_fds[2], pid, n, err; | 38 | int in_fds[2], out_fds[2], pid, n, err; |
39 | char pid_buf[sizeof("nnnnn\0")], c; | 39 | char pid_buf[sizeof("nnnnn\0")], c; |
40 | char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL }; | 40 | char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL }; |
41 | char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL, | 41 | char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL, |
42 | NULL }; | 42 | NULL }; |
43 | char **args = NULL; | 43 | char **args = NULL; |
44 | 44 | ||
@@ -96,7 +96,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock) | |||
96 | } | 96 | } |
97 | *in_fd_ret = in_fds[0]; | 97 | *in_fd_ret = in_fds[0]; |
98 | *out_fd_ret = out_fds[1]; | 98 | *out_fd_ret = out_fds[1]; |
99 | return(0); | 99 | return 0; |
100 | 100 | ||
101 | out_close_in: | 101 | out_close_in: |
102 | os_close_file(in_fds[0]); | 102 | os_close_file(in_fds[0]); |
@@ -105,7 +105,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock) | |||
105 | os_close_file(out_fds[0]); | 105 | os_close_file(out_fds[0]); |
106 | os_close_file(out_fds[1]); | 106 | os_close_file(out_fds[1]); |
107 | out: | 107 | out: |
108 | return(err); | 108 | return err; |
109 | } | 109 | } |
110 | 110 | ||
111 | void stop_watchdog(int in_fd, int out_fd) | 111 | void stop_watchdog(int in_fd, int out_fd) |
@@ -123,20 +123,9 @@ int ping_watchdog(int fd) | |||
123 | if(n != sizeof(c)){ | 123 | if(n != sizeof(c)){ |
124 | printk("ping_watchdog - write failed, err = %d\n", -n); | 124 | printk("ping_watchdog - write failed, err = %d\n", -n); |
125 | if(n < 0) | 125 | if(n < 0) |
126 | return(n); | 126 | return n; |
127 | return(-EIO); | 127 | return -EIO; |
128 | } | 128 | } |
129 | return 1; | 129 | return 1; |
130 | 130 | ||
131 | } | 131 | } |
132 | |||
133 | /* | ||
134 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
135 | * Emacs will notice this stuff at the end of the file and automatically | ||
136 | * adjust the settings for this buffer only. This must remain at the end | ||
137 | * of the file. | ||
138 | * --------------------------------------------------------------------------- | ||
139 | * Local variables: | ||
140 | * c-file-style: "linux" | ||
141 | * End: | ||
142 | */ | ||
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index a0d148ea63d6..10e08a8c17c3 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c | |||
@@ -15,19 +15,22 @@ | |||
15 | #include "os.h" | 15 | #include "os.h" |
16 | 16 | ||
17 | struct hostaudio_state { | 17 | struct hostaudio_state { |
18 | int fd; | 18 | int fd; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | struct hostmixer_state { | 21 | struct hostmixer_state { |
22 | int fd; | 22 | int fd; |
23 | }; | 23 | }; |
24 | 24 | ||
25 | #define HOSTAUDIO_DEV_DSP "/dev/sound/dsp" | 25 | #define HOSTAUDIO_DEV_DSP "/dev/sound/dsp" |
26 | #define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer" | 26 | #define HOSTAUDIO_DEV_MIXER "/dev/sound/mixer" |
27 | 27 | ||
28 | /* Only changed from linux_main at boot time */ | 28 | /* Changed either at boot time or module load time. At boot, this is |
29 | char *dsp = HOSTAUDIO_DEV_DSP; | 29 | * single-threaded; at module load, multiple modules would each have |
30 | char *mixer = HOSTAUDIO_DEV_MIXER; | 30 | * their own copy of these variables. |
31 | */ | ||
32 | static char *dsp = HOSTAUDIO_DEV_DSP; | ||
33 | static char *mixer = HOSTAUDIO_DEV_MIXER; | ||
31 | 34 | ||
32 | #define DSP_HELP \ | 35 | #define DSP_HELP \ |
33 | " This is used to specify the host dsp device to the hostaudio driver.\n" \ | 36 | " This is used to specify the host dsp device to the hostaudio driver.\n" \ |
@@ -69,12 +72,12 @@ MODULE_PARM_DESC(mixer, MIXER_HELP); | |||
69 | static ssize_t hostaudio_read(struct file *file, char __user *buffer, | 72 | static ssize_t hostaudio_read(struct file *file, char __user *buffer, |
70 | size_t count, loff_t *ppos) | 73 | size_t count, loff_t *ppos) |
71 | { | 74 | { |
72 | struct hostaudio_state *state = file->private_data; | 75 | struct hostaudio_state *state = file->private_data; |
73 | void *kbuf; | 76 | void *kbuf; |
74 | int err; | 77 | int err; |
75 | 78 | ||
76 | #ifdef DEBUG | 79 | #ifdef DEBUG |
77 | printk("hostaudio: read called, count = %d\n", count); | 80 | printk("hostaudio: read called, count = %d\n", count); |
78 | #endif | 81 | #endif |
79 | 82 | ||
80 | kbuf = kmalloc(count, GFP_KERNEL); | 83 | kbuf = kmalloc(count, GFP_KERNEL); |
@@ -88,7 +91,7 @@ static ssize_t hostaudio_read(struct file *file, char __user *buffer, | |||
88 | if(copy_to_user(buffer, kbuf, err)) | 91 | if(copy_to_user(buffer, kbuf, err)) |
89 | err = -EFAULT; | 92 | err = -EFAULT; |
90 | 93 | ||
91 | out: | 94 | out: |
92 | kfree(kbuf); | 95 | kfree(kbuf); |
93 | return(err); | 96 | return(err); |
94 | } | 97 | } |
@@ -96,12 +99,12 @@ static ssize_t hostaudio_read(struct file *file, char __user *buffer, | |||
96 | static ssize_t hostaudio_write(struct file *file, const char __user *buffer, | 99 | static ssize_t hostaudio_write(struct file *file, const char __user *buffer, |
97 | size_t count, loff_t *ppos) | 100 | size_t count, loff_t *ppos) |
98 | { | 101 | { |
99 | struct hostaudio_state *state = file->private_data; | 102 | struct hostaudio_state *state = file->private_data; |
100 | void *kbuf; | 103 | void *kbuf; |
101 | int err; | 104 | int err; |
102 | 105 | ||
103 | #ifdef DEBUG | 106 | #ifdef DEBUG |
104 | printk("hostaudio: write called, count = %d\n", count); | 107 | printk("hostaudio: write called, count = %d\n", count); |
105 | #endif | 108 | #endif |
106 | 109 | ||
107 | kbuf = kmalloc(count, GFP_KERNEL); | 110 | kbuf = kmalloc(count, GFP_KERNEL); |
@@ -125,24 +128,24 @@ static ssize_t hostaudio_write(struct file *file, const char __user *buffer, | |||
125 | static unsigned int hostaudio_poll(struct file *file, | 128 | static unsigned int hostaudio_poll(struct file *file, |
126 | struct poll_table_struct *wait) | 129 | struct poll_table_struct *wait) |
127 | { | 130 | { |
128 | unsigned int mask = 0; | 131 | unsigned int mask = 0; |
129 | 132 | ||
130 | #ifdef DEBUG | 133 | #ifdef DEBUG |
131 | printk("hostaudio: poll called (unimplemented)\n"); | 134 | printk("hostaudio: poll called (unimplemented)\n"); |
132 | #endif | 135 | #endif |
133 | 136 | ||
134 | return(mask); | 137 | return(mask); |
135 | } | 138 | } |
136 | 139 | ||
137 | static int hostaudio_ioctl(struct inode *inode, struct file *file, | 140 | static int hostaudio_ioctl(struct inode *inode, struct file *file, |
138 | unsigned int cmd, unsigned long arg) | 141 | unsigned int cmd, unsigned long arg) |
139 | { | 142 | { |
140 | struct hostaudio_state *state = file->private_data; | 143 | struct hostaudio_state *state = file->private_data; |
141 | unsigned long data = 0; | 144 | unsigned long data = 0; |
142 | int err; | 145 | int err; |
143 | 146 | ||
144 | #ifdef DEBUG | 147 | #ifdef DEBUG |
145 | printk("hostaudio: ioctl called, cmd = %u\n", cmd); | 148 | printk("hostaudio: ioctl called, cmd = %u\n", cmd); |
146 | #endif | 149 | #endif |
147 | switch(cmd){ | 150 | switch(cmd){ |
148 | case SNDCTL_DSP_SPEED: | 151 | case SNDCTL_DSP_SPEED: |
@@ -179,42 +182,40 @@ static int hostaudio_ioctl(struct inode *inode, struct file *file, | |||
179 | 182 | ||
180 | static int hostaudio_open(struct inode *inode, struct file *file) | 183 | static int hostaudio_open(struct inode *inode, struct file *file) |
181 | { | 184 | { |
182 | struct hostaudio_state *state; | 185 | struct hostaudio_state *state; |
183 | int r = 0, w = 0; | 186 | int r = 0, w = 0; |
184 | int ret; | 187 | int ret; |
185 | 188 | ||
186 | #ifdef DEBUG | 189 | #ifdef DEBUG |
187 | printk("hostaudio: open called (host: %s)\n", dsp); | 190 | printk("hostaudio: open called (host: %s)\n", dsp); |
188 | #endif | 191 | #endif |
189 | 192 | ||
190 | state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL); | 193 | state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL); |
191 | if(state == NULL) | 194 | if(state == NULL) |
192 | return(-ENOMEM); | 195 | return(-ENOMEM); |
193 | 196 | ||
194 | if(file->f_mode & FMODE_READ) r = 1; | 197 | if(file->f_mode & FMODE_READ) r = 1; |
195 | if(file->f_mode & FMODE_WRITE) w = 1; | 198 | if(file->f_mode & FMODE_WRITE) w = 1; |
196 | 199 | ||
197 | ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); | 200 | ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); |
198 | if(ret < 0){ | 201 | if(ret < 0){ |
199 | kfree(state); | 202 | kfree(state); |
200 | return(ret); | 203 | return(ret); |
201 | } | 204 | } |
202 | |||
203 | state->fd = ret; | 205 | state->fd = ret; |
204 | file->private_data = state; | 206 | file->private_data = state; |
205 | return(0); | 207 | return(0); |
206 | } | 208 | } |
207 | 209 | ||
208 | static int hostaudio_release(struct inode *inode, struct file *file) | 210 | static int hostaudio_release(struct inode *inode, struct file *file) |
209 | { | 211 | { |
210 | struct hostaudio_state *state = file->private_data; | 212 | struct hostaudio_state *state = file->private_data; |
211 | 213 | ||
212 | #ifdef DEBUG | 214 | #ifdef DEBUG |
213 | printk("hostaudio: release called\n"); | 215 | printk("hostaudio: release called\n"); |
214 | #endif | 216 | #endif |
215 | 217 | os_close_file(state->fd); | |
216 | os_close_file(state->fd); | 218 | kfree(state); |
217 | kfree(state); | ||
218 | 219 | ||
219 | return(0); | 220 | return(0); |
220 | } | 221 | } |
@@ -224,10 +225,10 @@ static int hostaudio_release(struct inode *inode, struct file *file) | |||
224 | static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file, | 225 | static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file, |
225 | unsigned int cmd, unsigned long arg) | 226 | unsigned int cmd, unsigned long arg) |
226 | { | 227 | { |
227 | struct hostmixer_state *state = file->private_data; | 228 | struct hostmixer_state *state = file->private_data; |
228 | 229 | ||
229 | #ifdef DEBUG | 230 | #ifdef DEBUG |
230 | printk("hostmixer: ioctl called\n"); | 231 | printk("hostmixer: ioctl called\n"); |
231 | #endif | 232 | #endif |
232 | 233 | ||
233 | return(os_ioctl_generic(state->fd, cmd, arg)); | 234 | return(os_ioctl_generic(state->fd, cmd, arg)); |
@@ -235,68 +236,67 @@ static int hostmixer_ioctl_mixdev(struct inode *inode, struct file *file, | |||
235 | 236 | ||
236 | static int hostmixer_open_mixdev(struct inode *inode, struct file *file) | 237 | static int hostmixer_open_mixdev(struct inode *inode, struct file *file) |
237 | { | 238 | { |
238 | struct hostmixer_state *state; | 239 | struct hostmixer_state *state; |
239 | int r = 0, w = 0; | 240 | int r = 0, w = 0; |
240 | int ret; | 241 | int ret; |
241 | 242 | ||
242 | #ifdef DEBUG | 243 | #ifdef DEBUG |
243 | printk("hostmixer: open called (host: %s)\n", mixer); | 244 | printk("hostmixer: open called (host: %s)\n", mixer); |
244 | #endif | 245 | #endif |
245 | 246 | ||
246 | state = kmalloc(sizeof(struct hostmixer_state), GFP_KERNEL); | 247 | state = kmalloc(sizeof(struct hostmixer_state), GFP_KERNEL); |
247 | if(state == NULL) return(-ENOMEM); | 248 | if(state == NULL) return(-ENOMEM); |
248 | 249 | ||
249 | if(file->f_mode & FMODE_READ) r = 1; | 250 | if(file->f_mode & FMODE_READ) r = 1; |
250 | if(file->f_mode & FMODE_WRITE) w = 1; | 251 | if(file->f_mode & FMODE_WRITE) w = 1; |
251 | 252 | ||
252 | ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); | 253 | ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); |
253 | 254 | ||
254 | if(ret < 0){ | 255 | if(ret < 0){ |
255 | printk("hostaudio_open_mixdev failed to open '%s', err = %d\n", | 256 | printk("hostaudio_open_mixdev failed to open '%s', err = %d\n", |
256 | dsp, -ret); | 257 | dsp, -ret); |
257 | kfree(state); | 258 | kfree(state); |
258 | return(ret); | 259 | return(ret); |
259 | } | 260 | } |
260 | 261 | ||
261 | file->private_data = state; | 262 | file->private_data = state; |
262 | return(0); | 263 | return(0); |
263 | } | 264 | } |
264 | 265 | ||
265 | static int hostmixer_release(struct inode *inode, struct file *file) | 266 | static int hostmixer_release(struct inode *inode, struct file *file) |
266 | { | 267 | { |
267 | struct hostmixer_state *state = file->private_data; | 268 | struct hostmixer_state *state = file->private_data; |
268 | 269 | ||
269 | #ifdef DEBUG | 270 | #ifdef DEBUG |
270 | printk("hostmixer: release called\n"); | 271 | printk("hostmixer: release called\n"); |
271 | #endif | 272 | #endif |
272 | 273 | ||
273 | os_close_file(state->fd); | 274 | os_close_file(state->fd); |
274 | kfree(state); | 275 | kfree(state); |
275 | 276 | ||
276 | return(0); | 277 | return(0); |
277 | } | 278 | } |
278 | 279 | ||
279 | |||
280 | /* kernel module operations */ | 280 | /* kernel module operations */ |
281 | 281 | ||
282 | static const struct file_operations hostaudio_fops = { | 282 | static const struct file_operations hostaudio_fops = { |
283 | .owner = THIS_MODULE, | 283 | .owner = THIS_MODULE, |
284 | .llseek = no_llseek, | 284 | .llseek = no_llseek, |
285 | .read = hostaudio_read, | 285 | .read = hostaudio_read, |
286 | .write = hostaudio_write, | 286 | .write = hostaudio_write, |
287 | .poll = hostaudio_poll, | 287 | .poll = hostaudio_poll, |
288 | .ioctl = hostaudio_ioctl, | 288 | .ioctl = hostaudio_ioctl, |
289 | .mmap = NULL, | 289 | .mmap = NULL, |
290 | .open = hostaudio_open, | 290 | .open = hostaudio_open, |
291 | .release = hostaudio_release, | 291 | .release = hostaudio_release, |
292 | }; | 292 | }; |
293 | 293 | ||
294 | static const struct file_operations hostmixer_fops = { | 294 | static const struct file_operations hostmixer_fops = { |
295 | .owner = THIS_MODULE, | 295 | .owner = THIS_MODULE, |
296 | .llseek = no_llseek, | 296 | .llseek = no_llseek, |
297 | .ioctl = hostmixer_ioctl_mixdev, | 297 | .ioctl = hostmixer_ioctl_mixdev, |
298 | .open = hostmixer_open_mixdev, | 298 | .open = hostmixer_open_mixdev, |
299 | .release = hostmixer_release, | 299 | .release = hostmixer_release, |
300 | }; | 300 | }; |
301 | 301 | ||
302 | struct { | 302 | struct { |
@@ -310,42 +310,31 @@ MODULE_LICENSE("GPL"); | |||
310 | 310 | ||
311 | static int __init hostaudio_init_module(void) | 311 | static int __init hostaudio_init_module(void) |
312 | { | 312 | { |
313 | printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", | 313 | printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n", |
314 | dsp, mixer); | 314 | dsp, mixer); |
315 | 315 | ||
316 | module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); | 316 | module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1); |
317 | if(module_data.dev_audio < 0){ | 317 | if(module_data.dev_audio < 0){ |
318 | printk(KERN_ERR "hostaudio: couldn't register DSP device!\n"); | 318 | printk(KERN_ERR "hostaudio: couldn't register DSP device!\n"); |
319 | return -ENODEV; | 319 | return -ENODEV; |
320 | } | 320 | } |
321 | 321 | ||
322 | module_data.dev_mixer = register_sound_mixer(&hostmixer_fops, -1); | 322 | module_data.dev_mixer = register_sound_mixer(&hostmixer_fops, -1); |
323 | if(module_data.dev_mixer < 0){ | 323 | if(module_data.dev_mixer < 0){ |
324 | printk(KERN_ERR "hostmixer: couldn't register mixer " | 324 | printk(KERN_ERR "hostmixer: couldn't register mixer " |
325 | "device!\n"); | 325 | "device!\n"); |
326 | unregister_sound_dsp(module_data.dev_audio); | 326 | unregister_sound_dsp(module_data.dev_audio); |
327 | return -ENODEV; | 327 | return -ENODEV; |
328 | } | 328 | } |
329 | 329 | ||
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | static void __exit hostaudio_cleanup_module (void) | 333 | static void __exit hostaudio_cleanup_module (void) |
334 | { | 334 | { |
335 | unregister_sound_mixer(module_data.dev_mixer); | 335 | unregister_sound_mixer(module_data.dev_mixer); |
336 | unregister_sound_dsp(module_data.dev_audio); | 336 | unregister_sound_dsp(module_data.dev_audio); |
337 | } | 337 | } |
338 | 338 | ||
339 | module_init(hostaudio_init_module); | 339 | module_init(hostaudio_init_module); |
340 | module_exit(hostaudio_cleanup_module); | 340 | module_exit(hostaudio_cleanup_module); |
341 | |||
342 | /* | ||
343 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
344 | * Emacs will notice this stuff at the end of the file and automatically | ||
345 | * adjust the settings for this buffer only. This must remain at the end | ||
346 | * of the file. | ||
347 | * --------------------------------------------------------------------------- | ||
348 | * Local variables: | ||
349 | * c-file-style: "linux" | ||
350 | * End: | ||
351 | */ | ||
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 83301e1ef67c..0e1e9a20a4d6 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -191,7 +191,6 @@ void line_flush_buffer(struct tty_struct *tty) | |||
191 | /*XXX: copied from line_write, verify if it is correct!*/ | 191 | /*XXX: copied from line_write, verify if it is correct!*/ |
192 | if(tty->stopped) | 192 | if(tty->stopped) |
193 | return; | 193 | return; |
194 | //return 0; | ||
195 | 194 | ||
196 | spin_lock_irqsave(&line->lock, flags); | 195 | spin_lock_irqsave(&line->lock, flags); |
197 | err = flush_buffer(line); | 196 | err = flush_buffer(line); |
@@ -421,42 +420,55 @@ int line_setup_irq(int fd, int input, int output, struct line *line, void *data) | |||
421 | return err; | 420 | return err; |
422 | } | 421 | } |
423 | 422 | ||
423 | /* Normally, a driver like this can rely mostly on the tty layer | ||
424 | * locking, particularly when it comes to the driver structure. | ||
425 | * However, in this case, mconsole requests can come in "from the | ||
426 | * side", and race with opens and closes. | ||
427 | * | ||
428 | * mconsole config requests will want to be sure the device isn't in | ||
429 | * use, and get_config, open, and close will want a stable | ||
430 | * configuration. The checking and modification of the configuration | ||
431 | * is done under a spinlock. Checking whether the device is in use is | ||
432 | * line->tty->count > 1, also under the spinlock. | ||
433 | * | ||
434 | * tty->count serves to decide whether the device should be enabled or | ||
435 | * disabled on the host. If it's equal to 1, then we are doing the | ||
436 | * first open or last close. Otherwise, open and close just return. | ||
437 | */ | ||
438 | |||
424 | int line_open(struct line *lines, struct tty_struct *tty) | 439 | int line_open(struct line *lines, struct tty_struct *tty) |
425 | { | 440 | { |
426 | struct line *line; | 441 | struct line *line = &lines[tty->index]; |
427 | int err = -ENODEV; | 442 | int err = -ENODEV; |
428 | 443 | ||
429 | line = &lines[tty->index]; | 444 | spin_lock(&line->count_lock); |
430 | tty->driver_data = line; | 445 | if(!line->valid) |
446 | goto out_unlock; | ||
431 | 447 | ||
432 | /* The IRQ which takes this lock is not yet enabled and won't be run | 448 | err = 0; |
433 | * before the end, so we don't need to use spin_lock_irq.*/ | 449 | if(tty->count > 1) |
434 | spin_lock(&line->lock); | 450 | goto out_unlock; |
451 | |||
452 | spin_unlock(&line->count_lock); | ||
435 | 453 | ||
436 | tty->driver_data = line; | 454 | tty->driver_data = line; |
437 | line->tty = tty; | 455 | line->tty = tty; |
438 | if(!line->valid) | ||
439 | goto out; | ||
440 | 456 | ||
441 | if(tty->count == 1){ | 457 | enable_chan(line); |
442 | /* Here the device is opened, if necessary, and interrupt | 458 | INIT_DELAYED_WORK(&line->task, line_timer_cb); |
443 | * is registered. | ||
444 | */ | ||
445 | enable_chan(line); | ||
446 | INIT_DELAYED_WORK(&line->task, line_timer_cb); | ||
447 | 459 | ||
448 | if(!line->sigio){ | 460 | if(!line->sigio){ |
449 | chan_enable_winch(&line->chan_list, tty); | 461 | chan_enable_winch(&line->chan_list, tty); |
450 | line->sigio = 1; | 462 | line->sigio = 1; |
451 | } | ||
452 | |||
453 | chan_window_size(&line->chan_list, &tty->winsize.ws_row, | ||
454 | &tty->winsize.ws_col); | ||
455 | } | 463 | } |
456 | 464 | ||
457 | err = 0; | 465 | chan_window_size(&line->chan_list, &tty->winsize.ws_row, |
458 | out: | 466 | &tty->winsize.ws_col); |
459 | spin_unlock(&line->lock); | 467 | |
468 | return err; | ||
469 | |||
470 | out_unlock: | ||
471 | spin_unlock(&line->count_lock); | ||
460 | return err; | 472 | return err; |
461 | } | 473 | } |
462 | 474 | ||
@@ -466,25 +478,36 @@ void line_close(struct tty_struct *tty, struct file * filp) | |||
466 | { | 478 | { |
467 | struct line *line = tty->driver_data; | 479 | struct line *line = tty->driver_data; |
468 | 480 | ||
469 | /* XXX: I assume this should be called in process context, not with | 481 | /* If line_open fails (and tty->driver_data is never set), |
470 | * interrupts disabled! | 482 | * tty_open will call line_close. So just return in this case. |
471 | */ | 483 | */ |
472 | spin_lock_irq(&line->lock); | 484 | if(line == NULL) |
485 | return; | ||
473 | 486 | ||
474 | /* We ignore the error anyway! */ | 487 | /* We ignore the error anyway! */ |
475 | flush_buffer(line); | 488 | flush_buffer(line); |
476 | 489 | ||
477 | if(tty->count == 1){ | 490 | spin_lock(&line->count_lock); |
478 | line->tty = NULL; | 491 | if(!line->valid) |
479 | tty->driver_data = NULL; | 492 | goto out_unlock; |
480 | 493 | ||
481 | if(line->sigio){ | 494 | if(tty->count > 1) |
482 | unregister_winch(tty); | 495 | goto out_unlock; |
483 | line->sigio = 0; | 496 | |
484 | } | 497 | spin_unlock(&line->count_lock); |
498 | |||
499 | line->tty = NULL; | ||
500 | tty->driver_data = NULL; | ||
501 | |||
502 | if(line->sigio){ | ||
503 | unregister_winch(tty); | ||
504 | line->sigio = 0; | ||
485 | } | 505 | } |
486 | 506 | ||
487 | spin_unlock_irq(&line->lock); | 507 | return; |
508 | |||
509 | out_unlock: | ||
510 | spin_unlock(&line->count_lock); | ||
488 | } | 511 | } |
489 | 512 | ||
490 | void close_lines(struct line *lines, int nlines) | 513 | void close_lines(struct line *lines, int nlines) |
@@ -495,14 +518,44 @@ void close_lines(struct line *lines, int nlines) | |||
495 | close_chan(&lines[i].chan_list, 0); | 518 | close_chan(&lines[i].chan_list, 0); |
496 | } | 519 | } |
497 | 520 | ||
521 | static int setup_one_line(struct line *lines, int n, char *init, int init_prio, | ||
522 | char **error_out) | ||
523 | { | ||
524 | struct line *line = &lines[n]; | ||
525 | int err = -EINVAL; | ||
526 | |||
527 | spin_lock(&line->count_lock); | ||
528 | |||
529 | if(line->tty != NULL){ | ||
530 | *error_out = "Device is already open"; | ||
531 | goto out; | ||
532 | } | ||
533 | |||
534 | if (line->init_pri <= init_prio){ | ||
535 | line->init_pri = init_prio; | ||
536 | if (!strcmp(init, "none")) | ||
537 | line->valid = 0; | ||
538 | else { | ||
539 | line->init_str = init; | ||
540 | line->valid = 1; | ||
541 | } | ||
542 | } | ||
543 | err = 0; | ||
544 | out: | ||
545 | spin_unlock(&line->count_lock); | ||
546 | return err; | ||
547 | } | ||
548 | |||
498 | /* Common setup code for both startup command line and mconsole initialization. | 549 | /* Common setup code for both startup command line and mconsole initialization. |
499 | * @lines contains the array (of size @num) to modify; | 550 | * @lines contains the array (of size @num) to modify; |
500 | * @init is the setup string; | 551 | * @init is the setup string; |
552 | * @error_out is an error string in the case of failure; | ||
501 | */ | 553 | */ |
502 | 554 | ||
503 | int line_setup(struct line *lines, unsigned int num, char *init) | 555 | int line_setup(struct line *lines, unsigned int num, char *init, |
556 | char **error_out) | ||
504 | { | 557 | { |
505 | int i, n; | 558 | int i, n, err; |
506 | char *end; | 559 | char *end; |
507 | 560 | ||
508 | if(*init == '=') { | 561 | if(*init == '=') { |
@@ -513,73 +566,56 @@ int line_setup(struct line *lines, unsigned int num, char *init) | |||
513 | else { | 566 | else { |
514 | n = simple_strtoul(init, &end, 0); | 567 | n = simple_strtoul(init, &end, 0); |
515 | if(*end != '='){ | 568 | if(*end != '='){ |
516 | printk(KERN_ERR "line_setup failed to parse \"%s\"\n", | 569 | *error_out = "Couldn't parse device number"; |
517 | init); | 570 | return -EINVAL; |
518 | return 0; | ||
519 | } | 571 | } |
520 | init = end; | 572 | init = end; |
521 | } | 573 | } |
522 | init++; | 574 | init++; |
523 | 575 | ||
524 | if (n >= (signed int) num) { | 576 | if (n >= (signed int) num) { |
525 | printk("line_setup - %d out of range ((0 ... %d) allowed)\n", | 577 | *error_out = "Device number out of range"; |
526 | n, num - 1); | 578 | return -EINVAL; |
527 | return 0; | ||
528 | } | 579 | } |
529 | else if (n >= 0){ | 580 | else if (n >= 0){ |
530 | if (lines[n].tty != NULL) { | 581 | err = setup_one_line(lines, n, init, INIT_ONE, error_out); |
531 | printk("line_setup - device %d is open\n", n); | 582 | if(err) |
532 | return 0; | 583 | return err; |
533 | } | ||
534 | if (lines[n].init_pri <= INIT_ONE){ | ||
535 | lines[n].init_pri = INIT_ONE; | ||
536 | if (!strcmp(init, "none")) | ||
537 | lines[n].valid = 0; | ||
538 | else { | ||
539 | lines[n].init_str = init; | ||
540 | lines[n].valid = 1; | ||
541 | } | ||
542 | } | ||
543 | } | 584 | } |
544 | else { | 585 | else { |
545 | for(i = 0; i < num; i++){ | 586 | for(i = 0; i < num; i++){ |
546 | if(lines[i].init_pri <= INIT_ALL){ | 587 | err = setup_one_line(lines, i, init, INIT_ALL, |
547 | lines[i].init_pri = INIT_ALL; | 588 | error_out); |
548 | if(!strcmp(init, "none")) lines[i].valid = 0; | 589 | if(err) |
549 | else { | 590 | return err; |
550 | lines[i].init_str = init; | ||
551 | lines[i].valid = 1; | ||
552 | } | ||
553 | } | ||
554 | } | 591 | } |
555 | } | 592 | } |
556 | return n == -1 ? num : n; | 593 | return n == -1 ? num : n; |
557 | } | 594 | } |
558 | 595 | ||
559 | int line_config(struct line *lines, unsigned int num, char *str, | 596 | int line_config(struct line *lines, unsigned int num, char *str, |
560 | const struct chan_opts *opts) | 597 | const struct chan_opts *opts, char **error_out) |
561 | { | 598 | { |
562 | struct line *line; | 599 | struct line *line; |
563 | char *new; | 600 | char *new; |
564 | int n; | 601 | int n; |
565 | 602 | ||
566 | if(*str == '='){ | 603 | if(*str == '='){ |
567 | printk("line_config - can't configure all devices from " | 604 | *error_out = "Can't configure all devices from mconsole"; |
568 | "mconsole\n"); | 605 | return -EINVAL; |
569 | return 1; | ||
570 | } | 606 | } |
571 | 607 | ||
572 | new = kstrdup(str, GFP_KERNEL); | 608 | new = kstrdup(str, GFP_KERNEL); |
573 | if(new == NULL){ | 609 | if(new == NULL){ |
574 | printk("line_config - kstrdup failed\n"); | 610 | *error_out = "Failed to allocate memory"; |
575 | return 1; | 611 | return -ENOMEM; |
576 | } | 612 | } |
577 | n = line_setup(lines, num, new); | 613 | n = line_setup(lines, num, new, error_out); |
578 | if(n < 0) | 614 | if(n < 0) |
579 | return 1; | 615 | return n; |
580 | 616 | ||
581 | line = &lines[n]; | 617 | line = &lines[n]; |
582 | return parse_chan_pair(line->init_str, line, n, opts); | 618 | return parse_chan_pair(line->init_str, line, n, opts, error_out); |
583 | } | 619 | } |
584 | 620 | ||
585 | int line_get_config(char *name, struct line *lines, unsigned int num, char *str, | 621 | int line_get_config(char *name, struct line *lines, unsigned int num, char *str, |
@@ -602,13 +638,13 @@ int line_get_config(char *name, struct line *lines, unsigned int num, char *str, | |||
602 | 638 | ||
603 | line = &lines[dev]; | 639 | line = &lines[dev]; |
604 | 640 | ||
605 | spin_lock(&line->lock); | 641 | spin_lock(&line->count_lock); |
606 | if(!line->valid) | 642 | if(!line->valid) |
607 | CONFIG_CHUNK(str, size, n, "none", 1); | 643 | CONFIG_CHUNK(str, size, n, "none", 1); |
608 | else if(line->tty == NULL) | 644 | else if(line->tty == NULL) |
609 | CONFIG_CHUNK(str, size, n, line->init_str, 1); | 645 | CONFIG_CHUNK(str, size, n, line->init_str, 1); |
610 | else n = chan_config_string(&line->chan_list, str, size, error_out); | 646 | else n = chan_config_string(&line->chan_list, str, size, error_out); |
611 | spin_unlock(&line->lock); | 647 | spin_unlock(&line->count_lock); |
612 | 648 | ||
613 | return n; | 649 | return n; |
614 | } | 650 | } |
@@ -628,22 +664,21 @@ int line_id(char **str, int *start_out, int *end_out) | |||
628 | return n; | 664 | return n; |
629 | } | 665 | } |
630 | 666 | ||
631 | int line_remove(struct line *lines, unsigned int num, int n) | 667 | int line_remove(struct line *lines, unsigned int num, int n, char **error_out) |
632 | { | 668 | { |
633 | int err; | 669 | int err; |
634 | char config[sizeof("conxxxx=none\0")]; | 670 | char config[sizeof("conxxxx=none\0")]; |
635 | 671 | ||
636 | sprintf(config, "%d=none", n); | 672 | sprintf(config, "%d=none", n); |
637 | err = line_setup(lines, num, config); | 673 | err = line_setup(lines, num, config, error_out); |
638 | if(err >= 0) | 674 | if(err >= 0) |
639 | err = 0; | 675 | err = 0; |
640 | return err; | 676 | return err; |
641 | } | 677 | } |
642 | 678 | ||
643 | struct tty_driver *line_register_devfs(struct lines *set, | 679 | struct tty_driver *register_lines(struct line_driver *line_driver, |
644 | struct line_driver *line_driver, | 680 | const struct tty_operations *ops, |
645 | const struct tty_operations *ops, | 681 | struct line *lines, int nlines) |
646 | struct line *lines, int nlines) | ||
647 | { | 682 | { |
648 | int i; | 683 | int i; |
649 | struct tty_driver *driver = alloc_tty_driver(nlines); | 684 | struct tty_driver *driver = alloc_tty_driver(nlines); |
@@ -683,6 +718,7 @@ static LIST_HEAD(winch_handlers); | |||
683 | void lines_init(struct line *lines, int nlines, struct chan_opts *opts) | 718 | void lines_init(struct line *lines, int nlines, struct chan_opts *opts) |
684 | { | 719 | { |
685 | struct line *line; | 720 | struct line *line; |
721 | char *error; | ||
686 | int i; | 722 | int i; |
687 | 723 | ||
688 | for(i = 0; i < nlines; i++){ | 724 | for(i = 0; i < nlines; i++){ |
@@ -696,8 +732,9 @@ void lines_init(struct line *lines, int nlines, struct chan_opts *opts) | |||
696 | if(line->init_str == NULL) | 732 | if(line->init_str == NULL) |
697 | printk("lines_init - kstrdup returned NULL\n"); | 733 | printk("lines_init - kstrdup returned NULL\n"); |
698 | 734 | ||
699 | if(parse_chan_pair(line->init_str, line, i, opts)){ | 735 | if(parse_chan_pair(line->init_str, line, i, opts, &error)){ |
700 | printk("parse_chan_pair failed for device %d\n", i); | 736 | printk("parse_chan_pair failed for device %d : %s\n", |
737 | i, error); | ||
701 | line->valid = 0; | 738 | line->valid = 0; |
702 | } | 739 | } |
703 | } | 740 | } |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 96f0189327af..178b2eff4a8c 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include "irq_user.h" | 33 | #include "irq_user.h" |
34 | #include "init.h" | 34 | #include "init.h" |
35 | #include "os.h" | 35 | #include "os.h" |
36 | #include "umid.h" | ||
37 | #include "irq_kern.h" | 36 | #include "irq_kern.h" |
38 | #include "choose-mode.h" | 37 | #include "choose-mode.h" |
39 | 38 | ||
@@ -337,13 +336,15 @@ void mconsole_stop(struct mc_request *req) | |||
337 | mconsole_reply(req, "", 0, 0); | 336 | mconsole_reply(req, "", 0, 0); |
338 | } | 337 | } |
339 | 338 | ||
340 | /* This list is populated by __initcall routines. */ | 339 | static DEFINE_SPINLOCK(mc_devices_lock); |
341 | |||
342 | static LIST_HEAD(mconsole_devices); | 340 | static LIST_HEAD(mconsole_devices); |
343 | 341 | ||
344 | void mconsole_register_dev(struct mc_device *new) | 342 | void mconsole_register_dev(struct mc_device *new) |
345 | { | 343 | { |
344 | spin_lock(&mc_devices_lock); | ||
345 | BUG_ON(!list_empty(&new->list)); | ||
346 | list_add(&new->list, &mconsole_devices); | 346 | list_add(&new->list, &mconsole_devices); |
347 | spin_unlock(&mc_devices_lock); | ||
347 | } | 348 | } |
348 | 349 | ||
349 | static struct mc_device *mconsole_find_dev(char *name) | 350 | static struct mc_device *mconsole_find_dev(char *name) |
@@ -367,18 +368,21 @@ struct unplugged_pages { | |||
367 | void *pages[UNPLUGGED_PER_PAGE]; | 368 | void *pages[UNPLUGGED_PER_PAGE]; |
368 | }; | 369 | }; |
369 | 370 | ||
371 | static DECLARE_MUTEX(plug_mem_mutex); | ||
370 | static unsigned long long unplugged_pages_count = 0; | 372 | static unsigned long long unplugged_pages_count = 0; |
371 | static struct list_head unplugged_pages = LIST_HEAD_INIT(unplugged_pages); | 373 | static LIST_HEAD(unplugged_pages); |
372 | static int unplug_index = UNPLUGGED_PER_PAGE; | 374 | static int unplug_index = UNPLUGGED_PER_PAGE; |
373 | 375 | ||
374 | static int mem_config(char *str) | 376 | static int mem_config(char *str, char **error_out) |
375 | { | 377 | { |
376 | unsigned long long diff; | 378 | unsigned long long diff; |
377 | int err = -EINVAL, i, add; | 379 | int err = -EINVAL, i, add; |
378 | char *ret; | 380 | char *ret; |
379 | 381 | ||
380 | if(str[0] != '=') | 382 | if(str[0] != '='){ |
383 | *error_out = "Expected '=' after 'mem'"; | ||
381 | goto out; | 384 | goto out; |
385 | } | ||
382 | 386 | ||
383 | str++; | 387 | str++; |
384 | if(str[0] == '-') | 388 | if(str[0] == '-') |
@@ -386,15 +390,21 @@ static int mem_config(char *str) | |||
386 | else if(str[0] == '+'){ | 390 | else if(str[0] == '+'){ |
387 | add = 1; | 391 | add = 1; |
388 | } | 392 | } |
389 | else goto out; | 393 | else { |
394 | *error_out = "Expected increment to start with '-' or '+'"; | ||
395 | goto out; | ||
396 | } | ||
390 | 397 | ||
391 | str++; | 398 | str++; |
392 | diff = memparse(str, &ret); | 399 | diff = memparse(str, &ret); |
393 | if(*ret != '\0') | 400 | if(*ret != '\0'){ |
401 | *error_out = "Failed to parse memory increment"; | ||
394 | goto out; | 402 | goto out; |
403 | } | ||
395 | 404 | ||
396 | diff /= PAGE_SIZE; | 405 | diff /= PAGE_SIZE; |
397 | 406 | ||
407 | down(&plug_mem_mutex); | ||
398 | for(i = 0; i < diff; i++){ | 408 | for(i = 0; i < diff; i++){ |
399 | struct unplugged_pages *unplugged; | 409 | struct unplugged_pages *unplugged; |
400 | void *addr; | 410 | void *addr; |
@@ -435,11 +445,14 @@ static int mem_config(char *str) | |||
435 | unplugged = list_entry(entry, | 445 | unplugged = list_entry(entry, |
436 | struct unplugged_pages, | 446 | struct unplugged_pages, |
437 | list); | 447 | list); |
438 | unplugged->pages[unplug_index++] = addr; | ||
439 | err = os_drop_memory(addr, PAGE_SIZE); | 448 | err = os_drop_memory(addr, PAGE_SIZE); |
440 | if(err) | 449 | if(err){ |
441 | printk("Failed to release memory - " | 450 | printk("Failed to release memory - " |
442 | "errno = %d\n", err); | 451 | "errno = %d\n", err); |
452 | *error_out = "Failed to release memory"; | ||
453 | goto out_unlock; | ||
454 | } | ||
455 | unplugged->pages[unplug_index++] = addr; | ||
443 | } | 456 | } |
444 | 457 | ||
445 | unplugged_pages_count++; | 458 | unplugged_pages_count++; |
@@ -447,6 +460,8 @@ static int mem_config(char *str) | |||
447 | } | 460 | } |
448 | 461 | ||
449 | err = 0; | 462 | err = 0; |
463 | out_unlock: | ||
464 | up(&plug_mem_mutex); | ||
450 | out: | 465 | out: |
451 | return err; | 466 | return err; |
452 | } | 467 | } |
@@ -470,12 +485,14 @@ static int mem_id(char **str, int *start_out, int *end_out) | |||
470 | return 0; | 485 | return 0; |
471 | } | 486 | } |
472 | 487 | ||
473 | static int mem_remove(int n) | 488 | static int mem_remove(int n, char **error_out) |
474 | { | 489 | { |
490 | *error_out = "Memory doesn't support the remove operation"; | ||
475 | return -EBUSY; | 491 | return -EBUSY; |
476 | } | 492 | } |
477 | 493 | ||
478 | static struct mc_device mem_mc = { | 494 | static struct mc_device mem_mc = { |
495 | .list = LIST_HEAD_INIT(mem_mc.list), | ||
479 | .name = "mem", | 496 | .name = "mem", |
480 | .config = mem_config, | 497 | .config = mem_config, |
481 | .get_config = mem_get_config, | 498 | .get_config = mem_get_config, |
@@ -542,7 +559,7 @@ static void mconsole_get_config(int (*get_config)(char *, char *, int, | |||
542 | void mconsole_config(struct mc_request *req) | 559 | void mconsole_config(struct mc_request *req) |
543 | { | 560 | { |
544 | struct mc_device *dev; | 561 | struct mc_device *dev; |
545 | char *ptr = req->request.data, *name; | 562 | char *ptr = req->request.data, *name, *error_string = ""; |
546 | int err; | 563 | int err; |
547 | 564 | ||
548 | ptr += strlen("config"); | 565 | ptr += strlen("config"); |
@@ -559,8 +576,8 @@ void mconsole_config(struct mc_request *req) | |||
559 | ptr++; | 576 | ptr++; |
560 | 577 | ||
561 | if(*ptr == '='){ | 578 | if(*ptr == '='){ |
562 | err = (*dev->config)(name); | 579 | err = (*dev->config)(name, &error_string); |
563 | mconsole_reply(req, "", err, 0); | 580 | mconsole_reply(req, error_string, err, 0); |
564 | } | 581 | } |
565 | else mconsole_get_config(dev->get_config, req, name); | 582 | else mconsole_get_config(dev->get_config, req, name); |
566 | } | 583 | } |
@@ -595,13 +612,16 @@ void mconsole_remove(struct mc_request *req) | |||
595 | goto out; | 612 | goto out; |
596 | } | 613 | } |
597 | 614 | ||
598 | err = (*dev->remove)(n); | 615 | err_msg = NULL; |
616 | err = (*dev->remove)(n, &err_msg); | ||
599 | switch(err){ | 617 | switch(err){ |
600 | case -ENODEV: | 618 | case -ENODEV: |
601 | err_msg = "Device doesn't exist"; | 619 | if(err_msg == NULL) |
620 | err_msg = "Device doesn't exist"; | ||
602 | break; | 621 | break; |
603 | case -EBUSY: | 622 | case -EBUSY: |
604 | err_msg = "Device is currently open"; | 623 | if(err_msg == NULL) |
624 | err_msg = "Device is currently open"; | ||
605 | break; | 625 | break; |
606 | default: | 626 | default: |
607 | break; | 627 | break; |
@@ -615,7 +635,7 @@ struct mconsole_output { | |||
615 | struct mc_request *req; | 635 | struct mc_request *req; |
616 | }; | 636 | }; |
617 | 637 | ||
618 | static DEFINE_SPINLOCK(console_lock); | 638 | static DEFINE_SPINLOCK(client_lock); |
619 | static LIST_HEAD(clients); | 639 | static LIST_HEAD(clients); |
620 | static char console_buf[MCONSOLE_MAX_DATA]; | 640 | static char console_buf[MCONSOLE_MAX_DATA]; |
621 | static int console_index = 0; | 641 | static int console_index = 0; |
@@ -670,16 +690,18 @@ static void with_console(struct mc_request *req, void (*proc)(void *), | |||
670 | unsigned long flags; | 690 | unsigned long flags; |
671 | 691 | ||
672 | entry.req = req; | 692 | entry.req = req; |
693 | spin_lock_irqsave(&client_lock, flags); | ||
673 | list_add(&entry.list, &clients); | 694 | list_add(&entry.list, &clients); |
674 | spin_lock_irqsave(&console_lock, flags); | 695 | spin_unlock_irqrestore(&client_lock, flags); |
675 | 696 | ||
676 | (*proc)(arg); | 697 | (*proc)(arg); |
677 | 698 | ||
678 | mconsole_reply_len(req, console_buf, console_index, 0, 0); | 699 | mconsole_reply_len(req, console_buf, console_index, 0, 0); |
679 | console_index = 0; | 700 | console_index = 0; |
680 | 701 | ||
681 | spin_unlock_irqrestore(&console_lock, flags); | 702 | spin_lock_irqsave(&client_lock, flags); |
682 | list_del(&entry.list); | 703 | list_del(&entry.list); |
704 | spin_unlock_irqrestore(&client_lock, flags); | ||
683 | } | 705 | } |
684 | 706 | ||
685 | #ifdef CONFIG_MAGIC_SYSRQ | 707 | #ifdef CONFIG_MAGIC_SYSRQ |
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c index 75aef6f7ef6e..f02634fbf32a 100644 --- a/arch/um/drivers/mconsole_user.c +++ b/arch/um/drivers/mconsole_user.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include "user.h" | 16 | #include "user.h" |
17 | #include "sysdep/ptrace.h" | 17 | #include "sysdep/ptrace.h" |
18 | #include "mconsole.h" | 18 | #include "mconsole.h" |
19 | #include "umid.h" | 19 | #include "os.h" |
20 | #include "user_util.h" | 20 | #include "user_util.h" |
21 | 21 | ||
22 | static struct mconsole_command commands[] = { | 22 | static struct mconsole_command commands[] = { |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index afe3d427ddfa..04e31f86c10a 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and | 2 | * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and |
3 | * James Leu (jleu@mindspring.net). | 3 | * James Leu (jleu@mindspring.net). |
4 | * Copyright (C) 2001 by various other people who didn't put their name here. | 4 | * Copyright (C) 2001 by various other people who didn't put their name here. |
5 | * Licensed under the GPL. | 5 | * Licensed under the GPL. |
@@ -91,8 +91,8 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id) | |||
91 | spin_lock(&lp->lock); | 91 | spin_lock(&lp->lock); |
92 | while((err = uml_net_rx(dev)) > 0) ; | 92 | while((err = uml_net_rx(dev)) > 0) ; |
93 | if(err < 0) { | 93 | if(err < 0) { |
94 | printk(KERN_ERR | 94 | printk(KERN_ERR |
95 | "Device '%s' read returned %d, shutting it down\n", | 95 | "Device '%s' read returned %d, shutting it down\n", |
96 | dev->name, err); | 96 | dev->name, err); |
97 | /* dev_close can't be called in interrupt context, and takes | 97 | /* dev_close can't be called in interrupt context, and takes |
98 | * again lp->lock. | 98 | * again lp->lock. |
@@ -108,7 +108,7 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id) | |||
108 | 108 | ||
109 | out: | 109 | out: |
110 | spin_unlock(&lp->lock); | 110 | spin_unlock(&lp->lock); |
111 | return(IRQ_HANDLED); | 111 | return IRQ_HANDLED; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int uml_net_open(struct net_device *dev) | 114 | static int uml_net_open(struct net_device *dev) |
@@ -159,7 +159,7 @@ out: | |||
159 | static int uml_net_close(struct net_device *dev) | 159 | static int uml_net_close(struct net_device *dev) |
160 | { | 160 | { |
161 | struct uml_net_private *lp = dev->priv; | 161 | struct uml_net_private *lp = dev->priv; |
162 | 162 | ||
163 | netif_stop_queue(dev); | 163 | netif_stop_queue(dev); |
164 | 164 | ||
165 | free_irq(dev->irq, dev); | 165 | free_irq(dev->irq, dev); |
@@ -194,7 +194,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
194 | 194 | ||
195 | /* this is normally done in the interrupt when tx finishes */ | 195 | /* this is normally done in the interrupt when tx finishes */ |
196 | netif_wake_queue(dev); | 196 | netif_wake_queue(dev); |
197 | } | 197 | } |
198 | else if(len == 0){ | 198 | else if(len == 0){ |
199 | netif_start_queue(dev); | 199 | netif_start_queue(dev); |
200 | lp->stats.tx_dropped++; | 200 | lp->stats.tx_dropped++; |
@@ -239,7 +239,7 @@ static int uml_net_set_mac(struct net_device *dev, void *addr) | |||
239 | set_ether_mac(dev, hwaddr->sa_data); | 239 | set_ether_mac(dev, hwaddr->sa_data); |
240 | spin_unlock_irq(&lp->lock); | 240 | spin_unlock_irq(&lp->lock); |
241 | 241 | ||
242 | return(0); | 242 | return 0; |
243 | } | 243 | } |
244 | 244 | ||
245 | static int uml_net_change_mtu(struct net_device *dev, int new_mtu) | 245 | static int uml_net_change_mtu(struct net_device *dev, int new_mtu) |
@@ -333,7 +333,7 @@ static int eth_configure(int n, void *init, char *mac, | |||
333 | struct uml_net_private *lp; | 333 | struct uml_net_private *lp; |
334 | int save, err, size; | 334 | int save, err, size; |
335 | 335 | ||
336 | size = transport->private_size + sizeof(struct uml_net_private) + | 336 | size = transport->private_size + sizeof(struct uml_net_private) + |
337 | sizeof(((struct uml_net_private *) 0)->user); | 337 | sizeof(((struct uml_net_private *) 0)->user); |
338 | 338 | ||
339 | device = kzalloc(sizeof(*device), GFP_KERNEL); | 339 | device = kzalloc(sizeof(*device), GFP_KERNEL); |
@@ -438,7 +438,7 @@ static int eth_configure(int n, void *init, char *mac, | |||
438 | lp->tl.function = uml_net_user_timer_expire; | 438 | lp->tl.function = uml_net_user_timer_expire; |
439 | memcpy(lp->mac, device->mac, sizeof(lp->mac)); | 439 | memcpy(lp->mac, device->mac, sizeof(lp->mac)); |
440 | 440 | ||
441 | if (transport->user->init) | 441 | if (transport->user->init) |
442 | (*transport->user->init)(&lp->user, dev); | 442 | (*transport->user->init)(&lp->user, dev); |
443 | 443 | ||
444 | set_ether_mac(dev, device->mac); | 444 | set_ether_mac(dev, device->mac); |
@@ -460,38 +460,36 @@ static struct uml_net *find_device(int n) | |||
460 | device = NULL; | 460 | device = NULL; |
461 | out: | 461 | out: |
462 | spin_unlock(&devices_lock); | 462 | spin_unlock(&devices_lock); |
463 | return(device); | 463 | return device; |
464 | } | 464 | } |
465 | 465 | ||
466 | static int eth_parse(char *str, int *index_out, char **str_out) | 466 | static int eth_parse(char *str, int *index_out, char **str_out, |
467 | char **error_out) | ||
467 | { | 468 | { |
468 | char *end; | 469 | char *end; |
469 | int n; | 470 | int n, err = -EINVAL;; |
470 | 471 | ||
471 | n = simple_strtoul(str, &end, 0); | 472 | n = simple_strtoul(str, &end, 0); |
472 | if(end == str){ | 473 | if(end == str){ |
473 | printk(KERN_ERR "eth_setup: Failed to parse '%s'\n", str); | 474 | *error_out = "Bad device number"; |
474 | return(1); | 475 | return err; |
475 | } | ||
476 | if(n < 0){ | ||
477 | printk(KERN_ERR "eth_setup: device %d is negative\n", n); | ||
478 | return(1); | ||
479 | } | 476 | } |
477 | |||
480 | str = end; | 478 | str = end; |
481 | if(*str != '='){ | 479 | if(*str != '='){ |
482 | printk(KERN_ERR | 480 | *error_out = "Expected '=' after device number"; |
483 | "eth_setup: expected '=' after device number\n"); | 481 | return err; |
484 | return(1); | ||
485 | } | 482 | } |
483 | |||
486 | str++; | 484 | str++; |
487 | if(find_device(n)){ | 485 | if(find_device(n)){ |
488 | printk(KERN_ERR "eth_setup: Device %d already configured\n", | 486 | *error_out = "Device already configured"; |
489 | n); | 487 | return err; |
490 | return(1); | ||
491 | } | 488 | } |
492 | if(index_out) *index_out = n; | 489 | |
490 | *index_out = n; | ||
493 | *str_out = str; | 491 | *str_out = str; |
494 | return(0); | 492 | return 0; |
495 | } | 493 | } |
496 | 494 | ||
497 | struct eth_init { | 495 | struct eth_init { |
@@ -500,13 +498,11 @@ struct eth_init { | |||
500 | int index; | 498 | int index; |
501 | }; | 499 | }; |
502 | 500 | ||
503 | /* Filled in at boot time. Will need locking if the transports become | 501 | static DEFINE_SPINLOCK(transports_lock); |
504 | * modular. | 502 | static LIST_HEAD(transports); |
505 | */ | ||
506 | struct list_head transports = LIST_HEAD_INIT(transports); | ||
507 | 503 | ||
508 | /* Filled in during early boot */ | 504 | /* Filled in during early boot */ |
509 | struct list_head eth_cmd_line = LIST_HEAD_INIT(eth_cmd_line); | 505 | static LIST_HEAD(eth_cmd_line); |
510 | 506 | ||
511 | static int check_transport(struct transport *transport, char *eth, int n, | 507 | static int check_transport(struct transport *transport, char *eth, int n, |
512 | void **init_out, char **mac_out) | 508 | void **init_out, char **mac_out) |
@@ -515,23 +511,23 @@ static int check_transport(struct transport *transport, char *eth, int n, | |||
515 | 511 | ||
516 | len = strlen(transport->name); | 512 | len = strlen(transport->name); |
517 | if(strncmp(eth, transport->name, len)) | 513 | if(strncmp(eth, transport->name, len)) |
518 | return(0); | 514 | return 0; |
519 | 515 | ||
520 | eth += len; | 516 | eth += len; |
521 | if(*eth == ',') | 517 | if(*eth == ',') |
522 | eth++; | 518 | eth++; |
523 | else if(*eth != '\0') | 519 | else if(*eth != '\0') |
524 | return(0); | 520 | return 0; |
525 | 521 | ||
526 | *init_out = kmalloc(transport->setup_size, GFP_KERNEL); | 522 | *init_out = kmalloc(transport->setup_size, GFP_KERNEL); |
527 | if(*init_out == NULL) | 523 | if(*init_out == NULL) |
528 | return(1); | 524 | return 1; |
529 | 525 | ||
530 | if(!transport->setup(eth, mac_out, *init_out)){ | 526 | if(!transport->setup(eth, mac_out, *init_out)){ |
531 | kfree(*init_out); | 527 | kfree(*init_out); |
532 | *init_out = NULL; | 528 | *init_out = NULL; |
533 | } | 529 | } |
534 | return(1); | 530 | return 1; |
535 | } | 531 | } |
536 | 532 | ||
537 | void register_transport(struct transport *new) | 533 | void register_transport(struct transport *new) |
@@ -542,7 +538,10 @@ void register_transport(struct transport *new) | |||
542 | char *mac = NULL; | 538 | char *mac = NULL; |
543 | int match; | 539 | int match; |
544 | 540 | ||
541 | spin_lock(&transports_lock); | ||
542 | BUG_ON(!list_empty(&new->list)); | ||
545 | list_add(&new->list, &transports); | 543 | list_add(&new->list, &transports); |
544 | spin_unlock(&transports_lock); | ||
546 | 545 | ||
547 | list_for_each_safe(ele, next, ð_cmd_line){ | 546 | list_for_each_safe(ele, next, ð_cmd_line){ |
548 | eth = list_entry(ele, struct eth_init, list); | 547 | eth = list_entry(ele, struct eth_init, list); |
@@ -564,7 +563,9 @@ static int eth_setup_common(char *str, int index) | |||
564 | struct transport *transport; | 563 | struct transport *transport; |
565 | void *init; | 564 | void *init; |
566 | char *mac = NULL; | 565 | char *mac = NULL; |
566 | int found = 0; | ||
567 | 567 | ||
568 | spin_lock(&transports_lock); | ||
568 | list_for_each(ele, &transports){ | 569 | list_for_each(ele, &transports){ |
569 | transport = list_entry(ele, struct transport, list); | 570 | transport = list_entry(ele, struct transport, list); |
570 | if(!check_transport(transport, str, index, &init, &mac)) | 571 | if(!check_transport(transport, str, index, &init, &mac)) |
@@ -573,19 +574,26 @@ static int eth_setup_common(char *str, int index) | |||
573 | eth_configure(index, init, mac, transport); | 574 | eth_configure(index, init, mac, transport); |
574 | kfree(init); | 575 | kfree(init); |
575 | } | 576 | } |
576 | return(1); | 577 | found = 1; |
578 | break; | ||
577 | } | 579 | } |
578 | return(0); | 580 | |
581 | spin_unlock(&transports_lock); | ||
582 | return found; | ||
579 | } | 583 | } |
580 | 584 | ||
581 | static int eth_setup(char *str) | 585 | static int eth_setup(char *str) |
582 | { | 586 | { |
583 | struct eth_init *new; | 587 | struct eth_init *new; |
588 | char *error; | ||
584 | int n, err; | 589 | int n, err; |
585 | 590 | ||
586 | err = eth_parse(str, &n, &str); | 591 | err = eth_parse(str, &n, &str, &error); |
587 | if(err) | 592 | if(err){ |
593 | printk(KERN_ERR "eth_setup - Couldn't parse '%s' : %s\n", | ||
594 | str, error); | ||
588 | return 1; | 595 | return 1; |
596 | } | ||
589 | 597 | ||
590 | new = alloc_bootmem(sizeof(*new)); | 598 | new = alloc_bootmem(sizeof(*new)); |
591 | if (new == NULL){ | 599 | if (new == NULL){ |
@@ -607,38 +615,24 @@ __uml_help(eth_setup, | |||
607 | " Configure a network device.\n\n" | 615 | " Configure a network device.\n\n" |
608 | ); | 616 | ); |
609 | 617 | ||
610 | #if 0 | 618 | static int net_config(char *str, char **error_out) |
611 | static int eth_init(void) | ||
612 | { | ||
613 | struct list_head *ele, *next; | ||
614 | struct eth_init *eth; | ||
615 | |||
616 | list_for_each_safe(ele, next, ð_cmd_line){ | ||
617 | eth = list_entry(ele, struct eth_init, list); | ||
618 | |||
619 | if(eth_setup_common(eth->init, eth->index)) | ||
620 | list_del(ð->list); | ||
621 | } | ||
622 | |||
623 | return(1); | ||
624 | } | ||
625 | __initcall(eth_init); | ||
626 | #endif | ||
627 | |||
628 | static int net_config(char *str) | ||
629 | { | 619 | { |
630 | int n, err; | 620 | int n, err; |
631 | 621 | ||
632 | err = eth_parse(str, &n, &str); | 622 | err = eth_parse(str, &n, &str, error_out); |
633 | if(err) return(err); | 623 | if(err) |
624 | return err; | ||
634 | 625 | ||
626 | /* This string is broken up and the pieces used by the underlying | ||
627 | * driver. So, it is freed only if eth_setup_common fails. | ||
628 | */ | ||
635 | str = kstrdup(str, GFP_KERNEL); | 629 | str = kstrdup(str, GFP_KERNEL); |
636 | if(str == NULL){ | 630 | if(str == NULL){ |
637 | printk(KERN_ERR "net_config failed to strdup string\n"); | 631 | *error_out = "net_config failed to strdup string"; |
638 | return(-1); | 632 | return -ENOMEM; |
639 | } | 633 | } |
640 | err = !eth_setup_common(str, n); | 634 | err = !eth_setup_common(str, n); |
641 | if(err) | 635 | if(err) |
642 | kfree(str); | 636 | kfree(str); |
643 | return(err); | 637 | return(err); |
644 | } | 638 | } |
@@ -658,7 +652,7 @@ static int net_id(char **str, int *start_out, int *end_out) | |||
658 | return n; | 652 | return n; |
659 | } | 653 | } |
660 | 654 | ||
661 | static int net_remove(int n) | 655 | static int net_remove(int n, char **error_out) |
662 | { | 656 | { |
663 | struct uml_net *device; | 657 | struct uml_net *device; |
664 | struct net_device *dev; | 658 | struct net_device *dev; |
@@ -671,7 +665,7 @@ static int net_remove(int n) | |||
671 | dev = device->dev; | 665 | dev = device->dev; |
672 | lp = dev->priv; | 666 | lp = dev->priv; |
673 | if(lp->fd > 0) | 667 | if(lp->fd > 0) |
674 | return -EBUSY; | 668 | return -EBUSY; |
675 | if(lp->remove != NULL) (*lp->remove)(&lp->user); | 669 | if(lp->remove != NULL) (*lp->remove)(&lp->user); |
676 | unregister_netdev(dev); | 670 | unregister_netdev(dev); |
677 | platform_device_unregister(&device->pdev); | 671 | platform_device_unregister(&device->pdev); |
@@ -683,10 +677,11 @@ static int net_remove(int n) | |||
683 | } | 677 | } |
684 | 678 | ||
685 | static struct mc_device net_mc = { | 679 | static struct mc_device net_mc = { |
680 | .list = LIST_HEAD_INIT(net_mc.list), | ||
686 | .name = "eth", | 681 | .name = "eth", |
687 | .config = net_config, | 682 | .config = net_config, |
688 | .get_config = NULL, | 683 | .get_config = NULL, |
689 | .id = net_id, | 684 | .id = net_id, |
690 | .remove = net_remove, | 685 | .remove = net_remove, |
691 | }; | 686 | }; |
692 | 687 | ||
@@ -699,7 +694,8 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event, | |||
699 | void (*proc)(unsigned char *, unsigned char *, void *); | 694 | void (*proc)(unsigned char *, unsigned char *, void *); |
700 | unsigned char addr_buf[4], netmask_buf[4]; | 695 | unsigned char addr_buf[4], netmask_buf[4]; |
701 | 696 | ||
702 | if(dev->open != uml_net_open) return(NOTIFY_DONE); | 697 | if(dev->open != uml_net_open) |
698 | return NOTIFY_DONE; | ||
703 | 699 | ||
704 | lp = dev->priv; | 700 | lp = dev->priv; |
705 | 701 | ||
@@ -717,9 +713,10 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event, | |||
717 | memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf)); | 713 | memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf)); |
718 | (*proc)(addr_buf, netmask_buf, &lp->user); | 714 | (*proc)(addr_buf, netmask_buf, &lp->user); |
719 | } | 715 | } |
720 | return(NOTIFY_DONE); | 716 | return NOTIFY_DONE; |
721 | } | 717 | } |
722 | 718 | ||
719 | /* uml_net_init shouldn't be called twice on two CPUs at the same time */ | ||
723 | struct notifier_block uml_inetaddr_notifier = { | 720 | struct notifier_block uml_inetaddr_notifier = { |
724 | .notifier_call = uml_inetaddr_event, | 721 | .notifier_call = uml_inetaddr_event, |
725 | }; | 722 | }; |
@@ -727,7 +724,7 @@ struct notifier_block uml_inetaddr_notifier = { | |||
727 | static int uml_net_init(void) | 724 | static int uml_net_init(void) |
728 | { | 725 | { |
729 | struct list_head *ele; | 726 | struct list_head *ele; |
730 | struct uml_net_private *lp; | 727 | struct uml_net_private *lp; |
731 | struct in_device *ip; | 728 | struct in_device *ip; |
732 | struct in_ifaddr *in; | 729 | struct in_ifaddr *in; |
733 | 730 | ||
@@ -738,18 +735,21 @@ static int uml_net_init(void) | |||
738 | * didn't get a chance to run for them. This fakes it so that | 735 | * didn't get a chance to run for them. This fakes it so that |
739 | * addresses which have already been set up get handled properly. | 736 | * addresses which have already been set up get handled properly. |
740 | */ | 737 | */ |
738 | spin_lock(&opened_lock); | ||
741 | list_for_each(ele, &opened){ | 739 | list_for_each(ele, &opened){ |
742 | lp = list_entry(ele, struct uml_net_private, list); | 740 | lp = list_entry(ele, struct uml_net_private, list); |
743 | ip = lp->dev->ip_ptr; | 741 | ip = lp->dev->ip_ptr; |
744 | if(ip == NULL) continue; | 742 | if(ip == NULL) |
743 | continue; | ||
745 | in = ip->ifa_list; | 744 | in = ip->ifa_list; |
746 | while(in != NULL){ | 745 | while(in != NULL){ |
747 | uml_inetaddr_event(NULL, NETDEV_UP, in); | 746 | uml_inetaddr_event(NULL, NETDEV_UP, in); |
748 | in = in->ifa_next; | 747 | in = in->ifa_next; |
749 | } | 748 | } |
750 | } | 749 | } |
750 | spin_unlock(&opened_lock); | ||
751 | 751 | ||
752 | return(0); | 752 | return 0; |
753 | } | 753 | } |
754 | 754 | ||
755 | __initcall(uml_net_init); | 755 | __initcall(uml_net_init); |
@@ -759,13 +759,16 @@ static void close_devices(void) | |||
759 | struct list_head *ele; | 759 | struct list_head *ele; |
760 | struct uml_net_private *lp; | 760 | struct uml_net_private *lp; |
761 | 761 | ||
762 | spin_lock(&opened_lock); | ||
762 | list_for_each(ele, &opened){ | 763 | list_for_each(ele, &opened){ |
763 | lp = list_entry(ele, struct uml_net_private, list); | 764 | lp = list_entry(ele, struct uml_net_private, list); |
764 | free_irq(lp->dev->irq, lp->dev); | 765 | free_irq(lp->dev->irq, lp->dev); |
765 | if((lp->close != NULL) && (lp->fd >= 0)) | 766 | if((lp->close != NULL) && (lp->fd >= 0)) |
766 | (*lp->close)(lp->fd, &lp->user); | 767 | (*lp->close)(lp->fd, &lp->user); |
767 | if(lp->remove != NULL) (*lp->remove)(&lp->user); | 768 | if(lp->remove != NULL) |
769 | (*lp->remove)(&lp->user); | ||
768 | } | 770 | } |
771 | spin_unlock(&opened_lock); | ||
769 | } | 772 | } |
770 | 773 | ||
771 | __uml_exitcall(close_devices); | 774 | __uml_exitcall(close_devices); |
@@ -783,8 +786,8 @@ struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra) | |||
783 | return(skb); | 786 | return(skb); |
784 | } | 787 | } |
785 | 788 | ||
786 | void iter_addresses(void *d, void (*cb)(unsigned char *, unsigned char *, | 789 | void iter_addresses(void *d, void (*cb)(unsigned char *, unsigned char *, |
787 | void *), | 790 | void *), |
788 | void *arg) | 791 | void *arg) |
789 | { | 792 | { |
790 | struct net_device *dev = d; | 793 | struct net_device *dev = d; |
@@ -809,11 +812,11 @@ int dev_netmask(void *d, void *m) | |||
809 | struct in_ifaddr *in; | 812 | struct in_ifaddr *in; |
810 | __be32 *mask_out = m; | 813 | __be32 *mask_out = m; |
811 | 814 | ||
812 | if(ip == NULL) | 815 | if(ip == NULL) |
813 | return(1); | 816 | return(1); |
814 | 817 | ||
815 | in = ip->ifa_list; | 818 | in = ip->ifa_list; |
816 | if(in == NULL) | 819 | if(in == NULL) |
817 | return(1); | 820 | return(1); |
818 | 821 | ||
819 | *mask_out = in->ifa_mask; | 822 | *mask_out = in->ifa_mask; |
@@ -827,7 +830,7 @@ void *get_output_buffer(int *len_out) | |||
827 | ret = (void *) __get_free_pages(GFP_KERNEL, 0); | 830 | ret = (void *) __get_free_pages(GFP_KERNEL, 0); |
828 | if(ret) *len_out = PAGE_SIZE; | 831 | if(ret) *len_out = PAGE_SIZE; |
829 | else *len_out = 0; | 832 | else *len_out = 0; |
830 | return(ret); | 833 | return ret; |
831 | } | 834 | } |
832 | 835 | ||
833 | void free_output_buffer(void *buffer) | 836 | void free_output_buffer(void *buffer) |
@@ -835,7 +838,7 @@ void free_output_buffer(void *buffer) | |||
835 | free_pages((unsigned long) buffer, 0); | 838 | free_pages((unsigned long) buffer, 0); |
836 | } | 839 | } |
837 | 840 | ||
838 | int tap_setup_common(char *str, char *type, char **dev_name, char **mac_out, | 841 | int tap_setup_common(char *str, char *type, char **dev_name, char **mac_out, |
839 | char **gate_addr) | 842 | char **gate_addr) |
840 | { | 843 | { |
841 | char *remain; | 844 | char *remain; |
@@ -854,14 +857,3 @@ unsigned short eth_protocol(struct sk_buff *skb) | |||
854 | { | 857 | { |
855 | return(eth_type_trans(skb, skb->dev)); | 858 | return(eth_type_trans(skb, skb->dev)); |
856 | } | 859 | } |
857 | |||
858 | /* | ||
859 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
860 | * Emacs will notice this stuff at the end of the file and automatically | ||
861 | * adjust the settings for this buffer only. This must remain at the end | ||
862 | * of the file. | ||
863 | * --------------------------------------------------------------------------- | ||
864 | * Local variables: | ||
865 | * c-file-style: "linux" | ||
866 | * End: | ||
867 | */ | ||
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index 6dfe632f1c14..1c8efd95c421 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -55,9 +55,9 @@ static irqreturn_t pipe_interrupt(int irq, void *data) | |||
55 | fd = os_rcv_fd(conn->socket[0], &conn->helper_pid); | 55 | fd = os_rcv_fd(conn->socket[0], &conn->helper_pid); |
56 | if(fd < 0){ | 56 | if(fd < 0){ |
57 | if(fd == -EAGAIN) | 57 | if(fd == -EAGAIN) |
58 | return(IRQ_NONE); | 58 | return IRQ_NONE; |
59 | 59 | ||
60 | printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n", | 60 | printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n", |
61 | -fd); | 61 | -fd); |
62 | os_close_file(conn->fd); | 62 | os_close_file(conn->fd); |
63 | } | 63 | } |
@@ -68,7 +68,7 @@ static irqreturn_t pipe_interrupt(int irq, void *data) | |||
68 | list_add(&conn->list, &conn->port->connections); | 68 | list_add(&conn->list, &conn->port->connections); |
69 | 69 | ||
70 | complete(&conn->port->done); | 70 | complete(&conn->port->done); |
71 | return(IRQ_HANDLED); | 71 | return IRQ_HANDLED; |
72 | } | 72 | } |
73 | 73 | ||
74 | #define NO_WAITER_MSG \ | 74 | #define NO_WAITER_MSG \ |
@@ -97,14 +97,14 @@ static int port_accept(struct port_list *port) | |||
97 | "connection\n"); | 97 | "connection\n"); |
98 | goto out_close; | 98 | goto out_close; |
99 | } | 99 | } |
100 | *conn = ((struct connection) | 100 | *conn = ((struct connection) |
101 | { .list = LIST_HEAD_INIT(conn->list), | 101 | { .list = LIST_HEAD_INIT(conn->list), |
102 | .fd = fd, | 102 | .fd = fd, |
103 | .socket = { socket[0], socket[1] }, | 103 | .socket = { socket[0], socket[1] }, |
104 | .telnetd_pid = pid, | 104 | .telnetd_pid = pid, |
105 | .port = port }); | 105 | .port = port }); |
106 | 106 | ||
107 | if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, | 107 | if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, |
108 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, | 108 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
109 | "telnetd", conn)){ | 109 | "telnetd", conn)){ |
110 | printk(KERN_ERR "port_accept : failed to get IRQ for " | 110 | printk(KERN_ERR "port_accept : failed to get IRQ for " |
@@ -117,20 +117,20 @@ static int port_accept(struct port_list *port) | |||
117 | printk("No one waiting for port\n"); | 117 | printk("No one waiting for port\n"); |
118 | } | 118 | } |
119 | list_add(&conn->list, &port->pending); | 119 | list_add(&conn->list, &port->pending); |
120 | return(1); | 120 | return 1; |
121 | 121 | ||
122 | out_free: | 122 | out_free: |
123 | kfree(conn); | 123 | kfree(conn); |
124 | out_close: | 124 | out_close: |
125 | os_close_file(fd); | 125 | os_close_file(fd); |
126 | if(pid != -1) | 126 | if(pid != -1) |
127 | os_kill_process(pid, 1); | 127 | os_kill_process(pid, 1); |
128 | out: | 128 | out: |
129 | return(ret); | 129 | return ret; |
130 | } | 130 | } |
131 | 131 | ||
132 | DECLARE_MUTEX(ports_sem); | 132 | static DECLARE_MUTEX(ports_sem); |
133 | struct list_head ports = LIST_HEAD_INIT(ports); | 133 | static LIST_HEAD(ports); |
134 | 134 | ||
135 | void port_work_proc(struct work_struct *unused) | 135 | void port_work_proc(struct work_struct *unused) |
136 | { | 136 | { |
@@ -158,8 +158,8 @@ static irqreturn_t port_interrupt(int irq, void *data) | |||
158 | 158 | ||
159 | port->has_connection = 1; | 159 | port->has_connection = 1; |
160 | schedule_work(&port_work); | 160 | schedule_work(&port_work); |
161 | return(IRQ_HANDLED); | 161 | return IRQ_HANDLED; |
162 | } | 162 | } |
163 | 163 | ||
164 | void *port_data(int port_num) | 164 | void *port_data(int port_num) |
165 | { | 165 | { |
@@ -185,14 +185,14 @@ void *port_data(int port_num) | |||
185 | port_num, -fd); | 185 | port_num, -fd); |
186 | goto out_free; | 186 | goto out_free; |
187 | } | 187 | } |
188 | if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, | 188 | if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, |
189 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "port", | 189 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
190 | port)){ | 190 | "port", port)){ |
191 | printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); | 191 | printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); |
192 | goto out_close; | 192 | goto out_close; |
193 | } | 193 | } |
194 | 194 | ||
195 | *port = ((struct port_list) | 195 | *port = ((struct port_list) |
196 | { .list = LIST_HEAD_INIT(port->list), | 196 | { .list = LIST_HEAD_INIT(port->list), |
197 | .wait_count = ATOMIC_INIT(0), | 197 | .wait_count = ATOMIC_INIT(0), |
198 | .has_connection = 0, | 198 | .has_connection = 0, |
@@ -222,7 +222,7 @@ void *port_data(int port_num) | |||
222 | os_close_file(fd); | 222 | os_close_file(fd); |
223 | out: | 223 | out: |
224 | up(&ports_sem); | 224 | up(&ports_sem); |
225 | return(dev); | 225 | return dev; |
226 | } | 226 | } |
227 | 227 | ||
228 | int port_wait(void *data) | 228 | int port_wait(void *data) |
@@ -232,15 +232,15 @@ int port_wait(void *data) | |||
232 | struct port_list *port = dev->port; | 232 | struct port_list *port = dev->port; |
233 | int fd; | 233 | int fd; |
234 | 234 | ||
235 | atomic_inc(&port->wait_count); | 235 | atomic_inc(&port->wait_count); |
236 | while(1){ | 236 | while(1){ |
237 | fd = -ERESTARTSYS; | 237 | fd = -ERESTARTSYS; |
238 | if(wait_for_completion_interruptible(&port->done)) | 238 | if(wait_for_completion_interruptible(&port->done)) |
239 | goto out; | 239 | goto out; |
240 | 240 | ||
241 | spin_lock(&port->lock); | 241 | spin_lock(&port->lock); |
242 | 242 | ||
243 | conn = list_entry(port->connections.next, struct connection, | 243 | conn = list_entry(port->connections.next, struct connection, |
244 | list); | 244 | list); |
245 | list_del(&conn->list); | 245 | list_del(&conn->list); |
246 | spin_unlock(&port->lock); | 246 | spin_unlock(&port->lock); |
@@ -248,12 +248,12 @@ int port_wait(void *data) | |||
248 | os_shutdown_socket(conn->socket[0], 1, 1); | 248 | os_shutdown_socket(conn->socket[0], 1, 1); |
249 | os_close_file(conn->socket[0]); | 249 | os_close_file(conn->socket[0]); |
250 | os_shutdown_socket(conn->socket[1], 1, 1); | 250 | os_shutdown_socket(conn->socket[1], 1, 1); |
251 | os_close_file(conn->socket[1]); | 251 | os_close_file(conn->socket[1]); |
252 | 252 | ||
253 | /* This is done here because freeing an IRQ can't be done | 253 | /* This is done here because freeing an IRQ can't be done |
254 | * within the IRQ handler. So, pipe_interrupt always ups | 254 | * within the IRQ handler. So, pipe_interrupt always ups |
255 | * the semaphore regardless of whether it got a successful | 255 | * the semaphore regardless of whether it got a successful |
256 | * connection. Then we loop here throwing out failed | 256 | * connection. Then we loop here throwing out failed |
257 | * connections until a good one is found. | 257 | * connections until a good one is found. |
258 | */ | 258 | */ |
259 | free_irq(TELNETD_IRQ, conn); | 259 | free_irq(TELNETD_IRQ, conn); |
diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c index bc6afaf74c1a..80508023054f 100644 --- a/arch/um/drivers/port_user.c +++ b/arch/um/drivers/port_user.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -38,18 +38,18 @@ static void *port_init(char *str, int device, const struct chan_opts *opts) | |||
38 | if(*str != ':'){ | 38 | if(*str != ':'){ |
39 | printk("port_init : channel type 'port' must specify a " | 39 | printk("port_init : channel type 'port' must specify a " |
40 | "port number\n"); | 40 | "port number\n"); |
41 | return(NULL); | 41 | return NULL; |
42 | } | 42 | } |
43 | str++; | 43 | str++; |
44 | port = strtoul(str, &end, 0); | 44 | port = strtoul(str, &end, 0); |
45 | if((*end != '\0') || (end == str)){ | 45 | if((*end != '\0') || (end == str)){ |
46 | printk("port_init : couldn't parse port '%s'\n", str); | 46 | printk("port_init : couldn't parse port '%s'\n", str); |
47 | return(NULL); | 47 | return NULL; |
48 | } | 48 | } |
49 | 49 | ||
50 | kern_data = port_data(port); | 50 | kern_data = port_data(port); |
51 | if(kern_data == NULL) | 51 | if(kern_data == NULL) |
52 | return(NULL); | 52 | return NULL; |
53 | 53 | ||
54 | data = um_kmalloc(sizeof(*data)); | 54 | data = um_kmalloc(sizeof(*data)); |
55 | if(data == NULL) | 55 | if(data == NULL) |
@@ -59,10 +59,10 @@ static void *port_init(char *str, int device, const struct chan_opts *opts) | |||
59 | .kernel_data = kern_data }); | 59 | .kernel_data = kern_data }); |
60 | sprintf(data->dev, "%d", port); | 60 | sprintf(data->dev, "%d", port); |
61 | 61 | ||
62 | return(data); | 62 | return data; |
63 | err: | 63 | err: |
64 | port_kern_free(kern_data); | 64 | port_kern_free(kern_data); |
65 | return(NULL); | 65 | return NULL; |
66 | } | 66 | } |
67 | 67 | ||
68 | static void port_free(void *d) | 68 | static void port_free(void *d) |
@@ -83,14 +83,14 @@ static int port_open(int input, int output, int primary, void *d, | |||
83 | if((fd >= 0) && data->raw){ | 83 | if((fd >= 0) && data->raw){ |
84 | CATCH_EINTR(err = tcgetattr(fd, &data->tt)); | 84 | CATCH_EINTR(err = tcgetattr(fd, &data->tt)); |
85 | if(err) | 85 | if(err) |
86 | return(err); | 86 | return err; |
87 | 87 | ||
88 | err = raw(fd); | 88 | err = raw(fd); |
89 | if(err) | 89 | if(err) |
90 | return(err); | 90 | return err; |
91 | } | 91 | } |
92 | *dev_out = data->dev; | 92 | *dev_out = data->dev; |
93 | return(fd); | 93 | return fd; |
94 | } | 94 | } |
95 | 95 | ||
96 | static void port_close(int fd, void *d) | 96 | static void port_close(int fd, void *d) |
@@ -120,8 +120,8 @@ int port_listen_fd(int port) | |||
120 | int fd, err, arg; | 120 | int fd, err, arg; |
121 | 121 | ||
122 | fd = socket(PF_INET, SOCK_STREAM, 0); | 122 | fd = socket(PF_INET, SOCK_STREAM, 0); |
123 | if(fd == -1) | 123 | if(fd == -1) |
124 | return(-errno); | 124 | return -errno; |
125 | 125 | ||
126 | arg = 1; | 126 | arg = 1; |
127 | if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &arg, sizeof(arg)) < 0){ | 127 | if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &arg, sizeof(arg)) < 0){ |
@@ -136,7 +136,7 @@ int port_listen_fd(int port) | |||
136 | err = -errno; | 136 | err = -errno; |
137 | goto out; | 137 | goto out; |
138 | } | 138 | } |
139 | 139 | ||
140 | if(listen(fd, 1) < 0){ | 140 | if(listen(fd, 1) < 0){ |
141 | err = -errno; | 141 | err = -errno; |
142 | goto out; | 142 | goto out; |
@@ -146,10 +146,10 @@ int port_listen_fd(int port) | |||
146 | if(err < 0) | 146 | if(err < 0) |
147 | goto out; | 147 | goto out; |
148 | 148 | ||
149 | return(fd); | 149 | return fd; |
150 | out: | 150 | out: |
151 | os_close_file(fd); | 151 | os_close_file(fd); |
152 | return(err); | 152 | return err; |
153 | } | 153 | } |
154 | 154 | ||
155 | struct port_pre_exec_data { | 155 | struct port_pre_exec_data { |
@@ -173,13 +173,13 @@ void port_pre_exec(void *arg) | |||
173 | int port_connection(int fd, int *socket, int *pid_out) | 173 | int port_connection(int fd, int *socket, int *pid_out) |
174 | { | 174 | { |
175 | int new, err; | 175 | int new, err; |
176 | char *argv[] = { "/usr/sbin/in.telnetd", "-L", | 176 | char *argv[] = { "/usr/sbin/in.telnetd", "-L", |
177 | "/usr/lib/uml/port-helper", NULL }; | 177 | "/usr/lib/uml/port-helper", NULL }; |
178 | struct port_pre_exec_data data; | 178 | struct port_pre_exec_data data; |
179 | 179 | ||
180 | new = os_accept_connection(fd); | 180 | new = os_accept_connection(fd); |
181 | if(new < 0) | 181 | if(new < 0) |
182 | return(new); | 182 | return new; |
183 | 183 | ||
184 | err = os_pipe(socket, 0, 0); | 184 | err = os_pipe(socket, 0, 0); |
185 | if(err < 0) | 185 | if(err < 0) |
@@ -190,29 +190,18 @@ int port_connection(int fd, int *socket, int *pid_out) | |||
190 | .pipe_fd = socket[1] }); | 190 | .pipe_fd = socket[1] }); |
191 | 191 | ||
192 | err = run_helper(port_pre_exec, &data, argv, NULL); | 192 | err = run_helper(port_pre_exec, &data, argv, NULL); |
193 | if(err < 0) | 193 | if(err < 0) |
194 | goto out_shutdown; | 194 | goto out_shutdown; |
195 | 195 | ||
196 | *pid_out = err; | 196 | *pid_out = err; |
197 | return(new); | 197 | return new; |
198 | 198 | ||
199 | out_shutdown: | 199 | out_shutdown: |
200 | os_shutdown_socket(socket[0], 1, 1); | 200 | os_shutdown_socket(socket[0], 1, 1); |
201 | os_close_file(socket[0]); | 201 | os_close_file(socket[0]); |
202 | os_shutdown_socket(socket[1], 1, 1); | 202 | os_shutdown_socket(socket[1], 1, 1); |
203 | os_close_file(socket[1]); | 203 | os_close_file(socket[1]); |
204 | out_close: | 204 | out_close: |
205 | os_close_file(new); | 205 | os_close_file(new); |
206 | return(err); | 206 | return err; |
207 | } | 207 | } |
208 | |||
209 | /* | ||
210 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
211 | * Emacs will notice this stuff at the end of the file and automatically | ||
212 | * adjust the settings for this buffer only. This must remain at the end | ||
213 | * of the file. | ||
214 | * --------------------------------------------------------------------------- | ||
215 | * Local variables: | ||
216 | * c-file-style: "linux" | ||
217 | * End: | ||
218 | */ | ||
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index 73b2bdd6d2d3..e942e836f995 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c | |||
@@ -78,6 +78,7 @@ static const struct file_operations rng_chrdev_ops = { | |||
78 | .read = rng_dev_read, | 78 | .read = rng_dev_read, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /* rng_init shouldn't be called more than once at boot time */ | ||
81 | static struct miscdevice rng_miscdev = { | 82 | static struct miscdevice rng_miscdev = { |
82 | RNG_MISCDEV_MINOR, | 83 | RNG_MISCDEV_MINOR, |
83 | RNG_MODULE_NAME, | 84 | RNG_MODULE_NAME, |
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index ed9c59082d0d..fc22b9bd9153 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c | |||
@@ -38,6 +38,7 @@ static void ssl_announce(char *dev_name, int dev) | |||
38 | dev_name); | 38 | dev_name); |
39 | } | 39 | } |
40 | 40 | ||
41 | /* Almost const, except that xterm_title may be changed in an initcall */ | ||
41 | static struct chan_opts opts = { | 42 | static struct chan_opts opts = { |
42 | .announce = ssl_announce, | 43 | .announce = ssl_announce, |
43 | .xterm_title = "Serial Line #%d", | 44 | .xterm_title = "Serial Line #%d", |
@@ -46,10 +47,12 @@ static struct chan_opts opts = { | |||
46 | .in_kernel = 1, | 47 | .in_kernel = 1, |
47 | }; | 48 | }; |
48 | 49 | ||
49 | static int ssl_config(char *str); | 50 | static int ssl_config(char *str, char **error_out); |
50 | static int ssl_get_config(char *dev, char *str, int size, char **error_out); | 51 | static int ssl_get_config(char *dev, char *str, int size, char **error_out); |
51 | static int ssl_remove(int n); | 52 | static int ssl_remove(int n, char **error_out); |
52 | 53 | ||
54 | |||
55 | /* Const, except for .mc.list */ | ||
53 | static struct line_driver driver = { | 56 | static struct line_driver driver = { |
54 | .name = "UML serial line", | 57 | .name = "UML serial line", |
55 | .device_name = "ttyS", | 58 | .device_name = "ttyS", |
@@ -61,9 +64,8 @@ static struct line_driver driver = { | |||
61 | .read_irq_name = "ssl", | 64 | .read_irq_name = "ssl", |
62 | .write_irq = SSL_WRITE_IRQ, | 65 | .write_irq = SSL_WRITE_IRQ, |
63 | .write_irq_name = "ssl-write", | 66 | .write_irq_name = "ssl-write", |
64 | .symlink_from = "serial", | ||
65 | .symlink_to = "tts", | ||
66 | .mc = { | 67 | .mc = { |
68 | .list = LIST_HEAD_INIT(driver.mc.list), | ||
67 | .name = "ssl", | 69 | .name = "ssl", |
68 | .config = ssl_config, | 70 | .config = ssl_config, |
69 | .get_config = ssl_get_config, | 71 | .get_config = ssl_get_config, |
@@ -72,17 +74,16 @@ static struct line_driver driver = { | |||
72 | }, | 74 | }, |
73 | }; | 75 | }; |
74 | 76 | ||
75 | /* The array is initialized by line_init, which is an initcall. The | 77 | /* The array is initialized by line_init, at initcall time. The |
76 | * individual elements are protected by individual semaphores. | 78 | * elements are locked individually as needed. |
77 | */ | 79 | */ |
78 | static struct line serial_lines[NR_PORTS] = | 80 | static struct line serial_lines[NR_PORTS] = |
79 | { [0 ... NR_PORTS - 1] = LINE_INIT(CONFIG_SSL_CHAN, &driver) }; | 81 | { [0 ... NR_PORTS - 1] = LINE_INIT(CONFIG_SSL_CHAN, &driver) }; |
80 | 82 | ||
81 | static struct lines lines = LINES_INIT(NR_PORTS); | 83 | static int ssl_config(char *str, char **error_out) |
82 | |||
83 | static int ssl_config(char *str) | ||
84 | { | 84 | { |
85 | return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts); | 85 | return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts, |
86 | error_out); | ||
86 | } | 87 | } |
87 | 88 | ||
88 | static int ssl_get_config(char *dev, char *str, int size, char **error_out) | 89 | static int ssl_get_config(char *dev, char *str, int size, char **error_out) |
@@ -91,9 +92,10 @@ static int ssl_get_config(char *dev, char *str, int size, char **error_out) | |||
91 | size, error_out); | 92 | size, error_out); |
92 | } | 93 | } |
93 | 94 | ||
94 | static int ssl_remove(int n) | 95 | static int ssl_remove(int n, char **error_out) |
95 | { | 96 | { |
96 | return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n); | 97 | return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n, |
98 | error_out); | ||
97 | } | 99 | } |
98 | 100 | ||
99 | static int ssl_open(struct tty_struct *tty, struct file *filp) | 101 | static int ssl_open(struct tty_struct *tty, struct file *filp) |
@@ -168,9 +170,10 @@ static int ssl_console_setup(struct console *co, char *options) | |||
168 | { | 170 | { |
169 | struct line *line = &serial_lines[co->index]; | 171 | struct line *line = &serial_lines[co->index]; |
170 | 172 | ||
171 | return console_open_chan(line, co, &opts); | 173 | return console_open_chan(line, co); |
172 | } | 174 | } |
173 | 175 | ||
176 | /* No locking for register_console call - relies on single-threaded initcalls */ | ||
174 | static struct console ssl_cons = { | 177 | static struct console ssl_cons = { |
175 | .name = "ttyS", | 178 | .name = "ttyS", |
176 | .write = ssl_console_write, | 179 | .write = ssl_console_write, |
@@ -186,9 +189,8 @@ static int ssl_init(void) | |||
186 | 189 | ||
187 | printk(KERN_INFO "Initializing software serial port version %d\n", | 190 | printk(KERN_INFO "Initializing software serial port version %d\n", |
188 | ssl_version); | 191 | ssl_version); |
189 | ssl_driver = line_register_devfs(&lines, &driver, &ssl_ops, | 192 | ssl_driver = register_lines(&driver, &ssl_ops, serial_lines, |
190 | serial_lines, | 193 | ARRAY_SIZE(serial_lines)); |
191 | ARRAY_SIZE(serial_lines)); | ||
192 | 194 | ||
193 | lines_init(serial_lines, ARRAY_SIZE(serial_lines), &opts); | 195 | lines_init(serial_lines, ARRAY_SIZE(serial_lines), &opts); |
194 | 196 | ||
@@ -212,7 +214,15 @@ __uml_exitcall(ssl_exit); | |||
212 | 214 | ||
213 | static int ssl_chan_setup(char *str) | 215 | static int ssl_chan_setup(char *str) |
214 | { | 216 | { |
215 | return line_setup(serial_lines, ARRAY_SIZE(serial_lines), str); | 217 | char *error; |
218 | int ret; | ||
219 | |||
220 | ret = line_setup(serial_lines, ARRAY_SIZE(serial_lines), str, &error); | ||
221 | if(ret < 0) | ||
222 | printk(KERN_ERR "Failed to set up serial line with " | ||
223 | "configuration string \"%s\" : %s\n", str, error); | ||
224 | |||
225 | return 1; | ||
216 | } | 226 | } |
217 | 227 | ||
218 | __setup("ssl", ssl_chan_setup); | 228 | __setup("ssl", ssl_chan_setup); |
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 7a4897e27f42..7ff0b0fc37e7 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c | |||
@@ -30,8 +30,6 @@ | |||
30 | 30 | ||
31 | #define MAX_TTYS (16) | 31 | #define MAX_TTYS (16) |
32 | 32 | ||
33 | /* ----------------------------------------------------------------------------- */ | ||
34 | |||
35 | /* Referenced only by tty_driver below - presumably it's locked correctly | 33 | /* Referenced only by tty_driver below - presumably it's locked correctly |
36 | * by the tty driver. | 34 | * by the tty driver. |
37 | */ | 35 | */ |
@@ -44,6 +42,7 @@ void stdio_announce(char *dev_name, int dev) | |||
44 | dev_name); | 42 | dev_name); |
45 | } | 43 | } |
46 | 44 | ||
45 | /* Almost const, except that xterm_title may be changed in an initcall */ | ||
47 | static struct chan_opts opts = { | 46 | static struct chan_opts opts = { |
48 | .announce = stdio_announce, | 47 | .announce = stdio_announce, |
49 | .xterm_title = "Virtual Console #%d", | 48 | .xterm_title = "Virtual Console #%d", |
@@ -52,10 +51,12 @@ static struct chan_opts opts = { | |||
52 | .in_kernel = 1, | 51 | .in_kernel = 1, |
53 | }; | 52 | }; |
54 | 53 | ||
55 | static int con_config(char *str); | 54 | static int con_config(char *str, char **error_out); |
56 | static int con_get_config(char *dev, char *str, int size, char **error_out); | 55 | static int con_get_config(char *dev, char *str, int size, char **error_out); |
57 | static int con_remove(int n); | 56 | static int con_remove(int n, char **con_remove); |
57 | |||
58 | 58 | ||
59 | /* Const, except for .mc.list */ | ||
59 | static struct line_driver driver = { | 60 | static struct line_driver driver = { |
60 | .name = "UML console", | 61 | .name = "UML console", |
61 | .device_name = "tty", | 62 | .device_name = "tty", |
@@ -67,9 +68,8 @@ static struct line_driver driver = { | |||
67 | .read_irq_name = "console", | 68 | .read_irq_name = "console", |
68 | .write_irq = CONSOLE_WRITE_IRQ, | 69 | .write_irq = CONSOLE_WRITE_IRQ, |
69 | .write_irq_name = "console-write", | 70 | .write_irq_name = "console-write", |
70 | .symlink_from = "ttys", | ||
71 | .symlink_to = "vc", | ||
72 | .mc = { | 71 | .mc = { |
72 | .list = LIST_HEAD_INIT(driver.mc.list), | ||
73 | .name = "con", | 73 | .name = "con", |
74 | .config = con_config, | 74 | .config = con_config, |
75 | .get_config = con_get_config, | 75 | .get_config = con_get_config, |
@@ -78,18 +78,16 @@ static struct line_driver driver = { | |||
78 | }, | 78 | }, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct lines console_lines = LINES_INIT(MAX_TTYS); | 81 | /* The array is initialized by line_init, at initcall time. The |
82 | 82 | * elements are locked individually as needed. | |
83 | /* The array is initialized by line_init, which is an initcall. The | ||
84 | * individual elements are protected by individual semaphores. | ||
85 | */ | 83 | */ |
86 | struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver), | 84 | static struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver), |
87 | [ 1 ... MAX_TTYS - 1 ] = | 85 | [ 1 ... MAX_TTYS - 1 ] = |
88 | LINE_INIT(CONFIG_CON_CHAN, &driver) }; | 86 | LINE_INIT(CONFIG_CON_CHAN, &driver) }; |
89 | 87 | ||
90 | static int con_config(char *str) | 88 | static int con_config(char *str, char **error_out) |
91 | { | 89 | { |
92 | return line_config(vts, ARRAY_SIZE(vts), str, &opts); | 90 | return line_config(vts, ARRAY_SIZE(vts), str, &opts, error_out); |
93 | } | 91 | } |
94 | 92 | ||
95 | static int con_get_config(char *dev, char *str, int size, char **error_out) | 93 | static int con_get_config(char *dev, char *str, int size, char **error_out) |
@@ -97,9 +95,9 @@ static int con_get_config(char *dev, char *str, int size, char **error_out) | |||
97 | return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out); | 95 | return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out); |
98 | } | 96 | } |
99 | 97 | ||
100 | static int con_remove(int n) | 98 | static int con_remove(int n, char **error_out) |
101 | { | 99 | { |
102 | return line_remove(vts, ARRAY_SIZE(vts), n); | 100 | return line_remove(vts, ARRAY_SIZE(vts), n, error_out); |
103 | } | 101 | } |
104 | 102 | ||
105 | static int con_open(struct tty_struct *tty, struct file *filp) | 103 | static int con_open(struct tty_struct *tty, struct file *filp) |
@@ -146,9 +144,10 @@ static int uml_console_setup(struct console *co, char *options) | |||
146 | { | 144 | { |
147 | struct line *line = &vts[co->index]; | 145 | struct line *line = &vts[co->index]; |
148 | 146 | ||
149 | return console_open_chan(line, co, &opts); | 147 | return console_open_chan(line, co); |
150 | } | 148 | } |
151 | 149 | ||
150 | /* No locking for register_console call - relies on single-threaded initcalls */ | ||
152 | static struct console stdiocons = { | 151 | static struct console stdiocons = { |
153 | .name = "tty", | 152 | .name = "tty", |
154 | .write = uml_console_write, | 153 | .write = uml_console_write, |
@@ -156,16 +155,14 @@ static struct console stdiocons = { | |||
156 | .setup = uml_console_setup, | 155 | .setup = uml_console_setup, |
157 | .flags = CON_PRINTBUFFER, | 156 | .flags = CON_PRINTBUFFER, |
158 | .index = -1, | 157 | .index = -1, |
159 | .data = &vts, | ||
160 | }; | 158 | }; |
161 | 159 | ||
162 | int stdio_init(void) | 160 | int stdio_init(void) |
163 | { | 161 | { |
164 | char *new_title; | 162 | char *new_title; |
165 | 163 | ||
166 | console_driver = line_register_devfs(&console_lines, &driver, | 164 | console_driver = register_lines(&driver, &console_ops, vts, |
167 | &console_ops, vts, | 165 | ARRAY_SIZE(vts)); |
168 | ARRAY_SIZE(vts)); | ||
169 | if (console_driver == NULL) | 166 | if (console_driver == NULL) |
170 | return -1; | 167 | return -1; |
171 | printk(KERN_INFO "Initialized stdio console driver\n"); | 168 | printk(KERN_INFO "Initialized stdio console driver\n"); |
@@ -192,7 +189,15 @@ __uml_exitcall(console_exit); | |||
192 | 189 | ||
193 | static int console_chan_setup(char *str) | 190 | static int console_chan_setup(char *str) |
194 | { | 191 | { |
195 | return line_setup(vts, ARRAY_SIZE(vts), str); | 192 | char *error; |
193 | int ret; | ||
194 | |||
195 | ret = line_setup(vts, ARRAY_SIZE(vts), str, &error); | ||
196 | if(ret < 0) | ||
197 | printk(KERN_ERR "Failed to set up console with " | ||
198 | "configuration string \"%s\" : %s\n", str, error); | ||
199 | |||
200 | return 1; | ||
196 | } | 201 | } |
197 | __setup("con", console_chan_setup); | 202 | __setup("con", console_chan_setup); |
198 | __channel_help(console_chan_setup, "con"); | 203 | __channel_help(console_chan_setup, "con"); |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 49c047b75cc5..f98d26e51381 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -56,6 +56,7 @@ | |||
56 | enum ubd_req { UBD_READ, UBD_WRITE }; | 56 | enum ubd_req { UBD_READ, UBD_WRITE }; |
57 | 57 | ||
58 | struct io_thread_req { | 58 | struct io_thread_req { |
59 | struct request *req; | ||
59 | enum ubd_req op; | 60 | enum ubd_req op; |
60 | int fds[2]; | 61 | int fds[2]; |
61 | unsigned long offsets[2]; | 62 | unsigned long offsets[2]; |
@@ -106,10 +107,6 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data) | |||
106 | 107 | ||
107 | #define DRIVER_NAME "uml-blkdev" | 108 | #define DRIVER_NAME "uml-blkdev" |
108 | 109 | ||
109 | /* Can be taken in interrupt context, and is passed to the block layer to lock | ||
110 | * the request queue. Kernel side code knows that. */ | ||
111 | static DEFINE_SPINLOCK(ubd_io_lock); | ||
112 | |||
113 | static DEFINE_MUTEX(ubd_lock); | 110 | static DEFINE_MUTEX(ubd_lock); |
114 | 111 | ||
115 | /* XXX - this made sense in 2.4 days, now it's only used as a boolean, and | 112 | /* XXX - this made sense in 2.4 days, now it's only used as a boolean, and |
@@ -132,12 +129,8 @@ static struct block_device_operations ubd_blops = { | |||
132 | .getgeo = ubd_getgeo, | 129 | .getgeo = ubd_getgeo, |
133 | }; | 130 | }; |
134 | 131 | ||
135 | /* Protected by the queue_lock */ | ||
136 | static request_queue_t *ubd_queue; | ||
137 | |||
138 | /* Protected by ubd_lock */ | 132 | /* Protected by ubd_lock */ |
139 | static int fake_major = MAJOR_NR; | 133 | static int fake_major = MAJOR_NR; |
140 | |||
141 | static struct gendisk *ubd_gendisk[MAX_DEV]; | 134 | static struct gendisk *ubd_gendisk[MAX_DEV]; |
142 | static struct gendisk *fake_gendisk[MAX_DEV]; | 135 | static struct gendisk *fake_gendisk[MAX_DEV]; |
143 | 136 | ||
@@ -148,10 +141,6 @@ static struct gendisk *fake_gendisk[MAX_DEV]; | |||
148 | #define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0, \ | 141 | #define OPEN_FLAGS ((struct openflags) { .r = 1, .w = 1, .s = 0, .c = 0, \ |
149 | .cl = 1 }) | 142 | .cl = 1 }) |
150 | #endif | 143 | #endif |
151 | |||
152 | /* Not protected - changed only in ubd_setup_common and then only to | ||
153 | * to enable O_SYNC. | ||
154 | */ | ||
155 | static struct openflags global_openflags = OPEN_FLAGS; | 144 | static struct openflags global_openflags = OPEN_FLAGS; |
156 | 145 | ||
157 | struct cow { | 146 | struct cow { |
@@ -178,6 +167,8 @@ struct ubd { | |||
178 | unsigned no_cow:1; | 167 | unsigned no_cow:1; |
179 | struct cow cow; | 168 | struct cow cow; |
180 | struct platform_device pdev; | 169 | struct platform_device pdev; |
170 | struct request_queue *queue; | ||
171 | spinlock_t lock; | ||
181 | }; | 172 | }; |
182 | 173 | ||
183 | #define DEFAULT_COW { \ | 174 | #define DEFAULT_COW { \ |
@@ -198,8 +189,10 @@ struct ubd { | |||
198 | .no_cow = 0, \ | 189 | .no_cow = 0, \ |
199 | .shared = 0, \ | 190 | .shared = 0, \ |
200 | .cow = DEFAULT_COW, \ | 191 | .cow = DEFAULT_COW, \ |
192 | .lock = SPIN_LOCK_UNLOCKED, \ | ||
201 | } | 193 | } |
202 | 194 | ||
195 | /* Protected by ubd_lock */ | ||
203 | struct ubd ubd_devs[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD }; | 196 | struct ubd ubd_devs[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD }; |
204 | 197 | ||
205 | /* Only changed by fake_ide_setup which is a setup */ | 198 | /* Only changed by fake_ide_setup which is a setup */ |
@@ -242,7 +235,6 @@ static void make_ide_entries(char *dev_name) | |||
242 | 235 | ||
243 | ent = create_proc_entry("media", S_IFREG|S_IRUGO, dir); | 236 | ent = create_proc_entry("media", S_IFREG|S_IRUGO, dir); |
244 | if(!ent) return; | 237 | if(!ent) return; |
245 | ent->nlink = 1; | ||
246 | ent->data = NULL; | 238 | ent->data = NULL; |
247 | ent->read_proc = proc_ide_read_media; | 239 | ent->read_proc = proc_ide_read_media; |
248 | ent->write_proc = NULL; | 240 | ent->write_proc = NULL; |
@@ -286,12 +278,12 @@ static int parse_unit(char **ptr) | |||
286 | * otherwise, the str pointer is used (and owned) inside ubd_devs array, so it | 278 | * otherwise, the str pointer is used (and owned) inside ubd_devs array, so it |
287 | * should not be freed on exit. | 279 | * should not be freed on exit. |
288 | */ | 280 | */ |
289 | static int ubd_setup_common(char *str, int *index_out) | 281 | static int ubd_setup_common(char *str, int *index_out, char **error_out) |
290 | { | 282 | { |
291 | struct ubd *ubd_dev; | 283 | struct ubd *ubd_dev; |
292 | struct openflags flags = global_openflags; | 284 | struct openflags flags = global_openflags; |
293 | char *backing_file; | 285 | char *backing_file; |
294 | int n, err, i; | 286 | int n, err = 0, i; |
295 | 287 | ||
296 | if(index_out) *index_out = -1; | 288 | if(index_out) *index_out = -1; |
297 | n = *str; | 289 | n = *str; |
@@ -302,56 +294,55 @@ static int ubd_setup_common(char *str, int *index_out) | |||
302 | str++; | 294 | str++; |
303 | if(!strcmp(str, "sync")){ | 295 | if(!strcmp(str, "sync")){ |
304 | global_openflags = of_sync(global_openflags); | 296 | global_openflags = of_sync(global_openflags); |
305 | return(0); | 297 | goto out1; |
306 | } | 298 | } |
299 | |||
300 | err = -EINVAL; | ||
307 | major = simple_strtoul(str, &end, 0); | 301 | major = simple_strtoul(str, &end, 0); |
308 | if((*end != '\0') || (end == str)){ | 302 | if((*end != '\0') || (end == str)){ |
309 | printk(KERN_ERR | 303 | *error_out = "Didn't parse major number"; |
310 | "ubd_setup : didn't parse major number\n"); | 304 | goto out1; |
311 | return(1); | ||
312 | } | 305 | } |
313 | 306 | ||
314 | err = 1; | 307 | mutex_lock(&ubd_lock); |
315 | mutex_lock(&ubd_lock); | 308 | if(fake_major != MAJOR_NR){ |
316 | if(fake_major != MAJOR_NR){ | 309 | *error_out = "Can't assign a fake major twice"; |
317 | printk(KERN_ERR "Can't assign a fake major twice\n"); | 310 | goto out1; |
318 | goto out1; | 311 | } |
319 | } | ||
320 | 312 | ||
321 | fake_major = major; | 313 | fake_major = major; |
322 | 314 | ||
323 | printk(KERN_INFO "Setting extra ubd major number to %d\n", | 315 | printk(KERN_INFO "Setting extra ubd major number to %d\n", |
324 | major); | 316 | major); |
325 | err = 0; | 317 | err = 0; |
326 | out1: | 318 | out1: |
327 | mutex_unlock(&ubd_lock); | 319 | mutex_unlock(&ubd_lock); |
328 | return(err); | 320 | return err; |
329 | } | 321 | } |
330 | 322 | ||
331 | n = parse_unit(&str); | 323 | n = parse_unit(&str); |
332 | if(n < 0){ | 324 | if(n < 0){ |
333 | printk(KERN_ERR "ubd_setup : couldn't parse unit number " | 325 | *error_out = "Couldn't parse device number"; |
334 | "'%s'\n", str); | 326 | return -EINVAL; |
335 | return(1); | ||
336 | } | 327 | } |
337 | if(n >= MAX_DEV){ | 328 | if(n >= MAX_DEV){ |
338 | printk(KERN_ERR "ubd_setup : index %d out of range " | 329 | *error_out = "Device number out of range"; |
339 | "(%d devices, from 0 to %d)\n", n, MAX_DEV, MAX_DEV - 1); | 330 | return 1; |
340 | return(1); | ||
341 | } | 331 | } |
342 | 332 | ||
343 | err = 1; | 333 | err = -EBUSY; |
344 | mutex_lock(&ubd_lock); | 334 | mutex_lock(&ubd_lock); |
345 | 335 | ||
346 | ubd_dev = &ubd_devs[n]; | 336 | ubd_dev = &ubd_devs[n]; |
347 | if(ubd_dev->file != NULL){ | 337 | if(ubd_dev->file != NULL){ |
348 | printk(KERN_ERR "ubd_setup : device already configured\n"); | 338 | *error_out = "Device is already configured"; |
349 | goto out; | 339 | goto out; |
350 | } | 340 | } |
351 | 341 | ||
352 | if (index_out) | 342 | if (index_out) |
353 | *index_out = n; | 343 | *index_out = n; |
354 | 344 | ||
345 | err = -EINVAL; | ||
355 | for (i = 0; i < sizeof("rscd="); i++) { | 346 | for (i = 0; i < sizeof("rscd="); i++) { |
356 | switch (*str) { | 347 | switch (*str) { |
357 | case 'r': | 348 | case 'r': |
@@ -370,47 +361,54 @@ static int ubd_setup_common(char *str, int *index_out) | |||
370 | str++; | 361 | str++; |
371 | goto break_loop; | 362 | goto break_loop; |
372 | default: | 363 | default: |
373 | printk(KERN_ERR "ubd_setup : Expected '=' or flag letter (r, s, c, or d)\n"); | 364 | *error_out = "Expected '=' or flag letter " |
365 | "(r, s, c, or d)"; | ||
374 | goto out; | 366 | goto out; |
375 | } | 367 | } |
376 | str++; | 368 | str++; |
377 | } | 369 | } |
378 | 370 | ||
379 | if (*str == '=') | 371 | if (*str == '=') |
380 | printk(KERN_ERR "ubd_setup : Too many flags specified\n"); | 372 | *error_out = "Too many flags specified"; |
381 | else | 373 | else |
382 | printk(KERN_ERR "ubd_setup : Expected '='\n"); | 374 | *error_out = "Missing '='"; |
383 | goto out; | 375 | goto out; |
384 | 376 | ||
385 | break_loop: | 377 | break_loop: |
386 | err = 0; | ||
387 | backing_file = strchr(str, ','); | 378 | backing_file = strchr(str, ','); |
388 | 379 | ||
389 | if (!backing_file) { | 380 | if (backing_file == NULL) |
390 | backing_file = strchr(str, ':'); | 381 | backing_file = strchr(str, ':'); |
391 | } | ||
392 | 382 | ||
393 | if(backing_file){ | 383 | if(backing_file != NULL){ |
394 | if(ubd_dev->no_cow) | 384 | if(ubd_dev->no_cow){ |
395 | printk(KERN_ERR "Can't specify both 'd' and a " | 385 | *error_out = "Can't specify both 'd' and a cow file"; |
396 | "cow file\n"); | 386 | goto out; |
387 | } | ||
397 | else { | 388 | else { |
398 | *backing_file = '\0'; | 389 | *backing_file = '\0'; |
399 | backing_file++; | 390 | backing_file++; |
400 | } | 391 | } |
401 | } | 392 | } |
393 | err = 0; | ||
402 | ubd_dev->file = str; | 394 | ubd_dev->file = str; |
403 | ubd_dev->cow.file = backing_file; | 395 | ubd_dev->cow.file = backing_file; |
404 | ubd_dev->boot_openflags = flags; | 396 | ubd_dev->boot_openflags = flags; |
405 | out: | 397 | out: |
406 | mutex_unlock(&ubd_lock); | 398 | mutex_unlock(&ubd_lock); |
407 | return(err); | 399 | return err; |
408 | } | 400 | } |
409 | 401 | ||
410 | static int ubd_setup(char *str) | 402 | static int ubd_setup(char *str) |
411 | { | 403 | { |
412 | ubd_setup_common(str, NULL); | 404 | char *error; |
413 | return(1); | 405 | int err; |
406 | |||
407 | err = ubd_setup_common(str, NULL, &error); | ||
408 | if(err) | ||
409 | printk(KERN_ERR "Failed to initialize device with \"%s\" : " | ||
410 | "%s\n", str, error); | ||
411 | return 1; | ||
414 | } | 412 | } |
415 | 413 | ||
416 | __setup("ubd", ubd_setup); | 414 | __setup("ubd", ubd_setup); |
@@ -422,7 +420,7 @@ __uml_help(ubd_setup, | |||
422 | " use either a ':' or a ',': the first one allows writing things like;\n" | 420 | " use either a ':' or a ',': the first one allows writing things like;\n" |
423 | " ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n" | 421 | " ubd0=~/Uml/root_cow:~/Uml/root_backing_file\n" |
424 | " while with a ',' the shell would not expand the 2nd '~'.\n" | 422 | " while with a ',' the shell would not expand the 2nd '~'.\n" |
425 | " When using only one filename, UML will detect whether to thread it like\n" | 423 | " When using only one filename, UML will detect whether to treat it like\n" |
426 | " a COW file or a backing file. To override this detection, add the 'd'\n" | 424 | " a COW file or a backing file. To override this detection, add the 'd'\n" |
427 | " flag:\n" | 425 | " flag:\n" |
428 | " ubd0d=BackingFile\n" | 426 | " ubd0d=BackingFile\n" |
@@ -471,12 +469,6 @@ static void do_ubd_request(request_queue_t * q); | |||
471 | /* Only changed by ubd_init, which is an initcall. */ | 469 | /* Only changed by ubd_init, which is an initcall. */ |
472 | int thread_fd = -1; | 470 | int thread_fd = -1; |
473 | 471 | ||
474 | /* Changed by ubd_handler, which is serialized because interrupts only | ||
475 | * happen on CPU 0. | ||
476 | * XXX: currently unused. | ||
477 | */ | ||
478 | static int intr_count = 0; | ||
479 | |||
480 | /* call ubd_finish if you need to serialize */ | 472 | /* call ubd_finish if you need to serialize */ |
481 | static void __ubd_finish(struct request *req, int error) | 473 | static void __ubd_finish(struct request *req, int error) |
482 | { | 474 | { |
@@ -499,36 +491,38 @@ static void __ubd_finish(struct request *req, int error) | |||
499 | * spin_lock_irq()/spin_lock_irqsave() */ | 491 | * spin_lock_irq()/spin_lock_irqsave() */ |
500 | static inline void ubd_finish(struct request *req, int error) | 492 | static inline void ubd_finish(struct request *req, int error) |
501 | { | 493 | { |
502 | spin_lock(&ubd_io_lock); | 494 | struct ubd *dev = req->rq_disk->private_data; |
495 | |||
496 | spin_lock(&dev->lock); | ||
503 | __ubd_finish(req, error); | 497 | __ubd_finish(req, error); |
504 | spin_unlock(&ubd_io_lock); | 498 | spin_unlock(&dev->lock); |
505 | } | 499 | } |
506 | 500 | ||
507 | /* XXX - move this inside ubd_intr. */ | 501 | /* XXX - move this inside ubd_intr. */ |
508 | /* Called without ubd_io_lock held, and only in interrupt context. */ | 502 | /* Called without dev->lock held, and only in interrupt context. */ |
509 | static void ubd_handler(void) | 503 | static void ubd_handler(void) |
510 | { | 504 | { |
511 | struct io_thread_req req; | 505 | struct io_thread_req req; |
512 | struct request *rq = elv_next_request(ubd_queue); | 506 | struct request *rq; |
507 | struct ubd *dev; | ||
513 | int n; | 508 | int n; |
514 | 509 | ||
515 | do_ubd = 0; | 510 | do_ubd = 0; |
516 | intr_count++; | ||
517 | n = os_read_file(thread_fd, &req, sizeof(req)); | 511 | n = os_read_file(thread_fd, &req, sizeof(req)); |
518 | if(n != sizeof(req)){ | 512 | if(n != sizeof(req)){ |
519 | printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, " | 513 | printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, " |
520 | "err = %d\n", os_getpid(), -n); | 514 | "err = %d\n", os_getpid(), -n); |
521 | spin_lock(&ubd_io_lock); | ||
522 | end_request(rq, 0); | ||
523 | spin_unlock(&ubd_io_lock); | ||
524 | return; | 515 | return; |
525 | } | 516 | } |
526 | 517 | ||
518 | rq = req.req; | ||
519 | dev = rq->rq_disk->private_data; | ||
520 | |||
527 | ubd_finish(rq, req.error); | 521 | ubd_finish(rq, req.error); |
528 | reactivate_fd(thread_fd, UBD_IRQ); | 522 | reactivate_fd(thread_fd, UBD_IRQ); |
529 | spin_lock(&ubd_io_lock); | 523 | spin_lock(&dev->lock); |
530 | do_ubd_request(ubd_queue); | 524 | do_ubd_request(dev->queue); |
531 | spin_unlock(&ubd_io_lock); | 525 | spin_unlock(&dev->lock); |
532 | } | 526 | } |
533 | 527 | ||
534 | static irqreturn_t ubd_intr(int irq, void *dev) | 528 | static irqreturn_t ubd_intr(int irq, void *dev) |
@@ -632,8 +626,7 @@ static int ubd_open_dev(struct ubd *ubd_dev) | |||
632 | } | 626 | } |
633 | 627 | ||
634 | static int ubd_disk_register(int major, u64 size, int unit, | 628 | static int ubd_disk_register(int major, u64 size, int unit, |
635 | struct gendisk **disk_out) | 629 | struct gendisk **disk_out) |
636 | |||
637 | { | 630 | { |
638 | struct gendisk *disk; | 631 | struct gendisk *disk; |
639 | 632 | ||
@@ -659,7 +652,7 @@ static int ubd_disk_register(int major, u64 size, int unit, | |||
659 | } | 652 | } |
660 | 653 | ||
661 | disk->private_data = &ubd_devs[unit]; | 654 | disk->private_data = &ubd_devs[unit]; |
662 | disk->queue = ubd_queue; | 655 | disk->queue = ubd_devs[unit].queue; |
663 | add_disk(disk); | 656 | add_disk(disk); |
664 | 657 | ||
665 | *disk_out = disk; | 658 | *disk_out = disk; |
@@ -668,28 +661,39 @@ static int ubd_disk_register(int major, u64 size, int unit, | |||
668 | 661 | ||
669 | #define ROUND_BLOCK(n) ((n + ((1 << 9) - 1)) & (-1 << 9)) | 662 | #define ROUND_BLOCK(n) ((n + ((1 << 9) - 1)) & (-1 << 9)) |
670 | 663 | ||
671 | static int ubd_add(int n) | 664 | static int ubd_add(int n, char **error_out) |
672 | { | 665 | { |
673 | struct ubd *ubd_dev = &ubd_devs[n]; | 666 | struct ubd *ubd_dev = &ubd_devs[n]; |
674 | int err; | 667 | int err = 0; |
675 | 668 | ||
676 | err = -ENODEV; | ||
677 | if(ubd_dev->file == NULL) | 669 | if(ubd_dev->file == NULL) |
678 | goto out; | 670 | goto out; |
679 | 671 | ||
680 | err = ubd_file_size(ubd_dev, &ubd_dev->size); | 672 | err = ubd_file_size(ubd_dev, &ubd_dev->size); |
681 | if(err < 0) | 673 | if(err < 0){ |
674 | *error_out = "Couldn't determine size of device's file"; | ||
682 | goto out; | 675 | goto out; |
676 | } | ||
683 | 677 | ||
684 | ubd_dev->size = ROUND_BLOCK(ubd_dev->size); | 678 | ubd_dev->size = ROUND_BLOCK(ubd_dev->size); |
685 | 679 | ||
686 | err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); | 680 | err = -ENOMEM; |
687 | if(err) | 681 | ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock); |
682 | if (ubd_dev->queue == NULL) { | ||
683 | *error_out = "Failed to initialize device queue"; | ||
688 | goto out; | 684 | goto out; |
685 | } | ||
686 | ubd_dev->queue->queuedata = ubd_dev; | ||
687 | |||
688 | err = ubd_disk_register(MAJOR_NR, ubd_dev->size, n, &ubd_gendisk[n]); | ||
689 | if(err){ | ||
690 | *error_out = "Failed to register device"; | ||
691 | goto out_cleanup; | ||
692 | } | ||
689 | 693 | ||
690 | if(fake_major != MAJOR_NR) | 694 | if(fake_major != MAJOR_NR) |
691 | ubd_disk_register(fake_major, ubd_dev->size, n, | 695 | ubd_disk_register(fake_major, ubd_dev->size, n, |
692 | &fake_gendisk[n]); | 696 | &fake_gendisk[n]); |
693 | 697 | ||
694 | /* perhaps this should also be under the "if (fake_major)" above */ | 698 | /* perhaps this should also be under the "if (fake_major)" above */ |
695 | /* using the fake_disk->disk_name and also the fakehd_set name */ | 699 | /* using the fake_disk->disk_name and also the fakehd_set name */ |
@@ -699,30 +703,37 @@ static int ubd_add(int n) | |||
699 | err = 0; | 703 | err = 0; |
700 | out: | 704 | out: |
701 | return err; | 705 | return err; |
706 | |||
707 | out_cleanup: | ||
708 | blk_cleanup_queue(ubd_dev->queue); | ||
709 | goto out; | ||
702 | } | 710 | } |
703 | 711 | ||
704 | static int ubd_config(char *str) | 712 | static int ubd_config(char *str, char **error_out) |
705 | { | 713 | { |
706 | int n, ret; | 714 | int n, ret; |
707 | 715 | ||
716 | /* This string is possibly broken up and stored, so it's only | ||
717 | * freed if ubd_setup_common fails, or if only general options | ||
718 | * were set. | ||
719 | */ | ||
708 | str = kstrdup(str, GFP_KERNEL); | 720 | str = kstrdup(str, GFP_KERNEL); |
709 | if (str == NULL) { | 721 | if (str == NULL) { |
710 | printk(KERN_ERR "ubd_config failed to strdup string\n"); | 722 | *error_out = "Failed to allocate memory"; |
711 | ret = 1; | 723 | return -ENOMEM; |
712 | goto out; | ||
713 | } | 724 | } |
714 | ret = ubd_setup_common(str, &n); | 725 | |
715 | if (ret) { | 726 | ret = ubd_setup_common(str, &n, error_out); |
716 | ret = -1; | 727 | if (ret) |
717 | goto err_free; | 728 | goto err_free; |
718 | } | 729 | |
719 | if (n == -1) { | 730 | if (n == -1) { |
720 | ret = 0; | 731 | ret = 0; |
721 | goto err_free; | 732 | goto err_free; |
722 | } | 733 | } |
723 | 734 | ||
724 | mutex_lock(&ubd_lock); | 735 | mutex_lock(&ubd_lock); |
725 | ret = ubd_add(n); | 736 | ret = ubd_add(n, error_out); |
726 | if (ret) | 737 | if (ret) |
727 | ubd_devs[n].file = NULL; | 738 | ubd_devs[n].file = NULL; |
728 | mutex_unlock(&ubd_lock); | 739 | mutex_unlock(&ubd_lock); |
@@ -777,7 +788,7 @@ static int ubd_id(char **str, int *start_out, int *end_out) | |||
777 | return n; | 788 | return n; |
778 | } | 789 | } |
779 | 790 | ||
780 | static int ubd_remove(int n) | 791 | static int ubd_remove(int n, char **error_out) |
781 | { | 792 | { |
782 | struct ubd *ubd_dev; | 793 | struct ubd *ubd_dev; |
783 | int err = -ENODEV; | 794 | int err = -ENODEV; |
@@ -807,6 +818,7 @@ static int ubd_remove(int n) | |||
807 | fake_gendisk[n] = NULL; | 818 | fake_gendisk[n] = NULL; |
808 | } | 819 | } |
809 | 820 | ||
821 | blk_cleanup_queue(ubd_dev->queue); | ||
810 | platform_device_unregister(&ubd_dev->pdev); | 822 | platform_device_unregister(&ubd_dev->pdev); |
811 | *ubd_dev = ((struct ubd) DEFAULT_UBD); | 823 | *ubd_dev = ((struct ubd) DEFAULT_UBD); |
812 | err = 0; | 824 | err = 0; |
@@ -815,8 +827,11 @@ out: | |||
815 | return err; | 827 | return err; |
816 | } | 828 | } |
817 | 829 | ||
818 | /* All these are called by mconsole in process context and without ubd-specific locks. */ | 830 | /* All these are called by mconsole in process context and without |
831 | * ubd-specific locks. The structure itself is const except for .list. | ||
832 | */ | ||
819 | static struct mc_device ubd_mc = { | 833 | static struct mc_device ubd_mc = { |
834 | .list = LIST_HEAD_INIT(ubd_mc.list), | ||
820 | .name = "ubd", | 835 | .name = "ubd", |
821 | .config = ubd_config, | 836 | .config = ubd_config, |
822 | .get_config = ubd_get_config, | 837 | .get_config = ubd_get_config, |
@@ -836,13 +851,17 @@ static int __init ubd0_init(void) | |||
836 | { | 851 | { |
837 | struct ubd *ubd_dev = &ubd_devs[0]; | 852 | struct ubd *ubd_dev = &ubd_devs[0]; |
838 | 853 | ||
854 | mutex_lock(&ubd_lock); | ||
839 | if(ubd_dev->file == NULL) | 855 | if(ubd_dev->file == NULL) |
840 | ubd_dev->file = "root_fs"; | 856 | ubd_dev->file = "root_fs"; |
857 | mutex_unlock(&ubd_lock); | ||
858 | |||
841 | return(0); | 859 | return(0); |
842 | } | 860 | } |
843 | 861 | ||
844 | __initcall(ubd0_init); | 862 | __initcall(ubd0_init); |
845 | 863 | ||
864 | /* Used in ubd_init, which is an initcall */ | ||
846 | static struct platform_driver ubd_driver = { | 865 | static struct platform_driver ubd_driver = { |
847 | .driver = { | 866 | .driver = { |
848 | .name = DRIVER_NAME, | 867 | .name = DRIVER_NAME, |
@@ -851,17 +870,12 @@ static struct platform_driver ubd_driver = { | |||
851 | 870 | ||
852 | static int __init ubd_init(void) | 871 | static int __init ubd_init(void) |
853 | { | 872 | { |
854 | int i; | 873 | char *error; |
874 | int i, err; | ||
855 | 875 | ||
856 | if (register_blkdev(MAJOR_NR, "ubd")) | 876 | if (register_blkdev(MAJOR_NR, "ubd")) |
857 | return -1; | 877 | return -1; |
858 | 878 | ||
859 | ubd_queue = blk_init_queue(do_ubd_request, &ubd_io_lock); | ||
860 | if (!ubd_queue) { | ||
861 | unregister_blkdev(MAJOR_NR, "ubd"); | ||
862 | return -1; | ||
863 | } | ||
864 | |||
865 | if (fake_major != MAJOR_NR) { | 879 | if (fake_major != MAJOR_NR) { |
866 | char name[sizeof("ubd_nnn\0")]; | 880 | char name[sizeof("ubd_nnn\0")]; |
867 | 881 | ||
@@ -870,8 +884,14 @@ static int __init ubd_init(void) | |||
870 | return -1; | 884 | return -1; |
871 | } | 885 | } |
872 | platform_driver_register(&ubd_driver); | 886 | platform_driver_register(&ubd_driver); |
873 | for (i = 0; i < MAX_DEV; i++) | 887 | mutex_lock(&ubd_lock); |
874 | ubd_add(i); | 888 | for (i = 0; i < MAX_DEV; i++){ |
889 | err = ubd_add(i, &error); | ||
890 | if(err) | ||
891 | printk(KERN_ERR "Failed to initialize ubd device %d :" | ||
892 | "%s\n", i, error); | ||
893 | } | ||
894 | mutex_unlock(&ubd_lock); | ||
875 | return 0; | 895 | return 0; |
876 | } | 896 | } |
877 | 897 | ||
@@ -1003,7 +1023,7 @@ static void cowify_req(struct io_thread_req *req, unsigned long *bitmap, | |||
1003 | req->bitmap_words, bitmap_len); | 1023 | req->bitmap_words, bitmap_len); |
1004 | } | 1024 | } |
1005 | 1025 | ||
1006 | /* Called with ubd_io_lock held */ | 1026 | /* Called with dev->lock held */ |
1007 | static int prepare_request(struct request *req, struct io_thread_req *io_req) | 1027 | static int prepare_request(struct request *req, struct io_thread_req *io_req) |
1008 | { | 1028 | { |
1009 | struct gendisk *disk = req->rq_disk; | 1029 | struct gendisk *disk = req->rq_disk; |
@@ -1022,6 +1042,7 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req) | |||
1022 | offset = ((__u64) req->sector) << 9; | 1042 | offset = ((__u64) req->sector) << 9; |
1023 | len = req->current_nr_sectors << 9; | 1043 | len = req->current_nr_sectors << 9; |
1024 | 1044 | ||
1045 | io_req->req = req; | ||
1025 | io_req->fds[0] = (ubd_dev->cow.file != NULL) ? ubd_dev->cow.fd : ubd_dev->fd; | 1046 | io_req->fds[0] = (ubd_dev->cow.file != NULL) ? ubd_dev->cow.fd : ubd_dev->fd; |
1026 | io_req->fds[1] = ubd_dev->fd; | 1047 | io_req->fds[1] = ubd_dev->fd; |
1027 | io_req->cow_offset = -1; | 1048 | io_req->cow_offset = -1; |
@@ -1043,7 +1064,7 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req) | |||
1043 | return(0); | 1064 | return(0); |
1044 | } | 1065 | } |
1045 | 1066 | ||
1046 | /* Called with ubd_io_lock held */ | 1067 | /* Called with dev->lock held */ |
1047 | static void do_ubd_request(request_queue_t *q) | 1068 | static void do_ubd_request(request_queue_t *q) |
1048 | { | 1069 | { |
1049 | struct io_thread_req io_req; | 1070 | struct io_thread_req io_req; |
@@ -1102,7 +1123,7 @@ static int ubd_ioctl(struct inode * inode, struct file * file, | |||
1102 | sizeof(ubd_id))) | 1123 | sizeof(ubd_id))) |
1103 | return(-EFAULT); | 1124 | return(-EFAULT); |
1104 | return(0); | 1125 | return(0); |
1105 | 1126 | ||
1106 | case CDROMVOLREAD: | 1127 | case CDROMVOLREAD: |
1107 | if(copy_from_user(&volume, (char __user *) arg, sizeof(volume))) | 1128 | if(copy_from_user(&volume, (char __user *) arg, sizeof(volume))) |
1108 | return(-EFAULT); | 1129 | return(-EFAULT); |
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h index 9003a343e148..c4b41bb1035f 100644 --- a/arch/um/include/chan_kern.h +++ b/arch/um/include/chan_kern.h | |||
@@ -30,14 +30,13 @@ struct chan { | |||
30 | extern void chan_interrupt(struct list_head *chans, struct delayed_work *task, | 30 | extern void chan_interrupt(struct list_head *chans, struct delayed_work *task, |
31 | struct tty_struct *tty, int irq); | 31 | struct tty_struct *tty, int irq); |
32 | extern int parse_chan_pair(char *str, struct line *line, int device, | 32 | extern int parse_chan_pair(char *str, struct line *line, int device, |
33 | const struct chan_opts *opts); | 33 | const struct chan_opts *opts, char **error_out); |
34 | extern int open_chan(struct list_head *chans); | 34 | extern int open_chan(struct list_head *chans); |
35 | extern int write_chan(struct list_head *chans, const char *buf, int len, | 35 | extern int write_chan(struct list_head *chans, const char *buf, int len, |
36 | int write_irq); | 36 | int write_irq); |
37 | extern int console_write_chan(struct list_head *chans, const char *buf, | 37 | extern int console_write_chan(struct list_head *chans, const char *buf, |
38 | int len); | 38 | int len); |
39 | extern int console_open_chan(struct line *line, struct console *co, | 39 | extern int console_open_chan(struct line *line, struct console *co); |
40 | const struct chan_opts *opts); | ||
41 | extern void deactivate_chan(struct list_head *chans, int irq); | 40 | extern void deactivate_chan(struct list_head *chans, int irq); |
42 | extern void reactivate_chan(struct list_head *chans, int irq); | 41 | extern void reactivate_chan(struct list_head *chans, int irq); |
43 | extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); | 42 | extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); |
diff --git a/arch/um/include/chan_user.h b/arch/um/include/chan_user.h index a795547a1dbd..38f16d812e7c 100644 --- a/arch/um/include/chan_user.h +++ b/arch/um/include/chan_user.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -9,11 +9,11 @@ | |||
9 | #include "init.h" | 9 | #include "init.h" |
10 | 10 | ||
11 | struct chan_opts { | 11 | struct chan_opts { |
12 | void (*announce)(char *dev_name, int dev); | 12 | void (*const announce)(char *dev_name, int dev); |
13 | char *xterm_title; | 13 | char *xterm_title; |
14 | int raw; | 14 | const int raw; |
15 | unsigned long tramp_stack; | 15 | const unsigned long tramp_stack; |
16 | int in_kernel; | 16 | const int in_kernel; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE }; | 19 | enum chan_init_pri { INIT_STATIC, INIT_ALL, INIT_ONE }; |
@@ -54,14 +54,3 @@ __uml_help(fn, prefix "[0-9]*=<channel description>\n" \ | |||
54 | ); | 54 | ); |
55 | 55 | ||
56 | #endif | 56 | #endif |
57 | |||
58 | /* | ||
59 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
60 | * Emacs will notice this stuff at the end of the file and automatically | ||
61 | * adjust the settings for this buffer only. This must remain at the end | ||
62 | * of the file. | ||
63 | * --------------------------------------------------------------------------- | ||
64 | * Local variables: | ||
65 | * c-file-style: "linux" | ||
66 | * End: | ||
67 | */ | ||
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index cec9fcc57bf5..173af029d12b 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -61,7 +61,6 @@ extern int set_signals(int enable); | |||
61 | extern void force_sigbus(void); | 61 | extern void force_sigbus(void); |
62 | extern int pid_to_processor_id(int pid); | 62 | extern int pid_to_processor_id(int pid); |
63 | extern void deliver_signals(void *t); | 63 | extern void deliver_signals(void *t); |
64 | extern int next_syscall_index(int max); | ||
65 | extern int next_trap_index(int max); | 64 | extern int next_trap_index(int max); |
66 | extern void default_idle(void); | 65 | extern void default_idle(void); |
67 | extern void finish_fork(void); | 66 | extern void finish_fork(void); |
@@ -88,7 +87,6 @@ extern void timer_irq(union uml_pt_regs *regs); | |||
88 | extern void unprotect_stack(unsigned long stack); | 87 | extern void unprotect_stack(unsigned long stack); |
89 | extern void do_uml_exitcalls(void); | 88 | extern void do_uml_exitcalls(void); |
90 | extern int attach_debugger(int idle_pid, int pid, int stop); | 89 | extern int attach_debugger(int idle_pid, int pid, int stop); |
91 | extern void bad_segv(struct faultinfo fi, unsigned long ip); | ||
92 | extern int config_gdb(char *str); | 90 | extern int config_gdb(char *str); |
93 | extern int remove_gdb(void); | 91 | extern int remove_gdb(void); |
94 | extern char *uml_strdup(char *string); | 92 | extern char *uml_strdup(char *string); |
@@ -104,8 +102,6 @@ extern int clear_user_proc(void *buf, int size); | |||
104 | extern int copy_to_user_proc(void *to, void *from, int size); | 102 | extern int copy_to_user_proc(void *to, void *from, int size); |
105 | extern int copy_from_user_proc(void *to, void *from, int size); | 103 | extern int copy_from_user_proc(void *to, void *from, int size); |
106 | extern int strlen_user_proc(char *str); | 104 | extern int strlen_user_proc(char *str); |
107 | extern void bus_handler(int sig, union uml_pt_regs *regs); | ||
108 | extern void winch(int sig, union uml_pt_regs *regs); | ||
109 | extern long execute_syscall(void *r); | 105 | extern long execute_syscall(void *r); |
110 | extern int smp_sigio_handler(void); | 106 | extern int smp_sigio_handler(void); |
111 | extern void *get_current(void); | 107 | extern void *get_current(void); |
@@ -120,7 +116,6 @@ extern void time_init_kern(void); | |||
120 | 116 | ||
121 | /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ | 117 | /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ |
122 | extern int __cant_sleep(void); | 118 | extern int __cant_sleep(void); |
123 | extern void segv_handler(int sig, union uml_pt_regs *regs); | ||
124 | extern void sigio_handler(int sig, union uml_pt_regs *regs); | 119 | extern void sigio_handler(int sig, union uml_pt_regs *regs); |
125 | 120 | ||
126 | #endif | 121 | #endif |
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 5f232ae89fbb..1223f2c844b4 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h | |||
@@ -11,36 +11,37 @@ | |||
11 | #include "linux/tty.h" | 11 | #include "linux/tty.h" |
12 | #include "linux/interrupt.h" | 12 | #include "linux/interrupt.h" |
13 | #include "linux/spinlock.h" | 13 | #include "linux/spinlock.h" |
14 | #include "linux/mutex.h" | ||
14 | #include "chan_user.h" | 15 | #include "chan_user.h" |
15 | #include "mconsole_kern.h" | 16 | #include "mconsole_kern.h" |
16 | 17 | ||
18 | /* There's only one modifiable field in this - .mc.list */ | ||
17 | struct line_driver { | 19 | struct line_driver { |
18 | char *name; | 20 | const char *name; |
19 | char *device_name; | 21 | const char *device_name; |
20 | short major; | 22 | const short major; |
21 | short minor_start; | 23 | const short minor_start; |
22 | short type; | 24 | const short type; |
23 | short subtype; | 25 | const short subtype; |
24 | int read_irq; | 26 | const int read_irq; |
25 | char *read_irq_name; | 27 | const char *read_irq_name; |
26 | int write_irq; | 28 | const int write_irq; |
27 | char *write_irq_name; | 29 | const char *write_irq_name; |
28 | char *symlink_from; | ||
29 | char *symlink_to; | ||
30 | struct mc_device mc; | 30 | struct mc_device mc; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct line { | 33 | struct line { |
34 | struct tty_struct *tty; | 34 | struct tty_struct *tty; |
35 | spinlock_t count_lock; | ||
36 | int valid; | ||
37 | |||
35 | char *init_str; | 38 | char *init_str; |
36 | int init_pri; | 39 | int init_pri; |
37 | struct list_head chan_list; | 40 | struct list_head chan_list; |
38 | int valid; | 41 | |
39 | int count; | ||
40 | int throttled; | ||
41 | /*This lock is actually, mostly, local to*/ | 42 | /*This lock is actually, mostly, local to*/ |
42 | spinlock_t lock; | 43 | spinlock_t lock; |
43 | 44 | int throttled; | |
44 | /* Yes, this is a real circular buffer. | 45 | /* Yes, this is a real circular buffer. |
45 | * XXX: And this should become a struct kfifo! | 46 | * XXX: And this should become a struct kfifo! |
46 | * | 47 | * |
@@ -57,22 +58,17 @@ struct line { | |||
57 | }; | 58 | }; |
58 | 59 | ||
59 | #define LINE_INIT(str, d) \ | 60 | #define LINE_INIT(str, d) \ |
60 | { .init_str = str, \ | 61 | { .count_lock = SPIN_LOCK_UNLOCKED, \ |
62 | .init_str = str, \ | ||
61 | .init_pri = INIT_STATIC, \ | 63 | .init_pri = INIT_STATIC, \ |
62 | .valid = 1, \ | 64 | .valid = 1, \ |
63 | .lock = SPIN_LOCK_UNLOCKED, \ | 65 | .lock = SPIN_LOCK_UNLOCKED, \ |
64 | .driver = d } | 66 | .driver = d } |
65 | 67 | ||
66 | struct lines { | ||
67 | int num; | ||
68 | }; | ||
69 | |||
70 | #define LINES_INIT(n) { .num = n } | ||
71 | |||
72 | extern void line_close(struct tty_struct *tty, struct file * filp); | 68 | extern void line_close(struct tty_struct *tty, struct file * filp); |
73 | extern int line_open(struct line *lines, struct tty_struct *tty); | 69 | extern int line_open(struct line *lines, struct tty_struct *tty); |
74 | extern int line_setup(struct line *lines, unsigned int sizeof_lines, | 70 | extern int line_setup(struct line *lines, unsigned int sizeof_lines, |
75 | char *init); | 71 | char *init, char **error_out); |
76 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, | 72 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, |
77 | int len); | 73 | int len); |
78 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); | 74 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); |
@@ -90,17 +86,18 @@ extern char *add_xterm_umid(char *base); | |||
90 | extern int line_setup_irq(int fd, int input, int output, struct line *line, | 86 | extern int line_setup_irq(int fd, int input, int output, struct line *line, |
91 | void *data); | 87 | void *data); |
92 | extern void line_close_chan(struct line *line); | 88 | extern void line_close_chan(struct line *line); |
93 | extern struct tty_driver * line_register_devfs(struct lines *set, | 89 | extern struct tty_driver *register_lines(struct line_driver *line_driver, |
94 | struct line_driver *line_driver, | 90 | const struct tty_operations *driver, |
95 | const struct tty_operations *driver, | 91 | struct line *lines, int nlines); |
96 | struct line *lines, int nlines); | ||
97 | extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts); | 92 | extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts); |
98 | extern void close_lines(struct line *lines, int nlines); | 93 | extern void close_lines(struct line *lines, int nlines); |
99 | 94 | ||
100 | extern int line_config(struct line *lines, unsigned int sizeof_lines, | 95 | extern int line_config(struct line *lines, unsigned int sizeof_lines, |
101 | char *str, const struct chan_opts *opts); | 96 | char *str, const struct chan_opts *opts, |
97 | char **error_out); | ||
102 | extern int line_id(char **str, int *start_out, int *end_out); | 98 | extern int line_id(char **str, int *start_out, int *end_out); |
103 | extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n); | 99 | extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n, |
100 | char **error_out); | ||
104 | extern int line_get_config(char *dev, struct line *lines, | 101 | extern int line_get_config(char *dev, struct line *lines, |
105 | unsigned int sizeof_lines, char *str, | 102 | unsigned int sizeof_lines, char *str, |
106 | int size, char **error_out); | 103 | int size, char **error_out); |
diff --git a/arch/um/include/mconsole_kern.h b/arch/um/include/mconsole_kern.h index 1ea6d928e1cd..d2fe07e78958 100644 --- a/arch/um/include/mconsole_kern.h +++ b/arch/um/include/mconsole_kern.h | |||
@@ -18,10 +18,10 @@ struct mconsole_entry { | |||
18 | struct mc_device { | 18 | struct mc_device { |
19 | struct list_head list; | 19 | struct list_head list; |
20 | char *name; | 20 | char *name; |
21 | int (*config)(char *); | 21 | int (*config)(char *, char **); |
22 | int (*get_config)(char *, char *, int, char **); | 22 | int (*get_config)(char *, char *, int, char **); |
23 | int (*id)(char **, int *, int *); | 23 | int (*id)(char **, int *, int *); |
24 | int (*remove)(int); | 24 | int (*remove)(int, char **); |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #define CONFIG_CHUNK(str, size, current, chunk, end) \ | 27 | #define CONFIG_CHUNK(str, size, current, chunk, end) \ |
@@ -50,14 +50,3 @@ static inline void mconsole_register_dev(struct mc_device *new) | |||
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | #endif | 52 | #endif |
53 | |||
54 | /* | ||
55 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
56 | * Emacs will notice this stuff at the end of the file and automatically | ||
57 | * adjust the settings for this buffer only. This must remain at the end | ||
58 | * of the file. | ||
59 | * --------------------------------------------------------------------------- | ||
60 | * Local variables: | ||
61 | * c-file-style: "linux" | ||
62 | * End: | ||
63 | */ | ||
diff --git a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h index 218f8b47fdcd..125ab42df18a 100644 --- a/arch/um/include/net_kern.h +++ b/arch/um/include/net_kern.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -36,7 +36,7 @@ struct uml_net_private { | |||
36 | void (*remove)(void *); | 36 | void (*remove)(void *); |
37 | int (*read)(int, struct sk_buff **skb, struct uml_net_private *); | 37 | int (*read)(int, struct sk_buff **skb, struct uml_net_private *); |
38 | int (*write)(int, struct sk_buff **skb, struct uml_net_private *); | 38 | int (*write)(int, struct sk_buff **skb, struct uml_net_private *); |
39 | 39 | ||
40 | void (*add_address)(unsigned char *, unsigned char *, void *); | 40 | void (*add_address)(unsigned char *, unsigned char *, void *); |
41 | void (*delete_address)(unsigned char *, unsigned char *, void *); | 41 | void (*delete_address)(unsigned char *, unsigned char *, void *); |
42 | int (*set_mtu)(int mtu, void *); | 42 | int (*set_mtu)(int mtu, void *); |
@@ -52,18 +52,18 @@ struct net_kern_info { | |||
52 | 52 | ||
53 | struct transport { | 53 | struct transport { |
54 | struct list_head list; | 54 | struct list_head list; |
55 | char *name; | 55 | const char *name; |
56 | int (*setup)(char *, char **, void *); | 56 | int (* const setup)(char *, char **, void *); |
57 | const struct net_user_info *user; | 57 | const struct net_user_info *user; |
58 | const struct net_kern_info *kern; | 58 | const struct net_kern_info *kern; |
59 | int private_size; | 59 | const int private_size; |
60 | int setup_size; | 60 | const int setup_size; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | extern struct net_device *ether_init(int); | 63 | extern struct net_device *ether_init(int); |
64 | extern unsigned short ether_protocol(struct sk_buff *); | 64 | extern unsigned short ether_protocol(struct sk_buff *); |
65 | extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra); | 65 | extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra); |
66 | extern int tap_setup_common(char *str, char *type, char **dev_name, | 66 | extern int tap_setup_common(char *str, char *type, char **dev_name, |
67 | char **mac_out, char **gate_addr); | 67 | char **mac_out, char **gate_addr); |
68 | extern void register_transport(struct transport *new); | 68 | extern void register_transport(struct transport *new); |
69 | extern unsigned short eth_protocol(struct sk_buff *skb); | 69 | extern unsigned short eth_protocol(struct sk_buff *skb); |
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 13a86bd383d3..8629bd191492 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -137,7 +137,6 @@ extern int os_new_tty_pgrp(int fd, int pid); | |||
137 | extern int os_get_ifname(int fd, char *namebuf); | 137 | extern int os_get_ifname(int fd, char *namebuf); |
138 | extern int os_set_slip(int fd); | 138 | extern int os_set_slip(int fd); |
139 | extern int os_set_owner(int fd, int pid); | 139 | extern int os_set_owner(int fd, int pid); |
140 | extern int os_sigio_async(int master, int slave); | ||
141 | extern int os_mode_fd(int fd, int mode); | 140 | extern int os_mode_fd(int fd, int mode); |
142 | 141 | ||
143 | extern int os_seek_file(int fd, __u64 offset); | 142 | extern int os_seek_file(int fd, __u64 offset); |
@@ -341,4 +340,6 @@ extern void maybe_sigio_broken(int fd, int read); | |||
341 | extern void sig_handler_common_skas(int sig, void *sc_ptr); | 340 | extern void sig_handler_common_skas(int sig, void *sc_ptr); |
342 | extern void user_signal(int sig, union uml_pt_regs *regs, int pid); | 341 | extern void user_signal(int sig, union uml_pt_regs *regs, int pid); |
343 | 342 | ||
343 | extern int os_arch_prctl(int pid, int code, unsigned long *addr); | ||
344 | |||
344 | #endif | 345 | #endif |
diff --git a/arch/um/include/sigio.h b/arch/um/include/sigio.h index fe99ea163c2e..434f1a9ae4b3 100644 --- a/arch/um/include/sigio.h +++ b/arch/um/include/sigio.h | |||
@@ -12,14 +12,3 @@ extern void sigio_lock(void); | |||
12 | extern void sigio_unlock(void); | 12 | extern void sigio_unlock(void); |
13 | 13 | ||
14 | #endif | 14 | #endif |
15 | |||
16 | /* | ||
17 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
18 | * Emacs will notice this stuff at the end of the file and automatically | ||
19 | * adjust the settings for this buffer only. This must remain at the end | ||
20 | * of the file. | ||
21 | * --------------------------------------------------------------------------- | ||
22 | * Local variables: | ||
23 | * c-file-style: "linux" | ||
24 | * End: | ||
25 | */ | ||
diff --git a/arch/um/include/tempfile.h b/arch/um/include/tempfile.h index e36d9e0f5105..d441eac936b9 100644 --- a/arch/um/include/tempfile.h +++ b/arch/um/include/tempfile.h | |||
@@ -9,13 +9,3 @@ | |||
9 | extern int make_tempfile(const char *template, char **tempname, int do_unlink); | 9 | extern int make_tempfile(const char *template, char **tempname, int do_unlink); |
10 | 10 | ||
11 | #endif | 11 | #endif |
12 | /* | ||
13 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
14 | * Emacs will notice this stuff at the end of the file and automatically | ||
15 | * adjust the settings for this buffer only. This must remain at the end | ||
16 | * of the file. | ||
17 | * --------------------------------------------------------------------------- | ||
18 | * Local variables: | ||
19 | * c-file-style: "linux" | ||
20 | * End: | ||
21 | */ | ||
diff --git a/arch/um/include/umid.h b/arch/um/include/umid.h deleted file mode 100644 index 11373c851f15..000000000000 --- a/arch/um/include/umid.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __UMID_H__ | ||
7 | #define __UMID_H__ | ||
8 | |||
9 | extern int umid_file_name(char *name, char *buf, int len); | ||
10 | |||
11 | #endif | ||
12 | |||
13 | /* | ||
14 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
15 | * Emacs will notice this stuff at the end of the file and automatically | ||
16 | * adjust the settings for this buffer only. This must remain at the end | ||
17 | * of the file. | ||
18 | * --------------------------------------------------------------------------- | ||
19 | * Local variables: | ||
20 | * c-file-style: "linux" | ||
21 | * End: | ||
22 | */ | ||
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile index 6fa63a2a89e3..c5cf4a0827b0 100644 --- a/arch/um/kernel/Makefile +++ b/arch/um/kernel/Makefile | |||
@@ -7,7 +7,7 @@ extra-y := vmlinux.lds | |||
7 | clean-files := | 7 | clean-files := |
8 | 8 | ||
9 | obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \ | 9 | obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \ |
10 | physmem.o process.o ptrace.o reboot.o resource.o sigio.o \ | 10 | physmem.o process.o ptrace.o reboot.o sigio.o \ |
11 | signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \ | 11 | signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \ |
12 | um_arch.o umid.o | 12 | um_arch.o umid.o |
13 | 13 | ||
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 8d56ec6cca79..121166400e25 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -39,9 +39,9 @@ static long execve1(char *file, char __user * __user *argv, | |||
39 | char __user *__user *env) | 39 | char __user *__user *env) |
40 | { | 40 | { |
41 | long error; | 41 | long error; |
42 | #ifdef CONFIG_TTY_LOG | ||
42 | struct tty_struct *tty; | 43 | struct tty_struct *tty; |
43 | 44 | ||
44 | #ifdef CONFIG_TTY_LOG | ||
45 | mutex_lock(&tty_mutex); | 45 | mutex_lock(&tty_mutex); |
46 | tty = get_current_tty(); | 46 | tty = get_current_tty(); |
47 | if (tty) | 47 | if (tty) |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 5c1e611f628d..50a288bb875a 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -79,7 +79,7 @@ skip: | |||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | struct irq_fd *active_fds = NULL; | 82 | static struct irq_fd *active_fds = NULL; |
83 | static struct irq_fd **last_irq_ptr = &active_fds; | 83 | static struct irq_fd **last_irq_ptr = &active_fds; |
84 | 84 | ||
85 | extern void free_irqs(void); | 85 | extern void free_irqs(void); |
@@ -124,8 +124,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id) | |||
124 | if (err < 0) | 124 | if (err < 0) |
125 | goto out; | 125 | goto out; |
126 | 126 | ||
127 | new_fd = um_kmalloc(sizeof(*new_fd)); | ||
128 | err = -ENOMEM; | 127 | err = -ENOMEM; |
128 | new_fd = kmalloc(sizeof(struct irq_fd), GFP_KERNEL); | ||
129 | if (new_fd == NULL) | 129 | if (new_fd == NULL) |
130 | goto out; | 130 | goto out; |
131 | 131 | ||
@@ -176,9 +176,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id) | |||
176 | */ | 176 | */ |
177 | spin_unlock_irqrestore(&irq_lock, flags); | 177 | spin_unlock_irqrestore(&irq_lock, flags); |
178 | kfree(tmp_pfd); | 178 | kfree(tmp_pfd); |
179 | tmp_pfd = NULL; | ||
180 | 179 | ||
181 | tmp_pfd = um_kmalloc(n); | 180 | tmp_pfd = kmalloc(n, GFP_KERNEL); |
182 | if (tmp_pfd == NULL) | 181 | if (tmp_pfd == NULL) |
183 | goto out_kfree; | 182 | goto out_kfree; |
184 | 183 | ||
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index c95855ba6ab5..e85d65deea0d 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -24,8 +24,9 @@ | |||
24 | #include "init.h" | 24 | #include "init.h" |
25 | #include "kern_constants.h" | 25 | #include "kern_constants.h" |
26 | 26 | ||
27 | /* Changed during early boot */ | 27 | /* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ |
28 | unsigned long *empty_zero_page = NULL; | 28 | unsigned long *empty_zero_page = NULL; |
29 | /* allocated in paging_init and unchanged thereafter */ | ||
29 | unsigned long *empty_bad_page = NULL; | 30 | unsigned long *empty_bad_page = NULL; |
30 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 31 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
31 | unsigned long long highmem; | 32 | unsigned long long highmem; |
@@ -65,8 +66,8 @@ void mem_init(void) | |||
65 | { | 66 | { |
66 | max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT; | 67 | max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT; |
67 | 68 | ||
68 | /* clear the zero-page */ | 69 | /* clear the zero-page */ |
69 | memset((void *) empty_zero_page, 0, PAGE_SIZE); | 70 | memset((void *) empty_zero_page, 0, PAGE_SIZE); |
70 | 71 | ||
71 | /* Map in the area just after the brk now that kmalloc is about | 72 | /* Map in the area just after the brk now that kmalloc is about |
72 | * to be turned on. | 73 | * to be turned on. |
@@ -253,8 +254,10 @@ struct page *arch_validate(struct page *page, gfp_t mask, int order) | |||
253 | int i; | 254 | int i; |
254 | 255 | ||
255 | again: | 256 | again: |
256 | if(page == NULL) return(page); | 257 | if(page == NULL) |
257 | if(PageHighMem(page)) return(page); | 258 | return page; |
259 | if(PageHighMem(page)) | ||
260 | return page; | ||
258 | 261 | ||
259 | addr = (unsigned long) page_address(page); | 262 | addr = (unsigned long) page_address(page); |
260 | for(i = 0; i < (1 << order); i++){ | 263 | for(i = 0; i < (1 << order); i++){ |
@@ -263,13 +266,15 @@ struct page *arch_validate(struct page *page, gfp_t mask, int order) | |||
263 | sizeof(zero), | 266 | sizeof(zero), |
264 | ¤t->thread.fault_addr, | 267 | ¤t->thread.fault_addr, |
265 | ¤t->thread.fault_catcher)){ | 268 | ¤t->thread.fault_catcher)){ |
266 | if(!(mask & __GFP_WAIT)) return(NULL); | 269 | if(!(mask & __GFP_WAIT)) |
270 | return NULL; | ||
267 | else break; | 271 | else break; |
268 | } | 272 | } |
269 | addr += PAGE_SIZE; | 273 | addr += PAGE_SIZE; |
270 | } | 274 | } |
271 | 275 | ||
272 | if(i == (1 << order)) return(page); | 276 | if(i == (1 << order)) |
277 | return page; | ||
273 | page = alloc_pages(mask, order); | 278 | page = alloc_pages(mask, order); |
274 | goto again; | 279 | goto again; |
275 | } | 280 | } |
@@ -283,7 +288,6 @@ void free_initmem(void) | |||
283 | } | 288 | } |
284 | 289 | ||
285 | #ifdef CONFIG_BLK_DEV_INITRD | 290 | #ifdef CONFIG_BLK_DEV_INITRD |
286 | |||
287 | void free_initrd_mem(unsigned long start, unsigned long end) | 291 | void free_initrd_mem(unsigned long start, unsigned long end) |
288 | { | 292 | { |
289 | if (start < end) | 293 | if (start < end) |
@@ -296,37 +300,36 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
296 | totalram_pages++; | 300 | totalram_pages++; |
297 | } | 301 | } |
298 | } | 302 | } |
299 | |||
300 | #endif | 303 | #endif |
301 | 304 | ||
302 | void show_mem(void) | 305 | void show_mem(void) |
303 | { | 306 | { |
304 | int pfn, total = 0, reserved = 0; | 307 | int pfn, total = 0, reserved = 0; |
305 | int shared = 0, cached = 0; | 308 | int shared = 0, cached = 0; |
306 | int highmem = 0; | 309 | int highmem = 0; |
307 | struct page *page; | 310 | struct page *page; |
308 | 311 | ||
309 | printk("Mem-info:\n"); | 312 | printk("Mem-info:\n"); |
310 | show_free_areas(); | 313 | show_free_areas(); |
311 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | 314 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); |
312 | pfn = max_mapnr; | 315 | pfn = max_mapnr; |
313 | while(pfn-- > 0) { | 316 | while(pfn-- > 0) { |
314 | page = pfn_to_page(pfn); | 317 | page = pfn_to_page(pfn); |
315 | total++; | 318 | total++; |
316 | if(PageHighMem(page)) | 319 | if(PageHighMem(page)) |
317 | highmem++; | 320 | highmem++; |
318 | if(PageReserved(page)) | 321 | if(PageReserved(page)) |
319 | reserved++; | 322 | reserved++; |
320 | else if(PageSwapCache(page)) | 323 | else if(PageSwapCache(page)) |
321 | cached++; | 324 | cached++; |
322 | else if(page_count(page)) | 325 | else if(page_count(page)) |
323 | shared += page_count(page) - 1; | 326 | shared += page_count(page) - 1; |
324 | } | 327 | } |
325 | printk("%d pages of RAM\n", total); | 328 | printk("%d pages of RAM\n", total); |
326 | printk("%d pages of HIGHMEM\n", highmem); | 329 | printk("%d pages of HIGHMEM\n", highmem); |
327 | printk("%d reserved pages\n", reserved); | 330 | printk("%d reserved pages\n", reserved); |
328 | printk("%d pages shared\n", shared); | 331 | printk("%d pages shared\n", shared); |
329 | printk("%d pages swap cached\n", cached); | 332 | printk("%d pages swap cached\n", cached); |
330 | } | 333 | } |
331 | 334 | ||
332 | /* | 335 | /* |
@@ -362,28 +365,7 @@ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | |||
362 | struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | 365 | struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) |
363 | { | 366 | { |
364 | struct page *pte; | 367 | struct page *pte; |
365 | 368 | ||
366 | pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); | 369 | pte = alloc_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO); |
367 | return pte; | 370 | return pte; |
368 | } | 371 | } |
369 | |||
370 | struct iomem_region *iomem_regions = NULL; | ||
371 | int iomem_size = 0; | ||
372 | |||
373 | extern int parse_iomem(char *str, int *add) __init; | ||
374 | |||
375 | __uml_setup("iomem=", parse_iomem, | ||
376 | "iomem=<name>,<file>\n" | ||
377 | " Configure <file> as an IO memory region named <name>.\n\n" | ||
378 | ); | ||
379 | |||
380 | /* | ||
381 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
382 | * Emacs will notice this stuff at the end of the file and automatically | ||
383 | * adjust the settings for this buffer only. This must remain at the end | ||
384 | * of the file. | ||
385 | * --------------------------------------------------------------------------- | ||
386 | * Local variables: | ||
387 | * c-file-style: "linux" | ||
388 | * End: | ||
389 | */ | ||
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index abafa64b8727..638f3b5f6094 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c | |||
@@ -40,7 +40,7 @@ static struct rb_node **find_rb(void *virt) | |||
40 | while(*n != NULL){ | 40 | while(*n != NULL){ |
41 | d = rb_entry(*n, struct phys_desc, rb); | 41 | d = rb_entry(*n, struct phys_desc, rb); |
42 | if(d->virt == virt) | 42 | if(d->virt == virt) |
43 | return(n); | 43 | return n; |
44 | 44 | ||
45 | if(d->virt > virt) | 45 | if(d->virt > virt) |
46 | n = &(*n)->rb_left; | 46 | n = &(*n)->rb_left; |
@@ -48,7 +48,7 @@ static struct rb_node **find_rb(void *virt) | |||
48 | n = &(*n)->rb_right; | 48 | n = &(*n)->rb_right; |
49 | } | 49 | } |
50 | 50 | ||
51 | return(n); | 51 | return n; |
52 | } | 52 | } |
53 | 53 | ||
54 | static struct phys_desc *find_phys_mapping(void *virt) | 54 | static struct phys_desc *find_phys_mapping(void *virt) |
@@ -56,9 +56,9 @@ static struct phys_desc *find_phys_mapping(void *virt) | |||
56 | struct rb_node **n = find_rb(virt); | 56 | struct rb_node **n = find_rb(virt); |
57 | 57 | ||
58 | if(*n == NULL) | 58 | if(*n == NULL) |
59 | return(NULL); | 59 | return NULL; |
60 | 60 | ||
61 | return(rb_entry(*n, struct phys_desc, rb)); | 61 | return rb_entry(*n, struct phys_desc, rb); |
62 | } | 62 | } |
63 | 63 | ||
64 | static void insert_phys_mapping(struct phys_desc *desc) | 64 | static void insert_phys_mapping(struct phys_desc *desc) |
@@ -89,10 +89,10 @@ static struct desc_mapping *find_mapping(int fd) | |||
89 | list_for_each(ele, &descriptor_mappings){ | 89 | list_for_each(ele, &descriptor_mappings){ |
90 | desc = list_entry(ele, struct desc_mapping, list); | 90 | desc = list_entry(ele, struct desc_mapping, list); |
91 | if(desc->fd == fd) | 91 | if(desc->fd == fd) |
92 | return(desc); | 92 | return desc; |
93 | } | 93 | } |
94 | 94 | ||
95 | return(NULL); | 95 | return NULL; |
96 | } | 96 | } |
97 | 97 | ||
98 | static struct desc_mapping *descriptor_mapping(int fd) | 98 | static struct desc_mapping *descriptor_mapping(int fd) |
@@ -101,11 +101,11 @@ static struct desc_mapping *descriptor_mapping(int fd) | |||
101 | 101 | ||
102 | desc = find_mapping(fd); | 102 | desc = find_mapping(fd); |
103 | if(desc != NULL) | 103 | if(desc != NULL) |
104 | return(desc); | 104 | return desc; |
105 | 105 | ||
106 | desc = kmalloc(sizeof(*desc), GFP_ATOMIC); | 106 | desc = kmalloc(sizeof(*desc), GFP_ATOMIC); |
107 | if(desc == NULL) | 107 | if(desc == NULL) |
108 | return(NULL); | 108 | return NULL; |
109 | 109 | ||
110 | *desc = ((struct desc_mapping) | 110 | *desc = ((struct desc_mapping) |
111 | { .fd = fd, | 111 | { .fd = fd, |
@@ -113,7 +113,7 @@ static struct desc_mapping *descriptor_mapping(int fd) | |||
113 | .pages = LIST_HEAD_INIT(desc->pages) }); | 113 | .pages = LIST_HEAD_INIT(desc->pages) }); |
114 | list_add(&desc->list, &descriptor_mappings); | 114 | list_add(&desc->list, &descriptor_mappings); |
115 | 115 | ||
116 | return(desc); | 116 | return desc; |
117 | } | 117 | } |
118 | 118 | ||
119 | int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w) | 119 | int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w) |
@@ -125,11 +125,11 @@ int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w) | |||
125 | 125 | ||
126 | fd_maps = descriptor_mapping(fd); | 126 | fd_maps = descriptor_mapping(fd); |
127 | if(fd_maps == NULL) | 127 | if(fd_maps == NULL) |
128 | return(-ENOMEM); | 128 | return -ENOMEM; |
129 | 129 | ||
130 | phys = __pa(virt); | 130 | phys = __pa(virt); |
131 | desc = find_phys_mapping(virt); | 131 | desc = find_phys_mapping(virt); |
132 | if(desc != NULL) | 132 | if(desc != NULL) |
133 | panic("Address 0x%p is already substituted\n", virt); | 133 | panic("Address 0x%p is already substituted\n", virt); |
134 | 134 | ||
135 | err = -ENOMEM; | 135 | err = -ENOMEM; |
@@ -155,7 +155,7 @@ int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w) | |||
155 | rb_erase(&desc->rb, &phys_mappings); | 155 | rb_erase(&desc->rb, &phys_mappings); |
156 | kfree(desc); | 156 | kfree(desc); |
157 | out: | 157 | out: |
158 | return(err); | 158 | return err; |
159 | } | 159 | } |
160 | 160 | ||
161 | static int physmem_fd = -1; | 161 | static int physmem_fd = -1; |
@@ -182,10 +182,10 @@ int physmem_remove_mapping(void *virt) | |||
182 | virt = (void *) ((unsigned long) virt & PAGE_MASK); | 182 | virt = (void *) ((unsigned long) virt & PAGE_MASK); |
183 | desc = find_phys_mapping(virt); | 183 | desc = find_phys_mapping(virt); |
184 | if(desc == NULL) | 184 | if(desc == NULL) |
185 | return(0); | 185 | return 0; |
186 | 186 | ||
187 | remove_mapping(desc); | 187 | remove_mapping(desc); |
188 | return(1); | 188 | return 1; |
189 | } | 189 | } |
190 | 190 | ||
191 | void physmem_forget_descriptor(int fd) | 191 | void physmem_forget_descriptor(int fd) |
@@ -239,9 +239,9 @@ void arch_free_page(struct page *page, int order) | |||
239 | 239 | ||
240 | int is_remapped(void *virt) | 240 | int is_remapped(void *virt) |
241 | { | 241 | { |
242 | struct phys_desc *desc = find_phys_mapping(virt); | 242 | struct phys_desc *desc = find_phys_mapping(virt); |
243 | 243 | ||
244 | return(desc != NULL); | 244 | return desc != NULL; |
245 | } | 245 | } |
246 | 246 | ||
247 | /* Changed during early boot */ | 247 | /* Changed during early boot */ |
@@ -276,7 +276,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | |||
276 | else map = alloc_bootmem_low_pages(total_len); | 276 | else map = alloc_bootmem_low_pages(total_len); |
277 | 277 | ||
278 | if(map == NULL) | 278 | if(map == NULL) |
279 | return(-ENOMEM); | 279 | return -ENOMEM; |
280 | 280 | ||
281 | for(i = 0; i < total_pages; i++){ | 281 | for(i = 0; i < total_pages; i++){ |
282 | p = &map[i]; | 282 | p = &map[i]; |
@@ -286,7 +286,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) | |||
286 | } | 286 | } |
287 | 287 | ||
288 | max_mapnr = total_pages; | 288 | max_mapnr = total_pages; |
289 | return(0); | 289 | return 0; |
290 | } | 290 | } |
291 | 291 | ||
292 | /* Changed during early boot */ | 292 | /* Changed during early boot */ |
@@ -296,7 +296,7 @@ unsigned long get_kmem_end(void) | |||
296 | { | 296 | { |
297 | if(kmem_top == 0) | 297 | if(kmem_top == 0) |
298 | kmem_top = CHOOSE_MODE(kmem_end_tt, kmem_end_skas); | 298 | kmem_top = CHOOSE_MODE(kmem_end_tt, kmem_end_skas); |
299 | return(kmem_top); | 299 | return kmem_top; |
300 | } | 300 | } |
301 | 301 | ||
302 | void map_memory(unsigned long virt, unsigned long phys, unsigned long len, | 302 | void map_memory(unsigned long virt, unsigned long phys, unsigned long len, |
@@ -379,7 +379,7 @@ int phys_mapping(unsigned long phys, __u64 *offset_out) | |||
379 | *offset_out = phys - iomem_size; | 379 | *offset_out = phys - iomem_size; |
380 | } | 380 | } |
381 | 381 | ||
382 | return(fd); | 382 | return fd; |
383 | } | 383 | } |
384 | 384 | ||
385 | static int __init uml_mem_setup(char *line, int *add) | 385 | static int __init uml_mem_setup(char *line, int *add) |
@@ -398,6 +398,23 @@ __uml_setup("mem=", uml_mem_setup, | |||
398 | " Example: mem=64M\n\n" | 398 | " Example: mem=64M\n\n" |
399 | ); | 399 | ); |
400 | 400 | ||
401 | extern int __init parse_iomem(char *str, int *add); | ||
402 | |||
403 | __uml_setup("iomem=", parse_iomem, | ||
404 | "iomem=<name>,<file>\n" | ||
405 | " Configure <file> as an IO memory region named <name>.\n\n" | ||
406 | ); | ||
407 | |||
408 | /* | ||
409 | * This list is constructed in parse_iomem and addresses filled in in | ||
410 | * setup_iomem, both of which run during early boot. Afterwards, it's | ||
411 | * unchanged. | ||
412 | */ | ||
413 | struct iomem_region *iomem_regions = NULL; | ||
414 | |||
415 | /* Initialized in parse_iomem */ | ||
416 | int iomem_size = 0; | ||
417 | |||
401 | unsigned long find_iomem(char *driver, unsigned long *len_out) | 418 | unsigned long find_iomem(char *driver, unsigned long *len_out) |
402 | { | 419 | { |
403 | struct iomem_region *region = iomem_regions; | 420 | struct iomem_region *region = iomem_regions; |
@@ -405,13 +422,13 @@ unsigned long find_iomem(char *driver, unsigned long *len_out) | |||
405 | while(region != NULL){ | 422 | while(region != NULL){ |
406 | if(!strcmp(region->driver, driver)){ | 423 | if(!strcmp(region->driver, driver)){ |
407 | *len_out = region->size; | 424 | *len_out = region->size; |
408 | return(region->virt); | 425 | return region->virt; |
409 | } | 426 | } |
410 | 427 | ||
411 | region = region->next; | 428 | region = region->next; |
412 | } | 429 | } |
413 | 430 | ||
414 | return(0); | 431 | return 0; |
415 | } | 432 | } |
416 | 433 | ||
417 | int setup_iomem(void) | 434 | int setup_iomem(void) |
@@ -435,18 +452,7 @@ int setup_iomem(void) | |||
435 | region = region->next; | 452 | region = region->next; |
436 | } | 453 | } |
437 | 454 | ||
438 | return(0); | 455 | return 0; |
439 | } | 456 | } |
440 | 457 | ||
441 | __initcall(setup_iomem); | 458 | __initcall(setup_iomem); |
442 | |||
443 | /* | ||
444 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
445 | * Emacs will notice this stuff at the end of the file and automatically | ||
446 | * adjust the settings for this buffer only. This must remain at the end | ||
447 | * of the file. | ||
448 | * --------------------------------------------------------------------------- | ||
449 | * Local variables: | ||
450 | * c-file-style: "linux" | ||
451 | * End: | ||
452 | */ | ||
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 9a77fb3c269d..627742d89434 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "kern_util.h" | 18 | #include "kern_util.h" |
19 | #include "skas_ptrace.h" | 19 | #include "skas_ptrace.h" |
20 | #include "sysdep/ptrace.h" | 20 | #include "sysdep/ptrace.h" |
21 | #include "os.h" | ||
21 | 22 | ||
22 | static inline void set_singlestepping(struct task_struct *child, int on) | 23 | static inline void set_singlestepping(struct task_struct *child, int on) |
23 | { | 24 | { |
@@ -241,6 +242,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
241 | break; | 242 | break; |
242 | } | 243 | } |
243 | #endif | 244 | #endif |
245 | #ifdef PTRACE_ARCH_PRCTL | ||
246 | case PTRACE_ARCH_PRCTL: | ||
247 | /* XXX Calls ptrace on the host - needs some SMP thinking */ | ||
248 | ret = arch_prctl_skas(child, data, (void *) addr); | ||
249 | break; | ||
250 | #endif | ||
244 | default: | 251 | default: |
245 | ret = ptrace_request(child, request, addr, data); | 252 | ret = ptrace_request(child, request, addr, data); |
246 | break; | 253 | break; |
diff --git a/arch/um/kernel/resource.c b/arch/um/kernel/resource.c deleted file mode 100644 index 32188e12e8af..000000000000 --- a/arch/um/kernel/resource.c +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "linux/pci.h" | ||
7 | |||
8 | unsigned long resource_fixup(struct pci_dev * dev, struct resource * res, | ||
9 | unsigned long start, unsigned long size) | ||
10 | { | ||
11 | return start; | ||
12 | } | ||
13 | |||
14 | /* | ||
15 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
16 | * Emacs will notice this stuff at the end of the file and automatically | ||
17 | * adjust the settings for this buffer only. This must remain at the end | ||
18 | * of the file. | ||
19 | * --------------------------------------------------------------------------- | ||
20 | * Local variables: | ||
21 | * c-file-style: "linux" | ||
22 | * End: | ||
23 | */ | ||
diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio.c index 2b0ab438301c..89f9866a1354 100644 --- a/arch/um/kernel/sigio.c +++ b/arch/um/kernel/sigio.c | |||
@@ -23,7 +23,7 @@ static irqreturn_t sigio_interrupt(int irq, void *data) | |||
23 | 23 | ||
24 | os_read_file(sigio_irq_fd, &c, sizeof(c)); | 24 | os_read_file(sigio_irq_fd, &c, sizeof(c)); |
25 | reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); | 25 | reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); |
26 | return(IRQ_HANDLED); | 26 | return IRQ_HANDLED; |
27 | } | 27 | } |
28 | 28 | ||
29 | int write_sigio_irq(int fd) | 29 | int write_sigio_irq(int fd) |
@@ -36,12 +36,13 @@ int write_sigio_irq(int fd) | |||
36 | if(err){ | 36 | if(err){ |
37 | printk("write_sigio_irq : um_request_irq failed, err = %d\n", | 37 | printk("write_sigio_irq : um_request_irq failed, err = %d\n", |
38 | err); | 38 | err); |
39 | return(-1); | 39 | return -1; |
40 | } | 40 | } |
41 | sigio_irq_fd = fd; | 41 | sigio_irq_fd = fd; |
42 | return(0); | 42 | return 0; |
43 | } | 43 | } |
44 | 44 | ||
45 | /* These are called from os-Linux/sigio.c to protect its pollfds arrays. */ | ||
45 | static DEFINE_SPINLOCK(sigio_spinlock); | 46 | static DEFINE_SPINLOCK(sigio_spinlock); |
46 | 47 | ||
47 | void sigio_lock(void) | 48 | void sigio_lock(void) |
diff --git a/arch/um/kernel/skas/mem.c b/arch/um/kernel/skas/mem.c index 0d2cce621134..7c18dfcd7d8e 100644 --- a/arch/um/kernel/skas/mem.c +++ b/arch/um/kernel/skas/mem.c | |||
@@ -14,13 +14,9 @@ unsigned long set_task_sizes_skas(unsigned long *task_size_out) | |||
14 | unsigned long host_task_size = ROUND_4M((unsigned long) | 14 | unsigned long host_task_size = ROUND_4M((unsigned long) |
15 | &host_task_size); | 15 | &host_task_size); |
16 | 16 | ||
17 | #ifdef CONFIG_HOST_TASK_SIZE | ||
18 | *host_size_out = ROUND_4M(CONFIG_HOST_TASK_SIZE); | ||
19 | *task_size_out = CONFIG_HOST_TASK_SIZE; | ||
20 | #else | ||
21 | if (!skas_needs_stub) | 17 | if (!skas_needs_stub) |
22 | *task_size_out = host_task_size; | 18 | *task_size_out = host_task_size; |
23 | else *task_size_out = CONFIG_STUB_START & PGDIR_MASK; | 19 | else *task_size_out = CONFIG_STUB_START & PGDIR_MASK; |
24 | #endif | 20 | |
25 | return host_task_size; | 21 | return host_task_size; |
26 | } | 22 | } |
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index f5ed8624648b..2828c5283227 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c | |||
@@ -149,22 +149,6 @@ long sys_olduname(struct oldold_utsname __user * name) | |||
149 | return error; | 149 | return error; |
150 | } | 150 | } |
151 | 151 | ||
152 | DEFINE_SPINLOCK(syscall_lock); | ||
153 | |||
154 | static int syscall_index = 0; | ||
155 | |||
156 | int next_syscall_index(int limit) | ||
157 | { | ||
158 | int ret; | ||
159 | |||
160 | spin_lock(&syscall_lock); | ||
161 | ret = syscall_index; | ||
162 | if(++syscall_index == limit) | ||
163 | syscall_index = 0; | ||
164 | spin_unlock(&syscall_lock); | ||
165 | return(ret); | ||
166 | } | ||
167 | |||
168 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | 152 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) |
169 | { | 153 | { |
170 | mm_segment_t fs; | 154 | mm_segment_t fs; |
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 239c98054dec..f9e02b31a97a 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c | |||
@@ -50,7 +50,7 @@ void dump_stack(void) | |||
50 | EXPORT_SYMBOL(dump_stack); | 50 | EXPORT_SYMBOL(dump_stack); |
51 | 51 | ||
52 | /*Stolen from arch/i386/kernel/traps.c */ | 52 | /*Stolen from arch/i386/kernel/traps.c */ |
53 | static int kstack_depth_to_print = 24; | 53 | static const int kstack_depth_to_print = 24; |
54 | 54 | ||
55 | /* This recently started being used in arch-independent code too, as in | 55 | /* This recently started being used in arch-independent code too, as in |
56 | * kernel/sched.c.*/ | 56 | * kernel/sched.c.*/ |
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 2e354b3ca060..b1f8b0752419 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
@@ -35,31 +35,31 @@ unsigned long long sched_clock(void) | |||
35 | return (unsigned long long)jiffies_64 * (1000000000 / HZ); | 35 | return (unsigned long long)jiffies_64 * (1000000000 / HZ); |
36 | } | 36 | } |
37 | 37 | ||
38 | static unsigned long long prev_nsecs; | 38 | static unsigned long long prev_nsecs[NR_CPUS]; |
39 | #ifdef CONFIG_UML_REAL_TIME_CLOCK | 39 | #ifdef CONFIG_UML_REAL_TIME_CLOCK |
40 | static long long delta; /* Deviation per interval */ | 40 | static long long delta[NR_CPUS]; /* Deviation per interval */ |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | void timer_irq(union uml_pt_regs *regs) | 43 | void timer_irq(union uml_pt_regs *regs) |
44 | { | 44 | { |
45 | unsigned long long ticks = 0; | 45 | unsigned long long ticks = 0; |
46 | |||
47 | #ifdef CONFIG_UML_REAL_TIME_CLOCK | 46 | #ifdef CONFIG_UML_REAL_TIME_CLOCK |
48 | if(prev_nsecs){ | 47 | int c = cpu(); |
48 | if(prev_nsecs[c]){ | ||
49 | /* We've had 1 tick */ | 49 | /* We've had 1 tick */ |
50 | unsigned long long nsecs = os_nsecs(); | 50 | unsigned long long nsecs = os_nsecs(); |
51 | 51 | ||
52 | delta += nsecs - prev_nsecs; | 52 | delta[c] += nsecs - prev_nsecs[c]; |
53 | prev_nsecs = nsecs; | 53 | prev_nsecs[c] = nsecs; |
54 | 54 | ||
55 | /* Protect against the host clock being set backwards */ | 55 | /* Protect against the host clock being set backwards */ |
56 | if(delta < 0) | 56 | if(delta[c] < 0) |
57 | delta = 0; | 57 | delta[c] = 0; |
58 | 58 | ||
59 | ticks += (delta * HZ) / BILLION; | 59 | ticks += (delta[c] * HZ) / BILLION; |
60 | delta -= (ticks * BILLION) / HZ; | 60 | delta[c] -= (ticks * BILLION) / HZ; |
61 | } | 61 | } |
62 | else prev_nsecs = os_nsecs(); | 62 | else prev_nsecs[c] = os_nsecs(); |
63 | #else | 63 | #else |
64 | ticks = 1; | 64 | ticks = 1; |
65 | #endif | 65 | #endif |
@@ -69,8 +69,8 @@ void timer_irq(union uml_pt_regs *regs) | |||
69 | } | 69 | } |
70 | } | 70 | } |
71 | 71 | ||
72 | /* Protects local_offset */ | ||
72 | static DEFINE_SPINLOCK(timer_spinlock); | 73 | static DEFINE_SPINLOCK(timer_spinlock); |
73 | |||
74 | static unsigned long long local_offset = 0; | 74 | static unsigned long long local_offset = 0; |
75 | 75 | ||
76 | static inline unsigned long long get_time(void) | 76 | static inline unsigned long long get_time(void) |
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index b5f124a2f6ae..26f15c458574 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -128,7 +128,18 @@ out_of_memory: | |||
128 | goto out; | 128 | goto out; |
129 | } | 129 | } |
130 | 130 | ||
131 | void segv_handler(int sig, union uml_pt_regs *regs) | 131 | static void bad_segv(struct faultinfo fi, unsigned long ip) |
132 | { | ||
133 | struct siginfo si; | ||
134 | |||
135 | si.si_signo = SIGSEGV; | ||
136 | si.si_code = SEGV_ACCERR; | ||
137 | si.si_addr = (void __user *) FAULT_ADDRESS(fi); | ||
138 | current->thread.arch.faultinfo = fi; | ||
139 | force_sig_info(SIGSEGV, &si, current); | ||
140 | } | ||
141 | |||
142 | static void segv_handler(int sig, union uml_pt_regs *regs) | ||
132 | { | 143 | { |
133 | struct faultinfo * fi = UPT_FAULTINFO(regs); | 144 | struct faultinfo * fi = UPT_FAULTINFO(regs); |
134 | 145 | ||
@@ -205,17 +216,6 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc) | |||
205 | return(0); | 216 | return(0); |
206 | } | 217 | } |
207 | 218 | ||
208 | void bad_segv(struct faultinfo fi, unsigned long ip) | ||
209 | { | ||
210 | struct siginfo si; | ||
211 | |||
212 | si.si_signo = SIGSEGV; | ||
213 | si.si_code = SEGV_ACCERR; | ||
214 | si.si_addr = (void __user *) FAULT_ADDRESS(fi); | ||
215 | current->thread.arch.faultinfo = fi; | ||
216 | force_sig_info(SIGSEGV, &si, current); | ||
217 | } | ||
218 | |||
219 | void relay_signal(int sig, union uml_pt_regs *regs) | 219 | void relay_signal(int sig, union uml_pt_regs *regs) |
220 | { | 220 | { |
221 | if(arch_handle_signal(sig, regs)) | 221 | if(arch_handle_signal(sig, regs)) |
@@ -232,14 +232,14 @@ void relay_signal(int sig, union uml_pt_regs *regs) | |||
232 | force_sig(sig, current); | 232 | force_sig(sig, current); |
233 | } | 233 | } |
234 | 234 | ||
235 | void bus_handler(int sig, union uml_pt_regs *regs) | 235 | static void bus_handler(int sig, union uml_pt_regs *regs) |
236 | { | 236 | { |
237 | if(current->thread.fault_catcher != NULL) | 237 | if(current->thread.fault_catcher != NULL) |
238 | do_longjmp(current->thread.fault_catcher, 1); | 238 | do_longjmp(current->thread.fault_catcher, 1); |
239 | else relay_signal(sig, regs); | 239 | else relay_signal(sig, regs); |
240 | } | 240 | } |
241 | 241 | ||
242 | void winch(int sig, union uml_pt_regs *regs) | 242 | static void winch(int sig, union uml_pt_regs *regs) |
243 | { | 243 | { |
244 | do_IRQ(WINCH_IRQ, regs); | 244 | do_IRQ(WINCH_IRQ, regs); |
245 | } | 245 | } |
diff --git a/arch/um/kernel/tt/gdb.c b/arch/um/kernel/tt/gdb.c index 786e4edd86c5..8eba8f7dca68 100644 --- a/arch/um/kernel/tt/gdb.c +++ b/arch/um/kernel/tt/gdb.c | |||
@@ -139,7 +139,7 @@ static void config_gdb_cb(void *arg) | |||
139 | init_proxy(debugger_pid, 0, 0); | 139 | init_proxy(debugger_pid, 0, 0); |
140 | } | 140 | } |
141 | 141 | ||
142 | int gdb_config(char *str) | 142 | int gdb_config(char *str, char **error_out) |
143 | { | 143 | { |
144 | struct gdb_data data; | 144 | struct gdb_data data; |
145 | 145 | ||
@@ -154,7 +154,7 @@ void remove_gdb_cb(void *unused) | |||
154 | exit_debugger_cb(NULL); | 154 | exit_debugger_cb(NULL); |
155 | } | 155 | } |
156 | 156 | ||
157 | int gdb_remove(int unused) | 157 | int gdb_remove(int unused, char **error_out) |
158 | { | 158 | { |
159 | initial_thread_cb(remove_gdb_cb, NULL); | 159 | initial_thread_cb(remove_gdb_cb, NULL); |
160 | return 0; | 160 | return 0; |
diff --git a/arch/um/kernel/tt/gdb_kern.c b/arch/um/kernel/tt/gdb_kern.c index 68e1bf63cd0a..03b06bc00771 100644 --- a/arch/um/kernel/tt/gdb_kern.c +++ b/arch/um/kernel/tt/gdb_kern.c | |||
@@ -8,10 +8,11 @@ | |||
8 | 8 | ||
9 | #ifdef CONFIG_MCONSOLE | 9 | #ifdef CONFIG_MCONSOLE |
10 | 10 | ||
11 | extern int gdb_config(char *str); | 11 | extern int gdb_config(char *str, char **error_out); |
12 | extern int gdb_remove(int n); | 12 | extern int gdb_remove(int n, char **error_out); |
13 | 13 | ||
14 | static struct mc_device gdb_mc = { | 14 | static struct mc_device gdb_mc = { |
15 | .list = INIT_LIST_HEAD(gdb_mc.list), | ||
15 | .name = "gdb", | 16 | .name = "gdb", |
16 | .config = gdb_config, | 17 | .config = gdb_config, |
17 | .remove = gdb_remove, | 18 | .remove = gdb_remove, |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 66f43c906821..84e57f6da1d3 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "kern.h" | 30 | #include "kern.h" |
31 | #include "mem_user.h" | 31 | #include "mem_user.h" |
32 | #include "mem.h" | 32 | #include "mem.h" |
33 | #include "umid.h" | ||
34 | #include "initrd.h" | 33 | #include "initrd.h" |
35 | #include "init.h" | 34 | #include "init.h" |
36 | #include "os.h" | 35 | #include "os.h" |
diff --git a/arch/um/kernel/umid.c b/arch/um/kernel/umid.c index 4eaee823bfd2..039e16efcd55 100644 --- a/arch/um/kernel/umid.c +++ b/arch/um/kernel/umid.c | |||
@@ -16,8 +16,10 @@ static int __init set_umid_arg(char *name, int *add) | |||
16 | { | 16 | { |
17 | int err; | 17 | int err; |
18 | 18 | ||
19 | if(umid_inited) | 19 | if(umid_inited){ |
20 | printf("umid already set\n"); | ||
20 | return 0; | 21 | return 0; |
22 | } | ||
21 | 23 | ||
22 | *add = 0; | 24 | *add = 0; |
23 | err = set_umid(name); | 25 | err = set_umid(name); |
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c index f897140cc4ae..6ff12743a0bd 100644 --- a/arch/um/os-Linux/aio.c +++ b/arch/um/os-Linux/aio.c | |||
@@ -24,9 +24,6 @@ struct aio_thread_req { | |||
24 | struct aio_context *aio; | 24 | struct aio_context *aio; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | static int aio_req_fd_r = -1; | ||
28 | static int aio_req_fd_w = -1; | ||
29 | |||
30 | #if defined(HAVE_AIO_ABI) | 27 | #if defined(HAVE_AIO_ABI) |
31 | #include <linux/aio_abi.h> | 28 | #include <linux/aio_abi.h> |
32 | 29 | ||
@@ -111,6 +108,7 @@ static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf, | |||
111 | return err; | 108 | return err; |
112 | } | 109 | } |
113 | 110 | ||
111 | /* Initialized in an initcall and unchanged thereafter */ | ||
114 | static aio_context_t ctx = 0; | 112 | static aio_context_t ctx = 0; |
115 | 113 | ||
116 | static int aio_thread(void *arg) | 114 | static int aio_thread(void *arg) |
@@ -137,7 +135,7 @@ static int aio_thread(void *arg) | |||
137 | err = os_write_file(reply_fd, &reply, sizeof(reply)); | 135 | err = os_write_file(reply_fd, &reply, sizeof(reply)); |
138 | if(err != sizeof(reply)) | 136 | if(err != sizeof(reply)) |
139 | printk("aio_thread - write failed, fd = %d, " | 137 | printk("aio_thread - write failed, fd = %d, " |
140 | "err = %d\n", aio_req_fd_r, -err); | 138 | "err = %d\n", reply_fd, -err); |
141 | } | 139 | } |
142 | } | 140 | } |
143 | return 0; | 141 | return 0; |
@@ -182,6 +180,11 @@ out: | |||
182 | return err; | 180 | return err; |
183 | } | 181 | } |
184 | 182 | ||
183 | /* These are initialized in initcalls and not changed */ | ||
184 | static int aio_req_fd_r = -1; | ||
185 | static int aio_req_fd_w = -1; | ||
186 | static int aio_pid = -1; | ||
187 | |||
185 | static int not_aio_thread(void *arg) | 188 | static int not_aio_thread(void *arg) |
186 | { | 189 | { |
187 | struct aio_thread_req req; | 190 | struct aio_thread_req req; |
@@ -208,14 +211,12 @@ static int not_aio_thread(void *arg) | |||
208 | err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply)); | 211 | err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply)); |
209 | if(err != sizeof(reply)) | 212 | if(err != sizeof(reply)) |
210 | printk("not_aio_thread - write failed, fd = %d, " | 213 | printk("not_aio_thread - write failed, fd = %d, " |
211 | "err = %d\n", aio_req_fd_r, -err); | 214 | "err = %d\n", req.aio->reply_fd, -err); |
212 | } | 215 | } |
213 | 216 | ||
214 | return 0; | 217 | return 0; |
215 | } | 218 | } |
216 | 219 | ||
217 | static int aio_pid = -1; | ||
218 | |||
219 | static int init_aio_24(void) | 220 | static int init_aio_24(void) |
220 | { | 221 | { |
221 | unsigned long stack; | 222 | unsigned long stack; |
@@ -308,6 +309,7 @@ static int submit_aio_26(enum aio_type type, int io_fd, char *buf, int len, | |||
308 | } | 309 | } |
309 | #endif | 310 | #endif |
310 | 311 | ||
312 | /* Initialized in an initcall and unchanged thereafter */ | ||
311 | static int aio_24 = DEFAULT_24_AIO; | 313 | static int aio_24 = DEFAULT_24_AIO; |
312 | 314 | ||
313 | static int __init set_aio_24(char *name, int *add) | 315 | static int __init set_aio_24(char *name, int *add) |
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c index 5a99dd3fbed0..3a8d7e3aae0a 100644 --- a/arch/um/os-Linux/elf_aux.c +++ b/arch/um/os-Linux/elf_aux.c | |||
@@ -21,12 +21,11 @@ typedef Elf32_auxv_t elf_auxv_t; | |||
21 | typedef Elf64_auxv_t elf_auxv_t; | 21 | typedef Elf64_auxv_t elf_auxv_t; |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | /* These are initialized very early in boot and never changed */ | ||
24 | char * elf_aux_platform; | 25 | char * elf_aux_platform; |
25 | long elf_aux_hwcap; | 26 | long elf_aux_hwcap; |
26 | |||
27 | unsigned long vsyscall_ehdr; | 27 | unsigned long vsyscall_ehdr; |
28 | unsigned long vsyscall_end; | 28 | unsigned long vsyscall_end; |
29 | |||
30 | unsigned long __kernel_vsyscall; | 29 | unsigned long __kernel_vsyscall; |
31 | 30 | ||
32 | __init void scan_elf_aux( char **envp) | 31 | __init void scan_elf_aux( char **envp) |
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index 189fa677085a..371b4335f46d 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c | |||
@@ -162,25 +162,6 @@ int os_set_owner(int fd, int pid) | |||
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
164 | 164 | ||
165 | /* FIXME? moved wholesale from sigio_user.c to get fcntls out of that file */ | ||
166 | int os_sigio_async(int master, int slave) | ||
167 | { | ||
168 | int flags; | ||
169 | |||
170 | flags = fcntl(master, F_GETFL); | ||
171 | if(flags < 0) | ||
172 | return -errno; | ||
173 | |||
174 | if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || | ||
175 | (fcntl(master, F_SETOWN, os_getpid()) < 0)) | ||
176 | return -errno; | ||
177 | |||
178 | if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)) | ||
179 | return -errno; | ||
180 | |||
181 | return(0); | ||
182 | } | ||
183 | |||
184 | int os_mode_fd(int fd, int mode) | 165 | int os_mode_fd(int fd, int mode) |
185 | { | 166 | { |
186 | int err; | 167 | int err; |
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c index d46b818c1311..d1b61d474e0a 100644 --- a/arch/um/os-Linux/irq.c +++ b/arch/um/os-Linux/irq.c | |||
@@ -20,6 +20,10 @@ | |||
20 | #include "os.h" | 20 | #include "os.h" |
21 | #include "um_malloc.h" | 21 | #include "um_malloc.h" |
22 | 22 | ||
23 | /* | ||
24 | * Locked by irq_lock in arch/um/kernel/irq.c. Changed by os_create_pollfd | ||
25 | * and os_free_irq_by_cb, which are called under irq_lock. | ||
26 | */ | ||
23 | static struct pollfd *pollfds = NULL; | 27 | static struct pollfd *pollfds = NULL; |
24 | static int pollfds_num = 0; | 28 | static int pollfds_num = 0; |
25 | static int pollfds_size = 0; | 29 | static int pollfds_size = 0; |
@@ -58,7 +62,7 @@ int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) | |||
58 | if (pollfds_num == pollfds_size) { | 62 | if (pollfds_num == pollfds_size) { |
59 | if (size_tmpfds <= pollfds_size * sizeof(pollfds[0])) { | 63 | if (size_tmpfds <= pollfds_size * sizeof(pollfds[0])) { |
60 | /* return min size needed for new pollfds area */ | 64 | /* return min size needed for new pollfds area */ |
61 | return((pollfds_size + 1) * sizeof(pollfds[0])); | 65 | return (pollfds_size + 1) * sizeof(pollfds[0]); |
62 | } | 66 | } |
63 | 67 | ||
64 | if (pollfds != NULL) { | 68 | if (pollfds != NULL) { |
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 4203681e508d..f1ea169db85e 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c | |||
@@ -20,7 +20,13 @@ | |||
20 | 20 | ||
21 | #include <sys/param.h> | 21 | #include <sys/param.h> |
22 | 22 | ||
23 | /* Modified by which_tmpdir, which is called during early boot */ | ||
23 | static char *default_tmpdir = "/tmp"; | 24 | static char *default_tmpdir = "/tmp"; |
25 | |||
26 | /* | ||
27 | * Modified when creating the physical memory file and when checking | ||
28 | * the tmp filesystem for usability, both happening during early boot. | ||
29 | */ | ||
24 | static char *tempdir = NULL; | 30 | static char *tempdir = NULL; |
25 | 31 | ||
26 | static void __init find_tempdir(void) | 32 | static void __init find_tempdir(void) |
@@ -29,7 +35,8 @@ static void __init find_tempdir(void) | |||
29 | int i; | 35 | int i; |
30 | char *dir = NULL; | 36 | char *dir = NULL; |
31 | 37 | ||
32 | if(tempdir != NULL) return; /* We've already been called */ | 38 | if(tempdir != NULL) /* We've already been called */ |
39 | return; | ||
33 | for(i = 0; dirs[i]; i++){ | 40 | for(i = 0; dirs[i]; i++){ |
34 | dir = getenv(dirs[i]); | 41 | dir = getenv(dirs[i]); |
35 | if((dir != NULL) && (*dir != '\0')) | 42 | if((dir != NULL) && (*dir != '\0')) |
@@ -83,6 +90,7 @@ static int next(int fd, char *buf, int size, char c) | |||
83 | return 1; | 90 | return 1; |
84 | } | 91 | } |
85 | 92 | ||
93 | /* which_tmpdir is called only during early boot */ | ||
86 | static int checked_tmpdir = 0; | 94 | static int checked_tmpdir = 0; |
87 | 95 | ||
88 | /* Look for a tmpfs mounted at /dev/shm. I couldn't find a cleaner | 96 | /* Look for a tmpfs mounted at /dev/shm. I couldn't find a cleaner |
@@ -186,7 +194,7 @@ int make_tempfile(const char *template, char **out_tempname, int do_unlink) | |||
186 | } else { | 194 | } else { |
187 | free(tempname); | 195 | free(tempname); |
188 | } | 196 | } |
189 | return(fd); | 197 | return fd; |
190 | out: | 198 | out: |
191 | free(tempname); | 199 | free(tempname); |
192 | return -1; | 200 | return -1; |
@@ -231,7 +239,7 @@ int create_tmp_file(unsigned long long len) | |||
231 | exit(1); | 239 | exit(1); |
232 | } | 240 | } |
233 | 241 | ||
234 | return(fd); | 242 | return fd; |
235 | } | 243 | } |
236 | 244 | ||
237 | int create_mem_file(unsigned long long len) | 245 | int create_mem_file(unsigned long long len) |
@@ -245,7 +253,7 @@ int create_mem_file(unsigned long long len) | |||
245 | errno = -err; | 253 | errno = -err; |
246 | perror("exec_close"); | 254 | perror("exec_close"); |
247 | } | 255 | } |
248 | return(fd); | 256 | return fd; |
249 | } | 257 | } |
250 | 258 | ||
251 | 259 | ||
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 7fe92680c7dd..5178eba9afa5 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c | |||
@@ -54,7 +54,7 @@ static int ptrace_child(void *arg) | |||
54 | perror("ptrace"); | 54 | perror("ptrace"); |
55 | os_kill_process(pid, 0); | 55 | os_kill_process(pid, 0); |
56 | } | 56 | } |
57 | os_stop_process(pid); | 57 | kill(pid, SIGSTOP); |
58 | 58 | ||
59 | /*This syscall will be intercepted by the parent. Don't call more than | 59 | /*This syscall will be intercepted by the parent. Don't call more than |
60 | * once, please.*/ | 60 | * once, please.*/ |
@@ -73,6 +73,34 @@ static int ptrace_child(void *arg) | |||
73 | _exit(ret); | 73 | _exit(ret); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void fatal_perror(char *str) | ||
77 | { | ||
78 | perror(str); | ||
79 | exit(1); | ||
80 | } | ||
81 | |||
82 | static void fatal(char *fmt, ...) | ||
83 | { | ||
84 | va_list list; | ||
85 | |||
86 | va_start(list, fmt); | ||
87 | vprintf(fmt, list); | ||
88 | va_end(list); | ||
89 | fflush(stdout); | ||
90 | |||
91 | exit(1); | ||
92 | } | ||
93 | |||
94 | static void non_fatal(char *fmt, ...) | ||
95 | { | ||
96 | va_list list; | ||
97 | |||
98 | va_start(list, fmt); | ||
99 | vprintf(fmt, list); | ||
100 | va_end(list); | ||
101 | fflush(stdout); | ||
102 | } | ||
103 | |||
76 | static int start_ptraced_child(void **stack_out) | 104 | static int start_ptraced_child(void **stack_out) |
77 | { | 105 | { |
78 | void *stack; | 106 | void *stack; |
@@ -82,20 +110,20 @@ static int start_ptraced_child(void **stack_out) | |||
82 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, | 110 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, |
83 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); | 111 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); |
84 | if(stack == MAP_FAILED) | 112 | if(stack == MAP_FAILED) |
85 | panic("check_ptrace : mmap failed, errno = %d", errno); | 113 | fatal_perror("check_ptrace : mmap failed"); |
86 | sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); | 114 | sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); |
87 | pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); | 115 | pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); |
88 | if(pid < 0) | 116 | if(pid < 0) |
89 | panic("start_ptraced_child : clone failed, errno = %d", errno); | 117 | fatal_perror("start_ptraced_child : clone failed"); |
90 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 118 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
91 | if(n < 0) | 119 | if(n < 0) |
92 | panic("check_ptrace : clone failed, errno = %d", errno); | 120 | fatal_perror("check_ptrace : clone failed"); |
93 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)) | 121 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)) |
94 | panic("check_ptrace : expected SIGSTOP, got status = %d", | 122 | fatal("check_ptrace : expected SIGSTOP, got status = %d", |
95 | status); | 123 | status); |
96 | 124 | ||
97 | *stack_out = stack; | 125 | *stack_out = stack; |
98 | return(pid); | 126 | return pid; |
99 | } | 127 | } |
100 | 128 | ||
101 | /* When testing for SYSEMU support, if it is one of the broken versions, we | 129 | /* When testing for SYSEMU support, if it is one of the broken versions, we |
@@ -105,34 +133,34 @@ static int start_ptraced_child(void **stack_out) | |||
105 | * must work anyway! | 133 | * must work anyway! |
106 | */ | 134 | */ |
107 | static int stop_ptraced_child(int pid, void *stack, int exitcode, | 135 | static int stop_ptraced_child(int pid, void *stack, int exitcode, |
108 | int mustpanic) | 136 | int mustexit) |
109 | { | 137 | { |
110 | int status, n, ret = 0; | 138 | int status, n, ret = 0; |
111 | 139 | ||
112 | if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) | 140 | if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) |
113 | panic("check_ptrace : ptrace failed, errno = %d", errno); | 141 | fatal_perror("stop_ptraced_child : ptrace failed"); |
114 | CATCH_EINTR(n = waitpid(pid, &status, 0)); | 142 | CATCH_EINTR(n = waitpid(pid, &status, 0)); |
115 | if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { | 143 | if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { |
116 | int exit_with = WEXITSTATUS(status); | 144 | int exit_with = WEXITSTATUS(status); |
117 | if (exit_with == 2) | 145 | if (exit_with == 2) |
118 | printf("check_ptrace : child exited with status 2. " | 146 | non_fatal("check_ptrace : child exited with status 2. " |
119 | "Serious trouble happening! Try updating your " | 147 | "Serious trouble happening! Try updating " |
120 | "host skas patch!\nDisabling SYSEMU support."); | 148 | "your host skas patch!\nDisabling SYSEMU " |
121 | printf("check_ptrace : child exited with exitcode %d, while " | 149 | "support."); |
122 | "expecting %d; status 0x%x", exit_with, | 150 | non_fatal("check_ptrace : child exited with exitcode %d, while " |
123 | exitcode, status); | 151 | "expecting %d; status 0x%x\n", exit_with, |
124 | if (mustpanic) | 152 | exitcode, status); |
125 | panic("\n"); | 153 | if (mustexit) |
126 | else | 154 | exit(1); |
127 | printf("\n"); | ||
128 | ret = -1; | 155 | ret = -1; |
129 | } | 156 | } |
130 | 157 | ||
131 | if(munmap(stack, PAGE_SIZE) < 0) | 158 | if(munmap(stack, PAGE_SIZE) < 0) |
132 | panic("check_ptrace : munmap failed, errno = %d", errno); | 159 | fatal_perror("check_ptrace : munmap failed"); |
133 | return ret; | 160 | return ret; |
134 | } | 161 | } |
135 | 162 | ||
163 | /* Changed only during early boot */ | ||
136 | int ptrace_faultinfo = 1; | 164 | int ptrace_faultinfo = 1; |
137 | int ptrace_ldt = 1; | 165 | int ptrace_ldt = 1; |
138 | int proc_mm = 1; | 166 | int proc_mm = 1; |
@@ -160,6 +188,7 @@ __uml_setup("mode=skas0", mode_skas0_cmd_param, | |||
160 | " specify mode=tt. Note that this was recently added - on \n" | 188 | " specify mode=tt. Note that this was recently added - on \n" |
161 | " older kernels you must use simply \"skas0\".\n\n"); | 189 | " older kernels you must use simply \"skas0\".\n\n"); |
162 | 190 | ||
191 | /* Changed only during early boot */ | ||
163 | static int force_sysemu_disabled = 0; | 192 | static int force_sysemu_disabled = 0; |
164 | 193 | ||
165 | static int __init nosysemu_cmd_param(char *str, int* add) | 194 | static int __init nosysemu_cmd_param(char *str, int* add) |
@@ -180,9 +209,9 @@ __uml_setup("nosysemu", nosysemu_cmd_param, | |||
180 | static void __init check_sysemu(void) | 209 | static void __init check_sysemu(void) |
181 | { | 210 | { |
182 | void *stack; | 211 | void *stack; |
183 | int pid, n, status, count=0; | 212 | int pid, n, status, count=0; |
184 | 213 | ||
185 | printf("Checking syscall emulation patch for ptrace..."); | 214 | non_fatal("Checking syscall emulation patch for ptrace..."); |
186 | sysemu_supported = 0; | 215 | sysemu_supported = 0; |
187 | pid = start_ptraced_child(&stack); | 216 | pid = start_ptraced_child(&stack); |
188 | 217 | ||
@@ -191,31 +220,30 @@ static void __init check_sysemu(void) | |||
191 | 220 | ||
192 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 221 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
193 | if (n < 0) | 222 | if (n < 0) |
194 | panic("check_sysemu : wait failed, errno = %d", errno); | 223 | fatal_perror("check_sysemu : wait failed"); |
195 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) | 224 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) |
196 | panic("check_sysemu : expected SIGTRAP, " | 225 | fatal("check_sysemu : expected SIGTRAP, got status = %d", |
197 | "got status = %d", status); | 226 | status); |
198 | 227 | ||
199 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, | 228 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, |
200 | os_getpid()); | 229 | os_getpid()); |
201 | if(n < 0) | 230 | if(n < 0) |
202 | panic("check_sysemu : failed to modify system " | 231 | fatal_perror("check_sysemu : failed to modify system call " |
203 | "call return, errno = %d", errno); | 232 | "return"); |
204 | 233 | ||
205 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) | 234 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) |
206 | goto fail_stopped; | 235 | goto fail_stopped; |
207 | 236 | ||
208 | sysemu_supported = 1; | 237 | sysemu_supported = 1; |
209 | printf("OK\n"); | 238 | non_fatal("OK\n"); |
210 | set_using_sysemu(!force_sysemu_disabled); | 239 | set_using_sysemu(!force_sysemu_disabled); |
211 | 240 | ||
212 | printf("Checking advanced syscall emulation patch for ptrace..."); | 241 | non_fatal("Checking advanced syscall emulation patch for ptrace..."); |
213 | pid = start_ptraced_child(&stack); | 242 | pid = start_ptraced_child(&stack); |
214 | 243 | ||
215 | if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, | 244 | if((ptrace(PTRACE_OLDSETOPTIONS, pid, 0, |
216 | (void *) PTRACE_O_TRACESYSGOOD) < 0) | 245 | (void *) PTRACE_O_TRACESYSGOOD) < 0)) |
217 | panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d", | 246 | fatal_perror("check_ptrace: PTRACE_OLDSETOPTIONS failed"); |
218 | errno); | ||
219 | 247 | ||
220 | while(1){ | 248 | while(1){ |
221 | count++; | 249 | count++; |
@@ -223,29 +251,30 @@ static void __init check_sysemu(void) | |||
223 | goto fail; | 251 | goto fail; |
224 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 252 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
225 | if(n < 0) | 253 | if(n < 0) |
226 | panic("check_ptrace : wait failed, errno = %d", errno); | 254 | fatal_perror("check_ptrace : wait failed"); |
255 | |||
227 | if(WIFSTOPPED(status) && (WSTOPSIG(status) == (SIGTRAP|0x80))){ | 256 | if(WIFSTOPPED(status) && (WSTOPSIG(status) == (SIGTRAP|0x80))){ |
228 | if (!count) | 257 | if (!count) |
229 | panic("check_ptrace : SYSEMU_SINGLESTEP " | 258 | fatal("check_ptrace : SYSEMU_SINGLESTEP " |
230 | "doesn't singlestep"); | 259 | "doesn't singlestep"); |
231 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, | 260 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, |
232 | os_getpid()); | 261 | os_getpid()); |
233 | if(n < 0) | 262 | if(n < 0) |
234 | panic("check_sysemu : failed to modify system " | 263 | fatal_perror("check_sysemu : failed to modify " |
235 | "call return, errno = %d", errno); | 264 | "system call return"); |
236 | break; | 265 | break; |
237 | } | 266 | } |
238 | else if(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) | 267 | else if(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) |
239 | count++; | 268 | count++; |
240 | else | 269 | else |
241 | panic("check_ptrace : expected SIGTRAP or " | 270 | fatal("check_ptrace : expected SIGTRAP or " |
242 | "(SIGTRAP|0x80), got status = %d", status); | 271 | "(SIGTRAP | 0x80), got status = %d", status); |
243 | } | 272 | } |
244 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) | 273 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) |
245 | goto fail_stopped; | 274 | goto fail_stopped; |
246 | 275 | ||
247 | sysemu_supported = 2; | 276 | sysemu_supported = 2; |
248 | printf("OK\n"); | 277 | non_fatal("OK\n"); |
249 | 278 | ||
250 | if ( !force_sysemu_disabled ) | 279 | if ( !force_sysemu_disabled ) |
251 | set_using_sysemu(sysemu_supported); | 280 | set_using_sysemu(sysemu_supported); |
@@ -254,7 +283,7 @@ static void __init check_sysemu(void) | |||
254 | fail: | 283 | fail: |
255 | stop_ptraced_child(pid, stack, 1, 0); | 284 | stop_ptraced_child(pid, stack, 1, 0); |
256 | fail_stopped: | 285 | fail_stopped: |
257 | printf("missing\n"); | 286 | non_fatal("missing\n"); |
258 | } | 287 | } |
259 | 288 | ||
260 | static void __init check_ptrace(void) | 289 | static void __init check_ptrace(void) |
@@ -262,22 +291,25 @@ static void __init check_ptrace(void) | |||
262 | void *stack; | 291 | void *stack; |
263 | int pid, syscall, n, status; | 292 | int pid, syscall, n, status; |
264 | 293 | ||
265 | printf("Checking that ptrace can change system call numbers..."); | 294 | non_fatal("Checking that ptrace can change system call numbers..."); |
266 | pid = start_ptraced_child(&stack); | 295 | pid = start_ptraced_child(&stack); |
267 | 296 | ||
268 | if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) | 297 | if((ptrace(PTRACE_OLDSETOPTIONS, pid, 0, |
269 | panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d", errno); | 298 | (void *) PTRACE_O_TRACESYSGOOD) < 0)) |
299 | fatal_perror("check_ptrace: PTRACE_OLDSETOPTIONS failed"); | ||
270 | 300 | ||
271 | while(1){ | 301 | while(1){ |
272 | if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) | 302 | if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) |
273 | panic("check_ptrace : ptrace failed, errno = %d", | 303 | fatal_perror("check_ptrace : ptrace failed"); |
274 | errno); | 304 | |
275 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 305 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
276 | if(n < 0) | 306 | if(n < 0) |
277 | panic("check_ptrace : wait failed, errno = %d", errno); | 307 | fatal_perror("check_ptrace : wait failed"); |
278 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP|0x80))) | 308 | |
279 | panic("check_ptrace : expected (SIGTRAP|0x80), " | 309 | if(!WIFSTOPPED(status) || |
280 | "got status = %d", status); | 310 | (WSTOPSIG(status) != (SIGTRAP | 0x80))) |
311 | fatal("check_ptrace : expected (SIGTRAP|0x80), " | ||
312 | "got status = %d", status); | ||
281 | 313 | ||
282 | syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET, | 314 | syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET, |
283 | 0); | 315 | 0); |
@@ -285,13 +317,13 @@ static void __init check_ptrace(void) | |||
285 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_NR_OFFSET, | 317 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_NR_OFFSET, |
286 | __NR_getppid); | 318 | __NR_getppid); |
287 | if(n < 0) | 319 | if(n < 0) |
288 | panic("check_ptrace : failed to modify system " | 320 | fatal_perror("check_ptrace : failed to modify " |
289 | "call, errno = %d", errno); | 321 | "system call"); |
290 | break; | 322 | break; |
291 | } | 323 | } |
292 | } | 324 | } |
293 | stop_ptraced_child(pid, stack, 0, 1); | 325 | stop_ptraced_child(pid, stack, 0, 1); |
294 | printf("OK\n"); | 326 | non_fatal("OK\n"); |
295 | check_sysemu(); | 327 | check_sysemu(); |
296 | } | 328 | } |
297 | 329 | ||
@@ -350,22 +382,22 @@ static inline void check_skas3_ptrace_faultinfo(void) | |||
350 | void *stack; | 382 | void *stack; |
351 | int pid, n; | 383 | int pid, n; |
352 | 384 | ||
353 | printf(" - PTRACE_FAULTINFO..."); | 385 | non_fatal(" - PTRACE_FAULTINFO..."); |
354 | pid = start_ptraced_child(&stack); | 386 | pid = start_ptraced_child(&stack); |
355 | 387 | ||
356 | n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); | 388 | n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); |
357 | if (n < 0) { | 389 | if (n < 0) { |
358 | ptrace_faultinfo = 0; | 390 | ptrace_faultinfo = 0; |
359 | if(errno == EIO) | 391 | if(errno == EIO) |
360 | printf("not found\n"); | 392 | non_fatal("not found\n"); |
361 | else | 393 | else |
362 | perror("not found"); | 394 | perror("not found"); |
363 | } | 395 | } |
364 | else { | 396 | else { |
365 | if (!ptrace_faultinfo) | 397 | if (!ptrace_faultinfo) |
366 | printf("found but disabled on command line\n"); | 398 | non_fatal("found but disabled on command line\n"); |
367 | else | 399 | else |
368 | printf("found\n"); | 400 | non_fatal("found\n"); |
369 | } | 401 | } |
370 | 402 | ||
371 | init_registers(pid); | 403 | init_registers(pid); |
@@ -383,13 +415,13 @@ static inline void check_skas3_ptrace_ldt(void) | |||
383 | .ptr = ldtbuf, | 415 | .ptr = ldtbuf, |
384 | .bytecount = sizeof(ldtbuf)}; | 416 | .bytecount = sizeof(ldtbuf)}; |
385 | 417 | ||
386 | printf(" - PTRACE_LDT..."); | 418 | non_fatal(" - PTRACE_LDT..."); |
387 | pid = start_ptraced_child(&stack); | 419 | pid = start_ptraced_child(&stack); |
388 | 420 | ||
389 | n = ptrace(PTRACE_LDT, pid, 0, (unsigned long) &ldt_op); | 421 | n = ptrace(PTRACE_LDT, pid, 0, (unsigned long) &ldt_op); |
390 | if (n < 0) { | 422 | if (n < 0) { |
391 | if(errno == EIO) | 423 | if(errno == EIO) |
392 | printf("not found\n"); | 424 | non_fatal("not found\n"); |
393 | else { | 425 | else { |
394 | perror("not found"); | 426 | perror("not found"); |
395 | } | 427 | } |
@@ -397,9 +429,9 @@ static inline void check_skas3_ptrace_ldt(void) | |||
397 | } | 429 | } |
398 | else { | 430 | else { |
399 | if(ptrace_ldt) | 431 | if(ptrace_ldt) |
400 | printf("found\n"); | 432 | non_fatal("found\n"); |
401 | else | 433 | else |
402 | printf("found, but use is disabled\n"); | 434 | non_fatal("found, but use is disabled\n"); |
403 | } | 435 | } |
404 | 436 | ||
405 | stop_ptraced_child(pid, stack, 1, 1); | 437 | stop_ptraced_child(pid, stack, 1, 1); |
@@ -414,22 +446,22 @@ static inline void check_skas3_ptrace_ldt(void) | |||
414 | 446 | ||
415 | static inline void check_skas3_proc_mm(void) | 447 | static inline void check_skas3_proc_mm(void) |
416 | { | 448 | { |
417 | printf(" - /proc/mm..."); | 449 | non_fatal(" - /proc/mm..."); |
418 | if (os_access("/proc/mm", OS_ACC_W_OK) < 0) { | 450 | if (access("/proc/mm", W_OK) < 0) { |
419 | proc_mm = 0; | 451 | proc_mm = 0; |
420 | printf("not found\n"); | 452 | perror("not found"); |
421 | } | 453 | } |
422 | else { | 454 | else { |
423 | if (!proc_mm) | 455 | if (!proc_mm) |
424 | printf("found but disabled on command line\n"); | 456 | non_fatal("found but disabled on command line\n"); |
425 | else | 457 | else |
426 | printf("found\n"); | 458 | non_fatal("found\n"); |
427 | } | 459 | } |
428 | } | 460 | } |
429 | 461 | ||
430 | int can_do_skas(void) | 462 | int can_do_skas(void) |
431 | { | 463 | { |
432 | printf("Checking for the skas3 patch in the host:\n"); | 464 | non_fatal("Checking for the skas3 patch in the host:\n"); |
433 | 465 | ||
434 | check_skas3_proc_mm(); | 466 | check_skas3_proc_mm(); |
435 | check_skas3_ptrace_faultinfo(); | 467 | check_skas3_ptrace_faultinfo(); |
@@ -443,16 +475,16 @@ int can_do_skas(void) | |||
443 | #else | 475 | #else |
444 | int can_do_skas(void) | 476 | int can_do_skas(void) |
445 | { | 477 | { |
446 | return(0); | 478 | return 0; |
447 | } | 479 | } |
448 | #endif | 480 | #endif |
449 | 481 | ||
450 | int __init parse_iomem(char *str, int *add) | 482 | int __init parse_iomem(char *str, int *add) |
451 | { | 483 | { |
452 | struct iomem_region *new; | 484 | struct iomem_region *new; |
453 | struct uml_stat buf; | 485 | struct stat64 buf; |
454 | char *file, *driver; | 486 | char *file, *driver; |
455 | int fd, err, size; | 487 | int fd, size; |
456 | 488 | ||
457 | driver = str; | 489 | driver = str; |
458 | file = strchr(str,','); | 490 | file = strchr(str,','); |
@@ -462,15 +494,14 @@ int __init parse_iomem(char *str, int *add) | |||
462 | } | 494 | } |
463 | *file = '\0'; | 495 | *file = '\0'; |
464 | file++; | 496 | file++; |
465 | fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0); | 497 | fd = open(file, O_RDWR, 0); |
466 | if(fd < 0){ | 498 | if(fd < 0){ |
467 | os_print_error(fd, "parse_iomem - Couldn't open io file"); | 499 | os_print_error(fd, "parse_iomem - Couldn't open io file"); |
468 | goto out; | 500 | goto out; |
469 | } | 501 | } |
470 | 502 | ||
471 | err = os_stat_fd(fd, &buf); | 503 | if(fstat64(fd, &buf) < 0){ |
472 | if(err < 0){ | 504 | perror("parse_iomem - cannot stat_fd file"); |
473 | os_print_error(err, "parse_iomem - cannot stat_fd file"); | ||
474 | goto out_close; | 505 | goto out_close; |
475 | } | 506 | } |
476 | 507 | ||
@@ -480,7 +511,7 @@ int __init parse_iomem(char *str, int *add) | |||
480 | goto out_close; | 511 | goto out_close; |
481 | } | 512 | } |
482 | 513 | ||
483 | size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1); | 514 | size = (buf.st_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1); |
484 | 515 | ||
485 | *new = ((struct iomem_region) { .next = iomem_regions, | 516 | *new = ((struct iomem_region) { .next = iomem_regions, |
486 | .driver = driver, | 517 | .driver = driver, |
@@ -491,11 +522,11 @@ int __init parse_iomem(char *str, int *add) | |||
491 | iomem_regions = new; | 522 | iomem_regions = new; |
492 | iomem_size += new->size + UM_KERN_PAGE_SIZE; | 523 | iomem_size += new->size + UM_KERN_PAGE_SIZE; |
493 | 524 | ||
494 | return(0); | 525 | return 0; |
495 | out_close: | 526 | out_close: |
496 | os_close_file(fd); | 527 | close(fd); |
497 | out: | 528 | out: |
498 | return(1); | 529 | return 1; |
499 | } | 530 | } |
500 | 531 | ||
501 | 532 | ||
@@ -526,6 +557,24 @@ static void openpty_cb(void *arg) | |||
526 | info->err = -errno; | 557 | info->err = -errno; |
527 | } | 558 | } |
528 | 559 | ||
560 | static int async_pty(int master, int slave) | ||
561 | { | ||
562 | int flags; | ||
563 | |||
564 | flags = fcntl(master, F_GETFL); | ||
565 | if(flags < 0) | ||
566 | return -errno; | ||
567 | |||
568 | if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || | ||
569 | (fcntl(master, F_SETOWN, os_getpid()) < 0)) | ||
570 | return -errno; | ||
571 | |||
572 | if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)) | ||
573 | return -errno; | ||
574 | |||
575 | return(0); | ||
576 | } | ||
577 | |||
529 | static void __init check_one_sigio(void (*proc)(int, int)) | 578 | static void __init check_one_sigio(void (*proc)(int, int)) |
530 | { | 579 | { |
531 | struct sigaction old, new; | 580 | struct sigaction old, new; |
@@ -551,7 +600,7 @@ static void __init check_one_sigio(void (*proc)(int, int)) | |||
551 | if (err < 0) | 600 | if (err < 0) |
552 | panic("check_sigio : __raw failed, errno = %d\n", -err); | 601 | panic("check_sigio : __raw failed, errno = %d\n", -err); |
553 | 602 | ||
554 | err = os_sigio_async(master, slave); | 603 | err = async_pty(master, slave); |
555 | if(err < 0) | 604 | if(err < 0) |
556 | panic("tty_fds : sigio_async failed, err = %d\n", -err); | 605 | panic("tty_fds : sigio_async failed, err = %d\n", -err); |
557 | 606 | ||
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index 7cd0369e02b3..79cd93c8c5ed 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c | |||
@@ -34,27 +34,27 @@ void init_thread_registers(union uml_pt_regs *to) | |||
34 | int save_fp_registers(int pid, unsigned long *fp_regs) | 34 | int save_fp_registers(int pid, unsigned long *fp_regs) |
35 | { | 35 | { |
36 | if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) | 36 | if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) |
37 | return(-errno); | 37 | return -errno; |
38 | return(0); | 38 | return 0; |
39 | } | 39 | } |
40 | 40 | ||
41 | int restore_fp_registers(int pid, unsigned long *fp_regs) | 41 | int restore_fp_registers(int pid, unsigned long *fp_regs) |
42 | { | 42 | { |
43 | if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) | 43 | if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) |
44 | return(-errno); | 44 | return -errno; |
45 | return(0); | 45 | return 0; |
46 | } | 46 | } |
47 | 47 | ||
48 | static int move_registers(int pid, int int_op, union uml_pt_regs *regs, | 48 | static int move_registers(int pid, int int_op, union uml_pt_regs *regs, |
49 | int fp_op, unsigned long *fp_regs) | 49 | int fp_op, unsigned long *fp_regs) |
50 | { | 50 | { |
51 | if(ptrace(int_op, pid, 0, regs->skas.regs) < 0) | 51 | if(ptrace(int_op, pid, 0, regs->skas.regs) < 0) |
52 | return(-errno); | 52 | return -errno; |
53 | 53 | ||
54 | if(ptrace(fp_op, pid, 0, fp_regs) < 0) | 54 | if(ptrace(fp_op, pid, 0, fp_regs) < 0) |
55 | return(-errno); | 55 | return -errno; |
56 | 56 | ||
57 | return(0); | 57 | return 0; |
58 | } | 58 | } |
59 | 59 | ||
60 | void save_registers(int pid, union uml_pt_regs *regs) | 60 | void save_registers(int pid, union uml_pt_regs *regs) |
diff --git a/arch/um/os-Linux/sys-x86_64/Makefile b/arch/um/os-Linux/sys-x86_64/Makefile index f67842a7735b..7955e061a678 100644 --- a/arch/um/os-Linux/sys-x86_64/Makefile +++ b/arch/um/os-Linux/sys-x86_64/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
5 | 5 | ||
6 | obj-$(CONFIG_MODE_SKAS) = registers.o signal.o | 6 | obj-$(CONFIG_MODE_SKAS) = registers.o prctl.o signal.o |
7 | 7 | ||
8 | USER_OBJS := $(obj-y) | 8 | USER_OBJS := $(obj-y) |
9 | 9 | ||
diff --git a/arch/um/os-Linux/sys-x86_64/prctl.c b/arch/um/os-Linux/sys-x86_64/prctl.c new file mode 100644 index 000000000000..9d34eddb517f --- /dev/null +++ b/arch/um/os-Linux/sys-x86_64/prctl.c | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Jeff Dike (jdike@{addtoit.com,linux.intel.com}) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <sys/ptrace.h> | ||
7 | #include <linux/ptrace.h> | ||
8 | |||
9 | int os_arch_prctl(int pid, int code, unsigned long *addr) | ||
10 | { | ||
11 | return ptrace(PTRACE_ARCH_PRCTL, pid, (unsigned long) addr, code); | ||
12 | } | ||
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c index cb8e8a263280..a2d7e0c603f7 100644 --- a/arch/um/os-Linux/sys-x86_64/registers.c +++ b/arch/um/os-Linux/sys-x86_64/registers.c | |||
@@ -27,12 +27,12 @@ static int move_registers(int pid, int int_op, int fp_op, | |||
27 | union uml_pt_regs *regs) | 27 | union uml_pt_regs *regs) |
28 | { | 28 | { |
29 | if(ptrace(int_op, pid, 0, regs->skas.regs) < 0) | 29 | if(ptrace(int_op, pid, 0, regs->skas.regs) < 0) |
30 | return(-errno); | 30 | return -errno; |
31 | 31 | ||
32 | if(ptrace(fp_op, pid, 0, regs->skas.fp) < 0) | 32 | if(ptrace(fp_op, pid, 0, regs->skas.fp) < 0) |
33 | return(-errno); | 33 | return -errno; |
34 | 34 | ||
35 | return(0); | 35 | return 0; |
36 | } | 36 | } |
37 | 37 | ||
38 | void save_registers(int pid, union uml_pt_regs *regs) | 38 | void save_registers(int pid, union uml_pt_regs *regs) |
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index 48092b95c8ab..b462863f7172 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #define UMID_LEN 64 | 18 | #define UMID_LEN 64 |
19 | 19 | ||
20 | /* Changed by set_umid, which is run early in boot */ | 20 | /* Changed by set_umid, which is run early in boot */ |
21 | char umid[UMID_LEN] = { 0 }; | 21 | static char umid[UMID_LEN] = { 0 }; |
22 | 22 | ||
23 | /* Changed by set_uml_dir and make_uml_dir, which are run early in boot */ | 23 | /* Changed by set_uml_dir and make_uml_dir, which are run early in boot */ |
24 | static char *uml_dir = UML_DIR; | 24 | static char *uml_dir = UML_DIR; |
@@ -235,6 +235,7 @@ int __init set_umid(char *name) | |||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | /* Changed in make_umid, which is called during early boot */ | ||
238 | static int umid_setup = 0; | 239 | static int umid_setup = 0; |
239 | 240 | ||
240 | int __init make_umid(void) | 241 | int __init make_umid(void) |
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c index 147bbf05cbc2..55b66e09a98c 100644 --- a/arch/um/sys-x86_64/ptrace.c +++ b/arch/um/sys-x86_64/ptrace.c | |||
@@ -71,8 +71,6 @@ int poke_user(struct task_struct *child, long addr, long data) | |||
71 | 71 | ||
72 | if (addr < MAX_REG_OFFSET) | 72 | if (addr < MAX_REG_OFFSET) |
73 | return putreg(child, addr, data); | 73 | return putreg(child, addr, data); |
74 | |||
75 | #if 0 /* Need x86_64 debugregs handling */ | ||
76 | else if((addr >= offsetof(struct user, u_debugreg[0])) && | 74 | else if((addr >= offsetof(struct user, u_debugreg[0])) && |
77 | (addr <= offsetof(struct user, u_debugreg[7]))){ | 75 | (addr <= offsetof(struct user, u_debugreg[7]))){ |
78 | addr -= offsetof(struct user, u_debugreg[0]); | 76 | addr -= offsetof(struct user, u_debugreg[0]); |
@@ -81,7 +79,6 @@ int poke_user(struct task_struct *child, long addr, long data) | |||
81 | child->thread.arch.debugregs[addr] = data; | 79 | child->thread.arch.debugregs[addr] = data; |
82 | return 0; | 80 | return 0; |
83 | } | 81 | } |
84 | #endif | ||
85 | return -EIO; | 82 | return -EIO; |
86 | } | 83 | } |
87 | 84 | ||
@@ -119,14 +116,12 @@ int peek_user(struct task_struct *child, long addr, long data) | |||
119 | if(addr < MAX_REG_OFFSET){ | 116 | if(addr < MAX_REG_OFFSET){ |
120 | tmp = getreg(child, addr); | 117 | tmp = getreg(child, addr); |
121 | } | 118 | } |
122 | #if 0 /* Need x86_64 debugregs handling */ | ||
123 | else if((addr >= offsetof(struct user, u_debugreg[0])) && | 119 | else if((addr >= offsetof(struct user, u_debugreg[0])) && |
124 | (addr <= offsetof(struct user, u_debugreg[7]))){ | 120 | (addr <= offsetof(struct user, u_debugreg[7]))){ |
125 | addr -= offsetof(struct user, u_debugreg[0]); | 121 | addr -= offsetof(struct user, u_debugreg[0]); |
126 | addr = addr >> 2; | 122 | addr = addr >> 2; |
127 | tmp = child->thread.arch.debugregs[addr]; | 123 | tmp = child->thread.arch.debugregs[addr]; |
128 | } | 124 | } |
129 | #endif | ||
130 | return put_user(tmp, (unsigned long *) data); | 125 | return put_user(tmp, (unsigned long *) data); |
131 | } | 126 | } |
132 | 127 | ||
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index 73ce4463f70c..01b91f9fa789 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "asm/prctl.h" /* XXX This should get the constants from libc */ | 16 | #include "asm/prctl.h" /* XXX This should get the constants from libc */ |
17 | #include "choose-mode.h" | 17 | #include "choose-mode.h" |
18 | #include "kern.h" | 18 | #include "kern.h" |
19 | #include "os.h" | ||
19 | 20 | ||
20 | asmlinkage long sys_uname64(struct new_utsname __user * name) | 21 | asmlinkage long sys_uname64(struct new_utsname __user * name) |
21 | { | 22 | { |
@@ -58,40 +59,69 @@ static long arch_prctl_tt(int code, unsigned long addr) | |||
58 | 59 | ||
59 | #ifdef CONFIG_MODE_SKAS | 60 | #ifdef CONFIG_MODE_SKAS |
60 | 61 | ||
61 | /* XXX: Must also call arch_prctl in the host, beside saving the segment bases! */ | 62 | long arch_prctl_skas(struct task_struct *task, int code, |
62 | static long arch_prctl_skas(int code, unsigned long addr) | 63 | unsigned long __user *addr) |
63 | { | 64 | { |
64 | long ret = 0; | 65 | unsigned long *ptr = addr, tmp; |
66 | long ret; | ||
67 | int pid = task->mm->context.skas.id.u.pid; | ||
65 | 68 | ||
69 | /* | ||
70 | * With ARCH_SET_FS (and ARCH_SET_GS is treated similarly to | ||
71 | * be safe), we need to call arch_prctl on the host because | ||
72 | * setting %fs may result in something else happening (like a | ||
73 | * GDT or thread.fs being set instead). So, we let the host | ||
74 | * fiddle the registers and thread struct and restore the | ||
75 | * registers afterwards. | ||
76 | * | ||
77 | * So, the saved registers are stored to the process (this | ||
78 | * needed because a stub may have been the last thing to run), | ||
79 | * arch_prctl is run on the host, then the registers are read | ||
80 | * back. | ||
81 | */ | ||
66 | switch(code){ | 82 | switch(code){ |
67 | case ARCH_SET_FS: | 83 | case ARCH_SET_FS: |
68 | current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr; | ||
69 | break; | ||
70 | case ARCH_SET_GS: | 84 | case ARCH_SET_GS: |
71 | current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr; | 85 | restore_registers(pid, ¤t->thread.regs.regs); |
86 | break; | ||
87 | case ARCH_GET_FS: | ||
88 | case ARCH_GET_GS: | ||
89 | /* | ||
90 | * With these two, we read to a local pointer and | ||
91 | * put_user it to the userspace pointer that we were | ||
92 | * given. If addr isn't valid (because it hasn't been | ||
93 | * faulted in or is just bogus), we want put_user to | ||
94 | * fault it in (or return -EFAULT) instead of having | ||
95 | * the host return -EFAULT. | ||
96 | */ | ||
97 | ptr = &tmp; | ||
98 | } | ||
99 | |||
100 | ret = os_arch_prctl(pid, code, ptr); | ||
101 | if(ret) | ||
102 | return ret; | ||
103 | |||
104 | switch(code){ | ||
105 | case ARCH_SET_FS: | ||
106 | case ARCH_SET_GS: | ||
107 | save_registers(pid, ¤t->thread.regs.regs); | ||
72 | break; | 108 | break; |
73 | case ARCH_GET_FS: | 109 | case ARCH_GET_FS: |
74 | ret = put_user(current->thread.regs.regs.skas. | 110 | ret = put_user(tmp, addr); |
75 | regs[FS_BASE / sizeof(unsigned long)], | ||
76 | (unsigned long __user *)addr); | ||
77 | break; | 111 | break; |
78 | case ARCH_GET_GS: | 112 | case ARCH_GET_GS: |
79 | ret = put_user(current->thread.regs.regs.skas. | 113 | ret = put_user(tmp, addr); |
80 | regs[GS_BASE / sizeof(unsigned long)], | ||
81 | (unsigned long __user *)addr); | ||
82 | break; | 114 | break; |
83 | default: | ||
84 | ret = -EINVAL; | ||
85 | break; | ||
86 | } | 115 | } |
87 | 116 | ||
88 | return(ret); | 117 | return ret; |
89 | } | 118 | } |
90 | #endif | 119 | #endif |
91 | 120 | ||
92 | long sys_arch_prctl(int code, unsigned long addr) | 121 | long sys_arch_prctl(int code, unsigned long addr) |
93 | { | 122 | { |
94 | return(CHOOSE_MODE_PROC(arch_prctl_tt, arch_prctl_skas, code, addr)); | 123 | return CHOOSE_MODE_PROC(arch_prctl_tt, arch_prctl_skas, current, code, |
124 | (unsigned long __user *) addr); | ||
95 | } | 125 | } |
96 | 126 | ||
97 | long sys_clone(unsigned long clone_flags, unsigned long newsp, | 127 | long sys_clone(unsigned long clone_flags, unsigned long newsp, |
@@ -105,5 +135,14 @@ long sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
105 | ret = do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, | 135 | ret = do_fork(clone_flags, newsp, ¤t->thread.regs, 0, parent_tid, |
106 | child_tid); | 136 | child_tid); |
107 | current->thread.forking = 0; | 137 | current->thread.forking = 0; |
108 | return(ret); | 138 | return ret; |
139 | } | ||
140 | |||
141 | void arch_switch_to_skas(struct task_struct *from, struct task_struct *to) | ||
142 | { | ||
143 | if(to->thread.arch.fs == 0) | ||
144 | return; | ||
145 | |||
146 | arch_prctl_skas(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs); | ||
109 | } | 147 | } |
148 | |||
diff --git a/arch/um/sys-x86_64/tls.c b/arch/um/sys-x86_64/tls.c index ce1bf1b81c43..febbc94be25f 100644 --- a/arch/um/sys-x86_64/tls.c +++ b/arch/um/sys-x86_64/tls.c | |||
@@ -1,14 +1,17 @@ | |||
1 | #include "linux/sched.h" | 1 | #include "linux/sched.h" |
2 | 2 | ||
3 | void debug_arch_force_load_TLS(void) | ||
4 | { | ||
5 | } | ||
6 | |||
7 | void clear_flushed_tls(struct task_struct *task) | 3 | void clear_flushed_tls(struct task_struct *task) |
8 | { | 4 | { |
9 | } | 5 | } |
10 | 6 | ||
11 | int arch_copy_tls(struct task_struct *t) | 7 | int arch_copy_tls(struct task_struct *t) |
12 | { | 8 | { |
9 | /* | ||
10 | * If CLONE_SETTLS is set, we need to save the thread id | ||
11 | * (which is argument 5, child_tid, of clone) so it can be set | ||
12 | * during context switches. | ||
13 | */ | ||
14 | t->thread.arch.fs = t->thread.regs.regs.skas.regs[R8 / sizeof(long)]; | ||
15 | |||
13 | return 0; | 16 | return 0; |
14 | } | 17 | } |
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig index f0d4d72e560f..dbfab8fc9b49 100644 --- a/arch/v850/Kconfig +++ b/arch/v850/Kconfig | |||
@@ -10,6 +10,9 @@ mainmenu "uClinux/v850 (w/o MMU) Kernel Configuration" | |||
10 | config MMU | 10 | config MMU |
11 | bool | 11 | bool |
12 | default n | 12 | default n |
13 | config ZONE_DMA | ||
14 | bool | ||
15 | default y | ||
13 | config RWSEM_GENERIC_SPINLOCK | 16 | config RWSEM_GENERIC_SPINLOCK |
14 | bool | 17 | bool |
15 | default y | 18 | default y |
diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c index 40892d3e3c24..0e429041a117 100644 --- a/arch/v850/kernel/anna.c +++ b/arch/v850/kernel/anna.c | |||
@@ -114,7 +114,7 @@ static struct v850e_intc_irq_init irq_inits[] = { | |||
114 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, | 114 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, |
115 | { 0 } | 115 | { 0 } |
116 | }; | 116 | }; |
117 | #define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) | 117 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) |
118 | 118 | ||
119 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | 119 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; |
120 | 120 | ||
diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c index 5352f8a5aa07..18437bc5c3ad 100644 --- a/arch/v850/kernel/as85ep1.c +++ b/arch/v850/kernel/as85ep1.c | |||
@@ -142,7 +142,7 @@ static struct v850e_intc_irq_init irq_inits[] = { | |||
142 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, | 142 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 }, |
143 | { 0 } | 143 | { 0 } |
144 | }; | 144 | }; |
145 | #define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) | 145 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) |
146 | 146 | ||
147 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | 147 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; |
148 | 148 | ||
diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c index cb04a6954ccb..5c4923558a75 100644 --- a/arch/v850/kernel/fpga85e2c.c +++ b/arch/v850/kernel/fpga85e2c.c | |||
@@ -138,7 +138,7 @@ struct v850e_intc_irq_init irq_inits[] = { | |||
138 | { "RPU", IRQ_RPU(0), IRQ_RPU_NUM, 1, 6 }, | 138 | { "RPU", IRQ_RPU(0), IRQ_RPU_NUM, 1, 6 }, |
139 | { 0 } | 139 | { 0 } |
140 | }; | 140 | }; |
141 | #define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) | 141 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) |
142 | 142 | ||
143 | struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | 143 | struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; |
144 | 144 | ||
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c index 25d636e79e6a..b2bcc251f65b 100644 --- a/arch/v850/kernel/gbus_int.c +++ b/arch/v850/kernel/gbus_int.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/signal.h> | 18 | #include <linux/signal.h> |
19 | #include <linux/kernel.h> | ||
19 | 20 | ||
20 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
21 | 22 | ||
@@ -36,7 +37,7 @@ struct used_gint { | |||
36 | { 1, GBUS_INT_PRIORITY_HIGH }, | 37 | { 1, GBUS_INT_PRIORITY_HIGH }, |
37 | { 3, GBUS_INT_PRIORITY_LOW } | 38 | { 3, GBUS_INT_PRIORITY_LOW } |
38 | }; | 39 | }; |
39 | #define NUM_USED_GINTS (sizeof used_gint / sizeof used_gint[0]) | 40 | #define NUM_USED_GINTS ARRAY_SIZE(used_gint) |
40 | 41 | ||
41 | /* A table of which GINT is used by each GBUS interrupts (they are | 42 | /* A table of which GINT is used by each GBUS interrupts (they are |
42 | assigned based on priority). */ | 43 | assigned based on priority). */ |
@@ -231,8 +232,7 @@ struct gbus_int_irq_init gbus_irq_inits[] __initdata = { | |||
231 | { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6}, | 232 | { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6}, |
232 | { 0 } | 233 | { 0 } |
233 | }; | 234 | }; |
234 | #define NUM_GBUS_IRQ_INITS \ | 235 | #define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1) |
235 | ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1) | ||
236 | 236 | ||
237 | static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; | 237 | static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; |
238 | 238 | ||
diff --git a/arch/v850/kernel/ma.c b/arch/v850/kernel/ma.c index 2aa8ab0f7edc..143774de75e1 100644 --- a/arch/v850/kernel/ma.c +++ b/arch/v850/kernel/ma.c | |||
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = { | |||
43 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 4, 5 }, | 43 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 4, 5 }, |
44 | { 0 } | 44 | { 0 } |
45 | }; | 45 | }; |
46 | #define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) | 46 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) |
47 | 47 | ||
48 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | 48 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; |
49 | 49 | ||
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c index 14b0c8858aa4..38be5c194f6b 100644 --- a/arch/v850/kernel/me2.c +++ b/arch/v850/kernel/me2.c | |||
@@ -44,7 +44,7 @@ static struct v850e_intc_irq_init irq_inits[] = { | |||
44 | { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 }, | 44 | { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 }, |
45 | { 0 } | 45 | { 0 } |
46 | }; | 46 | }; |
47 | #define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) | 47 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) |
48 | 48 | ||
49 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | 49 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; |
50 | 50 | ||
diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c index 0f7f6cd705a2..43018e1edebd 100644 --- a/arch/v850/kernel/rte_cb.c +++ b/arch/v850/kernel/rte_cb.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | ||
18 | 19 | ||
19 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
20 | #include <asm/v850e_uart.h> | 21 | #include <asm/v850e_uart.h> |
@@ -176,8 +177,7 @@ static struct gbus_int_irq_init gbus_irq_inits[] = { | |||
176 | #endif | 177 | #endif |
177 | { 0 } | 178 | { 0 } |
178 | }; | 179 | }; |
179 | #define NUM_GBUS_IRQ_INITS \ | 180 | #define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1) |
180 | ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1) | ||
181 | 181 | ||
182 | static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; | 182 | static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS]; |
183 | 183 | ||
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c index 35213fa9f7d8..35a4bd5515cb 100644 --- a/arch/v850/kernel/rte_mb_a_pci.c +++ b/arch/v850/kernel/rte_mb_a_pci.c | |||
@@ -70,8 +70,7 @@ static struct mb_pci_dev_irq mb_pci_dev_irqs[] = { | |||
70 | /* PCI slot 2 */ | 70 | /* PCI slot 2 */ |
71 | { 9, IRQ_MB_A_PCI2(0), 1 } | 71 | { 9, IRQ_MB_A_PCI2(0), 1 } |
72 | }; | 72 | }; |
73 | #define NUM_MB_PCI_DEV_IRQS \ | 73 | #define NUM_MB_PCI_DEV_IRQS ARRAY_SIZE(mb_pci_dev_irqs) |
74 | (sizeof mb_pci_dev_irqs / sizeof mb_pci_dev_irqs[0]) | ||
75 | 74 | ||
76 | 75 | ||
77 | /* PCI configuration primitives. */ | 76 | /* PCI configuration primitives. */ |
diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c index 3be355a029e2..46803d48dffe 100644 --- a/arch/v850/kernel/rte_me2_cb.c +++ b/arch/v850/kernel/rte_me2_cb.c | |||
@@ -170,8 +170,7 @@ static struct cb_pic_irq_init cb_pic_irq_inits[] = { | |||
170 | { "CB_EXTTM2", IRQ_CB_EXTTM2, 1, 1, 6 }, | 170 | { "CB_EXTTM2", IRQ_CB_EXTTM2, 1, 1, 6 }, |
171 | { 0 } | 171 | { 0 } |
172 | }; | 172 | }; |
173 | #define NUM_CB_PIC_IRQ_INITS \ | 173 | #define NUM_CB_PIC_IRQ_INITS (ARRAY_SIZE(cb_pic_irq_inits) - 1) |
174 | ((sizeof cb_pic_irq_inits / sizeof cb_pic_irq_inits[0]) - 1) | ||
175 | 174 | ||
176 | static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS]; | 175 | static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS]; |
177 | static unsigned char cb_pic_active_irqs = 0; | 176 | static unsigned char cb_pic_active_irqs = 0; |
diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c index 290d50665016..699248f92aae 100644 --- a/arch/v850/kernel/teg.c +++ b/arch/v850/kernel/teg.c | |||
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = { | |||
43 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 }, | 43 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 }, |
44 | { 0 } | 44 | { 0 } |
45 | }; | 45 | }; |
46 | #define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) | 46 | #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1) |
47 | 47 | ||
48 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | 48 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; |
49 | 49 | ||
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c index cd06f47c0ea7..486e3a441c86 100644 --- a/arch/v850/kernel/time.c +++ b/arch/v850/kernel/time.c | |||
@@ -28,14 +28,6 @@ | |||
28 | #define TICK_SIZE (tick_nsec / 1000) | 28 | #define TICK_SIZE (tick_nsec / 1000) |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * Scheduler clock - returns current time in nanosec units. | ||
32 | */ | ||
33 | unsigned long long sched_clock(void) | ||
34 | { | ||
35 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
36 | } | ||
37 | |||
38 | /* | ||
39 | * timer_interrupt() needs to keep up the real-time clock, | 31 | * timer_interrupt() needs to keep up the real-time clock, |
40 | * as well as call the "do_timer()" routine every clocktick | 32 | * as well as call the "do_timer()" routine every clocktick |
41 | */ | 33 | */ |
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S index 3a5fd07fe064..356308221251 100644 --- a/arch/v850/kernel/vmlinux.lds.S +++ b/arch/v850/kernel/vmlinux.lds.S | |||
@@ -190,12 +190,16 @@ | |||
190 | __root_fs_image_start = . ; \ | 190 | __root_fs_image_start = . ; \ |
191 | *(.root) \ | 191 | *(.root) \ |
192 | __root_fs_image_end = . ; | 192 | __root_fs_image_end = . ; |
193 | |||
194 | #ifdef CONFIG_BLK_DEV_INITRD | ||
193 | /* The initramfs archive. */ | 195 | /* The initramfs archive. */ |
194 | #define INITRAMFS_CONTENTS \ | 196 | #define INITRAMFS_CONTENTS \ |
195 | . = ALIGN (4) ; \ | 197 | . = ALIGN (4) ; \ |
196 | ___initramfs_start = . ; \ | 198 | ___initramfs_start = . ; \ |
197 | *(.init.ramfs) \ | 199 | *(.init.ramfs) \ |
198 | ___initramfs_end = . ; | 200 | ___initramfs_end = . ; |
201 | #endif | ||
202 | |||
199 | /* Where the initial bootmap (bitmap for the boot-time memory allocator) | 203 | /* Where the initial bootmap (bitmap for the boot-time memory allocator) |
200 | should be place. */ | 204 | should be place. */ |
201 | #define BOOTMAP_CONTENTS \ | 205 | #define BOOTMAP_CONTENTS \ |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index d4275537b25b..02dd39457bcf 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -44,6 +44,10 @@ config MMU | |||
44 | bool | 44 | bool |
45 | default y | 45 | default y |
46 | 46 | ||
47 | config ZONE_DMA | ||
48 | bool | ||
49 | default y | ||
50 | |||
47 | config ISA | 51 | config ISA |
48 | bool | 52 | bool |
49 | 53 | ||
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 5ce0bd486bbf..6efe04f3cbca 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -300,12 +300,10 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, | |||
300 | bprm->loader += stack_base; | 300 | bprm->loader += stack_base; |
301 | bprm->exec += stack_base; | 301 | bprm->exec += stack_base; |
302 | 302 | ||
303 | mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 303 | mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
304 | if (!mpnt) | 304 | if (!mpnt) |
305 | return -ENOMEM; | 305 | return -ENOMEM; |
306 | 306 | ||
307 | memset(mpnt, 0, sizeof(*mpnt)); | ||
308 | |||
309 | down_write(&mm->mmap_sem); | 307 | down_write(&mm->mmap_sem); |
310 | { | 308 | { |
311 | mpnt->vm_mm = mm; | 309 | mpnt->vm_mm = mm; |
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index b4aa875e175b..5f32cf4de5fb 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -515,7 +515,7 @@ ia32_sys_call_table: | |||
515 | .quad sys32_vm86_warning /* vm86old */ | 515 | .quad sys32_vm86_warning /* vm86old */ |
516 | .quad compat_sys_wait4 | 516 | .quad compat_sys_wait4 |
517 | .quad sys_swapoff /* 115 */ | 517 | .quad sys_swapoff /* 115 */ |
518 | .quad sys32_sysinfo | 518 | .quad compat_sys_sysinfo |
519 | .quad sys32_ipc | 519 | .quad sys32_ipc |
520 | .quad sys_fsync | 520 | .quad sys_fsync |
521 | .quad stub32_sigreturn | 521 | .quad stub32_sigreturn |
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index c9bac3af29d6..200fdde18d96 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c | |||
@@ -523,72 +523,6 @@ sys32_sysfs(int option, u32 arg1, u32 arg2) | |||
523 | return sys_sysfs(option, arg1, arg2); | 523 | return sys_sysfs(option, arg1, arg2); |
524 | } | 524 | } |
525 | 525 | ||
526 | struct sysinfo32 { | ||
527 | s32 uptime; | ||
528 | u32 loads[3]; | ||
529 | u32 totalram; | ||
530 | u32 freeram; | ||
531 | u32 sharedram; | ||
532 | u32 bufferram; | ||
533 | u32 totalswap; | ||
534 | u32 freeswap; | ||
535 | unsigned short procs; | ||
536 | unsigned short pad; | ||
537 | u32 totalhigh; | ||
538 | u32 freehigh; | ||
539 | u32 mem_unit; | ||
540 | char _f[20-2*sizeof(u32)-sizeof(int)]; | ||
541 | }; | ||
542 | |||
543 | asmlinkage long | ||
544 | sys32_sysinfo(struct sysinfo32 __user *info) | ||
545 | { | ||
546 | struct sysinfo s; | ||
547 | int ret; | ||
548 | mm_segment_t old_fs = get_fs (); | ||
549 | int bitcount = 0; | ||
550 | |||
551 | set_fs (KERNEL_DS); | ||
552 | ret = sys_sysinfo((struct sysinfo __user *)&s); | ||
553 | set_fs (old_fs); | ||
554 | |||
555 | /* Check to see if any memory value is too large for 32-bit and scale | ||
556 | * down if needed | ||
557 | */ | ||
558 | if ((s.totalram >> 32) || (s.totalswap >> 32)) { | ||
559 | while (s.mem_unit < PAGE_SIZE) { | ||
560 | s.mem_unit <<= 1; | ||
561 | bitcount++; | ||
562 | } | ||
563 | s.totalram >>= bitcount; | ||
564 | s.freeram >>= bitcount; | ||
565 | s.sharedram >>= bitcount; | ||
566 | s.bufferram >>= bitcount; | ||
567 | s.totalswap >>= bitcount; | ||
568 | s.freeswap >>= bitcount; | ||
569 | s.totalhigh >>= bitcount; | ||
570 | s.freehigh >>= bitcount; | ||
571 | } | ||
572 | |||
573 | if (!access_ok(VERIFY_WRITE, info, sizeof(struct sysinfo32)) || | ||
574 | __put_user (s.uptime, &info->uptime) || | ||
575 | __put_user (s.loads[0], &info->loads[0]) || | ||
576 | __put_user (s.loads[1], &info->loads[1]) || | ||
577 | __put_user (s.loads[2], &info->loads[2]) || | ||
578 | __put_user (s.totalram, &info->totalram) || | ||
579 | __put_user (s.freeram, &info->freeram) || | ||
580 | __put_user (s.sharedram, &info->sharedram) || | ||
581 | __put_user (s.bufferram, &info->bufferram) || | ||
582 | __put_user (s.totalswap, &info->totalswap) || | ||
583 | __put_user (s.freeswap, &info->freeswap) || | ||
584 | __put_user (s.procs, &info->procs) || | ||
585 | __put_user (s.totalhigh, &info->totalhigh) || | ||
586 | __put_user (s.freehigh, &info->freehigh) || | ||
587 | __put_user (s.mem_unit, &info->mem_unit)) | ||
588 | return -EFAULT; | ||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | asmlinkage long | 526 | asmlinkage long |
593 | sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval) | 527 | sys32_sched_rr_get_interval(compat_pid_t pid, struct compat_timespec __user *interval) |
594 | { | 528 | { |
diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c index fa09debad4b7..93c707257637 100644 --- a/arch/x86_64/kernel/mce_amd.c +++ b/arch/x86_64/kernel/mce_amd.c | |||
@@ -401,7 +401,6 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu, | |||
401 | b = kzalloc(sizeof(struct threshold_block), GFP_KERNEL); | 401 | b = kzalloc(sizeof(struct threshold_block), GFP_KERNEL); |
402 | if (!b) | 402 | if (!b) |
403 | return -ENOMEM; | 403 | return -ENOMEM; |
404 | memset(b, 0, sizeof(struct threshold_block)); | ||
405 | 404 | ||
406 | b->block = block; | 405 | b->block = block; |
407 | b->bank = bank; | 406 | b->bank = bank; |
@@ -490,7 +489,6 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
490 | err = -ENOMEM; | 489 | err = -ENOMEM; |
491 | goto out; | 490 | goto out; |
492 | } | 491 | } |
493 | memset(b, 0, sizeof(struct threshold_bank)); | ||
494 | 492 | ||
495 | kobject_set_name(&b->kobj, "threshold_bank%i", bank); | 493 | kobject_set_name(&b->kobj, "threshold_bank%i", bank); |
496 | b->kobj.parent = &per_cpu(device_mce, cpu).kobj; | 494 | b->kobj.parent = &per_cpu(device_mce, cpu).kobj; |
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 1e54ddf2338d..c360c4225244 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -192,10 +192,14 @@ SECTIONS | |||
192 | from .altinstructions and .eh_frame */ | 192 | from .altinstructions and .eh_frame */ |
193 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } | 193 | .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } |
194 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } | 194 | .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } |
195 | |||
196 | #ifdef CONFIG_BLK_DEV_INITRD | ||
195 | . = ALIGN(4096); | 197 | . = ALIGN(4096); |
196 | __initramfs_start = .; | 198 | __initramfs_start = .; |
197 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } | 199 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } |
198 | __initramfs_end = .; | 200 | __initramfs_end = .; |
201 | #endif | ||
202 | |||
199 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | 203 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); |
200 | __per_cpu_start = .; | 204 | __per_cpu_start = .; |
201 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } | 205 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } |
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index a65fc6f1dcaf..49e8cf2e06f8 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c | |||
@@ -69,27 +69,6 @@ static inline int notify_page_fault(enum die_val val, const char *str, | |||
69 | return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); | 69 | return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); |
70 | } | 70 | } |
71 | 71 | ||
72 | void bust_spinlocks(int yes) | ||
73 | { | ||
74 | int loglevel_save = console_loglevel; | ||
75 | if (yes) { | ||
76 | oops_in_progress = 1; | ||
77 | } else { | ||
78 | #ifdef CONFIG_VT | ||
79 | unblank_screen(); | ||
80 | #endif | ||
81 | oops_in_progress = 0; | ||
82 | /* | ||
83 | * OK, the message is on the console. Now we call printk() | ||
84 | * without oops_in_progress set so that printk will give klogd | ||
85 | * a poke. Hold onto your hats... | ||
86 | */ | ||
87 | console_loglevel = 15; /* NMI oopser may have shut the console up */ | ||
88 | printk(" "); | ||
89 | console_loglevel = loglevel_save; | ||
90 | } | ||
91 | } | ||
92 | |||
93 | /* Sometimes the CPU reports invalid exceptions on prefetch. | 72 | /* Sometimes the CPU reports invalid exceptions on prefetch. |
94 | Check that here and ignore. | 73 | Check that here and ignore. |
95 | Opcode checker based on code by Richard Brunner */ | 74 | Opcode checker based on code by Richard Brunner */ |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 2e74cb0b7807..7fbb44bea37f 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -7,6 +7,10 @@ config FRAME_POINTER | |||
7 | bool | 7 | bool |
8 | default n | 8 | default n |
9 | 9 | ||
10 | config ZONE_DMA | ||
11 | bool | ||
12 | default y | ||
13 | |||
10 | config XTENSA | 14 | config XTENSA |
11 | bool | 15 | bool |
12 | default y | 16 | default y |
@@ -42,6 +46,9 @@ config ARCH_HAS_ILOG2_U64 | |||
42 | bool | 46 | bool |
43 | default n | 47 | default n |
44 | 48 | ||
49 | config NO_IOPORT | ||
50 | def_bool y | ||
51 | |||
45 | source "init/Kconfig" | 52 | source "init/Kconfig" |
46 | 53 | ||
47 | menu "Processor type and features" | 54 | menu "Processor type and features" |
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index a350431363a0..22949be4a5d8 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c | |||
@@ -38,15 +38,6 @@ unsigned long ccount_nsec; /* nsec per ccount increment */ | |||
38 | unsigned int last_ccount_stamp; | 38 | unsigned int last_ccount_stamp; |
39 | static long last_rtc_update = 0; | 39 | static long last_rtc_update = 0; |
40 | 40 | ||
41 | /* | ||
42 | * Scheduler clock - returns current tim in nanosec units. | ||
43 | */ | ||
44 | |||
45 | unsigned long long sched_clock(void) | ||
46 | { | ||
47 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
48 | } | ||
49 | |||
50 | static irqreturn_t timer_interrupt(int irq, void *dev_id); | 41 | static irqreturn_t timer_interrupt(int irq, void *dev_id); |
51 | static struct irqaction timer_irqaction = { | 42 | static struct irqaction timer_irqaction = { |
52 | .handler = timer_interrupt, | 43 | .handler = timer_interrupt, |
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index a36c104c3a52..ab6370054cee 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S | |||
@@ -203,10 +203,12 @@ SECTIONS | |||
203 | .data.percpu : { *(.data.percpu) } | 203 | .data.percpu : { *(.data.percpu) } |
204 | __per_cpu_end = .; | 204 | __per_cpu_end = .; |
205 | 205 | ||
206 | #ifdef CONFIG_BLK_DEV_INITRD | ||
206 | . = ALIGN(4096); | 207 | . = ALIGN(4096); |
207 | __initramfs_start =.; | 208 | __initramfs_start =.; |
208 | .init.ramfs : { *(.init.ramfs) } | 209 | .init.ramfs : { *(.init.ramfs) } |
209 | __initramfs_end = .; | 210 | __initramfs_end = .; |
211 | #endif | ||
210 | 212 | ||
211 | /* We need this dummy segment here */ | 213 | /* We need this dummy segment here */ |
212 | 214 | ||
diff --git a/block/blktrace.c b/block/blktrace.c index d3679dd1d220..d36b32ed22f4 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -363,10 +363,9 @@ static int blk_trace_setup(request_queue_t *q, struct block_device *bdev, | |||
363 | if (!bt->dropped_file) | 363 | if (!bt->dropped_file) |
364 | goto err; | 364 | goto err; |
365 | 365 | ||
366 | bt->rchan = relay_open("trace", dir, buts.buf_size, buts.buf_nr, &blk_relay_callbacks); | 366 | bt->rchan = relay_open("trace", dir, buts.buf_size, buts.buf_nr, &blk_relay_callbacks, bt); |
367 | if (!bt->rchan) | 367 | if (!bt->rchan) |
368 | goto err; | 368 | goto err; |
369 | bt->rchan->private_data = bt; | ||
370 | 369 | ||
371 | bt->act_mask = buts.act_mask; | 370 | bt->act_mask = buts.act_mask; |
372 | if (!bt->act_mask) | 371 | if (!bt->act_mask) |
diff --git a/drivers/Kconfig b/drivers/Kconfig index e7da9fa724ec..050323fd79e9 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig | |||
@@ -80,6 +80,8 @@ source "drivers/rtc/Kconfig" | |||
80 | 80 | ||
81 | source "drivers/dma/Kconfig" | 81 | source "drivers/dma/Kconfig" |
82 | 82 | ||
83 | source "drivers/auxdisplay/Kconfig" | ||
84 | |||
83 | source "drivers/kvm/Kconfig" | 85 | source "drivers/kvm/Kconfig" |
84 | 86 | ||
85 | endmenu | 87 | endmenu |
diff --git a/drivers/Makefile b/drivers/Makefile index f28dcb4ec8b3..3a718f51350e 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
@@ -38,6 +38,7 @@ obj-$(CONFIG_ATA) += ata/ | |||
38 | obj-$(CONFIG_FUSION) += message/ | 38 | obj-$(CONFIG_FUSION) += message/ |
39 | obj-$(CONFIG_IEEE1394) += ieee1394/ | 39 | obj-$(CONFIG_IEEE1394) += ieee1394/ |
40 | obj-y += cdrom/ | 40 | obj-y += cdrom/ |
41 | obj-y += auxdisplay/ | ||
41 | obj-$(CONFIG_MTD) += mtd/ | 42 | obj-$(CONFIG_MTD) += mtd/ |
42 | obj-$(CONFIG_SPI) += spi/ | 43 | obj-$(CONFIG_SPI) += spi/ |
43 | obj-$(CONFIG_PCCARD) += pcmcia/ | 44 | obj-$(CONFIG_PCCARD) += pcmcia/ |
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 5aab7bd473ac..8fccf018f165 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
@@ -912,7 +912,6 @@ static int start_rx(struct atm_dev *dev) | |||
912 | free_page((unsigned long) eni_dev->free_list); | 912 | free_page((unsigned long) eni_dev->free_list); |
913 | return -ENOMEM; | 913 | return -ENOMEM; |
914 | } | 914 | } |
915 | memset(eni_dev->rx_map,0,PAGE_SIZE); | ||
916 | eni_dev->rx_mult = DEFAULT_RX_MULT; | 915 | eni_dev->rx_mult = DEFAULT_RX_MULT; |
917 | eni_dev->fast = eni_dev->last_fast = NULL; | 916 | eni_dev->fast = eni_dev->last_fast = NULL; |
918 | eni_dev->slow = eni_dev->last_slow = NULL; | 917 | eni_dev->slow = eni_dev->last_slow = NULL; |
diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig new file mode 100644 index 000000000000..0300e7f54cc4 --- /dev/null +++ b/drivers/auxdisplay/Kconfig | |||
@@ -0,0 +1,109 @@ | |||
1 | # | ||
2 | # For a description of the syntax of this configuration file, | ||
3 | # see Documentation/kbuild/kconfig-language.txt. | ||
4 | # | ||
5 | # Auxiliary display drivers configuration. | ||
6 | # | ||
7 | |||
8 | menu "Auxiliary Display support" | ||
9 | |||
10 | config KS0108 | ||
11 | tristate "KS0108 LCD Controller" | ||
12 | depends on PARPORT_PC | ||
13 | default n | ||
14 | ---help--- | ||
15 | If you have a LCD controlled by one or more KS0108 | ||
16 | controllers, say Y. You will need also another more specific | ||
17 | driver for your LCD. | ||
18 | |||
19 | Depends on Parallel Port support. If you say Y at | ||
20 | parport, you will be able to compile this as a module (M) | ||
21 | and built-in as well (Y). | ||
22 | |||
23 | To compile this as a module, choose M here: | ||
24 | the module will be called ks0108. | ||
25 | |||
26 | If unsure, say N. | ||
27 | |||
28 | config KS0108_PORT | ||
29 | hex "Parallel port where the LCD is connected" | ||
30 | depends on KS0108 | ||
31 | default 0x378 | ||
32 | ---help--- | ||
33 | The address of the parallel port where the LCD is connected. | ||
34 | |||
35 | The first standard parallel port address is 0x378. | ||
36 | The second standard parallel port address is 0x278. | ||
37 | The third standard parallel port address is 0x3BC. | ||
38 | |||
39 | You can specify a different address if you need. | ||
40 | |||
41 | If you don't know what I'm talking about, load the parport module, | ||
42 | and execute "dmesg" or "cat /proc/ioports". You can see there how | ||
43 | many parallel ports are present and which address each one has. | ||
44 | |||
45 | Usually you only need to use 0x378. | ||
46 | |||
47 | If you compile this as a module, you can still override this | ||
48 | using the module parameters. | ||
49 | |||
50 | config KS0108_DELAY | ||
51 | int "Delay between each control writing (microseconds)" | ||
52 | depends on KS0108 | ||
53 | default "2" | ||
54 | ---help--- | ||
55 | Amount of time the ks0108 should wait between each control write | ||
56 | to the parallel port. | ||
57 | |||
58 | If your driver seems to miss random writings, increment this. | ||
59 | |||
60 | If you don't know what I'm talking about, ignore it. | ||
61 | |||
62 | If you compile this as a module, you can still override this | ||
63 | value using the module parameters. | ||
64 | |||
65 | config CFAG12864B | ||
66 | tristate "CFAG12864B LCD" | ||
67 | depends on X86 | ||
68 | depends on FB | ||
69 | depends on KS0108 | ||
70 | default n | ||
71 | ---help--- | ||
72 | If you have a Crystalfontz 128x64 2-color LCD, cfag12864b Series, | ||
73 | say Y. You also need the ks0108 LCD Controller driver. | ||
74 | |||
75 | For help about how to wire your LCD to the parallel port, | ||
76 | check Documentation/auxdisplay/cfag12864b | ||
77 | |||
78 | Depends on the x86 arch and the framebuffer support. | ||
79 | |||
80 | The LCD framebuffer driver can be attached to a console. | ||
81 | It will work fine. However, you can't attach it to the fbdev driver | ||
82 | of the xorg server. | ||
83 | |||
84 | To compile this as a module, choose M here: | ||
85 | the modules will be called cfag12864b and cfag12864bfb. | ||
86 | |||
87 | If unsure, say N. | ||
88 | |||
89 | config CFAG12864B_RATE | ||
90 | int "Refresh rate (hertz)" | ||
91 | depends on CFAG12864B | ||
92 | default "20" | ||
93 | ---help--- | ||
94 | Refresh rate of the LCD. | ||
95 | |||
96 | As the LCD is not memory mapped, the driver has to make the work by | ||
97 | software. This means you should be careful setting this value higher. | ||
98 | If your CPUs are really slow or you feel the system is slowed down, | ||
99 | decrease the value. | ||
100 | |||
101 | Be careful modifying this value to a very high value: | ||
102 | You can freeze the computer, or the LCD maybe can't draw as fast as you | ||
103 | are requesting. | ||
104 | |||
105 | If you don't know what I'm talking about, ignore it. | ||
106 | |||
107 | If you compile this as a module, you can still override this | ||
108 | value using the module parameters. | ||
109 | endmenu | ||
diff --git a/drivers/auxdisplay/Makefile b/drivers/auxdisplay/Makefile new file mode 100644 index 000000000000..8a8936a468b9 --- /dev/null +++ b/drivers/auxdisplay/Makefile | |||
@@ -0,0 +1,6 @@ | |||
1 | # | ||
2 | # Makefile for the kernel auxiliary displays device drivers. | ||
3 | # | ||
4 | |||
5 | obj-$(CONFIG_KS0108) += ks0108.o | ||
6 | obj-$(CONFIG_CFAG12864B) += cfag12864b.o cfag12864bfb.o | ||
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c new file mode 100644 index 000000000000..889583dfc1a6 --- /dev/null +++ b/drivers/auxdisplay/cfag12864b.c | |||
@@ -0,0 +1,383 @@ | |||
1 | /* | ||
2 | * Filename: cfag12864b.c | ||
3 | * Version: 0.1.0 | ||
4 | * Description: cfag12864b LCD driver | ||
5 | * License: GPLv2 | ||
6 | * Depends: ks0108 | ||
7 | * | ||
8 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
9 | * Date: 2006-10-31 | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | #include <linux/init.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/kernel.h> | ||
29 | #include <linux/fs.h> | ||
30 | #include <linux/cdev.h> | ||
31 | #include <linux/delay.h> | ||
32 | #include <linux/device.h> | ||
33 | #include <linux/jiffies.h> | ||
34 | #include <linux/mutex.h> | ||
35 | #include <linux/uaccess.h> | ||
36 | #include <linux/vmalloc.h> | ||
37 | #include <linux/workqueue.h> | ||
38 | #include <linux/ks0108.h> | ||
39 | #include <linux/cfag12864b.h> | ||
40 | |||
41 | |||
42 | #define CFAG12864B_NAME "cfag12864b" | ||
43 | |||
44 | /* | ||
45 | * Module Parameters | ||
46 | */ | ||
47 | |||
48 | static unsigned int cfag12864b_rate = CONFIG_CFAG12864B_RATE; | ||
49 | module_param(cfag12864b_rate, uint, S_IRUGO); | ||
50 | MODULE_PARM_DESC(cfag12864b_rate, | ||
51 | "Refresh rate (hertzs)"); | ||
52 | |||
53 | unsigned int cfag12864b_getrate(void) | ||
54 | { | ||
55 | return cfag12864b_rate; | ||
56 | } | ||
57 | |||
58 | /* | ||
59 | * cfag12864b Commands | ||
60 | * | ||
61 | * E = Enable signal | ||
62 | * Everytime E switch from low to high, | ||
63 | * cfag12864b/ks0108 reads the command/data. | ||
64 | * | ||
65 | * CS1 = First ks0108controller. | ||
66 | * If high, the first ks0108 controller receives commands/data. | ||
67 | * | ||
68 | * CS2 = Second ks0108 controller | ||
69 | * If high, the second ks0108 controller receives commands/data. | ||
70 | * | ||
71 | * DI = Data/Instruction | ||
72 | * If low, cfag12864b will expect commands. | ||
73 | * If high, cfag12864b will expect data. | ||
74 | * | ||
75 | */ | ||
76 | |||
77 | #define bit(n) (((unsigned char)1)<<(n)) | ||
78 | |||
79 | #define CFAG12864B_BIT_E (0) | ||
80 | #define CFAG12864B_BIT_CS1 (2) | ||
81 | #define CFAG12864B_BIT_CS2 (1) | ||
82 | #define CFAG12864B_BIT_DI (3) | ||
83 | |||
84 | static unsigned char cfag12864b_state; | ||
85 | |||
86 | static void cfag12864b_set(void) | ||
87 | { | ||
88 | ks0108_writecontrol(cfag12864b_state); | ||
89 | } | ||
90 | |||
91 | static void cfag12864b_setbit(unsigned char state, unsigned char n) | ||
92 | { | ||
93 | if (state) | ||
94 | cfag12864b_state |= bit(n); | ||
95 | else | ||
96 | cfag12864b_state &= ~bit(n); | ||
97 | } | ||
98 | |||
99 | static void cfag12864b_e(unsigned char state) | ||
100 | { | ||
101 | cfag12864b_setbit(state, CFAG12864B_BIT_E); | ||
102 | cfag12864b_set(); | ||
103 | } | ||
104 | |||
105 | static void cfag12864b_cs1(unsigned char state) | ||
106 | { | ||
107 | cfag12864b_setbit(state, CFAG12864B_BIT_CS1); | ||
108 | } | ||
109 | |||
110 | static void cfag12864b_cs2(unsigned char state) | ||
111 | { | ||
112 | cfag12864b_setbit(state, CFAG12864B_BIT_CS2); | ||
113 | } | ||
114 | |||
115 | static void cfag12864b_di(unsigned char state) | ||
116 | { | ||
117 | cfag12864b_setbit(state, CFAG12864B_BIT_DI); | ||
118 | } | ||
119 | |||
120 | static void cfag12864b_setcontrollers(unsigned char first, | ||
121 | unsigned char second) | ||
122 | { | ||
123 | if (first) | ||
124 | cfag12864b_cs1(0); | ||
125 | else | ||
126 | cfag12864b_cs1(1); | ||
127 | |||
128 | if (second) | ||
129 | cfag12864b_cs2(0); | ||
130 | else | ||
131 | cfag12864b_cs2(1); | ||
132 | } | ||
133 | |||
134 | static void cfag12864b_controller(unsigned char which) | ||
135 | { | ||
136 | if (which == 0) | ||
137 | cfag12864b_setcontrollers(1, 0); | ||
138 | else if (which == 1) | ||
139 | cfag12864b_setcontrollers(0, 1); | ||
140 | } | ||
141 | |||
142 | static void cfag12864b_displaystate(unsigned char state) | ||
143 | { | ||
144 | cfag12864b_di(0); | ||
145 | cfag12864b_e(1); | ||
146 | ks0108_displaystate(state); | ||
147 | cfag12864b_e(0); | ||
148 | } | ||
149 | |||
150 | static void cfag12864b_address(unsigned char address) | ||
151 | { | ||
152 | cfag12864b_di(0); | ||
153 | cfag12864b_e(1); | ||
154 | ks0108_address(address); | ||
155 | cfag12864b_e(0); | ||
156 | } | ||
157 | |||
158 | static void cfag12864b_page(unsigned char page) | ||
159 | { | ||
160 | cfag12864b_di(0); | ||
161 | cfag12864b_e(1); | ||
162 | ks0108_page(page); | ||
163 | cfag12864b_e(0); | ||
164 | } | ||
165 | |||
166 | static void cfag12864b_startline(unsigned char startline) | ||
167 | { | ||
168 | cfag12864b_di(0); | ||
169 | cfag12864b_e(1); | ||
170 | ks0108_startline(startline); | ||
171 | cfag12864b_e(0); | ||
172 | } | ||
173 | |||
174 | static void cfag12864b_writebyte(unsigned char byte) | ||
175 | { | ||
176 | cfag12864b_di(1); | ||
177 | cfag12864b_e(1); | ||
178 | ks0108_writedata(byte); | ||
179 | cfag12864b_e(0); | ||
180 | } | ||
181 | |||
182 | static void cfag12864b_nop(void) | ||
183 | { | ||
184 | cfag12864b_startline(0); | ||
185 | } | ||
186 | |||
187 | /* | ||
188 | * cfag12864b Internal Commands | ||
189 | */ | ||
190 | |||
191 | static void cfag12864b_on(void) | ||
192 | { | ||
193 | cfag12864b_setcontrollers(1, 1); | ||
194 | cfag12864b_displaystate(1); | ||
195 | } | ||
196 | |||
197 | static void cfag12864b_off(void) | ||
198 | { | ||
199 | cfag12864b_setcontrollers(1, 1); | ||
200 | cfag12864b_displaystate(0); | ||
201 | } | ||
202 | |||
203 | static void cfag12864b_clear(void) | ||
204 | { | ||
205 | unsigned char i, j; | ||
206 | |||
207 | cfag12864b_setcontrollers(1, 1); | ||
208 | for (i = 0; i < CFAG12864B_PAGES; i++) { | ||
209 | cfag12864b_page(i); | ||
210 | cfag12864b_address(0); | ||
211 | for (j = 0; j < CFAG12864B_ADDRESSES; j++) | ||
212 | cfag12864b_writebyte(0); | ||
213 | } | ||
214 | } | ||
215 | |||
216 | /* | ||
217 | * Update work | ||
218 | */ | ||
219 | |||
220 | unsigned char *cfag12864b_buffer; | ||
221 | static unsigned char *cfag12864b_cache; | ||
222 | static DEFINE_MUTEX(cfag12864b_mutex); | ||
223 | static unsigned char cfag12864b_updating; | ||
224 | static void cfag12864b_update(struct work_struct *delayed_work); | ||
225 | static struct workqueue_struct *cfag12864b_workqueue; | ||
226 | static DECLARE_DELAYED_WORK(cfag12864b_work, cfag12864b_update); | ||
227 | |||
228 | static void cfag12864b_queue(void) | ||
229 | { | ||
230 | queue_delayed_work(cfag12864b_workqueue, &cfag12864b_work, | ||
231 | HZ / cfag12864b_rate); | ||
232 | } | ||
233 | |||
234 | unsigned char cfag12864b_enable(void) | ||
235 | { | ||
236 | unsigned char ret; | ||
237 | |||
238 | mutex_lock(&cfag12864b_mutex); | ||
239 | |||
240 | if (!cfag12864b_updating) { | ||
241 | cfag12864b_updating = 1; | ||
242 | cfag12864b_queue(); | ||
243 | ret = 0; | ||
244 | } else | ||
245 | ret = 1; | ||
246 | |||
247 | mutex_unlock(&cfag12864b_mutex); | ||
248 | |||
249 | return ret; | ||
250 | } | ||
251 | |||
252 | void cfag12864b_disable(void) | ||
253 | { | ||
254 | mutex_lock(&cfag12864b_mutex); | ||
255 | |||
256 | if (cfag12864b_updating) { | ||
257 | cfag12864b_updating = 0; | ||
258 | cancel_delayed_work(&cfag12864b_work); | ||
259 | flush_workqueue(cfag12864b_workqueue); | ||
260 | } | ||
261 | |||
262 | mutex_unlock(&cfag12864b_mutex); | ||
263 | } | ||
264 | |||
265 | unsigned char cfag12864b_isenabled(void) | ||
266 | { | ||
267 | return cfag12864b_updating; | ||
268 | } | ||
269 | |||
270 | static void cfag12864b_update(struct work_struct *work) | ||
271 | { | ||
272 | unsigned char c; | ||
273 | unsigned short i, j, k, b; | ||
274 | |||
275 | if (memcmp(cfag12864b_cache, cfag12864b_buffer, CFAG12864B_SIZE)) { | ||
276 | for (i = 0; i < CFAG12864B_CONTROLLERS; i++) { | ||
277 | cfag12864b_controller(i); | ||
278 | cfag12864b_nop(); | ||
279 | for (j = 0; j < CFAG12864B_PAGES; j++) { | ||
280 | cfag12864b_page(j); | ||
281 | cfag12864b_nop(); | ||
282 | cfag12864b_address(0); | ||
283 | cfag12864b_nop(); | ||
284 | for (k = 0; k < CFAG12864B_ADDRESSES; k++) { | ||
285 | for (c = 0, b = 0; b < 8; b++) | ||
286 | if (cfag12864b_buffer | ||
287 | [i * CFAG12864B_ADDRESSES / 8 | ||
288 | + k / 8 + (j * 8 + b) * | ||
289 | CFAG12864B_WIDTH / 8] | ||
290 | & bit(k % 8)) | ||
291 | c |= bit(b); | ||
292 | cfag12864b_writebyte(c); | ||
293 | } | ||
294 | } | ||
295 | } | ||
296 | |||
297 | memcpy(cfag12864b_cache, cfag12864b_buffer, CFAG12864B_SIZE); | ||
298 | } | ||
299 | |||
300 | if (cfag12864b_updating) | ||
301 | cfag12864b_queue(); | ||
302 | } | ||
303 | |||
304 | /* | ||
305 | * cfag12864b Exported Symbols | ||
306 | */ | ||
307 | |||
308 | EXPORT_SYMBOL_GPL(cfag12864b_buffer); | ||
309 | EXPORT_SYMBOL_GPL(cfag12864b_getrate); | ||
310 | EXPORT_SYMBOL_GPL(cfag12864b_enable); | ||
311 | EXPORT_SYMBOL_GPL(cfag12864b_disable); | ||
312 | EXPORT_SYMBOL_GPL(cfag12864b_isenabled); | ||
313 | |||
314 | /* | ||
315 | * Module Init & Exit | ||
316 | */ | ||
317 | |||
318 | static int __init cfag12864b_init(void) | ||
319 | { | ||
320 | int ret = -EINVAL; | ||
321 | |||
322 | if (PAGE_SIZE < CFAG12864B_SIZE) { | ||
323 | printk(KERN_ERR CFAG12864B_NAME ": ERROR: " | ||
324 | "page size (%i) < cfag12864b size (%i)\n", | ||
325 | (unsigned int)PAGE_SIZE, CFAG12864B_SIZE); | ||
326 | ret = -ENOMEM; | ||
327 | goto none; | ||
328 | } | ||
329 | |||
330 | cfag12864b_buffer = (unsigned char *) __get_free_page(GFP_KERNEL); | ||
331 | if (cfag12864b_buffer == NULL) { | ||
332 | printk(KERN_ERR CFAG12864B_NAME ": ERROR: " | ||
333 | "can't get a free page\n"); | ||
334 | ret = -ENOMEM; | ||
335 | goto none; | ||
336 | } | ||
337 | |||
338 | cfag12864b_cache = kmalloc(sizeof(unsigned char) * | ||
339 | CFAG12864B_SIZE, GFP_KERNEL); | ||
340 | if (cfag12864b_buffer == NULL) { | ||
341 | printk(KERN_ERR CFAG12864B_NAME ": ERROR: " | ||
342 | "can't alloc cache buffer (%i bytes)\n", | ||
343 | CFAG12864B_SIZE); | ||
344 | ret = -ENOMEM; | ||
345 | goto bufferalloced; | ||
346 | } | ||
347 | |||
348 | cfag12864b_workqueue = create_singlethread_workqueue(CFAG12864B_NAME); | ||
349 | if (cfag12864b_workqueue == NULL) | ||
350 | goto cachealloced; | ||
351 | |||
352 | memset(cfag12864b_buffer, 0, CFAG12864B_SIZE); | ||
353 | |||
354 | cfag12864b_clear(); | ||
355 | cfag12864b_on(); | ||
356 | |||
357 | return 0; | ||
358 | |||
359 | cachealloced: | ||
360 | kfree(cfag12864b_cache); | ||
361 | |||
362 | bufferalloced: | ||
363 | free_page((unsigned long) cfag12864b_buffer); | ||
364 | |||
365 | none: | ||
366 | return ret; | ||
367 | } | ||
368 | |||
369 | static void __exit cfag12864b_exit(void) | ||
370 | { | ||
371 | cfag12864b_disable(); | ||
372 | cfag12864b_off(); | ||
373 | destroy_workqueue(cfag12864b_workqueue); | ||
374 | kfree(cfag12864b_cache); | ||
375 | free_page((unsigned long) cfag12864b_buffer); | ||
376 | } | ||
377 | |||
378 | module_init(cfag12864b_init); | ||
379 | module_exit(cfag12864b_exit); | ||
380 | |||
381 | MODULE_LICENSE("GPL v2"); | ||
382 | MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); | ||
383 | MODULE_DESCRIPTION("cfag12864b LCD driver"); | ||
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c new file mode 100644 index 000000000000..94765e78315f --- /dev/null +++ b/drivers/auxdisplay/cfag12864bfb.c | |||
@@ -0,0 +1,180 @@ | |||
1 | /* | ||
2 | * Filename: cfag12864bfb.c | ||
3 | * Version: 0.1.0 | ||
4 | * Description: cfag12864b LCD framebuffer driver | ||
5 | * License: GPLv2 | ||
6 | * Depends: cfag12864b | ||
7 | * | ||
8 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
9 | * Date: 2006-10-31 | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | #include <linux/init.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/kernel.h> | ||
29 | #include <linux/delay.h> | ||
30 | #include <linux/errno.h> | ||
31 | #include <linux/fb.h> | ||
32 | #include <linux/mm.h> | ||
33 | #include <linux/platform_device.h> | ||
34 | #include <linux/slab.h> | ||
35 | #include <linux/string.h> | ||
36 | #include <linux/uaccess.h> | ||
37 | #include <linux/cfag12864b.h> | ||
38 | |||
39 | #define CFAG12864BFB_NAME "cfag12864bfb" | ||
40 | |||
41 | static struct fb_fix_screeninfo cfag12864bfb_fix __initdata = { | ||
42 | .id = "cfag12864b", | ||
43 | .type = FB_TYPE_PACKED_PIXELS, | ||
44 | .visual = FB_VISUAL_MONO10, | ||
45 | .xpanstep = 0, | ||
46 | .ypanstep = 0, | ||
47 | .ywrapstep = 0, | ||
48 | .line_length = CFAG12864B_WIDTH / 8, | ||
49 | .accel = FB_ACCEL_NONE, | ||
50 | }; | ||
51 | |||
52 | static struct fb_var_screeninfo cfag12864bfb_var __initdata = { | ||
53 | .xres = CFAG12864B_WIDTH, | ||
54 | .yres = CFAG12864B_HEIGHT, | ||
55 | .xres_virtual = CFAG12864B_WIDTH, | ||
56 | .yres_virtual = CFAG12864B_HEIGHT, | ||
57 | .bits_per_pixel = 1, | ||
58 | .red = { 0, 1, 0 }, | ||
59 | .green = { 0, 1, 0 }, | ||
60 | .blue = { 0, 1, 0 }, | ||
61 | .left_margin = 0, | ||
62 | .right_margin = 0, | ||
63 | .upper_margin = 0, | ||
64 | .lower_margin = 0, | ||
65 | .vmode = FB_VMODE_NONINTERLACED, | ||
66 | }; | ||
67 | |||
68 | static int cfag12864bfb_mmap(struct fb_info *info, struct vm_area_struct *vma) | ||
69 | { | ||
70 | return vm_insert_page(vma, vma->vm_start, | ||
71 | virt_to_page(cfag12864b_buffer)); | ||
72 | } | ||
73 | |||
74 | static struct fb_ops cfag12864bfb_ops = { | ||
75 | .owner = THIS_MODULE, | ||
76 | .fb_fillrect = cfb_fillrect, | ||
77 | .fb_copyarea = cfb_copyarea, | ||
78 | .fb_imageblit = cfb_imageblit, | ||
79 | .fb_mmap = cfag12864bfb_mmap, | ||
80 | }; | ||
81 | |||
82 | static int __init cfag12864bfb_probe(struct platform_device *device) | ||
83 | { | ||
84 | int ret = -EINVAL; | ||
85 | struct fb_info *info = framebuffer_alloc(0, &device->dev); | ||
86 | |||
87 | if (!info) | ||
88 | goto none; | ||
89 | |||
90 | info->screen_base = (char __iomem *) cfag12864b_buffer; | ||
91 | info->screen_size = CFAG12864B_SIZE; | ||
92 | info->fbops = &cfag12864bfb_ops; | ||
93 | info->fix = cfag12864bfb_fix; | ||
94 | info->var = cfag12864bfb_var; | ||
95 | info->pseudo_palette = NULL; | ||
96 | info->par = NULL; | ||
97 | info->flags = FBINFO_FLAG_DEFAULT; | ||
98 | |||
99 | if (register_framebuffer(info) < 0) | ||
100 | goto fballoced; | ||
101 | |||
102 | platform_set_drvdata(device, info); | ||
103 | |||
104 | printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, | ||
105 | info->fix.id); | ||
106 | |||
107 | return 0; | ||
108 | |||
109 | fballoced: | ||
110 | framebuffer_release(info); | ||
111 | |||
112 | none: | ||
113 | return ret; | ||
114 | } | ||
115 | |||
116 | static int cfag12864bfb_remove(struct platform_device *device) | ||
117 | { | ||
118 | struct fb_info *info = platform_get_drvdata(device); | ||
119 | |||
120 | if (info) { | ||
121 | unregister_framebuffer(info); | ||
122 | framebuffer_release(info); | ||
123 | } | ||
124 | |||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static struct platform_driver cfag12864bfb_driver = { | ||
129 | .probe = cfag12864bfb_probe, | ||
130 | .remove = cfag12864bfb_remove, | ||
131 | .driver = { | ||
132 | .name = CFAG12864BFB_NAME, | ||
133 | }, | ||
134 | }; | ||
135 | |||
136 | static struct platform_device *cfag12864bfb_device; | ||
137 | |||
138 | static int __init cfag12864bfb_init(void) | ||
139 | { | ||
140 | int ret; | ||
141 | |||
142 | if (cfag12864b_enable()) { | ||
143 | printk(KERN_ERR CFAG12864BFB_NAME ": ERROR: " | ||
144 | "can't enable cfag12864b refreshing (being used)\n"); | ||
145 | return -ENODEV; | ||
146 | } | ||
147 | |||
148 | ret = platform_driver_register(&cfag12864bfb_driver); | ||
149 | |||
150 | if (!ret) { | ||
151 | cfag12864bfb_device = | ||
152 | platform_device_alloc(CFAG12864BFB_NAME, 0); | ||
153 | |||
154 | if (cfag12864bfb_device) | ||
155 | ret = platform_device_add(cfag12864bfb_device); | ||
156 | else | ||
157 | ret = -ENOMEM; | ||
158 | |||
159 | if (ret) { | ||
160 | platform_device_put(cfag12864bfb_device); | ||
161 | platform_driver_unregister(&cfag12864bfb_driver); | ||
162 | } | ||
163 | } | ||
164 | |||
165 | return ret; | ||
166 | } | ||
167 | |||
168 | static void __exit cfag12864bfb_exit(void) | ||
169 | { | ||
170 | platform_device_unregister(cfag12864bfb_device); | ||
171 | platform_driver_unregister(&cfag12864bfb_driver); | ||
172 | cfag12864b_disable(); | ||
173 | } | ||
174 | |||
175 | module_init(cfag12864bfb_init); | ||
176 | module_exit(cfag12864bfb_exit); | ||
177 | |||
178 | MODULE_LICENSE("GPL v2"); | ||
179 | MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); | ||
180 | MODULE_DESCRIPTION("cfag12864b LCD framebuffer driver"); | ||
diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c new file mode 100644 index 000000000000..a637575b9106 --- /dev/null +++ b/drivers/auxdisplay/ks0108.c | |||
@@ -0,0 +1,166 @@ | |||
1 | /* | ||
2 | * Filename: ks0108.c | ||
3 | * Version: 0.1.0 | ||
4 | * Description: ks0108 LCD Controller driver | ||
5 | * License: GPLv2 | ||
6 | * Depends: parport | ||
7 | * | ||
8 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
9 | * Date: 2006-10-31 | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | |||
26 | #include <linux/init.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/kernel.h> | ||
29 | #include <linux/delay.h> | ||
30 | #include <linux/fs.h> | ||
31 | #include <linux/io.h> | ||
32 | #include <linux/parport.h> | ||
33 | #include <linux/uaccess.h> | ||
34 | #include <linux/ks0108.h> | ||
35 | |||
36 | #define KS0108_NAME "ks0108" | ||
37 | |||
38 | /* | ||
39 | * Module Parameters | ||
40 | */ | ||
41 | |||
42 | static unsigned int ks0108_port = CONFIG_KS0108_PORT; | ||
43 | module_param(ks0108_port, uint, S_IRUGO); | ||
44 | MODULE_PARM_DESC(ks0108_port, "Parallel port where the LCD is connected"); | ||
45 | |||
46 | static unsigned int ks0108_delay = CONFIG_KS0108_DELAY; | ||
47 | module_param(ks0108_delay, uint, S_IRUGO); | ||
48 | MODULE_PARM_DESC(ks0108_delay, "Delay between each control writing (microseconds)"); | ||
49 | |||
50 | /* | ||
51 | * Device | ||
52 | */ | ||
53 | |||
54 | static struct parport *ks0108_parport; | ||
55 | static struct pardevice *ks0108_pardevice; | ||
56 | |||
57 | /* | ||
58 | * ks0108 Exported Commands (don't lock) | ||
59 | * | ||
60 | * You _should_ lock in the top driver: This functions _should not_ | ||
61 | * get race conditions in any way. Locking for each byte here would be | ||
62 | * so slow and useless. | ||
63 | * | ||
64 | * There are not bit definitions because they are not flags, | ||
65 | * just arbitrary combinations defined by the documentation for each | ||
66 | * function in the ks0108 LCD controller. If you want to know what means | ||
67 | * a specific combination, look at the function's name. | ||
68 | * | ||
69 | * The ks0108_writecontrol bits need to be reverted ^(0,1,3) because | ||
70 | * the parallel port also revert them using a "not" logic gate. | ||
71 | */ | ||
72 | |||
73 | #define bit(n) (((unsigned char)1)<<(n)) | ||
74 | |||
75 | void ks0108_writedata(unsigned char byte) | ||
76 | { | ||
77 | parport_write_data(ks0108_parport, byte); | ||
78 | } | ||
79 | |||
80 | void ks0108_writecontrol(unsigned char byte) | ||
81 | { | ||
82 | udelay(ks0108_delay); | ||
83 | parport_write_control(ks0108_parport, byte ^ (bit(0) | bit(1) | bit(3))); | ||
84 | } | ||
85 | |||
86 | void ks0108_displaystate(unsigned char state) | ||
87 | { | ||
88 | ks0108_writedata((state ? bit(0) : 0) | bit(1) | bit(2) | bit(3) | bit(4) | bit(5)); | ||
89 | } | ||
90 | |||
91 | void ks0108_startline(unsigned char startline) | ||
92 | { | ||
93 | ks0108_writedata(min(startline,(unsigned char)63) | bit(6) | bit(7)); | ||
94 | } | ||
95 | |||
96 | void ks0108_address(unsigned char address) | ||
97 | { | ||
98 | ks0108_writedata(min(address,(unsigned char)63) | bit(6)); | ||
99 | } | ||
100 | |||
101 | void ks0108_page(unsigned char page) | ||
102 | { | ||
103 | ks0108_writedata(min(page,(unsigned char)7) | bit(3) | bit(4) | bit(5) | bit(7)); | ||
104 | } | ||
105 | |||
106 | EXPORT_SYMBOL_GPL(ks0108_writedata); | ||
107 | EXPORT_SYMBOL_GPL(ks0108_writecontrol); | ||
108 | EXPORT_SYMBOL_GPL(ks0108_displaystate); | ||
109 | EXPORT_SYMBOL_GPL(ks0108_startline); | ||
110 | EXPORT_SYMBOL_GPL(ks0108_address); | ||
111 | EXPORT_SYMBOL_GPL(ks0108_page); | ||
112 | |||
113 | /* | ||
114 | * Module Init & Exit | ||
115 | */ | ||
116 | |||
117 | static int __init ks0108_init(void) | ||
118 | { | ||
119 | int result; | ||
120 | int ret = -EINVAL; | ||
121 | |||
122 | ks0108_parport = parport_find_base(ks0108_port); | ||
123 | if (ks0108_parport == NULL) { | ||
124 | printk(KERN_ERR KS0108_NAME ": ERROR: " | ||
125 | "parport didn't find %i port\n", ks0108_port); | ||
126 | goto none; | ||
127 | } | ||
128 | |||
129 | ks0108_pardevice = parport_register_device(ks0108_parport, KS0108_NAME, | ||
130 | NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL); | ||
131 | if (ks0108_pardevice == NULL) { | ||
132 | printk(KERN_ERR KS0108_NAME ": ERROR: " | ||
133 | "parport didn't register new device\n"); | ||
134 | goto none; | ||
135 | } | ||
136 | |||
137 | result = parport_claim(ks0108_pardevice); | ||
138 | if (result != 0) { | ||
139 | printk(KERN_ERR KS0108_NAME ": ERROR: " | ||
140 | "can't claim %i parport, maybe in use\n", ks0108_port); | ||
141 | ret = result; | ||
142 | goto registered; | ||
143 | } | ||
144 | |||
145 | return 0; | ||
146 | |||
147 | registered: | ||
148 | parport_unregister_device(ks0108_pardevice); | ||
149 | |||
150 | none: | ||
151 | return ret; | ||
152 | } | ||
153 | |||
154 | static void __exit ks0108_exit(void) | ||
155 | { | ||
156 | parport_release(ks0108_pardevice); | ||
157 | parport_unregister_device(ks0108_pardevice); | ||
158 | } | ||
159 | |||
160 | module_init(ks0108_init); | ||
161 | module_exit(ks0108_exit); | ||
162 | |||
163 | MODULE_LICENSE("GPL v2"); | ||
164 | MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); | ||
165 | MODULE_DESCRIPTION("ks0108 LCD Controller driver"); | ||
166 | |||
diff --git a/drivers/base/node.c b/drivers/base/node.c index 001e6f6b9c1b..475e33f76e0d 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -40,13 +40,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
40 | int n; | 40 | int n; |
41 | int nid = dev->id; | 41 | int nid = dev->id; |
42 | struct sysinfo i; | 42 | struct sysinfo i; |
43 | unsigned long inactive; | ||
44 | unsigned long active; | ||
45 | unsigned long free; | ||
46 | 43 | ||
47 | si_meminfo_node(&i, nid); | 44 | si_meminfo_node(&i, nid); |
48 | __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); | ||
49 | |||
50 | 45 | ||
51 | n = sprintf(buf, "\n" | 46 | n = sprintf(buf, "\n" |
52 | "Node %d MemTotal: %8lu kB\n" | 47 | "Node %d MemTotal: %8lu kB\n" |
@@ -74,8 +69,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
74 | nid, K(i.totalram), | 69 | nid, K(i.totalram), |
75 | nid, K(i.freeram), | 70 | nid, K(i.freeram), |
76 | nid, K(i.totalram - i.freeram), | 71 | nid, K(i.totalram - i.freeram), |
77 | nid, K(active), | 72 | nid, node_page_state(nid, NR_ACTIVE), |
78 | nid, K(inactive), | 73 | nid, node_page_state(nid, NR_INACTIVE), |
79 | #ifdef CONFIG_HIGHMEM | 74 | #ifdef CONFIG_HIGHMEM |
80 | nid, K(i.totalhigh), | 75 | nid, K(i.totalhigh), |
81 | nid, K(i.freehigh), | 76 | nid, K(i.freehigh), |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 8d81a3a64c07..6ad28dfb1469 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -177,7 +177,7 @@ static void DAC960_AnnounceDriver(DAC960_Controller_T *Controller) | |||
177 | DAC960_Failure prints a standardized error message, and then returns false. | 177 | DAC960_Failure prints a standardized error message, and then returns false. |
178 | */ | 178 | */ |
179 | 179 | ||
180 | static boolean DAC960_Failure(DAC960_Controller_T *Controller, | 180 | static bool DAC960_Failure(DAC960_Controller_T *Controller, |
181 | unsigned char *ErrorMessage) | 181 | unsigned char *ErrorMessage) |
182 | { | 182 | { |
183 | DAC960_Error("While configuring DAC960 PCI RAID Controller at\n", | 183 | DAC960_Error("While configuring DAC960 PCI RAID Controller at\n", |
@@ -206,7 +206,7 @@ static boolean DAC960_Failure(DAC960_Controller_T *Controller, | |||
206 | that are passed in. | 206 | that are passed in. |
207 | */ | 207 | */ |
208 | 208 | ||
209 | static boolean init_dma_loaf(struct pci_dev *dev, struct dma_loaf *loaf, | 209 | static bool init_dma_loaf(struct pci_dev *dev, struct dma_loaf *loaf, |
210 | size_t len) | 210 | size_t len) |
211 | { | 211 | { |
212 | void *cpu_addr; | 212 | void *cpu_addr; |
@@ -250,7 +250,7 @@ static void free_dma_loaf(struct pci_dev *dev, struct dma_loaf *loaf_handle) | |||
250 | failure. | 250 | failure. |
251 | */ | 251 | */ |
252 | 252 | ||
253 | static boolean DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller) | 253 | static bool DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller) |
254 | { | 254 | { |
255 | int CommandAllocationLength, CommandAllocationGroupSize; | 255 | int CommandAllocationLength, CommandAllocationGroupSize; |
256 | int CommandsRemaining = 0, CommandIdentifier, CommandGroupByteCount; | 256 | int CommandsRemaining = 0, CommandIdentifier, CommandGroupByteCount; |
@@ -790,7 +790,7 @@ static void DAC960_ExecuteCommand(DAC960_Command_T *Command) | |||
790 | on failure. | 790 | on failure. |
791 | */ | 791 | */ |
792 | 792 | ||
793 | static boolean DAC960_V1_ExecuteType3(DAC960_Controller_T *Controller, | 793 | static bool DAC960_V1_ExecuteType3(DAC960_Controller_T *Controller, |
794 | DAC960_V1_CommandOpcode_T CommandOpcode, | 794 | DAC960_V1_CommandOpcode_T CommandOpcode, |
795 | dma_addr_t DataDMA) | 795 | dma_addr_t DataDMA) |
796 | { | 796 | { |
@@ -814,7 +814,7 @@ static boolean DAC960_V1_ExecuteType3(DAC960_Controller_T *Controller, | |||
814 | on failure. | 814 | on failure. |
815 | */ | 815 | */ |
816 | 816 | ||
817 | static boolean DAC960_V1_ExecuteType3B(DAC960_Controller_T *Controller, | 817 | static bool DAC960_V1_ExecuteType3B(DAC960_Controller_T *Controller, |
818 | DAC960_V1_CommandOpcode_T CommandOpcode, | 818 | DAC960_V1_CommandOpcode_T CommandOpcode, |
819 | unsigned char CommandOpcode2, | 819 | unsigned char CommandOpcode2, |
820 | dma_addr_t DataDMA) | 820 | dma_addr_t DataDMA) |
@@ -840,7 +840,7 @@ static boolean DAC960_V1_ExecuteType3B(DAC960_Controller_T *Controller, | |||
840 | on failure. | 840 | on failure. |
841 | */ | 841 | */ |
842 | 842 | ||
843 | static boolean DAC960_V1_ExecuteType3D(DAC960_Controller_T *Controller, | 843 | static bool DAC960_V1_ExecuteType3D(DAC960_Controller_T *Controller, |
844 | DAC960_V1_CommandOpcode_T CommandOpcode, | 844 | DAC960_V1_CommandOpcode_T CommandOpcode, |
845 | unsigned char Channel, | 845 | unsigned char Channel, |
846 | unsigned char TargetID, | 846 | unsigned char TargetID, |
@@ -870,7 +870,7 @@ static boolean DAC960_V1_ExecuteType3D(DAC960_Controller_T *Controller, | |||
870 | Return data in The controller's HealthStatusBuffer, which is dma-able memory | 870 | Return data in The controller's HealthStatusBuffer, which is dma-able memory |
871 | */ | 871 | */ |
872 | 872 | ||
873 | static boolean DAC960_V2_GeneralInfo(DAC960_Controller_T *Controller) | 873 | static bool DAC960_V2_GeneralInfo(DAC960_Controller_T *Controller) |
874 | { | 874 | { |
875 | DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); | 875 | DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); |
876 | DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; | 876 | DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; |
@@ -908,7 +908,7 @@ static boolean DAC960_V2_GeneralInfo(DAC960_Controller_T *Controller) | |||
908 | memory buffer. | 908 | memory buffer. |
909 | */ | 909 | */ |
910 | 910 | ||
911 | static boolean DAC960_V2_NewControllerInfo(DAC960_Controller_T *Controller) | 911 | static bool DAC960_V2_NewControllerInfo(DAC960_Controller_T *Controller) |
912 | { | 912 | { |
913 | DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); | 913 | DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); |
914 | DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; | 914 | DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; |
@@ -946,7 +946,7 @@ static boolean DAC960_V2_NewControllerInfo(DAC960_Controller_T *Controller) | |||
946 | Data is returned in the controller's V2.NewLogicalDeviceInformation | 946 | Data is returned in the controller's V2.NewLogicalDeviceInformation |
947 | */ | 947 | */ |
948 | 948 | ||
949 | static boolean DAC960_V2_NewLogicalDeviceInfo(DAC960_Controller_T *Controller, | 949 | static bool DAC960_V2_NewLogicalDeviceInfo(DAC960_Controller_T *Controller, |
950 | unsigned short LogicalDeviceNumber) | 950 | unsigned short LogicalDeviceNumber) |
951 | { | 951 | { |
952 | DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); | 952 | DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); |
@@ -997,7 +997,7 @@ static boolean DAC960_V2_NewLogicalDeviceInfo(DAC960_Controller_T *Controller, | |||
997 | 997 | ||
998 | */ | 998 | */ |
999 | 999 | ||
1000 | static boolean DAC960_V2_NewPhysicalDeviceInfo(DAC960_Controller_T *Controller, | 1000 | static bool DAC960_V2_NewPhysicalDeviceInfo(DAC960_Controller_T *Controller, |
1001 | unsigned char Channel, | 1001 | unsigned char Channel, |
1002 | unsigned char TargetID, | 1002 | unsigned char TargetID, |
1003 | unsigned char LogicalUnit) | 1003 | unsigned char LogicalUnit) |
@@ -1082,7 +1082,7 @@ static void DAC960_V2_ConstructNewUnitSerialNumber( | |||
1082 | memory buffer. | 1082 | memory buffer. |
1083 | */ | 1083 | */ |
1084 | 1084 | ||
1085 | static boolean DAC960_V2_NewInquiryUnitSerialNumber(DAC960_Controller_T *Controller, | 1085 | static bool DAC960_V2_NewInquiryUnitSerialNumber(DAC960_Controller_T *Controller, |
1086 | int Channel, int TargetID, int LogicalUnit) | 1086 | int Channel, int TargetID, int LogicalUnit) |
1087 | { | 1087 | { |
1088 | DAC960_Command_T *Command; | 1088 | DAC960_Command_T *Command; |
@@ -1110,7 +1110,7 @@ static boolean DAC960_V2_NewInquiryUnitSerialNumber(DAC960_Controller_T *Control | |||
1110 | success and false on failure. | 1110 | success and false on failure. |
1111 | */ | 1111 | */ |
1112 | 1112 | ||
1113 | static boolean DAC960_V2_DeviceOperation(DAC960_Controller_T *Controller, | 1113 | static bool DAC960_V2_DeviceOperation(DAC960_Controller_T *Controller, |
1114 | DAC960_V2_IOCTL_Opcode_T IOCTL_Opcode, | 1114 | DAC960_V2_IOCTL_Opcode_T IOCTL_Opcode, |
1115 | DAC960_V2_OperationDevice_T | 1115 | DAC960_V2_OperationDevice_T |
1116 | OperationDevice) | 1116 | OperationDevice) |
@@ -1142,7 +1142,7 @@ static boolean DAC960_V2_DeviceOperation(DAC960_Controller_T *Controller, | |||
1142 | other dma mapped memory. | 1142 | other dma mapped memory. |
1143 | */ | 1143 | */ |
1144 | 1144 | ||
1145 | static boolean DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T | 1145 | static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T |
1146 | *Controller) | 1146 | *Controller) |
1147 | { | 1147 | { |
1148 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 1148 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
@@ -1348,7 +1348,7 @@ skip_mailboxes: | |||
1348 | the structures that are contained in that region. | 1348 | the structures that are contained in that region. |
1349 | */ | 1349 | */ |
1350 | 1350 | ||
1351 | static boolean DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T | 1351 | static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T |
1352 | *Controller) | 1352 | *Controller) |
1353 | { | 1353 | { |
1354 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 1354 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
@@ -1526,7 +1526,7 @@ static boolean DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T | |||
1526 | from DAC960 V1 Firmware Controllers and initializes the Controller structure. | 1526 | from DAC960 V1 Firmware Controllers and initializes the Controller structure. |
1527 | */ | 1527 | */ |
1528 | 1528 | ||
1529 | static boolean DAC960_V1_ReadControllerConfiguration(DAC960_Controller_T | 1529 | static bool DAC960_V1_ReadControllerConfiguration(DAC960_Controller_T |
1530 | *Controller) | 1530 | *Controller) |
1531 | { | 1531 | { |
1532 | DAC960_V1_Enquiry2_T *Enquiry2; | 1532 | DAC960_V1_Enquiry2_T *Enquiry2; |
@@ -1767,7 +1767,7 @@ static boolean DAC960_V1_ReadControllerConfiguration(DAC960_Controller_T | |||
1767 | from DAC960 V2 Firmware Controllers and initializes the Controller structure. | 1767 | from DAC960 V2 Firmware Controllers and initializes the Controller structure. |
1768 | */ | 1768 | */ |
1769 | 1769 | ||
1770 | static boolean DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T | 1770 | static bool DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T |
1771 | *Controller) | 1771 | *Controller) |
1772 | { | 1772 | { |
1773 | DAC960_V2_ControllerInfo_T *ControllerInfo = | 1773 | DAC960_V2_ControllerInfo_T *ControllerInfo = |
@@ -1898,7 +1898,7 @@ static boolean DAC960_V2_ReadControllerConfiguration(DAC960_Controller_T | |||
1898 | for Controller. | 1898 | for Controller. |
1899 | */ | 1899 | */ |
1900 | 1900 | ||
1901 | static boolean DAC960_ReportControllerConfiguration(DAC960_Controller_T | 1901 | static bool DAC960_ReportControllerConfiguration(DAC960_Controller_T |
1902 | *Controller) | 1902 | *Controller) |
1903 | { | 1903 | { |
1904 | DAC960_Info("Configuring Mylex %s PCI RAID Controller\n", | 1904 | DAC960_Info("Configuring Mylex %s PCI RAID Controller\n", |
@@ -1947,7 +1947,7 @@ static boolean DAC960_ReportControllerConfiguration(DAC960_Controller_T | |||
1947 | Controller. | 1947 | Controller. |
1948 | */ | 1948 | */ |
1949 | 1949 | ||
1950 | static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T | 1950 | static bool DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T |
1951 | *Controller) | 1951 | *Controller) |
1952 | { | 1952 | { |
1953 | struct dma_loaf local_dma; | 1953 | struct dma_loaf local_dma; |
@@ -2095,7 +2095,7 @@ static boolean DAC960_V1_ReadDeviceConfiguration(DAC960_Controller_T | |||
2095 | device connected to Controller. | 2095 | device connected to Controller. |
2096 | */ | 2096 | */ |
2097 | 2097 | ||
2098 | static boolean DAC960_V2_ReadDeviceConfiguration(DAC960_Controller_T | 2098 | static bool DAC960_V2_ReadDeviceConfiguration(DAC960_Controller_T |
2099 | *Controller) | 2099 | *Controller) |
2100 | { | 2100 | { |
2101 | unsigned char Channel = 0, TargetID = 0, LogicalUnit = 0; | 2101 | unsigned char Channel = 0, TargetID = 0, LogicalUnit = 0; |
@@ -2219,7 +2219,7 @@ static void DAC960_SanitizeInquiryData(DAC960_SCSI_Inquiry_T | |||
2219 | Information for DAC960 V1 Firmware Controllers. | 2219 | Information for DAC960 V1 Firmware Controllers. |
2220 | */ | 2220 | */ |
2221 | 2221 | ||
2222 | static boolean DAC960_V1_ReportDeviceConfiguration(DAC960_Controller_T | 2222 | static bool DAC960_V1_ReportDeviceConfiguration(DAC960_Controller_T |
2223 | *Controller) | 2223 | *Controller) |
2224 | { | 2224 | { |
2225 | int LogicalDriveNumber, Channel, TargetID; | 2225 | int LogicalDriveNumber, Channel, TargetID; |
@@ -2316,7 +2316,7 @@ static boolean DAC960_V1_ReportDeviceConfiguration(DAC960_Controller_T | |||
2316 | Information for DAC960 V2 Firmware Controllers. | 2316 | Information for DAC960 V2 Firmware Controllers. |
2317 | */ | 2317 | */ |
2318 | 2318 | ||
2319 | static boolean DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T | 2319 | static bool DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T |
2320 | *Controller) | 2320 | *Controller) |
2321 | { | 2321 | { |
2322 | int PhysicalDeviceIndex, LogicalDriveNumber; | 2322 | int PhysicalDeviceIndex, LogicalDriveNumber; |
@@ -2501,7 +2501,7 @@ static boolean DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T | |||
2501 | associated with Controller. | 2501 | associated with Controller. |
2502 | */ | 2502 | */ |
2503 | 2503 | ||
2504 | static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller) | 2504 | static bool DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller) |
2505 | { | 2505 | { |
2506 | int MajorNumber = DAC960_MAJOR + Controller->ControllerNumber; | 2506 | int MajorNumber = DAC960_MAJOR + Controller->ControllerNumber; |
2507 | int n; | 2507 | int n; |
@@ -2582,7 +2582,7 @@ static void DAC960_ComputeGenericDiskInfo(DAC960_Controller_T *Controller) | |||
2582 | It returns true for fatal errors and false otherwise. | 2582 | It returns true for fatal errors and false otherwise. |
2583 | */ | 2583 | */ |
2584 | 2584 | ||
2585 | static boolean DAC960_ReportErrorStatus(DAC960_Controller_T *Controller, | 2585 | static bool DAC960_ReportErrorStatus(DAC960_Controller_T *Controller, |
2586 | unsigned char ErrorStatus, | 2586 | unsigned char ErrorStatus, |
2587 | unsigned char Parameter0, | 2587 | unsigned char Parameter0, |
2588 | unsigned char Parameter1) | 2588 | unsigned char Parameter1) |
@@ -3048,7 +3048,7 @@ Failure: | |||
3048 | DAC960_InitializeController initializes Controller. | 3048 | DAC960_InitializeController initializes Controller. |
3049 | */ | 3049 | */ |
3050 | 3050 | ||
3051 | static boolean | 3051 | static bool |
3052 | DAC960_InitializeController(DAC960_Controller_T *Controller) | 3052 | DAC960_InitializeController(DAC960_Controller_T *Controller) |
3053 | { | 3053 | { |
3054 | if (DAC960_ReadControllerConfiguration(Controller) && | 3054 | if (DAC960_ReadControllerConfiguration(Controller) && |
@@ -3445,8 +3445,8 @@ static void DAC960_RequestFunction(struct request_queue *RequestQueue) | |||
3445 | individual Buffer. | 3445 | individual Buffer. |
3446 | */ | 3446 | */ |
3447 | 3447 | ||
3448 | static inline boolean DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, | 3448 | static inline bool DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, |
3449 | boolean SuccessfulIO) | 3449 | bool SuccessfulIO) |
3450 | { | 3450 | { |
3451 | struct request *Request = Command->Request; | 3451 | struct request *Request = Command->Request; |
3452 | int UpToDate; | 3452 | int UpToDate; |
@@ -3572,7 +3572,7 @@ static void DAC960_V1_ProcessCompletedCommand(DAC960_Command_T *Command) | |||
3572 | else if (CommandType == DAC960_ReadRetryCommand || | 3572 | else if (CommandType == DAC960_ReadRetryCommand || |
3573 | CommandType == DAC960_WriteRetryCommand) | 3573 | CommandType == DAC960_WriteRetryCommand) |
3574 | { | 3574 | { |
3575 | boolean normal_completion; | 3575 | bool normal_completion; |
3576 | #ifdef FORCE_RETRY_FAILURE_DEBUG | 3576 | #ifdef FORCE_RETRY_FAILURE_DEBUG |
3577 | static int retry_count = 1; | 3577 | static int retry_count = 1; |
3578 | #endif | 3578 | #endif |
@@ -4659,7 +4659,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command) | |||
4659 | else if (CommandType == DAC960_ReadRetryCommand || | 4659 | else if (CommandType == DAC960_ReadRetryCommand || |
4660 | CommandType == DAC960_WriteRetryCommand) | 4660 | CommandType == DAC960_WriteRetryCommand) |
4661 | { | 4661 | { |
4662 | boolean normal_completion; | 4662 | bool normal_completion; |
4663 | 4663 | ||
4664 | #ifdef FORCE_RETRY_FAILURE_DEBUG | 4664 | #ifdef FORCE_RETRY_FAILURE_DEBUG |
4665 | static int retry_count = 1; | 4665 | static int retry_count = 1; |
@@ -5632,7 +5632,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData) | |||
5632 | &Controller->V2.ControllerInformation; | 5632 | &Controller->V2.ControllerInformation; |
5633 | unsigned int StatusChangeCounter = | 5633 | unsigned int StatusChangeCounter = |
5634 | Controller->V2.HealthStatusBuffer->StatusChangeCounter; | 5634 | Controller->V2.HealthStatusBuffer->StatusChangeCounter; |
5635 | boolean ForceMonitoringCommand = false; | 5635 | bool ForceMonitoringCommand = false; |
5636 | if (time_after(jiffies, Controller->SecondaryMonitoringTime | 5636 | if (time_after(jiffies, Controller->SecondaryMonitoringTime |
5637 | + DAC960_SecondaryMonitoringInterval)) | 5637 | + DAC960_SecondaryMonitoringInterval)) |
5638 | { | 5638 | { |
@@ -5696,7 +5696,7 @@ static void DAC960_MonitoringTimerFunction(unsigned long TimerData) | |||
5696 | necessary. It returns true if there is enough room and false otherwise. | 5696 | necessary. It returns true if there is enough room and false otherwise. |
5697 | */ | 5697 | */ |
5698 | 5698 | ||
5699 | static boolean DAC960_CheckStatusBuffer(DAC960_Controller_T *Controller, | 5699 | static bool DAC960_CheckStatusBuffer(DAC960_Controller_T *Controller, |
5700 | unsigned int ByteCount) | 5700 | unsigned int ByteCount) |
5701 | { | 5701 | { |
5702 | unsigned char *NewStatusBuffer; | 5702 | unsigned char *NewStatusBuffer; |
@@ -5744,7 +5744,7 @@ static void DAC960_Message(DAC960_MessageLevel_T MessageLevel, | |||
5744 | ...) | 5744 | ...) |
5745 | { | 5745 | { |
5746 | static unsigned char Buffer[DAC960_LineBufferSize]; | 5746 | static unsigned char Buffer[DAC960_LineBufferSize]; |
5747 | static boolean BeginningOfLine = true; | 5747 | static bool BeginningOfLine = true; |
5748 | va_list Arguments; | 5748 | va_list Arguments; |
5749 | int Length = 0; | 5749 | int Length = 0; |
5750 | va_start(Arguments, Controller); | 5750 | va_start(Arguments, Controller); |
@@ -5837,7 +5837,7 @@ static void DAC960_Message(DAC960_MessageLevel_T MessageLevel, | |||
5837 | Channel and TargetID and returns true on success and false on failure. | 5837 | Channel and TargetID and returns true on success and false on failure. |
5838 | */ | 5838 | */ |
5839 | 5839 | ||
5840 | static boolean DAC960_ParsePhysicalDevice(DAC960_Controller_T *Controller, | 5840 | static bool DAC960_ParsePhysicalDevice(DAC960_Controller_T *Controller, |
5841 | char *UserCommandString, | 5841 | char *UserCommandString, |
5842 | unsigned char *Channel, | 5842 | unsigned char *Channel, |
5843 | unsigned char *TargetID) | 5843 | unsigned char *TargetID) |
@@ -5870,7 +5870,7 @@ static boolean DAC960_ParsePhysicalDevice(DAC960_Controller_T *Controller, | |||
5870 | returns true on success and false on failure. | 5870 | returns true on success and false on failure. |
5871 | */ | 5871 | */ |
5872 | 5872 | ||
5873 | static boolean DAC960_ParseLogicalDrive(DAC960_Controller_T *Controller, | 5873 | static bool DAC960_ParseLogicalDrive(DAC960_Controller_T *Controller, |
5874 | char *UserCommandString, | 5874 | char *UserCommandString, |
5875 | unsigned char *LogicalDriveNumber) | 5875 | unsigned char *LogicalDriveNumber) |
5876 | { | 5876 | { |
@@ -5951,7 +5951,7 @@ static void DAC960_V1_SetDeviceState(DAC960_Controller_T *Controller, | |||
5951 | Controllers. | 5951 | Controllers. |
5952 | */ | 5952 | */ |
5953 | 5953 | ||
5954 | static boolean DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller, | 5954 | static bool DAC960_V1_ExecuteUserCommand(DAC960_Controller_T *Controller, |
5955 | unsigned char *UserCommand) | 5955 | unsigned char *UserCommand) |
5956 | { | 5956 | { |
5957 | DAC960_Command_T *Command; | 5957 | DAC960_Command_T *Command; |
@@ -6166,7 +6166,7 @@ failure: | |||
6166 | on failure. | 6166 | on failure. |
6167 | */ | 6167 | */ |
6168 | 6168 | ||
6169 | static boolean DAC960_V2_TranslatePhysicalDevice(DAC960_Command_T *Command, | 6169 | static bool DAC960_V2_TranslatePhysicalDevice(DAC960_Command_T *Command, |
6170 | unsigned char Channel, | 6170 | unsigned char Channel, |
6171 | unsigned char TargetID, | 6171 | unsigned char TargetID, |
6172 | unsigned short | 6172 | unsigned short |
@@ -6213,7 +6213,7 @@ static boolean DAC960_V2_TranslatePhysicalDevice(DAC960_Command_T *Command, | |||
6213 | Controllers. | 6213 | Controllers. |
6214 | */ | 6214 | */ |
6215 | 6215 | ||
6216 | static boolean DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, | 6216 | static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller, |
6217 | unsigned char *UserCommand) | 6217 | unsigned char *UserCommand) |
6218 | { | 6218 | { |
6219 | DAC960_Command_T *Command; | 6219 | DAC960_Command_T *Command; |
diff --git a/drivers/block/DAC960.h b/drivers/block/DAC960.h index 6148073532b2..f5e2436c39aa 100644 --- a/drivers/block/DAC960.h +++ b/drivers/block/DAC960.h | |||
@@ -68,13 +68,6 @@ | |||
68 | #define DAC690_V2_PciDmaMask 0xffffffffffffffffULL | 68 | #define DAC690_V2_PciDmaMask 0xffffffffffffffffULL |
69 | 69 | ||
70 | /* | 70 | /* |
71 | Define a Boolean data type. | ||
72 | */ | ||
73 | |||
74 | typedef bool boolean; | ||
75 | |||
76 | |||
77 | /* | ||
78 | Define a 32/64 bit I/O Address data type. | 71 | Define a 32/64 bit I/O Address data type. |
79 | */ | 72 | */ |
80 | 73 | ||
@@ -139,25 +132,25 @@ typedef struct DAC960_SCSI_Inquiry | |||
139 | unsigned char PeripheralDeviceType:5; /* Byte 0 Bits 0-4 */ | 132 | unsigned char PeripheralDeviceType:5; /* Byte 0 Bits 0-4 */ |
140 | unsigned char PeripheralQualifier:3; /* Byte 0 Bits 5-7 */ | 133 | unsigned char PeripheralQualifier:3; /* Byte 0 Bits 5-7 */ |
141 | unsigned char DeviceTypeModifier:7; /* Byte 1 Bits 0-6 */ | 134 | unsigned char DeviceTypeModifier:7; /* Byte 1 Bits 0-6 */ |
142 | boolean RMB:1; /* Byte 1 Bit 7 */ | 135 | bool RMB:1; /* Byte 1 Bit 7 */ |
143 | unsigned char ANSI_ApprovedVersion:3; /* Byte 2 Bits 0-2 */ | 136 | unsigned char ANSI_ApprovedVersion:3; /* Byte 2 Bits 0-2 */ |
144 | unsigned char ECMA_Version:3; /* Byte 2 Bits 3-5 */ | 137 | unsigned char ECMA_Version:3; /* Byte 2 Bits 3-5 */ |
145 | unsigned char ISO_Version:2; /* Byte 2 Bits 6-7 */ | 138 | unsigned char ISO_Version:2; /* Byte 2 Bits 6-7 */ |
146 | unsigned char ResponseDataFormat:4; /* Byte 3 Bits 0-3 */ | 139 | unsigned char ResponseDataFormat:4; /* Byte 3 Bits 0-3 */ |
147 | unsigned char :2; /* Byte 3 Bits 4-5 */ | 140 | unsigned char :2; /* Byte 3 Bits 4-5 */ |
148 | boolean TrmIOP:1; /* Byte 3 Bit 6 */ | 141 | bool TrmIOP:1; /* Byte 3 Bit 6 */ |
149 | boolean AENC:1; /* Byte 3 Bit 7 */ | 142 | bool AENC:1; /* Byte 3 Bit 7 */ |
150 | unsigned char AdditionalLength; /* Byte 4 */ | 143 | unsigned char AdditionalLength; /* Byte 4 */ |
151 | unsigned char :8; /* Byte 5 */ | 144 | unsigned char :8; /* Byte 5 */ |
152 | unsigned char :8; /* Byte 6 */ | 145 | unsigned char :8; /* Byte 6 */ |
153 | boolean SftRe:1; /* Byte 7 Bit 0 */ | 146 | bool SftRe:1; /* Byte 7 Bit 0 */ |
154 | boolean CmdQue:1; /* Byte 7 Bit 1 */ | 147 | bool CmdQue:1; /* Byte 7 Bit 1 */ |
155 | boolean :1; /* Byte 7 Bit 2 */ | 148 | bool :1; /* Byte 7 Bit 2 */ |
156 | boolean Linked:1; /* Byte 7 Bit 3 */ | 149 | bool Linked:1; /* Byte 7 Bit 3 */ |
157 | boolean Sync:1; /* Byte 7 Bit 4 */ | 150 | bool Sync:1; /* Byte 7 Bit 4 */ |
158 | boolean WBus16:1; /* Byte 7 Bit 5 */ | 151 | bool WBus16:1; /* Byte 7 Bit 5 */ |
159 | boolean WBus32:1; /* Byte 7 Bit 6 */ | 152 | bool WBus32:1; /* Byte 7 Bit 6 */ |
160 | boolean RelAdr:1; /* Byte 7 Bit 7 */ | 153 | bool RelAdr:1; /* Byte 7 Bit 7 */ |
161 | unsigned char VendorIdentification[8]; /* Bytes 8-15 */ | 154 | unsigned char VendorIdentification[8]; /* Bytes 8-15 */ |
162 | unsigned char ProductIdentification[16]; /* Bytes 16-31 */ | 155 | unsigned char ProductIdentification[16]; /* Bytes 16-31 */ |
163 | unsigned char ProductRevisionLevel[4]; /* Bytes 32-35 */ | 156 | unsigned char ProductRevisionLevel[4]; /* Bytes 32-35 */ |
@@ -215,13 +208,13 @@ DAC960_SCSI_RequestSenseKey_T; | |||
215 | typedef struct DAC960_SCSI_RequestSense | 208 | typedef struct DAC960_SCSI_RequestSense |
216 | { | 209 | { |
217 | unsigned char ErrorCode:7; /* Byte 0 Bits 0-6 */ | 210 | unsigned char ErrorCode:7; /* Byte 0 Bits 0-6 */ |
218 | boolean Valid:1; /* Byte 0 Bit 7 */ | 211 | bool Valid:1; /* Byte 0 Bit 7 */ |
219 | unsigned char SegmentNumber; /* Byte 1 */ | 212 | unsigned char SegmentNumber; /* Byte 1 */ |
220 | DAC960_SCSI_RequestSenseKey_T SenseKey:4; /* Byte 2 Bits 0-3 */ | 213 | DAC960_SCSI_RequestSenseKey_T SenseKey:4; /* Byte 2 Bits 0-3 */ |
221 | unsigned char :1; /* Byte 2 Bit 4 */ | 214 | unsigned char :1; /* Byte 2 Bit 4 */ |
222 | boolean ILI:1; /* Byte 2 Bit 5 */ | 215 | bool ILI:1; /* Byte 2 Bit 5 */ |
223 | boolean EOM:1; /* Byte 2 Bit 6 */ | 216 | bool EOM:1; /* Byte 2 Bit 6 */ |
224 | boolean Filemark:1; /* Byte 2 Bit 7 */ | 217 | bool Filemark:1; /* Byte 2 Bit 7 */ |
225 | unsigned char Information[4]; /* Bytes 3-6 */ | 218 | unsigned char Information[4]; /* Bytes 3-6 */ |
226 | unsigned char AdditionalSenseLength; /* Byte 7 */ | 219 | unsigned char AdditionalSenseLength; /* Byte 7 */ |
227 | unsigned char CommandSpecificInformation[4]; /* Bytes 8-11 */ | 220 | unsigned char CommandSpecificInformation[4]; /* Bytes 8-11 */ |
@@ -381,8 +374,8 @@ typedef struct DAC960_V1_Enquiry | |||
381 | unsigned int LogicalDriveSizes[32]; /* Bytes 4-131 */ | 374 | unsigned int LogicalDriveSizes[32]; /* Bytes 4-131 */ |
382 | unsigned short FlashAge; /* Bytes 132-133 */ | 375 | unsigned short FlashAge; /* Bytes 132-133 */ |
383 | struct { | 376 | struct { |
384 | boolean DeferredWriteError:1; /* Byte 134 Bit 0 */ | 377 | bool DeferredWriteError:1; /* Byte 134 Bit 0 */ |
385 | boolean BatteryLow:1; /* Byte 134 Bit 1 */ | 378 | bool BatteryLow:1; /* Byte 134 Bit 1 */ |
386 | unsigned char :6; /* Byte 134 Bits 2-7 */ | 379 | unsigned char :6; /* Byte 134 Bits 2-7 */ |
387 | } StatusFlags; | 380 | } StatusFlags; |
388 | unsigned char :8; /* Byte 135 */ | 381 | unsigned char :8; /* Byte 135 */ |
@@ -410,7 +403,7 @@ typedef struct DAC960_V1_Enquiry | |||
410 | unsigned char RebuildCount; /* Byte 150 */ | 403 | unsigned char RebuildCount; /* Byte 150 */ |
411 | struct { | 404 | struct { |
412 | unsigned char :3; /* Byte 151 Bits 0-2 */ | 405 | unsigned char :3; /* Byte 151 Bits 0-2 */ |
413 | boolean BatteryBackupUnitPresent:1; /* Byte 151 Bit 3 */ | 406 | bool BatteryBackupUnitPresent:1; /* Byte 151 Bit 3 */ |
414 | unsigned char :3; /* Byte 151 Bits 4-6 */ | 407 | unsigned char :3; /* Byte 151 Bits 4-6 */ |
415 | unsigned char :1; /* Byte 151 Bit 7 */ | 408 | unsigned char :1; /* Byte 151 Bit 7 */ |
416 | } MiscFlags; | 409 | } MiscFlags; |
@@ -492,8 +485,8 @@ typedef struct DAC960_V1_Enquiry2 | |||
492 | DAC960_V1_ErrorCorrection_ECC = 0x2, | 485 | DAC960_V1_ErrorCorrection_ECC = 0x2, |
493 | DAC960_V1_ErrorCorrection_Last = 0x7 | 486 | DAC960_V1_ErrorCorrection_Last = 0x7 |
494 | } __attribute__ ((packed)) ErrorCorrection:3; /* Byte 40 Bits 3-5 */ | 487 | } __attribute__ ((packed)) ErrorCorrection:3; /* Byte 40 Bits 3-5 */ |
495 | boolean FastPageMode:1; /* Byte 40 Bit 6 */ | 488 | bool FastPageMode:1; /* Byte 40 Bit 6 */ |
496 | boolean LowPowerMemory:1; /* Byte 40 Bit 7 */ | 489 | bool LowPowerMemory:1; /* Byte 40 Bit 7 */ |
497 | unsigned char :8; /* Bytes 41 */ | 490 | unsigned char :8; /* Bytes 41 */ |
498 | } MemoryType; | 491 | } MemoryType; |
499 | unsigned short ClockSpeed; /* Bytes 42-43 */ | 492 | unsigned short ClockSpeed; /* Bytes 42-43 */ |
@@ -538,7 +531,7 @@ typedef struct DAC960_V1_Enquiry2 | |||
538 | DAC960_V1_Ultra = 0x1, | 531 | DAC960_V1_Ultra = 0x1, |
539 | DAC960_V1_Ultra2 = 0x2 | 532 | DAC960_V1_Ultra2 = 0x2 |
540 | } __attribute__ ((packed)) BusSpeed:2; /* Byte 106 Bits 2-3 */ | 533 | } __attribute__ ((packed)) BusSpeed:2; /* Byte 106 Bits 2-3 */ |
541 | boolean Differential:1; /* Byte 106 Bit 4 */ | 534 | bool Differential:1; /* Byte 106 Bit 4 */ |
542 | unsigned char :3; /* Byte 106 Bits 5-7 */ | 535 | unsigned char :3; /* Byte 106 Bits 5-7 */ |
543 | } SCSICapability; | 536 | } SCSICapability; |
544 | unsigned char :8; /* Byte 107 */ | 537 | unsigned char :8; /* Byte 107 */ |
@@ -554,10 +547,10 @@ typedef struct DAC960_V1_Enquiry2 | |||
554 | } __attribute__ ((packed)) FaultManagementType; /* Byte 114 */ | 547 | } __attribute__ ((packed)) FaultManagementType; /* Byte 114 */ |
555 | unsigned char :8; /* Byte 115 */ | 548 | unsigned char :8; /* Byte 115 */ |
556 | struct { | 549 | struct { |
557 | boolean Clustering:1; /* Byte 116 Bit 0 */ | 550 | bool Clustering:1; /* Byte 116 Bit 0 */ |
558 | boolean MylexOnlineRAIDExpansion:1; /* Byte 116 Bit 1 */ | 551 | bool MylexOnlineRAIDExpansion:1; /* Byte 116 Bit 1 */ |
559 | boolean ReadAhead:1; /* Byte 116 Bit 2 */ | 552 | bool ReadAhead:1; /* Byte 116 Bit 2 */ |
560 | boolean BackgroundInitialization:1; /* Byte 116 Bit 3 */ | 553 | bool BackgroundInitialization:1; /* Byte 116 Bit 3 */ |
561 | unsigned int :28; /* Bytes 116-119 */ | 554 | unsigned int :28; /* Bytes 116-119 */ |
562 | } FirmwareFeatures; | 555 | } FirmwareFeatures; |
563 | unsigned int :32; /* Bytes 120-123 */ | 556 | unsigned int :32; /* Bytes 120-123 */ |
@@ -589,7 +582,7 @@ typedef struct DAC960_V1_LogicalDriveInformation | |||
589 | unsigned int LogicalDriveSize; /* Bytes 0-3 */ | 582 | unsigned int LogicalDriveSize; /* Bytes 0-3 */ |
590 | DAC960_V1_LogicalDriveState_T LogicalDriveState; /* Byte 4 */ | 583 | DAC960_V1_LogicalDriveState_T LogicalDriveState; /* Byte 4 */ |
591 | unsigned char RAIDLevel:7; /* Byte 5 Bits 0-6 */ | 584 | unsigned char RAIDLevel:7; /* Byte 5 Bits 0-6 */ |
592 | boolean WriteBack:1; /* Byte 5 Bit 7 */ | 585 | bool WriteBack:1; /* Byte 5 Bit 7 */ |
593 | unsigned short :16; /* Bytes 6-7 */ | 586 | unsigned short :16; /* Bytes 6-7 */ |
594 | } | 587 | } |
595 | DAC960_V1_LogicalDriveInformation_T; | 588 | DAC960_V1_LogicalDriveInformation_T; |
@@ -630,13 +623,13 @@ typedef struct DAC960_V1_EventLogEntry | |||
630 | unsigned char :2; /* Byte 3 Bits 6-7 */ | 623 | unsigned char :2; /* Byte 3 Bits 6-7 */ |
631 | unsigned short SequenceNumber; /* Bytes 4-5 */ | 624 | unsigned short SequenceNumber; /* Bytes 4-5 */ |
632 | unsigned char ErrorCode:7; /* Byte 6 Bits 0-6 */ | 625 | unsigned char ErrorCode:7; /* Byte 6 Bits 0-6 */ |
633 | boolean Valid:1; /* Byte 6 Bit 7 */ | 626 | bool Valid:1; /* Byte 6 Bit 7 */ |
634 | unsigned char SegmentNumber; /* Byte 7 */ | 627 | unsigned char SegmentNumber; /* Byte 7 */ |
635 | DAC960_SCSI_RequestSenseKey_T SenseKey:4; /* Byte 8 Bits 0-3 */ | 628 | DAC960_SCSI_RequestSenseKey_T SenseKey:4; /* Byte 8 Bits 0-3 */ |
636 | unsigned char :1; /* Byte 8 Bit 4 */ | 629 | unsigned char :1; /* Byte 8 Bit 4 */ |
637 | boolean ILI:1; /* Byte 8 Bit 5 */ | 630 | bool ILI:1; /* Byte 8 Bit 5 */ |
638 | boolean EOM:1; /* Byte 8 Bit 6 */ | 631 | bool EOM:1; /* Byte 8 Bit 6 */ |
639 | boolean Filemark:1; /* Byte 8 Bit 7 */ | 632 | bool Filemark:1; /* Byte 8 Bit 7 */ |
640 | unsigned char Information[4]; /* Bytes 9-12 */ | 633 | unsigned char Information[4]; /* Bytes 9-12 */ |
641 | unsigned char AdditionalSenseLength; /* Byte 13 */ | 634 | unsigned char AdditionalSenseLength; /* Byte 13 */ |
642 | unsigned char CommandSpecificInformation[4]; /* Bytes 14-17 */ | 635 | unsigned char CommandSpecificInformation[4]; /* Bytes 14-17 */ |
@@ -670,7 +663,7 @@ DAC960_V1_PhysicalDeviceState_T; | |||
670 | 663 | ||
671 | typedef struct DAC960_V1_DeviceState | 664 | typedef struct DAC960_V1_DeviceState |
672 | { | 665 | { |
673 | boolean Present:1; /* Byte 0 Bit 0 */ | 666 | bool Present:1; /* Byte 0 Bit 0 */ |
674 | unsigned char :7; /* Byte 0 Bits 1-7 */ | 667 | unsigned char :7; /* Byte 0 Bits 1-7 */ |
675 | enum { | 668 | enum { |
676 | DAC960_V1_OtherType = 0x0, | 669 | DAC960_V1_OtherType = 0x0, |
@@ -678,12 +671,12 @@ typedef struct DAC960_V1_DeviceState | |||
678 | DAC960_V1_SequentialType = 0x2, | 671 | DAC960_V1_SequentialType = 0x2, |
679 | DAC960_V1_CDROM_or_WORM_Type = 0x3 | 672 | DAC960_V1_CDROM_or_WORM_Type = 0x3 |
680 | } __attribute__ ((packed)) DeviceType:2; /* Byte 1 Bits 0-1 */ | 673 | } __attribute__ ((packed)) DeviceType:2; /* Byte 1 Bits 0-1 */ |
681 | boolean :1; /* Byte 1 Bit 2 */ | 674 | bool :1; /* Byte 1 Bit 2 */ |
682 | boolean Fast20:1; /* Byte 1 Bit 3 */ | 675 | bool Fast20:1; /* Byte 1 Bit 3 */ |
683 | boolean Sync:1; /* Byte 1 Bit 4 */ | 676 | bool Sync:1; /* Byte 1 Bit 4 */ |
684 | boolean Fast:1; /* Byte 1 Bit 5 */ | 677 | bool Fast:1; /* Byte 1 Bit 5 */ |
685 | boolean Wide:1; /* Byte 1 Bit 6 */ | 678 | bool Wide:1; /* Byte 1 Bit 6 */ |
686 | boolean TaggedQueuingSupported:1; /* Byte 1 Bit 7 */ | 679 | bool TaggedQueuingSupported:1; /* Byte 1 Bit 7 */ |
687 | DAC960_V1_PhysicalDeviceState_T DeviceState; /* Byte 2 */ | 680 | DAC960_V1_PhysicalDeviceState_T DeviceState; /* Byte 2 */ |
688 | unsigned char :8; /* Byte 3 */ | 681 | unsigned char :8; /* Byte 3 */ |
689 | unsigned char SynchronousMultiplier; /* Byte 4 */ | 682 | unsigned char SynchronousMultiplier; /* Byte 4 */ |
@@ -765,15 +758,15 @@ DAC960_V1_ErrorTable_T; | |||
765 | typedef struct DAC960_V1_Config2 | 758 | typedef struct DAC960_V1_Config2 |
766 | { | 759 | { |
767 | unsigned char :1; /* Byte 0 Bit 0 */ | 760 | unsigned char :1; /* Byte 0 Bit 0 */ |
768 | boolean ActiveNegationEnabled:1; /* Byte 0 Bit 1 */ | 761 | bool ActiveNegationEnabled:1; /* Byte 0 Bit 1 */ |
769 | unsigned char :5; /* Byte 0 Bits 2-6 */ | 762 | unsigned char :5; /* Byte 0 Bits 2-6 */ |
770 | boolean NoRescanIfResetReceivedDuringScan:1; /* Byte 0 Bit 7 */ | 763 | bool NoRescanIfResetReceivedDuringScan:1; /* Byte 0 Bit 7 */ |
771 | boolean StorageWorksSupportEnabled:1; /* Byte 1 Bit 0 */ | 764 | bool StorageWorksSupportEnabled:1; /* Byte 1 Bit 0 */ |
772 | boolean HewlettPackardSupportEnabled:1; /* Byte 1 Bit 1 */ | 765 | bool HewlettPackardSupportEnabled:1; /* Byte 1 Bit 1 */ |
773 | boolean NoDisconnectOnFirstCommand:1; /* Byte 1 Bit 2 */ | 766 | bool NoDisconnectOnFirstCommand:1; /* Byte 1 Bit 2 */ |
774 | unsigned char :2; /* Byte 1 Bits 3-4 */ | 767 | unsigned char :2; /* Byte 1 Bits 3-4 */ |
775 | boolean AEMI_ARM:1; /* Byte 1 Bit 5 */ | 768 | bool AEMI_ARM:1; /* Byte 1 Bit 5 */ |
776 | boolean AEMI_OFM:1; /* Byte 1 Bit 6 */ | 769 | bool AEMI_OFM:1; /* Byte 1 Bit 6 */ |
777 | unsigned char :1; /* Byte 1 Bit 7 */ | 770 | unsigned char :1; /* Byte 1 Bit 7 */ |
778 | enum { | 771 | enum { |
779 | DAC960_V1_OEMID_Mylex = 0x00, | 772 | DAC960_V1_OEMID_Mylex = 0x00, |
@@ -787,13 +780,13 @@ typedef struct DAC960_V1_Config2 | |||
787 | unsigned char PhysicalSector; /* Byte 4 */ | 780 | unsigned char PhysicalSector; /* Byte 4 */ |
788 | unsigned char LogicalSector; /* Byte 5 */ | 781 | unsigned char LogicalSector; /* Byte 5 */ |
789 | unsigned char BlockFactor; /* Byte 6 */ | 782 | unsigned char BlockFactor; /* Byte 6 */ |
790 | boolean ReadAheadEnabled:1; /* Byte 7 Bit 0 */ | 783 | bool ReadAheadEnabled:1; /* Byte 7 Bit 0 */ |
791 | boolean LowBIOSDelay:1; /* Byte 7 Bit 1 */ | 784 | bool LowBIOSDelay:1; /* Byte 7 Bit 1 */ |
792 | unsigned char :2; /* Byte 7 Bits 2-3 */ | 785 | unsigned char :2; /* Byte 7 Bits 2-3 */ |
793 | boolean ReassignRestrictedToOneSector:1; /* Byte 7 Bit 4 */ | 786 | bool ReassignRestrictedToOneSector:1; /* Byte 7 Bit 4 */ |
794 | unsigned char :1; /* Byte 7 Bit 5 */ | 787 | unsigned char :1; /* Byte 7 Bit 5 */ |
795 | boolean ForceUnitAccessDuringWriteRecovery:1; /* Byte 7 Bit 6 */ | 788 | bool ForceUnitAccessDuringWriteRecovery:1; /* Byte 7 Bit 6 */ |
796 | boolean EnableLeftSymmetricRAID5Algorithm:1; /* Byte 7 Bit 7 */ | 789 | bool EnableLeftSymmetricRAID5Algorithm:1; /* Byte 7 Bit 7 */ |
797 | unsigned char DefaultRebuildRate; /* Byte 8 */ | 790 | unsigned char DefaultRebuildRate; /* Byte 8 */ |
798 | unsigned char :8; /* Byte 9 */ | 791 | unsigned char :8; /* Byte 9 */ |
799 | unsigned char BlocksPerCacheLine; /* Byte 10 */ | 792 | unsigned char BlocksPerCacheLine; /* Byte 10 */ |
@@ -805,10 +798,10 @@ typedef struct DAC960_V1_Config2 | |||
805 | DAC960_V1_Sync_5MHz = 0x2, | 798 | DAC960_V1_Sync_5MHz = 0x2, |
806 | DAC960_V1_Sync_10or20MHz = 0x3 /* Byte 11 Bits 0-1 */ | 799 | DAC960_V1_Sync_10or20MHz = 0x3 /* Byte 11 Bits 0-1 */ |
807 | } __attribute__ ((packed)) Speed:2; | 800 | } __attribute__ ((packed)) Speed:2; |
808 | boolean Force8Bit:1; /* Byte 11 Bit 2 */ | 801 | bool Force8Bit:1; /* Byte 11 Bit 2 */ |
809 | boolean DisableFast20:1; /* Byte 11 Bit 3 */ | 802 | bool DisableFast20:1; /* Byte 11 Bit 3 */ |
810 | unsigned char :3; /* Byte 11 Bits 4-6 */ | 803 | unsigned char :3; /* Byte 11 Bits 4-6 */ |
811 | boolean EnableTaggedQueuing:1; /* Byte 11 Bit 7 */ | 804 | bool EnableTaggedQueuing:1; /* Byte 11 Bit 7 */ |
812 | } __attribute__ ((packed)) ChannelParameters[6]; /* Bytes 12-17 */ | 805 | } __attribute__ ((packed)) ChannelParameters[6]; /* Bytes 12-17 */ |
813 | unsigned char SCSIInitiatorID; /* Byte 18 */ | 806 | unsigned char SCSIInitiatorID; /* Byte 18 */ |
814 | unsigned char :8; /* Byte 19 */ | 807 | unsigned char :8; /* Byte 19 */ |
@@ -819,8 +812,8 @@ typedef struct DAC960_V1_Config2 | |||
819 | unsigned char SimultaneousDeviceSpinUpCount; /* Byte 21 */ | 812 | unsigned char SimultaneousDeviceSpinUpCount; /* Byte 21 */ |
820 | unsigned char SecondsDelayBetweenSpinUps; /* Byte 22 */ | 813 | unsigned char SecondsDelayBetweenSpinUps; /* Byte 22 */ |
821 | unsigned char Reserved1[29]; /* Bytes 23-51 */ | 814 | unsigned char Reserved1[29]; /* Bytes 23-51 */ |
822 | boolean BIOSDisabled:1; /* Byte 52 Bit 0 */ | 815 | bool BIOSDisabled:1; /* Byte 52 Bit 0 */ |
823 | boolean CDROMBootEnabled:1; /* Byte 52 Bit 1 */ | 816 | bool CDROMBootEnabled:1; /* Byte 52 Bit 1 */ |
824 | unsigned char :3; /* Byte 52 Bits 2-4 */ | 817 | unsigned char :3; /* Byte 52 Bits 2-4 */ |
825 | enum { | 818 | enum { |
826 | DAC960_V1_Geometry_128_32 = 0x0, | 819 | DAC960_V1_Geometry_128_32 = 0x0, |
@@ -849,7 +842,7 @@ typedef struct DAC960_V1_DCDB | |||
849 | DAC960_V1_DCDB_DataTransferSystemToDevice = 2, | 842 | DAC960_V1_DCDB_DataTransferSystemToDevice = 2, |
850 | DAC960_V1_DCDB_IllegalDataTransfer = 3 | 843 | DAC960_V1_DCDB_IllegalDataTransfer = 3 |
851 | } __attribute__ ((packed)) Direction:2; /* Byte 1 Bits 0-1 */ | 844 | } __attribute__ ((packed)) Direction:2; /* Byte 1 Bits 0-1 */ |
852 | boolean EarlyStatus:1; /* Byte 1 Bit 2 */ | 845 | bool EarlyStatus:1; /* Byte 1 Bit 2 */ |
853 | unsigned char :1; /* Byte 1 Bit 3 */ | 846 | unsigned char :1; /* Byte 1 Bit 3 */ |
854 | enum { | 847 | enum { |
855 | DAC960_V1_DCDB_Timeout_24_hours = 0, | 848 | DAC960_V1_DCDB_Timeout_24_hours = 0, |
@@ -857,8 +850,8 @@ typedef struct DAC960_V1_DCDB | |||
857 | DAC960_V1_DCDB_Timeout_60_seconds = 2, | 850 | DAC960_V1_DCDB_Timeout_60_seconds = 2, |
858 | DAC960_V1_DCDB_Timeout_10_minutes = 3 | 851 | DAC960_V1_DCDB_Timeout_10_minutes = 3 |
859 | } __attribute__ ((packed)) Timeout:2; /* Byte 1 Bits 4-5 */ | 852 | } __attribute__ ((packed)) Timeout:2; /* Byte 1 Bits 4-5 */ |
860 | boolean NoAutomaticRequestSense:1; /* Byte 1 Bit 6 */ | 853 | bool NoAutomaticRequestSense:1; /* Byte 1 Bit 6 */ |
861 | boolean DisconnectPermitted:1; /* Byte 1 Bit 7 */ | 854 | bool DisconnectPermitted:1; /* Byte 1 Bit 7 */ |
862 | unsigned short TransferLength; /* Bytes 2-3 */ | 855 | unsigned short TransferLength; /* Bytes 2-3 */ |
863 | DAC960_BusAddress32_T BusAddress; /* Bytes 4-7 */ | 856 | DAC960_BusAddress32_T BusAddress; /* Bytes 4-7 */ |
864 | unsigned char CDBLength:4; /* Byte 8 Bits 0-3 */ | 857 | unsigned char CDBLength:4; /* Byte 8 Bits 0-3 */ |
@@ -920,7 +913,7 @@ typedef union DAC960_V1_CommandMailbox | |||
920 | DAC960_V1_CommandIdentifier_T CommandIdentifier; /* Byte 1 */ | 913 | DAC960_V1_CommandIdentifier_T CommandIdentifier; /* Byte 1 */ |
921 | unsigned char Dummy1[5]; /* Bytes 2-6 */ | 914 | unsigned char Dummy1[5]; /* Bytes 2-6 */ |
922 | unsigned char LogicalDriveNumber:6; /* Byte 7 Bits 0-6 */ | 915 | unsigned char LogicalDriveNumber:6; /* Byte 7 Bits 0-6 */ |
923 | boolean AutoRestore:1; /* Byte 7 Bit 7 */ | 916 | bool AutoRestore:1; /* Byte 7 Bit 7 */ |
924 | unsigned char Dummy2[8]; /* Bytes 8-15 */ | 917 | unsigned char Dummy2[8]; /* Bytes 8-15 */ |
925 | } __attribute__ ((packed)) Type3C; | 918 | } __attribute__ ((packed)) Type3C; |
926 | struct { | 919 | struct { |
@@ -1070,9 +1063,9 @@ typedef struct DAC960_V2_MemoryType | |||
1070 | DAC960_V2_MemoryType_SDRAM = 0x04, | 1063 | DAC960_V2_MemoryType_SDRAM = 0x04, |
1071 | DAC960_V2_MemoryType_Last = 0x1F | 1064 | DAC960_V2_MemoryType_Last = 0x1F |
1072 | } __attribute__ ((packed)) MemoryType:5; /* Byte 0 Bits 0-4 */ | 1065 | } __attribute__ ((packed)) MemoryType:5; /* Byte 0 Bits 0-4 */ |
1073 | boolean :1; /* Byte 0 Bit 5 */ | 1066 | bool :1; /* Byte 0 Bit 5 */ |
1074 | boolean MemoryParity:1; /* Byte 0 Bit 6 */ | 1067 | bool MemoryParity:1; /* Byte 0 Bit 6 */ |
1075 | boolean MemoryECC:1; /* Byte 0 Bit 7 */ | 1068 | bool MemoryECC:1; /* Byte 0 Bit 7 */ |
1076 | } | 1069 | } |
1077 | DAC960_V2_MemoryType_T; | 1070 | DAC960_V2_MemoryType_T; |
1078 | 1071 | ||
@@ -1187,13 +1180,13 @@ typedef struct DAC960_V2_ControllerInfo | |||
1187 | unsigned char OEM_Code; /* Byte 131 */ | 1180 | unsigned char OEM_Code; /* Byte 131 */ |
1188 | unsigned char VendorName[16]; /* Bytes 132-147 */ | 1181 | unsigned char VendorName[16]; /* Bytes 132-147 */ |
1189 | /* Other Physical/Controller/Operation Information */ | 1182 | /* Other Physical/Controller/Operation Information */ |
1190 | boolean BBU_Present:1; /* Byte 148 Bit 0 */ | 1183 | bool BBU_Present:1; /* Byte 148 Bit 0 */ |
1191 | boolean ActiveActiveClusteringMode:1; /* Byte 148 Bit 1 */ | 1184 | bool ActiveActiveClusteringMode:1; /* Byte 148 Bit 1 */ |
1192 | unsigned char :6; /* Byte 148 Bits 2-7 */ | 1185 | unsigned char :6; /* Byte 148 Bits 2-7 */ |
1193 | unsigned char :8; /* Byte 149 */ | 1186 | unsigned char :8; /* Byte 149 */ |
1194 | unsigned short :16; /* Bytes 150-151 */ | 1187 | unsigned short :16; /* Bytes 150-151 */ |
1195 | /* Physical Device Scan Information */ | 1188 | /* Physical Device Scan Information */ |
1196 | boolean PhysicalScanActive:1; /* Byte 152 Bit 0 */ | 1189 | bool PhysicalScanActive:1; /* Byte 152 Bit 0 */ |
1197 | unsigned char :7; /* Byte 152 Bits 1-7 */ | 1190 | unsigned char :7; /* Byte 152 Bits 1-7 */ |
1198 | unsigned char PhysicalDeviceChannelNumber; /* Byte 153 */ | 1191 | unsigned char PhysicalDeviceChannelNumber; /* Byte 153 */ |
1199 | unsigned char PhysicalDeviceTargetID; /* Byte 154 */ | 1192 | unsigned char PhysicalDeviceTargetID; /* Byte 154 */ |
@@ -1305,8 +1298,8 @@ typedef struct DAC960_V2_ControllerInfo | |||
1305 | unsigned int FreeIOP; /* Bytes 468-471 */ | 1298 | unsigned int FreeIOP; /* Bytes 468-471 */ |
1306 | unsigned short MaximumCombLengthInBlocks; /* Bytes 472-473 */ | 1299 | unsigned short MaximumCombLengthInBlocks; /* Bytes 472-473 */ |
1307 | unsigned short NumberOfConfigurationGroups; /* Bytes 474-475 */ | 1300 | unsigned short NumberOfConfigurationGroups; /* Bytes 474-475 */ |
1308 | boolean InstallationAbortStatus:1; /* Byte 476 Bit 0 */ | 1301 | bool InstallationAbortStatus:1; /* Byte 476 Bit 0 */ |
1309 | boolean MaintenanceModeStatus:1; /* Byte 476 Bit 1 */ | 1302 | bool MaintenanceModeStatus:1; /* Byte 476 Bit 1 */ |
1310 | unsigned int :24; /* Bytes 476-479 */ | 1303 | unsigned int :24; /* Bytes 476-479 */ |
1311 | unsigned char Reserved10[32]; /* Bytes 480-511 */ | 1304 | unsigned char Reserved10[32]; /* Bytes 480-511 */ |
1312 | unsigned char Reserved11[512]; /* Bytes 512-1023 */ | 1305 | unsigned char Reserved11[512]; /* Bytes 512-1023 */ |
@@ -1357,33 +1350,33 @@ typedef struct DAC960_V2_LogicalDeviceInfo | |||
1357 | DAC960_V2_IntelligentWriteCacheEnabled = 0x3, | 1350 | DAC960_V2_IntelligentWriteCacheEnabled = 0x3, |
1358 | DAC960_V2_WriteCache_Last = 0x7 | 1351 | DAC960_V2_WriteCache_Last = 0x7 |
1359 | } __attribute__ ((packed)) WriteCache:3; /* Byte 8 Bits 3-5 */ | 1352 | } __attribute__ ((packed)) WriteCache:3; /* Byte 8 Bits 3-5 */ |
1360 | boolean :1; /* Byte 8 Bit 6 */ | 1353 | bool :1; /* Byte 8 Bit 6 */ |
1361 | boolean LogicalDeviceInitialized:1; /* Byte 8 Bit 7 */ | 1354 | bool LogicalDeviceInitialized:1; /* Byte 8 Bit 7 */ |
1362 | } LogicalDeviceControl; /* Byte 8 */ | 1355 | } LogicalDeviceControl; /* Byte 8 */ |
1363 | /* Logical Device Operations Status */ | 1356 | /* Logical Device Operations Status */ |
1364 | boolean ConsistencyCheckInProgress:1; /* Byte 9 Bit 0 */ | 1357 | bool ConsistencyCheckInProgress:1; /* Byte 9 Bit 0 */ |
1365 | boolean RebuildInProgress:1; /* Byte 9 Bit 1 */ | 1358 | bool RebuildInProgress:1; /* Byte 9 Bit 1 */ |
1366 | boolean BackgroundInitializationInProgress:1; /* Byte 9 Bit 2 */ | 1359 | bool BackgroundInitializationInProgress:1; /* Byte 9 Bit 2 */ |
1367 | boolean ForegroundInitializationInProgress:1; /* Byte 9 Bit 3 */ | 1360 | bool ForegroundInitializationInProgress:1; /* Byte 9 Bit 3 */ |
1368 | boolean DataMigrationInProgress:1; /* Byte 9 Bit 4 */ | 1361 | bool DataMigrationInProgress:1; /* Byte 9 Bit 4 */ |
1369 | boolean PatrolOperationInProgress:1; /* Byte 9 Bit 5 */ | 1362 | bool PatrolOperationInProgress:1; /* Byte 9 Bit 5 */ |
1370 | unsigned char :2; /* Byte 9 Bits 6-7 */ | 1363 | unsigned char :2; /* Byte 9 Bits 6-7 */ |
1371 | unsigned char RAID5WriteUpdate; /* Byte 10 */ | 1364 | unsigned char RAID5WriteUpdate; /* Byte 10 */ |
1372 | unsigned char RAID5Algorithm; /* Byte 11 */ | 1365 | unsigned char RAID5Algorithm; /* Byte 11 */ |
1373 | unsigned short LogicalDeviceNumber; /* Bytes 12-13 */ | 1366 | unsigned short LogicalDeviceNumber; /* Bytes 12-13 */ |
1374 | /* BIOS Info */ | 1367 | /* BIOS Info */ |
1375 | boolean BIOSDisabled:1; /* Byte 14 Bit 0 */ | 1368 | bool BIOSDisabled:1; /* Byte 14 Bit 0 */ |
1376 | boolean CDROMBootEnabled:1; /* Byte 14 Bit 1 */ | 1369 | bool CDROMBootEnabled:1; /* Byte 14 Bit 1 */ |
1377 | boolean DriveCoercionEnabled:1; /* Byte 14 Bit 2 */ | 1370 | bool DriveCoercionEnabled:1; /* Byte 14 Bit 2 */ |
1378 | boolean WriteSameDisabled:1; /* Byte 14 Bit 3 */ | 1371 | bool WriteSameDisabled:1; /* Byte 14 Bit 3 */ |
1379 | boolean HBA_ModeEnabled:1; /* Byte 14 Bit 4 */ | 1372 | bool HBA_ModeEnabled:1; /* Byte 14 Bit 4 */ |
1380 | enum { | 1373 | enum { |
1381 | DAC960_V2_Geometry_128_32 = 0x0, | 1374 | DAC960_V2_Geometry_128_32 = 0x0, |
1382 | DAC960_V2_Geometry_255_63 = 0x1, | 1375 | DAC960_V2_Geometry_255_63 = 0x1, |
1383 | DAC960_V2_Geometry_Reserved1 = 0x2, | 1376 | DAC960_V2_Geometry_Reserved1 = 0x2, |
1384 | DAC960_V2_Geometry_Reserved2 = 0x3 | 1377 | DAC960_V2_Geometry_Reserved2 = 0x3 |
1385 | } __attribute__ ((packed)) DriveGeometry:2; /* Byte 14 Bits 5-6 */ | 1378 | } __attribute__ ((packed)) DriveGeometry:2; /* Byte 14 Bits 5-6 */ |
1386 | boolean SuperReadAheadEnabled:1; /* Byte 14 Bit 7 */ | 1379 | bool SuperReadAheadEnabled:1; /* Byte 14 Bit 7 */ |
1387 | unsigned char :8; /* Byte 15 */ | 1380 | unsigned char :8; /* Byte 15 */ |
1388 | /* Error Counters */ | 1381 | /* Error Counters */ |
1389 | unsigned short SoftErrors; /* Bytes 16-17 */ | 1382 | unsigned short SoftErrors; /* Bytes 16-17 */ |
@@ -1446,13 +1439,13 @@ typedef struct DAC960_V2_PhysicalDeviceInfo | |||
1446 | unsigned char TargetID; /* Byte 2 */ | 1439 | unsigned char TargetID; /* Byte 2 */ |
1447 | unsigned char LogicalUnit; /* Byte 3 */ | 1440 | unsigned char LogicalUnit; /* Byte 3 */ |
1448 | /* Configuration Status Bits */ | 1441 | /* Configuration Status Bits */ |
1449 | boolean PhysicalDeviceFaultTolerant:1; /* Byte 4 Bit 0 */ | 1442 | bool PhysicalDeviceFaultTolerant:1; /* Byte 4 Bit 0 */ |
1450 | boolean PhysicalDeviceConnected:1; /* Byte 4 Bit 1 */ | 1443 | bool PhysicalDeviceConnected:1; /* Byte 4 Bit 1 */ |
1451 | boolean PhysicalDeviceLocalToController:1; /* Byte 4 Bit 2 */ | 1444 | bool PhysicalDeviceLocalToController:1; /* Byte 4 Bit 2 */ |
1452 | unsigned char :5; /* Byte 4 Bits 3-7 */ | 1445 | unsigned char :5; /* Byte 4 Bits 3-7 */ |
1453 | /* Multiple Host/Controller Status Bits */ | 1446 | /* Multiple Host/Controller Status Bits */ |
1454 | boolean RemoteHostSystemDead:1; /* Byte 5 Bit 0 */ | 1447 | bool RemoteHostSystemDead:1; /* Byte 5 Bit 0 */ |
1455 | boolean RemoteControllerDead:1; /* Byte 5 Bit 1 */ | 1448 | bool RemoteControllerDead:1; /* Byte 5 Bit 1 */ |
1456 | unsigned char :6; /* Byte 5 Bits 2-7 */ | 1449 | unsigned char :6; /* Byte 5 Bits 2-7 */ |
1457 | DAC960_V2_PhysicalDeviceState_T PhysicalDeviceState; /* Byte 6 */ | 1450 | DAC960_V2_PhysicalDeviceState_T PhysicalDeviceState; /* Byte 6 */ |
1458 | unsigned char NegotiatedDataWidthBits; /* Byte 7 */ | 1451 | unsigned char NegotiatedDataWidthBits; /* Byte 7 */ |
@@ -1464,12 +1457,12 @@ typedef struct DAC960_V2_PhysicalDeviceInfo | |||
1464 | unsigned char NetworkAddress[16]; /* Bytes 16-31 */ | 1457 | unsigned char NetworkAddress[16]; /* Bytes 16-31 */ |
1465 | unsigned short MaximumTags; /* Bytes 32-33 */ | 1458 | unsigned short MaximumTags; /* Bytes 32-33 */ |
1466 | /* Physical Device Operations Status */ | 1459 | /* Physical Device Operations Status */ |
1467 | boolean ConsistencyCheckInProgress:1; /* Byte 34 Bit 0 */ | 1460 | bool ConsistencyCheckInProgress:1; /* Byte 34 Bit 0 */ |
1468 | boolean RebuildInProgress:1; /* Byte 34 Bit 1 */ | 1461 | bool RebuildInProgress:1; /* Byte 34 Bit 1 */ |
1469 | boolean MakingDataConsistentInProgress:1; /* Byte 34 Bit 2 */ | 1462 | bool MakingDataConsistentInProgress:1; /* Byte 34 Bit 2 */ |
1470 | boolean PhysicalDeviceInitializationInProgress:1; /* Byte 34 Bit 3 */ | 1463 | bool PhysicalDeviceInitializationInProgress:1; /* Byte 34 Bit 3 */ |
1471 | boolean DataMigrationInProgress:1; /* Byte 34 Bit 4 */ | 1464 | bool DataMigrationInProgress:1; /* Byte 34 Bit 4 */ |
1472 | boolean PatrolOperationInProgress:1; /* Byte 34 Bit 5 */ | 1465 | bool PatrolOperationInProgress:1; /* Byte 34 Bit 5 */ |
1473 | unsigned char :2; /* Byte 34 Bits 6-7 */ | 1466 | unsigned char :2; /* Byte 34 Bits 6-7 */ |
1474 | unsigned char LongOperationStatus; /* Byte 35 */ | 1467 | unsigned char LongOperationStatus; /* Byte 35 */ |
1475 | unsigned char ParityErrors; /* Byte 36 */ | 1468 | unsigned char ParityErrors; /* Byte 36 */ |
@@ -1555,14 +1548,14 @@ DAC960_V2_Event_T; | |||
1555 | 1548 | ||
1556 | typedef struct DAC960_V2_CommandControlBits | 1549 | typedef struct DAC960_V2_CommandControlBits |
1557 | { | 1550 | { |
1558 | boolean ForceUnitAccess:1; /* Byte 0 Bit 0 */ | 1551 | bool ForceUnitAccess:1; /* Byte 0 Bit 0 */ |
1559 | boolean DisablePageOut:1; /* Byte 0 Bit 1 */ | 1552 | bool DisablePageOut:1; /* Byte 0 Bit 1 */ |
1560 | boolean :1; /* Byte 0 Bit 2 */ | 1553 | bool :1; /* Byte 0 Bit 2 */ |
1561 | boolean AdditionalScatterGatherListMemory:1; /* Byte 0 Bit 3 */ | 1554 | bool AdditionalScatterGatherListMemory:1; /* Byte 0 Bit 3 */ |
1562 | boolean DataTransferControllerToHost:1; /* Byte 0 Bit 4 */ | 1555 | bool DataTransferControllerToHost:1; /* Byte 0 Bit 4 */ |
1563 | boolean :1; /* Byte 0 Bit 5 */ | 1556 | bool :1; /* Byte 0 Bit 5 */ |
1564 | boolean NoAutoRequestSense:1; /* Byte 0 Bit 6 */ | 1557 | bool NoAutoRequestSense:1; /* Byte 0 Bit 6 */ |
1565 | boolean DisconnectProhibited:1; /* Byte 0 Bit 7 */ | 1558 | bool DisconnectProhibited:1; /* Byte 0 Bit 7 */ |
1566 | } | 1559 | } |
1567 | DAC960_V2_CommandControlBits_T; | 1560 | DAC960_V2_CommandControlBits_T; |
1568 | 1561 | ||
@@ -1825,8 +1818,8 @@ typedef union DAC960_V2_CommandMailbox | |||
1825 | DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */ | 1818 | DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */ |
1826 | unsigned char RequestSenseSize; /* Byte 20 */ | 1819 | unsigned char RequestSenseSize; /* Byte 20 */ |
1827 | unsigned char IOCTL_Opcode; /* Byte 21 */ | 1820 | unsigned char IOCTL_Opcode; /* Byte 21 */ |
1828 | boolean RestoreConsistency:1; /* Byte 22 Bit 0 */ | 1821 | bool RestoreConsistency:1; /* Byte 22 Bit 0 */ |
1829 | boolean InitializedAreaOnly:1; /* Byte 22 Bit 1 */ | 1822 | bool InitializedAreaOnly:1; /* Byte 22 Bit 1 */ |
1830 | unsigned char :6; /* Byte 22 Bits 2-7 */ | 1823 | unsigned char :6; /* Byte 22 Bits 2-7 */ |
1831 | unsigned char Reserved[9]; /* Bytes 23-31 */ | 1824 | unsigned char Reserved[9]; /* Bytes 23-31 */ |
1832 | DAC960_V2_DataTransferMemoryAddress_T | 1825 | DAC960_V2_DataTransferMemoryAddress_T |
@@ -2190,7 +2183,7 @@ typedef union DAC960_V1_StatusMailbox | |||
2190 | struct { | 2183 | struct { |
2191 | DAC960_V1_CommandIdentifier_T CommandIdentifier; /* Byte 0 */ | 2184 | DAC960_V1_CommandIdentifier_T CommandIdentifier; /* Byte 0 */ |
2192 | unsigned char :7; /* Byte 1 Bits 0-6 */ | 2185 | unsigned char :7; /* Byte 1 Bits 0-6 */ |
2193 | boolean Valid:1; /* Byte 1 Bit 7 */ | 2186 | bool Valid:1; /* Byte 1 Bit 7 */ |
2194 | DAC960_V1_CommandStatus_T CommandStatus; /* Bytes 2-3 */ | 2187 | DAC960_V1_CommandStatus_T CommandStatus; /* Bytes 2-3 */ |
2195 | } Fields; | 2188 | } Fields; |
2196 | } | 2189 | } |
@@ -2322,12 +2315,12 @@ typedef struct DAC960_Controller | |||
2322 | unsigned long ShutdownMonitoringTimer; | 2315 | unsigned long ShutdownMonitoringTimer; |
2323 | unsigned long LastProgressReportTime; | 2316 | unsigned long LastProgressReportTime; |
2324 | unsigned long LastCurrentStatusTime; | 2317 | unsigned long LastCurrentStatusTime; |
2325 | boolean ControllerInitialized; | 2318 | bool ControllerInitialized; |
2326 | boolean MonitoringCommandDeferred; | 2319 | bool MonitoringCommandDeferred; |
2327 | boolean EphemeralProgressMessage; | 2320 | bool EphemeralProgressMessage; |
2328 | boolean DriveSpinUpMessageDisplayed; | 2321 | bool DriveSpinUpMessageDisplayed; |
2329 | boolean MonitoringAlertMode; | 2322 | bool MonitoringAlertMode; |
2330 | boolean SuppressEnclosureMessages; | 2323 | bool SuppressEnclosureMessages; |
2331 | struct timer_list MonitoringTimer; | 2324 | struct timer_list MonitoringTimer; |
2332 | struct gendisk *disks[DAC960_MaxLogicalDrives]; | 2325 | struct gendisk *disks[DAC960_MaxLogicalDrives]; |
2333 | struct pci_pool *ScatterGatherPool; | 2326 | struct pci_pool *ScatterGatherPool; |
@@ -2342,11 +2335,11 @@ typedef struct DAC960_Controller | |||
2342 | DAC960_Command_T InitialCommand; | 2335 | DAC960_Command_T InitialCommand; |
2343 | DAC960_Command_T *Commands[DAC960_MaxDriverQueueDepth]; | 2336 | DAC960_Command_T *Commands[DAC960_MaxDriverQueueDepth]; |
2344 | struct proc_dir_entry *ControllerProcEntry; | 2337 | struct proc_dir_entry *ControllerProcEntry; |
2345 | boolean LogicalDriveInitiallyAccessible[DAC960_MaxLogicalDrives]; | 2338 | bool LogicalDriveInitiallyAccessible[DAC960_MaxLogicalDrives]; |
2346 | void (*QueueCommand)(DAC960_Command_T *Command); | 2339 | void (*QueueCommand)(DAC960_Command_T *Command); |
2347 | boolean (*ReadControllerConfiguration)(struct DAC960_Controller *); | 2340 | bool (*ReadControllerConfiguration)(struct DAC960_Controller *); |
2348 | boolean (*ReadDeviceConfiguration)(struct DAC960_Controller *); | 2341 | bool (*ReadDeviceConfiguration)(struct DAC960_Controller *); |
2349 | boolean (*ReportDeviceConfiguration)(struct DAC960_Controller *); | 2342 | bool (*ReportDeviceConfiguration)(struct DAC960_Controller *); |
2350 | void (*QueueReadWriteCommand)(DAC960_Command_T *Command); | 2343 | void (*QueueReadWriteCommand)(DAC960_Command_T *Command); |
2351 | union { | 2344 | union { |
2352 | struct { | 2345 | struct { |
@@ -2359,21 +2352,21 @@ typedef struct DAC960_Controller | |||
2359 | unsigned short OldEventLogSequenceNumber; | 2352 | unsigned short OldEventLogSequenceNumber; |
2360 | unsigned short DeviceStateChannel; | 2353 | unsigned short DeviceStateChannel; |
2361 | unsigned short DeviceStateTargetID; | 2354 | unsigned short DeviceStateTargetID; |
2362 | boolean DualModeMemoryMailboxInterface; | 2355 | bool DualModeMemoryMailboxInterface; |
2363 | boolean BackgroundInitializationStatusSupported; | 2356 | bool BackgroundInitializationStatusSupported; |
2364 | boolean SAFTE_EnclosureManagementEnabled; | 2357 | bool SAFTE_EnclosureManagementEnabled; |
2365 | boolean NeedLogicalDriveInformation; | 2358 | bool NeedLogicalDriveInformation; |
2366 | boolean NeedErrorTableInformation; | 2359 | bool NeedErrorTableInformation; |
2367 | boolean NeedDeviceStateInformation; | 2360 | bool NeedDeviceStateInformation; |
2368 | boolean NeedDeviceInquiryInformation; | 2361 | bool NeedDeviceInquiryInformation; |
2369 | boolean NeedDeviceSerialNumberInformation; | 2362 | bool NeedDeviceSerialNumberInformation; |
2370 | boolean NeedRebuildProgress; | 2363 | bool NeedRebuildProgress; |
2371 | boolean NeedConsistencyCheckProgress; | 2364 | bool NeedConsistencyCheckProgress; |
2372 | boolean NeedBackgroundInitializationStatus; | 2365 | bool NeedBackgroundInitializationStatus; |
2373 | boolean StartDeviceStateScan; | 2366 | bool StartDeviceStateScan; |
2374 | boolean RebuildProgressFirst; | 2367 | bool RebuildProgressFirst; |
2375 | boolean RebuildFlagPending; | 2368 | bool RebuildFlagPending; |
2376 | boolean RebuildStatusPending; | 2369 | bool RebuildStatusPending; |
2377 | 2370 | ||
2378 | dma_addr_t FirstCommandMailboxDMA; | 2371 | dma_addr_t FirstCommandMailboxDMA; |
2379 | DAC960_V1_CommandMailbox_T *FirstCommandMailbox; | 2372 | DAC960_V1_CommandMailbox_T *FirstCommandMailbox; |
@@ -2432,17 +2425,17 @@ typedef struct DAC960_Controller | |||
2432 | dma_addr_t NewInquiryUnitSerialNumberDMA; | 2425 | dma_addr_t NewInquiryUnitSerialNumberDMA; |
2433 | 2426 | ||
2434 | int DeviceResetCount[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets]; | 2427 | int DeviceResetCount[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets]; |
2435 | boolean DirectCommandActive[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets]; | 2428 | bool DirectCommandActive[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets]; |
2436 | } V1; | 2429 | } V1; |
2437 | struct { | 2430 | struct { |
2438 | unsigned int StatusChangeCounter; | 2431 | unsigned int StatusChangeCounter; |
2439 | unsigned int NextEventSequenceNumber; | 2432 | unsigned int NextEventSequenceNumber; |
2440 | unsigned int PhysicalDeviceIndex; | 2433 | unsigned int PhysicalDeviceIndex; |
2441 | boolean NeedLogicalDeviceInformation; | 2434 | bool NeedLogicalDeviceInformation; |
2442 | boolean NeedPhysicalDeviceInformation; | 2435 | bool NeedPhysicalDeviceInformation; |
2443 | boolean NeedDeviceSerialNumberInformation; | 2436 | bool NeedDeviceSerialNumberInformation; |
2444 | boolean StartLogicalDeviceInformationScan; | 2437 | bool StartLogicalDeviceInformationScan; |
2445 | boolean StartPhysicalDeviceInformationScan; | 2438 | bool StartPhysicalDeviceInformationScan; |
2446 | struct pci_pool *RequestSensePool; | 2439 | struct pci_pool *RequestSensePool; |
2447 | 2440 | ||
2448 | dma_addr_t FirstCommandMailboxDMA; | 2441 | dma_addr_t FirstCommandMailboxDMA; |
@@ -2487,7 +2480,7 @@ typedef struct DAC960_Controller | |||
2487 | 2480 | ||
2488 | DAC960_V2_PhysicalDevice_T | 2481 | DAC960_V2_PhysicalDevice_T |
2489 | LogicalDriveToVirtualDevice[DAC960_MaxLogicalDrives]; | 2482 | LogicalDriveToVirtualDevice[DAC960_MaxLogicalDrives]; |
2490 | boolean LogicalDriveFoundDuringScan[DAC960_MaxLogicalDrives]; | 2483 | bool LogicalDriveFoundDuringScan[DAC960_MaxLogicalDrives]; |
2491 | } V2; | 2484 | } V2; |
2492 | } FW; | 2485 | } FW; |
2493 | unsigned char ProgressBuffer[DAC960_ProgressBufferSize]; | 2486 | unsigned char ProgressBuffer[DAC960_ProgressBufferSize]; |
@@ -2572,17 +2565,17 @@ typedef union DAC960_GEM_InboundDoorBellRegister | |||
2572 | unsigned int All; | 2565 | unsigned int All; |
2573 | struct { | 2566 | struct { |
2574 | unsigned int :24; | 2567 | unsigned int :24; |
2575 | boolean HardwareMailboxNewCommand:1; | 2568 | bool HardwareMailboxNewCommand:1; |
2576 | boolean AcknowledgeHardwareMailboxStatus:1; | 2569 | bool AcknowledgeHardwareMailboxStatus:1; |
2577 | boolean GenerateInterrupt:1; | 2570 | bool GenerateInterrupt:1; |
2578 | boolean ControllerReset:1; | 2571 | bool ControllerReset:1; |
2579 | boolean MemoryMailboxNewCommand:1; | 2572 | bool MemoryMailboxNewCommand:1; |
2580 | unsigned int :3; | 2573 | unsigned int :3; |
2581 | } Write; | 2574 | } Write; |
2582 | struct { | 2575 | struct { |
2583 | unsigned int :24; | 2576 | unsigned int :24; |
2584 | boolean HardwareMailboxFull:1; | 2577 | bool HardwareMailboxFull:1; |
2585 | boolean InitializationInProgress:1; | 2578 | bool InitializationInProgress:1; |
2586 | unsigned int :6; | 2579 | unsigned int :6; |
2587 | } Read; | 2580 | } Read; |
2588 | } | 2581 | } |
@@ -2596,14 +2589,14 @@ typedef union DAC960_GEM_OutboundDoorBellRegister | |||
2596 | unsigned int All; | 2589 | unsigned int All; |
2597 | struct { | 2590 | struct { |
2598 | unsigned int :24; | 2591 | unsigned int :24; |
2599 | boolean AcknowledgeHardwareMailboxInterrupt:1; | 2592 | bool AcknowledgeHardwareMailboxInterrupt:1; |
2600 | boolean AcknowledgeMemoryMailboxInterrupt:1; | 2593 | bool AcknowledgeMemoryMailboxInterrupt:1; |
2601 | unsigned int :6; | 2594 | unsigned int :6; |
2602 | } Write; | 2595 | } Write; |
2603 | struct { | 2596 | struct { |
2604 | unsigned int :24; | 2597 | unsigned int :24; |
2605 | boolean HardwareMailboxStatusAvailable:1; | 2598 | bool HardwareMailboxStatusAvailable:1; |
2606 | boolean MemoryMailboxStatusAvailable:1; | 2599 | bool MemoryMailboxStatusAvailable:1; |
2607 | unsigned int :6; | 2600 | unsigned int :6; |
2608 | } Read; | 2601 | } Read; |
2609 | } | 2602 | } |
@@ -2635,7 +2628,7 @@ typedef union DAC960_GEM_ErrorStatusRegister | |||
2635 | struct { | 2628 | struct { |
2636 | unsigned int :24; | 2629 | unsigned int :24; |
2637 | unsigned int :5; | 2630 | unsigned int :5; |
2638 | boolean ErrorStatusPending:1; | 2631 | bool ErrorStatusPending:1; |
2639 | unsigned int :2; | 2632 | unsigned int :2; |
2640 | } Bits; | 2633 | } Bits; |
2641 | } | 2634 | } |
@@ -2697,7 +2690,7 @@ void DAC960_GEM_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress) | |||
2697 | } | 2690 | } |
2698 | 2691 | ||
2699 | static inline | 2692 | static inline |
2700 | boolean DAC960_GEM_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | 2693 | bool DAC960_GEM_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) |
2701 | { | 2694 | { |
2702 | DAC960_GEM_InboundDoorBellRegister_T InboundDoorBellRegister; | 2695 | DAC960_GEM_InboundDoorBellRegister_T InboundDoorBellRegister; |
2703 | InboundDoorBellRegister.All = | 2696 | InboundDoorBellRegister.All = |
@@ -2707,7 +2700,7 @@ boolean DAC960_GEM_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | |||
2707 | } | 2700 | } |
2708 | 2701 | ||
2709 | static inline | 2702 | static inline |
2710 | boolean DAC960_GEM_InitializationInProgressP(void __iomem *ControllerBaseAddress) | 2703 | bool DAC960_GEM_InitializationInProgressP(void __iomem *ControllerBaseAddress) |
2711 | { | 2704 | { |
2712 | DAC960_GEM_InboundDoorBellRegister_T InboundDoorBellRegister; | 2705 | DAC960_GEM_InboundDoorBellRegister_T InboundDoorBellRegister; |
2713 | InboundDoorBellRegister.All = | 2706 | InboundDoorBellRegister.All = |
@@ -2748,7 +2741,7 @@ void DAC960_GEM_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress) | |||
2748 | } | 2741 | } |
2749 | 2742 | ||
2750 | static inline | 2743 | static inline |
2751 | boolean DAC960_GEM_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 2744 | bool DAC960_GEM_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
2752 | { | 2745 | { |
2753 | DAC960_GEM_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 2746 | DAC960_GEM_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
2754 | OutboundDoorBellRegister.All = | 2747 | OutboundDoorBellRegister.All = |
@@ -2758,7 +2751,7 @@ boolean DAC960_GEM_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseA | |||
2758 | } | 2751 | } |
2759 | 2752 | ||
2760 | static inline | 2753 | static inline |
2761 | boolean DAC960_GEM_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 2754 | bool DAC960_GEM_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
2762 | { | 2755 | { |
2763 | DAC960_GEM_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 2756 | DAC960_GEM_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
2764 | OutboundDoorBellRegister.All = | 2757 | OutboundDoorBellRegister.All = |
@@ -2790,7 +2783,7 @@ void DAC960_GEM_DisableInterrupts(void __iomem *ControllerBaseAddress) | |||
2790 | } | 2783 | } |
2791 | 2784 | ||
2792 | static inline | 2785 | static inline |
2793 | boolean DAC960_GEM_InterruptsEnabledP(void __iomem *ControllerBaseAddress) | 2786 | bool DAC960_GEM_InterruptsEnabledP(void __iomem *ControllerBaseAddress) |
2794 | { | 2787 | { |
2795 | DAC960_GEM_InterruptMaskRegister_T InterruptMaskRegister; | 2788 | DAC960_GEM_InterruptMaskRegister_T InterruptMaskRegister; |
2796 | InterruptMaskRegister.All = | 2789 | InterruptMaskRegister.All = |
@@ -2834,7 +2827,7 @@ DAC960_GEM_ReadCommandStatus(void __iomem *ControllerBaseAddress) | |||
2834 | return readw(ControllerBaseAddress + DAC960_GEM_CommandStatusOffset + 2); | 2827 | return readw(ControllerBaseAddress + DAC960_GEM_CommandStatusOffset + 2); |
2835 | } | 2828 | } |
2836 | 2829 | ||
2837 | static inline boolean | 2830 | static inline bool |
2838 | DAC960_GEM_ReadErrorStatus(void __iomem *ControllerBaseAddress, | 2831 | DAC960_GEM_ReadErrorStatus(void __iomem *ControllerBaseAddress, |
2839 | unsigned char *ErrorStatus, | 2832 | unsigned char *ErrorStatus, |
2840 | unsigned char *Parameter0, | 2833 | unsigned char *Parameter0, |
@@ -2882,16 +2875,16 @@ typedef union DAC960_BA_InboundDoorBellRegister | |||
2882 | { | 2875 | { |
2883 | unsigned char All; | 2876 | unsigned char All; |
2884 | struct { | 2877 | struct { |
2885 | boolean HardwareMailboxNewCommand:1; /* Bit 0 */ | 2878 | bool HardwareMailboxNewCommand:1; /* Bit 0 */ |
2886 | boolean AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ | 2879 | bool AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ |
2887 | boolean GenerateInterrupt:1; /* Bit 2 */ | 2880 | bool GenerateInterrupt:1; /* Bit 2 */ |
2888 | boolean ControllerReset:1; /* Bit 3 */ | 2881 | bool ControllerReset:1; /* Bit 3 */ |
2889 | boolean MemoryMailboxNewCommand:1; /* Bit 4 */ | 2882 | bool MemoryMailboxNewCommand:1; /* Bit 4 */ |
2890 | unsigned char :3; /* Bits 5-7 */ | 2883 | unsigned char :3; /* Bits 5-7 */ |
2891 | } Write; | 2884 | } Write; |
2892 | struct { | 2885 | struct { |
2893 | boolean HardwareMailboxEmpty:1; /* Bit 0 */ | 2886 | bool HardwareMailboxEmpty:1; /* Bit 0 */ |
2894 | boolean InitializationNotInProgress:1; /* Bit 1 */ | 2887 | bool InitializationNotInProgress:1; /* Bit 1 */ |
2895 | unsigned char :6; /* Bits 2-7 */ | 2888 | unsigned char :6; /* Bits 2-7 */ |
2896 | } Read; | 2889 | } Read; |
2897 | } | 2890 | } |
@@ -2906,13 +2899,13 @@ typedef union DAC960_BA_OutboundDoorBellRegister | |||
2906 | { | 2899 | { |
2907 | unsigned char All; | 2900 | unsigned char All; |
2908 | struct { | 2901 | struct { |
2909 | boolean AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ | 2902 | bool AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ |
2910 | boolean AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ | 2903 | bool AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ |
2911 | unsigned char :6; /* Bits 2-7 */ | 2904 | unsigned char :6; /* Bits 2-7 */ |
2912 | } Write; | 2905 | } Write; |
2913 | struct { | 2906 | struct { |
2914 | boolean HardwareMailboxStatusAvailable:1; /* Bit 0 */ | 2907 | bool HardwareMailboxStatusAvailable:1; /* Bit 0 */ |
2915 | boolean MemoryMailboxStatusAvailable:1; /* Bit 1 */ | 2908 | bool MemoryMailboxStatusAvailable:1; /* Bit 1 */ |
2916 | unsigned char :6; /* Bits 2-7 */ | 2909 | unsigned char :6; /* Bits 2-7 */ |
2917 | } Read; | 2910 | } Read; |
2918 | } | 2911 | } |
@@ -2928,8 +2921,8 @@ typedef union DAC960_BA_InterruptMaskRegister | |||
2928 | unsigned char All; | 2921 | unsigned char All; |
2929 | struct { | 2922 | struct { |
2930 | unsigned int :2; /* Bits 0-1 */ | 2923 | unsigned int :2; /* Bits 0-1 */ |
2931 | boolean DisableInterrupts:1; /* Bit 2 */ | 2924 | bool DisableInterrupts:1; /* Bit 2 */ |
2932 | boolean DisableInterruptsI2O:1; /* Bit 3 */ | 2925 | bool DisableInterruptsI2O:1; /* Bit 3 */ |
2933 | unsigned int :4; /* Bits 4-7 */ | 2926 | unsigned int :4; /* Bits 4-7 */ |
2934 | } Bits; | 2927 | } Bits; |
2935 | } | 2928 | } |
@@ -2945,7 +2938,7 @@ typedef union DAC960_BA_ErrorStatusRegister | |||
2945 | unsigned char All; | 2938 | unsigned char All; |
2946 | struct { | 2939 | struct { |
2947 | unsigned int :2; /* Bits 0-1 */ | 2940 | unsigned int :2; /* Bits 0-1 */ |
2948 | boolean ErrorStatusPending:1; /* Bit 2 */ | 2941 | bool ErrorStatusPending:1; /* Bit 2 */ |
2949 | unsigned int :5; /* Bits 3-7 */ | 2942 | unsigned int :5; /* Bits 3-7 */ |
2950 | } Bits; | 2943 | } Bits; |
2951 | } | 2944 | } |
@@ -3008,7 +3001,7 @@ void DAC960_BA_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress) | |||
3008 | } | 3001 | } |
3009 | 3002 | ||
3010 | static inline | 3003 | static inline |
3011 | boolean DAC960_BA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | 3004 | bool DAC960_BA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) |
3012 | { | 3005 | { |
3013 | DAC960_BA_InboundDoorBellRegister_T InboundDoorBellRegister; | 3006 | DAC960_BA_InboundDoorBellRegister_T InboundDoorBellRegister; |
3014 | InboundDoorBellRegister.All = | 3007 | InboundDoorBellRegister.All = |
@@ -3017,7 +3010,7 @@ boolean DAC960_BA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | |||
3017 | } | 3010 | } |
3018 | 3011 | ||
3019 | static inline | 3012 | static inline |
3020 | boolean DAC960_BA_InitializationInProgressP(void __iomem *ControllerBaseAddress) | 3013 | bool DAC960_BA_InitializationInProgressP(void __iomem *ControllerBaseAddress) |
3021 | { | 3014 | { |
3022 | DAC960_BA_InboundDoorBellRegister_T InboundDoorBellRegister; | 3015 | DAC960_BA_InboundDoorBellRegister_T InboundDoorBellRegister; |
3023 | InboundDoorBellRegister.All = | 3016 | InboundDoorBellRegister.All = |
@@ -3057,7 +3050,7 @@ void DAC960_BA_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress) | |||
3057 | } | 3050 | } |
3058 | 3051 | ||
3059 | static inline | 3052 | static inline |
3060 | boolean DAC960_BA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 3053 | bool DAC960_BA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
3061 | { | 3054 | { |
3062 | DAC960_BA_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 3055 | DAC960_BA_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
3063 | OutboundDoorBellRegister.All = | 3056 | OutboundDoorBellRegister.All = |
@@ -3066,7 +3059,7 @@ boolean DAC960_BA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd | |||
3066 | } | 3059 | } |
3067 | 3060 | ||
3068 | static inline | 3061 | static inline |
3069 | boolean DAC960_BA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 3062 | bool DAC960_BA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
3070 | { | 3063 | { |
3071 | DAC960_BA_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 3064 | DAC960_BA_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
3072 | OutboundDoorBellRegister.All = | 3065 | OutboundDoorBellRegister.All = |
@@ -3097,7 +3090,7 @@ void DAC960_BA_DisableInterrupts(void __iomem *ControllerBaseAddress) | |||
3097 | } | 3090 | } |
3098 | 3091 | ||
3099 | static inline | 3092 | static inline |
3100 | boolean DAC960_BA_InterruptsEnabledP(void __iomem *ControllerBaseAddress) | 3093 | bool DAC960_BA_InterruptsEnabledP(void __iomem *ControllerBaseAddress) |
3101 | { | 3094 | { |
3102 | DAC960_BA_InterruptMaskRegister_T InterruptMaskRegister; | 3095 | DAC960_BA_InterruptMaskRegister_T InterruptMaskRegister; |
3103 | InterruptMaskRegister.All = | 3096 | InterruptMaskRegister.All = |
@@ -3140,7 +3133,7 @@ DAC960_BA_ReadCommandStatus(void __iomem *ControllerBaseAddress) | |||
3140 | return readw(ControllerBaseAddress + DAC960_BA_CommandStatusOffset + 2); | 3133 | return readw(ControllerBaseAddress + DAC960_BA_CommandStatusOffset + 2); |
3141 | } | 3134 | } |
3142 | 3135 | ||
3143 | static inline boolean | 3136 | static inline bool |
3144 | DAC960_BA_ReadErrorStatus(void __iomem *ControllerBaseAddress, | 3137 | DAC960_BA_ReadErrorStatus(void __iomem *ControllerBaseAddress, |
3145 | unsigned char *ErrorStatus, | 3138 | unsigned char *ErrorStatus, |
3146 | unsigned char *Parameter0, | 3139 | unsigned char *Parameter0, |
@@ -3188,16 +3181,16 @@ typedef union DAC960_LP_InboundDoorBellRegister | |||
3188 | { | 3181 | { |
3189 | unsigned char All; | 3182 | unsigned char All; |
3190 | struct { | 3183 | struct { |
3191 | boolean HardwareMailboxNewCommand:1; /* Bit 0 */ | 3184 | bool HardwareMailboxNewCommand:1; /* Bit 0 */ |
3192 | boolean AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ | 3185 | bool AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ |
3193 | boolean GenerateInterrupt:1; /* Bit 2 */ | 3186 | bool GenerateInterrupt:1; /* Bit 2 */ |
3194 | boolean ControllerReset:1; /* Bit 3 */ | 3187 | bool ControllerReset:1; /* Bit 3 */ |
3195 | boolean MemoryMailboxNewCommand:1; /* Bit 4 */ | 3188 | bool MemoryMailboxNewCommand:1; /* Bit 4 */ |
3196 | unsigned char :3; /* Bits 5-7 */ | 3189 | unsigned char :3; /* Bits 5-7 */ |
3197 | } Write; | 3190 | } Write; |
3198 | struct { | 3191 | struct { |
3199 | boolean HardwareMailboxFull:1; /* Bit 0 */ | 3192 | bool HardwareMailboxFull:1; /* Bit 0 */ |
3200 | boolean InitializationInProgress:1; /* Bit 1 */ | 3193 | bool InitializationInProgress:1; /* Bit 1 */ |
3201 | unsigned char :6; /* Bits 2-7 */ | 3194 | unsigned char :6; /* Bits 2-7 */ |
3202 | } Read; | 3195 | } Read; |
3203 | } | 3196 | } |
@@ -3212,13 +3205,13 @@ typedef union DAC960_LP_OutboundDoorBellRegister | |||
3212 | { | 3205 | { |
3213 | unsigned char All; | 3206 | unsigned char All; |
3214 | struct { | 3207 | struct { |
3215 | boolean AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ | 3208 | bool AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ |
3216 | boolean AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ | 3209 | bool AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ |
3217 | unsigned char :6; /* Bits 2-7 */ | 3210 | unsigned char :6; /* Bits 2-7 */ |
3218 | } Write; | 3211 | } Write; |
3219 | struct { | 3212 | struct { |
3220 | boolean HardwareMailboxStatusAvailable:1; /* Bit 0 */ | 3213 | bool HardwareMailboxStatusAvailable:1; /* Bit 0 */ |
3221 | boolean MemoryMailboxStatusAvailable:1; /* Bit 1 */ | 3214 | bool MemoryMailboxStatusAvailable:1; /* Bit 1 */ |
3222 | unsigned char :6; /* Bits 2-7 */ | 3215 | unsigned char :6; /* Bits 2-7 */ |
3223 | } Read; | 3216 | } Read; |
3224 | } | 3217 | } |
@@ -3234,7 +3227,7 @@ typedef union DAC960_LP_InterruptMaskRegister | |||
3234 | unsigned char All; | 3227 | unsigned char All; |
3235 | struct { | 3228 | struct { |
3236 | unsigned int :2; /* Bits 0-1 */ | 3229 | unsigned int :2; /* Bits 0-1 */ |
3237 | boolean DisableInterrupts:1; /* Bit 2 */ | 3230 | bool DisableInterrupts:1; /* Bit 2 */ |
3238 | unsigned int :5; /* Bits 3-7 */ | 3231 | unsigned int :5; /* Bits 3-7 */ |
3239 | } Bits; | 3232 | } Bits; |
3240 | } | 3233 | } |
@@ -3250,7 +3243,7 @@ typedef union DAC960_LP_ErrorStatusRegister | |||
3250 | unsigned char All; | 3243 | unsigned char All; |
3251 | struct { | 3244 | struct { |
3252 | unsigned int :2; /* Bits 0-1 */ | 3245 | unsigned int :2; /* Bits 0-1 */ |
3253 | boolean ErrorStatusPending:1; /* Bit 2 */ | 3246 | bool ErrorStatusPending:1; /* Bit 2 */ |
3254 | unsigned int :5; /* Bits 3-7 */ | 3247 | unsigned int :5; /* Bits 3-7 */ |
3255 | } Bits; | 3248 | } Bits; |
3256 | } | 3249 | } |
@@ -3313,7 +3306,7 @@ void DAC960_LP_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress) | |||
3313 | } | 3306 | } |
3314 | 3307 | ||
3315 | static inline | 3308 | static inline |
3316 | boolean DAC960_LP_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | 3309 | bool DAC960_LP_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) |
3317 | { | 3310 | { |
3318 | DAC960_LP_InboundDoorBellRegister_T InboundDoorBellRegister; | 3311 | DAC960_LP_InboundDoorBellRegister_T InboundDoorBellRegister; |
3319 | InboundDoorBellRegister.All = | 3312 | InboundDoorBellRegister.All = |
@@ -3322,7 +3315,7 @@ boolean DAC960_LP_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | |||
3322 | } | 3315 | } |
3323 | 3316 | ||
3324 | static inline | 3317 | static inline |
3325 | boolean DAC960_LP_InitializationInProgressP(void __iomem *ControllerBaseAddress) | 3318 | bool DAC960_LP_InitializationInProgressP(void __iomem *ControllerBaseAddress) |
3326 | { | 3319 | { |
3327 | DAC960_LP_InboundDoorBellRegister_T InboundDoorBellRegister; | 3320 | DAC960_LP_InboundDoorBellRegister_T InboundDoorBellRegister; |
3328 | InboundDoorBellRegister.All = | 3321 | InboundDoorBellRegister.All = |
@@ -3362,7 +3355,7 @@ void DAC960_LP_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress) | |||
3362 | } | 3355 | } |
3363 | 3356 | ||
3364 | static inline | 3357 | static inline |
3365 | boolean DAC960_LP_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 3358 | bool DAC960_LP_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
3366 | { | 3359 | { |
3367 | DAC960_LP_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 3360 | DAC960_LP_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
3368 | OutboundDoorBellRegister.All = | 3361 | OutboundDoorBellRegister.All = |
@@ -3371,7 +3364,7 @@ boolean DAC960_LP_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd | |||
3371 | } | 3364 | } |
3372 | 3365 | ||
3373 | static inline | 3366 | static inline |
3374 | boolean DAC960_LP_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 3367 | bool DAC960_LP_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
3375 | { | 3368 | { |
3376 | DAC960_LP_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 3369 | DAC960_LP_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
3377 | OutboundDoorBellRegister.All = | 3370 | OutboundDoorBellRegister.All = |
@@ -3400,7 +3393,7 @@ void DAC960_LP_DisableInterrupts(void __iomem *ControllerBaseAddress) | |||
3400 | } | 3393 | } |
3401 | 3394 | ||
3402 | static inline | 3395 | static inline |
3403 | boolean DAC960_LP_InterruptsEnabledP(void __iomem *ControllerBaseAddress) | 3396 | bool DAC960_LP_InterruptsEnabledP(void __iomem *ControllerBaseAddress) |
3404 | { | 3397 | { |
3405 | DAC960_LP_InterruptMaskRegister_T InterruptMaskRegister; | 3398 | DAC960_LP_InterruptMaskRegister_T InterruptMaskRegister; |
3406 | InterruptMaskRegister.All = | 3399 | InterruptMaskRegister.All = |
@@ -3442,7 +3435,7 @@ DAC960_LP_ReadCommandStatus(void __iomem *ControllerBaseAddress) | |||
3442 | return readw(ControllerBaseAddress + DAC960_LP_CommandStatusOffset + 2); | 3435 | return readw(ControllerBaseAddress + DAC960_LP_CommandStatusOffset + 2); |
3443 | } | 3436 | } |
3444 | 3437 | ||
3445 | static inline boolean | 3438 | static inline bool |
3446 | DAC960_LP_ReadErrorStatus(void __iomem *ControllerBaseAddress, | 3439 | DAC960_LP_ReadErrorStatus(void __iomem *ControllerBaseAddress, |
3447 | unsigned char *ErrorStatus, | 3440 | unsigned char *ErrorStatus, |
3448 | unsigned char *Parameter0, | 3441 | unsigned char *Parameter0, |
@@ -3502,16 +3495,16 @@ typedef union DAC960_LA_InboundDoorBellRegister | |||
3502 | { | 3495 | { |
3503 | unsigned char All; | 3496 | unsigned char All; |
3504 | struct { | 3497 | struct { |
3505 | boolean HardwareMailboxNewCommand:1; /* Bit 0 */ | 3498 | bool HardwareMailboxNewCommand:1; /* Bit 0 */ |
3506 | boolean AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ | 3499 | bool AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ |
3507 | boolean GenerateInterrupt:1; /* Bit 2 */ | 3500 | bool GenerateInterrupt:1; /* Bit 2 */ |
3508 | boolean ControllerReset:1; /* Bit 3 */ | 3501 | bool ControllerReset:1; /* Bit 3 */ |
3509 | boolean MemoryMailboxNewCommand:1; /* Bit 4 */ | 3502 | bool MemoryMailboxNewCommand:1; /* Bit 4 */ |
3510 | unsigned char :3; /* Bits 5-7 */ | 3503 | unsigned char :3; /* Bits 5-7 */ |
3511 | } Write; | 3504 | } Write; |
3512 | struct { | 3505 | struct { |
3513 | boolean HardwareMailboxEmpty:1; /* Bit 0 */ | 3506 | bool HardwareMailboxEmpty:1; /* Bit 0 */ |
3514 | boolean InitializationNotInProgress:1; /* Bit 1 */ | 3507 | bool InitializationNotInProgress:1; /* Bit 1 */ |
3515 | unsigned char :6; /* Bits 2-7 */ | 3508 | unsigned char :6; /* Bits 2-7 */ |
3516 | } Read; | 3509 | } Read; |
3517 | } | 3510 | } |
@@ -3526,13 +3519,13 @@ typedef union DAC960_LA_OutboundDoorBellRegister | |||
3526 | { | 3519 | { |
3527 | unsigned char All; | 3520 | unsigned char All; |
3528 | struct { | 3521 | struct { |
3529 | boolean AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ | 3522 | bool AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ |
3530 | boolean AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ | 3523 | bool AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ |
3531 | unsigned char :6; /* Bits 2-7 */ | 3524 | unsigned char :6; /* Bits 2-7 */ |
3532 | } Write; | 3525 | } Write; |
3533 | struct { | 3526 | struct { |
3534 | boolean HardwareMailboxStatusAvailable:1; /* Bit 0 */ | 3527 | bool HardwareMailboxStatusAvailable:1; /* Bit 0 */ |
3535 | boolean MemoryMailboxStatusAvailable:1; /* Bit 1 */ | 3528 | bool MemoryMailboxStatusAvailable:1; /* Bit 1 */ |
3536 | unsigned char :6; /* Bits 2-7 */ | 3529 | unsigned char :6; /* Bits 2-7 */ |
3537 | } Read; | 3530 | } Read; |
3538 | } | 3531 | } |
@@ -3548,7 +3541,7 @@ typedef union DAC960_LA_InterruptMaskRegister | |||
3548 | unsigned char All; | 3541 | unsigned char All; |
3549 | struct { | 3542 | struct { |
3550 | unsigned char :2; /* Bits 0-1 */ | 3543 | unsigned char :2; /* Bits 0-1 */ |
3551 | boolean DisableInterrupts:1; /* Bit 2 */ | 3544 | bool DisableInterrupts:1; /* Bit 2 */ |
3552 | unsigned char :5; /* Bits 3-7 */ | 3545 | unsigned char :5; /* Bits 3-7 */ |
3553 | } Bits; | 3546 | } Bits; |
3554 | } | 3547 | } |
@@ -3564,7 +3557,7 @@ typedef union DAC960_LA_ErrorStatusRegister | |||
3564 | unsigned char All; | 3557 | unsigned char All; |
3565 | struct { | 3558 | struct { |
3566 | unsigned int :2; /* Bits 0-1 */ | 3559 | unsigned int :2; /* Bits 0-1 */ |
3567 | boolean ErrorStatusPending:1; /* Bit 2 */ | 3560 | bool ErrorStatusPending:1; /* Bit 2 */ |
3568 | unsigned int :5; /* Bits 3-7 */ | 3561 | unsigned int :5; /* Bits 3-7 */ |
3569 | } Bits; | 3562 | } Bits; |
3570 | } | 3563 | } |
@@ -3627,7 +3620,7 @@ void DAC960_LA_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress) | |||
3627 | } | 3620 | } |
3628 | 3621 | ||
3629 | static inline | 3622 | static inline |
3630 | boolean DAC960_LA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | 3623 | bool DAC960_LA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) |
3631 | { | 3624 | { |
3632 | DAC960_LA_InboundDoorBellRegister_T InboundDoorBellRegister; | 3625 | DAC960_LA_InboundDoorBellRegister_T InboundDoorBellRegister; |
3633 | InboundDoorBellRegister.All = | 3626 | InboundDoorBellRegister.All = |
@@ -3636,7 +3629,7 @@ boolean DAC960_LA_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | |||
3636 | } | 3629 | } |
3637 | 3630 | ||
3638 | static inline | 3631 | static inline |
3639 | boolean DAC960_LA_InitializationInProgressP(void __iomem *ControllerBaseAddress) | 3632 | bool DAC960_LA_InitializationInProgressP(void __iomem *ControllerBaseAddress) |
3640 | { | 3633 | { |
3641 | DAC960_LA_InboundDoorBellRegister_T InboundDoorBellRegister; | 3634 | DAC960_LA_InboundDoorBellRegister_T InboundDoorBellRegister; |
3642 | InboundDoorBellRegister.All = | 3635 | InboundDoorBellRegister.All = |
@@ -3676,7 +3669,7 @@ void DAC960_LA_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress) | |||
3676 | } | 3669 | } |
3677 | 3670 | ||
3678 | static inline | 3671 | static inline |
3679 | boolean DAC960_LA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 3672 | bool DAC960_LA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
3680 | { | 3673 | { |
3681 | DAC960_LA_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 3674 | DAC960_LA_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
3682 | OutboundDoorBellRegister.All = | 3675 | OutboundDoorBellRegister.All = |
@@ -3685,7 +3678,7 @@ boolean DAC960_LA_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd | |||
3685 | } | 3678 | } |
3686 | 3679 | ||
3687 | static inline | 3680 | static inline |
3688 | boolean DAC960_LA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 3681 | bool DAC960_LA_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
3689 | { | 3682 | { |
3690 | DAC960_LA_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 3683 | DAC960_LA_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
3691 | OutboundDoorBellRegister.All = | 3684 | OutboundDoorBellRegister.All = |
@@ -3714,7 +3707,7 @@ void DAC960_LA_DisableInterrupts(void __iomem *ControllerBaseAddress) | |||
3714 | } | 3707 | } |
3715 | 3708 | ||
3716 | static inline | 3709 | static inline |
3717 | boolean DAC960_LA_InterruptsEnabledP(void __iomem *ControllerBaseAddress) | 3710 | bool DAC960_LA_InterruptsEnabledP(void __iomem *ControllerBaseAddress) |
3718 | { | 3711 | { |
3719 | DAC960_LA_InterruptMaskRegister_T InterruptMaskRegister; | 3712 | DAC960_LA_InterruptMaskRegister_T InterruptMaskRegister; |
3720 | InterruptMaskRegister.All = | 3713 | InterruptMaskRegister.All = |
@@ -3763,7 +3756,7 @@ DAC960_LA_ReadStatusRegister(void __iomem *ControllerBaseAddress) | |||
3763 | return readw(ControllerBaseAddress + DAC960_LA_StatusRegisterOffset); | 3756 | return readw(ControllerBaseAddress + DAC960_LA_StatusRegisterOffset); |
3764 | } | 3757 | } |
3765 | 3758 | ||
3766 | static inline boolean | 3759 | static inline bool |
3767 | DAC960_LA_ReadErrorStatus(void __iomem *ControllerBaseAddress, | 3760 | DAC960_LA_ReadErrorStatus(void __iomem *ControllerBaseAddress, |
3768 | unsigned char *ErrorStatus, | 3761 | unsigned char *ErrorStatus, |
3769 | unsigned char *Parameter0, | 3762 | unsigned char *Parameter0, |
@@ -3822,16 +3815,16 @@ typedef union DAC960_PG_InboundDoorBellRegister | |||
3822 | { | 3815 | { |
3823 | unsigned int All; | 3816 | unsigned int All; |
3824 | struct { | 3817 | struct { |
3825 | boolean HardwareMailboxNewCommand:1; /* Bit 0 */ | 3818 | bool HardwareMailboxNewCommand:1; /* Bit 0 */ |
3826 | boolean AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ | 3819 | bool AcknowledgeHardwareMailboxStatus:1; /* Bit 1 */ |
3827 | boolean GenerateInterrupt:1; /* Bit 2 */ | 3820 | bool GenerateInterrupt:1; /* Bit 2 */ |
3828 | boolean ControllerReset:1; /* Bit 3 */ | 3821 | bool ControllerReset:1; /* Bit 3 */ |
3829 | boolean MemoryMailboxNewCommand:1; /* Bit 4 */ | 3822 | bool MemoryMailboxNewCommand:1; /* Bit 4 */ |
3830 | unsigned int :27; /* Bits 5-31 */ | 3823 | unsigned int :27; /* Bits 5-31 */ |
3831 | } Write; | 3824 | } Write; |
3832 | struct { | 3825 | struct { |
3833 | boolean HardwareMailboxFull:1; /* Bit 0 */ | 3826 | bool HardwareMailboxFull:1; /* Bit 0 */ |
3834 | boolean InitializationInProgress:1; /* Bit 1 */ | 3827 | bool InitializationInProgress:1; /* Bit 1 */ |
3835 | unsigned int :30; /* Bits 2-31 */ | 3828 | unsigned int :30; /* Bits 2-31 */ |
3836 | } Read; | 3829 | } Read; |
3837 | } | 3830 | } |
@@ -3846,13 +3839,13 @@ typedef union DAC960_PG_OutboundDoorBellRegister | |||
3846 | { | 3839 | { |
3847 | unsigned int All; | 3840 | unsigned int All; |
3848 | struct { | 3841 | struct { |
3849 | boolean AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ | 3842 | bool AcknowledgeHardwareMailboxInterrupt:1; /* Bit 0 */ |
3850 | boolean AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ | 3843 | bool AcknowledgeMemoryMailboxInterrupt:1; /* Bit 1 */ |
3851 | unsigned int :30; /* Bits 2-31 */ | 3844 | unsigned int :30; /* Bits 2-31 */ |
3852 | } Write; | 3845 | } Write; |
3853 | struct { | 3846 | struct { |
3854 | boolean HardwareMailboxStatusAvailable:1; /* Bit 0 */ | 3847 | bool HardwareMailboxStatusAvailable:1; /* Bit 0 */ |
3855 | boolean MemoryMailboxStatusAvailable:1; /* Bit 1 */ | 3848 | bool MemoryMailboxStatusAvailable:1; /* Bit 1 */ |
3856 | unsigned int :30; /* Bits 2-31 */ | 3849 | unsigned int :30; /* Bits 2-31 */ |
3857 | } Read; | 3850 | } Read; |
3858 | } | 3851 | } |
@@ -3868,7 +3861,7 @@ typedef union DAC960_PG_InterruptMaskRegister | |||
3868 | unsigned int All; | 3861 | unsigned int All; |
3869 | struct { | 3862 | struct { |
3870 | unsigned int MessageUnitInterruptMask1:2; /* Bits 0-1 */ | 3863 | unsigned int MessageUnitInterruptMask1:2; /* Bits 0-1 */ |
3871 | boolean DisableInterrupts:1; /* Bit 2 */ | 3864 | bool DisableInterrupts:1; /* Bit 2 */ |
3872 | unsigned int MessageUnitInterruptMask2:5; /* Bits 3-7 */ | 3865 | unsigned int MessageUnitInterruptMask2:5; /* Bits 3-7 */ |
3873 | unsigned int Reserved0:24; /* Bits 8-31 */ | 3866 | unsigned int Reserved0:24; /* Bits 8-31 */ |
3874 | } Bits; | 3867 | } Bits; |
@@ -3885,7 +3878,7 @@ typedef union DAC960_PG_ErrorStatusRegister | |||
3885 | unsigned char All; | 3878 | unsigned char All; |
3886 | struct { | 3879 | struct { |
3887 | unsigned int :2; /* Bits 0-1 */ | 3880 | unsigned int :2; /* Bits 0-1 */ |
3888 | boolean ErrorStatusPending:1; /* Bit 2 */ | 3881 | bool ErrorStatusPending:1; /* Bit 2 */ |
3889 | unsigned int :5; /* Bits 3-7 */ | 3882 | unsigned int :5; /* Bits 3-7 */ |
3890 | } Bits; | 3883 | } Bits; |
3891 | } | 3884 | } |
@@ -3948,7 +3941,7 @@ void DAC960_PG_MemoryMailboxNewCommand(void __iomem *ControllerBaseAddress) | |||
3948 | } | 3941 | } |
3949 | 3942 | ||
3950 | static inline | 3943 | static inline |
3951 | boolean DAC960_PG_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | 3944 | bool DAC960_PG_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) |
3952 | { | 3945 | { |
3953 | DAC960_PG_InboundDoorBellRegister_T InboundDoorBellRegister; | 3946 | DAC960_PG_InboundDoorBellRegister_T InboundDoorBellRegister; |
3954 | InboundDoorBellRegister.All = | 3947 | InboundDoorBellRegister.All = |
@@ -3957,7 +3950,7 @@ boolean DAC960_PG_HardwareMailboxFullP(void __iomem *ControllerBaseAddress) | |||
3957 | } | 3950 | } |
3958 | 3951 | ||
3959 | static inline | 3952 | static inline |
3960 | boolean DAC960_PG_InitializationInProgressP(void __iomem *ControllerBaseAddress) | 3953 | bool DAC960_PG_InitializationInProgressP(void __iomem *ControllerBaseAddress) |
3961 | { | 3954 | { |
3962 | DAC960_PG_InboundDoorBellRegister_T InboundDoorBellRegister; | 3955 | DAC960_PG_InboundDoorBellRegister_T InboundDoorBellRegister; |
3963 | InboundDoorBellRegister.All = | 3956 | InboundDoorBellRegister.All = |
@@ -3997,7 +3990,7 @@ void DAC960_PG_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress) | |||
3997 | } | 3990 | } |
3998 | 3991 | ||
3999 | static inline | 3992 | static inline |
4000 | boolean DAC960_PG_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 3993 | bool DAC960_PG_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
4001 | { | 3994 | { |
4002 | DAC960_PG_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 3995 | DAC960_PG_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
4003 | OutboundDoorBellRegister.All = | 3996 | OutboundDoorBellRegister.All = |
@@ -4006,7 +3999,7 @@ boolean DAC960_PG_HardwareMailboxStatusAvailableP(void __iomem *ControllerBaseAd | |||
4006 | } | 3999 | } |
4007 | 4000 | ||
4008 | static inline | 4001 | static inline |
4009 | boolean DAC960_PG_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) | 4002 | bool DAC960_PG_MemoryMailboxStatusAvailableP(void __iomem *ControllerBaseAddress) |
4010 | { | 4003 | { |
4011 | DAC960_PG_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 4004 | DAC960_PG_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
4012 | OutboundDoorBellRegister.All = | 4005 | OutboundDoorBellRegister.All = |
@@ -4039,7 +4032,7 @@ void DAC960_PG_DisableInterrupts(void __iomem *ControllerBaseAddress) | |||
4039 | } | 4032 | } |
4040 | 4033 | ||
4041 | static inline | 4034 | static inline |
4042 | boolean DAC960_PG_InterruptsEnabledP(void __iomem *ControllerBaseAddress) | 4035 | bool DAC960_PG_InterruptsEnabledP(void __iomem *ControllerBaseAddress) |
4043 | { | 4036 | { |
4044 | DAC960_PG_InterruptMaskRegister_T InterruptMaskRegister; | 4037 | DAC960_PG_InterruptMaskRegister_T InterruptMaskRegister; |
4045 | InterruptMaskRegister.All = | 4038 | InterruptMaskRegister.All = |
@@ -4088,7 +4081,7 @@ DAC960_PG_ReadStatusRegister(void __iomem *ControllerBaseAddress) | |||
4088 | return readw(ControllerBaseAddress + DAC960_PG_StatusRegisterOffset); | 4081 | return readw(ControllerBaseAddress + DAC960_PG_StatusRegisterOffset); |
4089 | } | 4082 | } |
4090 | 4083 | ||
4091 | static inline boolean | 4084 | static inline bool |
4092 | DAC960_PG_ReadErrorStatus(void __iomem *ControllerBaseAddress, | 4085 | DAC960_PG_ReadErrorStatus(void __iomem *ControllerBaseAddress, |
4093 | unsigned char *ErrorStatus, | 4086 | unsigned char *ErrorStatus, |
4094 | unsigned char *Parameter0, | 4087 | unsigned char *Parameter0, |
@@ -4147,15 +4140,15 @@ typedef union DAC960_PD_InboundDoorBellRegister | |||
4147 | { | 4140 | { |
4148 | unsigned char All; | 4141 | unsigned char All; |
4149 | struct { | 4142 | struct { |
4150 | boolean NewCommand:1; /* Bit 0 */ | 4143 | bool NewCommand:1; /* Bit 0 */ |
4151 | boolean AcknowledgeStatus:1; /* Bit 1 */ | 4144 | bool AcknowledgeStatus:1; /* Bit 1 */ |
4152 | boolean GenerateInterrupt:1; /* Bit 2 */ | 4145 | bool GenerateInterrupt:1; /* Bit 2 */ |
4153 | boolean ControllerReset:1; /* Bit 3 */ | 4146 | bool ControllerReset:1; /* Bit 3 */ |
4154 | unsigned char :4; /* Bits 4-7 */ | 4147 | unsigned char :4; /* Bits 4-7 */ |
4155 | } Write; | 4148 | } Write; |
4156 | struct { | 4149 | struct { |
4157 | boolean MailboxFull:1; /* Bit 0 */ | 4150 | bool MailboxFull:1; /* Bit 0 */ |
4158 | boolean InitializationInProgress:1; /* Bit 1 */ | 4151 | bool InitializationInProgress:1; /* Bit 1 */ |
4159 | unsigned char :6; /* Bits 2-7 */ | 4152 | unsigned char :6; /* Bits 2-7 */ |
4160 | } Read; | 4153 | } Read; |
4161 | } | 4154 | } |
@@ -4170,11 +4163,11 @@ typedef union DAC960_PD_OutboundDoorBellRegister | |||
4170 | { | 4163 | { |
4171 | unsigned char All; | 4164 | unsigned char All; |
4172 | struct { | 4165 | struct { |
4173 | boolean AcknowledgeInterrupt:1; /* Bit 0 */ | 4166 | bool AcknowledgeInterrupt:1; /* Bit 0 */ |
4174 | unsigned char :7; /* Bits 1-7 */ | 4167 | unsigned char :7; /* Bits 1-7 */ |
4175 | } Write; | 4168 | } Write; |
4176 | struct { | 4169 | struct { |
4177 | boolean StatusAvailable:1; /* Bit 0 */ | 4170 | bool StatusAvailable:1; /* Bit 0 */ |
4178 | unsigned char :7; /* Bits 1-7 */ | 4171 | unsigned char :7; /* Bits 1-7 */ |
4179 | } Read; | 4172 | } Read; |
4180 | } | 4173 | } |
@@ -4189,7 +4182,7 @@ typedef union DAC960_PD_InterruptEnableRegister | |||
4189 | { | 4182 | { |
4190 | unsigned char All; | 4183 | unsigned char All; |
4191 | struct { | 4184 | struct { |
4192 | boolean EnableInterrupts:1; /* Bit 0 */ | 4185 | bool EnableInterrupts:1; /* Bit 0 */ |
4193 | unsigned char :7; /* Bits 1-7 */ | 4186 | unsigned char :7; /* Bits 1-7 */ |
4194 | } Bits; | 4187 | } Bits; |
4195 | } | 4188 | } |
@@ -4205,7 +4198,7 @@ typedef union DAC960_PD_ErrorStatusRegister | |||
4205 | unsigned char All; | 4198 | unsigned char All; |
4206 | struct { | 4199 | struct { |
4207 | unsigned int :2; /* Bits 0-1 */ | 4200 | unsigned int :2; /* Bits 0-1 */ |
4208 | boolean ErrorStatusPending:1; /* Bit 2 */ | 4201 | bool ErrorStatusPending:1; /* Bit 2 */ |
4209 | unsigned int :5; /* Bits 3-7 */ | 4202 | unsigned int :5; /* Bits 3-7 */ |
4210 | } Bits; | 4203 | } Bits; |
4211 | } | 4204 | } |
@@ -4258,7 +4251,7 @@ void DAC960_PD_ControllerReset(void __iomem *ControllerBaseAddress) | |||
4258 | } | 4251 | } |
4259 | 4252 | ||
4260 | static inline | 4253 | static inline |
4261 | boolean DAC960_PD_MailboxFullP(void __iomem *ControllerBaseAddress) | 4254 | bool DAC960_PD_MailboxFullP(void __iomem *ControllerBaseAddress) |
4262 | { | 4255 | { |
4263 | DAC960_PD_InboundDoorBellRegister_T InboundDoorBellRegister; | 4256 | DAC960_PD_InboundDoorBellRegister_T InboundDoorBellRegister; |
4264 | InboundDoorBellRegister.All = | 4257 | InboundDoorBellRegister.All = |
@@ -4267,7 +4260,7 @@ boolean DAC960_PD_MailboxFullP(void __iomem *ControllerBaseAddress) | |||
4267 | } | 4260 | } |
4268 | 4261 | ||
4269 | static inline | 4262 | static inline |
4270 | boolean DAC960_PD_InitializationInProgressP(void __iomem *ControllerBaseAddress) | 4263 | bool DAC960_PD_InitializationInProgressP(void __iomem *ControllerBaseAddress) |
4271 | { | 4264 | { |
4272 | DAC960_PD_InboundDoorBellRegister_T InboundDoorBellRegister; | 4265 | DAC960_PD_InboundDoorBellRegister_T InboundDoorBellRegister; |
4273 | InboundDoorBellRegister.All = | 4266 | InboundDoorBellRegister.All = |
@@ -4286,7 +4279,7 @@ void DAC960_PD_AcknowledgeInterrupt(void __iomem *ControllerBaseAddress) | |||
4286 | } | 4279 | } |
4287 | 4280 | ||
4288 | static inline | 4281 | static inline |
4289 | boolean DAC960_PD_StatusAvailableP(void __iomem *ControllerBaseAddress) | 4282 | bool DAC960_PD_StatusAvailableP(void __iomem *ControllerBaseAddress) |
4290 | { | 4283 | { |
4291 | DAC960_PD_OutboundDoorBellRegister_T OutboundDoorBellRegister; | 4284 | DAC960_PD_OutboundDoorBellRegister_T OutboundDoorBellRegister; |
4292 | OutboundDoorBellRegister.All = | 4285 | OutboundDoorBellRegister.All = |
@@ -4315,7 +4308,7 @@ void DAC960_PD_DisableInterrupts(void __iomem *ControllerBaseAddress) | |||
4315 | } | 4308 | } |
4316 | 4309 | ||
4317 | static inline | 4310 | static inline |
4318 | boolean DAC960_PD_InterruptsEnabledP(void __iomem *ControllerBaseAddress) | 4311 | bool DAC960_PD_InterruptsEnabledP(void __iomem *ControllerBaseAddress) |
4319 | { | 4312 | { |
4320 | DAC960_PD_InterruptEnableRegister_T InterruptEnableRegister; | 4313 | DAC960_PD_InterruptEnableRegister_T InterruptEnableRegister; |
4321 | InterruptEnableRegister.All = | 4314 | InterruptEnableRegister.All = |
@@ -4350,7 +4343,7 @@ DAC960_PD_ReadStatusRegister(void __iomem *ControllerBaseAddress) | |||
4350 | return readw(ControllerBaseAddress + DAC960_PD_StatusRegisterOffset); | 4343 | return readw(ControllerBaseAddress + DAC960_PD_StatusRegisterOffset); |
4351 | } | 4344 | } |
4352 | 4345 | ||
4353 | static inline boolean | 4346 | static inline bool |
4354 | DAC960_PD_ReadErrorStatus(void __iomem *ControllerBaseAddress, | 4347 | DAC960_PD_ReadErrorStatus(void __iomem *ControllerBaseAddress, |
4355 | unsigned char *ErrorStatus, | 4348 | unsigned char *ErrorStatus, |
4356 | unsigned char *Parameter0, | 4349 | unsigned char *Parameter0, |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 58c1debf86f1..cacb1c816e35 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
@@ -417,8 +417,10 @@ config BLK_DEV_INITRD | |||
417 | etc. See <file:Documentation/initrd.txt> for details. | 417 | etc. See <file:Documentation/initrd.txt> for details. |
418 | 418 | ||
419 | If RAM disk support (BLK_DEV_RAM) is also included, this | 419 | If RAM disk support (BLK_DEV_RAM) is also included, this |
420 | also enables initial RAM disk (initrd) support. | 420 | also enables initial RAM disk (initrd) support and adds |
421 | 15 Kbytes (more on some other architectures) to the kernel size. | ||
421 | 422 | ||
423 | If unsure say Y. | ||
422 | 424 | ||
423 | config CDROM_PKTCDVD | 425 | config CDROM_PKTCDVD |
424 | tristate "Packet writing on CD/DVD media" | 426 | tristate "Packet writing on CD/DVD media" |
diff --git a/drivers/block/paride/Kconfig b/drivers/block/paride/Kconfig index c0d2854dd097..28cf3082d442 100644 --- a/drivers/block/paride/Kconfig +++ b/drivers/block/paride/Kconfig | |||
@@ -2,14 +2,8 @@ | |||
2 | # PARIDE configuration | 2 | # PARIDE configuration |
3 | # | 3 | # |
4 | # PARIDE doesn't need PARPORT, but if PARPORT is configured as a module, | 4 | # PARIDE doesn't need PARPORT, but if PARPORT is configured as a module, |
5 | # PARIDE must also be a module. The bogus CONFIG_PARIDE_PARPORT option | 5 | # PARIDE must also be a module. |
6 | # controls the choices given to the user ... | ||
7 | # PARIDE only supports PC style parports. Tough for USB or other parports... | 6 | # PARIDE only supports PC style parports. Tough for USB or other parports... |
8 | config PARIDE_PARPORT | ||
9 | tristate | ||
10 | depends on PARIDE!=n | ||
11 | default m if PARPORT_PC=m | ||
12 | default y if PARPORT_PC!=m | ||
13 | 7 | ||
14 | comment "Parallel IDE high-level drivers" | 8 | comment "Parallel IDE high-level drivers" |
15 | depends on PARIDE | 9 | depends on PARIDE |
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 62462190e07e..c0e89490e3d5 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -190,15 +190,6 @@ static struct attribute *kobj_pkt_attrs_wqueue[] = { | |||
190 | NULL | 190 | NULL |
191 | }; | 191 | }; |
192 | 192 | ||
193 | /* declares a char buffer[64] _dbuf, copies data from | ||
194 | * _b with length _l into it and ensures that _dbuf ends | ||
195 | * with a \0 character. | ||
196 | */ | ||
197 | #define DECLARE_BUF_AS_STRING(_dbuf, _b, _l) \ | ||
198 | char _dbuf[64]; int dlen = (_l) < 0 ? 0 : (_l); \ | ||
199 | if (dlen >= sizeof(_dbuf)) dlen = sizeof(_dbuf)-1; \ | ||
200 | memcpy(_dbuf, _b, dlen); _dbuf[dlen] = 0 | ||
201 | |||
202 | static ssize_t kobj_pkt_show(struct kobject *kobj, | 193 | static ssize_t kobj_pkt_show(struct kobject *kobj, |
203 | struct attribute *attr, char *data) | 194 | struct attribute *attr, char *data) |
204 | { | 195 | { |
@@ -264,9 +255,8 @@ static ssize_t kobj_pkt_store(struct kobject *kobj, | |||
264 | { | 255 | { |
265 | struct pktcdvd_device *pd = to_pktcdvdkobj(kobj)->pd; | 256 | struct pktcdvd_device *pd = to_pktcdvdkobj(kobj)->pd; |
266 | int val; | 257 | int val; |
267 | DECLARE_BUF_AS_STRING(dbuf, data, len); /* ensure sscanf scans a string */ | ||
268 | 258 | ||
269 | if (strcmp(attr->name, "reset") == 0 && dlen > 0) { | 259 | if (strcmp(attr->name, "reset") == 0 && len > 0) { |
270 | pd->stats.pkt_started = 0; | 260 | pd->stats.pkt_started = 0; |
271 | pd->stats.pkt_ended = 0; | 261 | pd->stats.pkt_ended = 0; |
272 | pd->stats.secs_w = 0; | 262 | pd->stats.secs_w = 0; |
@@ -274,7 +264,7 @@ static ssize_t kobj_pkt_store(struct kobject *kobj, | |||
274 | pd->stats.secs_r = 0; | 264 | pd->stats.secs_r = 0; |
275 | 265 | ||
276 | } else if (strcmp(attr->name, "congestion_off") == 0 | 266 | } else if (strcmp(attr->name, "congestion_off") == 0 |
277 | && sscanf(dbuf, "%d", &val) == 1) { | 267 | && sscanf(data, "%d", &val) == 1) { |
278 | spin_lock(&pd->lock); | 268 | spin_lock(&pd->lock); |
279 | pd->write_congestion_off = val; | 269 | pd->write_congestion_off = val; |
280 | init_write_congestion_marks(&pd->write_congestion_off, | 270 | init_write_congestion_marks(&pd->write_congestion_off, |
@@ -282,7 +272,7 @@ static ssize_t kobj_pkt_store(struct kobject *kobj, | |||
282 | spin_unlock(&pd->lock); | 272 | spin_unlock(&pd->lock); |
283 | 273 | ||
284 | } else if (strcmp(attr->name, "congestion_on") == 0 | 274 | } else if (strcmp(attr->name, "congestion_on") == 0 |
285 | && sscanf(dbuf, "%d", &val) == 1) { | 275 | && sscanf(data, "%d", &val) == 1) { |
286 | spin_lock(&pd->lock); | 276 | spin_lock(&pd->lock); |
287 | pd->write_congestion_on = val; | 277 | pd->write_congestion_on = val; |
288 | init_write_congestion_marks(&pd->write_congestion_off, | 278 | init_write_congestion_marks(&pd->write_congestion_off, |
@@ -369,8 +359,7 @@ static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf, | |||
369 | size_t count) | 359 | size_t count) |
370 | { | 360 | { |
371 | unsigned int major, minor; | 361 | unsigned int major, minor; |
372 | DECLARE_BUF_AS_STRING(dbuf, buf, count); | 362 | if (sscanf(buf, "%u:%u", &major, &minor) == 2) { |
373 | if (sscanf(dbuf, "%u:%u", &major, &minor) == 2) { | ||
374 | pkt_setup_dev(MKDEV(major, minor), NULL); | 363 | pkt_setup_dev(MKDEV(major, minor), NULL); |
375 | return count; | 364 | return count; |
376 | } | 365 | } |
@@ -381,8 +370,7 @@ static ssize_t class_pktcdvd_store_remove(struct class *c, const char *buf, | |||
381 | size_t count) | 370 | size_t count) |
382 | { | 371 | { |
383 | unsigned int major, minor; | 372 | unsigned int major, minor; |
384 | DECLARE_BUF_AS_STRING(dbuf, buf, count); | 373 | if (sscanf(buf, "%u:%u", &major, &minor) == 2) { |
385 | if (sscanf(dbuf, "%u:%u", &major, &minor) == 2) { | ||
386 | pkt_remove_dev(MKDEV(major, minor)); | 374 | pkt_remove_dev(MKDEV(major, minor)); |
387 | return count; | 375 | return count; |
388 | } | 376 | } |
@@ -1377,7 +1365,7 @@ try_next_bio: | |||
1377 | && pd->bio_queue_size <= pd->write_congestion_off); | 1365 | && pd->bio_queue_size <= pd->write_congestion_off); |
1378 | spin_unlock(&pd->lock); | 1366 | spin_unlock(&pd->lock); |
1379 | if (wakeup) | 1367 | if (wakeup) |
1380 | blk_clear_queue_congested(pd->disk->queue, WRITE); | 1368 | clear_bdi_congested(&pd->disk->queue->backing_dev_info, WRITE); |
1381 | 1369 | ||
1382 | pkt->sleep_time = max(PACKET_WAIT_TIME, 1); | 1370 | pkt->sleep_time = max(PACKET_WAIT_TIME, 1); |
1383 | pkt_set_state(pkt, PACKET_WAITING_STATE); | 1371 | pkt_set_state(pkt, PACKET_WAITING_STATE); |
@@ -2598,7 +2586,7 @@ static int pkt_make_request(request_queue_t *q, struct bio *bio) | |||
2598 | spin_lock(&pd->lock); | 2586 | spin_lock(&pd->lock); |
2599 | if (pd->write_congestion_on > 0 | 2587 | if (pd->write_congestion_on > 0 |
2600 | && pd->bio_queue_size >= pd->write_congestion_on) { | 2588 | && pd->bio_queue_size >= pd->write_congestion_on) { |
2601 | blk_set_queue_congested(q, WRITE); | 2589 | set_bdi_congested(&q->backing_dev_info, WRITE); |
2602 | do { | 2590 | do { |
2603 | spin_unlock(&pd->lock); | 2591 | spin_unlock(&pd->lock); |
2604 | congestion_wait(WRITE, HZ); | 2592 | congestion_wait(WRITE, HZ); |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index d08bb4ee1307..d0a6dc53213c 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -191,7 +191,7 @@ config MOXA_INTELLIO | |||
191 | module will be called moxa. | 191 | module will be called moxa. |
192 | 192 | ||
193 | config MOXA_SMARTIO | 193 | config MOXA_SMARTIO |
194 | tristate "Moxa SmartIO support" | 194 | tristate "Moxa SmartIO support (OBSOLETE)" |
195 | depends on SERIAL_NONSTANDARD | 195 | depends on SERIAL_NONSTANDARD |
196 | help | 196 | help |
197 | Say Y here if you have a Moxa SmartIO multiport serial card. | 197 | Say Y here if you have a Moxa SmartIO multiport serial card. |
@@ -202,7 +202,7 @@ config MOXA_SMARTIO | |||
202 | here. | 202 | here. |
203 | 203 | ||
204 | config MOXA_SMARTIO_NEW | 204 | config MOXA_SMARTIO_NEW |
205 | tristate "Moxa SmartIO support v. 2.0 (EXPERIMENTAL)" | 205 | tristate "Moxa SmartIO support v. 2.0" |
206 | depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) | 206 | depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) |
207 | help | 207 | help |
208 | Say Y here if you have a Moxa SmartIO multiport serial card and/or | 208 | Say Y here if you have a Moxa SmartIO multiport serial card and/or |
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index feb4ac802a0d..0e2b72f2b887 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c | |||
@@ -527,10 +527,8 @@ static void do_softint(unsigned long private_) | |||
527 | if (!tty) | 527 | if (!tty) |
528 | return; | 528 | return; |
529 | 529 | ||
530 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { | 530 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) |
531 | tty_wakeup(tty); | 531 | tty_wakeup(tty); |
532 | wake_up_interruptible(&tty->write_wait); | ||
533 | } | ||
534 | } | 532 | } |
535 | 533 | ||
536 | /* | 534 | /* |
@@ -904,8 +902,7 @@ static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count | |||
904 | if (!info->xmit.buf) | 902 | if (!info->xmit.buf) |
905 | return 0; | 903 | return 0; |
906 | 904 | ||
907 | local_save_flags(flags); | 905 | local_irq_save(flags); |
908 | local_irq_disable(); | ||
909 | while (1) { | 906 | while (1) { |
910 | c = CIRC_SPACE_TO_END(info->xmit.head, | 907 | c = CIRC_SPACE_TO_END(info->xmit.head, |
911 | info->xmit.tail, | 908 | info->xmit.tail, |
@@ -968,7 +965,6 @@ static void rs_flush_buffer(struct tty_struct *tty) | |||
968 | local_irq_save(flags); | 965 | local_irq_save(flags); |
969 | info->xmit.head = info->xmit.tail = 0; | 966 | info->xmit.head = info->xmit.tail = 0; |
970 | local_irq_restore(flags); | 967 | local_irq_restore(flags); |
971 | wake_up_interruptible(&tty->write_wait); | ||
972 | tty_wakeup(tty); | 968 | tty_wakeup(tty); |
973 | } | 969 | } |
974 | 970 | ||
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 3ffa0807754c..363beb165729 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -4488,7 +4488,6 @@ static void cy_flush_buffer(struct tty_struct *tty) | |||
4488 | CY_UNLOCK(info, flags); | 4488 | CY_UNLOCK(info, flags); |
4489 | } | 4489 | } |
4490 | tty_wakeup(tty); | 4490 | tty_wakeup(tty); |
4491 | wake_up_interruptible(&tty->write_wait); | ||
4492 | } /* cy_flush_buffer */ | 4491 | } /* cy_flush_buffer */ |
4493 | 4492 | ||
4494 | /* | 4493 | /* |
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index a0f822c9d74d..88fc24fc4392 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -844,7 +844,6 @@ static void pc_flush_buffer(struct tty_struct *tty) | |||
844 | fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0); | 844 | fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0); |
845 | memoff(ch); | 845 | memoff(ch); |
846 | spin_unlock_irqrestore(&epca_lock, flags); | 846 | spin_unlock_irqrestore(&epca_lock, flags); |
847 | wake_up_interruptible(&tty->write_wait); | ||
848 | tty_wakeup(tty); | 847 | tty_wakeup(tty); |
849 | } /* End pc_flush_buffer */ | 848 | } /* End pc_flush_buffer */ |
850 | 849 | ||
@@ -1795,7 +1794,6 @@ static void doevent(int crd) | |||
1795 | { /* Begin if LOWWAIT */ | 1794 | { /* Begin if LOWWAIT */ |
1796 | ch->statusflags &= ~LOWWAIT; | 1795 | ch->statusflags &= ~LOWWAIT; |
1797 | tty_wakeup(tty); | 1796 | tty_wakeup(tty); |
1798 | wake_up_interruptible(&tty->write_wait); | ||
1799 | } /* End if LOWWAIT */ | 1797 | } /* End if LOWWAIT */ |
1800 | } else if (event & EMPTYTX_IND) { /* Begin EMPTYTX_IND */ | 1798 | } else if (event & EMPTYTX_IND) { /* Begin EMPTYTX_IND */ |
1801 | /* This event is generated by setup_empty_event */ | 1799 | /* This event is generated by setup_empty_event */ |
@@ -1803,7 +1801,6 @@ static void doevent(int crd) | |||
1803 | if (ch->statusflags & EMPTYWAIT) { /* Begin if EMPTYWAIT */ | 1801 | if (ch->statusflags & EMPTYWAIT) { /* Begin if EMPTYWAIT */ |
1804 | ch->statusflags &= ~EMPTYWAIT; | 1802 | ch->statusflags &= ~EMPTYWAIT; |
1805 | tty_wakeup(tty); | 1803 | tty_wakeup(tty); |
1806 | wake_up_interruptible(&tty->write_wait); | ||
1807 | } /* End if EMPTYWAIT */ | 1804 | } /* End if EMPTYWAIT */ |
1808 | } /* End EMPTYTX_IND */ | 1805 | } /* End EMPTYTX_IND */ |
1809 | } /* End if valid tty */ | 1806 | } /* End if valid tty */ |
diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c index e769811e7417..337bbcdcf13d 100644 --- a/drivers/char/generic_serial.c +++ b/drivers/char/generic_serial.c | |||
@@ -382,7 +382,6 @@ void gs_flush_buffer(struct tty_struct *tty) | |||
382 | port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; | 382 | port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; |
383 | spin_unlock_irqrestore (&port->driver_lock, flags); | 383 | spin_unlock_irqrestore (&port->driver_lock, flags); |
384 | 384 | ||
385 | wake_up_interruptible(&tty->write_wait); | ||
386 | tty_wakeup(tty); | 385 | tty_wakeup(tty); |
387 | func_exit (); | 386 | func_exit (); |
388 | } | 387 | } |
diff --git a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c index 78045767ec33..88b9d338da53 100644 --- a/drivers/char/ip2/i2lib.c +++ b/drivers/char/ip2/i2lib.c | |||
@@ -1373,15 +1373,7 @@ ip2_owake( PTTY tp) | |||
1373 | ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags, | 1373 | ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags, |
1374 | (1 << TTY_DO_WRITE_WAKEUP) ); | 1374 | (1 << TTY_DO_WRITE_WAKEUP) ); |
1375 | 1375 | ||
1376 | wake_up_interruptible ( &tp->write_wait ); | 1376 | tty_wakeup(tp); |
1377 | if ( ( tp->flags & (1 << TTY_DO_WRITE_WAKEUP) ) | ||
1378 | && tp->ldisc.write_wakeup ) | ||
1379 | { | ||
1380 | (tp->ldisc.write_wakeup) ( tp ); | ||
1381 | |||
1382 | ip2trace (CHANN, ITRC_SICMD, 11, 0 ); | ||
1383 | |||
1384 | } | ||
1385 | } | 1377 | } |
1386 | 1378 | ||
1387 | static inline void | 1379 | static inline void |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 53582b53da95..3aff5e99b674 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -406,13 +406,14 @@ static void clean_up_interface_data(ipmi_smi_t intf) | |||
406 | free_smi_msg_list(&intf->waiting_msgs); | 406 | free_smi_msg_list(&intf->waiting_msgs); |
407 | free_recv_msg_list(&intf->waiting_events); | 407 | free_recv_msg_list(&intf->waiting_events); |
408 | 408 | ||
409 | /* Wholesale remove all the entries from the list in the | 409 | /* |
410 | * interface and wait for RCU to know that none are in use. */ | 410 | * Wholesale remove all the entries from the list in the |
411 | * interface and wait for RCU to know that none are in use. | ||
412 | */ | ||
411 | mutex_lock(&intf->cmd_rcvrs_mutex); | 413 | mutex_lock(&intf->cmd_rcvrs_mutex); |
412 | list_add_rcu(&list, &intf->cmd_rcvrs); | 414 | INIT_LIST_HEAD(&list); |
413 | list_del_rcu(&intf->cmd_rcvrs); | 415 | list_splice_init_rcu(&intf->cmd_rcvrs, &list, synchronize_rcu); |
414 | mutex_unlock(&intf->cmd_rcvrs_mutex); | 416 | mutex_unlock(&intf->cmd_rcvrs_mutex); |
415 | synchronize_rcu(); | ||
416 | 417 | ||
417 | list_for_each_entry_safe(rcvr, rcvr2, &list, link) | 418 | list_for_each_entry_safe(rcvr, rcvr2, &list, link) |
418 | kfree(rcvr); | 419 | kfree(rcvr); |
@@ -451,7 +452,7 @@ int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher) | |||
451 | mutex_lock(&ipmi_interfaces_mutex); | 452 | mutex_lock(&ipmi_interfaces_mutex); |
452 | 453 | ||
453 | /* Build a list of things to deliver. */ | 454 | /* Build a list of things to deliver. */ |
454 | list_for_each_entry_rcu(intf, &ipmi_interfaces, link) { | 455 | list_for_each_entry(intf, &ipmi_interfaces, link) { |
455 | if (intf->intf_num == -1) | 456 | if (intf->intf_num == -1) |
456 | continue; | 457 | continue; |
457 | e = kmalloc(sizeof(*e), GFP_KERNEL); | 458 | e = kmalloc(sizeof(*e), GFP_KERNEL); |
@@ -1886,7 +1887,6 @@ int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name, | |||
1886 | kfree(entry); | 1887 | kfree(entry); |
1887 | rv = -ENOMEM; | 1888 | rv = -ENOMEM; |
1888 | } else { | 1889 | } else { |
1889 | file->nlink = 1; | ||
1890 | file->data = data; | 1890 | file->data = data; |
1891 | file->read_proc = read_proc; | 1891 | file->read_proc = read_proc; |
1892 | file->write_proc = write_proc; | 1892 | file->write_proc = write_proc; |
@@ -2760,9 +2760,15 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers, | |||
2760 | synchronize_rcu(); | 2760 | synchronize_rcu(); |
2761 | kref_put(&intf->refcount, intf_free); | 2761 | kref_put(&intf->refcount, intf_free); |
2762 | } else { | 2762 | } else { |
2763 | /* After this point the interface is legal to use. */ | 2763 | /* |
2764 | * Keep memory order straight for RCU readers. Make | ||
2765 | * sure everything else is committed to memory before | ||
2766 | * setting intf_num to mark the interface valid. | ||
2767 | */ | ||
2768 | smp_wmb(); | ||
2764 | intf->intf_num = i; | 2769 | intf->intf_num = i; |
2765 | mutex_unlock(&ipmi_interfaces_mutex); | 2770 | mutex_unlock(&ipmi_interfaces_mutex); |
2771 | /* After this point the interface is legal to use. */ | ||
2766 | call_smi_watchers(i, intf->si_dev); | 2772 | call_smi_watchers(i, intf->si_dev); |
2767 | mutex_unlock(&smi_watchers_mutex); | 2773 | mutex_unlock(&smi_watchers_mutex); |
2768 | } | 2774 | } |
@@ -3923,6 +3929,14 @@ static void send_panic_events(char *str) | |||
3923 | /* Interface was not ready yet. */ | 3929 | /* Interface was not ready yet. */ |
3924 | continue; | 3930 | continue; |
3925 | 3931 | ||
3932 | /* | ||
3933 | * intf_num is used as an marker to tell if the | ||
3934 | * interface is valid. Thus we need a read barrier to | ||
3935 | * make sure data fetched before checking intf_num | ||
3936 | * won't be used. | ||
3937 | */ | ||
3938 | smp_rmb(); | ||
3939 | |||
3926 | /* First job here is to figure out where to send the | 3940 | /* First job here is to figure out where to send the |
3927 | OEM events. There's no way in IPMI to send OEM | 3941 | OEM events. There's no way in IPMI to send OEM |
3928 | events using an event send command, so we have to | 3942 | events using an event send command, so we have to |
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 01084abffddf..43ab9edc76f5 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -183,7 +183,7 @@ static DEFINE_TIMER(tx, isicom_tx, 0, 0); | |||
183 | /* baud index mappings from linux defns to isi */ | 183 | /* baud index mappings from linux defns to isi */ |
184 | 184 | ||
185 | static signed char linuxb_to_isib[] = { | 185 | static signed char linuxb_to_isib[] = { |
186 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19 | 186 | -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 16, 17, 18, 19, 20, 21 |
187 | }; | 187 | }; |
188 | 188 | ||
189 | struct isi_board { | 189 | struct isi_board { |
@@ -213,8 +213,6 @@ struct isi_port { | |||
213 | struct tty_struct * tty; | 213 | struct tty_struct * tty; |
214 | wait_queue_head_t close_wait; | 214 | wait_queue_head_t close_wait; |
215 | wait_queue_head_t open_wait; | 215 | wait_queue_head_t open_wait; |
216 | struct work_struct hangup_tq; | ||
217 | struct work_struct bh_tqueue; | ||
218 | unsigned char * xmit_buf; | 216 | unsigned char * xmit_buf; |
219 | int xmit_head; | 217 | int xmit_head; |
220 | int xmit_tail; | 218 | int xmit_tail; |
@@ -510,7 +508,7 @@ static void isicom_tx(unsigned long _data) | |||
510 | if (port->xmit_cnt <= 0) | 508 | if (port->xmit_cnt <= 0) |
511 | port->status &= ~ISI_TXOK; | 509 | port->status &= ~ISI_TXOK; |
512 | if (port->xmit_cnt <= WAKEUP_CHARS) | 510 | if (port->xmit_cnt <= WAKEUP_CHARS) |
513 | schedule_work(&port->bh_tqueue); | 511 | tty_wakeup(tty); |
514 | unlock_card(&isi_card[card]); | 512 | unlock_card(&isi_card[card]); |
515 | } | 513 | } |
516 | 514 | ||
@@ -524,21 +522,6 @@ sched_again: | |||
524 | mod_timer(&tx, jiffies + msecs_to_jiffies(10)); | 522 | mod_timer(&tx, jiffies + msecs_to_jiffies(10)); |
525 | } | 523 | } |
526 | 524 | ||
527 | /* Interrupt handlers */ | ||
528 | |||
529 | |||
530 | static void isicom_bottomhalf(struct work_struct *work) | ||
531 | { | ||
532 | struct isi_port *port = container_of(work, struct isi_port, bh_tqueue); | ||
533 | struct tty_struct *tty = port->tty; | ||
534 | |||
535 | if (!tty) | ||
536 | return; | ||
537 | |||
538 | tty_wakeup(tty); | ||
539 | wake_up_interruptible(&tty->write_wait); | ||
540 | } | ||
541 | |||
542 | /* | 525 | /* |
543 | * Main interrupt handler routine | 526 | * Main interrupt handler routine |
544 | */ | 527 | */ |
@@ -557,6 +540,11 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
557 | return IRQ_NONE; | 540 | return IRQ_NONE; |
558 | 541 | ||
559 | base = card->base; | 542 | base = card->base; |
543 | |||
544 | /* did the card interrupt us? */ | ||
545 | if (!(inw(base + 0x0e) & 0x02)) | ||
546 | return IRQ_NONE; | ||
547 | |||
560 | spin_lock(&card->card_lock); | 548 | spin_lock(&card->card_lock); |
561 | 549 | ||
562 | /* | 550 | /* |
@@ -581,6 +569,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
581 | port = card->ports + channel; | 569 | port = card->ports + channel; |
582 | if (!(port->flags & ASYNC_INITIALIZED)) { | 570 | if (!(port->flags & ASYNC_INITIALIZED)) { |
583 | outw(0x0000, base+0x04); /* enable interrupts */ | 571 | outw(0x0000, base+0x04); /* enable interrupts */ |
572 | spin_unlock(&card->card_lock); | ||
584 | return IRQ_HANDLED; | 573 | return IRQ_HANDLED; |
585 | } | 574 | } |
586 | 575 | ||
@@ -609,7 +598,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
609 | pr_dbg("interrupt: DCD->low.\n" | 598 | pr_dbg("interrupt: DCD->low.\n" |
610 | ); | 599 | ); |
611 | port->status &= ~ISI_DCD; | 600 | port->status &= ~ISI_DCD; |
612 | schedule_work(&port->hangup_tq); | 601 | tty_hangup(tty); |
613 | } | 602 | } |
614 | } else if (header & ISI_DCD) { | 603 | } else if (header & ISI_DCD) { |
615 | /* Carrier has been detected */ | 604 | /* Carrier has been detected */ |
@@ -631,7 +620,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
631 | /* start tx ing */ | 620 | /* start tx ing */ |
632 | port->status |= (ISI_TXOK | 621 | port->status |= (ISI_TXOK |
633 | | ISI_CTS); | 622 | | ISI_CTS); |
634 | schedule_work(&port->bh_tqueue); | 623 | tty_wakeup(tty); |
635 | } | 624 | } |
636 | } else if (!(header & ISI_CTS)) { | 625 | } else if (!(header & ISI_CTS)) { |
637 | port->tty->hw_stopped = 1; | 626 | port->tty->hw_stopped = 1; |
@@ -695,6 +684,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
695 | tty_flip_buffer_push(tty); | 684 | tty_flip_buffer_push(tty); |
696 | } | 685 | } |
697 | outw(0x0000, base+0x04); /* enable interrupts */ | 686 | outw(0x0000, base+0x04); /* enable interrupts */ |
687 | spin_unlock(&card->card_lock); | ||
698 | 688 | ||
699 | return IRQ_HANDLED; | 689 | return IRQ_HANDLED; |
700 | } | 690 | } |
@@ -720,7 +710,8 @@ static void isicom_config_port(struct isi_port *port) | |||
720 | * respectively. | 710 | * respectively. |
721 | */ | 711 | */ |
722 | 712 | ||
723 | if (baud < 1 || baud > 2) | 713 | /* 1,2,3,4 => 57.6, 115.2, 230, 460 kbps resp. */ |
714 | if (baud < 1 || baud > 4) | ||
724 | port->tty->termios->c_cflag &= ~CBAUDEX; | 715 | port->tty->termios->c_cflag &= ~CBAUDEX; |
725 | else | 716 | else |
726 | baud += 15; | 717 | baud += 15; |
@@ -736,6 +727,10 @@ static void isicom_config_port(struct isi_port *port) | |||
736 | baud++; /* 57.6 Kbps */ | 727 | baud++; /* 57.6 Kbps */ |
737 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) | 728 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) |
738 | baud +=2; /* 115 Kbps */ | 729 | baud +=2; /* 115 Kbps */ |
730 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI) | ||
731 | baud += 3; /* 230 kbps*/ | ||
732 | if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP) | ||
733 | baud += 4; /* 460 kbps*/ | ||
739 | } | 734 | } |
740 | if (linuxb_to_isib[baud] == -1) { | 735 | if (linuxb_to_isib[baud] == -1) { |
741 | /* hang up */ | 736 | /* hang up */ |
@@ -1460,17 +1455,6 @@ static void isicom_start(struct tty_struct *tty) | |||
1460 | port->status |= ISI_TXOK; | 1455 | port->status |= ISI_TXOK; |
1461 | } | 1456 | } |
1462 | 1457 | ||
1463 | /* hangup et all */ | ||
1464 | static void do_isicom_hangup(struct work_struct *work) | ||
1465 | { | ||
1466 | struct isi_port *port = container_of(work, struct isi_port, hangup_tq); | ||
1467 | struct tty_struct *tty; | ||
1468 | |||
1469 | tty = port->tty; | ||
1470 | if (tty) | ||
1471 | tty_hangup(tty); | ||
1472 | } | ||
1473 | |||
1474 | static void isicom_hangup(struct tty_struct *tty) | 1458 | static void isicom_hangup(struct tty_struct *tty) |
1475 | { | 1459 | { |
1476 | struct isi_port *port = tty->driver_data; | 1460 | struct isi_port *port = tty->driver_data; |
@@ -1503,7 +1487,6 @@ static void isicom_flush_buffer(struct tty_struct *tty) | |||
1503 | port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; | 1487 | port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; |
1504 | spin_unlock_irqrestore(&card->card_lock, flags); | 1488 | spin_unlock_irqrestore(&card->card_lock, flags); |
1505 | 1489 | ||
1506 | wake_up_interruptible(&tty->write_wait); | ||
1507 | tty_wakeup(tty); | 1490 | tty_wakeup(tty); |
1508 | } | 1491 | } |
1509 | 1492 | ||
@@ -1536,7 +1519,7 @@ static int __devinit reset_card(struct pci_dev *pdev, | |||
1536 | { | 1519 | { |
1537 | struct isi_board *board = pci_get_drvdata(pdev); | 1520 | struct isi_board *board = pci_get_drvdata(pdev); |
1538 | unsigned long base = board->base; | 1521 | unsigned long base = board->base; |
1539 | unsigned int portcount = 0; | 1522 | unsigned int sig, portcount = 0; |
1540 | int retval = 0; | 1523 | int retval = 0; |
1541 | 1524 | ||
1542 | dev_dbg(&pdev->dev, "ISILoad:Resetting Card%d at 0x%lx\n", card + 1, | 1525 | dev_dbg(&pdev->dev, "ISILoad:Resetting Card%d at 0x%lx\n", card + 1, |
@@ -1544,27 +1527,35 @@ static int __devinit reset_card(struct pci_dev *pdev, | |||
1544 | 1527 | ||
1545 | inw(base + 0x8); | 1528 | inw(base + 0x8); |
1546 | 1529 | ||
1547 | mdelay(10); | 1530 | msleep(10); |
1548 | 1531 | ||
1549 | outw(0, base + 0x8); /* Reset */ | 1532 | outw(0, base + 0x8); /* Reset */ |
1550 | 1533 | ||
1551 | msleep(3000); | 1534 | msleep(1000); |
1552 | 1535 | ||
1553 | *signature = inw(base + 0x4) & 0xff; | 1536 | sig = inw(base + 0x4) & 0xff; |
1537 | |||
1538 | if (sig != 0xa5 && sig != 0xbb && sig != 0xcc && sig != 0xdd && | ||
1539 | sig != 0xee) { | ||
1540 | dev_warn(&pdev->dev, "ISILoad:Card%u reset failure (Possible " | ||
1541 | "bad I/O Port Address 0x%lx).\n", card + 1, base); | ||
1542 | dev_dbg(&pdev->dev, "Sig=0x%x\n", sig); | ||
1543 | retval = -EIO; | ||
1544 | goto end; | ||
1545 | } | ||
1546 | |||
1547 | msleep(10); | ||
1554 | 1548 | ||
1555 | portcount = inw(base + 0x2); | 1549 | portcount = inw(base + 0x2); |
1556 | if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) && | 1550 | if (!inw(base + 0xe) & 0x1 || (portcount != 0 && portcount != 4 && |
1557 | (portcount != 4) && (portcount != 8))) { | 1551 | portcount != 8 && portcount != 16)) { |
1558 | dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n", | 1552 | dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure.", |
1559 | inw(base + 0x2), inw(base + 0xe)); | 1553 | card + 1); |
1560 | dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure " | ||
1561 | "(Possible bad I/O Port Address 0x%lx).\n", | ||
1562 | card + 1, base); | ||
1563 | retval = -EIO; | 1554 | retval = -EIO; |
1564 | goto end; | 1555 | goto end; |
1565 | } | 1556 | } |
1566 | 1557 | ||
1567 | switch (*signature) { | 1558 | switch (sig) { |
1568 | case 0xa5: | 1559 | case 0xa5: |
1569 | case 0xbb: | 1560 | case 0xbb: |
1570 | case 0xdd: | 1561 | case 0xdd: |
@@ -1572,16 +1563,13 @@ static int __devinit reset_card(struct pci_dev *pdev, | |||
1572 | board->shift_count = 12; | 1563 | board->shift_count = 12; |
1573 | break; | 1564 | break; |
1574 | case 0xcc: | 1565 | case 0xcc: |
1566 | case 0xee: | ||
1575 | board->port_count = 16; | 1567 | board->port_count = 16; |
1576 | board->shift_count = 11; | 1568 | board->shift_count = 11; |
1577 | break; | 1569 | break; |
1578 | default: | ||
1579 | dev_warn(&pdev->dev, "ISILoad:Card%d reset failure (Possible " | ||
1580 | "bad I/O Port Address 0x%lx).\n", card + 1, base); | ||
1581 | dev_dbg(&pdev->dev, "Sig=0x%lx\n", signature); | ||
1582 | retval = -EIO; | ||
1583 | } | 1570 | } |
1584 | dev_info(&pdev->dev, "-Done\n"); | 1571 | dev_info(&pdev->dev, "-Done\n"); |
1572 | *signature = sig; | ||
1585 | 1573 | ||
1586 | end: | 1574 | end: |
1587 | return retval; | 1575 | return retval; |
@@ -1757,7 +1745,7 @@ end: | |||
1757 | /* | 1745 | /* |
1758 | * Insmod can set static symbols so keep these static | 1746 | * Insmod can set static symbols so keep these static |
1759 | */ | 1747 | */ |
1760 | static int card; | 1748 | static unsigned int card_count; |
1761 | 1749 | ||
1762 | static int __devinit isicom_probe(struct pci_dev *pdev, | 1750 | static int __devinit isicom_probe(struct pci_dev *pdev, |
1763 | const struct pci_device_id *ent) | 1751 | const struct pci_device_id *ent) |
@@ -1767,7 +1755,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev, | |||
1767 | u8 pciirq; | 1755 | u8 pciirq; |
1768 | struct isi_board *board = NULL; | 1756 | struct isi_board *board = NULL; |
1769 | 1757 | ||
1770 | if (card >= BOARD_COUNT) | 1758 | if (card_count >= BOARD_COUNT) |
1771 | goto err; | 1759 | goto err; |
1772 | 1760 | ||
1773 | ioaddr = pci_resource_start(pdev, 3); | 1761 | ioaddr = pci_resource_start(pdev, 3); |
@@ -1785,7 +1773,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev, | |||
1785 | board->index = index; | 1773 | board->index = index; |
1786 | board->base = ioaddr; | 1774 | board->base = ioaddr; |
1787 | board->irq = pciirq; | 1775 | board->irq = pciirq; |
1788 | card++; | 1776 | card_count++; |
1789 | 1777 | ||
1790 | pci_set_drvdata(pdev, board); | 1778 | pci_set_drvdata(pdev, board); |
1791 | 1779 | ||
@@ -1795,7 +1783,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev, | |||
1795 | "will be disabled.\n", board->base, board->base + 15, | 1783 | "will be disabled.\n", board->base, board->base + 15, |
1796 | index + 1); | 1784 | index + 1); |
1797 | retval = -EBUSY; | 1785 | retval = -EBUSY; |
1798 | goto err; | 1786 | goto errdec; |
1799 | } | 1787 | } |
1800 | 1788 | ||
1801 | retval = request_irq(board->irq, isicom_interrupt, | 1789 | retval = request_irq(board->irq, isicom_interrupt, |
@@ -1824,8 +1812,10 @@ errunri: | |||
1824 | free_irq(board->irq, board); | 1812 | free_irq(board->irq, board); |
1825 | errunrr: | 1813 | errunrr: |
1826 | pci_release_region(pdev, 3); | 1814 | pci_release_region(pdev, 3); |
1827 | err: | 1815 | errdec: |
1828 | board->base = 0; | 1816 | board->base = 0; |
1817 | card_count--; | ||
1818 | err: | ||
1829 | return retval; | 1819 | return retval; |
1830 | } | 1820 | } |
1831 | 1821 | ||
@@ -1839,6 +1829,8 @@ static void __devexit isicom_remove(struct pci_dev *pdev) | |||
1839 | 1829 | ||
1840 | free_irq(board->irq, board); | 1830 | free_irq(board->irq, board); |
1841 | pci_release_region(pdev, 3); | 1831 | pci_release_region(pdev, 3); |
1832 | board->base = 0; | ||
1833 | card_count--; | ||
1842 | } | 1834 | } |
1843 | 1835 | ||
1844 | static int __init isicom_init(void) | 1836 | static int __init isicom_init(void) |
@@ -1846,8 +1838,6 @@ static int __init isicom_init(void) | |||
1846 | int retval, idx, channel; | 1838 | int retval, idx, channel; |
1847 | struct isi_port *port; | 1839 | struct isi_port *port; |
1848 | 1840 | ||
1849 | card = 0; | ||
1850 | |||
1851 | for(idx = 0; idx < BOARD_COUNT; idx++) { | 1841 | for(idx = 0; idx < BOARD_COUNT; idx++) { |
1852 | port = &isi_ports[idx * 16]; | 1842 | port = &isi_ports[idx * 16]; |
1853 | isi_card[idx].ports = port; | 1843 | isi_card[idx].ports = port; |
@@ -1858,8 +1848,6 @@ static int __init isicom_init(void) | |||
1858 | port->channel = channel; | 1848 | port->channel = channel; |
1859 | port->close_delay = 50 * HZ/100; | 1849 | port->close_delay = 50 * HZ/100; |
1860 | port->closing_wait = 3000 * HZ/100; | 1850 | port->closing_wait = 3000 * HZ/100; |
1861 | INIT_WORK(&port->hangup_tq, do_isicom_hangup); | ||
1862 | INIT_WORK(&port->bh_tqueue, isicom_bottomhalf); | ||
1863 | port->status = 0; | 1851 | port->status = 0; |
1864 | init_waitqueue_head(&port->open_wait); | 1852 | init_waitqueue_head(&port->open_wait); |
1865 | init_waitqueue_head(&port->close_wait); | 1853 | init_waitqueue_head(&port->close_wait); |
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 68645d351873..7b279d1de4a2 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -2424,7 +2424,6 @@ static int stli_hostcmd(struct stlibrd *brdp, struct stliport *portp) | |||
2424 | if (tty != NULL) { | 2424 | if (tty != NULL) { |
2425 | tty_wakeup(tty); | 2425 | tty_wakeup(tty); |
2426 | EBRDENABLE(brdp); | 2426 | EBRDENABLE(brdp); |
2427 | wake_up_interruptible(&tty->write_wait); | ||
2428 | } | 2427 | } |
2429 | } | 2428 | } |
2430 | 2429 | ||
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 7a6c1c0b7a95..c654a3e0c697 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -595,15 +595,9 @@ static void fn_spawn_con(struct vc_data *vc) | |||
595 | 595 | ||
596 | static void fn_SAK(struct vc_data *vc) | 596 | static void fn_SAK(struct vc_data *vc) |
597 | { | 597 | { |
598 | struct tty_struct *tty = vc->vc_tty; | 598 | struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work; |
599 | 599 | PREPARE_WORK(SAK_work, vc_SAK); | |
600 | /* | 600 | schedule_work(SAK_work); |
601 | * SAK should also work in all raw modes and reset | ||
602 | * them properly. | ||
603 | */ | ||
604 | if (tty) | ||
605 | do_SAK(tty); | ||
606 | reset_vc(vc); | ||
607 | } | 601 | } |
608 | 602 | ||
609 | static void fn_null(struct vc_data *vc) | 603 | static void fn_null(struct vc_data *vc) |
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index f391a24a1b44..7dbaee8d9402 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -11,15 +11,6 @@ | |||
11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
12 | * the Free Software Foundation; either version 2 of the License, or | 12 | * the Free Software Foundation; either version 2 of the License, or |
13 | * (at your option) any later version. | 13 | * (at your option) any later version. |
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | */ | 14 | */ |
24 | 15 | ||
25 | /* | 16 | /* |
@@ -55,36 +46,20 @@ | |||
55 | #include <asm/io.h> | 46 | #include <asm/io.h> |
56 | #include <asm/uaccess.h> | 47 | #include <asm/uaccess.h> |
57 | 48 | ||
58 | #define MOXA_VERSION "5.1k" | 49 | #define MOXA_VERSION "5.1k" |
59 | 50 | ||
60 | #define MOXAMAJOR 172 | 51 | #define MOXAMAJOR 172 |
61 | #define MOXACUMAJOR 173 | 52 | #define MOXACUMAJOR 173 |
62 | 53 | ||
63 | #define put_to_user(arg1, arg2) put_user(arg1, (unsigned long *)arg2) | 54 | #define MAX_BOARDS 4 /* Don't change this value */ |
64 | #define get_from_user(arg1, arg2) get_user(arg1, (unsigned int *)arg2) | ||
65 | |||
66 | #define MAX_BOARDS 4 /* Don't change this value */ | ||
67 | #define MAX_PORTS_PER_BOARD 32 /* Don't change this value */ | 55 | #define MAX_PORTS_PER_BOARD 32 /* Don't change this value */ |
68 | #define MAX_PORTS 128 /* Don't change this value */ | 56 | #define MAX_PORTS (MAX_BOARDS * MAX_PORTS_PER_BOARD) |
69 | 57 | ||
70 | /* | 58 | /* |
71 | * Define the Moxa PCI vendor and device IDs. | 59 | * Define the Moxa PCI vendor and device IDs. |
72 | */ | 60 | */ |
73 | #define MOXA_BUS_TYPE_ISA 0 | 61 | #define MOXA_BUS_TYPE_ISA 0 |
74 | #define MOXA_BUS_TYPE_PCI 1 | 62 | #define MOXA_BUS_TYPE_PCI 1 |
75 | |||
76 | #ifndef PCI_VENDOR_ID_MOXA | ||
77 | #define PCI_VENDOR_ID_MOXA 0x1393 | ||
78 | #endif | ||
79 | #ifndef PCI_DEVICE_ID_CP204J | ||
80 | #define PCI_DEVICE_ID_CP204J 0x2040 | ||
81 | #endif | ||
82 | #ifndef PCI_DEVICE_ID_C218 | ||
83 | #define PCI_DEVICE_ID_C218 0x2180 | ||
84 | #endif | ||
85 | #ifndef PCI_DEVICE_ID_C320 | ||
86 | #define PCI_DEVICE_ID_C320 0x3200 | ||
87 | #endif | ||
88 | 63 | ||
89 | enum { | 64 | enum { |
90 | MOXA_BOARD_C218_PCI = 1, | 65 | MOXA_BOARD_C218_PCI = 1, |
@@ -105,47 +80,56 @@ static char *moxa_brdname[] = | |||
105 | 80 | ||
106 | #ifdef CONFIG_PCI | 81 | #ifdef CONFIG_PCI |
107 | static struct pci_device_id moxa_pcibrds[] = { | 82 | static struct pci_device_id moxa_pcibrds[] = { |
108 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C218, PCI_ANY_ID, PCI_ANY_ID, | 83 | { PCI_DEVICE(PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_C218), |
109 | 0, 0, MOXA_BOARD_C218_PCI }, | 84 | .driver_data = MOXA_BOARD_C218_PCI }, |
110 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C320, PCI_ANY_ID, PCI_ANY_ID, | 85 | { PCI_DEVICE(PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_C320), |
111 | 0, 0, MOXA_BOARD_C320_PCI }, | 86 | .driver_data = MOXA_BOARD_C320_PCI }, |
112 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_CP204J, PCI_ANY_ID, PCI_ANY_ID, | 87 | { PCI_DEVICE(PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP204J), |
113 | 0, 0, MOXA_BOARD_CP204J }, | 88 | .driver_data = MOXA_BOARD_CP204J }, |
114 | { 0 } | 89 | { 0 } |
115 | }; | 90 | }; |
116 | MODULE_DEVICE_TABLE(pci, moxa_pcibrds); | 91 | MODULE_DEVICE_TABLE(pci, moxa_pcibrds); |
117 | #endif /* CONFIG_PCI */ | 92 | #endif /* CONFIG_PCI */ |
118 | 93 | ||
119 | typedef struct _moxa_isa_board_conf { | 94 | struct moxa_isa_board_conf { |
120 | int boardType; | 95 | int boardType; |
121 | int numPorts; | 96 | int numPorts; |
122 | unsigned long baseAddr; | 97 | unsigned long baseAddr; |
123 | } moxa_isa_board_conf; | 98 | }; |
124 | 99 | ||
125 | static moxa_isa_board_conf moxa_isa_boards[] = | 100 | static struct moxa_isa_board_conf moxa_isa_boards[] = |
126 | { | 101 | { |
127 | /* {MOXA_BOARD_C218_ISA,8,0xDC000}, */ | 102 | /* {MOXA_BOARD_C218_ISA,8,0xDC000}, */ |
128 | }; | 103 | }; |
129 | 104 | ||
130 | typedef struct _moxa_pci_devinfo { | 105 | static struct moxa_board_conf { |
131 | ushort busNum; | ||
132 | ushort devNum; | ||
133 | struct pci_dev *pdev; | ||
134 | } moxa_pci_devinfo; | ||
135 | |||
136 | typedef struct _moxa_board_conf { | ||
137 | int boardType; | 106 | int boardType; |
138 | int numPorts; | 107 | int numPorts; |
139 | unsigned long baseAddr; | 108 | unsigned long baseAddr; |
140 | int busType; | 109 | int busType; |
141 | moxa_pci_devinfo pciInfo; | ||
142 | } moxa_board_conf; | ||
143 | 110 | ||
144 | static moxa_board_conf moxa_boards[MAX_BOARDS]; | 111 | int loadstat; |
145 | static void __iomem *moxaBaseAddr[MAX_BOARDS]; | 112 | |
146 | static int loadstat[MAX_BOARDS]; | 113 | void __iomem *basemem; |
114 | void __iomem *intNdx; | ||
115 | void __iomem *intPend; | ||
116 | void __iomem *intTable; | ||
117 | } moxa_boards[MAX_BOARDS]; | ||
118 | |||
119 | struct mxser_mstatus { | ||
120 | tcflag_t cflag; | ||
121 | int cts; | ||
122 | int dsr; | ||
123 | int ri; | ||
124 | int dcd; | ||
125 | }; | ||
126 | |||
127 | struct moxaq_str { | ||
128 | int inq; | ||
129 | int outq; | ||
130 | }; | ||
147 | 131 | ||
148 | struct moxa_str { | 132 | struct moxa_port { |
149 | int type; | 133 | int type; |
150 | int port; | 134 | int port; |
151 | int close_delay; | 135 | int close_delay; |
@@ -159,18 +143,18 @@ struct moxa_str { | |||
159 | int cflag; | 143 | int cflag; |
160 | wait_queue_head_t open_wait; | 144 | wait_queue_head_t open_wait; |
161 | wait_queue_head_t close_wait; | 145 | wait_queue_head_t close_wait; |
162 | struct work_struct tqueue; | ||
163 | }; | ||
164 | 146 | ||
165 | struct mxser_mstatus { | 147 | struct timer_list emptyTimer; |
166 | tcflag_t cflag; | ||
167 | int cts; | ||
168 | int dsr; | ||
169 | int ri; | ||
170 | int dcd; | ||
171 | }; | ||
172 | 148 | ||
173 | static struct mxser_mstatus GMStatus[MAX_PORTS]; | 149 | char chkPort; |
150 | char lineCtrl; | ||
151 | void __iomem *tableAddr; | ||
152 | long curBaud; | ||
153 | char DCDState; | ||
154 | char lowChkFlag; | ||
155 | |||
156 | ushort breakCnt; | ||
157 | }; | ||
174 | 158 | ||
175 | /* statusflags */ | 159 | /* statusflags */ |
176 | #define TXSTOPPED 0x1 | 160 | #define TXSTOPPED 0x1 |
@@ -178,25 +162,17 @@ static struct mxser_mstatus GMStatus[MAX_PORTS]; | |||
178 | #define EMPTYWAIT 0x4 | 162 | #define EMPTYWAIT 0x4 |
179 | #define THROTTLE 0x8 | 163 | #define THROTTLE 0x8 |
180 | 164 | ||
181 | /* event */ | ||
182 | #define MOXA_EVENT_HANGUP 1 | ||
183 | |||
184 | #define SERIAL_DO_RESTART | 165 | #define SERIAL_DO_RESTART |
185 | 166 | ||
186 | |||
187 | #define SERIAL_TYPE_NORMAL 1 | ||
188 | |||
189 | #define WAKEUP_CHARS 256 | 167 | #define WAKEUP_CHARS 256 |
190 | 168 | ||
191 | #define PORTNO(x) ((x)->index) | ||
192 | |||
193 | static int verbose = 0; | 169 | static int verbose = 0; |
194 | static int ttymajor = MOXAMAJOR; | 170 | static int ttymajor = MOXAMAJOR; |
195 | /* Variables for insmod */ | 171 | /* Variables for insmod */ |
196 | #ifdef MODULE | 172 | #ifdef MODULE |
197 | static int baseaddr[] = {0, 0, 0, 0}; | 173 | static int baseaddr[4]; |
198 | static int type[] = {0, 0, 0, 0}; | 174 | static int type[4]; |
199 | static int numports[] = {0, 0, 0, 0}; | 175 | static int numports[4]; |
200 | #endif | 176 | #endif |
201 | 177 | ||
202 | MODULE_AUTHOR("William Chen"); | 178 | MODULE_AUTHOR("William Chen"); |
@@ -210,19 +186,9 @@ module_param_array(numports, int, NULL, 0); | |||
210 | module_param(ttymajor, int, 0); | 186 | module_param(ttymajor, int, 0); |
211 | module_param(verbose, bool, 0644); | 187 | module_param(verbose, bool, 0644); |
212 | 188 | ||
213 | static struct tty_driver *moxaDriver; | ||
214 | static struct moxa_str moxaChannels[MAX_PORTS]; | ||
215 | static unsigned char *moxaXmitBuff; | ||
216 | static int moxaTimer_on; | ||
217 | static struct timer_list moxaTimer; | ||
218 | static int moxaEmptyTimer_on[MAX_PORTS]; | ||
219 | static struct timer_list moxaEmptyTimer[MAX_PORTS]; | ||
220 | static struct semaphore moxaBuffSem; | ||
221 | |||
222 | /* | 189 | /* |
223 | * static functions: | 190 | * static functions: |
224 | */ | 191 | */ |
225 | static void do_moxa_softint(struct work_struct *); | ||
226 | static int moxa_open(struct tty_struct *, struct file *); | 192 | static int moxa_open(struct tty_struct *, struct file *); |
227 | static void moxa_close(struct tty_struct *, struct file *); | 193 | static void moxa_close(struct tty_struct *, struct file *); |
228 | static int moxa_write(struct tty_struct *, const unsigned char *, int); | 194 | static int moxa_write(struct tty_struct *, const unsigned char *, int); |
@@ -244,11 +210,11 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file, | |||
244 | static void moxa_poll(unsigned long); | 210 | static void moxa_poll(unsigned long); |
245 | static void set_tty_param(struct tty_struct *); | 211 | static void set_tty_param(struct tty_struct *); |
246 | static int block_till_ready(struct tty_struct *, struct file *, | 212 | static int block_till_ready(struct tty_struct *, struct file *, |
247 | struct moxa_str *); | 213 | struct moxa_port *); |
248 | static void setup_empty_event(struct tty_struct *); | 214 | static void setup_empty_event(struct tty_struct *); |
249 | static void check_xmit_empty(unsigned long); | 215 | static void check_xmit_empty(unsigned long); |
250 | static void shut_down(struct moxa_str *); | 216 | static void shut_down(struct moxa_port *); |
251 | static void receive_data(struct moxa_str *); | 217 | static void receive_data(struct moxa_port *); |
252 | /* | 218 | /* |
253 | * moxa board interface functions: | 219 | * moxa board interface functions: |
254 | */ | 220 | */ |
@@ -278,8 +244,8 @@ static void MoxaPortTxDisable(int); | |||
278 | static void MoxaPortTxEnable(int); | 244 | static void MoxaPortTxEnable(int); |
279 | static int MoxaPortResetBrkCnt(int); | 245 | static int MoxaPortResetBrkCnt(int); |
280 | static void MoxaPortSendBreak(int, int); | 246 | static void MoxaPortSendBreak(int, int); |
281 | static int moxa_get_serial_info(struct moxa_str *, struct serial_struct __user *); | 247 | static int moxa_get_serial_info(struct moxa_port *, struct serial_struct __user *); |
282 | static int moxa_set_serial_info(struct moxa_str *, struct serial_struct __user *); | 248 | static int moxa_set_serial_info(struct moxa_port *, struct serial_struct __user *); |
283 | static void MoxaSetFifo(int port, int enable); | 249 | static void MoxaSetFifo(int port, int enable); |
284 | 250 | ||
285 | static const struct tty_operations moxa_ops = { | 251 | static const struct tty_operations moxa_ops = { |
@@ -302,12 +268,41 @@ static const struct tty_operations moxa_ops = { | |||
302 | .tiocmset = moxa_tiocmset, | 268 | .tiocmset = moxa_tiocmset, |
303 | }; | 269 | }; |
304 | 270 | ||
271 | static struct tty_driver *moxaDriver; | ||
272 | static struct moxa_port moxa_ports[MAX_PORTS]; | ||
273 | static DEFINE_TIMER(moxaTimer, moxa_poll, 0, 0); | ||
305 | static DEFINE_SPINLOCK(moxa_lock); | 274 | static DEFINE_SPINLOCK(moxa_lock); |
306 | 275 | ||
307 | #ifdef CONFIG_PCI | 276 | #ifdef CONFIG_PCI |
308 | static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board) | 277 | static int __devinit moxa_pci_probe(struct pci_dev *pdev, |
278 | const struct pci_device_id *ent) | ||
309 | { | 279 | { |
310 | board->baseAddr = pci_resource_start (p, 2); | 280 | struct moxa_board_conf *board; |
281 | unsigned int i; | ||
282 | int board_type = ent->driver_data; | ||
283 | int retval; | ||
284 | |||
285 | retval = pci_enable_device(pdev); | ||
286 | if (retval) | ||
287 | goto err; | ||
288 | |||
289 | for (i = 0; i < MAX_BOARDS; i++) | ||
290 | if (moxa_boards[i].basemem == NULL) | ||
291 | break; | ||
292 | |||
293 | retval = -ENODEV; | ||
294 | if (i >= MAX_BOARDS) { | ||
295 | if (verbose) | ||
296 | printk("More than %d MOXA Intellio family boards " | ||
297 | "found. Board is ignored.\n", MAX_BOARDS); | ||
298 | goto err; | ||
299 | } | ||
300 | |||
301 | board = &moxa_boards[i]; | ||
302 | board->basemem = pci_iomap(pdev, 2, 0x4000); | ||
303 | if (board->basemem == NULL) | ||
304 | goto err; | ||
305 | |||
311 | board->boardType = board_type; | 306 | board->boardType = board_type; |
312 | switch (board_type) { | 307 | switch (board_type) { |
313 | case MOXA_BOARD_C218_ISA: | 308 | case MOXA_BOARD_C218_ISA: |
@@ -323,27 +318,40 @@ static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf | |||
323 | break; | 318 | break; |
324 | } | 319 | } |
325 | board->busType = MOXA_BUS_TYPE_PCI; | 320 | board->busType = MOXA_BUS_TYPE_PCI; |
326 | board->pciInfo.busNum = p->bus->number; | 321 | |
327 | board->pciInfo.devNum = p->devfn >> 3; | 322 | pci_set_drvdata(pdev, board); |
328 | board->pciInfo.pdev = p; | ||
329 | /* don't lose the reference in the next pci_get_device iteration */ | ||
330 | pci_dev_get(p); | ||
331 | 323 | ||
332 | return (0); | 324 | return (0); |
325 | err: | ||
326 | return retval; | ||
333 | } | 327 | } |
328 | |||
329 | static void __devexit moxa_pci_remove(struct pci_dev *pdev) | ||
330 | { | ||
331 | struct moxa_board_conf *brd = pci_get_drvdata(pdev); | ||
332 | |||
333 | pci_iounmap(pdev, brd->basemem); | ||
334 | brd->basemem = NULL; | ||
335 | } | ||
336 | |||
337 | static struct pci_driver moxa_pci_driver = { | ||
338 | .name = "moxa", | ||
339 | .id_table = moxa_pcibrds, | ||
340 | .probe = moxa_pci_probe, | ||
341 | .remove = __devexit_p(moxa_pci_remove) | ||
342 | }; | ||
334 | #endif /* CONFIG_PCI */ | 343 | #endif /* CONFIG_PCI */ |
335 | 344 | ||
336 | static int __init moxa_init(void) | 345 | static int __init moxa_init(void) |
337 | { | 346 | { |
338 | int i, numBoards; | 347 | int i, numBoards, retval = 0; |
339 | struct moxa_str *ch; | 348 | struct moxa_port *ch; |
340 | 349 | ||
341 | printk(KERN_INFO "MOXA Intellio family driver version %s\n", MOXA_VERSION); | 350 | printk(KERN_INFO "MOXA Intellio family driver version %s\n", MOXA_VERSION); |
342 | moxaDriver = alloc_tty_driver(MAX_PORTS + 1); | 351 | moxaDriver = alloc_tty_driver(MAX_PORTS + 1); |
343 | if (!moxaDriver) | 352 | if (!moxaDriver) |
344 | return -ENOMEM; | 353 | return -ENOMEM; |
345 | 354 | ||
346 | init_MUTEX(&moxaBuffSem); | ||
347 | moxaDriver->owner = THIS_MODULE; | 355 | moxaDriver->owner = THIS_MODULE; |
348 | moxaDriver->name = "ttyMX"; | 356 | moxaDriver->name = "ttyMX"; |
349 | moxaDriver->major = ttymajor; | 357 | moxaDriver->major = ttymajor; |
@@ -351,40 +359,25 @@ static int __init moxa_init(void) | |||
351 | moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; | 359 | moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; |
352 | moxaDriver->subtype = SERIAL_TYPE_NORMAL; | 360 | moxaDriver->subtype = SERIAL_TYPE_NORMAL; |
353 | moxaDriver->init_termios = tty_std_termios; | 361 | moxaDriver->init_termios = tty_std_termios; |
354 | moxaDriver->init_termios.c_iflag = 0; | ||
355 | moxaDriver->init_termios.c_oflag = 0; | ||
356 | moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; | 362 | moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; |
357 | moxaDriver->init_termios.c_lflag = 0; | ||
358 | moxaDriver->init_termios.c_ispeed = 9600; | 363 | moxaDriver->init_termios.c_ispeed = 9600; |
359 | moxaDriver->init_termios.c_ospeed = 9600; | 364 | moxaDriver->init_termios.c_ospeed = 9600; |
360 | moxaDriver->flags = TTY_DRIVER_REAL_RAW; | 365 | moxaDriver->flags = TTY_DRIVER_REAL_RAW; |
361 | tty_set_operations(moxaDriver, &moxa_ops); | 366 | tty_set_operations(moxaDriver, &moxa_ops); |
362 | 367 | ||
363 | moxaXmitBuff = NULL; | 368 | for (i = 0, ch = moxa_ports; i < MAX_PORTS; i++, ch++) { |
364 | |||
365 | for (i = 0, ch = moxaChannels; i < MAX_PORTS; i++, ch++) { | ||
366 | ch->type = PORT_16550A; | 369 | ch->type = PORT_16550A; |
367 | ch->port = i; | 370 | ch->port = i; |
368 | INIT_WORK(&ch->tqueue, do_moxa_softint); | ||
369 | ch->tty = NULL; | ||
370 | ch->close_delay = 5 * HZ / 10; | 371 | ch->close_delay = 5 * HZ / 10; |
371 | ch->closing_wait = 30 * HZ; | 372 | ch->closing_wait = 30 * HZ; |
372 | ch->count = 0; | ||
373 | ch->blocked_open = 0; | ||
374 | ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; | 373 | ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; |
375 | init_waitqueue_head(&ch->open_wait); | 374 | init_waitqueue_head(&ch->open_wait); |
376 | init_waitqueue_head(&ch->close_wait); | 375 | init_waitqueue_head(&ch->close_wait); |
377 | } | ||
378 | 376 | ||
379 | for (i = 0; i < MAX_BOARDS; i++) { | 377 | setup_timer(&ch->emptyTimer, check_xmit_empty, |
380 | moxa_boards[i].boardType = 0; | 378 | (unsigned long)ch); |
381 | moxa_boards[i].numPorts = 0; | ||
382 | moxa_boards[i].baseAddr = 0; | ||
383 | moxa_boards[i].busType = 0; | ||
384 | moxa_boards[i].pciInfo.busNum = 0; | ||
385 | moxa_boards[i].pciInfo.devNum = 0; | ||
386 | } | 379 | } |
387 | MoxaDriverInit(); | 380 | |
388 | printk("Tty devices major number = %d\n", ttymajor); | 381 | printk("Tty devices major number = %d\n", ttymajor); |
389 | 382 | ||
390 | if (tty_register_driver(moxaDriver)) { | 383 | if (tty_register_driver(moxaDriver)) { |
@@ -392,18 +385,8 @@ static int __init moxa_init(void) | |||
392 | put_tty_driver(moxaDriver); | 385 | put_tty_driver(moxaDriver); |
393 | return -1; | 386 | return -1; |
394 | } | 387 | } |
395 | for (i = 0; i < MAX_PORTS; i++) { | ||
396 | init_timer(&moxaEmptyTimer[i]); | ||
397 | moxaEmptyTimer[i].function = check_xmit_empty; | ||
398 | moxaEmptyTimer[i].data = (unsigned long) & moxaChannels[i]; | ||
399 | moxaEmptyTimer_on[i] = 0; | ||
400 | } | ||
401 | 388 | ||
402 | init_timer(&moxaTimer); | 389 | mod_timer(&moxaTimer, jiffies + HZ / 50); |
403 | moxaTimer.function = moxa_poll; | ||
404 | moxaTimer.expires = jiffies + (HZ / 50); | ||
405 | moxaTimer_on = 1; | ||
406 | add_timer(&moxaTimer); | ||
407 | 390 | ||
408 | /* Find the boards defined in source code */ | 391 | /* Find the boards defined in source code */ |
409 | numBoards = 0; | 392 | numBoards = 0; |
@@ -451,35 +434,22 @@ static int __init moxa_init(void) | |||
451 | } | 434 | } |
452 | } | 435 | } |
453 | #endif | 436 | #endif |
454 | /* Find PCI boards here */ | 437 | |
455 | #ifdef CONFIG_PCI | 438 | #ifdef CONFIG_PCI |
456 | { | 439 | retval = pci_register_driver(&moxa_pci_driver); |
457 | struct pci_dev *p = NULL; | 440 | if (retval) { |
458 | int n = ARRAY_SIZE(moxa_pcibrds) - 1; | 441 | printk(KERN_ERR "Can't register moxa pci driver!\n"); |
459 | i = 0; | 442 | if (numBoards) |
460 | while (i < n) { | 443 | retval = 0; |
461 | while ((p = pci_get_device(moxa_pcibrds[i].vendor, moxa_pcibrds[i].device, p))!=NULL) | ||
462 | { | ||
463 | if (pci_enable_device(p)) | ||
464 | continue; | ||
465 | if (numBoards >= MAX_BOARDS) { | ||
466 | if (verbose) | ||
467 | printk("More than %d MOXA Intellio family boards found. Board is ignored.", MAX_BOARDS); | ||
468 | } else { | ||
469 | moxa_get_PCI_conf(p, moxa_pcibrds[i].driver_data, | ||
470 | &moxa_boards[numBoards]); | ||
471 | numBoards++; | ||
472 | } | ||
473 | } | ||
474 | i++; | ||
475 | } | ||
476 | } | 444 | } |
477 | #endif | 445 | #endif |
446 | |||
478 | for (i = 0; i < numBoards; i++) { | 447 | for (i = 0; i < numBoards; i++) { |
479 | moxaBaseAddr[i] = ioremap((unsigned long) moxa_boards[i].baseAddr, 0x4000); | 448 | moxa_boards[i].basemem = ioremap(moxa_boards[i].baseAddr, |
449 | 0x4000); | ||
480 | } | 450 | } |
481 | 451 | ||
482 | return (0); | 452 | return retval; |
483 | } | 453 | } |
484 | 454 | ||
485 | static void __exit moxa_exit(void) | 455 | static void __exit moxa_exit(void) |
@@ -489,23 +459,22 @@ static void __exit moxa_exit(void) | |||
489 | if (verbose) | 459 | if (verbose) |
490 | printk("Unloading module moxa ...\n"); | 460 | printk("Unloading module moxa ...\n"); |
491 | 461 | ||
492 | if (moxaTimer_on) | 462 | del_timer_sync(&moxaTimer); |
493 | del_timer(&moxaTimer); | ||
494 | 463 | ||
495 | for (i = 0; i < MAX_PORTS; i++) | 464 | for (i = 0; i < MAX_PORTS; i++) |
496 | if (moxaEmptyTimer_on[i]) | 465 | del_timer_sync(&moxa_ports[i].emptyTimer); |
497 | del_timer(&moxaEmptyTimer[i]); | ||
498 | 466 | ||
499 | if (tty_unregister_driver(moxaDriver)) | 467 | if (tty_unregister_driver(moxaDriver)) |
500 | printk("Couldn't unregister MOXA Intellio family serial driver\n"); | 468 | printk("Couldn't unregister MOXA Intellio family serial driver\n"); |
501 | put_tty_driver(moxaDriver); | 469 | put_tty_driver(moxaDriver); |
502 | 470 | ||
503 | for (i = 0; i < MAX_BOARDS; i++) { | 471 | #ifdef CONFIG_PCI |
504 | if (moxaBaseAddr[i]) | 472 | pci_unregister_driver(&moxa_pci_driver); |
505 | iounmap(moxaBaseAddr[i]); | 473 | #endif |
506 | if (moxa_boards[i].busType == MOXA_BUS_TYPE_PCI) | 474 | |
507 | pci_dev_put(moxa_boards[i].pciInfo.pdev); | 475 | for (i = 0; i < MAX_BOARDS; i++) |
508 | } | 476 | if (moxa_boards[i].basemem) |
477 | iounmap(moxa_boards[i].basemem); | ||
509 | 478 | ||
510 | if (verbose) | 479 | if (verbose) |
511 | printk("Done\n"); | 480 | printk("Done\n"); |
@@ -514,28 +483,13 @@ static void __exit moxa_exit(void) | |||
514 | module_init(moxa_init); | 483 | module_init(moxa_init); |
515 | module_exit(moxa_exit); | 484 | module_exit(moxa_exit); |
516 | 485 | ||
517 | static void do_moxa_softint(struct work_struct *work) | ||
518 | { | ||
519 | struct moxa_str *ch = container_of(work, struct moxa_str, tqueue); | ||
520 | struct tty_struct *tty; | ||
521 | |||
522 | if (ch && (tty = ch->tty)) { | ||
523 | if (test_and_clear_bit(MOXA_EVENT_HANGUP, &ch->event)) { | ||
524 | tty_hangup(tty); /* FIXME: module removal race here - AKPM */ | ||
525 | wake_up_interruptible(&ch->open_wait); | ||
526 | ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE; | ||
527 | } | ||
528 | } | ||
529 | } | ||
530 | |||
531 | static int moxa_open(struct tty_struct *tty, struct file *filp) | 486 | static int moxa_open(struct tty_struct *tty, struct file *filp) |
532 | { | 487 | { |
533 | struct moxa_str *ch; | 488 | struct moxa_port *ch; |
534 | int port; | 489 | int port; |
535 | int retval; | 490 | int retval; |
536 | unsigned long page; | ||
537 | 491 | ||
538 | port = PORTNO(tty); | 492 | port = tty->index; |
539 | if (port == MAX_PORTS) { | 493 | if (port == MAX_PORTS) { |
540 | return (0); | 494 | return (0); |
541 | } | 495 | } |
@@ -543,23 +497,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp) | |||
543 | tty->driver_data = NULL; | 497 | tty->driver_data = NULL; |
544 | return (-ENODEV); | 498 | return (-ENODEV); |
545 | } | 499 | } |
546 | down(&moxaBuffSem); | ||
547 | if (!moxaXmitBuff) { | ||
548 | page = get_zeroed_page(GFP_KERNEL); | ||
549 | if (!page) { | ||
550 | up(&moxaBuffSem); | ||
551 | return (-ENOMEM); | ||
552 | } | ||
553 | /* This test is guarded by the BuffSem so no longer needed | ||
554 | delete me in 2.5 */ | ||
555 | if (moxaXmitBuff) | ||
556 | free_page(page); | ||
557 | else | ||
558 | moxaXmitBuff = (unsigned char *) page; | ||
559 | } | ||
560 | up(&moxaBuffSem); | ||
561 | 500 | ||
562 | ch = &moxaChannels[port]; | 501 | ch = &moxa_ports[port]; |
563 | ch->count++; | 502 | ch->count++; |
564 | tty->driver_data = ch; | 503 | tty->driver_data = ch; |
565 | ch->tty = tty; | 504 | ch->tty = tty; |
@@ -585,10 +524,10 @@ static int moxa_open(struct tty_struct *tty, struct file *filp) | |||
585 | 524 | ||
586 | static void moxa_close(struct tty_struct *tty, struct file *filp) | 525 | static void moxa_close(struct tty_struct *tty, struct file *filp) |
587 | { | 526 | { |
588 | struct moxa_str *ch; | 527 | struct moxa_port *ch; |
589 | int port; | 528 | int port; |
590 | 529 | ||
591 | port = PORTNO(tty); | 530 | port = tty->index; |
592 | if (port == MAX_PORTS) { | 531 | if (port == MAX_PORTS) { |
593 | return; | 532 | return; |
594 | } | 533 | } |
@@ -605,7 +544,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp) | |||
605 | if (tty_hung_up_p(filp)) { | 544 | if (tty_hung_up_p(filp)) { |
606 | return; | 545 | return; |
607 | } | 546 | } |
608 | ch = (struct moxa_str *) tty->driver_data; | 547 | ch = (struct moxa_port *) tty->driver_data; |
609 | 548 | ||
610 | if ((tty->count == 1) && (ch->count != 1)) { | 549 | if ((tty->count == 1) && (ch->count != 1)) { |
611 | printk("moxa_close: bad serial port count; tty->count is 1, " | 550 | printk("moxa_close: bad serial port count; tty->count is 1, " |
@@ -626,8 +565,7 @@ static void moxa_close(struct tty_struct *tty, struct file *filp) | |||
626 | if (ch->asyncflags & ASYNC_INITIALIZED) { | 565 | if (ch->asyncflags & ASYNC_INITIALIZED) { |
627 | setup_empty_event(tty); | 566 | setup_empty_event(tty); |
628 | tty_wait_until_sent(tty, 30 * HZ); /* 30 seconds timeout */ | 567 | tty_wait_until_sent(tty, 30 * HZ); /* 30 seconds timeout */ |
629 | moxaEmptyTimer_on[ch->port] = 0; | 568 | del_timer_sync(&moxa_ports[ch->port].emptyTimer); |
630 | del_timer(&moxaEmptyTimer[ch->port]); | ||
631 | } | 569 | } |
632 | shut_down(ch); | 570 | shut_down(ch); |
633 | MoxaPortFlushData(port, 2); | 571 | MoxaPortFlushData(port, 2); |
@@ -652,11 +590,11 @@ static void moxa_close(struct tty_struct *tty, struct file *filp) | |||
652 | static int moxa_write(struct tty_struct *tty, | 590 | static int moxa_write(struct tty_struct *tty, |
653 | const unsigned char *buf, int count) | 591 | const unsigned char *buf, int count) |
654 | { | 592 | { |
655 | struct moxa_str *ch; | 593 | struct moxa_port *ch; |
656 | int len, port; | 594 | int len, port; |
657 | unsigned long flags; | 595 | unsigned long flags; |
658 | 596 | ||
659 | ch = (struct moxa_str *) tty->driver_data; | 597 | ch = (struct moxa_port *) tty->driver_data; |
660 | if (ch == NULL) | 598 | if (ch == NULL) |
661 | return (0); | 599 | return (0); |
662 | port = ch->port; | 600 | port = ch->port; |
@@ -675,11 +613,11 @@ static int moxa_write(struct tty_struct *tty, | |||
675 | 613 | ||
676 | static int moxa_write_room(struct tty_struct *tty) | 614 | static int moxa_write_room(struct tty_struct *tty) |
677 | { | 615 | { |
678 | struct moxa_str *ch; | 616 | struct moxa_port *ch; |
679 | 617 | ||
680 | if (tty->stopped) | 618 | if (tty->stopped) |
681 | return (0); | 619 | return (0); |
682 | ch = (struct moxa_str *) tty->driver_data; | 620 | ch = (struct moxa_port *) tty->driver_data; |
683 | if (ch == NULL) | 621 | if (ch == NULL) |
684 | return (0); | 622 | return (0); |
685 | return (MoxaPortTxFree(ch->port)); | 623 | return (MoxaPortTxFree(ch->port)); |
@@ -687,7 +625,7 @@ static int moxa_write_room(struct tty_struct *tty) | |||
687 | 625 | ||
688 | static void moxa_flush_buffer(struct tty_struct *tty) | 626 | static void moxa_flush_buffer(struct tty_struct *tty) |
689 | { | 627 | { |
690 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 628 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
691 | 629 | ||
692 | if (ch == NULL) | 630 | if (ch == NULL) |
693 | return; | 631 | return; |
@@ -698,7 +636,7 @@ static void moxa_flush_buffer(struct tty_struct *tty) | |||
698 | static int moxa_chars_in_buffer(struct tty_struct *tty) | 636 | static int moxa_chars_in_buffer(struct tty_struct *tty) |
699 | { | 637 | { |
700 | int chars; | 638 | int chars; |
701 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 639 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
702 | 640 | ||
703 | /* | 641 | /* |
704 | * Sigh...I have to check if driver_data is NULL here, because | 642 | * Sigh...I have to check if driver_data is NULL here, because |
@@ -730,17 +668,16 @@ static void moxa_flush_chars(struct tty_struct *tty) | |||
730 | 668 | ||
731 | static void moxa_put_char(struct tty_struct *tty, unsigned char c) | 669 | static void moxa_put_char(struct tty_struct *tty, unsigned char c) |
732 | { | 670 | { |
733 | struct moxa_str *ch; | 671 | struct moxa_port *ch; |
734 | int port; | 672 | int port; |
735 | unsigned long flags; | 673 | unsigned long flags; |
736 | 674 | ||
737 | ch = (struct moxa_str *) tty->driver_data; | 675 | ch = (struct moxa_port *) tty->driver_data; |
738 | if (ch == NULL) | 676 | if (ch == NULL) |
739 | return; | 677 | return; |
740 | port = ch->port; | 678 | port = ch->port; |
741 | spin_lock_irqsave(&moxa_lock, flags); | 679 | spin_lock_irqsave(&moxa_lock, flags); |
742 | moxaXmitBuff[0] = c; | 680 | MoxaPortWriteData(port, &c, 1); |
743 | MoxaPortWriteData(port, moxaXmitBuff, 1); | ||
744 | spin_unlock_irqrestore(&moxa_lock, flags); | 681 | spin_unlock_irqrestore(&moxa_lock, flags); |
745 | /************************************************ | 682 | /************************************************ |
746 | if ( !(ch->statusflags & LOWWAIT) && (MoxaPortTxFree(port) <= 100) ) | 683 | if ( !(ch->statusflags & LOWWAIT) && (MoxaPortTxFree(port) <= 100) ) |
@@ -750,11 +687,11 @@ static void moxa_put_char(struct tty_struct *tty, unsigned char c) | |||
750 | 687 | ||
751 | static int moxa_tiocmget(struct tty_struct *tty, struct file *file) | 688 | static int moxa_tiocmget(struct tty_struct *tty, struct file *file) |
752 | { | 689 | { |
753 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 690 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
754 | int port; | 691 | int port; |
755 | int flag = 0, dtr, rts; | 692 | int flag = 0, dtr, rts; |
756 | 693 | ||
757 | port = PORTNO(tty); | 694 | port = tty->index; |
758 | if ((port != MAX_PORTS) && (!ch)) | 695 | if ((port != MAX_PORTS) && (!ch)) |
759 | return (-EINVAL); | 696 | return (-EINVAL); |
760 | 697 | ||
@@ -776,11 +713,11 @@ static int moxa_tiocmget(struct tty_struct *tty, struct file *file) | |||
776 | static int moxa_tiocmset(struct tty_struct *tty, struct file *file, | 713 | static int moxa_tiocmset(struct tty_struct *tty, struct file *file, |
777 | unsigned int set, unsigned int clear) | 714 | unsigned int set, unsigned int clear) |
778 | { | 715 | { |
779 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 716 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
780 | int port; | 717 | int port; |
781 | int dtr, rts; | 718 | int dtr, rts; |
782 | 719 | ||
783 | port = PORTNO(tty); | 720 | port = tty->index; |
784 | if ((port != MAX_PORTS) && (!ch)) | 721 | if ((port != MAX_PORTS) && (!ch)) |
785 | return (-EINVAL); | 722 | return (-EINVAL); |
786 | 723 | ||
@@ -800,12 +737,12 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file, | |||
800 | static int moxa_ioctl(struct tty_struct *tty, struct file *file, | 737 | static int moxa_ioctl(struct tty_struct *tty, struct file *file, |
801 | unsigned int cmd, unsigned long arg) | 738 | unsigned int cmd, unsigned long arg) |
802 | { | 739 | { |
803 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 740 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
804 | register int port; | 741 | register int port; |
805 | void __user *argp = (void __user *)arg; | 742 | void __user *argp = (void __user *)arg; |
806 | int retval; | 743 | int retval; |
807 | 744 | ||
808 | port = PORTNO(tty); | 745 | port = tty->index; |
809 | if ((port != MAX_PORTS) && (!ch)) | 746 | if ((port != MAX_PORTS) && (!ch)) |
810 | return (-EINVAL); | 747 | return (-EINVAL); |
811 | 748 | ||
@@ -853,14 +790,14 @@ static int moxa_ioctl(struct tty_struct *tty, struct file *file, | |||
853 | 790 | ||
854 | static void moxa_throttle(struct tty_struct *tty) | 791 | static void moxa_throttle(struct tty_struct *tty) |
855 | { | 792 | { |
856 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 793 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
857 | 794 | ||
858 | ch->statusflags |= THROTTLE; | 795 | ch->statusflags |= THROTTLE; |
859 | } | 796 | } |
860 | 797 | ||
861 | static void moxa_unthrottle(struct tty_struct *tty) | 798 | static void moxa_unthrottle(struct tty_struct *tty) |
862 | { | 799 | { |
863 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 800 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
864 | 801 | ||
865 | ch->statusflags &= ~THROTTLE; | 802 | ch->statusflags &= ~THROTTLE; |
866 | } | 803 | } |
@@ -868,7 +805,7 @@ static void moxa_unthrottle(struct tty_struct *tty) | |||
868 | static void moxa_set_termios(struct tty_struct *tty, | 805 | static void moxa_set_termios(struct tty_struct *tty, |
869 | struct ktermios *old_termios) | 806 | struct ktermios *old_termios) |
870 | { | 807 | { |
871 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 808 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
872 | 809 | ||
873 | if (ch == NULL) | 810 | if (ch == NULL) |
874 | return; | 811 | return; |
@@ -880,7 +817,7 @@ static void moxa_set_termios(struct tty_struct *tty, | |||
880 | 817 | ||
881 | static void moxa_stop(struct tty_struct *tty) | 818 | static void moxa_stop(struct tty_struct *tty) |
882 | { | 819 | { |
883 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 820 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
884 | 821 | ||
885 | if (ch == NULL) | 822 | if (ch == NULL) |
886 | return; | 823 | return; |
@@ -891,7 +828,7 @@ static void moxa_stop(struct tty_struct *tty) | |||
891 | 828 | ||
892 | static void moxa_start(struct tty_struct *tty) | 829 | static void moxa_start(struct tty_struct *tty) |
893 | { | 830 | { |
894 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 831 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
895 | 832 | ||
896 | if (ch == NULL) | 833 | if (ch == NULL) |
897 | return; | 834 | return; |
@@ -905,7 +842,7 @@ static void moxa_start(struct tty_struct *tty) | |||
905 | 842 | ||
906 | static void moxa_hangup(struct tty_struct *tty) | 843 | static void moxa_hangup(struct tty_struct *tty) |
907 | { | 844 | { |
908 | struct moxa_str *ch = (struct moxa_str *) tty->driver_data; | 845 | struct moxa_port *ch = (struct moxa_port *) tty->driver_data; |
909 | 846 | ||
910 | moxa_flush_buffer(tty); | 847 | moxa_flush_buffer(tty); |
911 | shut_down(ch); | 848 | shut_down(ch); |
@@ -919,24 +856,20 @@ static void moxa_hangup(struct tty_struct *tty) | |||
919 | static void moxa_poll(unsigned long ignored) | 856 | static void moxa_poll(unsigned long ignored) |
920 | { | 857 | { |
921 | register int card; | 858 | register int card; |
922 | struct moxa_str *ch; | 859 | struct moxa_port *ch; |
923 | struct tty_struct *tp; | 860 | struct tty_struct *tp; |
924 | int i, ports; | 861 | int i, ports; |
925 | 862 | ||
926 | moxaTimer_on = 0; | ||
927 | del_timer(&moxaTimer); | 863 | del_timer(&moxaTimer); |
928 | 864 | ||
929 | if (MoxaDriverPoll() < 0) { | 865 | if (MoxaDriverPoll() < 0) { |
930 | moxaTimer.function = moxa_poll; | 866 | mod_timer(&moxaTimer, jiffies + HZ / 50); |
931 | moxaTimer.expires = jiffies + (HZ / 50); | ||
932 | moxaTimer_on = 1; | ||
933 | add_timer(&moxaTimer); | ||
934 | return; | 867 | return; |
935 | } | 868 | } |
936 | for (card = 0; card < MAX_BOARDS; card++) { | 869 | for (card = 0; card < MAX_BOARDS; card++) { |
937 | if ((ports = MoxaPortsOfCard(card)) <= 0) | 870 | if ((ports = MoxaPortsOfCard(card)) <= 0) |
938 | continue; | 871 | continue; |
939 | ch = &moxaChannels[card * MAX_PORTS_PER_BOARD]; | 872 | ch = &moxa_ports[card * MAX_PORTS_PER_BOARD]; |
940 | for (i = 0; i < ports; i++, ch++) { | 873 | for (i = 0; i < ports; i++, ch++) { |
941 | if ((ch->asyncflags & ASYNC_INITIALIZED) == 0) | 874 | if ((ch->asyncflags & ASYNC_INITIALIZED) == 0) |
942 | continue; | 875 | continue; |
@@ -962,18 +895,16 @@ static void moxa_poll(unsigned long ignored) | |||
962 | if (MoxaPortDCDON(ch->port)) | 895 | if (MoxaPortDCDON(ch->port)) |
963 | wake_up_interruptible(&ch->open_wait); | 896 | wake_up_interruptible(&ch->open_wait); |
964 | else { | 897 | else { |
965 | set_bit(MOXA_EVENT_HANGUP, &ch->event); | 898 | tty_hangup(tp); |
966 | schedule_work(&ch->tqueue); | 899 | wake_up_interruptible(&ch->open_wait); |
900 | ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE; | ||
967 | } | 901 | } |
968 | } | 902 | } |
969 | } | 903 | } |
970 | } | 904 | } |
971 | } | 905 | } |
972 | 906 | ||
973 | moxaTimer.function = moxa_poll; | 907 | mod_timer(&moxaTimer, jiffies + HZ / 50); |
974 | moxaTimer.expires = jiffies + (HZ / 50); | ||
975 | moxaTimer_on = 1; | ||
976 | add_timer(&moxaTimer); | ||
977 | } | 908 | } |
978 | 909 | ||
979 | /******************************************************************************/ | 910 | /******************************************************************************/ |
@@ -981,10 +912,10 @@ static void moxa_poll(unsigned long ignored) | |||
981 | static void set_tty_param(struct tty_struct *tty) | 912 | static void set_tty_param(struct tty_struct *tty) |
982 | { | 913 | { |
983 | register struct ktermios *ts; | 914 | register struct ktermios *ts; |
984 | struct moxa_str *ch; | 915 | struct moxa_port *ch; |
985 | int rts, cts, txflow, rxflow, xany; | 916 | int rts, cts, txflow, rxflow, xany; |
986 | 917 | ||
987 | ch = (struct moxa_str *) tty->driver_data; | 918 | ch = (struct moxa_port *) tty->driver_data; |
988 | ts = tty->termios; | 919 | ts = tty->termios; |
989 | if (ts->c_cflag & CLOCAL) | 920 | if (ts->c_cflag & CLOCAL) |
990 | ch->asyncflags &= ~ASYNC_CHECK_CD; | 921 | ch->asyncflags &= ~ASYNC_CHECK_CD; |
@@ -1004,7 +935,7 @@ static void set_tty_param(struct tty_struct *tty) | |||
1004 | } | 935 | } |
1005 | 936 | ||
1006 | static int block_till_ready(struct tty_struct *tty, struct file *filp, | 937 | static int block_till_ready(struct tty_struct *tty, struct file *filp, |
1007 | struct moxa_str *ch) | 938 | struct moxa_port *ch) |
1008 | { | 939 | { |
1009 | DECLARE_WAITQUEUE(wait,current); | 940 | DECLARE_WAITQUEUE(wait,current); |
1010 | unsigned long flags; | 941 | unsigned long flags; |
@@ -1095,40 +1026,33 @@ static int block_till_ready(struct tty_struct *tty, struct file *filp, | |||
1095 | 1026 | ||
1096 | static void setup_empty_event(struct tty_struct *tty) | 1027 | static void setup_empty_event(struct tty_struct *tty) |
1097 | { | 1028 | { |
1098 | struct moxa_str *ch = tty->driver_data; | 1029 | struct moxa_port *ch = tty->driver_data; |
1099 | unsigned long flags; | 1030 | unsigned long flags; |
1100 | 1031 | ||
1101 | spin_lock_irqsave(&moxa_lock, flags); | 1032 | spin_lock_irqsave(&moxa_lock, flags); |
1102 | ch->statusflags |= EMPTYWAIT; | 1033 | ch->statusflags |= EMPTYWAIT; |
1103 | moxaEmptyTimer_on[ch->port] = 0; | 1034 | mod_timer(&moxa_ports[ch->port].emptyTimer, jiffies + HZ); |
1104 | del_timer(&moxaEmptyTimer[ch->port]); | ||
1105 | moxaEmptyTimer[ch->port].expires = jiffies + HZ; | ||
1106 | moxaEmptyTimer_on[ch->port] = 1; | ||
1107 | add_timer(&moxaEmptyTimer[ch->port]); | ||
1108 | spin_unlock_irqrestore(&moxa_lock, flags); | 1035 | spin_unlock_irqrestore(&moxa_lock, flags); |
1109 | } | 1036 | } |
1110 | 1037 | ||
1111 | static void check_xmit_empty(unsigned long data) | 1038 | static void check_xmit_empty(unsigned long data) |
1112 | { | 1039 | { |
1113 | struct moxa_str *ch; | 1040 | struct moxa_port *ch; |
1114 | 1041 | ||
1115 | ch = (struct moxa_str *) data; | 1042 | ch = (struct moxa_port *) data; |
1116 | moxaEmptyTimer_on[ch->port] = 0; | 1043 | del_timer_sync(&moxa_ports[ch->port].emptyTimer); |
1117 | del_timer(&moxaEmptyTimer[ch->port]); | ||
1118 | if (ch->tty && (ch->statusflags & EMPTYWAIT)) { | 1044 | if (ch->tty && (ch->statusflags & EMPTYWAIT)) { |
1119 | if (MoxaPortTxQueue(ch->port) == 0) { | 1045 | if (MoxaPortTxQueue(ch->port) == 0) { |
1120 | ch->statusflags &= ~EMPTYWAIT; | 1046 | ch->statusflags &= ~EMPTYWAIT; |
1121 | tty_wakeup(ch->tty); | 1047 | tty_wakeup(ch->tty); |
1122 | return; | 1048 | return; |
1123 | } | 1049 | } |
1124 | moxaEmptyTimer[ch->port].expires = jiffies + HZ; | 1050 | mod_timer(&moxa_ports[ch->port].emptyTimer, jiffies + HZ); |
1125 | moxaEmptyTimer_on[ch->port] = 1; | ||
1126 | add_timer(&moxaEmptyTimer[ch->port]); | ||
1127 | } else | 1051 | } else |
1128 | ch->statusflags &= ~EMPTYWAIT; | 1052 | ch->statusflags &= ~EMPTYWAIT; |
1129 | } | 1053 | } |
1130 | 1054 | ||
1131 | static void shut_down(struct moxa_str *ch) | 1055 | static void shut_down(struct moxa_port *ch) |
1132 | { | 1056 | { |
1133 | struct tty_struct *tp; | 1057 | struct tty_struct *tp; |
1134 | 1058 | ||
@@ -1148,7 +1072,7 @@ static void shut_down(struct moxa_str *ch) | |||
1148 | ch->asyncflags &= ~ASYNC_INITIALIZED; | 1072 | ch->asyncflags &= ~ASYNC_INITIALIZED; |
1149 | } | 1073 | } |
1150 | 1074 | ||
1151 | static void receive_data(struct moxa_str *ch) | 1075 | static void receive_data(struct moxa_port *ch) |
1152 | { | 1076 | { |
1153 | struct tty_struct *tp; | 1077 | struct tty_struct *tp; |
1154 | struct ktermios *ts; | 1078 | struct ktermios *ts; |
@@ -1465,35 +1389,21 @@ static void receive_data(struct moxa_str *ch) | |||
1465 | /* | 1389 | /* |
1466 | * Query | 1390 | * Query |
1467 | */ | 1391 | */ |
1468 | #define QueryPort MAX_PORTS | ||
1469 | |||
1470 | |||
1471 | 1392 | ||
1472 | struct mon_str { | 1393 | struct mon_str { |
1473 | int tick; | 1394 | int tick; |
1474 | int rxcnt[MAX_PORTS]; | 1395 | int rxcnt[MAX_PORTS]; |
1475 | int txcnt[MAX_PORTS]; | 1396 | int txcnt[MAX_PORTS]; |
1476 | }; | 1397 | }; |
1477 | typedef struct mon_str mon_st; | ||
1478 | 1398 | ||
1479 | #define DCD_changed 0x01 | 1399 | #define DCD_changed 0x01 |
1480 | #define DCD_oldstate 0x80 | 1400 | #define DCD_oldstate 0x80 |
1481 | 1401 | ||
1482 | static unsigned char moxaBuff[10240]; | 1402 | static unsigned char moxaBuff[10240]; |
1483 | static void __iomem *moxaIntNdx[MAX_BOARDS]; | ||
1484 | static void __iomem *moxaIntPend[MAX_BOARDS]; | ||
1485 | static void __iomem *moxaIntTable[MAX_BOARDS]; | ||
1486 | static char moxaChkPort[MAX_PORTS]; | ||
1487 | static char moxaLineCtrl[MAX_PORTS]; | ||
1488 | static void __iomem *moxaTableAddr[MAX_PORTS]; | ||
1489 | static long moxaCurBaud[MAX_PORTS]; | ||
1490 | static char moxaDCDState[MAX_PORTS]; | ||
1491 | static char moxaLowChkFlag[MAX_PORTS]; | ||
1492 | static int moxaLowWaterChk; | 1403 | static int moxaLowWaterChk; |
1493 | static int moxaCard; | 1404 | static int moxaCard; |
1494 | static mon_st moxaLog; | 1405 | static struct mon_str moxaLog; |
1495 | static int moxaFuncTout; | 1406 | static int moxaFuncTout = HZ / 2; |
1496 | static ushort moxaBreakCnt[MAX_PORTS]; | ||
1497 | 1407 | ||
1498 | static void moxadelay(int); | 1408 | static void moxadelay(int); |
1499 | static void moxafunc(void __iomem *, int, ushort); | 1409 | static void moxafunc(void __iomem *, int, ushort); |
@@ -1514,16 +1424,18 @@ static int moxaloadc320(int, void __iomem *, int, int *); | |||
1514 | *****************************************************************************/ | 1424 | *****************************************************************************/ |
1515 | void MoxaDriverInit(void) | 1425 | void MoxaDriverInit(void) |
1516 | { | 1426 | { |
1517 | int i; | 1427 | struct moxa_port *p; |
1428 | unsigned int i; | ||
1518 | 1429 | ||
1519 | moxaFuncTout = HZ / 2; /* 500 mini-seconds */ | 1430 | moxaFuncTout = HZ / 2; /* 500 mini-seconds */ |
1520 | moxaCard = 0; | 1431 | moxaCard = 0; |
1521 | moxaLog.tick = 0; | 1432 | moxaLog.tick = 0; |
1522 | moxaLowWaterChk = 0; | 1433 | moxaLowWaterChk = 0; |
1523 | for (i = 0; i < MAX_PORTS; i++) { | 1434 | for (i = 0; i < MAX_PORTS; i++) { |
1524 | moxaChkPort[i] = 0; | 1435 | p = &moxa_ports[i]; |
1525 | moxaLowChkFlag[i] = 0; | 1436 | p->chkPort = 0; |
1526 | moxaLineCtrl[i] = 0; | 1437 | p->lowChkFlag = 0; |
1438 | p->lineCtrl = 0; | ||
1527 | moxaLog.rxcnt[i] = 0; | 1439 | moxaLog.rxcnt[i] = 0; |
1528 | moxaLog.txcnt[i] = 0; | 1440 | moxaLog.txcnt[i] = 0; |
1529 | } | 1441 | } |
@@ -1545,19 +1457,12 @@ void MoxaDriverInit(void) | |||
1545 | #define MOXA_GET_CUMAJOR (MOXA + 64) | 1457 | #define MOXA_GET_CUMAJOR (MOXA + 64) |
1546 | #define MOXA_GETMSTATUS (MOXA + 65) | 1458 | #define MOXA_GETMSTATUS (MOXA + 65) |
1547 | 1459 | ||
1548 | |||
1549 | struct moxaq_str { | ||
1550 | int inq; | ||
1551 | int outq; | ||
1552 | }; | ||
1553 | |||
1554 | struct dl_str { | 1460 | struct dl_str { |
1555 | char __user *buf; | 1461 | char __user *buf; |
1556 | int len; | 1462 | int len; |
1557 | int cardno; | 1463 | int cardno; |
1558 | }; | 1464 | }; |
1559 | 1465 | ||
1560 | static struct moxaq_str temp_queue[MAX_PORTS]; | ||
1561 | static struct dl_str dltmp; | 1466 | static struct dl_str dltmp; |
1562 | 1467 | ||
1563 | void MoxaPortFlushData(int port, int mode) | 1468 | void MoxaPortFlushData(int port, int mode) |
@@ -1565,10 +1470,10 @@ void MoxaPortFlushData(int port, int mode) | |||
1565 | void __iomem *ofsAddr; | 1470 | void __iomem *ofsAddr; |
1566 | if ((mode < 0) || (mode > 2)) | 1471 | if ((mode < 0) || (mode > 2)) |
1567 | return; | 1472 | return; |
1568 | ofsAddr = moxaTableAddr[port]; | 1473 | ofsAddr = moxa_ports[port].tableAddr; |
1569 | moxafunc(ofsAddr, FC_FlushQueue, mode); | 1474 | moxafunc(ofsAddr, FC_FlushQueue, mode); |
1570 | if (mode != 1) { | 1475 | if (mode != 1) { |
1571 | moxaLowChkFlag[port] = 0; | 1476 | moxa_ports[port].lowChkFlag = 0; |
1572 | low_water_check(ofsAddr); | 1477 | low_water_check(ofsAddr); |
1573 | } | 1478 | } |
1574 | } | 1479 | } |
@@ -1580,7 +1485,7 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) | |||
1580 | int MoxaPortTxQueue(int), MoxaPortRxQueue(int); | 1485 | int MoxaPortTxQueue(int), MoxaPortRxQueue(int); |
1581 | void __user *argp = (void __user *)arg; | 1486 | void __user *argp = (void __user *)arg; |
1582 | 1487 | ||
1583 | if (port == QueryPort) { | 1488 | if (port == MAX_PORTS) { |
1584 | if ((cmd != MOXA_GET_CONF) && (cmd != MOXA_INIT_DRIVER) && | 1489 | if ((cmd != MOXA_GET_CONF) && (cmd != MOXA_INIT_DRIVER) && |
1585 | (cmd != MOXA_LOAD_BIOS) && (cmd != MOXA_FIND_BOARD) && (cmd != MOXA_LOAD_C320B) && | 1490 | (cmd != MOXA_LOAD_BIOS) && (cmd != MOXA_FIND_BOARD) && (cmd != MOXA_LOAD_C320B) && |
1586 | (cmd != MOXA_LOAD_CODE) && (cmd != MOXA_GETDATACOUNT) && | 1491 | (cmd != MOXA_LOAD_CODE) && (cmd != MOXA_GETDATACOUNT) && |
@@ -1590,7 +1495,8 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) | |||
1590 | } | 1495 | } |
1591 | switch (cmd) { | 1496 | switch (cmd) { |
1592 | case MOXA_GET_CONF: | 1497 | case MOXA_GET_CONF: |
1593 | if(copy_to_user(argp, &moxa_boards, MAX_BOARDS * sizeof(moxa_board_conf))) | 1498 | if(copy_to_user(argp, &moxa_boards, MAX_BOARDS * |
1499 | sizeof(struct moxa_board_conf))) | ||
1594 | return -EFAULT; | 1500 | return -EFAULT; |
1595 | return (0); | 1501 | return (0); |
1596 | case MOXA_INIT_DRIVER: | 1502 | case MOXA_INIT_DRIVER: |
@@ -1599,23 +1505,27 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) | |||
1599 | return (0); | 1505 | return (0); |
1600 | case MOXA_GETDATACOUNT: | 1506 | case MOXA_GETDATACOUNT: |
1601 | moxaLog.tick = jiffies; | 1507 | moxaLog.tick = jiffies; |
1602 | if(copy_to_user(argp, &moxaLog, sizeof(mon_st))) | 1508 | if(copy_to_user(argp, &moxaLog, sizeof(struct mon_str))) |
1603 | return -EFAULT; | 1509 | return -EFAULT; |
1604 | return (0); | 1510 | return (0); |
1605 | case MOXA_FLUSH_QUEUE: | 1511 | case MOXA_FLUSH_QUEUE: |
1606 | MoxaPortFlushData(port, arg); | 1512 | MoxaPortFlushData(port, arg); |
1607 | return (0); | 1513 | return (0); |
1608 | case MOXA_GET_IOQUEUE: | 1514 | case MOXA_GET_IOQUEUE: { |
1609 | for (i = 0; i < MAX_PORTS; i++) { | 1515 | struct moxaq_str __user *argm = argp; |
1610 | if (moxaChkPort[i]) { | 1516 | struct moxaq_str tmp; |
1611 | temp_queue[i].inq = MoxaPortRxQueue(i); | 1517 | |
1612 | temp_queue[i].outq = MoxaPortTxQueue(i); | 1518 | for (i = 0; i < MAX_PORTS; i++, argm++) { |
1519 | memset(&tmp, 0, sizeof(tmp)); | ||
1520 | if (moxa_ports[i].chkPort) { | ||
1521 | tmp.inq = MoxaPortRxQueue(i); | ||
1522 | tmp.outq = MoxaPortTxQueue(i); | ||
1613 | } | 1523 | } |
1524 | if (copy_to_user(argm, &tmp, sizeof(tmp))) | ||
1525 | return -EFAULT; | ||
1614 | } | 1526 | } |
1615 | if(copy_to_user(argp, temp_queue, sizeof(struct moxaq_str) * MAX_PORTS)) | ||
1616 | return -EFAULT; | ||
1617 | return (0); | 1527 | return (0); |
1618 | case MOXA_GET_OQUEUE: | 1528 | } case MOXA_GET_OQUEUE: |
1619 | i = MoxaPortTxQueue(port); | 1529 | i = MoxaPortTxQueue(port); |
1620 | return put_user(i, (unsigned long __user *)argp); | 1530 | return put_user(i, (unsigned long __user *)argp); |
1621 | case MOXA_GET_IQUEUE: | 1531 | case MOXA_GET_IQUEUE: |
@@ -1630,33 +1540,36 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) | |||
1630 | if(copy_to_user(argp, &i, sizeof(int))) | 1540 | if(copy_to_user(argp, &i, sizeof(int))) |
1631 | return -EFAULT; | 1541 | return -EFAULT; |
1632 | return 0; | 1542 | return 0; |
1633 | case MOXA_GETMSTATUS: | 1543 | case MOXA_GETMSTATUS: { |
1634 | for (i = 0; i < MAX_PORTS; i++) { | 1544 | struct mxser_mstatus __user *argm = argp; |
1635 | GMStatus[i].ri = 0; | 1545 | struct mxser_mstatus tmp; |
1636 | GMStatus[i].dcd = 0; | 1546 | struct moxa_port *p; |
1637 | GMStatus[i].dsr = 0; | 1547 | |
1638 | GMStatus[i].cts = 0; | 1548 | for (i = 0; i < MAX_PORTS; i++, argm++) { |
1639 | if (!moxaChkPort[i]) { | 1549 | p = &moxa_ports[i]; |
1640 | continue; | 1550 | memset(&tmp, 0, sizeof(tmp)); |
1551 | if (!p->chkPort) { | ||
1552 | goto copy; | ||
1641 | } else { | 1553 | } else { |
1642 | status = MoxaPortLineStatus(moxaChannels[i].port); | 1554 | status = MoxaPortLineStatus(p->port); |
1643 | if (status & 1) | 1555 | if (status & 1) |
1644 | GMStatus[i].cts = 1; | 1556 | tmp.cts = 1; |
1645 | if (status & 2) | 1557 | if (status & 2) |
1646 | GMStatus[i].dsr = 1; | 1558 | tmp.dsr = 1; |
1647 | if (status & 4) | 1559 | if (status & 4) |
1648 | GMStatus[i].dcd = 1; | 1560 | tmp.dcd = 1; |
1649 | } | 1561 | } |
1650 | 1562 | ||
1651 | if (!moxaChannels[i].tty || !moxaChannels[i].tty->termios) | 1563 | if (!p->tty || !p->tty->termios) |
1652 | GMStatus[i].cflag = moxaChannels[i].cflag; | 1564 | tmp.cflag = p->cflag; |
1653 | else | 1565 | else |
1654 | GMStatus[i].cflag = moxaChannels[i].tty->termios->c_cflag; | 1566 | tmp.cflag = p->tty->termios->c_cflag; |
1567 | copy: | ||
1568 | if (copy_to_user(argm, &tmp, sizeof(tmp))) | ||
1569 | return -EFAULT; | ||
1655 | } | 1570 | } |
1656 | if(copy_to_user(argp, GMStatus, sizeof(struct mxser_mstatus) * MAX_PORTS)) | ||
1657 | return -EFAULT; | ||
1658 | return 0; | 1571 | return 0; |
1659 | default: | 1572 | } default: |
1660 | return (-ENOIOCTLCMD); | 1573 | return (-ENOIOCTLCMD); |
1661 | case MOXA_LOAD_BIOS: | 1574 | case MOXA_LOAD_BIOS: |
1662 | case MOXA_FIND_BOARD: | 1575 | case MOXA_FIND_BOARD: |
@@ -1694,6 +1607,7 @@ int MoxaDriverIoctl(unsigned int cmd, unsigned long arg, int port) | |||
1694 | 1607 | ||
1695 | int MoxaDriverPoll(void) | 1608 | int MoxaDriverPoll(void) |
1696 | { | 1609 | { |
1610 | struct moxa_board_conf *brd; | ||
1697 | register ushort temp; | 1611 | register ushort temp; |
1698 | register int card; | 1612 | register int card; |
1699 | void __iomem *ofsAddr; | 1613 | void __iomem *ofsAddr; |
@@ -1703,43 +1617,44 @@ int MoxaDriverPoll(void) | |||
1703 | if (moxaCard == 0) | 1617 | if (moxaCard == 0) |
1704 | return (-1); | 1618 | return (-1); |
1705 | for (card = 0; card < MAX_BOARDS; card++) { | 1619 | for (card = 0; card < MAX_BOARDS; card++) { |
1706 | if (loadstat[card] == 0) | 1620 | brd = &moxa_boards[card]; |
1621 | if (brd->loadstat == 0) | ||
1707 | continue; | 1622 | continue; |
1708 | if ((ports = moxa_boards[card].numPorts) == 0) | 1623 | if ((ports = brd->numPorts) == 0) |
1709 | continue; | 1624 | continue; |
1710 | if (readb(moxaIntPend[card]) == 0xff) { | 1625 | if (readb(brd->intPend) == 0xff) { |
1711 | ip = moxaIntTable[card] + readb(moxaIntNdx[card]); | 1626 | ip = brd->intTable + readb(brd->intNdx); |
1712 | p = card * MAX_PORTS_PER_BOARD; | 1627 | p = card * MAX_PORTS_PER_BOARD; |
1713 | ports <<= 1; | 1628 | ports <<= 1; |
1714 | for (port = 0; port < ports; port += 2, p++) { | 1629 | for (port = 0; port < ports; port += 2, p++) { |
1715 | if ((temp = readw(ip + port)) != 0) { | 1630 | if ((temp = readw(ip + port)) != 0) { |
1716 | writew(0, ip + port); | 1631 | writew(0, ip + port); |
1717 | ofsAddr = moxaTableAddr[p]; | 1632 | ofsAddr = moxa_ports[p].tableAddr; |
1718 | if (temp & IntrTx) | 1633 | if (temp & IntrTx) |
1719 | writew(readw(ofsAddr + HostStat) & ~WakeupTx, ofsAddr + HostStat); | 1634 | writew(readw(ofsAddr + HostStat) & ~WakeupTx, ofsAddr + HostStat); |
1720 | if (temp & IntrBreak) { | 1635 | if (temp & IntrBreak) { |
1721 | moxaBreakCnt[p]++; | 1636 | moxa_ports[p].breakCnt++; |
1722 | } | 1637 | } |
1723 | if (temp & IntrLine) { | 1638 | if (temp & IntrLine) { |
1724 | if (readb(ofsAddr + FlagStat) & DCD_state) { | 1639 | if (readb(ofsAddr + FlagStat) & DCD_state) { |
1725 | if ((moxaDCDState[p] & DCD_oldstate) == 0) | 1640 | if ((moxa_ports[p].DCDState & DCD_oldstate) == 0) |
1726 | moxaDCDState[p] = (DCD_oldstate | | 1641 | moxa_ports[p].DCDState = (DCD_oldstate | |
1727 | DCD_changed); | 1642 | DCD_changed); |
1728 | } else { | 1643 | } else { |
1729 | if (moxaDCDState[p] & DCD_oldstate) | 1644 | if (moxa_ports[p].DCDState & DCD_oldstate) |
1730 | moxaDCDState[p] = DCD_changed; | 1645 | moxa_ports[p].DCDState = DCD_changed; |
1731 | } | 1646 | } |
1732 | } | 1647 | } |
1733 | } | 1648 | } |
1734 | } | 1649 | } |
1735 | writeb(0, moxaIntPend[card]); | 1650 | writeb(0, brd->intPend); |
1736 | } | 1651 | } |
1737 | if (moxaLowWaterChk) { | 1652 | if (moxaLowWaterChk) { |
1738 | p = card * MAX_PORTS_PER_BOARD; | 1653 | p = card * MAX_PORTS_PER_BOARD; |
1739 | for (port = 0; port < ports; port++, p++) { | 1654 | for (port = 0; port < ports; port++, p++) { |
1740 | if (moxaLowChkFlag[p]) { | 1655 | if (moxa_ports[p].lowChkFlag) { |
1741 | moxaLowChkFlag[p] = 0; | 1656 | moxa_ports[p].lowChkFlag = 0; |
1742 | ofsAddr = moxaTableAddr[p]; | 1657 | ofsAddr = moxa_ports[p].tableAddr; |
1743 | low_water_check(ofsAddr); | 1658 | low_water_check(ofsAddr); |
1744 | } | 1659 | } |
1745 | } | 1660 | } |
@@ -1767,9 +1682,7 @@ int MoxaPortsOfCard(int cardno) | |||
1767 | * 2. MoxaPortEnable(int port); * | 1682 | * 2. MoxaPortEnable(int port); * |
1768 | * 3. MoxaPortDisable(int port); * | 1683 | * 3. MoxaPortDisable(int port); * |
1769 | * 4. MoxaPortGetMaxBaud(int port); * | 1684 | * 4. MoxaPortGetMaxBaud(int port); * |
1770 | * 5. MoxaPortGetCurBaud(int port); * | ||
1771 | * 6. MoxaPortSetBaud(int port, long baud); * | 1685 | * 6. MoxaPortSetBaud(int port, long baud); * |
1772 | * 7. MoxaPortSetMode(int port, int databit, int stopbit, int parity); * | ||
1773 | * 8. MoxaPortSetTermio(int port, unsigned char *termio); * | 1686 | * 8. MoxaPortSetTermio(int port, unsigned char *termio); * |
1774 | * 9. MoxaPortGetLineOut(int port, int *dtrState, int *rtsState); * | 1687 | * 9. MoxaPortGetLineOut(int port, int *dtrState, int *rtsState); * |
1775 | * 10. MoxaPortLineCtrl(int port, int dtrState, int rtsState); * | 1688 | * 10. MoxaPortLineCtrl(int port, int dtrState, int rtsState); * |
@@ -1780,18 +1693,12 @@ int MoxaPortsOfCard(int cardno) | |||
1780 | * 15. MoxaPortFlushData(int port, int mode); * | 1693 | * 15. MoxaPortFlushData(int port, int mode); * |
1781 | * 16. MoxaPortWriteData(int port, unsigned char * buffer, int length); * | 1694 | * 16. MoxaPortWriteData(int port, unsigned char * buffer, int length); * |
1782 | * 17. MoxaPortReadData(int port, struct tty_struct *tty); * | 1695 | * 17. MoxaPortReadData(int port, struct tty_struct *tty); * |
1783 | * 18. MoxaPortTxBufSize(int port); * | ||
1784 | * 19. MoxaPortRxBufSize(int port); * | ||
1785 | * 20. MoxaPortTxQueue(int port); * | 1696 | * 20. MoxaPortTxQueue(int port); * |
1786 | * 21. MoxaPortTxFree(int port); * | 1697 | * 21. MoxaPortTxFree(int port); * |
1787 | * 22. MoxaPortRxQueue(int port); * | 1698 | * 22. MoxaPortRxQueue(int port); * |
1788 | * 23. MoxaPortRxFree(int port); * | ||
1789 | * 24. MoxaPortTxDisable(int port); * | 1699 | * 24. MoxaPortTxDisable(int port); * |
1790 | * 25. MoxaPortTxEnable(int port); * | 1700 | * 25. MoxaPortTxEnable(int port); * |
1791 | * 26. MoxaPortGetBrkCnt(int port); * | ||
1792 | * 27. MoxaPortResetBrkCnt(int port); * | 1701 | * 27. MoxaPortResetBrkCnt(int port); * |
1793 | * 28. MoxaPortSetXonXoff(int port, int xonValue, int xoffValue); * | ||
1794 | * 29. MoxaPortIsTxHold(int port); * | ||
1795 | * 30. MoxaPortSendBreak(int port, int ticks); * | 1702 | * 30. MoxaPortSendBreak(int port, int ticks); * |
1796 | *****************************************************************************/ | 1703 | *****************************************************************************/ |
1797 | /* | 1704 | /* |
@@ -1878,15 +1785,6 @@ int MoxaPortsOfCard(int cardno) | |||
1878 | * 38400/57600/115200 bps | 1785 | * 38400/57600/115200 bps |
1879 | * | 1786 | * |
1880 | * | 1787 | * |
1881 | * Function 9: Get the current baud rate of this port. | ||
1882 | * Syntax: | ||
1883 | * long MoxaPortGetCurBaud(int port); | ||
1884 | * int port : port number (0 - 127) | ||
1885 | * | ||
1886 | * return: 0 : this port is invalid | ||
1887 | * 50 - 115200 bps | ||
1888 | * | ||
1889 | * | ||
1890 | * Function 10: Setting baud rate of this port. | 1788 | * Function 10: Setting baud rate of this port. |
1891 | * Syntax: | 1789 | * Syntax: |
1892 | * long MoxaPortSetBaud(int port, long baud); | 1790 | * long MoxaPortSetBaud(int port, long baud); |
@@ -1900,18 +1798,6 @@ int MoxaPortsOfCard(int cardno) | |||
1900 | * baud rate will be the maximun baud rate. | 1798 | * baud rate will be the maximun baud rate. |
1901 | * | 1799 | * |
1902 | * | 1800 | * |
1903 | * Function 11: Setting the data-bits/stop-bits/parity of this port | ||
1904 | * Syntax: | ||
1905 | * int MoxaPortSetMode(int port, int databits, int stopbits, int parity); | ||
1906 | * int port : port number (0 - 127) | ||
1907 | * int databits : data bits (8/7/6/5) | ||
1908 | * int stopbits : stop bits (2/1/0, 0 show 1.5 stop bits) | ||
1909 | int parity : parity (0:None,1:Odd,2:Even,3:Mark,4:Space) | ||
1910 | * | ||
1911 | * return: -1 : invalid parameter | ||
1912 | * 0 : setting O.K. | ||
1913 | * | ||
1914 | * | ||
1915 | * Function 12: Configure the port. | 1801 | * Function 12: Configure the port. |
1916 | * Syntax: | 1802 | * Syntax: |
1917 | * int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud); | 1803 | * int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud); |
@@ -2016,22 +1902,6 @@ int MoxaPortsOfCard(int cardno) | |||
2016 | * return: 0 - length : real read data length | 1902 | * return: 0 - length : real read data length |
2017 | * | 1903 | * |
2018 | * | 1904 | * |
2019 | * Function 22: Get the Tx buffer size of this port | ||
2020 | * Syntax: | ||
2021 | * int MoxaPortTxBufSize(int port); | ||
2022 | * int port : port number (0 - 127) | ||
2023 | * | ||
2024 | * return: .. : Tx buffer size | ||
2025 | * | ||
2026 | * | ||
2027 | * Function 23: Get the Rx buffer size of this port | ||
2028 | * Syntax: | ||
2029 | * int MoxaPortRxBufSize(int port); | ||
2030 | * int port : port number (0 - 127) | ||
2031 | * | ||
2032 | * return: .. : Rx buffer size | ||
2033 | * | ||
2034 | * | ||
2035 | * Function 24: Get the Tx buffer current queued data bytes | 1905 | * Function 24: Get the Tx buffer current queued data bytes |
2036 | * Syntax: | 1906 | * Syntax: |
2037 | * int MoxaPortTxQueue(int port); | 1907 | * int MoxaPortTxQueue(int port); |
@@ -2056,14 +1926,6 @@ int MoxaPortsOfCard(int cardno) | |||
2056 | * return: .. : Rx buffer current queued data bytes | 1926 | * return: .. : Rx buffer current queued data bytes |
2057 | * | 1927 | * |
2058 | * | 1928 | * |
2059 | * Function 27: Get the Rx buffer current free space | ||
2060 | * Syntax: | ||
2061 | * int MoxaPortRxFree(int port); | ||
2062 | * int port : port number (0 - 127) | ||
2063 | * | ||
2064 | * return: .. : Rx buffer current free space | ||
2065 | * | ||
2066 | * | ||
2067 | * Function 28: Disable port data transmission. | 1929 | * Function 28: Disable port data transmission. |
2068 | * Syntax: | 1930 | * Syntax: |
2069 | * void MoxaPortTxDisable(int port); | 1931 | * void MoxaPortTxDisable(int port); |
@@ -2076,14 +1938,6 @@ int MoxaPortsOfCard(int cardno) | |||
2076 | * int port : port number (0 - 127) | 1938 | * int port : port number (0 - 127) |
2077 | * | 1939 | * |
2078 | * | 1940 | * |
2079 | * Function 30: Get the received BREAK signal count. | ||
2080 | * Syntax: | ||
2081 | * int MoxaPortGetBrkCnt(int port); | ||
2082 | * int port : port number (0 - 127) | ||
2083 | * | ||
2084 | * return: 0 - .. : BREAK signal count | ||
2085 | * | ||
2086 | * | ||
2087 | * Function 31: Get the received BREAK signal count and reset it. | 1941 | * Function 31: Get the received BREAK signal count and reset it. |
2088 | * Syntax: | 1942 | * Syntax: |
2089 | * int MoxaPortResetBrkCnt(int port); | 1943 | * int MoxaPortResetBrkCnt(int port); |
@@ -2092,25 +1946,6 @@ int MoxaPortsOfCard(int cardno) | |||
2092 | * return: 0 - .. : BREAK signal count | 1946 | * return: 0 - .. : BREAK signal count |
2093 | * | 1947 | * |
2094 | * | 1948 | * |
2095 | * Function 32: Set the S/W flow control new XON/XOFF value, default | ||
2096 | * XON is 0x11 & XOFF is 0x13. | ||
2097 | * Syntax: | ||
2098 | * void MoxaPortSetXonXoff(int port, int xonValue, int xoffValue); | ||
2099 | * int port : port number (0 - 127) | ||
2100 | * int xonValue : new XON value (0 - 255) | ||
2101 | * int xoffValue : new XOFF value (0 - 255) | ||
2102 | * | ||
2103 | * | ||
2104 | * Function 33: Check this port's transmission is hold by remote site | ||
2105 | * because the flow control. | ||
2106 | * Syntax: | ||
2107 | * int MoxaPortIsTxHold(int port); | ||
2108 | * int port : port number (0 - 127) | ||
2109 | * | ||
2110 | * return: 0 : normal | ||
2111 | * 1 : hold by remote site | ||
2112 | * | ||
2113 | * | ||
2114 | * Function 34: Send out a BREAK signal. | 1949 | * Function 34: Send out a BREAK signal. |
2115 | * Syntax: | 1950 | * Syntax: |
2116 | * void MoxaPortSendBreak(int port, int ms100); | 1951 | * void MoxaPortSendBreak(int port, int ms100); |
@@ -2125,7 +1960,7 @@ int MoxaPortIsValid(int port) | |||
2125 | 1960 | ||
2126 | if (moxaCard == 0) | 1961 | if (moxaCard == 0) |
2127 | return (0); | 1962 | return (0); |
2128 | if (moxaChkPort[port] == 0) | 1963 | if (moxa_ports[port].chkPort == 0) |
2129 | return (0); | 1964 | return (0); |
2130 | return (1); | 1965 | return (1); |
2131 | } | 1966 | } |
@@ -2136,9 +1971,9 @@ void MoxaPortEnable(int port) | |||
2136 | int MoxaPortLineStatus(int); | 1971 | int MoxaPortLineStatus(int); |
2137 | short lowwater = 512; | 1972 | short lowwater = 512; |
2138 | 1973 | ||
2139 | ofsAddr = moxaTableAddr[port]; | 1974 | ofsAddr = moxa_ports[port].tableAddr; |
2140 | writew(lowwater, ofsAddr + Low_water); | 1975 | writew(lowwater, ofsAddr + Low_water); |
2141 | moxaBreakCnt[port] = 0; | 1976 | moxa_ports[port].breakCnt = 0; |
2142 | if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) || | 1977 | if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) || |
2143 | (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) { | 1978 | (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) { |
2144 | moxafunc(ofsAddr, FC_SetBreakIrq, 0); | 1979 | moxafunc(ofsAddr, FC_SetBreakIrq, 0); |
@@ -2155,7 +1990,7 @@ void MoxaPortEnable(int port) | |||
2155 | 1990 | ||
2156 | void MoxaPortDisable(int port) | 1991 | void MoxaPortDisable(int port) |
2157 | { | 1992 | { |
2158 | void __iomem *ofsAddr = moxaTableAddr[port]; | 1993 | void __iomem *ofsAddr = moxa_ports[port].tableAddr; |
2159 | 1994 | ||
2160 | moxafunc(ofsAddr, FC_SetFlowCtl, 0); /* disable flow control */ | 1995 | moxafunc(ofsAddr, FC_SetFlowCtl, 0); /* disable flow control */ |
2161 | moxafunc(ofsAddr, FC_ClrLineIrq, Magic_code); | 1996 | moxafunc(ofsAddr, FC_ClrLineIrq, Magic_code); |
@@ -2181,7 +2016,7 @@ long MoxaPortSetBaud(int port, long baud) | |||
2181 | 2016 | ||
2182 | if ((baud < 50L) || ((max = MoxaPortGetMaxBaud(port)) == 0)) | 2017 | if ((baud < 50L) || ((max = MoxaPortGetMaxBaud(port)) == 0)) |
2183 | return (0); | 2018 | return (0); |
2184 | ofsAddr = moxaTableAddr[port]; | 2019 | ofsAddr = moxa_ports[port].tableAddr; |
2185 | if (baud > max) | 2020 | if (baud > max) |
2186 | baud = max; | 2021 | baud = max; |
2187 | if (max == 38400L) | 2022 | if (max == 38400L) |
@@ -2193,7 +2028,7 @@ long MoxaPortSetBaud(int port, long baud) | |||
2193 | val = clock / baud; | 2028 | val = clock / baud; |
2194 | moxafunc(ofsAddr, FC_SetBaud, val); | 2029 | moxafunc(ofsAddr, FC_SetBaud, val); |
2195 | baud = clock / val; | 2030 | baud = clock / val; |
2196 | moxaCurBaud[port] = baud; | 2031 | moxa_ports[port].curBaud = baud; |
2197 | return (baud); | 2032 | return (baud); |
2198 | } | 2033 | } |
2199 | 2034 | ||
@@ -2203,9 +2038,9 @@ int MoxaPortSetTermio(int port, struct ktermios *termio, speed_t baud) | |||
2203 | tcflag_t cflag; | 2038 | tcflag_t cflag; |
2204 | tcflag_t mode = 0; | 2039 | tcflag_t mode = 0; |
2205 | 2040 | ||
2206 | if (moxaChkPort[port] == 0 || termio == 0) | 2041 | if (moxa_ports[port].chkPort == 0 || termio == 0) |
2207 | return (-1); | 2042 | return (-1); |
2208 | ofsAddr = moxaTableAddr[port]; | 2043 | ofsAddr = moxa_ports[port].tableAddr; |
2209 | cflag = termio->c_cflag; /* termio->c_cflag */ | 2044 | cflag = termio->c_cflag; /* termio->c_cflag */ |
2210 | 2045 | ||
2211 | mode = termio->c_cflag & CSIZE; | 2046 | mode = termio->c_cflag & CSIZE; |
@@ -2259,13 +2094,13 @@ int MoxaPortGetLineOut(int port, int *dtrState, int *rtsState) | |||
2259 | if (!MoxaPortIsValid(port)) | 2094 | if (!MoxaPortIsValid(port)) |
2260 | return (-1); | 2095 | return (-1); |
2261 | if (dtrState) { | 2096 | if (dtrState) { |
2262 | if (moxaLineCtrl[port] & DTR_ON) | 2097 | if (moxa_ports[port].lineCtrl & DTR_ON) |
2263 | *dtrState = 1; | 2098 | *dtrState = 1; |
2264 | else | 2099 | else |
2265 | *dtrState = 0; | 2100 | *dtrState = 0; |
2266 | } | 2101 | } |
2267 | if (rtsState) { | 2102 | if (rtsState) { |
2268 | if (moxaLineCtrl[port] & RTS_ON) | 2103 | if (moxa_ports[port].lineCtrl & RTS_ON) |
2269 | *rtsState = 1; | 2104 | *rtsState = 1; |
2270 | else | 2105 | else |
2271 | *rtsState = 0; | 2106 | *rtsState = 0; |
@@ -2278,13 +2113,13 @@ void MoxaPortLineCtrl(int port, int dtr, int rts) | |||
2278 | void __iomem *ofsAddr; | 2113 | void __iomem *ofsAddr; |
2279 | int mode; | 2114 | int mode; |
2280 | 2115 | ||
2281 | ofsAddr = moxaTableAddr[port]; | 2116 | ofsAddr = moxa_ports[port].tableAddr; |
2282 | mode = 0; | 2117 | mode = 0; |
2283 | if (dtr) | 2118 | if (dtr) |
2284 | mode |= DTR_ON; | 2119 | mode |= DTR_ON; |
2285 | if (rts) | 2120 | if (rts) |
2286 | mode |= RTS_ON; | 2121 | mode |= RTS_ON; |
2287 | moxaLineCtrl[port] = mode; | 2122 | moxa_ports[port].lineCtrl = mode; |
2288 | moxafunc(ofsAddr, FC_LineControl, mode); | 2123 | moxafunc(ofsAddr, FC_LineControl, mode); |
2289 | } | 2124 | } |
2290 | 2125 | ||
@@ -2293,7 +2128,7 @@ void MoxaPortFlowCtrl(int port, int rts, int cts, int txflow, int rxflow, int tx | |||
2293 | void __iomem *ofsAddr; | 2128 | void __iomem *ofsAddr; |
2294 | int mode; | 2129 | int mode; |
2295 | 2130 | ||
2296 | ofsAddr = moxaTableAddr[port]; | 2131 | ofsAddr = moxa_ports[port].tableAddr; |
2297 | mode = 0; | 2132 | mode = 0; |
2298 | if (rts) | 2133 | if (rts) |
2299 | mode |= RTS_FlowCtl; | 2134 | mode |= RTS_FlowCtl; |
@@ -2313,7 +2148,7 @@ int MoxaPortLineStatus(int port) | |||
2313 | void __iomem *ofsAddr; | 2148 | void __iomem *ofsAddr; |
2314 | int val; | 2149 | int val; |
2315 | 2150 | ||
2316 | ofsAddr = moxaTableAddr[port]; | 2151 | ofsAddr = moxa_ports[port].tableAddr; |
2317 | if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) || | 2152 | if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) || |
2318 | (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) { | 2153 | (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) { |
2319 | moxafunc(ofsAddr, FC_LineStatus, 0); | 2154 | moxafunc(ofsAddr, FC_LineStatus, 0); |
@@ -2324,11 +2159,11 @@ int MoxaPortLineStatus(int port) | |||
2324 | val &= 0x0B; | 2159 | val &= 0x0B; |
2325 | if (val & 8) { | 2160 | if (val & 8) { |
2326 | val |= 4; | 2161 | val |= 4; |
2327 | if ((moxaDCDState[port] & DCD_oldstate) == 0) | 2162 | if ((moxa_ports[port].DCDState & DCD_oldstate) == 0) |
2328 | moxaDCDState[port] = (DCD_oldstate | DCD_changed); | 2163 | moxa_ports[port].DCDState = (DCD_oldstate | DCD_changed); |
2329 | } else { | 2164 | } else { |
2330 | if (moxaDCDState[port] & DCD_oldstate) | 2165 | if (moxa_ports[port].DCDState & DCD_oldstate) |
2331 | moxaDCDState[port] = DCD_changed; | 2166 | moxa_ports[port].DCDState = DCD_changed; |
2332 | } | 2167 | } |
2333 | val &= 7; | 2168 | val &= 7; |
2334 | return (val); | 2169 | return (val); |
@@ -2338,10 +2173,10 @@ int MoxaPortDCDChange(int port) | |||
2338 | { | 2173 | { |
2339 | int n; | 2174 | int n; |
2340 | 2175 | ||
2341 | if (moxaChkPort[port] == 0) | 2176 | if (moxa_ports[port].chkPort == 0) |
2342 | return (0); | 2177 | return (0); |
2343 | n = moxaDCDState[port]; | 2178 | n = moxa_ports[port].DCDState; |
2344 | moxaDCDState[port] &= ~DCD_changed; | 2179 | moxa_ports[port].DCDState &= ~DCD_changed; |
2345 | n &= DCD_changed; | 2180 | n &= DCD_changed; |
2346 | return (n); | 2181 | return (n); |
2347 | } | 2182 | } |
@@ -2350,32 +2185,15 @@ int MoxaPortDCDON(int port) | |||
2350 | { | 2185 | { |
2351 | int n; | 2186 | int n; |
2352 | 2187 | ||
2353 | if (moxaChkPort[port] == 0) | 2188 | if (moxa_ports[port].chkPort == 0) |
2354 | return (0); | 2189 | return (0); |
2355 | if (moxaDCDState[port] & DCD_oldstate) | 2190 | if (moxa_ports[port].DCDState & DCD_oldstate) |
2356 | n = 1; | 2191 | n = 1; |
2357 | else | 2192 | else |
2358 | n = 0; | 2193 | n = 0; |
2359 | return (n); | 2194 | return (n); |
2360 | } | 2195 | } |
2361 | 2196 | ||
2362 | |||
2363 | /* | ||
2364 | int MoxaDumpMem(int port, unsigned char * buffer, int len) | ||
2365 | { | ||
2366 | int i; | ||
2367 | unsigned long baseAddr,ofsAddr,ofs; | ||
2368 | |||
2369 | baseAddr = moxaBaseAddr[port / MAX_PORTS_PER_BOARD]; | ||
2370 | ofs = baseAddr + DynPage_addr + pageofs; | ||
2371 | if (len > 0x2000L) | ||
2372 | len = 0x2000L; | ||
2373 | for (i = 0; i < len; i++) | ||
2374 | buffer[i] = readb(ofs+i); | ||
2375 | } | ||
2376 | */ | ||
2377 | |||
2378 | |||
2379 | int MoxaPortWriteData(int port, unsigned char * buffer, int len) | 2197 | int MoxaPortWriteData(int port, unsigned char * buffer, int len) |
2380 | { | 2198 | { |
2381 | int c, total, i; | 2199 | int c, total, i; |
@@ -2385,8 +2203,8 @@ int MoxaPortWriteData(int port, unsigned char * buffer, int len) | |||
2385 | ushort pageno, pageofs, bufhead; | 2203 | ushort pageno, pageofs, bufhead; |
2386 | void __iomem *baseAddr, *ofsAddr, *ofs; | 2204 | void __iomem *baseAddr, *ofsAddr, *ofs; |
2387 | 2205 | ||
2388 | ofsAddr = moxaTableAddr[port]; | 2206 | ofsAddr = moxa_ports[port].tableAddr; |
2389 | baseAddr = moxaBaseAddr[port / MAX_PORTS_PER_BOARD]; | 2207 | baseAddr = moxa_boards[port / MAX_PORTS_PER_BOARD].basemem; |
2390 | tx_mask = readw(ofsAddr + TX_mask); | 2208 | tx_mask = readw(ofsAddr + TX_mask); |
2391 | spage = readw(ofsAddr + Page_txb); | 2209 | spage = readw(ofsAddr + Page_txb); |
2392 | epage = readw(ofsAddr + EndPage_txb); | 2210 | epage = readw(ofsAddr + EndPage_txb); |
@@ -2448,8 +2266,8 @@ int MoxaPortReadData(int port, struct tty_struct *tty) | |||
2448 | ushort pageno, bufhead; | 2266 | ushort pageno, bufhead; |
2449 | void __iomem *baseAddr, *ofsAddr, *ofs; | 2267 | void __iomem *baseAddr, *ofsAddr, *ofs; |
2450 | 2268 | ||
2451 | ofsAddr = moxaTableAddr[port]; | 2269 | ofsAddr = moxa_ports[port].tableAddr; |
2452 | baseAddr = moxaBaseAddr[port / MAX_PORTS_PER_BOARD]; | 2270 | baseAddr = moxa_boards[port / MAX_PORTS_PER_BOARD].basemem; |
2453 | head = readw(ofsAddr + RXrptr); | 2271 | head = readw(ofsAddr + RXrptr); |
2454 | tail = readw(ofsAddr + RXwptr); | 2272 | tail = readw(ofsAddr + RXwptr); |
2455 | rx_mask = readw(ofsAddr + RX_mask); | 2273 | rx_mask = readw(ofsAddr + RX_mask); |
@@ -2504,7 +2322,7 @@ int MoxaPortReadData(int port, struct tty_struct *tty) | |||
2504 | } | 2322 | } |
2505 | if ((readb(ofsAddr + FlagStat) & Xoff_state) && (remain < LowWater)) { | 2323 | if ((readb(ofsAddr + FlagStat) & Xoff_state) && (remain < LowWater)) { |
2506 | moxaLowWaterChk = 1; | 2324 | moxaLowWaterChk = 1; |
2507 | moxaLowChkFlag[port] = 1; | 2325 | moxa_ports[port].lowChkFlag = 1; |
2508 | } | 2326 | } |
2509 | return (total); | 2327 | return (total); |
2510 | } | 2328 | } |
@@ -2516,7 +2334,7 @@ int MoxaPortTxQueue(int port) | |||
2516 | ushort rptr, wptr, mask; | 2334 | ushort rptr, wptr, mask; |
2517 | int len; | 2335 | int len; |
2518 | 2336 | ||
2519 | ofsAddr = moxaTableAddr[port]; | 2337 | ofsAddr = moxa_ports[port].tableAddr; |
2520 | rptr = readw(ofsAddr + TXrptr); | 2338 | rptr = readw(ofsAddr + TXrptr); |
2521 | wptr = readw(ofsAddr + TXwptr); | 2339 | wptr = readw(ofsAddr + TXwptr); |
2522 | mask = readw(ofsAddr + TX_mask); | 2340 | mask = readw(ofsAddr + TX_mask); |
@@ -2530,7 +2348,7 @@ int MoxaPortTxFree(int port) | |||
2530 | ushort rptr, wptr, mask; | 2348 | ushort rptr, wptr, mask; |
2531 | int len; | 2349 | int len; |
2532 | 2350 | ||
2533 | ofsAddr = moxaTableAddr[port]; | 2351 | ofsAddr = moxa_ports[port].tableAddr; |
2534 | rptr = readw(ofsAddr + TXrptr); | 2352 | rptr = readw(ofsAddr + TXrptr); |
2535 | wptr = readw(ofsAddr + TXwptr); | 2353 | wptr = readw(ofsAddr + TXwptr); |
2536 | mask = readw(ofsAddr + TX_mask); | 2354 | mask = readw(ofsAddr + TX_mask); |
@@ -2544,7 +2362,7 @@ int MoxaPortRxQueue(int port) | |||
2544 | ushort rptr, wptr, mask; | 2362 | ushort rptr, wptr, mask; |
2545 | int len; | 2363 | int len; |
2546 | 2364 | ||
2547 | ofsAddr = moxaTableAddr[port]; | 2365 | ofsAddr = moxa_ports[port].tableAddr; |
2548 | rptr = readw(ofsAddr + RXrptr); | 2366 | rptr = readw(ofsAddr + RXrptr); |
2549 | wptr = readw(ofsAddr + RXwptr); | 2367 | wptr = readw(ofsAddr + RXwptr); |
2550 | mask = readw(ofsAddr + RX_mask); | 2368 | mask = readw(ofsAddr + RX_mask); |
@@ -2557,7 +2375,7 @@ void MoxaPortTxDisable(int port) | |||
2557 | { | 2375 | { |
2558 | void __iomem *ofsAddr; | 2376 | void __iomem *ofsAddr; |
2559 | 2377 | ||
2560 | ofsAddr = moxaTableAddr[port]; | 2378 | ofsAddr = moxa_ports[port].tableAddr; |
2561 | moxafunc(ofsAddr, FC_SetXoffState, Magic_code); | 2379 | moxafunc(ofsAddr, FC_SetXoffState, Magic_code); |
2562 | } | 2380 | } |
2563 | 2381 | ||
@@ -2565,7 +2383,7 @@ void MoxaPortTxEnable(int port) | |||
2565 | { | 2383 | { |
2566 | void __iomem *ofsAddr; | 2384 | void __iomem *ofsAddr; |
2567 | 2385 | ||
2568 | ofsAddr = moxaTableAddr[port]; | 2386 | ofsAddr = moxa_ports[port].tableAddr; |
2569 | moxafunc(ofsAddr, FC_SetXonState, Magic_code); | 2387 | moxafunc(ofsAddr, FC_SetXonState, Magic_code); |
2570 | } | 2388 | } |
2571 | 2389 | ||
@@ -2573,8 +2391,8 @@ void MoxaPortTxEnable(int port) | |||
2573 | int MoxaPortResetBrkCnt(int port) | 2391 | int MoxaPortResetBrkCnt(int port) |
2574 | { | 2392 | { |
2575 | ushort cnt; | 2393 | ushort cnt; |
2576 | cnt = moxaBreakCnt[port]; | 2394 | cnt = moxa_ports[port].breakCnt; |
2577 | moxaBreakCnt[port] = 0; | 2395 | moxa_ports[port].breakCnt = 0; |
2578 | return (cnt); | 2396 | return (cnt); |
2579 | } | 2397 | } |
2580 | 2398 | ||
@@ -2583,7 +2401,7 @@ void MoxaPortSendBreak(int port, int ms100) | |||
2583 | { | 2401 | { |
2584 | void __iomem *ofsAddr; | 2402 | void __iomem *ofsAddr; |
2585 | 2403 | ||
2586 | ofsAddr = moxaTableAddr[port]; | 2404 | ofsAddr = moxa_ports[port].tableAddr; |
2587 | if (ms100) { | 2405 | if (ms100) { |
2588 | moxafunc(ofsAddr, FC_SendBreak, Magic_code); | 2406 | moxafunc(ofsAddr, FC_SendBreak, Magic_code); |
2589 | moxadelay(ms100 * (HZ / 10)); | 2407 | moxadelay(ms100 * (HZ / 10)); |
@@ -2594,7 +2412,7 @@ void MoxaPortSendBreak(int port, int ms100) | |||
2594 | moxafunc(ofsAddr, FC_StopBreak, Magic_code); | 2412 | moxafunc(ofsAddr, FC_StopBreak, Magic_code); |
2595 | } | 2413 | } |
2596 | 2414 | ||
2597 | static int moxa_get_serial_info(struct moxa_str *info, | 2415 | static int moxa_get_serial_info(struct moxa_port *info, |
2598 | struct serial_struct __user *retinfo) | 2416 | struct serial_struct __user *retinfo) |
2599 | { | 2417 | { |
2600 | struct serial_struct tmp; | 2418 | struct serial_struct tmp; |
@@ -2616,7 +2434,7 @@ static int moxa_get_serial_info(struct moxa_str *info, | |||
2616 | } | 2434 | } |
2617 | 2435 | ||
2618 | 2436 | ||
2619 | static int moxa_set_serial_info(struct moxa_str *info, | 2437 | static int moxa_set_serial_info(struct moxa_port *info, |
2620 | struct serial_struct __user *new_info) | 2438 | struct serial_struct __user *new_info) |
2621 | { | 2439 | { |
2622 | struct serial_struct new_serial; | 2440 | struct serial_struct new_serial; |
@@ -2713,7 +2531,7 @@ static int moxaloadbios(int cardno, unsigned char __user *tmp, int len) | |||
2713 | 2531 | ||
2714 | if(copy_from_user(moxaBuff, tmp, len)) | 2532 | if(copy_from_user(moxaBuff, tmp, len)) |
2715 | return -EFAULT; | 2533 | return -EFAULT; |
2716 | baseAddr = moxaBaseAddr[cardno]; | 2534 | baseAddr = moxa_boards[cardno].basemem; |
2717 | writeb(HW_reset, baseAddr + Control_reg); /* reset */ | 2535 | writeb(HW_reset, baseAddr + Control_reg); /* reset */ |
2718 | moxadelay(1); /* delay 10 ms */ | 2536 | moxadelay(1); /* delay 10 ms */ |
2719 | for (i = 0; i < 4096; i++) | 2537 | for (i = 0; i < 4096; i++) |
@@ -2729,7 +2547,7 @@ static int moxafindcard(int cardno) | |||
2729 | void __iomem *baseAddr; | 2547 | void __iomem *baseAddr; |
2730 | ushort tmp; | 2548 | ushort tmp; |
2731 | 2549 | ||
2732 | baseAddr = moxaBaseAddr[cardno]; | 2550 | baseAddr = moxa_boards[cardno].basemem; |
2733 | switch (moxa_boards[cardno].boardType) { | 2551 | switch (moxa_boards[cardno].boardType) { |
2734 | case MOXA_BOARD_C218_ISA: | 2552 | case MOXA_BOARD_C218_ISA: |
2735 | case MOXA_BOARD_C218_PCI: | 2553 | case MOXA_BOARD_C218_PCI: |
@@ -2762,7 +2580,7 @@ static int moxaload320b(int cardno, unsigned char __user *tmp, int len) | |||
2762 | return -EINVAL; | 2580 | return -EINVAL; |
2763 | if(copy_from_user(moxaBuff, tmp, len)) | 2581 | if(copy_from_user(moxaBuff, tmp, len)) |
2764 | return -EFAULT; | 2582 | return -EFAULT; |
2765 | baseAddr = moxaBaseAddr[cardno]; | 2583 | baseAddr = moxa_boards[cardno].basemem; |
2766 | writew(len - 7168 - 2, baseAddr + C320bapi_len); | 2584 | writew(len - 7168 - 2, baseAddr + C320bapi_len); |
2767 | writeb(1, baseAddr + Control_reg); /* Select Page 1 */ | 2585 | writeb(1, baseAddr + Control_reg); /* Select Page 1 */ |
2768 | for (i = 0; i < 7168; i++) | 2586 | for (i = 0; i < 7168; i++) |
@@ -2780,7 +2598,7 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len) | |||
2780 | 2598 | ||
2781 | if(copy_from_user(moxaBuff, tmp, len)) | 2599 | if(copy_from_user(moxaBuff, tmp, len)) |
2782 | return -EFAULT; | 2600 | return -EFAULT; |
2783 | baseAddr = moxaBaseAddr[cardno]; | 2601 | baseAddr = moxa_boards[cardno].basemem; |
2784 | switch (moxa_boards[cardno].boardType) { | 2602 | switch (moxa_boards[cardno].boardType) { |
2785 | case MOXA_BOARD_C218_ISA: | 2603 | case MOXA_BOARD_C218_ISA: |
2786 | case MOXA_BOARD_C218_PCI: | 2604 | case MOXA_BOARD_C218_PCI: |
@@ -2790,11 +2608,13 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len) | |||
2790 | return (retval); | 2608 | return (retval); |
2791 | port = cardno * MAX_PORTS_PER_BOARD; | 2609 | port = cardno * MAX_PORTS_PER_BOARD; |
2792 | for (i = 0; i < moxa_boards[cardno].numPorts; i++, port++) { | 2610 | for (i = 0; i < moxa_boards[cardno].numPorts; i++, port++) { |
2793 | moxaChkPort[port] = 1; | 2611 | struct moxa_port *p = &moxa_ports[port]; |
2794 | moxaCurBaud[port] = 9600L; | 2612 | |
2795 | moxaDCDState[port] = 0; | 2613 | p->chkPort = 1; |
2796 | moxaTableAddr[port] = baseAddr + Extern_table + Extern_size * i; | 2614 | p->curBaud = 9600L; |
2797 | ofsAddr = moxaTableAddr[port]; | 2615 | p->DCDState = 0; |
2616 | p->tableAddr = baseAddr + Extern_table + Extern_size * i; | ||
2617 | ofsAddr = p->tableAddr; | ||
2798 | writew(C218rx_mask, ofsAddr + RX_mask); | 2618 | writew(C218rx_mask, ofsAddr + RX_mask); |
2799 | writew(C218tx_mask, ofsAddr + TX_mask); | 2619 | writew(C218tx_mask, ofsAddr + TX_mask); |
2800 | writew(C218rx_spage + i * C218buf_pageno, ofsAddr + Page_rxb); | 2620 | writew(C218rx_spage + i * C218buf_pageno, ofsAddr + Page_rxb); |
@@ -2812,11 +2632,13 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len) | |||
2812 | return (retval); | 2632 | return (retval); |
2813 | port = cardno * MAX_PORTS_PER_BOARD; | 2633 | port = cardno * MAX_PORTS_PER_BOARD; |
2814 | for (i = 0; i < moxa_boards[cardno].numPorts; i++, port++) { | 2634 | for (i = 0; i < moxa_boards[cardno].numPorts; i++, port++) { |
2815 | moxaChkPort[port] = 1; | 2635 | struct moxa_port *p = &moxa_ports[port]; |
2816 | moxaCurBaud[port] = 9600L; | 2636 | |
2817 | moxaDCDState[port] = 0; | 2637 | p->chkPort = 1; |
2818 | moxaTableAddr[port] = baseAddr + Extern_table + Extern_size * i; | 2638 | p->curBaud = 9600L; |
2819 | ofsAddr = moxaTableAddr[port]; | 2639 | p->DCDState = 0; |
2640 | p->tableAddr = baseAddr + Extern_table + Extern_size * i; | ||
2641 | ofsAddr = p->tableAddr; | ||
2820 | if (moxa_boards[cardno].numPorts == 8) { | 2642 | if (moxa_boards[cardno].numPorts == 8) { |
2821 | writew(C320p8rx_mask, ofsAddr + RX_mask); | 2643 | writew(C320p8rx_mask, ofsAddr + RX_mask); |
2822 | writew(C320p8tx_mask, ofsAddr + TX_mask); | 2644 | writew(C320p8tx_mask, ofsAddr + TX_mask); |
@@ -2852,7 +2674,7 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len) | |||
2852 | } | 2674 | } |
2853 | break; | 2675 | break; |
2854 | } | 2676 | } |
2855 | loadstat[cardno] = 1; | 2677 | moxa_boards[cardno].loadstat = 1; |
2856 | return (0); | 2678 | return (0); |
2857 | } | 2679 | } |
2858 | 2680 | ||
@@ -2926,9 +2748,9 @@ static int moxaloadc218(int cardno, void __iomem *baseAddr, int len) | |||
2926 | return (-1); | 2748 | return (-1); |
2927 | } | 2749 | } |
2928 | moxaCard = 1; | 2750 | moxaCard = 1; |
2929 | moxaIntNdx[cardno] = baseAddr + IRQindex; | 2751 | moxa_boards[cardno].intNdx = baseAddr + IRQindex; |
2930 | moxaIntPend[cardno] = baseAddr + IRQpending; | 2752 | moxa_boards[cardno].intPend = baseAddr + IRQpending; |
2931 | moxaIntTable[cardno] = baseAddr + IRQtable; | 2753 | moxa_boards[cardno].intTable = baseAddr + IRQtable; |
2932 | return (0); | 2754 | return (0); |
2933 | } | 2755 | } |
2934 | 2756 | ||
@@ -3021,25 +2843,15 @@ static int moxaloadc320(int cardno, void __iomem *baseAddr, int len, int *numPor | |||
3021 | if (readw(baseAddr + Magic_no) != Magic_code) | 2843 | if (readw(baseAddr + Magic_no) != Magic_code) |
3022 | return (-102); | 2844 | return (-102); |
3023 | moxaCard = 1; | 2845 | moxaCard = 1; |
3024 | moxaIntNdx[cardno] = baseAddr + IRQindex; | 2846 | moxa_boards[cardno].intNdx = baseAddr + IRQindex; |
3025 | moxaIntPend[cardno] = baseAddr + IRQpending; | 2847 | moxa_boards[cardno].intPend = baseAddr + IRQpending; |
3026 | moxaIntTable[cardno] = baseAddr + IRQtable; | 2848 | moxa_boards[cardno].intTable = baseAddr + IRQtable; |
3027 | return (0); | 2849 | return (0); |
3028 | } | 2850 | } |
3029 | 2851 | ||
3030 | #if 0 | ||
3031 | long MoxaPortGetCurBaud(int port) | ||
3032 | { | ||
3033 | |||
3034 | if (moxaChkPort[port] == 0) | ||
3035 | return (0); | ||
3036 | return (moxaCurBaud[port]); | ||
3037 | } | ||
3038 | #endif /* 0 */ | ||
3039 | |||
3040 | static void MoxaSetFifo(int port, int enable) | 2852 | static void MoxaSetFifo(int port, int enable) |
3041 | { | 2853 | { |
3042 | void __iomem *ofsAddr = moxaTableAddr[port]; | 2854 | void __iomem *ofsAddr = moxa_ports[port].tableAddr; |
3043 | 2855 | ||
3044 | if (!enable) { | 2856 | if (!enable) { |
3045 | moxafunc(ofsAddr, FC_SetRxFIFOTrig, 0); | 2857 | moxafunc(ofsAddr, FC_SetRxFIFOTrig, 0); |
@@ -3049,132 +2861,3 @@ static void MoxaSetFifo(int port, int enable) | |||
3049 | moxafunc(ofsAddr, FC_SetTxFIFOCnt, 16); | 2861 | moxafunc(ofsAddr, FC_SetTxFIFOCnt, 16); |
3050 | } | 2862 | } |
3051 | } | 2863 | } |
3052 | |||
3053 | #if 0 | ||
3054 | int MoxaPortSetMode(int port, int databits, int stopbits, int parity) | ||
3055 | { | ||
3056 | void __iomem *ofsAddr; | ||
3057 | int val; | ||
3058 | |||
3059 | val = 0; | ||
3060 | switch (databits) { | ||
3061 | case 5: | ||
3062 | val |= 0; | ||
3063 | break; | ||
3064 | case 6: | ||
3065 | val |= 1; | ||
3066 | break; | ||
3067 | case 7: | ||
3068 | val |= 2; | ||
3069 | break; | ||
3070 | case 8: | ||
3071 | val |= 3; | ||
3072 | break; | ||
3073 | default: | ||
3074 | return (-1); | ||
3075 | } | ||
3076 | switch (stopbits) { | ||
3077 | case 0: | ||
3078 | val |= 0; | ||
3079 | break; /* stop bits 1.5 */ | ||
3080 | case 1: | ||
3081 | val |= 0; | ||
3082 | break; | ||
3083 | case 2: | ||
3084 | val |= 4; | ||
3085 | break; | ||
3086 | default: | ||
3087 | return (-1); | ||
3088 | } | ||
3089 | switch (parity) { | ||
3090 | case 0: | ||
3091 | val |= 0x00; | ||
3092 | break; /* None */ | ||
3093 | case 1: | ||
3094 | val |= 0x08; | ||
3095 | break; /* Odd */ | ||
3096 | case 2: | ||
3097 | val |= 0x18; | ||
3098 | break; /* Even */ | ||
3099 | case 3: | ||
3100 | val |= 0x28; | ||
3101 | break; /* Mark */ | ||
3102 | case 4: | ||
3103 | val |= 0x38; | ||
3104 | break; /* Space */ | ||
3105 | default: | ||
3106 | return (-1); | ||
3107 | } | ||
3108 | ofsAddr = moxaTableAddr[port]; | ||
3109 | moxafunc(ofsAddr, FC_SetMode, val); | ||
3110 | return (0); | ||
3111 | } | ||
3112 | |||
3113 | int MoxaPortTxBufSize(int port) | ||
3114 | { | ||
3115 | void __iomem *ofsAddr; | ||
3116 | int size; | ||
3117 | |||
3118 | ofsAddr = moxaTableAddr[port]; | ||
3119 | size = readw(ofsAddr + TX_mask); | ||
3120 | return (size); | ||
3121 | } | ||
3122 | |||
3123 | int MoxaPortRxBufSize(int port) | ||
3124 | { | ||
3125 | void __iomem *ofsAddr; | ||
3126 | int size; | ||
3127 | |||
3128 | ofsAddr = moxaTableAddr[port]; | ||
3129 | size = readw(ofsAddr + RX_mask); | ||
3130 | return (size); | ||
3131 | } | ||
3132 | |||
3133 | int MoxaPortRxFree(int port) | ||
3134 | { | ||
3135 | void __iomem *ofsAddr; | ||
3136 | ushort rptr, wptr, mask; | ||
3137 | int len; | ||
3138 | |||
3139 | ofsAddr = moxaTableAddr[port]; | ||
3140 | rptr = readw(ofsAddr + RXrptr); | ||
3141 | wptr = readw(ofsAddr + RXwptr); | ||
3142 | mask = readw(ofsAddr + RX_mask); | ||
3143 | len = mask - ((wptr - rptr) & mask); | ||
3144 | return (len); | ||
3145 | } | ||
3146 | int MoxaPortGetBrkCnt(int port) | ||
3147 | { | ||
3148 | return (moxaBreakCnt[port]); | ||
3149 | } | ||
3150 | |||
3151 | void MoxaPortSetXonXoff(int port, int xonValue, int xoffValue) | ||
3152 | { | ||
3153 | void __iomem *ofsAddr; | ||
3154 | |||
3155 | ofsAddr = moxaTableAddr[port]; | ||
3156 | writew(xonValue, ofsAddr + FuncArg); | ||
3157 | writew(xoffValue, ofsAddr + FuncArg1); | ||
3158 | writew(FC_SetXonXoff, ofsAddr + FuncCode); | ||
3159 | wait_finish(ofsAddr); | ||
3160 | } | ||
3161 | |||
3162 | int MoxaPortIsTxHold(int port) | ||
3163 | { | ||
3164 | void __iomem *ofsAddr; | ||
3165 | int val; | ||
3166 | |||
3167 | ofsAddr = moxaTableAddr[port]; | ||
3168 | if ((moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_ISA) || | ||
3169 | (moxa_boards[port / MAX_PORTS_PER_BOARD].boardType == MOXA_BOARD_C320_PCI)) { | ||
3170 | moxafunc(ofsAddr, FC_GetCCSR, 0); | ||
3171 | val = readw(ofsAddr + FuncArg); | ||
3172 | if (val & 0x04) | ||
3173 | return (1); | ||
3174 | } else { | ||
3175 | if (readw(ofsAddr + FlagStat) & Tx_flowOff) | ||
3176 | return (1); | ||
3177 | } | ||
3178 | return (0); | ||
3179 | } | ||
3180 | #endif | ||
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 83f604b19290..a61fb6da5d03 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -321,8 +321,6 @@ struct mxser_struct { | |||
321 | unsigned long event; | 321 | unsigned long event; |
322 | int count; /* # of fd on device */ | 322 | int count; /* # of fd on device */ |
323 | int blocked_open; /* # of blocked opens */ | 323 | int blocked_open; /* # of blocked opens */ |
324 | long session; /* Session of opening process */ | ||
325 | long pgrp; /* pgrp of opening process */ | ||
326 | unsigned char *xmit_buf; | 324 | unsigned char *xmit_buf; |
327 | int xmit_head; | 325 | int xmit_head; |
328 | int xmit_tail; | 326 | int xmit_tail; |
@@ -1001,15 +999,12 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) | |||
1001 | mxser_change_speed(info, NULL); | 999 | mxser_change_speed(info, NULL); |
1002 | } | 1000 | } |
1003 | 1001 | ||
1004 | info->session = process_session(current); | ||
1005 | info->pgrp = process_group(current); | ||
1006 | |||
1007 | /* | 1002 | /* |
1008 | status = mxser_get_msr(info->base, 0, info->port); | 1003 | status = mxser_get_msr(info->base, 0, info->port); |
1009 | mxser_check_modem_status(info, status); | 1004 | mxser_check_modem_status(info, status); |
1010 | */ | 1005 | */ |
1011 | 1006 | ||
1012 | /* unmark here for very high baud rate (ex. 921600 bps) used */ | 1007 | /* unmark here for very high baud rate (ex. 921600 bps) used */ |
1013 | tty->low_latency = 1; | 1008 | tty->low_latency = 1; |
1014 | return 0; | 1009 | return 0; |
1015 | } | 1010 | } |
@@ -1254,9 +1249,7 @@ static void mxser_flush_buffer(struct tty_struct *tty) | |||
1254 | spin_unlock_irqrestore(&info->slock, flags); | 1249 | spin_unlock_irqrestore(&info->slock, flags); |
1255 | /* above added by shinhay */ | 1250 | /* above added by shinhay */ |
1256 | 1251 | ||
1257 | wake_up_interruptible(&tty->write_wait); | 1252 | tty_wakeup(tty); |
1258 | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) | ||
1259 | (tty->ldisc.write_wakeup) (tty); | ||
1260 | } | 1253 | } |
1261 | 1254 | ||
1262 | static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) | 1255 | static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
diff --git a/drivers/char/mxser.h b/drivers/char/mxser.h index 7e188a4d602a..9fe28497eae9 100644 --- a/drivers/char/mxser.h +++ b/drivers/char/mxser.h | |||
@@ -439,12 +439,4 @@ | |||
439 | 439 | ||
440 | #define READ_MOXA_MUST_GDL(baseio) inb((baseio)+MOXA_MUST_GDL_REGISTER) | 440 | #define READ_MOXA_MUST_GDL(baseio) inb((baseio)+MOXA_MUST_GDL_REGISTER) |
441 | 441 | ||
442 | |||
443 | #ifndef INIT_WORK | ||
444 | #define INIT_WORK(_work, _func, _data){ \ | ||
445 | _data->tqueue.routine = _func;\ | ||
446 | _data->tqueue.data = _data;\ | ||
447 | } | ||
448 | #endif | ||
449 | |||
450 | #endif | 442 | #endif |
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 1bb030b3a51a..9af07e4999d5 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c | |||
@@ -49,22 +49,25 @@ | |||
49 | 49 | ||
50 | #include "mxser_new.h" | 50 | #include "mxser_new.h" |
51 | 51 | ||
52 | #define MXSER_VERSION "2.0" | 52 | #define MXSER_VERSION "2.0.1" /* 1.9.15 */ |
53 | #define MXSERMAJOR 174 | 53 | #define MXSERMAJOR 174 |
54 | #define MXSERCUMAJOR 175 | 54 | #define MXSERCUMAJOR 175 |
55 | 55 | ||
56 | #define MXSER_EVENT_TXLOW 1 | ||
57 | |||
58 | #define MXSER_BOARDS 4 /* Max. boards */ | 56 | #define MXSER_BOARDS 4 /* Max. boards */ |
59 | #define MXSER_PORTS_PER_BOARD 8 /* Max. ports per board */ | 57 | #define MXSER_PORTS_PER_BOARD 8 /* Max. ports per board */ |
60 | #define MXSER_PORTS (MXSER_BOARDS * MXSER_PORTS_PER_BOARD) | 58 | #define MXSER_PORTS (MXSER_BOARDS * MXSER_PORTS_PER_BOARD) |
61 | #define MXSER_ISR_PASS_LIMIT 99999L | 59 | #define MXSER_ISR_PASS_LIMIT 100 |
62 | 60 | ||
63 | #define MXSER_ERR_IOADDR -1 | 61 | #define MXSER_ERR_IOADDR -1 |
64 | #define MXSER_ERR_IRQ -2 | 62 | #define MXSER_ERR_IRQ -2 |
65 | #define MXSER_ERR_IRQ_CONFLIT -3 | 63 | #define MXSER_ERR_IRQ_CONFLIT -3 |
66 | #define MXSER_ERR_VECTOR -4 | 64 | #define MXSER_ERR_VECTOR -4 |
67 | 65 | ||
66 | /*CheckIsMoxaMust return value*/ | ||
67 | #define MOXA_OTHER_UART 0x00 | ||
68 | #define MOXA_MUST_MU150_HWID 0x01 | ||
69 | #define MOXA_MUST_MU860_HWID 0x02 | ||
70 | |||
68 | #define WAKEUP_CHARS 256 | 71 | #define WAKEUP_CHARS 256 |
69 | 72 | ||
70 | #define UART_MCR_AFE 0x20 | 73 | #define UART_MCR_AFE 0x20 |
@@ -176,6 +179,18 @@ static struct pci_device_id mxser_pcibrds[] = { | |||
176 | }; | 179 | }; |
177 | MODULE_DEVICE_TABLE(pci, mxser_pcibrds); | 180 | MODULE_DEVICE_TABLE(pci, mxser_pcibrds); |
178 | 181 | ||
182 | static int mxvar_baud_table[] = { | ||
183 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, | ||
184 | 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 | ||
185 | }; | ||
186 | static unsigned int mxvar_baud_table1[] = { | ||
187 | 0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, | ||
188 | B4800, B9600, B19200, B38400, B57600, B115200, B230400, B460800, B921600 | ||
189 | }; | ||
190 | #define BAUD_TABLE_NO ARRAY_SIZE(mxvar_baud_table) | ||
191 | |||
192 | #define B_SPEC B2000000 | ||
193 | |||
179 | static int ioaddr[MXSER_BOARDS] = { 0, 0, 0, 0 }; | 194 | static int ioaddr[MXSER_BOARDS] = { 0, 0, 0, 0 }; |
180 | static int ttymajor = MXSERMAJOR; | 195 | static int ttymajor = MXSERMAJOR; |
181 | static int calloutmajor = MXSERCUMAJOR; | 196 | static int calloutmajor = MXSERCUMAJOR; |
@@ -237,8 +252,7 @@ struct mxser_port { | |||
237 | long realbaud; | 252 | long realbaud; |
238 | int type; /* UART type */ | 253 | int type; /* UART type */ |
239 | int flags; /* defined in tty.h */ | 254 | int flags; /* defined in tty.h */ |
240 | long session; /* Session of opening process */ | 255 | int speed; |
241 | long pgrp; /* pgrp of opening process */ | ||
242 | 256 | ||
243 | int x_char; /* xon/xoff character */ | 257 | int x_char; /* xon/xoff character */ |
244 | int IER; /* Interrupt Enable Register */ | 258 | int IER; /* Interrupt Enable Register */ |
@@ -267,14 +281,11 @@ struct mxser_port { | |||
267 | int xmit_cnt; | 281 | int xmit_cnt; |
268 | 282 | ||
269 | struct ktermios normal_termios; | 283 | struct ktermios normal_termios; |
270 | struct ktermios callout_termios; | ||
271 | 284 | ||
272 | struct mxser_mon mon_data; | 285 | struct mxser_mon mon_data; |
273 | 286 | ||
274 | spinlock_t slock; | 287 | spinlock_t slock; |
275 | struct work_struct tqueue; | ||
276 | wait_queue_head_t open_wait; | 288 | wait_queue_head_t open_wait; |
277 | wait_queue_head_t close_wait; | ||
278 | wait_queue_head_t delta_msr_wait; | 289 | wait_queue_head_t delta_msr_wait; |
279 | }; | 290 | }; |
280 | 291 | ||
@@ -313,10 +324,9 @@ static int mxvar_diagflag; | |||
313 | static unsigned char mxser_msr[MXSER_PORTS + 1]; | 324 | static unsigned char mxser_msr[MXSER_PORTS + 1]; |
314 | static struct mxser_mon_ext mon_data_ext; | 325 | static struct mxser_mon_ext mon_data_ext; |
315 | static int mxser_set_baud_method[MXSER_PORTS + 1]; | 326 | static int mxser_set_baud_method[MXSER_PORTS + 1]; |
316 | static spinlock_t gm_lock; | ||
317 | 327 | ||
318 | #ifdef CONFIG_PCI | 328 | #ifdef CONFIG_PCI |
319 | static int CheckIsMoxaMust(int io) | 329 | static int __devinit CheckIsMoxaMust(int io) |
320 | { | 330 | { |
321 | u8 oldmcr, hwid; | 331 | u8 oldmcr, hwid; |
322 | int i; | 332 | int i; |
@@ -360,15 +370,6 @@ static void process_txrx_fifo(struct mxser_port *info) | |||
360 | } | 370 | } |
361 | } | 371 | } |
362 | 372 | ||
363 | static void mxser_do_softint(struct work_struct *work) | ||
364 | { | ||
365 | struct mxser_port *info = container_of(work, struct mxser_port, tqueue); | ||
366 | struct tty_struct *tty = info->tty; | ||
367 | |||
368 | if (test_and_clear_bit(MXSER_EVENT_TXLOW, &info->event)) | ||
369 | tty_wakeup(tty); | ||
370 | } | ||
371 | |||
372 | static unsigned char mxser_get_msr(int baseaddr, int mode, int port) | 373 | static unsigned char mxser_get_msr(int baseaddr, int mode, int port) |
373 | { | 374 | { |
374 | unsigned char status = 0; | 375 | unsigned char status = 0; |
@@ -456,10 +457,10 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp, | |||
456 | 457 | ||
457 | static int mxser_set_baud(struct mxser_port *info, long newspd) | 458 | static int mxser_set_baud(struct mxser_port *info, long newspd) |
458 | { | 459 | { |
460 | unsigned int i; | ||
459 | int quot = 0; | 461 | int quot = 0; |
460 | unsigned char cval; | 462 | unsigned char cval; |
461 | int ret = 0; | 463 | int ret = 0; |
462 | unsigned long flags; | ||
463 | 464 | ||
464 | if (!info->tty || !info->tty->termios) | 465 | if (!info->tty || !info->tty->termios) |
465 | return ret; | 466 | return ret; |
@@ -471,29 +472,34 @@ static int mxser_set_baud(struct mxser_port *info, long newspd) | |||
471 | return 0; | 472 | return 0; |
472 | 473 | ||
473 | info->realbaud = newspd; | 474 | info->realbaud = newspd; |
474 | if (newspd == 134) { | 475 | for (i = 0; i < BAUD_TABLE_NO; i++) |
475 | quot = (2 * info->baud_base / 269); | 476 | if (newspd == mxvar_baud_table[i]) |
476 | } else if (newspd) { | 477 | break; |
477 | quot = info->baud_base / newspd; | 478 | if (i == BAUD_TABLE_NO) { |
478 | if (quot == 0) | 479 | quot = info->baud_base / info->speed; |
479 | quot = 1; | 480 | if (info->speed <= 0 || info->speed > info->max_baud) |
481 | quot = 0; | ||
480 | } else { | 482 | } else { |
481 | quot = 0; | 483 | if (newspd == 134) { |
484 | quot = (2 * info->baud_base / 269); | ||
485 | } else if (newspd) { | ||
486 | quot = info->baud_base / newspd; | ||
487 | if (quot == 0) | ||
488 | quot = 1; | ||
489 | } else { | ||
490 | quot = 0; | ||
491 | } | ||
482 | } | 492 | } |
483 | 493 | ||
484 | info->timeout = ((info->xmit_fifo_size * HZ * 10 * quot) / info->baud_base); | 494 | info->timeout = ((info->xmit_fifo_size * HZ * 10 * quot) / info->baud_base); |
485 | info->timeout += HZ / 50; /* Add .02 seconds of slop */ | 495 | info->timeout += HZ / 50; /* Add .02 seconds of slop */ |
486 | 496 | ||
487 | if (quot) { | 497 | if (quot) { |
488 | spin_lock_irqsave(&info->slock, flags); | ||
489 | info->MCR |= UART_MCR_DTR; | 498 | info->MCR |= UART_MCR_DTR; |
490 | outb(info->MCR, info->ioaddr + UART_MCR); | 499 | outb(info->MCR, info->ioaddr + UART_MCR); |
491 | spin_unlock_irqrestore(&info->slock, flags); | ||
492 | } else { | 500 | } else { |
493 | spin_lock_irqsave(&info->slock, flags); | ||
494 | info->MCR &= ~UART_MCR_DTR; | 501 | info->MCR &= ~UART_MCR_DTR; |
495 | outb(info->MCR, info->ioaddr + UART_MCR); | 502 | outb(info->MCR, info->ioaddr + UART_MCR); |
496 | spin_unlock_irqrestore(&info->slock, flags); | ||
497 | return ret; | 503 | return ret; |
498 | } | 504 | } |
499 | 505 | ||
@@ -505,6 +511,18 @@ static int mxser_set_baud(struct mxser_port *info, long newspd) | |||
505 | outb(quot >> 8, info->ioaddr + UART_DLM); /* MS of divisor */ | 511 | outb(quot >> 8, info->ioaddr + UART_DLM); /* MS of divisor */ |
506 | outb(cval, info->ioaddr + UART_LCR); /* reset DLAB */ | 512 | outb(cval, info->ioaddr + UART_LCR); /* reset DLAB */ |
507 | 513 | ||
514 | if (i == BAUD_TABLE_NO) { | ||
515 | quot = info->baud_base % info->speed; | ||
516 | quot *= 8; | ||
517 | if ((quot % info->speed) > (info->speed / 2)) { | ||
518 | quot /= info->speed; | ||
519 | quot++; | ||
520 | } else { | ||
521 | quot /= info->speed; | ||
522 | } | ||
523 | SET_MOXA_MUST_ENUM_VALUE(info->ioaddr, quot); | ||
524 | } else | ||
525 | SET_MOXA_MUST_ENUM_VALUE(info->ioaddr, 0); | ||
508 | 526 | ||
509 | return ret; | 527 | return ret; |
510 | } | 528 | } |
@@ -520,7 +538,6 @@ static int mxser_change_speed(struct mxser_port *info, | |||
520 | int ret = 0; | 538 | int ret = 0; |
521 | unsigned char status; | 539 | unsigned char status; |
522 | long baud; | 540 | long baud; |
523 | unsigned long flags; | ||
524 | 541 | ||
525 | if (!info->tty || !info->tty->termios) | 542 | if (!info->tty || !info->tty->termios) |
526 | return ret; | 543 | return ret; |
@@ -529,7 +546,10 @@ static int mxser_change_speed(struct mxser_port *info, | |||
529 | return ret; | 546 | return ret; |
530 | 547 | ||
531 | if (mxser_set_baud_method[info->tty->index] == 0) { | 548 | if (mxser_set_baud_method[info->tty->index] == 0) { |
532 | baud = tty_get_baud_rate(info->tty); | 549 | if ((cflag & CBAUD) == B_SPEC) |
550 | baud = info->speed; | ||
551 | else | ||
552 | baud = tty_get_baud_rate(info->tty); | ||
533 | mxser_set_baud(info, baud); | 553 | mxser_set_baud(info, baud); |
534 | } | 554 | } |
535 | 555 | ||
@@ -612,8 +632,8 @@ static int mxser_change_speed(struct mxser_port *info, | |||
612 | outb(info->IER, info->ioaddr + | 632 | outb(info->IER, info->ioaddr + |
613 | UART_IER); | 633 | UART_IER); |
614 | } | 634 | } |
615 | set_bit(MXSER_EVENT_TXLOW, &info->event); | 635 | tty_wakeup(info->tty); |
616 | schedule_work(&info->tqueue); } | 636 | } |
617 | } else { | 637 | } else { |
618 | if (!(status & UART_MSR_CTS)) { | 638 | if (!(status & UART_MSR_CTS)) { |
619 | info->tty->hw_stopped = 1; | 639 | info->tty->hw_stopped = 1; |
@@ -668,7 +688,6 @@ static int mxser_change_speed(struct mxser_port *info, | |||
668 | } | 688 | } |
669 | } | 689 | } |
670 | if (info->board->chip_flag) { | 690 | if (info->board->chip_flag) { |
671 | spin_lock_irqsave(&info->slock, flags); | ||
672 | SET_MOXA_MUST_XON1_VALUE(info->ioaddr, START_CHAR(info->tty)); | 691 | SET_MOXA_MUST_XON1_VALUE(info->ioaddr, START_CHAR(info->tty)); |
673 | SET_MOXA_MUST_XOFF1_VALUE(info->ioaddr, STOP_CHAR(info->tty)); | 692 | SET_MOXA_MUST_XOFF1_VALUE(info->ioaddr, STOP_CHAR(info->tty)); |
674 | if (I_IXON(info->tty)) { | 693 | if (I_IXON(info->tty)) { |
@@ -681,7 +700,6 @@ static int mxser_change_speed(struct mxser_port *info, | |||
681 | } else { | 700 | } else { |
682 | DISABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(info->ioaddr); | 701 | DISABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(info->ioaddr); |
683 | } | 702 | } |
684 | spin_unlock_irqrestore(&info->slock, flags); | ||
685 | } | 703 | } |
686 | 704 | ||
687 | 705 | ||
@@ -708,7 +726,6 @@ static void mxser_check_modem_status(struct mxser_port *port, int status) | |||
708 | if ((port->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) { | 726 | if ((port->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) { |
709 | if (status & UART_MSR_DCD) | 727 | if (status & UART_MSR_DCD) |
710 | wake_up_interruptible(&port->open_wait); | 728 | wake_up_interruptible(&port->open_wait); |
711 | schedule_work(&port->tqueue); | ||
712 | } | 729 | } |
713 | 730 | ||
714 | if (port->flags & ASYNC_CTS_FLOW) { | 731 | if (port->flags & ASYNC_CTS_FLOW) { |
@@ -724,8 +741,7 @@ static void mxser_check_modem_status(struct mxser_port *port, int status) | |||
724 | outb(port->IER, port->ioaddr + | 741 | outb(port->IER, port->ioaddr + |
725 | UART_IER); | 742 | UART_IER); |
726 | } | 743 | } |
727 | set_bit(MXSER_EVENT_TXLOW, &port->event); | 744 | tty_wakeup(port->tty); |
728 | schedule_work(&port->tqueue); | ||
729 | } | 745 | } |
730 | } else { | 746 | } else { |
731 | if (!(status & UART_MSR_CTS)) { | 747 | if (!(status & UART_MSR_CTS)) { |
@@ -836,10 +852,10 @@ static int mxser_startup(struct mxser_port *info) | |||
836 | /* | 852 | /* |
837 | * and set the speed of the serial port | 853 | * and set the speed of the serial port |
838 | */ | 854 | */ |
839 | spin_unlock_irqrestore(&info->slock, flags); | ||
840 | mxser_change_speed(info, NULL); | 855 | mxser_change_speed(info, NULL); |
841 | |||
842 | info->flags |= ASYNC_INITIALIZED; | 856 | info->flags |= ASYNC_INITIALIZED; |
857 | spin_unlock_irqrestore(&info->slock, flags); | ||
858 | |||
843 | return 0; | 859 | return 0; |
844 | } | 860 | } |
845 | 861 | ||
@@ -909,11 +925,9 @@ static void mxser_shutdown(struct mxser_port *info) | |||
909 | static int mxser_open(struct tty_struct *tty, struct file *filp) | 925 | static int mxser_open(struct tty_struct *tty, struct file *filp) |
910 | { | 926 | { |
911 | struct mxser_port *info; | 927 | struct mxser_port *info; |
928 | unsigned long flags; | ||
912 | int retval, line; | 929 | int retval, line; |
913 | 930 | ||
914 | /* initialize driver_data in case something fails */ | ||
915 | tty->driver_data = NULL; | ||
916 | |||
917 | line = tty->index; | 931 | line = tty->index; |
918 | if (line == MXSER_PORTS) | 932 | if (line == MXSER_PORTS) |
919 | return 0; | 933 | return 0; |
@@ -928,7 +942,9 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) | |||
928 | /* | 942 | /* |
929 | * Start up serial port | 943 | * Start up serial port |
930 | */ | 944 | */ |
945 | spin_lock_irqsave(&info->slock, flags); | ||
931 | info->count++; | 946 | info->count++; |
947 | spin_unlock_irqrestore(&info->slock, flags); | ||
932 | retval = mxser_startup(info); | 948 | retval = mxser_startup(info); |
933 | if (retval) | 949 | if (retval) |
934 | return retval; | 950 | return retval; |
@@ -937,17 +953,6 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) | |||
937 | if (retval) | 953 | if (retval) |
938 | return retval; | 954 | return retval; |
939 | 955 | ||
940 | if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) { | ||
941 | if (tty->driver->subtype == SERIAL_TYPE_NORMAL) | ||
942 | *tty->termios = info->normal_termios; | ||
943 | else | ||
944 | *tty->termios = info->callout_termios; | ||
945 | mxser_change_speed(info, NULL); | ||
946 | } | ||
947 | |||
948 | info->session = process_session(current); | ||
949 | info->pgrp = process_group(current); | ||
950 | |||
951 | /* unmark here for very high baud rate (ex. 921600 bps) used */ | 956 | /* unmark here for very high baud rate (ex. 921600 bps) used */ |
952 | tty->low_latency = 1; | 957 | tty->low_latency = 1; |
953 | return 0; | 958 | return 0; |
@@ -1054,8 +1059,6 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) | |||
1054 | } | 1059 | } |
1055 | 1060 | ||
1056 | info->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING); | 1061 | info->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING); |
1057 | wake_up_interruptible(&info->close_wait); | ||
1058 | |||
1059 | } | 1062 | } |
1060 | 1063 | ||
1061 | static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count) | 1064 | static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count) |
@@ -1222,6 +1225,7 @@ static int mxser_set_serial_info(struct mxser_port *info, | |||
1222 | struct serial_struct __user *new_info) | 1225 | struct serial_struct __user *new_info) |
1223 | { | 1226 | { |
1224 | struct serial_struct new_serial; | 1227 | struct serial_struct new_serial; |
1228 | unsigned long sl_flags; | ||
1225 | unsigned int flags; | 1229 | unsigned int flags; |
1226 | int retval = 0; | 1230 | int retval = 0; |
1227 | 1231 | ||
@@ -1264,8 +1268,11 @@ static int mxser_set_serial_info(struct mxser_port *info, | |||
1264 | process_txrx_fifo(info); | 1268 | process_txrx_fifo(info); |
1265 | 1269 | ||
1266 | if (info->flags & ASYNC_INITIALIZED) { | 1270 | if (info->flags & ASYNC_INITIALIZED) { |
1267 | if (flags != (info->flags & ASYNC_SPD_MASK)) | 1271 | if (flags != (info->flags & ASYNC_SPD_MASK)) { |
1272 | spin_lock_irqsave(&info->slock, sl_flags); | ||
1268 | mxser_change_speed(info, NULL); | 1273 | mxser_change_speed(info, NULL); |
1274 | spin_unlock_irqrestore(&info->slock, sl_flags); | ||
1275 | } | ||
1269 | } else | 1276 | } else |
1270 | retval = mxser_startup(info); | 1277 | retval = mxser_startup(info); |
1271 | 1278 | ||
@@ -1373,11 +1380,10 @@ static int mxser_tiocmset(struct tty_struct *tty, struct file *file, | |||
1373 | return 0; | 1380 | return 0; |
1374 | } | 1381 | } |
1375 | 1382 | ||
1376 | static int mxser_program_mode(int port) | 1383 | static int __init mxser_program_mode(int port) |
1377 | { | 1384 | { |
1378 | int id, i, j, n; | 1385 | int id, i, j, n; |
1379 | 1386 | ||
1380 | spin_lock(&gm_lock); | ||
1381 | outb(0, port); | 1387 | outb(0, port); |
1382 | outb(0, port); | 1388 | outb(0, port); |
1383 | outb(0, port); | 1389 | outb(0, port); |
@@ -1385,7 +1391,6 @@ static int mxser_program_mode(int port) | |||
1385 | (void)inb(port); | 1391 | (void)inb(port); |
1386 | outb(0, port); | 1392 | outb(0, port); |
1387 | (void)inb(port); | 1393 | (void)inb(port); |
1388 | spin_unlock(&gm_lock); | ||
1389 | 1394 | ||
1390 | id = inb(port + 1) & 0x1F; | 1395 | id = inb(port + 1) & 0x1F; |
1391 | if ((id != C168_ASIC_ID) && | 1396 | if ((id != C168_ASIC_ID) && |
@@ -1410,7 +1415,7 @@ static int mxser_program_mode(int port) | |||
1410 | return id; | 1415 | return id; |
1411 | } | 1416 | } |
1412 | 1417 | ||
1413 | static void mxser_normal_mode(int port) | 1418 | static void __init mxser_normal_mode(int port) |
1414 | { | 1419 | { |
1415 | int i, n; | 1420 | int i, n; |
1416 | 1421 | ||
@@ -1443,7 +1448,7 @@ static void mxser_normal_mode(int port) | |||
1443 | #define EN0_PORT 0x010 /* Rcv missed frame error counter RD */ | 1448 | #define EN0_PORT 0x010 /* Rcv missed frame error counter RD */ |
1444 | #define ENC_PAGE0 0x000 /* Select page 0 of chip registers */ | 1449 | #define ENC_PAGE0 0x000 /* Select page 0 of chip registers */ |
1445 | #define ENC_PAGE3 0x0C0 /* Select page 3 of chip registers */ | 1450 | #define ENC_PAGE3 0x0C0 /* Select page 3 of chip registers */ |
1446 | static int mxser_read_register(int port, unsigned short *regs) | 1451 | static int __init mxser_read_register(int port, unsigned short *regs) |
1447 | { | 1452 | { |
1448 | int i, k, value, id; | 1453 | int i, k, value, id; |
1449 | unsigned int j; | 1454 | unsigned int j; |
@@ -1644,6 +1649,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, | |||
1644 | struct serial_icounter_struct __user *p_cuser; | 1649 | struct serial_icounter_struct __user *p_cuser; |
1645 | unsigned long templ; | 1650 | unsigned long templ; |
1646 | unsigned long flags; | 1651 | unsigned long flags; |
1652 | unsigned int i; | ||
1647 | void __user *argp = (void __user *)arg; | 1653 | void __user *argp = (void __user *)arg; |
1648 | int retval; | 1654 | int retval; |
1649 | 1655 | ||
@@ -1682,6 +1688,36 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, | |||
1682 | return 0; | 1688 | return 0; |
1683 | } | 1689 | } |
1684 | 1690 | ||
1691 | if (cmd == MOXA_SET_SPECIAL_BAUD_RATE) { | ||
1692 | int speed; | ||
1693 | |||
1694 | if (get_user(speed, (int __user *)argp)) | ||
1695 | return -EFAULT; | ||
1696 | if (speed <= 0 || speed > info->max_baud) | ||
1697 | return -EFAULT; | ||
1698 | if (!info->tty || !info->tty->termios || !info->ioaddr) | ||
1699 | return 0; | ||
1700 | info->tty->termios->c_cflag &= ~(CBAUD | CBAUDEX); | ||
1701 | for (i = 0; i < BAUD_TABLE_NO; i++) | ||
1702 | if (speed == mxvar_baud_table[i]) | ||
1703 | break; | ||
1704 | if (i == BAUD_TABLE_NO) { | ||
1705 | info->tty->termios->c_cflag |= B_SPEC; | ||
1706 | } else if (speed != 0) | ||
1707 | info->tty->termios->c_cflag |= mxvar_baud_table1[i]; | ||
1708 | |||
1709 | info->speed = speed; | ||
1710 | spin_lock_irqsave(&info->slock, flags); | ||
1711 | mxser_change_speed(info, NULL); | ||
1712 | spin_unlock_irqrestore(&info->slock, flags); | ||
1713 | |||
1714 | return 0; | ||
1715 | } else if (cmd == MOXA_GET_SPECIAL_BAUD_RATE) { | ||
1716 | if (copy_to_user(argp, &info->speed, sizeof(int))) | ||
1717 | return -EFAULT; | ||
1718 | return 0; | ||
1719 | } | ||
1720 | |||
1685 | if (cmd != TIOCGSERIAL && cmd != TIOCMIWAIT && cmd != TIOCGICOUNT && | 1721 | if (cmd != TIOCGSERIAL && cmd != TIOCMIWAIT && cmd != TIOCGICOUNT && |
1686 | test_bit(TTY_IO_ERROR, &tty->flags)) | 1722 | test_bit(TTY_IO_ERROR, &tty->flags)) |
1687 | return -EIO; | 1723 | return -EIO; |
@@ -1799,7 +1835,9 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, | |||
1799 | long baud; | 1835 | long baud; |
1800 | if (get_user(baud, (long __user *)argp)) | 1836 | if (get_user(baud, (long __user *)argp)) |
1801 | return -EFAULT; | 1837 | return -EFAULT; |
1838 | spin_lock_irqsave(&info->slock, flags); | ||
1802 | mxser_set_baud(info, baud); | 1839 | mxser_set_baud(info, baud); |
1840 | spin_unlock_irqrestore(&info->slock, flags); | ||
1803 | return 0; | 1841 | return 0; |
1804 | } | 1842 | } |
1805 | case MOXA_ASPP_GETBAUD: | 1843 | case MOXA_ASPP_GETBAUD: |
@@ -1976,7 +2014,9 @@ static void mxser_set_termios(struct tty_struct *tty, struct ktermios *old_termi | |||
1976 | if ((tty->termios->c_cflag != old_termios->c_cflag) || | 2014 | if ((tty->termios->c_cflag != old_termios->c_cflag) || |
1977 | (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { | 2015 | (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { |
1978 | 2016 | ||
2017 | spin_lock_irqsave(&info->slock, flags); | ||
1979 | mxser_change_speed(info, old_termios); | 2018 | mxser_change_speed(info, old_termios); |
2019 | spin_unlock_irqrestore(&info->slock, flags); | ||
1980 | 2020 | ||
1981 | if ((old_termios->c_cflag & CRTSCTS) && | 2021 | if ((old_termios->c_cflag & CRTSCTS) && |
1982 | !(tty->termios->c_cflag & CRTSCTS)) { | 2022 | !(tty->termios->c_cflag & CRTSCTS)) { |
@@ -2066,7 +2106,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) | |||
2066 | /* | 2106 | /* |
2067 | * This routine is called by tty_hangup() when a hangup is signaled. | 2107 | * This routine is called by tty_hangup() when a hangup is signaled. |
2068 | */ | 2108 | */ |
2069 | void mxser_hangup(struct tty_struct *tty) | 2109 | static void mxser_hangup(struct tty_struct *tty) |
2070 | { | 2110 | { |
2071 | struct mxser_port *info = tty->driver_data; | 2111 | struct mxser_port *info = tty->driver_data; |
2072 | 2112 | ||
@@ -2105,9 +2145,6 @@ static void mxser_receive_chars(struct mxser_port *port, int *status) | |||
2105 | int cnt = 0; | 2145 | int cnt = 0; |
2106 | int recv_room; | 2146 | int recv_room; |
2107 | int max = 256; | 2147 | int max = 256; |
2108 | unsigned long flags; | ||
2109 | |||
2110 | spin_lock_irqsave(&port->slock, flags); | ||
2111 | 2148 | ||
2112 | recv_room = tty->receive_room; | 2149 | recv_room = tty->receive_room; |
2113 | if ((recv_room == 0) && (!port->ldisc_stop_rx)) | 2150 | if ((recv_room == 0) && (!port->ldisc_stop_rx)) |
@@ -2169,7 +2206,8 @@ intr_old: | |||
2169 | } else if (*status & UART_LSR_OE) { | 2206 | } else if (*status & UART_LSR_OE) { |
2170 | flag = TTY_OVERRUN; | 2207 | flag = TTY_OVERRUN; |
2171 | port->icount.overrun++; | 2208 | port->icount.overrun++; |
2172 | } | 2209 | } else |
2210 | flag = TTY_BREAK; | ||
2173 | } | 2211 | } |
2174 | tty_insert_flip_char(tty, ch, flag); | 2212 | tty_insert_flip_char(tty, ch, flag); |
2175 | cnt++; | 2213 | cnt++; |
@@ -2191,7 +2229,6 @@ end_intr: | |||
2191 | mxvar_log.rxcnt[port->tty->index] += cnt; | 2229 | mxvar_log.rxcnt[port->tty->index] += cnt; |
2192 | port->mon_data.rxcnt += cnt; | 2230 | port->mon_data.rxcnt += cnt; |
2193 | port->mon_data.up_rxcnt += cnt; | 2231 | port->mon_data.up_rxcnt += cnt; |
2194 | spin_unlock_irqrestore(&port->slock, flags); | ||
2195 | 2232 | ||
2196 | tty_flip_buffer_push(tty); | 2233 | tty_flip_buffer_push(tty); |
2197 | } | 2234 | } |
@@ -2199,9 +2236,6 @@ end_intr: | |||
2199 | static void mxser_transmit_chars(struct mxser_port *port) | 2236 | static void mxser_transmit_chars(struct mxser_port *port) |
2200 | { | 2237 | { |
2201 | int count, cnt; | 2238 | int count, cnt; |
2202 | unsigned long flags; | ||
2203 | |||
2204 | spin_lock_irqsave(&port->slock, flags); | ||
2205 | 2239 | ||
2206 | if (port->x_char) { | 2240 | if (port->x_char) { |
2207 | outb(port->x_char, port->ioaddr + UART_TX); | 2241 | outb(port->x_char, port->ioaddr + UART_TX); |
@@ -2210,11 +2244,11 @@ static void mxser_transmit_chars(struct mxser_port *port) | |||
2210 | port->mon_data.txcnt++; | 2244 | port->mon_data.txcnt++; |
2211 | port->mon_data.up_txcnt++; | 2245 | port->mon_data.up_txcnt++; |
2212 | port->icount.tx++; | 2246 | port->icount.tx++; |
2213 | goto unlock; | 2247 | return; |
2214 | } | 2248 | } |
2215 | 2249 | ||
2216 | if (port->xmit_buf == 0) | 2250 | if (port->xmit_buf == 0) |
2217 | goto unlock; | 2251 | return; |
2218 | 2252 | ||
2219 | if ((port->xmit_cnt <= 0) || port->tty->stopped || | 2253 | if ((port->xmit_cnt <= 0) || port->tty->stopped || |
2220 | (port->tty->hw_stopped && | 2254 | (port->tty->hw_stopped && |
@@ -2222,7 +2256,7 @@ static void mxser_transmit_chars(struct mxser_port *port) | |||
2222 | (!port->board->chip_flag))) { | 2256 | (!port->board->chip_flag))) { |
2223 | port->IER &= ~UART_IER_THRI; | 2257 | port->IER &= ~UART_IER_THRI; |
2224 | outb(port->IER, port->ioaddr + UART_IER); | 2258 | outb(port->IER, port->ioaddr + UART_IER); |
2225 | goto unlock; | 2259 | return; |
2226 | } | 2260 | } |
2227 | 2261 | ||
2228 | cnt = port->xmit_cnt; | 2262 | cnt = port->xmit_cnt; |
@@ -2240,16 +2274,13 @@ static void mxser_transmit_chars(struct mxser_port *port) | |||
2240 | port->mon_data.up_txcnt += (cnt - port->xmit_cnt); | 2274 | port->mon_data.up_txcnt += (cnt - port->xmit_cnt); |
2241 | port->icount.tx += (cnt - port->xmit_cnt); | 2275 | port->icount.tx += (cnt - port->xmit_cnt); |
2242 | 2276 | ||
2243 | if (port->xmit_cnt < WAKEUP_CHARS) { | 2277 | if (port->xmit_cnt < WAKEUP_CHARS) |
2244 | set_bit(MXSER_EVENT_TXLOW, &port->event); | 2278 | tty_wakeup(port->tty); |
2245 | schedule_work(&port->tqueue); | 2279 | |
2246 | } | ||
2247 | if (port->xmit_cnt <= 0) { | 2280 | if (port->xmit_cnt <= 0) { |
2248 | port->IER &= ~UART_IER_THRI; | 2281 | port->IER &= ~UART_IER_THRI; |
2249 | outb(port->IER, port->ioaddr + UART_IER); | 2282 | outb(port->IER, port->ioaddr + UART_IER); |
2250 | } | 2283 | } |
2251 | unlock: | ||
2252 | spin_unlock_irqrestore(&port->slock, flags); | ||
2253 | } | 2284 | } |
2254 | 2285 | ||
2255 | /* | 2286 | /* |
@@ -2261,8 +2292,7 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id) | |||
2261 | struct mxser_board *brd = NULL; | 2292 | struct mxser_board *brd = NULL; |
2262 | struct mxser_port *port; | 2293 | struct mxser_port *port; |
2263 | int max, irqbits, bits, msr; | 2294 | int max, irqbits, bits, msr; |
2264 | int pass_counter = 0; | 2295 | unsigned int int_cnt, pass_counter = 0; |
2265 | unsigned int int_cnt; | ||
2266 | int handled = IRQ_NONE; | 2296 | int handled = IRQ_NONE; |
2267 | 2297 | ||
2268 | for (i = 0; i < MXSER_BOARDS; i++) | 2298 | for (i = 0; i < MXSER_BOARDS; i++) |
@@ -2276,7 +2306,7 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id) | |||
2276 | if (brd == NULL) | 2306 | if (brd == NULL) |
2277 | goto irq_stop; | 2307 | goto irq_stop; |
2278 | max = brd->info->nports; | 2308 | max = brd->info->nports; |
2279 | while (1) { | 2309 | while (pass_counter++ < MXSER_ISR_PASS_LIMIT) { |
2280 | irqbits = inb(brd->vector) & brd->vector_mask; | 2310 | irqbits = inb(brd->vector) & brd->vector_mask; |
2281 | if (irqbits == brd->vector_mask) | 2311 | if (irqbits == brd->vector_mask) |
2282 | break; | 2312 | break; |
@@ -2290,12 +2320,16 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id) | |||
2290 | port = &brd->ports[i]; | 2320 | port = &brd->ports[i]; |
2291 | 2321 | ||
2292 | int_cnt = 0; | 2322 | int_cnt = 0; |
2323 | spin_lock(&port->slock); | ||
2293 | do { | 2324 | do { |
2294 | iir = inb(port->ioaddr + UART_IIR); | 2325 | iir = inb(port->ioaddr + UART_IIR); |
2295 | if (iir & UART_IIR_NO_INT) | 2326 | if (iir & UART_IIR_NO_INT) |
2296 | break; | 2327 | break; |
2297 | iir &= MOXA_MUST_IIR_MASK; | 2328 | iir &= MOXA_MUST_IIR_MASK; |
2298 | if (!port->tty) { | 2329 | if (!port->tty || |
2330 | (port->flags & ASYNC_CLOSING) || | ||
2331 | !(port->flags & | ||
2332 | ASYNC_INITIALIZED)) { | ||
2299 | status = inb(port->ioaddr + UART_LSR); | 2333 | status = inb(port->ioaddr + UART_LSR); |
2300 | outb(0x27, port->ioaddr + UART_FCR); | 2334 | outb(0x27, port->ioaddr + UART_FCR); |
2301 | inb(port->ioaddr + UART_MSR); | 2335 | inb(port->ioaddr + UART_MSR); |
@@ -2341,9 +2375,8 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id) | |||
2341 | mxser_transmit_chars(port); | 2375 | mxser_transmit_chars(port); |
2342 | } | 2376 | } |
2343 | } while (int_cnt++ < MXSER_ISR_PASS_LIMIT); | 2377 | } while (int_cnt++ < MXSER_ISR_PASS_LIMIT); |
2378 | spin_unlock(&port->slock); | ||
2344 | } | 2379 | } |
2345 | if (pass_counter++ > MXSER_ISR_PASS_LIMIT) | ||
2346 | break; /* Prevent infinite loops */ | ||
2347 | } | 2380 | } |
2348 | 2381 | ||
2349 | irq_stop: | 2382 | irq_stop: |
@@ -2385,7 +2418,6 @@ static void mxser_release_res(struct mxser_board *brd, struct pci_dev *pdev, | |||
2385 | #ifdef CONFIG_PCI | 2418 | #ifdef CONFIG_PCI |
2386 | pci_release_region(pdev, 2); | 2419 | pci_release_region(pdev, 2); |
2387 | pci_release_region(pdev, 3); | 2420 | pci_release_region(pdev, 3); |
2388 | pci_dev_put(pdev); | ||
2389 | #endif | 2421 | #endif |
2390 | } else { | 2422 | } else { |
2391 | release_region(brd->ports[0].ioaddr, 8 * brd->info->nports); | 2423 | release_region(brd->ports[0].ioaddr, 8 * brd->info->nports); |
@@ -2420,11 +2452,10 @@ static int __devinit mxser_initbrd(struct mxser_board *brd, | |||
2420 | info->custom_divisor = info->baud_base * 16; | 2452 | info->custom_divisor = info->baud_base * 16; |
2421 | info->close_delay = 5 * HZ / 10; | 2453 | info->close_delay = 5 * HZ / 10; |
2422 | info->closing_wait = 30 * HZ; | 2454 | info->closing_wait = 30 * HZ; |
2423 | INIT_WORK(&info->tqueue, mxser_do_softint); | ||
2424 | info->normal_termios = mxvar_sdriver->init_termios; | 2455 | info->normal_termios = mxvar_sdriver->init_termios; |
2425 | init_waitqueue_head(&info->open_wait); | 2456 | init_waitqueue_head(&info->open_wait); |
2426 | init_waitqueue_head(&info->close_wait); | ||
2427 | init_waitqueue_head(&info->delta_msr_wait); | 2457 | init_waitqueue_head(&info->delta_msr_wait); |
2458 | info->speed = 9600; | ||
2428 | memset(&info->mon_data, 0, sizeof(struct mxser_mon)); | 2459 | memset(&info->mon_data, 0, sizeof(struct mxser_mon)); |
2429 | info->err_shadow = 0; | 2460 | info->err_shadow = 0; |
2430 | spin_lock_init(&info->slock); | 2461 | spin_lock_init(&info->slock); |
@@ -2433,22 +2464,17 @@ static int __devinit mxser_initbrd(struct mxser_board *brd, | |||
2433 | outb(inb(info->ioaddr + UART_IER) & 0xf0, | 2464 | outb(inb(info->ioaddr + UART_IER) & 0xf0, |
2434 | info->ioaddr + UART_IER); | 2465 | info->ioaddr + UART_IER); |
2435 | } | 2466 | } |
2436 | /* | ||
2437 | * Allocate the IRQ if necessary | ||
2438 | */ | ||
2439 | 2467 | ||
2440 | retval = request_irq(brd->irq, mxser_interrupt, | 2468 | retval = request_irq(brd->irq, mxser_interrupt, IRQF_SHARED, "mxser", |
2441 | (brd->ports[0].flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : | 2469 | brd); |
2442 | IRQF_DISABLED, "mxser", brd); | ||
2443 | if (retval) { | 2470 | if (retval) { |
2444 | printk(KERN_ERR "Board %s: Request irq failed, IRQ (%d) may " | 2471 | printk(KERN_ERR "Board %s: Request irq failed, IRQ (%d) may " |
2445 | "conflict with another device.\n", | 2472 | "conflict with another device.\n", |
2446 | brd->info->name, brd->irq); | 2473 | brd->info->name, brd->irq); |
2447 | /* We hold resources, we need to release them. */ | 2474 | /* We hold resources, we need to release them. */ |
2448 | mxser_release_res(brd, pdev, 0); | 2475 | mxser_release_res(brd, pdev, 0); |
2449 | return retval; | ||
2450 | } | 2476 | } |
2451 | return 0; | 2477 | return retval; |
2452 | } | 2478 | } |
2453 | 2479 | ||
2454 | static int __init mxser_get_ISA_conf(int cap, struct mxser_board *brd) | 2480 | static int __init mxser_get_ISA_conf(int cap, struct mxser_board *brd) |
@@ -2633,8 +2659,9 @@ static int __devinit mxser_probe(struct pci_dev *pdev, | |||
2633 | } | 2659 | } |
2634 | 2660 | ||
2635 | /* mxser_initbrd will hook ISR. */ | 2661 | /* mxser_initbrd will hook ISR. */ |
2636 | if (mxser_initbrd(brd, pdev) < 0) | 2662 | retval = mxser_initbrd(brd, pdev); |
2637 | goto err_relvec; | 2663 | if (retval) |
2664 | goto err_null; | ||
2638 | 2665 | ||
2639 | for (i = 0; i < brd->info->nports; i++) | 2666 | for (i = 0; i < brd->info->nports; i++) |
2640 | tty_register_device(mxvar_sdriver, brd->idx + i, &pdev->dev); | 2667 | tty_register_device(mxvar_sdriver, brd->idx + i, &pdev->dev); |
@@ -2642,10 +2669,9 @@ static int __devinit mxser_probe(struct pci_dev *pdev, | |||
2642 | pci_set_drvdata(pdev, brd); | 2669 | pci_set_drvdata(pdev, brd); |
2643 | 2670 | ||
2644 | return 0; | 2671 | return 0; |
2645 | err_relvec: | ||
2646 | pci_release_region(pdev, 3); | ||
2647 | err_relio: | 2672 | err_relio: |
2648 | pci_release_region(pdev, 2); | 2673 | pci_release_region(pdev, 2); |
2674 | err_null: | ||
2649 | brd->info = NULL; | 2675 | brd->info = NULL; |
2650 | err: | 2676 | err: |
2651 | return retval; | 2677 | return retval; |
@@ -2663,6 +2689,7 @@ static void __devexit mxser_remove(struct pci_dev *pdev) | |||
2663 | tty_unregister_device(mxvar_sdriver, brd->idx + i); | 2689 | tty_unregister_device(mxvar_sdriver, brd->idx + i); |
2664 | 2690 | ||
2665 | mxser_release_res(brd, pdev, 1); | 2691 | mxser_release_res(brd, pdev, 1); |
2692 | brd->info = NULL; | ||
2666 | } | 2693 | } |
2667 | 2694 | ||
2668 | static struct pci_driver mxser_driver = { | 2695 | static struct pci_driver mxser_driver = { |
@@ -2684,7 +2711,6 @@ static int __init mxser_module_init(void) | |||
2684 | mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 1); | 2711 | mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 1); |
2685 | if (!mxvar_sdriver) | 2712 | if (!mxvar_sdriver) |
2686 | return -ENOMEM; | 2713 | return -ENOMEM; |
2687 | spin_lock_init(&gm_lock); | ||
2688 | 2714 | ||
2689 | printk(KERN_INFO "MOXA Smartio/Industio family driver version %s\n", | 2715 | printk(KERN_INFO "MOXA Smartio/Industio family driver version %s\n", |
2690 | MXSER_VERSION); | 2716 | MXSER_VERSION); |
diff --git a/drivers/char/mxser_new.h b/drivers/char/mxser_new.h index a08f0ecb09ba..d42f7766c652 100644 --- a/drivers/char/mxser_new.h +++ b/drivers/char/mxser_new.h | |||
@@ -26,18 +26,8 @@ | |||
26 | #define RS422_MODE 2 | 26 | #define RS422_MODE 2 |
27 | #define RS485_4WIRE_MODE 3 | 27 | #define RS485_4WIRE_MODE 3 |
28 | #define OP_MODE_MASK 3 | 28 | #define OP_MODE_MASK 3 |
29 | // above add by Victor Yu. 01-05-2004 | ||
30 | |||
31 | #define TTY_THRESHOLD_THROTTLE 128 | ||
32 | |||
33 | #define LO_WATER (TTY_FLIPBUF_SIZE) | ||
34 | #define HI_WATER (TTY_FLIPBUF_SIZE*2*3/4) | ||
35 | |||
36 | // added by James. 03-11-2004. | ||
37 | #define MOXA_SDS_GETICOUNTER (MOXA + 68) | ||
38 | #define MOXA_SDS_RSTICOUNTER (MOXA + 69) | ||
39 | // (above) added by James. | ||
40 | 29 | ||
30 | #define MOXA_SDS_RSTICOUNTER (MOXA + 69) | ||
41 | #define MOXA_ASPP_OQUEUE (MOXA + 70) | 31 | #define MOXA_ASPP_OQUEUE (MOXA + 70) |
42 | #define MOXA_ASPP_SETBAUD (MOXA + 71) | 32 | #define MOXA_ASPP_SETBAUD (MOXA + 71) |
43 | #define MOXA_ASPP_GETBAUD (MOXA + 72) | 33 | #define MOXA_ASPP_GETBAUD (MOXA + 72) |
@@ -45,7 +35,8 @@ | |||
45 | #define MOXA_ASPP_LSTATUS (MOXA + 74) | 35 | #define MOXA_ASPP_LSTATUS (MOXA + 74) |
46 | #define MOXA_ASPP_MON_EXT (MOXA + 75) | 36 | #define MOXA_ASPP_MON_EXT (MOXA + 75) |
47 | #define MOXA_SET_BAUD_METHOD (MOXA + 76) | 37 | #define MOXA_SET_BAUD_METHOD (MOXA + 76) |
48 | 38 | #define MOXA_SET_SPECIAL_BAUD_RATE (MOXA + 77) | |
39 | #define MOXA_GET_SPECIAL_BAUD_RATE (MOXA + 78) | ||
49 | 40 | ||
50 | /* --------------------------------------------------- */ | 41 | /* --------------------------------------------------- */ |
51 | 42 | ||
@@ -55,51 +46,46 @@ | |||
55 | #define NPPI_NOTIFY_SW_OVERRUN 0x08 | 46 | #define NPPI_NOTIFY_SW_OVERRUN 0x08 |
56 | #define NPPI_NOTIFY_BREAK 0x10 | 47 | #define NPPI_NOTIFY_BREAK 0x10 |
57 | 48 | ||
58 | #define NPPI_NOTIFY_CTSHOLD 0x01 // Tx hold by CTS low | 49 | #define NPPI_NOTIFY_CTSHOLD 0x01 /* Tx hold by CTS low */ |
59 | #define NPPI_NOTIFY_DSRHOLD 0x02 // Tx hold by DSR low | 50 | #define NPPI_NOTIFY_DSRHOLD 0x02 /* Tx hold by DSR low */ |
60 | #define NPPI_NOTIFY_XOFFHOLD 0x08 // Tx hold by Xoff received | 51 | #define NPPI_NOTIFY_XOFFHOLD 0x08 /* Tx hold by Xoff received */ |
61 | #define NPPI_NOTIFY_XOFFXENT 0x10 // Xoff Sent | 52 | #define NPPI_NOTIFY_XOFFXENT 0x10 /* Xoff Sent */ |
62 | 53 | ||
63 | //CheckIsMoxaMust return value | 54 | /* follow just for Moxa Must chip define. */ |
64 | #define MOXA_OTHER_UART 0x00 | 55 | /* */ |
65 | #define MOXA_MUST_MU150_HWID 0x01 | 56 | /* when LCR register (offset 0x03) write following value, */ |
66 | #define MOXA_MUST_MU860_HWID 0x02 | 57 | /* the Must chip will enter enchance mode. And write value */ |
67 | 58 | /* on EFR (offset 0x02) bit 6,7 to change bank. */ | |
68 | // follow just for Moxa Must chip define. | ||
69 | // | ||
70 | // when LCR register (offset 0x03) write following value, | ||
71 | // the Must chip will enter enchance mode. And write value | ||
72 | // on EFR (offset 0x02) bit 6,7 to change bank. | ||
73 | #define MOXA_MUST_ENTER_ENCHANCE 0xBF | 59 | #define MOXA_MUST_ENTER_ENCHANCE 0xBF |
74 | 60 | ||
75 | // when enhance mode enable, access on general bank register | 61 | /* when enhance mode enable, access on general bank register */ |
76 | #define MOXA_MUST_GDL_REGISTER 0x07 | 62 | #define MOXA_MUST_GDL_REGISTER 0x07 |
77 | #define MOXA_MUST_GDL_MASK 0x7F | 63 | #define MOXA_MUST_GDL_MASK 0x7F |
78 | #define MOXA_MUST_GDL_HAS_BAD_DATA 0x80 | 64 | #define MOXA_MUST_GDL_HAS_BAD_DATA 0x80 |
79 | 65 | ||
80 | #define MOXA_MUST_LSR_RERR 0x80 // error in receive FIFO | 66 | #define MOXA_MUST_LSR_RERR 0x80 /* error in receive FIFO */ |
81 | // enchance register bank select and enchance mode setting register | 67 | /* enchance register bank select and enchance mode setting register */ |
82 | // when LCR register equal to 0xBF | 68 | /* when LCR register equal to 0xBF */ |
83 | #define MOXA_MUST_EFR_REGISTER 0x02 | 69 | #define MOXA_MUST_EFR_REGISTER 0x02 |
84 | // enchance mode enable | 70 | /* enchance mode enable */ |
85 | #define MOXA_MUST_EFR_EFRB_ENABLE 0x10 | 71 | #define MOXA_MUST_EFR_EFRB_ENABLE 0x10 |
86 | // enchance reister bank set 0, 1, 2 | 72 | /* enchance reister bank set 0, 1, 2 */ |
87 | #define MOXA_MUST_EFR_BANK0 0x00 | 73 | #define MOXA_MUST_EFR_BANK0 0x00 |
88 | #define MOXA_MUST_EFR_BANK1 0x40 | 74 | #define MOXA_MUST_EFR_BANK1 0x40 |
89 | #define MOXA_MUST_EFR_BANK2 0x80 | 75 | #define MOXA_MUST_EFR_BANK2 0x80 |
90 | #define MOXA_MUST_EFR_BANK3 0xC0 | 76 | #define MOXA_MUST_EFR_BANK3 0xC0 |
91 | #define MOXA_MUST_EFR_BANK_MASK 0xC0 | 77 | #define MOXA_MUST_EFR_BANK_MASK 0xC0 |
92 | 78 | ||
93 | // set XON1 value register, when LCR=0xBF and change to bank0 | 79 | /* set XON1 value register, when LCR=0xBF and change to bank0 */ |
94 | #define MOXA_MUST_XON1_REGISTER 0x04 | 80 | #define MOXA_MUST_XON1_REGISTER 0x04 |
95 | 81 | ||
96 | // set XON2 value register, when LCR=0xBF and change to bank0 | 82 | /* set XON2 value register, when LCR=0xBF and change to bank0 */ |
97 | #define MOXA_MUST_XON2_REGISTER 0x05 | 83 | #define MOXA_MUST_XON2_REGISTER 0x05 |
98 | 84 | ||
99 | // set XOFF1 value register, when LCR=0xBF and change to bank0 | 85 | /* set XOFF1 value register, when LCR=0xBF and change to bank0 */ |
100 | #define MOXA_MUST_XOFF1_REGISTER 0x06 | 86 | #define MOXA_MUST_XOFF1_REGISTER 0x06 |
101 | 87 | ||
102 | // set XOFF2 value register, when LCR=0xBF and change to bank0 | 88 | /* set XOFF2 value register, when LCR=0xBF and change to bank0 */ |
103 | #define MOXA_MUST_XOFF2_REGISTER 0x07 | 89 | #define MOXA_MUST_XOFF2_REGISTER 0x07 |
104 | 90 | ||
105 | #define MOXA_MUST_RBRTL_REGISTER 0x04 | 91 | #define MOXA_MUST_RBRTL_REGISTER 0x04 |
@@ -111,32 +97,32 @@ | |||
111 | #define MOXA_MUST_ECR_REGISTER 0x06 | 97 | #define MOXA_MUST_ECR_REGISTER 0x06 |
112 | #define MOXA_MUST_CSR_REGISTER 0x07 | 98 | #define MOXA_MUST_CSR_REGISTER 0x07 |
113 | 99 | ||
114 | // good data mode enable | 100 | /* good data mode enable */ |
115 | #define MOXA_MUST_FCR_GDA_MODE_ENABLE 0x20 | 101 | #define MOXA_MUST_FCR_GDA_MODE_ENABLE 0x20 |
116 | // only good data put into RxFIFO | 102 | /* only good data put into RxFIFO */ |
117 | #define MOXA_MUST_FCR_GDA_ONLY_ENABLE 0x10 | 103 | #define MOXA_MUST_FCR_GDA_ONLY_ENABLE 0x10 |
118 | 104 | ||
119 | // enable CTS interrupt | 105 | /* enable CTS interrupt */ |
120 | #define MOXA_MUST_IER_ECTSI 0x80 | 106 | #define MOXA_MUST_IER_ECTSI 0x80 |
121 | // enable RTS interrupt | 107 | /* enable RTS interrupt */ |
122 | #define MOXA_MUST_IER_ERTSI 0x40 | 108 | #define MOXA_MUST_IER_ERTSI 0x40 |
123 | // enable Xon/Xoff interrupt | 109 | /* enable Xon/Xoff interrupt */ |
124 | #define MOXA_MUST_IER_XINT 0x20 | 110 | #define MOXA_MUST_IER_XINT 0x20 |
125 | // enable GDA interrupt | 111 | /* enable GDA interrupt */ |
126 | #define MOXA_MUST_IER_EGDAI 0x10 | 112 | #define MOXA_MUST_IER_EGDAI 0x10 |
127 | 113 | ||
128 | #define MOXA_MUST_RECV_ISR (UART_IER_RDI | MOXA_MUST_IER_EGDAI) | 114 | #define MOXA_MUST_RECV_ISR (UART_IER_RDI | MOXA_MUST_IER_EGDAI) |
129 | 115 | ||
130 | // GDA interrupt pending | 116 | /* GDA interrupt pending */ |
131 | #define MOXA_MUST_IIR_GDA 0x1C | 117 | #define MOXA_MUST_IIR_GDA 0x1C |
132 | #define MOXA_MUST_IIR_RDA 0x04 | 118 | #define MOXA_MUST_IIR_RDA 0x04 |
133 | #define MOXA_MUST_IIR_RTO 0x0C | 119 | #define MOXA_MUST_IIR_RTO 0x0C |
134 | #define MOXA_MUST_IIR_LSR 0x06 | 120 | #define MOXA_MUST_IIR_LSR 0x06 |
135 | 121 | ||
136 | // recieved Xon/Xoff or specical interrupt pending | 122 | /* recieved Xon/Xoff or specical interrupt pending */ |
137 | #define MOXA_MUST_IIR_XSC 0x10 | 123 | #define MOXA_MUST_IIR_XSC 0x10 |
138 | 124 | ||
139 | // RTS/CTS change state interrupt pending | 125 | /* RTS/CTS change state interrupt pending */ |
140 | #define MOXA_MUST_IIR_RTSCTS 0x20 | 126 | #define MOXA_MUST_IIR_RTSCTS 0x20 |
141 | #define MOXA_MUST_IIR_MASK 0x3E | 127 | #define MOXA_MUST_IIR_MASK 0x3E |
142 | 128 | ||
@@ -144,307 +130,164 @@ | |||
144 | #define MOXA_MUST_MCR_XON_ANY 0x80 | 130 | #define MOXA_MUST_MCR_XON_ANY 0x80 |
145 | #define MOXA_MUST_MCR_TX_XON 0x08 | 131 | #define MOXA_MUST_MCR_TX_XON 0x08 |
146 | 132 | ||
147 | 133 | /* software flow control on chip mask value */ | |
148 | // software flow control on chip mask value | ||
149 | #define MOXA_MUST_EFR_SF_MASK 0x0F | 134 | #define MOXA_MUST_EFR_SF_MASK 0x0F |
150 | // send Xon1/Xoff1 | 135 | /* send Xon1/Xoff1 */ |
151 | #define MOXA_MUST_EFR_SF_TX1 0x08 | 136 | #define MOXA_MUST_EFR_SF_TX1 0x08 |
152 | // send Xon2/Xoff2 | 137 | /* send Xon2/Xoff2 */ |
153 | #define MOXA_MUST_EFR_SF_TX2 0x04 | 138 | #define MOXA_MUST_EFR_SF_TX2 0x04 |
154 | // send Xon1,Xon2/Xoff1,Xoff2 | 139 | /* send Xon1,Xon2/Xoff1,Xoff2 */ |
155 | #define MOXA_MUST_EFR_SF_TX12 0x0C | 140 | #define MOXA_MUST_EFR_SF_TX12 0x0C |
156 | // don't send Xon/Xoff | 141 | /* don't send Xon/Xoff */ |
157 | #define MOXA_MUST_EFR_SF_TX_NO 0x00 | 142 | #define MOXA_MUST_EFR_SF_TX_NO 0x00 |
158 | // Tx software flow control mask | 143 | /* Tx software flow control mask */ |
159 | #define MOXA_MUST_EFR_SF_TX_MASK 0x0C | 144 | #define MOXA_MUST_EFR_SF_TX_MASK 0x0C |
160 | // don't receive Xon/Xoff | 145 | /* don't receive Xon/Xoff */ |
161 | #define MOXA_MUST_EFR_SF_RX_NO 0x00 | 146 | #define MOXA_MUST_EFR_SF_RX_NO 0x00 |
162 | // receive Xon1/Xoff1 | 147 | /* receive Xon1/Xoff1 */ |
163 | #define MOXA_MUST_EFR_SF_RX1 0x02 | 148 | #define MOXA_MUST_EFR_SF_RX1 0x02 |
164 | // receive Xon2/Xoff2 | 149 | /* receive Xon2/Xoff2 */ |
165 | #define MOXA_MUST_EFR_SF_RX2 0x01 | 150 | #define MOXA_MUST_EFR_SF_RX2 0x01 |
166 | // receive Xon1,Xon2/Xoff1,Xoff2 | 151 | /* receive Xon1,Xon2/Xoff1,Xoff2 */ |
167 | #define MOXA_MUST_EFR_SF_RX12 0x03 | 152 | #define MOXA_MUST_EFR_SF_RX12 0x03 |
168 | // Rx software flow control mask | 153 | /* Rx software flow control mask */ |
169 | #define MOXA_MUST_EFR_SF_RX_MASK 0x03 | 154 | #define MOXA_MUST_EFR_SF_RX_MASK 0x03 |
170 | 155 | ||
171 | //#define MOXA_MUST_MIN_XOFFLIMIT 66 | 156 | #define ENABLE_MOXA_MUST_ENCHANCE_MODE(baseio) do { \ |
172 | //#define MOXA_MUST_MIN_XONLIMIT 20 | 157 | u8 __oldlcr, __efr; \ |
173 | //#define ID1_RX_TRIG 120 | 158 | __oldlcr = inb((baseio)+UART_LCR); \ |
174 | |||
175 | |||
176 | #define CHECK_MOXA_MUST_XOFFLIMIT(info) { \ | ||
177 | if ( (info)->IsMoxaMustChipFlag && \ | ||
178 | (info)->HandFlow.XoffLimit < MOXA_MUST_MIN_XOFFLIMIT ) { \ | ||
179 | (info)->HandFlow.XoffLimit = MOXA_MUST_MIN_XOFFLIMIT; \ | ||
180 | (info)->HandFlow.XonLimit = MOXA_MUST_MIN_XONLIMIT; \ | ||
181 | } \ | ||
182 | } | ||
183 | |||
184 | #define ENABLE_MOXA_MUST_ENCHANCE_MODE(baseio) { \ | ||
185 | u8 __oldlcr, __efr; \ | ||
186 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
187 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 159 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
188 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 160 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
189 | __efr |= MOXA_MUST_EFR_EFRB_ENABLE; \ | 161 | __efr |= MOXA_MUST_EFR_EFRB_ENABLE; \ |
190 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 162 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
191 | outb(__oldlcr, (baseio)+UART_LCR); \ | 163 | outb(__oldlcr, (baseio)+UART_LCR); \ |
192 | } | 164 | } while (0) |
193 | 165 | ||
194 | #define DISABLE_MOXA_MUST_ENCHANCE_MODE(baseio) { \ | 166 | #define DISABLE_MOXA_MUST_ENCHANCE_MODE(baseio) do { \ |
195 | u8 __oldlcr, __efr; \ | 167 | u8 __oldlcr, __efr; \ |
196 | __oldlcr = inb((baseio)+UART_LCR); \ | 168 | __oldlcr = inb((baseio)+UART_LCR); \ |
197 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 169 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
198 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 170 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
199 | __efr &= ~MOXA_MUST_EFR_EFRB_ENABLE; \ | 171 | __efr &= ~MOXA_MUST_EFR_EFRB_ENABLE; \ |
200 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 172 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
201 | outb(__oldlcr, (baseio)+UART_LCR); \ | 173 | outb(__oldlcr, (baseio)+UART_LCR); \ |
202 | } | 174 | } while (0) |
203 | 175 | ||
204 | #define SET_MOXA_MUST_XON1_VALUE(baseio, Value) { \ | 176 | #define SET_MOXA_MUST_XON1_VALUE(baseio, Value) do { \ |
205 | u8 __oldlcr, __efr; \ | 177 | u8 __oldlcr, __efr; \ |
206 | __oldlcr = inb((baseio)+UART_LCR); \ | 178 | __oldlcr = inb((baseio)+UART_LCR); \ |
207 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 179 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
208 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 180 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
209 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | 181 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ |
210 | __efr |= MOXA_MUST_EFR_BANK0; \ | 182 | __efr |= MOXA_MUST_EFR_BANK0; \ |
211 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 183 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
212 | outb((u8)(Value), (baseio)+MOXA_MUST_XON1_REGISTER); \ | 184 | outb((u8)(Value), (baseio)+MOXA_MUST_XON1_REGISTER); \ |
213 | outb(__oldlcr, (baseio)+UART_LCR); \ | 185 | outb(__oldlcr, (baseio)+UART_LCR); \ |
214 | } | 186 | } while (0) |
215 | 187 | ||
216 | #define SET_MOXA_MUST_XON2_VALUE(baseio, Value) { \ | 188 | #define SET_MOXA_MUST_XOFF1_VALUE(baseio, Value) do { \ |
217 | u8 __oldlcr, __efr; \ | 189 | u8 __oldlcr, __efr; \ |
218 | __oldlcr = inb((baseio)+UART_LCR); \ | 190 | __oldlcr = inb((baseio)+UART_LCR); \ |
219 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 191 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
220 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 192 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
221 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | 193 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ |
222 | __efr |= MOXA_MUST_EFR_BANK0; \ | 194 | __efr |= MOXA_MUST_EFR_BANK0; \ |
223 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 195 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
224 | outb((u8)(Value), (baseio)+MOXA_MUST_XON2_REGISTER); \ | ||
225 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
226 | } | ||
227 | |||
228 | #define SET_MOXA_MUST_XOFF1_VALUE(baseio, Value) { \ | ||
229 | u8 __oldlcr, __efr; \ | ||
230 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
231 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
232 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
233 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | ||
234 | __efr |= MOXA_MUST_EFR_BANK0; \ | ||
235 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
236 | outb((u8)(Value), (baseio)+MOXA_MUST_XOFF1_REGISTER); \ | 196 | outb((u8)(Value), (baseio)+MOXA_MUST_XOFF1_REGISTER); \ |
237 | outb(__oldlcr, (baseio)+UART_LCR); \ | 197 | outb(__oldlcr, (baseio)+UART_LCR); \ |
238 | } | 198 | } while (0) |
239 | 199 | ||
240 | #define SET_MOXA_MUST_XOFF2_VALUE(baseio, Value) { \ | 200 | #define SET_MOXA_MUST_FIFO_VALUE(info) do { \ |
241 | u8 __oldlcr, __efr; \ | 201 | u8 __oldlcr, __efr; \ |
242 | __oldlcr = inb((baseio)+UART_LCR); \ | 202 | __oldlcr = inb((info)->ioaddr+UART_LCR); \ |
243 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 203 | outb(MOXA_MUST_ENTER_ENCHANCE, (info)->ioaddr+UART_LCR);\ |
244 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
245 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | ||
246 | __efr |= MOXA_MUST_EFR_BANK0; \ | ||
247 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
248 | outb((u8)(Value), (baseio)+MOXA_MUST_XOFF2_REGISTER); \ | ||
249 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
250 | } | ||
251 | |||
252 | #define SET_MOXA_MUST_RBRTL_VALUE(baseio, Value) { \ | ||
253 | u8 __oldlcr, __efr; \ | ||
254 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
255 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
256 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
257 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | ||
258 | __efr |= MOXA_MUST_EFR_BANK1; \ | ||
259 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
260 | outb((u8)(Value), (baseio)+MOXA_MUST_RBRTL_REGISTER); \ | ||
261 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
262 | } | ||
263 | |||
264 | #define SET_MOXA_MUST_RBRTH_VALUE(baseio, Value) { \ | ||
265 | u8 __oldlcr, __efr; \ | ||
266 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
267 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
268 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
269 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | ||
270 | __efr |= MOXA_MUST_EFR_BANK1; \ | ||
271 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
272 | outb((u8)(Value), (baseio)+MOXA_MUST_RBRTH_REGISTER); \ | ||
273 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
274 | } | ||
275 | |||
276 | #define SET_MOXA_MUST_RBRTI_VALUE(baseio, Value) { \ | ||
277 | u8 __oldlcr, __efr; \ | ||
278 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
279 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
280 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
281 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | ||
282 | __efr |= MOXA_MUST_EFR_BANK1; \ | ||
283 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
284 | outb((u8)(Value), (baseio)+MOXA_MUST_RBRTI_REGISTER); \ | ||
285 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
286 | } | ||
287 | |||
288 | #define SET_MOXA_MUST_THRTL_VALUE(baseio, Value) { \ | ||
289 | u8 __oldlcr, __efr; \ | ||
290 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
291 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
292 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
293 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | ||
294 | __efr |= MOXA_MUST_EFR_BANK1; \ | ||
295 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
296 | outb((u8)(Value), (baseio)+MOXA_MUST_THRTL_REGISTER); \ | ||
297 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
298 | } | ||
299 | |||
300 | //#define MOXA_MUST_RBRL_VALUE 4 | ||
301 | #define SET_MOXA_MUST_FIFO_VALUE(info) { \ | ||
302 | u8 __oldlcr, __efr; \ | ||
303 | __oldlcr = inb((info)->ioaddr+UART_LCR); \ | ||
304 | outb(MOXA_MUST_ENTER_ENCHANCE, (info)->ioaddr+UART_LCR); \ | ||
305 | __efr = inb((info)->ioaddr+MOXA_MUST_EFR_REGISTER); \ | 204 | __efr = inb((info)->ioaddr+MOXA_MUST_EFR_REGISTER); \ |
306 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | 205 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ |
307 | __efr |= MOXA_MUST_EFR_BANK1; \ | 206 | __efr |= MOXA_MUST_EFR_BANK1; \ |
308 | outb(__efr, (info)->ioaddr+MOXA_MUST_EFR_REGISTER); \ | 207 | outb(__efr, (info)->ioaddr+MOXA_MUST_EFR_REGISTER); \ |
309 | outb((u8)((info)->rx_high_water), (info)->ioaddr+MOXA_MUST_RBRTH_REGISTER); \ | 208 | outb((u8)((info)->rx_high_water), (info)->ioaddr+ \ |
310 | outb((u8)((info)->rx_trigger), (info)->ioaddr+MOXA_MUST_RBRTI_REGISTER); \ | 209 | MOXA_MUST_RBRTH_REGISTER); \ |
311 | outb((u8)((info)->rx_low_water), (info)->ioaddr+MOXA_MUST_RBRTL_REGISTER); \ | 210 | outb((u8)((info)->rx_trigger), (info)->ioaddr+ \ |
312 | outb(__oldlcr, (info)->ioaddr+UART_LCR); \ | 211 | MOXA_MUST_RBRTI_REGISTER); \ |
313 | } | 212 | outb((u8)((info)->rx_low_water), (info)->ioaddr+ \ |
314 | 213 | MOXA_MUST_RBRTL_REGISTER); \ | |
315 | 214 | outb(__oldlcr, (info)->ioaddr+UART_LCR); \ | |
316 | 215 | } while (0) | |
317 | #define SET_MOXA_MUST_ENUM_VALUE(baseio, Value) { \ | 216 | |
318 | u8 __oldlcr, __efr; \ | 217 | #define SET_MOXA_MUST_ENUM_VALUE(baseio, Value) do { \ |
319 | __oldlcr = inb((baseio)+UART_LCR); \ | 218 | u8 __oldlcr, __efr; \ |
219 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
320 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 220 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
321 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 221 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
322 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | 222 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ |
323 | __efr |= MOXA_MUST_EFR_BANK2; \ | 223 | __efr |= MOXA_MUST_EFR_BANK2; \ |
324 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 224 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
325 | outb((u8)(Value), (baseio)+MOXA_MUST_ENUM_REGISTER); \ | 225 | outb((u8)(Value), (baseio)+MOXA_MUST_ENUM_REGISTER); \ |
326 | outb(__oldlcr, (baseio)+UART_LCR); \ | 226 | outb(__oldlcr, (baseio)+UART_LCR); \ |
327 | } | 227 | } while (0) |
328 | 228 | ||
329 | #define GET_MOXA_MUST_HARDWARE_ID(baseio, pId) { \ | 229 | #define GET_MOXA_MUST_HARDWARE_ID(baseio, pId) do { \ |
330 | u8 __oldlcr, __efr; \ | 230 | u8 __oldlcr, __efr; \ |
331 | __oldlcr = inb((baseio)+UART_LCR); \ | 231 | __oldlcr = inb((baseio)+UART_LCR); \ |
332 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
333 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
334 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ | ||
335 | __efr |= MOXA_MUST_EFR_BANK2; \ | ||
336 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
337 | *pId = inb((baseio)+MOXA_MUST_HWID_REGISTER); \ | ||
338 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
339 | } | ||
340 | |||
341 | #define SET_MOXA_MUST_NO_SOFTWARE_FLOW_CONTROL(baseio) { \ | ||
342 | u8 __oldlcr, __efr; \ | ||
343 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
344 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
345 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
346 | __efr &= ~MOXA_MUST_EFR_SF_MASK; \ | ||
347 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
348 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
349 | } | ||
350 | |||
351 | #define SET_MOXA_MUST_JUST_TX_SOFTWARE_FLOW_CONTROL(baseio) { \ | ||
352 | u8 __oldlcr, __efr; \ | ||
353 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
354 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 232 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
355 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 233 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
356 | __efr &= ~MOXA_MUST_EFR_SF_MASK; \ | 234 | __efr &= ~MOXA_MUST_EFR_BANK_MASK; \ |
357 | __efr |= MOXA_MUST_EFR_SF_TX1; \ | 235 | __efr |= MOXA_MUST_EFR_BANK2; \ |
358 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 236 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
359 | outb(__oldlcr, (baseio)+UART_LCR); \ | 237 | *pId = inb((baseio)+MOXA_MUST_HWID_REGISTER); \ |
360 | } | 238 | outb(__oldlcr, (baseio)+UART_LCR); \ |
361 | 239 | } while (0) | |
362 | #define ENABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) { \ | 240 | |
363 | u8 __oldlcr, __efr; \ | 241 | #define SET_MOXA_MUST_NO_SOFTWARE_FLOW_CONTROL(baseio) do { \ |
364 | __oldlcr = inb((baseio)+UART_LCR); \ | 242 | u8 __oldlcr, __efr; \ |
243 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
365 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 244 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
366 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 245 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
367 | __efr &= ~MOXA_MUST_EFR_SF_TX_MASK; \ | 246 | __efr &= ~MOXA_MUST_EFR_SF_MASK; \ |
368 | __efr |= MOXA_MUST_EFR_SF_TX1; \ | 247 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
369 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 248 | outb(__oldlcr, (baseio)+UART_LCR); \ |
370 | outb(__oldlcr, (baseio)+UART_LCR); \ | 249 | } while (0) |
371 | } | 250 | |
372 | 251 | #define ENABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) do { \ | |
373 | #define DISABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) { \ | 252 | u8 __oldlcr, __efr; \ |
374 | u8 __oldlcr, __efr; \ | 253 | __oldlcr = inb((baseio)+UART_LCR); \ |
375 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
376 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 254 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
377 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 255 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
378 | __efr &= ~MOXA_MUST_EFR_SF_TX_MASK; \ | 256 | __efr &= ~MOXA_MUST_EFR_SF_TX_MASK; \ |
379 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 257 | __efr |= MOXA_MUST_EFR_SF_TX1; \ |
380 | outb(__oldlcr, (baseio)+UART_LCR); \ | 258 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
381 | } | 259 | outb(__oldlcr, (baseio)+UART_LCR); \ |
382 | 260 | } while (0) | |
383 | #define SET_MOXA_MUST_JUST_RX_SOFTWARE_FLOW_CONTROL(baseio) { \ | 261 | |
384 | u8 __oldlcr, __efr; \ | 262 | #define DISABLE_MOXA_MUST_TX_SOFTWARE_FLOW_CONTROL(baseio) do { \ |
385 | __oldlcr = inb((baseio)+UART_LCR); \ | 263 | u8 __oldlcr, __efr; \ |
264 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
386 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 265 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
387 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 266 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
388 | __efr &= ~MOXA_MUST_EFR_SF_MASK; \ | 267 | __efr &= ~MOXA_MUST_EFR_SF_TX_MASK; \ |
389 | __efr |= MOXA_MUST_EFR_SF_RX1; \ | 268 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
390 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 269 | outb(__oldlcr, (baseio)+UART_LCR); \ |
391 | outb(__oldlcr, (baseio)+UART_LCR); \ | 270 | } while (0) |
392 | } | 271 | |
393 | 272 | #define ENABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) do { \ | |
394 | #define ENABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) { \ | 273 | u8 __oldlcr, __efr; \ |
395 | u8 __oldlcr, __efr; \ | 274 | __oldlcr = inb((baseio)+UART_LCR); \ |
396 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
397 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 275 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
398 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 276 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
399 | __efr &= ~MOXA_MUST_EFR_SF_RX_MASK; \ | 277 | __efr &= ~MOXA_MUST_EFR_SF_RX_MASK; \ |
400 | __efr |= MOXA_MUST_EFR_SF_RX1; \ | 278 | __efr |= MOXA_MUST_EFR_SF_RX1; \ |
401 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 279 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
402 | outb(__oldlcr, (baseio)+UART_LCR); \ | 280 | outb(__oldlcr, (baseio)+UART_LCR); \ |
403 | } | 281 | } while (0) |
404 | 282 | ||
405 | #define DISABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) { \ | 283 | #define DISABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(baseio) do { \ |
406 | u8 __oldlcr, __efr; \ | 284 | u8 __oldlcr, __efr; \ |
407 | __oldlcr = inb((baseio)+UART_LCR); \ | 285 | __oldlcr = inb((baseio)+UART_LCR); \ |
408 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | 286 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ |
409 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | 287 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ |
410 | __efr &= ~MOXA_MUST_EFR_SF_RX_MASK; \ | 288 | __efr &= ~MOXA_MUST_EFR_SF_RX_MASK; \ |
411 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | 289 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ |
412 | outb(__oldlcr, (baseio)+UART_LCR); \ | 290 | outb(__oldlcr, (baseio)+UART_LCR); \ |
413 | } | 291 | } while (0) |
414 | |||
415 | #define ENABLE_MOXA_MUST_TX_RX_SOFTWARE_FLOW_CONTROL(baseio) { \ | ||
416 | u8 __oldlcr, __efr; \ | ||
417 | __oldlcr = inb((baseio)+UART_LCR); \ | ||
418 | outb(MOXA_MUST_ENTER_ENCHANCE, (baseio)+UART_LCR); \ | ||
419 | __efr = inb((baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
420 | __efr &= ~MOXA_MUST_EFR_SF_MASK; \ | ||
421 | __efr |= (MOXA_MUST_EFR_SF_RX1|MOXA_MUST_EFR_SF_TX1); \ | ||
422 | outb(__efr, (baseio)+MOXA_MUST_EFR_REGISTER); \ | ||
423 | outb(__oldlcr, (baseio)+UART_LCR); \ | ||
424 | } | ||
425 | |||
426 | #define ENABLE_MOXA_MUST_XON_ANY_FLOW_CONTROL(baseio) { \ | ||
427 | u8 __oldmcr; \ | ||
428 | __oldmcr = inb((baseio)+UART_MCR); \ | ||
429 | __oldmcr |= MOXA_MUST_MCR_XON_ANY; \ | ||
430 | outb(__oldmcr, (baseio)+UART_MCR); \ | ||
431 | } | ||
432 | |||
433 | #define DISABLE_MOXA_MUST_XON_ANY_FLOW_CONTROL(baseio) { \ | ||
434 | u8 __oldmcr; \ | ||
435 | __oldmcr = inb((baseio)+UART_MCR); \ | ||
436 | __oldmcr &= ~MOXA_MUST_MCR_XON_ANY; \ | ||
437 | outb(__oldmcr, (baseio)+UART_MCR); \ | ||
438 | } | ||
439 | |||
440 | #define READ_MOXA_MUST_GDL(baseio) inb((baseio)+MOXA_MUST_GDL_REGISTER) | ||
441 | |||
442 | |||
443 | #ifndef INIT_WORK | ||
444 | #define INIT_WORK(_work, _func, _data){ \ | ||
445 | _data->tqueue.routine = _func;\ | ||
446 | _data->tqueue.data = _data;\ | ||
447 | } | ||
448 | #endif | ||
449 | 292 | ||
450 | #endif | 293 | #endif |
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c index dc6d41841457..fab1b7d42858 100644 --- a/drivers/char/n_r3964.c +++ b/drivers/char/n_r3964.c | |||
@@ -60,62 +60,56 @@ | |||
60 | #include <linux/slab.h> | 60 | #include <linux/slab.h> |
61 | #include <linux/tty.h> | 61 | #include <linux/tty.h> |
62 | #include <linux/errno.h> | 62 | #include <linux/errno.h> |
63 | #include <linux/string.h> /* used in new tty drivers */ | 63 | #include <linux/string.h> /* used in new tty drivers */ |
64 | #include <linux/signal.h> /* used in new tty drivers */ | 64 | #include <linux/signal.h> /* used in new tty drivers */ |
65 | #include <linux/ioctl.h> | 65 | #include <linux/ioctl.h> |
66 | #include <linux/n_r3964.h> | 66 | #include <linux/n_r3964.h> |
67 | #include <linux/poll.h> | 67 | #include <linux/poll.h> |
68 | #include <linux/init.h> | 68 | #include <linux/init.h> |
69 | #include <asm/uaccess.h> | 69 | #include <asm/uaccess.h> |
70 | 70 | ||
71 | 71 | /*#define DEBUG_QUEUE*/ | |
72 | //#define DEBUG_QUEUE | ||
73 | 72 | ||
74 | /* Log successful handshake and protocol operations */ | 73 | /* Log successful handshake and protocol operations */ |
75 | //#define DEBUG_PROTO_S | 74 | /*#define DEBUG_PROTO_S*/ |
76 | 75 | ||
77 | /* Log handshake and protocol errors: */ | 76 | /* Log handshake and protocol errors: */ |
78 | //#define DEBUG_PROTO_E | 77 | /*#define DEBUG_PROTO_E*/ |
79 | 78 | ||
80 | /* Log Linediscipline operations (open, close, read, write...): */ | 79 | /* Log Linediscipline operations (open, close, read, write...): */ |
81 | //#define DEBUG_LDISC | 80 | /*#define DEBUG_LDISC*/ |
82 | 81 | ||
83 | /* Log module and memory operations (init, cleanup; kmalloc, kfree): */ | 82 | /* Log module and memory operations (init, cleanup; kmalloc, kfree): */ |
84 | //#define DEBUG_MODUL | 83 | /*#define DEBUG_MODUL*/ |
85 | 84 | ||
86 | /* Macro helpers for debug output: */ | 85 | /* Macro helpers for debug output: */ |
87 | #define TRACE(format, args...) printk("r3964: " format "\n" , ## args); | 86 | #define TRACE(format, args...) printk("r3964: " format "\n" , ## args) |
88 | 87 | ||
89 | #ifdef DEBUG_MODUL | 88 | #ifdef DEBUG_MODUL |
90 | #define TRACE_M(format, args...) printk("r3964: " format "\n" , ## args); | 89 | #define TRACE_M(format, args...) printk("r3964: " format "\n" , ## args) |
91 | #else | 90 | #else |
92 | #define TRACE_M(fmt, arg...) /**/ | 91 | #define TRACE_M(fmt, arg...) do {} while (0) |
93 | #endif | 92 | #endif |
94 | |||
95 | #ifdef DEBUG_PROTO_S | 93 | #ifdef DEBUG_PROTO_S |
96 | #define TRACE_PS(format, args...) printk("r3964: " format "\n" , ## args); | 94 | #define TRACE_PS(format, args...) printk("r3964: " format "\n" , ## args) |
97 | #else | 95 | #else |
98 | #define TRACE_PS(fmt, arg...) /**/ | 96 | #define TRACE_PS(fmt, arg...) do {} while (0) |
99 | #endif | 97 | #endif |
100 | |||
101 | #ifdef DEBUG_PROTO_E | 98 | #ifdef DEBUG_PROTO_E |
102 | #define TRACE_PE(format, args...) printk("r3964: " format "\n" , ## args); | 99 | #define TRACE_PE(format, args...) printk("r3964: " format "\n" , ## args) |
103 | #else | 100 | #else |
104 | #define TRACE_PE(fmt, arg...) /**/ | 101 | #define TRACE_PE(fmt, arg...) do {} while (0) |
105 | #endif | 102 | #endif |
106 | |||
107 | #ifdef DEBUG_LDISC | 103 | #ifdef DEBUG_LDISC |
108 | #define TRACE_L(format, args...) printk("r3964: " format "\n" , ## args); | 104 | #define TRACE_L(format, args...) printk("r3964: " format "\n" , ## args) |
109 | #else | 105 | #else |
110 | #define TRACE_L(fmt, arg...) /**/ | 106 | #define TRACE_L(fmt, arg...) do {} while (0) |
111 | #endif | 107 | #endif |
112 | |||
113 | #ifdef DEBUG_QUEUE | 108 | #ifdef DEBUG_QUEUE |
114 | #define TRACE_Q(format, args...) printk("r3964: " format "\n" , ## args); | 109 | #define TRACE_Q(format, args...) printk("r3964: " format "\n" , ## args) |
115 | #else | 110 | #else |
116 | #define TRACE_Q(fmt, arg...) /**/ | 111 | #define TRACE_Q(fmt, arg...) do {} while (0) |
117 | #endif | 112 | #endif |
118 | |||
119 | static void add_tx_queue(struct r3964_info *, struct r3964_block_header *); | 113 | static void add_tx_queue(struct r3964_info *, struct r3964_block_header *); |
120 | static void remove_from_tx_queue(struct r3964_info *pInfo, int error_code); | 114 | static void remove_from_tx_queue(struct r3964_info *pInfo, int error_code); |
121 | static void put_char(struct r3964_info *pInfo, unsigned char ch); | 115 | static void put_char(struct r3964_info *pInfo, unsigned char ch); |
@@ -126,937 +120,830 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c); | |||
126 | static void receive_error(struct r3964_info *pInfo, const char flag); | 120 | static void receive_error(struct r3964_info *pInfo, const char flag); |
127 | static void on_timeout(unsigned long priv); | 121 | static void on_timeout(unsigned long priv); |
128 | static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg); | 122 | static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg); |
129 | static int read_telegram(struct r3964_info *pInfo, struct pid *pid, unsigned char __user *buf); | 123 | static int read_telegram(struct r3964_info *pInfo, struct pid *pid, |
124 | unsigned char __user * buf); | ||
130 | static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg, | 125 | static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg, |
131 | int error_code, struct r3964_block_header *pBlock); | 126 | int error_code, struct r3964_block_header *pBlock); |
132 | static struct r3964_message* remove_msg(struct r3964_info *pInfo, | 127 | static struct r3964_message *remove_msg(struct r3964_info *pInfo, |
133 | struct r3964_client_info *pClient); | 128 | struct r3964_client_info *pClient); |
134 | static void remove_client_block(struct r3964_info *pInfo, | 129 | static void remove_client_block(struct r3964_info *pInfo, |
135 | struct r3964_client_info *pClient); | 130 | struct r3964_client_info *pClient); |
136 | 131 | ||
137 | static int r3964_open(struct tty_struct *tty); | 132 | static int r3964_open(struct tty_struct *tty); |
138 | static void r3964_close(struct tty_struct *tty); | 133 | static void r3964_close(struct tty_struct *tty); |
139 | static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | 134 | static ssize_t r3964_read(struct tty_struct *tty, struct file *file, |
140 | unsigned char __user *buf, size_t nr); | 135 | unsigned char __user * buf, size_t nr); |
141 | static ssize_t r3964_write(struct tty_struct * tty, struct file * file, | 136 | static ssize_t r3964_write(struct tty_struct *tty, struct file *file, |
142 | const unsigned char * buf, size_t nr); | 137 | const unsigned char *buf, size_t nr); |
143 | static int r3964_ioctl(struct tty_struct * tty, struct file * file, | 138 | static int r3964_ioctl(struct tty_struct *tty, struct file *file, |
144 | unsigned int cmd, unsigned long arg); | 139 | unsigned int cmd, unsigned long arg); |
145 | static void r3964_set_termios(struct tty_struct *tty, struct ktermios * old); | 140 | static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old); |
146 | static unsigned int r3964_poll(struct tty_struct * tty, struct file * file, | 141 | static unsigned int r3964_poll(struct tty_struct *tty, struct file *file, |
147 | struct poll_table_struct *wait); | 142 | struct poll_table_struct *wait); |
148 | static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, | 143 | static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, |
149 | char *fp, int count); | 144 | char *fp, int count); |
150 | 145 | ||
151 | static struct tty_ldisc tty_ldisc_N_R3964 = { | 146 | static struct tty_ldisc tty_ldisc_N_R3964 = { |
152 | .owner = THIS_MODULE, | 147 | .owner = THIS_MODULE, |
153 | .magic = TTY_LDISC_MAGIC, | 148 | .magic = TTY_LDISC_MAGIC, |
154 | .name = "R3964", | 149 | .name = "R3964", |
155 | .open = r3964_open, | 150 | .open = r3964_open, |
156 | .close = r3964_close, | 151 | .close = r3964_close, |
157 | .read = r3964_read, | 152 | .read = r3964_read, |
158 | .write = r3964_write, | 153 | .write = r3964_write, |
159 | .ioctl = r3964_ioctl, | 154 | .ioctl = r3964_ioctl, |
160 | .set_termios = r3964_set_termios, | 155 | .set_termios = r3964_set_termios, |
161 | .poll = r3964_poll, | 156 | .poll = r3964_poll, |
162 | .receive_buf = r3964_receive_buf, | 157 | .receive_buf = r3964_receive_buf, |
163 | }; | 158 | }; |
164 | 159 | ||
165 | |||
166 | |||
167 | static void dump_block(const unsigned char *block, unsigned int length) | 160 | static void dump_block(const unsigned char *block, unsigned int length) |
168 | { | 161 | { |
169 | unsigned int i,j; | 162 | unsigned int i, j; |
170 | char linebuf[16*3+1]; | 163 | char linebuf[16 * 3 + 1]; |
171 | 164 | ||
172 | for(i=0;i<length;i+=16) | 165 | for (i = 0; i < length; i += 16) { |
173 | { | 166 | for (j = 0; (j < 16) && (j + i < length); j++) { |
174 | for(j=0;(j<16) && (j+i<length);j++) | 167 | sprintf(linebuf + 3 * j, "%02x ", block[i + j]); |
175 | { | 168 | } |
176 | sprintf(linebuf+3*j,"%02x ",block[i+j]); | 169 | linebuf[3 * j] = '\0'; |
177 | } | 170 | TRACE_PS("%s", linebuf); |
178 | linebuf[3*j]='\0'; | 171 | } |
179 | TRACE_PS("%s",linebuf); | ||
180 | } | ||
181 | } | 172 | } |
182 | 173 | ||
183 | |||
184 | |||
185 | |||
186 | /************************************************************* | 174 | /************************************************************* |
187 | * Driver initialisation | 175 | * Driver initialisation |
188 | *************************************************************/ | 176 | *************************************************************/ |
189 | 177 | ||
190 | |||
191 | /************************************************************* | 178 | /************************************************************* |
192 | * Module support routines | 179 | * Module support routines |
193 | *************************************************************/ | 180 | *************************************************************/ |
194 | 181 | ||
195 | static void __exit r3964_exit(void) | 182 | static void __exit r3964_exit(void) |
196 | { | 183 | { |
197 | int status; | 184 | int status; |
198 | 185 | ||
199 | TRACE_M ("cleanup_module()"); | 186 | TRACE_M("cleanup_module()"); |
200 | 187 | ||
201 | status=tty_unregister_ldisc(N_R3964); | 188 | status = tty_unregister_ldisc(N_R3964); |
202 | 189 | ||
203 | if(status!=0) | 190 | if (status != 0) { |
204 | { | 191 | printk(KERN_ERR "r3964: error unregistering linediscipline: " |
205 | printk(KERN_ERR "r3964: error unregistering linediscipline: %d\n", status); | 192 | "%d\n", status); |
206 | } | 193 | } else { |
207 | else | 194 | TRACE_L("linediscipline successfully unregistered"); |
208 | { | 195 | } |
209 | TRACE_L("linediscipline successfully unregistered"); | ||
210 | } | ||
211 | |||
212 | } | 196 | } |
213 | 197 | ||
214 | static int __init r3964_init(void) | 198 | static int __init r3964_init(void) |
215 | { | 199 | { |
216 | int status; | 200 | int status; |
217 | 201 | ||
218 | printk ("r3964: Philips r3964 Driver $Revision: 1.10 $\n"); | 202 | printk("r3964: Philips r3964 Driver $Revision: 1.10 $\n"); |
219 | 203 | ||
220 | /* | 204 | /* |
221 | * Register the tty line discipline | 205 | * Register the tty line discipline |
222 | */ | 206 | */ |
223 | 207 | ||
224 | status = tty_register_ldisc (N_R3964, &tty_ldisc_N_R3964); | 208 | status = tty_register_ldisc(N_R3964, &tty_ldisc_N_R3964); |
225 | if (status == 0) | 209 | if (status == 0) { |
226 | { | 210 | TRACE_L("line discipline %d registered", N_R3964); |
227 | TRACE_L("line discipline %d registered", N_R3964); | 211 | TRACE_L("flags=%x num=%x", tty_ldisc_N_R3964.flags, |
228 | TRACE_L("flags=%x num=%x", tty_ldisc_N_R3964.flags, | 212 | tty_ldisc_N_R3964.num); |
229 | tty_ldisc_N_R3964.num); | 213 | TRACE_L("open=%p", tty_ldisc_N_R3964.open); |
230 | TRACE_L("open=%p", tty_ldisc_N_R3964.open); | 214 | TRACE_L("tty_ldisc_N_R3964 = %p", &tty_ldisc_N_R3964); |
231 | TRACE_L("tty_ldisc_N_R3964 = %p", &tty_ldisc_N_R3964); | 215 | } else { |
232 | } | 216 | printk(KERN_ERR "r3964: error registering line discipline: " |
233 | else | 217 | "%d\n", status); |
234 | { | 218 | } |
235 | printk (KERN_ERR "r3964: error registering line discipline: %d\n", status); | 219 | return status; |
236 | } | ||
237 | return status; | ||
238 | } | 220 | } |
239 | 221 | ||
240 | module_init(r3964_init); | 222 | module_init(r3964_init); |
241 | module_exit(r3964_exit); | 223 | module_exit(r3964_exit); |
242 | 224 | ||
243 | |||
244 | /************************************************************* | 225 | /************************************************************* |
245 | * Protocol implementation routines | 226 | * Protocol implementation routines |
246 | *************************************************************/ | 227 | *************************************************************/ |
247 | 228 | ||
248 | static void add_tx_queue(struct r3964_info *pInfo, struct r3964_block_header *pHeader) | 229 | static void add_tx_queue(struct r3964_info *pInfo, |
230 | struct r3964_block_header *pHeader) | ||
249 | { | 231 | { |
250 | unsigned long flags; | 232 | unsigned long flags; |
251 | 233 | ||
252 | spin_lock_irqsave(&pInfo->lock, flags); | 234 | spin_lock_irqsave(&pInfo->lock, flags); |
253 | 235 | ||
254 | pHeader->next = NULL; | 236 | pHeader->next = NULL; |
255 | 237 | ||
256 | if(pInfo->tx_last == NULL) | 238 | if (pInfo->tx_last == NULL) { |
257 | { | 239 | pInfo->tx_first = pInfo->tx_last = pHeader; |
258 | pInfo->tx_first = pInfo->tx_last = pHeader; | 240 | } else { |
259 | } | 241 | pInfo->tx_last->next = pHeader; |
260 | else | 242 | pInfo->tx_last = pHeader; |
261 | { | 243 | } |
262 | pInfo->tx_last->next = pHeader; | 244 | |
263 | pInfo->tx_last = pHeader; | 245 | spin_unlock_irqrestore(&pInfo->lock, flags); |
264 | } | 246 | |
265 | 247 | TRACE_Q("add_tx_queue %p, length %d, tx_first = %p", | |
266 | spin_unlock_irqrestore(&pInfo->lock, flags); | 248 | pHeader, pHeader->length, pInfo->tx_first); |
267 | |||
268 | TRACE_Q("add_tx_queue %p, length %d, tx_first = %p", | ||
269 | pHeader, pHeader->length, pInfo->tx_first ); | ||
270 | } | 249 | } |
271 | 250 | ||
272 | static void remove_from_tx_queue(struct r3964_info *pInfo, int error_code) | 251 | static void remove_from_tx_queue(struct r3964_info *pInfo, int error_code) |
273 | { | 252 | { |
274 | struct r3964_block_header *pHeader; | 253 | struct r3964_block_header *pHeader; |
275 | unsigned long flags; | 254 | unsigned long flags; |
276 | #ifdef DEBUG_QUEUE | 255 | #ifdef DEBUG_QUEUE |
277 | struct r3964_block_header *pDump; | 256 | struct r3964_block_header *pDump; |
278 | #endif | 257 | #endif |
279 | |||
280 | pHeader = pInfo->tx_first; | ||
281 | 258 | ||
282 | if(pHeader==NULL) | 259 | pHeader = pInfo->tx_first; |
283 | return; | 260 | |
261 | if (pHeader == NULL) | ||
262 | return; | ||
284 | 263 | ||
285 | #ifdef DEBUG_QUEUE | 264 | #ifdef DEBUG_QUEUE |
286 | printk("r3964: remove_from_tx_queue: %p, length %u - ", | 265 | printk("r3964: remove_from_tx_queue: %p, length %u - ", |
287 | pHeader, pHeader->length ); | 266 | pHeader, pHeader->length); |
288 | for(pDump=pHeader;pDump;pDump=pDump->next) | 267 | for (pDump = pHeader; pDump; pDump = pDump->next) |
289 | printk("%p ", pDump); | 268 | printk("%p ", pDump); |
290 | printk("\n"); | 269 | printk("\n"); |
291 | #endif | 270 | #endif |
292 | 271 | ||
272 | if (pHeader->owner) { | ||
273 | if (error_code) { | ||
274 | add_msg(pHeader->owner, R3964_MSG_ACK, 0, | ||
275 | error_code, NULL); | ||
276 | } else { | ||
277 | add_msg(pHeader->owner, R3964_MSG_ACK, pHeader->length, | ||
278 | error_code, NULL); | ||
279 | } | ||
280 | wake_up_interruptible(&pInfo->read_wait); | ||
281 | } | ||
282 | |||
283 | spin_lock_irqsave(&pInfo->lock, flags); | ||
284 | |||
285 | pInfo->tx_first = pHeader->next; | ||
286 | if (pInfo->tx_first == NULL) { | ||
287 | pInfo->tx_last = NULL; | ||
288 | } | ||
289 | |||
290 | spin_unlock_irqrestore(&pInfo->lock, flags); | ||
291 | |||
292 | kfree(pHeader); | ||
293 | TRACE_M("remove_from_tx_queue - kfree %p", pHeader); | ||
293 | 294 | ||
294 | if(pHeader->owner) | 295 | TRACE_Q("remove_from_tx_queue: tx_first = %p, tx_last = %p", |
295 | { | 296 | pInfo->tx_first, pInfo->tx_last); |
296 | if(error_code) | ||
297 | { | ||
298 | add_msg(pHeader->owner, R3964_MSG_ACK, 0, | ||
299 | error_code, NULL); | ||
300 | } | ||
301 | else | ||
302 | { | ||
303 | add_msg(pHeader->owner, R3964_MSG_ACK, pHeader->length, | ||
304 | error_code, NULL); | ||
305 | } | ||
306 | wake_up_interruptible (&pInfo->read_wait); | ||
307 | } | ||
308 | |||
309 | spin_lock_irqsave(&pInfo->lock, flags); | ||
310 | |||
311 | pInfo->tx_first = pHeader->next; | ||
312 | if(pInfo->tx_first==NULL) | ||
313 | { | ||
314 | pInfo->tx_last = NULL; | ||
315 | } | ||
316 | |||
317 | spin_unlock_irqrestore(&pInfo->lock, flags); | ||
318 | |||
319 | kfree(pHeader); | ||
320 | TRACE_M("remove_from_tx_queue - kfree %p",pHeader); | ||
321 | |||
322 | TRACE_Q("remove_from_tx_queue: tx_first = %p, tx_last = %p", | ||
323 | pInfo->tx_first, pInfo->tx_last ); | ||
324 | } | 297 | } |
325 | 298 | ||
326 | static void add_rx_queue(struct r3964_info *pInfo, struct r3964_block_header *pHeader) | 299 | static void add_rx_queue(struct r3964_info *pInfo, |
300 | struct r3964_block_header *pHeader) | ||
327 | { | 301 | { |
328 | unsigned long flags; | 302 | unsigned long flags; |
329 | 303 | ||
330 | spin_lock_irqsave(&pInfo->lock, flags); | 304 | spin_lock_irqsave(&pInfo->lock, flags); |
331 | 305 | ||
332 | pHeader->next = NULL; | 306 | pHeader->next = NULL; |
333 | 307 | ||
334 | if(pInfo->rx_last == NULL) | 308 | if (pInfo->rx_last == NULL) { |
335 | { | 309 | pInfo->rx_first = pInfo->rx_last = pHeader; |
336 | pInfo->rx_first = pInfo->rx_last = pHeader; | 310 | } else { |
337 | } | 311 | pInfo->rx_last->next = pHeader; |
338 | else | 312 | pInfo->rx_last = pHeader; |
339 | { | 313 | } |
340 | pInfo->rx_last->next = pHeader; | 314 | pInfo->blocks_in_rx_queue++; |
341 | pInfo->rx_last = pHeader; | 315 | |
342 | } | 316 | spin_unlock_irqrestore(&pInfo->lock, flags); |
343 | pInfo->blocks_in_rx_queue++; | 317 | |
344 | 318 | TRACE_Q("add_rx_queue: %p, length = %d, rx_first = %p, count = %d", | |
345 | spin_unlock_irqrestore(&pInfo->lock, flags); | 319 | pHeader, pHeader->length, |
346 | 320 | pInfo->rx_first, pInfo->blocks_in_rx_queue); | |
347 | TRACE_Q("add_rx_queue: %p, length = %d, rx_first = %p, count = %d", | ||
348 | pHeader, pHeader->length, | ||
349 | pInfo->rx_first, pInfo->blocks_in_rx_queue); | ||
350 | } | 321 | } |
351 | 322 | ||
352 | static void remove_from_rx_queue(struct r3964_info *pInfo, | 323 | static void remove_from_rx_queue(struct r3964_info *pInfo, |
353 | struct r3964_block_header *pHeader) | 324 | struct r3964_block_header *pHeader) |
354 | { | 325 | { |
355 | unsigned long flags; | 326 | unsigned long flags; |
356 | struct r3964_block_header *pFind; | 327 | struct r3964_block_header *pFind; |
357 | 328 | ||
358 | if(pHeader==NULL) | 329 | if (pHeader == NULL) |
359 | return; | 330 | return; |
360 | 331 | ||
361 | TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d", | 332 | TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d", |
362 | pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue ); | 333 | pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue); |
363 | TRACE_Q("remove_from_rx_queue: %p, length %u", | 334 | TRACE_Q("remove_from_rx_queue: %p, length %u", |
364 | pHeader, pHeader->length ); | 335 | pHeader, pHeader->length); |
365 | 336 | ||
366 | spin_lock_irqsave(&pInfo->lock, flags); | 337 | spin_lock_irqsave(&pInfo->lock, flags); |
367 | 338 | ||
368 | if(pInfo->rx_first == pHeader) | 339 | if (pInfo->rx_first == pHeader) { |
369 | { | 340 | /* Remove the first block in the linked list: */ |
370 | /* Remove the first block in the linked list: */ | 341 | pInfo->rx_first = pHeader->next; |
371 | pInfo->rx_first = pHeader->next; | 342 | |
372 | 343 | if (pInfo->rx_first == NULL) { | |
373 | if(pInfo->rx_first==NULL) | 344 | pInfo->rx_last = NULL; |
374 | { | 345 | } |
375 | pInfo->rx_last = NULL; | 346 | pInfo->blocks_in_rx_queue--; |
376 | } | 347 | } else { |
377 | pInfo->blocks_in_rx_queue--; | 348 | /* Find block to remove: */ |
378 | } | 349 | for (pFind = pInfo->rx_first; pFind; pFind = pFind->next) { |
379 | else | 350 | if (pFind->next == pHeader) { |
380 | { | 351 | /* Got it. */ |
381 | /* Find block to remove: */ | 352 | pFind->next = pHeader->next; |
382 | for(pFind=pInfo->rx_first; pFind; pFind=pFind->next) | 353 | pInfo->blocks_in_rx_queue--; |
383 | { | 354 | if (pFind->next == NULL) { |
384 | if(pFind->next == pHeader) | 355 | /* Oh, removed the last one! */ |
385 | { | 356 | pInfo->rx_last = pFind; |
386 | /* Got it. */ | 357 | } |
387 | pFind->next = pHeader->next; | 358 | break; |
388 | pInfo->blocks_in_rx_queue--; | 359 | } |
389 | if(pFind->next==NULL) | 360 | } |
390 | { | 361 | } |
391 | /* Oh, removed the last one! */ | 362 | |
392 | pInfo->rx_last = pFind; | 363 | spin_unlock_irqrestore(&pInfo->lock, flags); |
393 | } | 364 | |
394 | break; | 365 | kfree(pHeader); |
395 | } | 366 | TRACE_M("remove_from_rx_queue - kfree %p", pHeader); |
396 | } | 367 | |
397 | } | 368 | TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d", |
398 | 369 | pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue); | |
399 | spin_unlock_irqrestore(&pInfo->lock, flags); | ||
400 | |||
401 | kfree(pHeader); | ||
402 | TRACE_M("remove_from_rx_queue - kfree %p",pHeader); | ||
403 | |||
404 | TRACE_Q("remove_from_rx_queue: rx_first = %p, rx_last = %p, count = %d", | ||
405 | pInfo->rx_first, pInfo->rx_last, pInfo->blocks_in_rx_queue ); | ||
406 | } | 370 | } |
407 | 371 | ||
408 | static void put_char(struct r3964_info *pInfo, unsigned char ch) | 372 | static void put_char(struct r3964_info *pInfo, unsigned char ch) |
409 | { | 373 | { |
410 | struct tty_struct *tty = pInfo->tty; | 374 | struct tty_struct *tty = pInfo->tty; |
411 | 375 | ||
412 | if(tty==NULL) | 376 | if (tty == NULL) |
413 | return; | 377 | return; |
414 | 378 | ||
415 | if(tty->driver->put_char) | 379 | if (tty->driver->put_char) { |
416 | { | 380 | tty->driver->put_char(tty, ch); |
417 | tty->driver->put_char(tty, ch); | 381 | } |
418 | } | 382 | pInfo->bcc ^= ch; |
419 | pInfo->bcc ^= ch; | ||
420 | } | 383 | } |
421 | 384 | ||
422 | static void flush(struct r3964_info *pInfo) | 385 | static void flush(struct r3964_info *pInfo) |
423 | { | 386 | { |
424 | struct tty_struct *tty = pInfo->tty; | 387 | struct tty_struct *tty = pInfo->tty; |
425 | 388 | ||
426 | if(tty==NULL) | 389 | if (tty == NULL) |
427 | return; | 390 | return; |
428 | 391 | ||
429 | if(tty->driver->flush_chars) | 392 | if (tty->driver->flush_chars) { |
430 | { | 393 | tty->driver->flush_chars(tty); |
431 | tty->driver->flush_chars(tty); | 394 | } |
432 | } | ||
433 | } | 395 | } |
434 | 396 | ||
435 | static void trigger_transmit(struct r3964_info *pInfo) | 397 | static void trigger_transmit(struct r3964_info *pInfo) |
436 | { | 398 | { |
437 | unsigned long flags; | 399 | unsigned long flags; |
438 | |||
439 | 400 | ||
440 | spin_lock_irqsave(&pInfo->lock, flags); | 401 | spin_lock_irqsave(&pInfo->lock, flags); |
441 | 402 | ||
442 | if((pInfo->state == R3964_IDLE) && (pInfo->tx_first!=NULL)) | 403 | if ((pInfo->state == R3964_IDLE) && (pInfo->tx_first != NULL)) { |
443 | { | 404 | pInfo->state = R3964_TX_REQUEST; |
444 | pInfo->state = R3964_TX_REQUEST; | 405 | pInfo->nRetry = 0; |
445 | pInfo->nRetry=0; | 406 | pInfo->flags &= ~R3964_ERROR; |
446 | pInfo->flags &= ~R3964_ERROR; | 407 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ); |
447 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ); | ||
448 | 408 | ||
449 | spin_unlock_irqrestore(&pInfo->lock, flags); | 409 | spin_unlock_irqrestore(&pInfo->lock, flags); |
450 | 410 | ||
451 | TRACE_PS("trigger_transmit - sent STX"); | 411 | TRACE_PS("trigger_transmit - sent STX"); |
452 | 412 | ||
453 | put_char(pInfo, STX); | 413 | put_char(pInfo, STX); |
454 | flush(pInfo); | 414 | flush(pInfo); |
455 | 415 | ||
456 | pInfo->bcc = 0; | 416 | pInfo->bcc = 0; |
457 | } | 417 | } else { |
458 | else | 418 | spin_unlock_irqrestore(&pInfo->lock, flags); |
459 | { | 419 | } |
460 | spin_unlock_irqrestore(&pInfo->lock, flags); | ||
461 | } | ||
462 | } | 420 | } |
463 | 421 | ||
464 | static void retry_transmit(struct r3964_info *pInfo) | 422 | static void retry_transmit(struct r3964_info *pInfo) |
465 | { | 423 | { |
466 | if(pInfo->nRetry<R3964_MAX_RETRIES) | 424 | if (pInfo->nRetry < R3964_MAX_RETRIES) { |
467 | { | 425 | TRACE_PE("transmission failed. Retry #%d", pInfo->nRetry); |
468 | TRACE_PE("transmission failed. Retry #%d", | 426 | pInfo->bcc = 0; |
469 | pInfo->nRetry); | 427 | put_char(pInfo, STX); |
470 | pInfo->bcc = 0; | 428 | flush(pInfo); |
471 | put_char(pInfo, STX); | 429 | pInfo->state = R3964_TX_REQUEST; |
472 | flush(pInfo); | 430 | pInfo->nRetry++; |
473 | pInfo->state = R3964_TX_REQUEST; | 431 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ); |
474 | pInfo->nRetry++; | 432 | } else { |
475 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ); | 433 | TRACE_PE("transmission failed after %d retries", |
476 | } | 434 | R3964_MAX_RETRIES); |
477 | else | 435 | |
478 | { | 436 | remove_from_tx_queue(pInfo, R3964_TX_FAIL); |
479 | TRACE_PE("transmission failed after %d retries", | 437 | |
480 | R3964_MAX_RETRIES); | 438 | put_char(pInfo, NAK); |
481 | 439 | flush(pInfo); | |
482 | remove_from_tx_queue(pInfo, R3964_TX_FAIL); | 440 | pInfo->state = R3964_IDLE; |
483 | 441 | ||
484 | put_char(pInfo, NAK); | 442 | trigger_transmit(pInfo); |
485 | flush(pInfo); | 443 | } |
486 | pInfo->state = R3964_IDLE; | ||
487 | |||
488 | trigger_transmit(pInfo); | ||
489 | } | ||
490 | } | 444 | } |
491 | 445 | ||
492 | |||
493 | static void transmit_block(struct r3964_info *pInfo) | 446 | static void transmit_block(struct r3964_info *pInfo) |
494 | { | 447 | { |
495 | struct tty_struct *tty = pInfo->tty; | 448 | struct tty_struct *tty = pInfo->tty; |
496 | struct r3964_block_header *pBlock = pInfo->tx_first; | 449 | struct r3964_block_header *pBlock = pInfo->tx_first; |
497 | int room=0; | 450 | int room = 0; |
498 | 451 | ||
499 | if((tty==NULL) || (pBlock==NULL)) | 452 | if ((tty == NULL) || (pBlock == NULL)) { |
500 | { | 453 | return; |
501 | return; | 454 | } |
502 | } | 455 | |
503 | 456 | if (tty->driver->write_room) | |
504 | if(tty->driver->write_room) | 457 | room = tty->driver->write_room(tty); |
505 | room=tty->driver->write_room(tty); | 458 | |
506 | 459 | TRACE_PS("transmit_block %p, room %d, length %d", | |
507 | TRACE_PS("transmit_block %p, room %d, length %d", | 460 | pBlock, room, pBlock->length); |
508 | pBlock, room, pBlock->length); | 461 | |
509 | 462 | while (pInfo->tx_position < pBlock->length) { | |
510 | while(pInfo->tx_position < pBlock->length) | 463 | if (room < 2) |
511 | { | 464 | break; |
512 | if(room<2) | 465 | |
513 | break; | 466 | if (pBlock->data[pInfo->tx_position] == DLE) { |
514 | 467 | /* send additional DLE char: */ | |
515 | if(pBlock->data[pInfo->tx_position]==DLE) | 468 | put_char(pInfo, DLE); |
516 | { | 469 | } |
517 | /* send additional DLE char: */ | 470 | put_char(pInfo, pBlock->data[pInfo->tx_position++]); |
518 | put_char(pInfo, DLE); | 471 | |
519 | } | 472 | room--; |
520 | put_char(pInfo, pBlock->data[pInfo->tx_position++]); | 473 | } |
521 | 474 | ||
522 | room--; | 475 | if ((pInfo->tx_position == pBlock->length) && (room >= 3)) { |
523 | } | 476 | put_char(pInfo, DLE); |
524 | 477 | put_char(pInfo, ETX); | |
525 | if((pInfo->tx_position == pBlock->length) && (room>=3)) | 478 | if (pInfo->flags & R3964_BCC) { |
526 | { | 479 | put_char(pInfo, pInfo->bcc); |
527 | put_char(pInfo, DLE); | 480 | } |
528 | put_char(pInfo, ETX); | 481 | pInfo->state = R3964_WAIT_FOR_TX_ACK; |
529 | if(pInfo->flags & R3964_BCC) | 482 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ); |
530 | { | 483 | } |
531 | put_char(pInfo, pInfo->bcc); | 484 | flush(pInfo); |
532 | } | ||
533 | pInfo->state = R3964_WAIT_FOR_TX_ACK; | ||
534 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_QVZ); | ||
535 | } | ||
536 | flush(pInfo); | ||
537 | } | 485 | } |
538 | 486 | ||
539 | static void on_receive_block(struct r3964_info *pInfo) | 487 | static void on_receive_block(struct r3964_info *pInfo) |
540 | { | 488 | { |
541 | unsigned int length; | 489 | unsigned int length; |
542 | struct r3964_client_info *pClient; | 490 | struct r3964_client_info *pClient; |
543 | struct r3964_block_header *pBlock; | 491 | struct r3964_block_header *pBlock; |
544 | 492 | ||
545 | length=pInfo->rx_position; | 493 | length = pInfo->rx_position; |
546 | 494 | ||
547 | /* compare byte checksum characters: */ | 495 | /* compare byte checksum characters: */ |
548 | if(pInfo->flags & R3964_BCC) | 496 | if (pInfo->flags & R3964_BCC) { |
549 | { | 497 | if (pInfo->bcc != pInfo->last_rx) { |
550 | if(pInfo->bcc!=pInfo->last_rx) | 498 | TRACE_PE("checksum error - got %x but expected %x", |
551 | { | 499 | pInfo->last_rx, pInfo->bcc); |
552 | TRACE_PE("checksum error - got %x but expected %x", | 500 | pInfo->flags |= R3964_CHECKSUM; |
553 | pInfo->last_rx, pInfo->bcc); | 501 | } |
554 | pInfo->flags |= R3964_CHECKSUM; | 502 | } |
555 | } | 503 | |
556 | } | 504 | /* check for errors (parity, overrun,...): */ |
557 | 505 | if (pInfo->flags & R3964_ERROR) { | |
558 | /* check for errors (parity, overrun,...): */ | 506 | TRACE_PE("on_receive_block - transmission failed error %x", |
559 | if(pInfo->flags & R3964_ERROR) | 507 | pInfo->flags & R3964_ERROR); |
560 | { | 508 | |
561 | TRACE_PE("on_receive_block - transmission failed error %x", | 509 | put_char(pInfo, NAK); |
562 | pInfo->flags & R3964_ERROR); | 510 | flush(pInfo); |
563 | 511 | if (pInfo->nRetry < R3964_MAX_RETRIES) { | |
564 | put_char(pInfo, NAK); | 512 | pInfo->state = R3964_WAIT_FOR_RX_REPEAT; |
565 | flush(pInfo); | 513 | pInfo->nRetry++; |
566 | if(pInfo->nRetry<R3964_MAX_RETRIES) | 514 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_RX_PANIC); |
567 | { | 515 | } else { |
568 | pInfo->state=R3964_WAIT_FOR_RX_REPEAT; | 516 | TRACE_PE("on_receive_block - failed after max retries"); |
569 | pInfo->nRetry++; | 517 | pInfo->state = R3964_IDLE; |
570 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_RX_PANIC); | 518 | } |
571 | } | 519 | return; |
572 | else | 520 | } |
573 | { | 521 | |
574 | TRACE_PE("on_receive_block - failed after max retries"); | 522 | /* received block; submit DLE: */ |
575 | pInfo->state=R3964_IDLE; | 523 | put_char(pInfo, DLE); |
576 | } | 524 | flush(pInfo); |
577 | return; | 525 | del_timer_sync(&pInfo->tmr); |
578 | } | 526 | TRACE_PS(" rx success: got %d chars", length); |
579 | 527 | ||
580 | 528 | /* prepare struct r3964_block_header: */ | |
581 | /* received block; submit DLE: */ | 529 | pBlock = kmalloc(length + sizeof(struct r3964_block_header), |
582 | put_char(pInfo, DLE); | 530 | GFP_KERNEL); |
583 | flush(pInfo); | 531 | TRACE_M("on_receive_block - kmalloc %p", pBlock); |
584 | del_timer_sync(&pInfo->tmr); | 532 | |
585 | TRACE_PS(" rx success: got %d chars", length); | 533 | if (pBlock == NULL) |
586 | 534 | return; | |
587 | /* prepare struct r3964_block_header: */ | 535 | |
588 | pBlock = kmalloc(length+sizeof(struct r3964_block_header), GFP_KERNEL); | 536 | pBlock->length = length; |
589 | TRACE_M("on_receive_block - kmalloc %p",pBlock); | 537 | pBlock->data = ((unsigned char *)pBlock) + |
590 | 538 | sizeof(struct r3964_block_header); | |
591 | if(pBlock==NULL) | 539 | pBlock->locks = 0; |
592 | return; | 540 | pBlock->next = NULL; |
593 | 541 | pBlock->owner = NULL; | |
594 | pBlock->length = length; | 542 | |
595 | pBlock->data = ((unsigned char*)pBlock)+sizeof(struct r3964_block_header); | 543 | memcpy(pBlock->data, pInfo->rx_buf, length); |
596 | pBlock->locks = 0; | 544 | |
597 | pBlock->next = NULL; | 545 | /* queue block into rx_queue: */ |
598 | pBlock->owner = NULL; | 546 | add_rx_queue(pInfo, pBlock); |
599 | 547 | ||
600 | memcpy(pBlock->data, pInfo->rx_buf, length); | 548 | /* notify attached client processes: */ |
601 | 549 | for (pClient = pInfo->firstClient; pClient; pClient = pClient->next) { | |
602 | /* queue block into rx_queue: */ | 550 | if (pClient->sig_flags & R3964_SIG_DATA) { |
603 | add_rx_queue(pInfo, pBlock); | 551 | add_msg(pClient, R3964_MSG_DATA, length, R3964_OK, |
604 | 552 | pBlock); | |
605 | /* notify attached client processes: */ | 553 | } |
606 | for(pClient=pInfo->firstClient; pClient; pClient=pClient->next) | 554 | } |
607 | { | 555 | wake_up_interruptible(&pInfo->read_wait); |
608 | if(pClient->sig_flags & R3964_SIG_DATA) | ||
609 | { | ||
610 | add_msg(pClient, R3964_MSG_DATA, length, R3964_OK, pBlock); | ||
611 | } | ||
612 | } | ||
613 | wake_up_interruptible (&pInfo->read_wait); | ||
614 | |||
615 | pInfo->state = R3964_IDLE; | ||
616 | |||
617 | trigger_transmit(pInfo); | ||
618 | } | ||
619 | 556 | ||
557 | pInfo->state = R3964_IDLE; | ||
558 | |||
559 | trigger_transmit(pInfo); | ||
560 | } | ||
620 | 561 | ||
621 | static void receive_char(struct r3964_info *pInfo, const unsigned char c) | 562 | static void receive_char(struct r3964_info *pInfo, const unsigned char c) |
622 | { | 563 | { |
623 | switch(pInfo->state) | 564 | switch (pInfo->state) { |
624 | { | 565 | case R3964_TX_REQUEST: |
625 | case R3964_TX_REQUEST: | 566 | if (c == DLE) { |
626 | if(c==DLE) | 567 | TRACE_PS("TX_REQUEST - got DLE"); |
627 | { | 568 | |
628 | TRACE_PS("TX_REQUEST - got DLE"); | 569 | pInfo->state = R3964_TRANSMITTING; |
629 | 570 | pInfo->tx_position = 0; | |
630 | pInfo->state = R3964_TRANSMITTING; | 571 | |
631 | pInfo->tx_position = 0; | 572 | transmit_block(pInfo); |
632 | 573 | } else if (c == STX) { | |
633 | transmit_block(pInfo); | 574 | if (pInfo->nRetry == 0) { |
634 | } | 575 | TRACE_PE("TX_REQUEST - init conflict"); |
635 | else if(c==STX) | 576 | if (pInfo->priority == R3964_SLAVE) { |
636 | { | 577 | goto start_receiving; |
637 | if(pInfo->nRetry==0) | 578 | } |
638 | { | 579 | } else { |
639 | TRACE_PE("TX_REQUEST - init conflict"); | 580 | TRACE_PE("TX_REQUEST - secondary init " |
640 | if(pInfo->priority == R3964_SLAVE) | 581 | "conflict!? Switching to SLAVE mode " |
641 | { | 582 | "for next rx."); |
642 | goto start_receiving; | 583 | goto start_receiving; |
643 | } | 584 | } |
644 | } | 585 | } else { |
645 | else | 586 | TRACE_PE("TX_REQUEST - char != DLE: %x", c); |
646 | { | 587 | retry_transmit(pInfo); |
647 | TRACE_PE("TX_REQUEST - secondary init conflict!?" | 588 | } |
648 | " Switching to SLAVE mode for next rx."); | 589 | break; |
649 | goto start_receiving; | 590 | case R3964_TRANSMITTING: |
650 | } | 591 | if (c == NAK) { |
651 | } | 592 | TRACE_PE("TRANSMITTING - got NAK"); |
652 | else | 593 | retry_transmit(pInfo); |
653 | { | 594 | } else { |
654 | TRACE_PE("TX_REQUEST - char != DLE: %x", c); | 595 | TRACE_PE("TRANSMITTING - got invalid char"); |
655 | retry_transmit(pInfo); | 596 | |
656 | } | 597 | pInfo->state = R3964_WAIT_ZVZ_BEFORE_TX_RETRY; |
657 | break; | 598 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); |
658 | case R3964_TRANSMITTING: | 599 | } |
659 | if(c==NAK) | 600 | break; |
660 | { | 601 | case R3964_WAIT_FOR_TX_ACK: |
661 | TRACE_PE("TRANSMITTING - got NAK"); | 602 | if (c == DLE) { |
662 | retry_transmit(pInfo); | 603 | TRACE_PS("WAIT_FOR_TX_ACK - got DLE"); |
663 | } | 604 | remove_from_tx_queue(pInfo, R3964_OK); |
664 | else | 605 | |
665 | { | 606 | pInfo->state = R3964_IDLE; |
666 | TRACE_PE("TRANSMITTING - got invalid char"); | 607 | trigger_transmit(pInfo); |
667 | 608 | } else { | |
668 | pInfo->state = R3964_WAIT_ZVZ_BEFORE_TX_RETRY; | 609 | retry_transmit(pInfo); |
669 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); | 610 | } |
670 | } | 611 | break; |
671 | break; | 612 | case R3964_WAIT_FOR_RX_REPEAT: |
672 | case R3964_WAIT_FOR_TX_ACK: | 613 | /* FALLTROUGH */ |
673 | if(c==DLE) | 614 | case R3964_IDLE: |
674 | { | 615 | if (c == STX) { |
675 | TRACE_PS("WAIT_FOR_TX_ACK - got DLE"); | 616 | /* Prevent rx_queue from overflow: */ |
676 | remove_from_tx_queue(pInfo, R3964_OK); | 617 | if (pInfo->blocks_in_rx_queue >= |
677 | 618 | R3964_MAX_BLOCKS_IN_RX_QUEUE) { | |
678 | pInfo->state = R3964_IDLE; | 619 | TRACE_PE("IDLE - got STX but no space in " |
679 | trigger_transmit(pInfo); | 620 | "rx_queue!"); |
680 | } | 621 | pInfo->state = R3964_WAIT_FOR_RX_BUF; |
681 | else | 622 | mod_timer(&pInfo->tmr, |
682 | { | 623 | jiffies + R3964_TO_NO_BUF); |
683 | retry_transmit(pInfo); | 624 | break; |
684 | } | 625 | } |
685 | break; | ||
686 | case R3964_WAIT_FOR_RX_REPEAT: | ||
687 | /* FALLTROUGH */ | ||
688 | case R3964_IDLE: | ||
689 | if(c==STX) | ||
690 | { | ||
691 | /* Prevent rx_queue from overflow: */ | ||
692 | if(pInfo->blocks_in_rx_queue >= R3964_MAX_BLOCKS_IN_RX_QUEUE) | ||
693 | { | ||
694 | TRACE_PE("IDLE - got STX but no space in rx_queue!"); | ||
695 | pInfo->state=R3964_WAIT_FOR_RX_BUF; | ||
696 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_NO_BUF); | ||
697 | break; | ||
698 | } | ||
699 | start_receiving: | 626 | start_receiving: |
700 | /* Ok, start receiving: */ | 627 | /* Ok, start receiving: */ |
701 | TRACE_PS("IDLE - got STX"); | 628 | TRACE_PS("IDLE - got STX"); |
702 | pInfo->rx_position = 0; | 629 | pInfo->rx_position = 0; |
703 | pInfo->last_rx = 0; | 630 | pInfo->last_rx = 0; |
704 | pInfo->flags &= ~R3964_ERROR; | 631 | pInfo->flags &= ~R3964_ERROR; |
705 | pInfo->state=R3964_RECEIVING; | 632 | pInfo->state = R3964_RECEIVING; |
706 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); | 633 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); |
707 | pInfo->nRetry = 0; | 634 | pInfo->nRetry = 0; |
708 | put_char(pInfo, DLE); | 635 | put_char(pInfo, DLE); |
709 | flush(pInfo); | 636 | flush(pInfo); |
710 | pInfo->bcc = 0; | 637 | pInfo->bcc = 0; |
711 | } | 638 | } |
712 | break; | 639 | break; |
713 | case R3964_RECEIVING: | 640 | case R3964_RECEIVING: |
714 | if(pInfo->rx_position < RX_BUF_SIZE) | 641 | if (pInfo->rx_position < RX_BUF_SIZE) { |
715 | { | 642 | pInfo->bcc ^= c; |
716 | pInfo->bcc ^= c; | 643 | |
717 | 644 | if (c == DLE) { | |
718 | if(c==DLE) | 645 | if (pInfo->last_rx == DLE) { |
719 | { | 646 | pInfo->last_rx = 0; |
720 | if(pInfo->last_rx==DLE) | 647 | goto char_to_buf; |
721 | { | 648 | } |
722 | pInfo->last_rx = 0; | 649 | pInfo->last_rx = DLE; |
723 | goto char_to_buf; | 650 | break; |
724 | } | 651 | } else if ((c == ETX) && (pInfo->last_rx == DLE)) { |
725 | pInfo->last_rx = DLE; | 652 | if (pInfo->flags & R3964_BCC) { |
726 | break; | 653 | pInfo->state = R3964_WAIT_FOR_BCC; |
727 | } | 654 | mod_timer(&pInfo->tmr, |
728 | else if((c==ETX) && (pInfo->last_rx==DLE)) | 655 | jiffies + R3964_TO_ZVZ); |
729 | { | 656 | } else { |
730 | if(pInfo->flags & R3964_BCC) | 657 | on_receive_block(pInfo); |
731 | { | 658 | } |
732 | pInfo->state = R3964_WAIT_FOR_BCC; | 659 | } else { |
733 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); | 660 | pInfo->last_rx = c; |
734 | } | ||
735 | else | ||
736 | { | ||
737 | on_receive_block(pInfo); | ||
738 | } | ||
739 | } | ||
740 | else | ||
741 | { | ||
742 | pInfo->last_rx = c; | ||
743 | char_to_buf: | 661 | char_to_buf: |
744 | pInfo->rx_buf[pInfo->rx_position++] = c; | 662 | pInfo->rx_buf[pInfo->rx_position++] = c; |
745 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); | 663 | mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ); |
746 | } | 664 | } |
747 | } | 665 | } |
748 | /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */ | 666 | /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */ |
749 | break; | 667 | break; |
750 | case R3964_WAIT_FOR_BCC: | 668 | case R3964_WAIT_FOR_BCC: |
751 | pInfo->last_rx = c; | 669 | pInfo->last_rx = c; |
752 | on_receive_block(pInfo); | 670 | on_receive_block(pInfo); |
753 | break; | 671 | break; |
754 | } | 672 | } |
755 | } | 673 | } |
756 | 674 | ||
757 | static void receive_error(struct r3964_info *pInfo, const char flag) | 675 | static void receive_error(struct r3964_info *pInfo, const char flag) |
758 | { | 676 | { |
759 | switch (flag) | 677 | switch (flag) { |
760 | { | 678 | case TTY_NORMAL: |
761 | case TTY_NORMAL: | 679 | break; |
762 | break; | 680 | case TTY_BREAK: |
763 | case TTY_BREAK: | 681 | TRACE_PE("received break"); |
764 | TRACE_PE("received break") | 682 | pInfo->flags |= R3964_BREAK; |
765 | pInfo->flags |= R3964_BREAK; | 683 | break; |
766 | break; | 684 | case TTY_PARITY: |
767 | case TTY_PARITY: | 685 | TRACE_PE("parity error"); |
768 | TRACE_PE("parity error") | 686 | pInfo->flags |= R3964_PARITY; |
769 | pInfo->flags |= R3964_PARITY; | 687 | break; |
770 | break; | 688 | case TTY_FRAME: |
771 | case TTY_FRAME: | 689 | TRACE_PE("frame error"); |
772 | TRACE_PE("frame error") | 690 | pInfo->flags |= R3964_FRAME; |
773 | pInfo->flags |= R3964_FRAME; | 691 | break; |
774 | break; | 692 | case TTY_OVERRUN: |
775 | case TTY_OVERRUN: | 693 | TRACE_PE("frame overrun"); |
776 | TRACE_PE("frame overrun") | 694 | pInfo->flags |= R3964_OVERRUN; |
777 | pInfo->flags |= R3964_OVERRUN; | 695 | break; |
778 | break; | 696 | default: |
779 | default: | 697 | TRACE_PE("receive_error - unknown flag %d", flag); |
780 | TRACE_PE("receive_error - unknown flag %d", flag); | 698 | pInfo->flags |= R3964_UNKNOWN; |
781 | pInfo->flags |= R3964_UNKNOWN; | 699 | break; |
782 | break; | 700 | } |
783 | } | ||
784 | } | 701 | } |
785 | 702 | ||
786 | static void on_timeout(unsigned long priv) | 703 | static void on_timeout(unsigned long priv) |
787 | { | 704 | { |
788 | struct r3964_info *pInfo = (void *)priv; | 705 | struct r3964_info *pInfo = (void *)priv; |
789 | 706 | ||
790 | switch(pInfo->state) | 707 | switch (pInfo->state) { |
791 | { | 708 | case R3964_TX_REQUEST: |
792 | case R3964_TX_REQUEST: | 709 | TRACE_PE("TX_REQUEST - timeout"); |
793 | TRACE_PE("TX_REQUEST - timeout"); | 710 | retry_transmit(pInfo); |
794 | retry_transmit(pInfo); | 711 | break; |
795 | break; | 712 | case R3964_WAIT_ZVZ_BEFORE_TX_RETRY: |
796 | case R3964_WAIT_ZVZ_BEFORE_TX_RETRY: | 713 | put_char(pInfo, NAK); |
797 | put_char(pInfo, NAK); | 714 | flush(pInfo); |
798 | flush(pInfo); | 715 | retry_transmit(pInfo); |
799 | retry_transmit(pInfo); | 716 | break; |
800 | break; | 717 | case R3964_WAIT_FOR_TX_ACK: |
801 | case R3964_WAIT_FOR_TX_ACK: | 718 | TRACE_PE("WAIT_FOR_TX_ACK - timeout"); |
802 | TRACE_PE("WAIT_FOR_TX_ACK - timeout"); | 719 | retry_transmit(pInfo); |
803 | retry_transmit(pInfo); | 720 | break; |
804 | break; | 721 | case R3964_WAIT_FOR_RX_BUF: |
805 | case R3964_WAIT_FOR_RX_BUF: | 722 | TRACE_PE("WAIT_FOR_RX_BUF - timeout"); |
806 | TRACE_PE("WAIT_FOR_RX_BUF - timeout"); | 723 | put_char(pInfo, NAK); |
807 | put_char(pInfo, NAK); | 724 | flush(pInfo); |
808 | flush(pInfo); | 725 | pInfo->state = R3964_IDLE; |
809 | pInfo->state=R3964_IDLE; | 726 | break; |
810 | break; | 727 | case R3964_RECEIVING: |
811 | case R3964_RECEIVING: | 728 | TRACE_PE("RECEIVING - timeout after %d chars", |
812 | TRACE_PE("RECEIVING - timeout after %d chars", | 729 | pInfo->rx_position); |
813 | pInfo->rx_position); | 730 | put_char(pInfo, NAK); |
814 | put_char(pInfo, NAK); | 731 | flush(pInfo); |
815 | flush(pInfo); | 732 | pInfo->state = R3964_IDLE; |
816 | pInfo->state=R3964_IDLE; | 733 | break; |
817 | break; | 734 | case R3964_WAIT_FOR_RX_REPEAT: |
818 | case R3964_WAIT_FOR_RX_REPEAT: | 735 | TRACE_PE("WAIT_FOR_RX_REPEAT - timeout"); |
819 | TRACE_PE("WAIT_FOR_RX_REPEAT - timeout"); | 736 | pInfo->state = R3964_IDLE; |
820 | pInfo->state=R3964_IDLE; | 737 | break; |
821 | break; | 738 | case R3964_WAIT_FOR_BCC: |
822 | case R3964_WAIT_FOR_BCC: | 739 | TRACE_PE("WAIT_FOR_BCC - timeout"); |
823 | TRACE_PE("WAIT_FOR_BCC - timeout"); | 740 | put_char(pInfo, NAK); |
824 | put_char(pInfo, NAK); | 741 | flush(pInfo); |
825 | flush(pInfo); | 742 | pInfo->state = R3964_IDLE; |
826 | pInfo->state=R3964_IDLE; | 743 | break; |
827 | break; | 744 | } |
828 | } | ||
829 | } | 745 | } |
830 | 746 | ||
831 | static struct r3964_client_info *findClient( | 747 | static struct r3964_client_info *findClient(struct r3964_info *pInfo, |
832 | struct r3964_info *pInfo, struct pid *pid) | 748 | struct pid *pid) |
833 | { | 749 | { |
834 | struct r3964_client_info *pClient; | 750 | struct r3964_client_info *pClient; |
835 | 751 | ||
836 | for(pClient=pInfo->firstClient; pClient; pClient=pClient->next) | 752 | for (pClient = pInfo->firstClient; pClient; pClient = pClient->next) { |
837 | { | 753 | if (pClient->pid == pid) { |
838 | if(pClient->pid == pid) | 754 | return pClient; |
839 | { | 755 | } |
840 | return pClient; | 756 | } |
841 | } | 757 | return NULL; |
842 | } | ||
843 | return NULL; | ||
844 | } | 758 | } |
845 | 759 | ||
846 | static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg) | 760 | static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg) |
847 | { | 761 | { |
848 | struct r3964_client_info *pClient; | 762 | struct r3964_client_info *pClient; |
849 | struct r3964_client_info **ppClient; | 763 | struct r3964_client_info **ppClient; |
850 | struct r3964_message *pMsg; | 764 | struct r3964_message *pMsg; |
851 | 765 | ||
852 | if((arg & R3964_SIG_ALL)==0) | 766 | if ((arg & R3964_SIG_ALL) == 0) { |
853 | { | 767 | /* Remove client from client list */ |
854 | /* Remove client from client list */ | 768 | for (ppClient = &pInfo->firstClient; *ppClient; |
855 | for(ppClient=&pInfo->firstClient; *ppClient; ppClient=&(*ppClient)->next) | 769 | ppClient = &(*ppClient)->next) { |
856 | { | 770 | pClient = *ppClient; |
857 | pClient = *ppClient; | 771 | |
858 | 772 | if (pClient->pid == pid) { | |
859 | if(pClient->pid == pid) | 773 | TRACE_PS("removing client %d from client list", |
860 | { | 774 | pid_nr(pid)); |
861 | TRACE_PS("removing client %d from client list", pid_nr(pid)); | 775 | *ppClient = pClient->next; |
862 | *ppClient = pClient->next; | 776 | while (pClient->msg_count) { |
863 | while(pClient->msg_count) | 777 | pMsg = remove_msg(pInfo, pClient); |
864 | { | 778 | if (pMsg) { |
865 | pMsg=remove_msg(pInfo, pClient); | 779 | kfree(pMsg); |
866 | if(pMsg) | 780 | TRACE_M("enable_signals - msg " |
867 | { | 781 | "kfree %p", pMsg); |
868 | kfree(pMsg); | 782 | } |
869 | TRACE_M("enable_signals - msg kfree %p",pMsg); | 783 | } |
870 | } | 784 | put_pid(pClient->pid); |
871 | } | 785 | kfree(pClient); |
872 | put_pid(pClient->pid); | 786 | TRACE_M("enable_signals - kfree %p", pClient); |
873 | kfree(pClient); | 787 | return 0; |
874 | TRACE_M("enable_signals - kfree %p",pClient); | 788 | } |
875 | return 0; | 789 | } |
876 | } | 790 | return -EINVAL; |
877 | } | 791 | } else { |
878 | return -EINVAL; | 792 | pClient = findClient(pInfo, pid); |
879 | } | 793 | if (pClient) { |
880 | else | 794 | /* update signal options */ |
881 | { | 795 | pClient->sig_flags = arg; |
882 | pClient=findClient(pInfo, pid); | 796 | } else { |
883 | if(pClient) | 797 | /* add client to client list */ |
884 | { | 798 | pClient = kmalloc(sizeof(struct r3964_client_info), |
885 | /* update signal options */ | 799 | GFP_KERNEL); |
886 | pClient->sig_flags=arg; | 800 | TRACE_M("enable_signals - kmalloc %p", pClient); |
887 | } | 801 | if (pClient == NULL) |
888 | else | 802 | return -ENOMEM; |
889 | { | 803 | |
890 | /* add client to client list */ | 804 | TRACE_PS("add client %d to client list", pid_nr(pid)); |
891 | pClient=kmalloc(sizeof(struct r3964_client_info), GFP_KERNEL); | 805 | spin_lock_init(&pClient->lock); |
892 | TRACE_M("enable_signals - kmalloc %p",pClient); | 806 | pClient->sig_flags = arg; |
893 | if(pClient==NULL) | 807 | pClient->pid = get_pid(pid); |
894 | return -ENOMEM; | 808 | pClient->next = pInfo->firstClient; |
895 | 809 | pClient->first_msg = NULL; | |
896 | TRACE_PS("add client %d to client list", pid_nr(pid)); | 810 | pClient->last_msg = NULL; |
897 | spin_lock_init(&pClient->lock); | 811 | pClient->next_block_to_read = NULL; |
898 | pClient->sig_flags=arg; | 812 | pClient->msg_count = 0; |
899 | pClient->pid = get_pid(pid); | 813 | pInfo->firstClient = pClient; |
900 | pClient->next=pInfo->firstClient; | 814 | } |
901 | pClient->first_msg = NULL; | 815 | } |
902 | pClient->last_msg = NULL; | 816 | |
903 | pClient->next_block_to_read = NULL; | 817 | return 0; |
904 | pClient->msg_count = 0; | ||
905 | pInfo->firstClient=pClient; | ||
906 | } | ||
907 | } | ||
908 | |||
909 | return 0; | ||
910 | } | 818 | } |
911 | 819 | ||
912 | static int read_telegram(struct r3964_info *pInfo, struct pid *pid, unsigned char __user *buf) | 820 | static int read_telegram(struct r3964_info *pInfo, struct pid *pid, |
821 | unsigned char __user * buf) | ||
913 | { | 822 | { |
914 | struct r3964_client_info *pClient; | 823 | struct r3964_client_info *pClient; |
915 | struct r3964_block_header *block; | 824 | struct r3964_block_header *block; |
916 | 825 | ||
917 | if(!buf) | 826 | if (!buf) { |
918 | { | 827 | return -EINVAL; |
919 | return -EINVAL; | 828 | } |
920 | } | 829 | |
921 | 830 | pClient = findClient(pInfo, pid); | |
922 | pClient=findClient(pInfo,pid); | 831 | if (pClient == NULL) { |
923 | if(pClient==NULL) | 832 | return -EINVAL; |
924 | { | 833 | } |
925 | return -EINVAL; | 834 | |
926 | } | 835 | block = pClient->next_block_to_read; |
927 | 836 | if (!block) { | |
928 | block=pClient->next_block_to_read; | 837 | return 0; |
929 | if(!block) | 838 | } else { |
930 | { | 839 | if (copy_to_user(buf, block->data, block->length)) |
931 | return 0; | 840 | return -EFAULT; |
932 | } | 841 | |
933 | else | 842 | remove_client_block(pInfo, pClient); |
934 | { | 843 | return block->length; |
935 | if (copy_to_user (buf, block->data, block->length)) | 844 | } |
936 | return -EFAULT; | 845 | |
937 | 846 | return -EINVAL; | |
938 | remove_client_block(pInfo, pClient); | ||
939 | return block->length; | ||
940 | } | ||
941 | |||
942 | return -EINVAL; | ||
943 | } | 847 | } |
944 | 848 | ||
945 | static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg, | 849 | static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg, |
946 | int error_code, struct r3964_block_header *pBlock) | 850 | int error_code, struct r3964_block_header *pBlock) |
947 | { | 851 | { |
948 | struct r3964_message *pMsg; | 852 | struct r3964_message *pMsg; |
949 | unsigned long flags; | 853 | unsigned long flags; |
950 | 854 | ||
951 | if(pClient->msg_count<R3964_MAX_MSG_COUNT-1) | 855 | if (pClient->msg_count < R3964_MAX_MSG_COUNT - 1) { |
952 | { | ||
953 | queue_the_message: | 856 | queue_the_message: |
954 | 857 | ||
955 | pMsg = kmalloc(sizeof(struct r3964_message), | 858 | pMsg = kmalloc(sizeof(struct r3964_message), |
956 | error_code?GFP_ATOMIC:GFP_KERNEL); | 859 | error_code ? GFP_ATOMIC : GFP_KERNEL); |
957 | TRACE_M("add_msg - kmalloc %p",pMsg); | 860 | TRACE_M("add_msg - kmalloc %p", pMsg); |
958 | if(pMsg==NULL) { | 861 | if (pMsg == NULL) { |
959 | return; | 862 | return; |
960 | } | 863 | } |
961 | 864 | ||
962 | spin_lock_irqsave(&pClient->lock, flags); | 865 | spin_lock_irqsave(&pClient->lock, flags); |
963 | 866 | ||
964 | pMsg->msg_id = msg_id; | 867 | pMsg->msg_id = msg_id; |
965 | pMsg->arg = arg; | 868 | pMsg->arg = arg; |
966 | pMsg->error_code = error_code; | 869 | pMsg->error_code = error_code; |
967 | pMsg->block = pBlock; | 870 | pMsg->block = pBlock; |
968 | pMsg->next = NULL; | 871 | pMsg->next = NULL; |
969 | 872 | ||
970 | if(pClient->last_msg==NULL) | 873 | if (pClient->last_msg == NULL) { |
971 | { | 874 | pClient->first_msg = pClient->last_msg = pMsg; |
972 | pClient->first_msg=pClient->last_msg=pMsg; | 875 | } else { |
973 | } | 876 | pClient->last_msg->next = pMsg; |
974 | else | 877 | pClient->last_msg = pMsg; |
975 | { | 878 | } |
976 | pClient->last_msg->next = pMsg; | 879 | |
977 | pClient->last_msg=pMsg; | 880 | pClient->msg_count++; |
978 | } | 881 | |
979 | 882 | if (pBlock != NULL) { | |
980 | pClient->msg_count++; | 883 | pBlock->locks++; |
981 | 884 | } | |
982 | if(pBlock!=NULL) | 885 | spin_unlock_irqrestore(&pClient->lock, flags); |
983 | { | 886 | } else { |
984 | pBlock->locks++; | 887 | if ((pClient->last_msg->msg_id == R3964_MSG_ACK) |
985 | } | 888 | && (pClient->last_msg->error_code == R3964_OVERFLOW)) { |
986 | spin_unlock_irqrestore(&pClient->lock, flags); | 889 | pClient->last_msg->arg++; |
987 | } | 890 | TRACE_PE("add_msg - inc prev OVERFLOW-msg"); |
988 | else | 891 | } else { |
989 | { | 892 | msg_id = R3964_MSG_ACK; |
990 | if((pClient->last_msg->msg_id == R3964_MSG_ACK) | 893 | arg = 0; |
991 | && (pClient->last_msg->error_code==R3964_OVERFLOW)) | 894 | error_code = R3964_OVERFLOW; |
992 | { | 895 | pBlock = NULL; |
993 | pClient->last_msg->arg++; | 896 | TRACE_PE("add_msg - queue OVERFLOW-msg"); |
994 | TRACE_PE("add_msg - inc prev OVERFLOW-msg"); | 897 | goto queue_the_message; |
995 | } | 898 | } |
996 | else | 899 | } |
997 | { | 900 | /* Send SIGIO signal to client process: */ |
998 | msg_id = R3964_MSG_ACK; | 901 | if (pClient->sig_flags & R3964_USE_SIGIO) { |
999 | arg = 0; | 902 | kill_pid(pClient->pid, SIGIO, 1); |
1000 | error_code = R3964_OVERFLOW; | 903 | } |
1001 | pBlock = NULL; | ||
1002 | TRACE_PE("add_msg - queue OVERFLOW-msg"); | ||
1003 | goto queue_the_message; | ||
1004 | } | ||
1005 | } | ||
1006 | /* Send SIGIO signal to client process: */ | ||
1007 | if(pClient->sig_flags & R3964_USE_SIGIO) | ||
1008 | { | ||
1009 | kill_pid(pClient->pid, SIGIO, 1); | ||
1010 | } | ||
1011 | } | 904 | } |
1012 | 905 | ||
1013 | static struct r3964_message *remove_msg(struct r3964_info *pInfo, | 906 | static struct r3964_message *remove_msg(struct r3964_info *pInfo, |
1014 | struct r3964_client_info *pClient) | 907 | struct r3964_client_info *pClient) |
1015 | { | 908 | { |
1016 | struct r3964_message *pMsg=NULL; | 909 | struct r3964_message *pMsg = NULL; |
1017 | unsigned long flags; | 910 | unsigned long flags; |
1018 | 911 | ||
1019 | if(pClient->first_msg) | 912 | if (pClient->first_msg) { |
1020 | { | 913 | spin_lock_irqsave(&pClient->lock, flags); |
1021 | spin_lock_irqsave(&pClient->lock, flags); | 914 | |
1022 | 915 | pMsg = pClient->first_msg; | |
1023 | pMsg = pClient->first_msg; | 916 | pClient->first_msg = pMsg->next; |
1024 | pClient->first_msg = pMsg->next; | 917 | if (pClient->first_msg == NULL) { |
1025 | if(pClient->first_msg==NULL) | 918 | pClient->last_msg = NULL; |
1026 | { | 919 | } |
1027 | pClient->last_msg = NULL; | 920 | |
1028 | } | 921 | pClient->msg_count--; |
1029 | 922 | if (pMsg->block) { | |
1030 | pClient->msg_count--; | 923 | remove_client_block(pInfo, pClient); |
1031 | if(pMsg->block) | 924 | pClient->next_block_to_read = pMsg->block; |
1032 | { | 925 | } |
1033 | remove_client_block(pInfo, pClient); | 926 | spin_unlock_irqrestore(&pClient->lock, flags); |
1034 | pClient->next_block_to_read = pMsg->block; | 927 | } |
1035 | } | 928 | return pMsg; |
1036 | spin_unlock_irqrestore(&pClient->lock, flags); | ||
1037 | } | ||
1038 | return pMsg; | ||
1039 | } | 929 | } |
1040 | 930 | ||
1041 | static void remove_client_block(struct r3964_info *pInfo, | 931 | static void remove_client_block(struct r3964_info *pInfo, |
1042 | struct r3964_client_info *pClient) | 932 | struct r3964_client_info *pClient) |
1043 | { | 933 | { |
1044 | struct r3964_block_header *block; | 934 | struct r3964_block_header *block; |
1045 | 935 | ||
1046 | TRACE_PS("remove_client_block PID %d", pid_nr(pClient->pid)); | 936 | TRACE_PS("remove_client_block PID %d", pid_nr(pClient->pid)); |
1047 | |||
1048 | block=pClient->next_block_to_read; | ||
1049 | if(block) | ||
1050 | { | ||
1051 | block->locks--; | ||
1052 | if(block->locks==0) | ||
1053 | { | ||
1054 | remove_from_rx_queue(pInfo, block); | ||
1055 | } | ||
1056 | } | ||
1057 | pClient->next_block_to_read = NULL; | ||
1058 | } | ||
1059 | 937 | ||
938 | block = pClient->next_block_to_read; | ||
939 | if (block) { | ||
940 | block->locks--; | ||
941 | if (block->locks == 0) { | ||
942 | remove_from_rx_queue(pInfo, block); | ||
943 | } | ||
944 | } | ||
945 | pClient->next_block_to_read = NULL; | ||
946 | } | ||
1060 | 947 | ||
1061 | /************************************************************* | 948 | /************************************************************* |
1062 | * Line discipline routines | 949 | * Line discipline routines |
@@ -1064,342 +951,320 @@ static void remove_client_block(struct r3964_info *pInfo, | |||
1064 | 951 | ||
1065 | static int r3964_open(struct tty_struct *tty) | 952 | static int r3964_open(struct tty_struct *tty) |
1066 | { | 953 | { |
1067 | struct r3964_info *pInfo; | 954 | struct r3964_info *pInfo; |
1068 | 955 | ||
1069 | TRACE_L("open"); | 956 | TRACE_L("open"); |
1070 | TRACE_L("tty=%p, PID=%d, disc_data=%p", | 957 | TRACE_L("tty=%p, PID=%d, disc_data=%p", |
1071 | tty, current->pid, tty->disc_data); | 958 | tty, current->pid, tty->disc_data); |
1072 | 959 | ||
1073 | pInfo=kmalloc(sizeof(struct r3964_info), GFP_KERNEL); | 960 | pInfo = kmalloc(sizeof(struct r3964_info), GFP_KERNEL); |
1074 | TRACE_M("r3964_open - info kmalloc %p",pInfo); | 961 | TRACE_M("r3964_open - info kmalloc %p", pInfo); |
1075 | 962 | ||
1076 | if(!pInfo) | 963 | if (!pInfo) { |
1077 | { | 964 | printk(KERN_ERR "r3964: failed to alloc info structure\n"); |
1078 | printk(KERN_ERR "r3964: failed to alloc info structure\n"); | 965 | return -ENOMEM; |
1079 | return -ENOMEM; | 966 | } |
1080 | } | 967 | |
1081 | 968 | pInfo->rx_buf = kmalloc(RX_BUF_SIZE, GFP_KERNEL); | |
1082 | pInfo->rx_buf = kmalloc(RX_BUF_SIZE, GFP_KERNEL); | 969 | TRACE_M("r3964_open - rx_buf kmalloc %p", pInfo->rx_buf); |
1083 | TRACE_M("r3964_open - rx_buf kmalloc %p",pInfo->rx_buf); | 970 | |
1084 | 971 | if (!pInfo->rx_buf) { | |
1085 | if(!pInfo->rx_buf) | 972 | printk(KERN_ERR "r3964: failed to alloc receive buffer\n"); |
1086 | { | 973 | kfree(pInfo); |
1087 | printk(KERN_ERR "r3964: failed to alloc receive buffer\n"); | 974 | TRACE_M("r3964_open - info kfree %p", pInfo); |
1088 | kfree(pInfo); | 975 | return -ENOMEM; |
1089 | TRACE_M("r3964_open - info kfree %p",pInfo); | 976 | } |
1090 | return -ENOMEM; | 977 | |
1091 | } | 978 | pInfo->tx_buf = kmalloc(TX_BUF_SIZE, GFP_KERNEL); |
1092 | 979 | TRACE_M("r3964_open - tx_buf kmalloc %p", pInfo->tx_buf); | |
1093 | pInfo->tx_buf = kmalloc(TX_BUF_SIZE, GFP_KERNEL); | 980 | |
1094 | TRACE_M("r3964_open - tx_buf kmalloc %p",pInfo->tx_buf); | 981 | if (!pInfo->tx_buf) { |
1095 | 982 | printk(KERN_ERR "r3964: failed to alloc transmit buffer\n"); | |
1096 | if(!pInfo->tx_buf) | 983 | kfree(pInfo->rx_buf); |
1097 | { | 984 | TRACE_M("r3964_open - rx_buf kfree %p", pInfo->rx_buf); |
1098 | printk(KERN_ERR "r3964: failed to alloc transmit buffer\n"); | 985 | kfree(pInfo); |
1099 | kfree(pInfo->rx_buf); | 986 | TRACE_M("r3964_open - info kfree %p", pInfo); |
1100 | TRACE_M("r3964_open - rx_buf kfree %p",pInfo->rx_buf); | 987 | return -ENOMEM; |
1101 | kfree(pInfo); | 988 | } |
1102 | TRACE_M("r3964_open - info kfree %p",pInfo); | 989 | |
1103 | return -ENOMEM; | 990 | spin_lock_init(&pInfo->lock); |
1104 | } | 991 | pInfo->tty = tty; |
1105 | 992 | init_waitqueue_head(&pInfo->read_wait); | |
1106 | spin_lock_init(&pInfo->lock); | 993 | pInfo->priority = R3964_MASTER; |
1107 | pInfo->tty = tty; | 994 | pInfo->rx_first = pInfo->rx_last = NULL; |
1108 | init_waitqueue_head (&pInfo->read_wait); | 995 | pInfo->tx_first = pInfo->tx_last = NULL; |
1109 | pInfo->priority = R3964_MASTER; | 996 | pInfo->rx_position = 0; |
1110 | pInfo->rx_first = pInfo->rx_last = NULL; | 997 | pInfo->tx_position = 0; |
1111 | pInfo->tx_first = pInfo->tx_last = NULL; | 998 | pInfo->last_rx = 0; |
1112 | pInfo->rx_position = 0; | 999 | pInfo->blocks_in_rx_queue = 0; |
1113 | pInfo->tx_position = 0; | 1000 | pInfo->firstClient = NULL; |
1114 | pInfo->last_rx = 0; | 1001 | pInfo->state = R3964_IDLE; |
1115 | pInfo->blocks_in_rx_queue = 0; | 1002 | pInfo->flags = R3964_DEBUG; |
1116 | pInfo->firstClient=NULL; | 1003 | pInfo->nRetry = 0; |
1117 | pInfo->state=R3964_IDLE; | 1004 | |
1118 | pInfo->flags = R3964_DEBUG; | 1005 | tty->disc_data = pInfo; |
1119 | pInfo->nRetry = 0; | 1006 | tty->receive_room = 65536; |
1120 | 1007 | ||
1121 | tty->disc_data = pInfo; | 1008 | init_timer(&pInfo->tmr); |
1122 | tty->receive_room = 65536; | 1009 | pInfo->tmr.data = (unsigned long)pInfo; |
1123 | 1010 | pInfo->tmr.function = on_timeout; | |
1124 | init_timer(&pInfo->tmr); | 1011 | |
1125 | pInfo->tmr.data = (unsigned long)pInfo; | 1012 | return 0; |
1126 | pInfo->tmr.function = on_timeout; | ||
1127 | |||
1128 | return 0; | ||
1129 | } | 1013 | } |
1130 | 1014 | ||
1131 | static void r3964_close(struct tty_struct *tty) | 1015 | static void r3964_close(struct tty_struct *tty) |
1132 | { | 1016 | { |
1133 | struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data; | 1017 | struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; |
1134 | struct r3964_client_info *pClient, *pNext; | 1018 | struct r3964_client_info *pClient, *pNext; |
1135 | struct r3964_message *pMsg; | 1019 | struct r3964_message *pMsg; |
1136 | struct r3964_block_header *pHeader, *pNextHeader; | 1020 | struct r3964_block_header *pHeader, *pNextHeader; |
1137 | unsigned long flags; | 1021 | unsigned long flags; |
1138 | 1022 | ||
1139 | TRACE_L("close"); | 1023 | TRACE_L("close"); |
1140 | 1024 | ||
1141 | /* | 1025 | /* |
1142 | * Make sure that our task queue isn't activated. If it | 1026 | * Make sure that our task queue isn't activated. If it |
1143 | * is, take it out of the linked list. | 1027 | * is, take it out of the linked list. |
1144 | */ | 1028 | */ |
1145 | del_timer_sync(&pInfo->tmr); | 1029 | del_timer_sync(&pInfo->tmr); |
1146 | 1030 | ||
1147 | /* Remove client-structs and message queues: */ | 1031 | /* Remove client-structs and message queues: */ |
1148 | pClient=pInfo->firstClient; | 1032 | pClient = pInfo->firstClient; |
1149 | while(pClient) | 1033 | while (pClient) { |
1150 | { | 1034 | pNext = pClient->next; |
1151 | pNext=pClient->next; | 1035 | while (pClient->msg_count) { |
1152 | while(pClient->msg_count) | 1036 | pMsg = remove_msg(pInfo, pClient); |
1153 | { | 1037 | if (pMsg) { |
1154 | pMsg=remove_msg(pInfo, pClient); | 1038 | kfree(pMsg); |
1155 | if(pMsg) | 1039 | TRACE_M("r3964_close - msg kfree %p", pMsg); |
1156 | { | 1040 | } |
1157 | kfree(pMsg); | 1041 | } |
1158 | TRACE_M("r3964_close - msg kfree %p",pMsg); | 1042 | put_pid(pClient->pid); |
1159 | } | 1043 | kfree(pClient); |
1160 | } | 1044 | TRACE_M("r3964_close - client kfree %p", pClient); |
1161 | put_pid(pClient->pid); | 1045 | pClient = pNext; |
1162 | kfree(pClient); | 1046 | } |
1163 | TRACE_M("r3964_close - client kfree %p",pClient); | 1047 | /* Remove jobs from tx_queue: */ |
1164 | pClient=pNext; | 1048 | spin_lock_irqsave(&pInfo->lock, flags); |
1165 | } | 1049 | pHeader = pInfo->tx_first; |
1166 | /* Remove jobs from tx_queue: */ | 1050 | pInfo->tx_first = pInfo->tx_last = NULL; |
1167 | spin_lock_irqsave(&pInfo->lock, flags); | ||
1168 | pHeader=pInfo->tx_first; | ||
1169 | pInfo->tx_first=pInfo->tx_last=NULL; | ||
1170 | spin_unlock_irqrestore(&pInfo->lock, flags); | 1051 | spin_unlock_irqrestore(&pInfo->lock, flags); |
1171 | 1052 | ||
1172 | while(pHeader) | 1053 | while (pHeader) { |
1173 | { | 1054 | pNextHeader = pHeader->next; |
1174 | pNextHeader=pHeader->next; | 1055 | kfree(pHeader); |
1175 | kfree(pHeader); | 1056 | pHeader = pNextHeader; |
1176 | pHeader=pNextHeader; | ||
1177 | } | 1057 | } |
1178 | 1058 | ||
1179 | /* Free buffers: */ | 1059 | /* Free buffers: */ |
1180 | wake_up_interruptible(&pInfo->read_wait); | 1060 | wake_up_interruptible(&pInfo->read_wait); |
1181 | kfree(pInfo->rx_buf); | 1061 | kfree(pInfo->rx_buf); |
1182 | TRACE_M("r3964_close - rx_buf kfree %p",pInfo->rx_buf); | 1062 | TRACE_M("r3964_close - rx_buf kfree %p", pInfo->rx_buf); |
1183 | kfree(pInfo->tx_buf); | 1063 | kfree(pInfo->tx_buf); |
1184 | TRACE_M("r3964_close - tx_buf kfree %p",pInfo->tx_buf); | 1064 | TRACE_M("r3964_close - tx_buf kfree %p", pInfo->tx_buf); |
1185 | kfree(pInfo); | 1065 | kfree(pInfo); |
1186 | TRACE_M("r3964_close - info kfree %p",pInfo); | 1066 | TRACE_M("r3964_close - info kfree %p", pInfo); |
1187 | } | 1067 | } |
1188 | 1068 | ||
1189 | static ssize_t r3964_read(struct tty_struct *tty, struct file *file, | 1069 | static ssize_t r3964_read(struct tty_struct *tty, struct file *file, |
1190 | unsigned char __user *buf, size_t nr) | 1070 | unsigned char __user * buf, size_t nr) |
1191 | { | 1071 | { |
1192 | struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data; | 1072 | struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; |
1193 | struct r3964_client_info *pClient; | 1073 | struct r3964_client_info *pClient; |
1194 | struct r3964_message *pMsg; | 1074 | struct r3964_message *pMsg; |
1195 | struct r3964_client_message theMsg; | 1075 | struct r3964_client_message theMsg; |
1196 | DECLARE_WAITQUEUE (wait, current); | 1076 | DECLARE_WAITQUEUE(wait, current); |
1197 | 1077 | ||
1198 | int count; | 1078 | int count; |
1199 | 1079 | ||
1200 | TRACE_L("read()"); | 1080 | TRACE_L("read()"); |
1201 | 1081 | ||
1202 | pClient=findClient(pInfo, task_pid(current)); | 1082 | pClient = findClient(pInfo, task_pid(current)); |
1203 | if(pClient) | 1083 | if (pClient) { |
1204 | { | 1084 | pMsg = remove_msg(pInfo, pClient); |
1205 | pMsg = remove_msg(pInfo, pClient); | 1085 | if (pMsg == NULL) { |
1206 | if(pMsg==NULL) | 1086 | /* no messages available. */ |
1207 | { | 1087 | if (file->f_flags & O_NONBLOCK) { |
1208 | /* no messages available. */ | 1088 | return -EAGAIN; |
1209 | if (file->f_flags & O_NONBLOCK) | 1089 | } |
1210 | { | 1090 | /* block until there is a message: */ |
1211 | return -EAGAIN; | 1091 | add_wait_queue(&pInfo->read_wait, &wait); |
1212 | } | ||
1213 | /* block until there is a message: */ | ||
1214 | add_wait_queue(&pInfo->read_wait, &wait); | ||
1215 | repeat: | 1092 | repeat: |
1216 | current->state = TASK_INTERRUPTIBLE; | 1093 | current->state = TASK_INTERRUPTIBLE; |
1217 | pMsg = remove_msg(pInfo, pClient); | 1094 | pMsg = remove_msg(pInfo, pClient); |
1218 | if (!pMsg && !signal_pending(current)) | 1095 | if (!pMsg && !signal_pending(current)) { |
1219 | { | 1096 | schedule(); |
1220 | schedule(); | 1097 | goto repeat; |
1221 | goto repeat; | 1098 | } |
1222 | } | 1099 | current->state = TASK_RUNNING; |
1223 | current->state = TASK_RUNNING; | 1100 | remove_wait_queue(&pInfo->read_wait, &wait); |
1224 | remove_wait_queue(&pInfo->read_wait, &wait); | 1101 | } |
1225 | } | 1102 | |
1226 | 1103 | /* If we still haven't got a message, we must have been signalled */ | |
1227 | /* If we still haven't got a message, we must have been signalled */ | 1104 | |
1228 | 1105 | if (!pMsg) | |
1229 | if (!pMsg) return -EINTR; | 1106 | return -EINTR; |
1230 | 1107 | ||
1231 | /* deliver msg to client process: */ | 1108 | /* deliver msg to client process: */ |
1232 | theMsg.msg_id = pMsg->msg_id; | 1109 | theMsg.msg_id = pMsg->msg_id; |
1233 | theMsg.arg = pMsg->arg; | 1110 | theMsg.arg = pMsg->arg; |
1234 | theMsg.error_code = pMsg->error_code; | 1111 | theMsg.error_code = pMsg->error_code; |
1235 | count = sizeof(struct r3964_client_message); | 1112 | count = sizeof(struct r3964_client_message); |
1236 | 1113 | ||
1237 | kfree(pMsg); | 1114 | kfree(pMsg); |
1238 | TRACE_M("r3964_read - msg kfree %p",pMsg); | 1115 | TRACE_M("r3964_read - msg kfree %p", pMsg); |
1239 | 1116 | ||
1240 | if (copy_to_user(buf,&theMsg, count)) | 1117 | if (copy_to_user(buf, &theMsg, count)) |
1241 | return -EFAULT; | 1118 | return -EFAULT; |
1242 | 1119 | ||
1243 | TRACE_PS("read - return %d", count); | 1120 | TRACE_PS("read - return %d", count); |
1244 | return count; | 1121 | return count; |
1245 | } | 1122 | } |
1246 | return -EPERM; | 1123 | return -EPERM; |
1247 | } | 1124 | } |
1248 | 1125 | ||
1249 | static ssize_t r3964_write(struct tty_struct * tty, struct file * file, | 1126 | static ssize_t r3964_write(struct tty_struct *tty, struct file *file, |
1250 | const unsigned char *data, size_t count) | 1127 | const unsigned char *data, size_t count) |
1251 | { | 1128 | { |
1252 | struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data; | 1129 | struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; |
1253 | struct r3964_block_header *pHeader; | 1130 | struct r3964_block_header *pHeader; |
1254 | struct r3964_client_info *pClient; | 1131 | struct r3964_client_info *pClient; |
1255 | unsigned char *new_data; | 1132 | unsigned char *new_data; |
1256 | 1133 | ||
1257 | TRACE_L("write request, %d characters", count); | 1134 | TRACE_L("write request, %d characters", count); |
1258 | /* | 1135 | /* |
1259 | * Verify the pointers | 1136 | * Verify the pointers |
1260 | */ | 1137 | */ |
1261 | 1138 | ||
1262 | if(!pInfo) | 1139 | if (!pInfo) |
1263 | return -EIO; | 1140 | return -EIO; |
1264 | 1141 | ||
1265 | /* | 1142 | /* |
1266 | * Ensure that the caller does not wish to send too much. | 1143 | * Ensure that the caller does not wish to send too much. |
1267 | */ | 1144 | */ |
1268 | if (count > R3964_MTU) | 1145 | if (count > R3964_MTU) { |
1269 | { | 1146 | if (pInfo->flags & R3964_DEBUG) { |
1270 | if (pInfo->flags & R3964_DEBUG) | 1147 | TRACE_L(KERN_WARNING "r3964_write: truncating user " |
1271 | { | 1148 | "packet from %u to mtu %d", count, R3964_MTU); |
1272 | TRACE_L (KERN_WARNING | 1149 | } |
1273 | "r3964_write: truncating user packet " | 1150 | count = R3964_MTU; |
1274 | "from %u to mtu %d", count, R3964_MTU); | 1151 | } |
1275 | } | ||
1276 | count = R3964_MTU; | ||
1277 | } | ||
1278 | /* | 1152 | /* |
1279 | * Allocate a buffer for the data and copy it from the buffer with header prepended | 1153 | * Allocate a buffer for the data and copy it from the buffer with header prepended |
1280 | */ | 1154 | */ |
1281 | new_data = kmalloc (count+sizeof(struct r3964_block_header), GFP_KERNEL); | 1155 | new_data = kmalloc(count + sizeof(struct r3964_block_header), |
1282 | TRACE_M("r3964_write - kmalloc %p",new_data); | 1156 | GFP_KERNEL); |
1283 | if (new_data == NULL) { | 1157 | TRACE_M("r3964_write - kmalloc %p", new_data); |
1284 | if (pInfo->flags & R3964_DEBUG) | 1158 | if (new_data == NULL) { |
1285 | { | 1159 | if (pInfo->flags & R3964_DEBUG) { |
1286 | printk (KERN_ERR | 1160 | printk(KERN_ERR "r3964_write: no memory\n"); |
1287 | "r3964_write: no memory\n"); | 1161 | } |
1288 | } | 1162 | return -ENOSPC; |
1289 | return -ENOSPC; | 1163 | } |
1290 | } | 1164 | |
1291 | 1165 | pHeader = (struct r3964_block_header *)new_data; | |
1292 | pHeader = (struct r3964_block_header *)new_data; | 1166 | pHeader->data = new_data + sizeof(struct r3964_block_header); |
1293 | pHeader->data = new_data + sizeof(struct r3964_block_header); | 1167 | pHeader->length = count; |
1294 | pHeader->length = count; | 1168 | pHeader->locks = 0; |
1295 | pHeader->locks = 0; | 1169 | pHeader->owner = NULL; |
1296 | pHeader->owner = NULL; | 1170 | |
1297 | 1171 | pClient = findClient(pInfo, task_pid(current)); | |
1298 | pClient=findClient(pInfo, task_pid(current)); | 1172 | if (pClient) { |
1299 | if(pClient) | 1173 | pHeader->owner = pClient; |
1300 | { | 1174 | } |
1301 | pHeader->owner = pClient; | 1175 | |
1302 | } | 1176 | memcpy(pHeader->data, data, count); /* We already verified this */ |
1303 | 1177 | ||
1304 | memcpy(pHeader->data, data, count); /* We already verified this */ | 1178 | if (pInfo->flags & R3964_DEBUG) { |
1305 | 1179 | dump_block(pHeader->data, count); | |
1306 | if(pInfo->flags & R3964_DEBUG) | 1180 | } |
1307 | { | ||
1308 | dump_block(pHeader->data, count); | ||
1309 | } | ||
1310 | 1181 | ||
1311 | /* | 1182 | /* |
1312 | * Add buffer to transmit-queue: | 1183 | * Add buffer to transmit-queue: |
1313 | */ | 1184 | */ |
1314 | add_tx_queue(pInfo, pHeader); | 1185 | add_tx_queue(pInfo, pHeader); |
1315 | trigger_transmit(pInfo); | 1186 | trigger_transmit(pInfo); |
1316 | 1187 | ||
1317 | return 0; | 1188 | return 0; |
1318 | } | 1189 | } |
1319 | 1190 | ||
1320 | static int r3964_ioctl(struct tty_struct * tty, struct file * file, | 1191 | static int r3964_ioctl(struct tty_struct *tty, struct file *file, |
1321 | unsigned int cmd, unsigned long arg) | 1192 | unsigned int cmd, unsigned long arg) |
1322 | { | 1193 | { |
1323 | struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data; | 1194 | struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; |
1324 | if(pInfo==NULL) | 1195 | if (pInfo == NULL) |
1325 | return -EINVAL; | 1196 | return -EINVAL; |
1326 | switch(cmd) | 1197 | switch (cmd) { |
1327 | { | 1198 | case R3964_ENABLE_SIGNALS: |
1328 | case R3964_ENABLE_SIGNALS: | 1199 | return enable_signals(pInfo, task_pid(current), arg); |
1329 | return enable_signals(pInfo, task_pid(current), arg); | 1200 | case R3964_SETPRIORITY: |
1330 | case R3964_SETPRIORITY: | 1201 | if (arg < R3964_MASTER || arg > R3964_SLAVE) |
1331 | if(arg<R3964_MASTER || arg>R3964_SLAVE) | 1202 | return -EINVAL; |
1332 | return -EINVAL; | 1203 | pInfo->priority = arg & 0xff; |
1333 | pInfo->priority = arg & 0xff; | 1204 | return 0; |
1334 | return 0; | 1205 | case R3964_USE_BCC: |
1335 | case R3964_USE_BCC: | 1206 | if (arg) |
1336 | if(arg) | 1207 | pInfo->flags |= R3964_BCC; |
1337 | pInfo->flags |= R3964_BCC; | 1208 | else |
1338 | else | 1209 | pInfo->flags &= ~R3964_BCC; |
1339 | pInfo->flags &= ~R3964_BCC; | 1210 | return 0; |
1340 | return 0; | 1211 | case R3964_READ_TELEGRAM: |
1341 | case R3964_READ_TELEGRAM: | 1212 | return read_telegram(pInfo, task_pid(current), |
1342 | return read_telegram(pInfo, task_pid(current), (unsigned char __user *)arg); | 1213 | (unsigned char __user *)arg); |
1343 | default: | 1214 | default: |
1344 | return -ENOIOCTLCMD; | 1215 | return -ENOIOCTLCMD; |
1345 | } | 1216 | } |
1346 | } | 1217 | } |
1347 | 1218 | ||
1348 | static void r3964_set_termios(struct tty_struct *tty, struct ktermios * old) | 1219 | static void r3964_set_termios(struct tty_struct *tty, struct ktermios *old) |
1349 | { | 1220 | { |
1350 | TRACE_L("set_termios"); | 1221 | TRACE_L("set_termios"); |
1351 | } | 1222 | } |
1352 | 1223 | ||
1353 | /* Called without the kernel lock held - fine */ | 1224 | /* Called without the kernel lock held - fine */ |
1354 | static unsigned int r3964_poll(struct tty_struct * tty, struct file * file, | 1225 | static unsigned int r3964_poll(struct tty_struct *tty, struct file *file, |
1355 | struct poll_table_struct *wait) | 1226 | struct poll_table_struct *wait) |
1356 | { | 1227 | { |
1357 | struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data; | 1228 | struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; |
1358 | struct r3964_client_info *pClient; | 1229 | struct r3964_client_info *pClient; |
1359 | struct r3964_message *pMsg=NULL; | 1230 | struct r3964_message *pMsg = NULL; |
1360 | unsigned long flags; | 1231 | unsigned long flags; |
1361 | int result = POLLOUT; | 1232 | int result = POLLOUT; |
1362 | 1233 | ||
1363 | TRACE_L("POLL"); | 1234 | TRACE_L("POLL"); |
1364 | 1235 | ||
1365 | pClient=findClient(pInfo, task_pid(current)); | 1236 | pClient = findClient(pInfo, task_pid(current)); |
1366 | if(pClient) | 1237 | if (pClient) { |
1367 | { | 1238 | poll_wait(file, &pInfo->read_wait, wait); |
1368 | poll_wait(file, &pInfo->read_wait, wait); | 1239 | spin_lock_irqsave(&pInfo->lock, flags); |
1369 | spin_lock_irqsave(&pInfo->lock, flags); | 1240 | pMsg = pClient->first_msg; |
1370 | pMsg=pClient->first_msg; | 1241 | spin_unlock_irqrestore(&pInfo->lock, flags); |
1371 | spin_unlock_irqrestore(&pInfo->lock, flags); | 1242 | if (pMsg) |
1372 | if(pMsg) | 1243 | result |= POLLIN | POLLRDNORM; |
1373 | result |= POLLIN | POLLRDNORM; | 1244 | } else { |
1374 | } | 1245 | result = -EINVAL; |
1375 | else | 1246 | } |
1376 | { | 1247 | return result; |
1377 | result = -EINVAL; | ||
1378 | } | ||
1379 | return result; | ||
1380 | } | 1248 | } |
1381 | 1249 | ||
1382 | static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, | 1250 | static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, |
1383 | char *fp, int count) | 1251 | char *fp, int count) |
1384 | { | 1252 | { |
1385 | struct r3964_info *pInfo=(struct r3964_info*)tty->disc_data; | 1253 | struct r3964_info *pInfo = (struct r3964_info *)tty->disc_data; |
1386 | const unsigned char *p; | 1254 | const unsigned char *p; |
1387 | char *f, flags = 0; | 1255 | char *f, flags = 0; |
1388 | int i; | 1256 | int i; |
1389 | 1257 | ||
1390 | for (i=count, p = cp, f = fp; i; i--, p++) { | 1258 | for (i = count, p = cp, f = fp; i; i--, p++) { |
1391 | if (f) | 1259 | if (f) |
1392 | flags = *f++; | 1260 | flags = *f++; |
1393 | if(flags==TTY_NORMAL) | 1261 | if (flags == TTY_NORMAL) { |
1394 | { | 1262 | receive_char(pInfo, *p); |
1395 | receive_char(pInfo, *p); | 1263 | } else { |
1396 | } | 1264 | receive_error(pInfo, flags); |
1397 | else | 1265 | } |
1398 | { | 1266 | |
1399 | receive_error(pInfo, flags); | 1267 | } |
1400 | } | ||
1401 | |||
1402 | } | ||
1403 | } | 1268 | } |
1404 | 1269 | ||
1405 | MODULE_LICENSE("GPL"); | 1270 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index f108c136800a..4ab2c98f978c 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -887,10 +887,8 @@ static void bh_transmit(MGSLPC_INFO *info) | |||
887 | if (debug_level >= DEBUG_LEVEL_BH) | 887 | if (debug_level >= DEBUG_LEVEL_BH) |
888 | printk("bh_transmit() entry on %s\n", info->device_name); | 888 | printk("bh_transmit() entry on %s\n", info->device_name); |
889 | 889 | ||
890 | if (tty) { | 890 | if (tty) |
891 | tty_wakeup(tty); | 891 | tty_wakeup(tty); |
892 | wake_up_interruptible(&tty->write_wait); | ||
893 | } | ||
894 | } | 892 | } |
895 | 893 | ||
896 | static void bh_status(MGSLPC_INFO *info) | 894 | static void bh_status(MGSLPC_INFO *info) |
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 645e20a06ece..1f0d7c60c944 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -154,7 +154,7 @@ static int raw_ctl_ioctl(struct inode *inode, struct file *filp, | |||
154 | goto out; | 154 | goto out; |
155 | } | 155 | } |
156 | 156 | ||
157 | if (rq.raw_minor < 0 || rq.raw_minor >= MAX_RAW_MINORS) { | 157 | if (rq.raw_minor <= 0 || rq.raw_minor >= MAX_RAW_MINORS) { |
158 | err = -EINVAL; | 158 | err = -EINVAL; |
159 | goto out; | 159 | goto out; |
160 | } | 160 | } |
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c index eeda40c5e189..ebc76342712c 100644 --- a/drivers/char/rio/riointr.c +++ b/drivers/char/rio/riointr.c | |||
@@ -162,13 +162,8 @@ void RIOTxEnable(char *en) | |||
162 | 162 | ||
163 | rio_spin_unlock_irqrestore(&PortP->portSem, flags); | 163 | rio_spin_unlock_irqrestore(&PortP->portSem, flags); |
164 | 164 | ||
165 | if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN)) { | 165 | if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2 * PKT_MAX_DATA_LEN)) |
166 | rio_dprintk(RIO_DEBUG_INTR, "Waking up.... ldisc:%d (%d/%d)....", (int) (PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)), PortP->gs.wakeup_chars, PortP->gs.xmit_cnt); | 166 | tty_wakeup(PortP->gs.tty); |
167 | if ((PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && PortP->gs.tty->ldisc.write_wakeup) | ||
168 | (PortP->gs.tty->ldisc.write_wakeup) (PortP->gs.tty); | ||
169 | rio_dprintk(RIO_DEBUG_INTR, "(%d/%d)\n", PortP->gs.wakeup_chars, PortP->gs.xmit_cnt); | ||
170 | wake_up_interruptible(&PortP->gs.tty->write_wait); | ||
171 | } | ||
172 | 167 | ||
173 | } | 168 | } |
174 | 169 | ||
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index e2a94bfb2a43..70145254fb9d 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -1229,7 +1229,6 @@ static void rc_flush_buffer(struct tty_struct *tty) | |||
1229 | port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; | 1229 | port->xmit_cnt = port->xmit_head = port->xmit_tail = 0; |
1230 | restore_flags(flags); | 1230 | restore_flags(flags); |
1231 | 1231 | ||
1232 | wake_up_interruptible(&tty->write_wait); | ||
1233 | tty_wakeup(tty); | 1232 | tty_wakeup(tty); |
1234 | } | 1233 | } |
1235 | 1234 | ||
@@ -1570,10 +1569,8 @@ static void do_softint(struct work_struct *ugly_api) | |||
1570 | if(!(tty = port->tty)) | 1569 | if(!(tty = port->tty)) |
1571 | return; | 1570 | return; |
1572 | 1571 | ||
1573 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) { | 1572 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) |
1574 | tty_wakeup(tty); | 1573 | tty_wakeup(tty); |
1575 | wake_up_interruptible(&tty->write_wait); | ||
1576 | } | ||
1577 | } | 1574 | } |
1578 | 1575 | ||
1579 | static const struct tty_operations riscom_ops = { | 1576 | static const struct tty_operations riscom_ops = { |
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index e94a62e30fc4..106f225e745f 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c | |||
@@ -474,7 +474,6 @@ static void rp_do_transmit(struct r_port *info) | |||
474 | 474 | ||
475 | if (info->xmit_cnt < WAKEUP_CHARS) { | 475 | if (info->xmit_cnt < WAKEUP_CHARS) { |
476 | tty_wakeup(tty); | 476 | tty_wakeup(tty); |
477 | wake_up_interruptible(&tty->write_wait); | ||
478 | #ifdef ROCKETPORT_HAVE_POLL_WAIT | 477 | #ifdef ROCKETPORT_HAVE_POLL_WAIT |
479 | wake_up_interruptible(&tty->poll_wait); | 478 | wake_up_interruptible(&tty->poll_wait); |
480 | #endif | 479 | #endif |
@@ -1772,7 +1771,6 @@ static int rp_write(struct tty_struct *tty, | |||
1772 | end: | 1771 | end: |
1773 | if (info->xmit_cnt < WAKEUP_CHARS) { | 1772 | if (info->xmit_cnt < WAKEUP_CHARS) { |
1774 | tty_wakeup(tty); | 1773 | tty_wakeup(tty); |
1775 | wake_up_interruptible(&tty->write_wait); | ||
1776 | #ifdef ROCKETPORT_HAVE_POLL_WAIT | 1774 | #ifdef ROCKETPORT_HAVE_POLL_WAIT |
1777 | wake_up_interruptible(&tty->poll_wait); | 1775 | wake_up_interruptible(&tty->poll_wait); |
1778 | #endif | 1776 | #endif |
@@ -1841,7 +1839,6 @@ static void rp_flush_buffer(struct tty_struct *tty) | |||
1841 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; | 1839 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; |
1842 | spin_unlock_irqrestore(&info->slock, flags); | 1840 | spin_unlock_irqrestore(&info->slock, flags); |
1843 | 1841 | ||
1844 | wake_up_interruptible(&tty->write_wait); | ||
1845 | #ifdef ROCKETPORT_HAVE_POLL_WAIT | 1842 | #ifdef ROCKETPORT_HAVE_POLL_WAIT |
1846 | wake_up_interruptible(&tty->poll_wait); | 1843 | wake_up_interruptible(&tty->poll_wait); |
1847 | #endif | 1844 | #endif |
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index af50d32ae2c7..5fd314adc1f2 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c | |||
@@ -111,12 +111,13 @@ u_char initial_console_speed; | |||
111 | 111 | ||
112 | /* This is the per-port data structure */ | 112 | /* This is the per-port data structure */ |
113 | struct cyclades_port cy_port[] = { | 113 | struct cyclades_port cy_port[] = { |
114 | /* CARD# */ | 114 | /* CARD# */ |
115 | {-1 }, /* ttyS0 */ | 115 | {-1}, /* ttyS0 */ |
116 | {-1 }, /* ttyS1 */ | 116 | {-1}, /* ttyS1 */ |
117 | {-1 }, /* ttyS2 */ | 117 | {-1}, /* ttyS2 */ |
118 | {-1 }, /* ttyS3 */ | 118 | {-1}, /* ttyS3 */ |
119 | }; | 119 | }; |
120 | |||
120 | #define NR_PORTS ARRAY_SIZE(cy_port) | 121 | #define NR_PORTS ARRAY_SIZE(cy_port) |
121 | 122 | ||
122 | /* | 123 | /* |
@@ -128,42 +129,46 @@ struct cyclades_port cy_port[] = { | |||
128 | * HI VHI | 129 | * HI VHI |
129 | */ | 130 | */ |
130 | static int baud_table[] = { | 131 | static int baud_table[] = { |
131 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, | 132 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, |
132 | 1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800,115200,150000, | 133 | 1800, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 150000, |
133 | 0}; | 134 | 0 |
135 | }; | ||
134 | 136 | ||
135 | #if 0 | 137 | #if 0 |
136 | static char baud_co[] = { /* 25 MHz clock option table */ | 138 | static char baud_co[] = { /* 25 MHz clock option table */ |
137 | /* value => 00 01 02 03 04 */ | 139 | /* value => 00 01 02 03 04 */ |
138 | /* divide by 8 32 128 512 2048 */ | 140 | /* divide by 8 32 128 512 2048 */ |
139 | 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x02, | 141 | 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x02, |
140 | 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | 142 | 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
143 | }; | ||
141 | 144 | ||
142 | static char baud_bpr[] = { /* 25 MHz baud rate period table */ | 145 | static char baud_bpr[] = { /* 25 MHz baud rate period table */ |
143 | 0x00, 0xf5, 0xa3, 0x6f, 0x5c, 0x51, 0xf5, 0xa3, 0x51, 0xa3, | 146 | 0x00, 0xf5, 0xa3, 0x6f, 0x5c, 0x51, 0xf5, 0xa3, 0x51, 0xa3, |
144 | 0x6d, 0x51, 0xa3, 0x51, 0xa3, 0x51, 0x36, 0x29, 0x1b, 0x15}; | 147 | 0x6d, 0x51, 0xa3, 0x51, 0xa3, 0x51, 0x36, 0x29, 0x1b, 0x15 |
148 | }; | ||
145 | #endif | 149 | #endif |
146 | 150 | ||
147 | /* I think 166 brd clocks 2401 at 20MHz.... */ | 151 | /* I think 166 brd clocks 2401 at 20MHz.... */ |
148 | 152 | ||
149 | /* These values are written directly to tcor, and >> 5 for writing to rcor */ | 153 | /* These values are written directly to tcor, and >> 5 for writing to rcor */ |
150 | static u_char baud_co[] = { /* 20 MHz clock option table */ | 154 | static u_char baud_co[] = { /* 20 MHz clock option table */ |
151 | 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x60, 0x60, 0x40, | 155 | 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x60, 0x60, 0x40, |
152 | 0x40, 0x40, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | 156 | 0x40, 0x40, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
157 | }; | ||
153 | 158 | ||
154 | /* These values written directly to tbpr/rbpr */ | 159 | /* These values written directly to tbpr/rbpr */ |
155 | static u_char baud_bpr[] = { /* 20 MHz baud rate period table */ | 160 | static u_char baud_bpr[] = { /* 20 MHz baud rate period table */ |
156 | 0x00, 0xc0, 0x80, 0x58, 0x6c, 0x40, 0xc0, 0x81, 0x40, 0x81, | 161 | 0x00, 0xc0, 0x80, 0x58, 0x6c, 0x40, 0xc0, 0x81, 0x40, 0x81, |
157 | 0x57, 0x40, 0x81, 0x40, 0x81, 0x40, 0x2b, 0x20, 0x15, 0x10}; | 162 | 0x57, 0x40, 0x81, 0x40, 0x81, 0x40, 0x2b, 0x20, 0x15, 0x10 |
158 | 163 | }; | |
159 | static u_char baud_cor4[] = { /* receive threshold */ | ||
160 | 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, | ||
161 | 0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08, 0x07}; | ||
162 | |||
163 | 164 | ||
165 | static u_char baud_cor4[] = { /* receive threshold */ | ||
166 | 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, | ||
167 | 0x0a, 0x0a, 0x0a, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08, 0x07 | ||
168 | }; | ||
164 | 169 | ||
165 | static void shutdown(struct cyclades_port *); | 170 | static void shutdown(struct cyclades_port *); |
166 | static int startup (struct cyclades_port *); | 171 | static int startup(struct cyclades_port *); |
167 | static void cy_throttle(struct tty_struct *); | 172 | static void cy_throttle(struct tty_struct *); |
168 | static void cy_unthrottle(struct tty_struct *); | 173 | static void cy_unthrottle(struct tty_struct *); |
169 | static void config_setup(struct cyclades_port *); | 174 | static void config_setup(struct cyclades_port *); |
@@ -174,16 +179,16 @@ static void show_status(int); | |||
174 | 179 | ||
175 | #ifdef CONFIG_REMOTE_DEBUG | 180 | #ifdef CONFIG_REMOTE_DEBUG |
176 | static void debug_setup(void); | 181 | static void debug_setup(void); |
177 | void queueDebugChar (int c); | 182 | void queueDebugChar(int c); |
178 | int getDebugChar(void); | 183 | int getDebugChar(void); |
179 | 184 | ||
180 | #define DEBUG_PORT 1 | 185 | #define DEBUG_PORT 1 |
181 | #define DEBUG_LEN 256 | 186 | #define DEBUG_LEN 256 |
182 | 187 | ||
183 | typedef struct { | 188 | typedef struct { |
184 | int in; | 189 | int in; |
185 | int out; | 190 | int out; |
186 | unsigned char buf[DEBUG_LEN]; | 191 | unsigned char buf[DEBUG_LEN]; |
187 | } debugq; | 192 | } debugq; |
188 | 193 | ||
189 | debugq debugiq; | 194 | debugq debugiq; |
@@ -196,7 +201,7 @@ debugq debugiq; | |||
196 | * delay, but this wild guess will do for now. | 201 | * delay, but this wild guess will do for now. |
197 | */ | 202 | */ |
198 | 203 | ||
199 | void my_udelay (long us) | 204 | void my_udelay(long us) |
200 | { | 205 | { |
201 | u_char x; | 206 | u_char x; |
202 | volatile u_char *p = &x; | 207 | volatile u_char *p = &x; |
@@ -207,62 +212,73 @@ void my_udelay (long us) | |||
207 | x |= *p; | 212 | x |= *p; |
208 | } | 213 | } |
209 | 214 | ||
210 | static inline int | 215 | static inline int serial_paranoia_check(struct cyclades_port *info, char *name, |
211 | serial_paranoia_check(struct cyclades_port *info, char *name, | 216 | const char *routine) |
212 | const char *routine) | ||
213 | { | 217 | { |
214 | #ifdef SERIAL_PARANOIA_CHECK | 218 | #ifdef SERIAL_PARANOIA_CHECK |
215 | static const char *badmagic = | 219 | if (!info) { |
216 | "Warning: bad magic number for serial struct (%s) in %s\n"; | 220 | printk("Warning: null cyclades_port for (%s) in %s\n", name, |
217 | static const char *badinfo = | 221 | routine); |
218 | "Warning: null cyclades_port for (%s) in %s\n"; | 222 | return 1; |
219 | static const char *badrange = | 223 | } |
220 | "Warning: cyclades_port out of range for (%s) in %s\n"; | 224 | |
221 | 225 | if ((long)info < (long)(&cy_port[0]) | |
222 | if (!info) { | 226 | || (long)(&cy_port[NR_PORTS]) < (long)info) { |
223 | printk(badinfo, name, routine); | 227 | printk("Warning: cyclades_port out of range for (%s) in %s\n", |
224 | return 1; | 228 | name, routine); |
225 | } | 229 | return 1; |
226 | 230 | } | |
227 | if( (long)info < (long)(&cy_port[0]) | 231 | |
228 | || (long)(&cy_port[NR_PORTS]) < (long)info ){ | 232 | if (info->magic != CYCLADES_MAGIC) { |
229 | printk(badrange, name, routine); | 233 | printk("Warning: bad magic number for serial struct (%s) in " |
230 | return 1; | 234 | "%s\n", name, routine); |
231 | } | 235 | return 1; |
232 | 236 | } | |
233 | if (info->magic != CYCLADES_MAGIC) { | ||
234 | printk(badmagic, name, routine); | ||
235 | return 1; | ||
236 | } | ||
237 | #endif | 237 | #endif |
238 | return 0; | 238 | return 0; |
239 | } /* serial_paranoia_check */ | 239 | } /* serial_paranoia_check */ |
240 | 240 | ||
241 | #if 0 | 241 | #if 0 |
242 | /* The following diagnostic routines allow the driver to spew | 242 | /* The following diagnostic routines allow the driver to spew |
243 | information on the screen, even (especially!) during interrupts. | 243 | information on the screen, even (especially!) during interrupts. |
244 | */ | 244 | */ |
245 | void | 245 | void SP(char *data) |
246 | SP(char *data){ | 246 | { |
247 | unsigned long flags; | 247 | unsigned long flags; |
248 | local_irq_save(flags); | 248 | local_irq_save(flags); |
249 | console_print(data); | 249 | console_print(data); |
250 | local_irq_restore(flags); | 250 | local_irq_restore(flags); |
251 | } | 251 | } |
252 | |||
252 | char scrn[2]; | 253 | char scrn[2]; |
253 | void | 254 | void CP(char data) |
254 | CP(char data){ | 255 | { |
255 | unsigned long flags; | 256 | unsigned long flags; |
256 | local_irq_save(flags); | 257 | local_irq_save(flags); |
257 | scrn[0] = data; | 258 | scrn[0] = data; |
258 | console_print(scrn); | 259 | console_print(scrn); |
259 | local_irq_restore(flags); | 260 | local_irq_restore(flags); |
260 | }/* CP */ | 261 | } /* CP */ |
261 | 262 | ||
262 | void CP1(int data) { (data<10)? CP(data+'0'): CP(data+'A'-10); }/* CP1 */ | 263 | void CP1(int data) |
263 | void CP2(int data) { CP1((data>>4) & 0x0f); CP1( data & 0x0f); }/* CP2 */ | 264 | { |
264 | void CP4(int data) { CP2((data>>8) & 0xff); CP2(data & 0xff); }/* CP4 */ | 265 | (data < 10) ? CP(data + '0') : CP(data + 'A' - 10); |
265 | void CP8(long data) { CP4((data>>16) & 0xffff); CP4(data & 0xffff); }/* CP8 */ | 266 | } /* CP1 */ |
267 | void CP2(int data) | ||
268 | { | ||
269 | CP1((data >> 4) & 0x0f); | ||
270 | CP1(data & 0x0f); | ||
271 | } /* CP2 */ | ||
272 | void CP4(int data) | ||
273 | { | ||
274 | CP2((data >> 8) & 0xff); | ||
275 | CP2(data & 0xff); | ||
276 | } /* CP4 */ | ||
277 | void CP8(long data) | ||
278 | { | ||
279 | CP4((data >> 16) & 0xffff); | ||
280 | CP4(data & 0xffff); | ||
281 | } /* CP8 */ | ||
266 | #endif | 282 | #endif |
267 | 283 | ||
268 | /* This routine waits up to 1000 micro-seconds for the previous | 284 | /* This routine waits up to 1000 micro-seconds for the previous |
@@ -270,87 +286,78 @@ void CP8(long data) { CP4((data>>16) & 0xffff); CP4(data & 0xffff); }/* CP8 */ | |||
270 | new command. An error is returned if the previous command | 286 | new command. An error is returned if the previous command |
271 | didn't finish within the time limit. | 287 | didn't finish within the time limit. |
272 | */ | 288 | */ |
273 | u_short | 289 | u_short write_cy_cmd(volatile u_char * base_addr, u_char cmd) |
274 | write_cy_cmd(volatile u_char *base_addr, u_char cmd) | ||
275 | { | 290 | { |
276 | unsigned long flags; | 291 | unsigned long flags; |
277 | volatile int i; | 292 | volatile int i; |
278 | 293 | ||
279 | local_irq_save(flags); | 294 | local_irq_save(flags); |
280 | /* Check to see that the previous command has completed */ | 295 | /* Check to see that the previous command has completed */ |
281 | for(i = 0 ; i < 100 ; i++){ | 296 | for (i = 0; i < 100; i++) { |
282 | if (base_addr[CyCCR] == 0){ | 297 | if (base_addr[CyCCR] == 0) { |
283 | break; | 298 | break; |
284 | } | 299 | } |
285 | my_udelay(10L); | 300 | my_udelay(10L); |
286 | } | 301 | } |
287 | /* if the CCR never cleared, the previous command | 302 | /* if the CCR never cleared, the previous command |
288 | didn't finish within the "reasonable time" */ | 303 | didn't finish within the "reasonable time" */ |
289 | if ( i == 10 ) { | 304 | if (i == 10) { |
290 | local_irq_restore(flags); | 305 | local_irq_restore(flags); |
291 | return (-1); | 306 | return (-1); |
292 | } | 307 | } |
293 | 308 | ||
294 | /* Issue the new command */ | 309 | /* Issue the new command */ |
295 | base_addr[CyCCR] = cmd; | 310 | base_addr[CyCCR] = cmd; |
296 | local_irq_restore(flags); | 311 | local_irq_restore(flags); |
297 | return(0); | 312 | return (0); |
298 | } /* write_cy_cmd */ | 313 | } /* write_cy_cmd */ |
299 | |||
300 | 314 | ||
301 | /* cy_start and cy_stop provide software output flow control as a | 315 | /* cy_start and cy_stop provide software output flow control as a |
302 | function of XON/XOFF, software CTS, and other such stuff. */ | 316 | function of XON/XOFF, software CTS, and other such stuff. */ |
303 | 317 | ||
304 | static void | 318 | static void cy_stop(struct tty_struct *tty) |
305 | cy_stop(struct tty_struct *tty) | ||
306 | { | 319 | { |
307 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 320 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
308 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; | 321 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; |
309 | int channel; | 322 | int channel; |
310 | unsigned long flags; | 323 | unsigned long flags; |
311 | 324 | ||
312 | #ifdef SERIAL_DEBUG_OTHER | 325 | #ifdef SERIAL_DEBUG_OTHER |
313 | printk("cy_stop %s\n", tty->name); /* */ | 326 | printk("cy_stop %s\n", tty->name); /* */ |
314 | #endif | 327 | #endif |
315 | 328 | ||
316 | if (serial_paranoia_check(info, tty->name, "cy_stop")) | 329 | if (serial_paranoia_check(info, tty->name, "cy_stop")) |
317 | return; | 330 | return; |
318 | |||
319 | channel = info->line; | ||
320 | 331 | ||
321 | local_irq_save(flags); | 332 | channel = info->line; |
322 | base_addr[CyCAR] = (u_char)(channel); /* index channel */ | ||
323 | base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy); | ||
324 | local_irq_restore(flags); | ||
325 | 333 | ||
326 | return; | 334 | local_irq_save(flags); |
327 | } /* cy_stop */ | 335 | base_addr[CyCAR] = (u_char) (channel); /* index channel */ |
336 | base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy); | ||
337 | local_irq_restore(flags); | ||
338 | } /* cy_stop */ | ||
328 | 339 | ||
329 | static void | 340 | static void cy_start(struct tty_struct *tty) |
330 | cy_start(struct tty_struct *tty) | ||
331 | { | 341 | { |
332 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 342 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
333 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; | 343 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; |
334 | int channel; | 344 | int channel; |
335 | unsigned long flags; | 345 | unsigned long flags; |
336 | 346 | ||
337 | #ifdef SERIAL_DEBUG_OTHER | 347 | #ifdef SERIAL_DEBUG_OTHER |
338 | printk("cy_start %s\n", tty->name); /* */ | 348 | printk("cy_start %s\n", tty->name); /* */ |
339 | #endif | 349 | #endif |
340 | 350 | ||
341 | if (serial_paranoia_check(info, tty->name, "cy_start")) | 351 | if (serial_paranoia_check(info, tty->name, "cy_start")) |
342 | return; | 352 | return; |
343 | |||
344 | channel = info->line; | ||
345 | 353 | ||
346 | local_irq_save(flags); | 354 | channel = info->line; |
347 | base_addr[CyCAR] = (u_char)(channel); | ||
348 | base_addr[CyIER] |= CyTxMpty; | ||
349 | local_irq_restore(flags); | ||
350 | |||
351 | return; | ||
352 | } /* cy_start */ | ||
353 | 355 | ||
356 | local_irq_save(flags); | ||
357 | base_addr[CyCAR] = (u_char) (channel); | ||
358 | base_addr[CyIER] |= CyTxMpty; | ||
359 | local_irq_restore(flags); | ||
360 | } /* cy_start */ | ||
354 | 361 | ||
355 | /* | 362 | /* |
356 | * This routine is used by the interrupt handler to schedule | 363 | * This routine is used by the interrupt handler to schedule |
@@ -358,332 +365,332 @@ cy_start(struct tty_struct *tty) | |||
358 | * (also known as the "bottom half"). This can be called any | 365 | * (also known as the "bottom half"). This can be called any |
359 | * number of times for any channel without harm. | 366 | * number of times for any channel without harm. |
360 | */ | 367 | */ |
361 | static inline void | 368 | static inline void cy_sched_event(struct cyclades_port *info, int event) |
362 | cy_sched_event(struct cyclades_port *info, int event) | ||
363 | { | 369 | { |
364 | info->event |= 1 << event; /* remember what kind of event and who */ | 370 | info->event |= 1 << event; /* remember what kind of event and who */ |
365 | schedule_work(&info->tqueue); | 371 | schedule_work(&info->tqueue); |
366 | } /* cy_sched_event */ | 372 | } /* cy_sched_event */ |
367 | |||
368 | 373 | ||
369 | /* The real interrupt service routines are called | 374 | /* The real interrupt service routines are called |
370 | whenever the card wants its hand held--chars | 375 | whenever the card wants its hand held--chars |
371 | received, out buffer empty, modem change, etc. | 376 | received, out buffer empty, modem change, etc. |
372 | */ | 377 | */ |
373 | static irqreturn_t | 378 | static irqreturn_t cd2401_rxerr_interrupt(int irq, void *dev_id) |
374 | cd2401_rxerr_interrupt(int irq, void *dev_id) | ||
375 | { | 379 | { |
376 | struct tty_struct *tty; | 380 | struct tty_struct *tty; |
377 | struct cyclades_port *info; | 381 | struct cyclades_port *info; |
378 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; | 382 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; |
379 | unsigned char err, rfoc; | 383 | unsigned char err, rfoc; |
380 | int channel; | 384 | int channel; |
381 | char data; | 385 | char data; |
382 | 386 | ||
383 | /* determine the channel and change to that context */ | 387 | /* determine the channel and change to that context */ |
384 | channel = (u_short ) (base_addr[CyLICR] >> 2); | 388 | channel = (u_short) (base_addr[CyLICR] >> 2); |
385 | info = &cy_port[channel]; | 389 | info = &cy_port[channel]; |
386 | info->last_active = jiffies; | 390 | info->last_active = jiffies; |
387 | 391 | ||
388 | if ((err = base_addr[CyRISR]) & CyTIMEOUT) { | 392 | if ((err = base_addr[CyRISR]) & CyTIMEOUT) { |
389 | /* This is a receive timeout interrupt, ignore it */ | 393 | /* This is a receive timeout interrupt, ignore it */ |
390 | base_addr[CyREOIR] = CyNOTRANS; | 394 | base_addr[CyREOIR] = CyNOTRANS; |
391 | return IRQ_HANDLED; | 395 | return IRQ_HANDLED; |
392 | } | 396 | } |
393 | |||
394 | /* Read a byte of data if there is any - assume the error | ||
395 | * is associated with this character */ | ||
396 | 397 | ||
397 | if ((rfoc = base_addr[CyRFOC]) != 0) | 398 | /* Read a byte of data if there is any - assume the error |
398 | data = base_addr[CyRDR]; | 399 | * is associated with this character */ |
399 | else | ||
400 | data = 0; | ||
401 | 400 | ||
402 | /* if there is nowhere to put the data, discard it */ | 401 | if ((rfoc = base_addr[CyRFOC]) != 0) |
403 | if(info->tty == 0) { | 402 | data = base_addr[CyRDR]; |
403 | else | ||
404 | data = 0; | ||
405 | |||
406 | /* if there is nowhere to put the data, discard it */ | ||
407 | if (info->tty == 0) { | ||
408 | base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; | ||
409 | return IRQ_HANDLED; | ||
410 | } else { /* there is an open port for this data */ | ||
411 | tty = info->tty; | ||
412 | if (err & info->ignore_status_mask) { | ||
413 | base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; | ||
414 | return IRQ_HANDLED; | ||
415 | } | ||
416 | if (tty_buffer_request_room(tty, 1) != 0) { | ||
417 | if (err & info->read_status_mask) { | ||
418 | if (err & CyBREAK) { | ||
419 | tty_insert_flip_char(tty, data, | ||
420 | TTY_BREAK); | ||
421 | if (info->flags & ASYNC_SAK) { | ||
422 | do_SAK(tty); | ||
423 | } | ||
424 | } else if (err & CyFRAME) { | ||
425 | tty_insert_flip_char(tty, data, | ||
426 | TTY_FRAME); | ||
427 | } else if (err & CyPARITY) { | ||
428 | tty_insert_flip_char(tty, data, | ||
429 | TTY_PARITY); | ||
430 | } else if (err & CyOVERRUN) { | ||
431 | tty_insert_flip_char(tty, 0, | ||
432 | TTY_OVERRUN); | ||
433 | /* | ||
434 | If the flip buffer itself is | ||
435 | overflowing, we still loose | ||
436 | the next incoming character. | ||
437 | */ | ||
438 | if (tty_buffer_request_room(tty, 1) != | ||
439 | 0) { | ||
440 | tty_insert_flip_char(tty, data, | ||
441 | TTY_FRAME); | ||
442 | } | ||
443 | /* These two conditions may imply */ | ||
444 | /* a normal read should be done. */ | ||
445 | /* else if(data & CyTIMEOUT) */ | ||
446 | /* else if(data & CySPECHAR) */ | ||
447 | } else { | ||
448 | tty_insert_flip_char(tty, 0, | ||
449 | TTY_NORMAL); | ||
450 | } | ||
451 | } else { | ||
452 | tty_insert_flip_char(tty, data, TTY_NORMAL); | ||
453 | } | ||
454 | } else { | ||
455 | /* there was a software buffer overrun | ||
456 | and nothing could be done about it!!! */ | ||
457 | } | ||
458 | } | ||
459 | tty_schedule_flip(tty); | ||
460 | /* end of service */ | ||
404 | base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; | 461 | base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; |
405 | return IRQ_HANDLED; | 462 | return IRQ_HANDLED; |
406 | } | 463 | } /* cy_rxerr_interrupt */ |
407 | else { /* there is an open port for this data */ | 464 | |
408 | tty = info->tty; | 465 | static irqreturn_t cd2401_modem_interrupt(int irq, void *dev_id) |
409 | if(err & info->ignore_status_mask){ | ||
410 | base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; | ||
411 | return IRQ_HANDLED; | ||
412 | } | ||
413 | if (tty_buffer_request_room(tty, 1) != 0){ | ||
414 | if (err & info->read_status_mask){ | ||
415 | if(err & CyBREAK){ | ||
416 | tty_insert_flip_char(tty, data, TTY_BREAK); | ||
417 | if (info->flags & ASYNC_SAK){ | ||
418 | do_SAK(tty); | ||
419 | } | ||
420 | }else if(err & CyFRAME){ | ||
421 | tty_insert_flip_char(tty, data, TTY_FRAME); | ||
422 | }else if(err & CyPARITY){ | ||
423 | tty_insert_flip_char(tty, data, TTY_PARITY); | ||
424 | }else if(err & CyOVERRUN){ | ||
425 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | ||
426 | /* | ||
427 | If the flip buffer itself is | ||
428 | overflowing, we still loose | ||
429 | the next incoming character. | ||
430 | */ | ||
431 | if (tty_buffer_request_room(tty, 1) != 0){ | ||
432 | tty_insert_flip_char(tty, data, TTY_FRAME); | ||
433 | } | ||
434 | /* These two conditions may imply */ | ||
435 | /* a normal read should be done. */ | ||
436 | /* else if(data & CyTIMEOUT) */ | ||
437 | /* else if(data & CySPECHAR) */ | ||
438 | }else{ | ||
439 | tty_insert_flip_char(tty, 0, TTY_NORMAL); | ||
440 | } | ||
441 | }else{ | ||
442 | tty_insert_flip_char(tty, data, TTY_NORMAL); | ||
443 | } | ||
444 | }else{ | ||
445 | /* there was a software buffer overrun | ||
446 | and nothing could be done about it!!! */ | ||
447 | } | ||
448 | } | ||
449 | tty_schedule_flip(tty); | ||
450 | /* end of service */ | ||
451 | base_addr[CyREOIR] = rfoc ? 0 : CyNOTRANS; | ||
452 | return IRQ_HANDLED; | ||
453 | } /* cy_rxerr_interrupt */ | ||
454 | |||
455 | static irqreturn_t | ||
456 | cd2401_modem_interrupt(int irq, void *dev_id) | ||
457 | { | 466 | { |
458 | struct cyclades_port *info; | 467 | struct cyclades_port *info; |
459 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; | 468 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; |
460 | int channel; | 469 | int channel; |
461 | int mdm_change; | 470 | int mdm_change; |
462 | int mdm_status; | 471 | int mdm_status; |
463 | 472 | ||
464 | 473 | /* determine the channel and change to that context */ | |
465 | /* determine the channel and change to that context */ | 474 | channel = (u_short) (base_addr[CyLICR] >> 2); |
466 | channel = (u_short ) (base_addr[CyLICR] >> 2); | 475 | info = &cy_port[channel]; |
467 | info = &cy_port[channel]; | 476 | info->last_active = jiffies; |
468 | info->last_active = jiffies; | 477 | |
469 | 478 | mdm_change = base_addr[CyMISR]; | |
470 | mdm_change = base_addr[CyMISR]; | 479 | mdm_status = base_addr[CyMSVR1]; |
471 | mdm_status = base_addr[CyMSVR1]; | 480 | |
472 | 481 | if (info->tty == 0) { /* nowhere to put the data, ignore it */ | |
473 | if(info->tty == 0){ /* nowhere to put the data, ignore it */ | 482 | ; |
474 | ; | 483 | } else { |
475 | }else{ | 484 | if ((mdm_change & CyDCD) |
476 | if((mdm_change & CyDCD) | 485 | && (info->flags & ASYNC_CHECK_CD)) { |
477 | && (info->flags & ASYNC_CHECK_CD)){ | 486 | if (mdm_status & CyDCD) { |
478 | if(mdm_status & CyDCD){ | ||
479 | /* CP('!'); */ | 487 | /* CP('!'); */ |
480 | cy_sched_event(info, Cy_EVENT_OPEN_WAKEUP); | 488 | cy_sched_event(info, Cy_EVENT_OPEN_WAKEUP); |
481 | } else { | 489 | } else { |
482 | /* CP('@'); */ | 490 | /* CP('@'); */ |
483 | cy_sched_event(info, Cy_EVENT_HANGUP); | 491 | cy_sched_event(info, Cy_EVENT_HANGUP); |
484 | } | 492 | } |
485 | } | ||
486 | if((mdm_change & CyCTS) | ||
487 | && (info->flags & ASYNC_CTS_FLOW)){ | ||
488 | if(info->tty->stopped){ | ||
489 | if(mdm_status & CyCTS){ | ||
490 | /* !!! cy_start isn't used because... */ | ||
491 | info->tty->stopped = 0; | ||
492 | base_addr[CyIER] |= CyTxMpty; | ||
493 | cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP); | ||
494 | } | 493 | } |
495 | }else{ | 494 | if ((mdm_change & CyCTS) |
496 | if(!(mdm_status & CyCTS)){ | 495 | && (info->flags & ASYNC_CTS_FLOW)) { |
497 | /* !!! cy_stop isn't used because... */ | 496 | if (info->tty->stopped) { |
498 | info->tty->stopped = 1; | 497 | if (mdm_status & CyCTS) { |
499 | base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy); | 498 | /* !!! cy_start isn't used because... */ |
499 | info->tty->stopped = 0; | ||
500 | base_addr[CyIER] |= CyTxMpty; | ||
501 | cy_sched_event(info, | ||
502 | Cy_EVENT_WRITE_WAKEUP); | ||
503 | } | ||
504 | } else { | ||
505 | if (!(mdm_status & CyCTS)) { | ||
506 | /* !!! cy_stop isn't used because... */ | ||
507 | info->tty->stopped = 1; | ||
508 | base_addr[CyIER] &= | ||
509 | ~(CyTxMpty | CyTxRdy); | ||
510 | } | ||
511 | } | ||
512 | } | ||
513 | if (mdm_status & CyDSR) { | ||
500 | } | 514 | } |
501 | } | ||
502 | } | ||
503 | if(mdm_status & CyDSR){ | ||
504 | } | 515 | } |
505 | } | 516 | base_addr[CyMEOIR] = 0; |
506 | base_addr[CyMEOIR] = 0; | 517 | return IRQ_HANDLED; |
507 | return IRQ_HANDLED; | 518 | } /* cy_modem_interrupt */ |
508 | } /* cy_modem_interrupt */ | ||
509 | 519 | ||
510 | static irqreturn_t | 520 | static irqreturn_t cd2401_tx_interrupt(int irq, void *dev_id) |
511 | cd2401_tx_interrupt(int irq, void *dev_id) | ||
512 | { | 521 | { |
513 | struct cyclades_port *info; | 522 | struct cyclades_port *info; |
514 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; | 523 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; |
515 | int channel; | 524 | int channel; |
516 | int char_count, saved_cnt; | 525 | int char_count, saved_cnt; |
517 | int outch; | 526 | int outch; |
518 | 527 | ||
519 | /* determine the channel and change to that context */ | 528 | /* determine the channel and change to that context */ |
520 | channel = (u_short ) (base_addr[CyLICR] >> 2); | 529 | channel = (u_short) (base_addr[CyLICR] >> 2); |
521 | 530 | ||
522 | #ifdef CONFIG_REMOTE_DEBUG | 531 | #ifdef CONFIG_REMOTE_DEBUG |
523 | if (channel == DEBUG_PORT) { | 532 | if (channel == DEBUG_PORT) { |
524 | panic ("TxInt on debug port!!!"); | 533 | panic("TxInt on debug port!!!"); |
525 | } | 534 | } |
526 | #endif | 535 | #endif |
527 | 536 | ||
528 | info = &cy_port[channel]; | 537 | info = &cy_port[channel]; |
529 | 538 | ||
530 | /* validate the port number (as configured and open) */ | 539 | /* validate the port number (as configured and open) */ |
531 | if( (channel < 0) || (NR_PORTS <= channel) ){ | 540 | if ((channel < 0) || (NR_PORTS <= channel)) { |
532 | base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy); | 541 | base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy); |
533 | base_addr[CyTEOIR] = CyNOTRANS; | 542 | base_addr[CyTEOIR] = CyNOTRANS; |
534 | return IRQ_HANDLED; | 543 | return IRQ_HANDLED; |
535 | } | 544 | } |
536 | info->last_active = jiffies; | 545 | info->last_active = jiffies; |
537 | if(info->tty == 0){ | 546 | if (info->tty == 0) { |
538 | base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy); | 547 | base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy); |
539 | if (info->xmit_cnt < WAKEUP_CHARS) { | 548 | if (info->xmit_cnt < WAKEUP_CHARS) { |
540 | cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP); | 549 | cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP); |
541 | } | 550 | } |
542 | base_addr[CyTEOIR] = CyNOTRANS; | 551 | base_addr[CyTEOIR] = CyNOTRANS; |
543 | return IRQ_HANDLED; | 552 | return IRQ_HANDLED; |
544 | } | 553 | } |
545 | 554 | ||
546 | /* load the on-chip space available for outbound data */ | 555 | /* load the on-chip space available for outbound data */ |
547 | saved_cnt = char_count = base_addr[CyTFTC]; | 556 | saved_cnt = char_count = base_addr[CyTFTC]; |
548 | 557 | ||
549 | if(info->x_char) { /* send special char */ | 558 | if (info->x_char) { /* send special char */ |
550 | outch = info->x_char; | 559 | outch = info->x_char; |
551 | base_addr[CyTDR] = outch; | ||
552 | char_count--; | ||
553 | info->x_char = 0; | ||
554 | } | ||
555 | |||
556 | if (info->x_break){ | ||
557 | /* The Cirrus chip requires the "Embedded Transmit | ||
558 | Commands" of start break, delay, and end break | ||
559 | sequences to be sent. The duration of the | ||
560 | break is given in TICs, which runs at HZ | ||
561 | (typically 100) and the PPR runs at 200 Hz, | ||
562 | so the delay is duration * 200/HZ, and thus a | ||
563 | break can run from 1/100 sec to about 5/4 sec. | ||
564 | Need to check these values - RGH 141095. | ||
565 | */ | ||
566 | base_addr[CyTDR] = 0; /* start break */ | ||
567 | base_addr[CyTDR] = 0x81; | ||
568 | base_addr[CyTDR] = 0; /* delay a bit */ | ||
569 | base_addr[CyTDR] = 0x82; | ||
570 | base_addr[CyTDR] = info->x_break*200/HZ; | ||
571 | base_addr[CyTDR] = 0; /* terminate break */ | ||
572 | base_addr[CyTDR] = 0x83; | ||
573 | char_count -= 7; | ||
574 | info->x_break = 0; | ||
575 | } | ||
576 | |||
577 | while (char_count > 0){ | ||
578 | if (!info->xmit_cnt){ | ||
579 | base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy); | ||
580 | break; | ||
581 | } | ||
582 | if (info->xmit_buf == 0){ | ||
583 | base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy); | ||
584 | break; | ||
585 | } | ||
586 | if (info->tty->stopped || info->tty->hw_stopped){ | ||
587 | base_addr[CyIER] &= ~(CyTxMpty|CyTxRdy); | ||
588 | break; | ||
589 | } | ||
590 | /* Because the Embedded Transmit Commands have been | ||
591 | enabled, we must check to see if the escape | ||
592 | character, NULL, is being sent. If it is, we | ||
593 | must ensure that there is room for it to be | ||
594 | doubled in the output stream. Therefore we | ||
595 | no longer advance the pointer when the character | ||
596 | is fetched, but rather wait until after the check | ||
597 | for a NULL output character. (This is necessary | ||
598 | because there may not be room for the two chars | ||
599 | needed to send a NULL. | ||
600 | */ | ||
601 | outch = info->xmit_buf[info->xmit_tail]; | ||
602 | if( outch ){ | ||
603 | info->xmit_cnt--; | ||
604 | info->xmit_tail = (info->xmit_tail + 1) | ||
605 | & (PAGE_SIZE - 1); | ||
606 | base_addr[CyTDR] = outch; | ||
607 | char_count--; | ||
608 | }else{ | ||
609 | if(char_count > 1){ | ||
610 | info->xmit_cnt--; | ||
611 | info->xmit_tail = (info->xmit_tail + 1) | ||
612 | & (PAGE_SIZE - 1); | ||
613 | base_addr[CyTDR] = outch; | 560 | base_addr[CyTDR] = outch; |
614 | base_addr[CyTDR] = 0; | ||
615 | char_count--; | 561 | char_count--; |
616 | char_count--; | 562 | info->x_char = 0; |
617 | }else{ | ||
618 | break; | ||
619 | } | ||
620 | } | 563 | } |
621 | } | ||
622 | 564 | ||
623 | if (info->xmit_cnt < WAKEUP_CHARS) { | 565 | if (info->x_break) { |
624 | cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP); | 566 | /* The Cirrus chip requires the "Embedded Transmit |
625 | } | 567 | Commands" of start break, delay, and end break |
626 | base_addr[CyTEOIR] = (char_count != saved_cnt) ? 0 : CyNOTRANS; | 568 | sequences to be sent. The duration of the |
627 | return IRQ_HANDLED; | 569 | break is given in TICs, which runs at HZ |
628 | } /* cy_tx_interrupt */ | 570 | (typically 100) and the PPR runs at 200 Hz, |
571 | so the delay is duration * 200/HZ, and thus a | ||
572 | break can run from 1/100 sec to about 5/4 sec. | ||
573 | Need to check these values - RGH 141095. | ||
574 | */ | ||
575 | base_addr[CyTDR] = 0; /* start break */ | ||
576 | base_addr[CyTDR] = 0x81; | ||
577 | base_addr[CyTDR] = 0; /* delay a bit */ | ||
578 | base_addr[CyTDR] = 0x82; | ||
579 | base_addr[CyTDR] = info->x_break * 200 / HZ; | ||
580 | base_addr[CyTDR] = 0; /* terminate break */ | ||
581 | base_addr[CyTDR] = 0x83; | ||
582 | char_count -= 7; | ||
583 | info->x_break = 0; | ||
584 | } | ||
585 | |||
586 | while (char_count > 0) { | ||
587 | if (!info->xmit_cnt) { | ||
588 | base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy); | ||
589 | break; | ||
590 | } | ||
591 | if (info->xmit_buf == 0) { | ||
592 | base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy); | ||
593 | break; | ||
594 | } | ||
595 | if (info->tty->stopped || info->tty->hw_stopped) { | ||
596 | base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy); | ||
597 | break; | ||
598 | } | ||
599 | /* Because the Embedded Transmit Commands have been | ||
600 | enabled, we must check to see if the escape | ||
601 | character, NULL, is being sent. If it is, we | ||
602 | must ensure that there is room for it to be | ||
603 | doubled in the output stream. Therefore we | ||
604 | no longer advance the pointer when the character | ||
605 | is fetched, but rather wait until after the check | ||
606 | for a NULL output character. (This is necessary | ||
607 | because there may not be room for the two chars | ||
608 | needed to send a NULL. | ||
609 | */ | ||
610 | outch = info->xmit_buf[info->xmit_tail]; | ||
611 | if (outch) { | ||
612 | info->xmit_cnt--; | ||
613 | info->xmit_tail = (info->xmit_tail + 1) | ||
614 | & (PAGE_SIZE - 1); | ||
615 | base_addr[CyTDR] = outch; | ||
616 | char_count--; | ||
617 | } else { | ||
618 | if (char_count > 1) { | ||
619 | info->xmit_cnt--; | ||
620 | info->xmit_tail = (info->xmit_tail + 1) | ||
621 | & (PAGE_SIZE - 1); | ||
622 | base_addr[CyTDR] = outch; | ||
623 | base_addr[CyTDR] = 0; | ||
624 | char_count--; | ||
625 | char_count--; | ||
626 | } else { | ||
627 | break; | ||
628 | } | ||
629 | } | ||
630 | } | ||
631 | |||
632 | if (info->xmit_cnt < WAKEUP_CHARS) { | ||
633 | cy_sched_event(info, Cy_EVENT_WRITE_WAKEUP); | ||
634 | } | ||
635 | base_addr[CyTEOIR] = (char_count != saved_cnt) ? 0 : CyNOTRANS; | ||
636 | return IRQ_HANDLED; | ||
637 | } /* cy_tx_interrupt */ | ||
629 | 638 | ||
630 | static irqreturn_t | 639 | static irqreturn_t cd2401_rx_interrupt(int irq, void *dev_id) |
631 | cd2401_rx_interrupt(int irq, void *dev_id) | ||
632 | { | 640 | { |
633 | struct tty_struct *tty; | 641 | struct tty_struct *tty; |
634 | struct cyclades_port *info; | 642 | struct cyclades_port *info; |
635 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; | 643 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; |
636 | int channel; | 644 | int channel; |
637 | char data; | 645 | char data; |
638 | int char_count; | 646 | int char_count; |
639 | int save_cnt; | 647 | int save_cnt; |
640 | int len; | 648 | int len; |
641 | 649 | ||
642 | /* determine the channel and change to that context */ | 650 | /* determine the channel and change to that context */ |
643 | channel = (u_short ) (base_addr[CyLICR] >> 2); | 651 | channel = (u_short) (base_addr[CyLICR] >> 2); |
644 | info = &cy_port[channel]; | 652 | info = &cy_port[channel]; |
645 | info->last_active = jiffies; | 653 | info->last_active = jiffies; |
646 | save_cnt = char_count = base_addr[CyRFOC]; | 654 | save_cnt = char_count = base_addr[CyRFOC]; |
647 | 655 | ||
648 | #ifdef CONFIG_REMOTE_DEBUG | 656 | #ifdef CONFIG_REMOTE_DEBUG |
649 | if (channel == DEBUG_PORT) { | 657 | if (channel == DEBUG_PORT) { |
650 | while (char_count--) { | 658 | while (char_count--) { |
651 | data = base_addr[CyRDR]; | 659 | data = base_addr[CyRDR]; |
652 | queueDebugChar(data); | 660 | queueDebugChar(data); |
653 | } | 661 | } |
654 | } | 662 | } else |
655 | else | ||
656 | #endif | 663 | #endif |
657 | /* if there is nowhere to put the data, discard it */ | 664 | /* if there is nowhere to put the data, discard it */ |
658 | if(info->tty == 0){ | 665 | if (info->tty == 0) { |
659 | while(char_count--){ | 666 | while (char_count--) { |
660 | data = base_addr[CyRDR]; | 667 | data = base_addr[CyRDR]; |
661 | } | 668 | } |
662 | }else{ /* there is an open port for this data */ | 669 | } else { /* there is an open port for this data */ |
663 | tty = info->tty; | 670 | tty = info->tty; |
664 | /* load # characters available from the chip */ | 671 | /* load # characters available from the chip */ |
665 | 672 | ||
666 | #ifdef CYCLOM_ENABLE_MONITORING | 673 | #ifdef CYCLOM_ENABLE_MONITORING |
667 | ++info->mon.int_count; | 674 | ++info->mon.int_count; |
668 | info->mon.char_count += char_count; | 675 | info->mon.char_count += char_count; |
669 | if (char_count > info->mon.char_max) | 676 | if (char_count > info->mon.char_max) |
670 | info->mon.char_max = char_count; | 677 | info->mon.char_max = char_count; |
671 | info->mon.char_last = char_count; | 678 | info->mon.char_last = char_count; |
672 | #endif | 679 | #endif |
673 | len = tty_buffer_request_room(tty, char_count); | 680 | len = tty_buffer_request_room(tty, char_count); |
674 | while(len--){ | 681 | while (len--) { |
675 | data = base_addr[CyRDR]; | 682 | data = base_addr[CyRDR]; |
676 | tty_insert_flip_char(tty, data, TTY_NORMAL); | 683 | tty_insert_flip_char(tty, data, TTY_NORMAL); |
677 | #ifdef CYCLOM_16Y_HACK | 684 | #ifdef CYCLOM_16Y_HACK |
678 | udelay(10L); | 685 | udelay(10L); |
679 | #endif | 686 | #endif |
680 | } | 687 | } |
681 | tty_schedule_flip(tty); | 688 | tty_schedule_flip(tty); |
682 | } | 689 | } |
683 | /* end of service */ | 690 | /* end of service */ |
684 | base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS; | 691 | base_addr[CyREOIR] = save_cnt ? 0 : CyNOTRANS; |
685 | return IRQ_HANDLED; | 692 | return IRQ_HANDLED; |
686 | } /* cy_rx_interrupt */ | 693 | } /* cy_rx_interrupt */ |
687 | 694 | ||
688 | /* | 695 | /* |
689 | * This routine is used to handle the "bottom half" processing for the | 696 | * This routine is used to handle the "bottom half" processing for the |
@@ -705,192 +712,188 @@ cd2401_rx_interrupt(int irq, void *dev_id) | |||
705 | * structure) to the bottom half of the driver. Previous kernels | 712 | * structure) to the bottom half of the driver. Previous kernels |
706 | * had to poll every port to see if that port needed servicing. | 713 | * had to poll every port to see if that port needed servicing. |
707 | */ | 714 | */ |
708 | static void | 715 | static void do_softint(struct work_struct *ugly_api) |
709 | do_softint(struct work_struct *ugly_api) | ||
710 | { | 716 | { |
711 | struct cyclades_port *info = container_of(ugly_api, struct cyclades_port, tqueue); | 717 | struct cyclades_port *info = |
712 | struct tty_struct *tty; | 718 | container_of(ugly_api, struct cyclades_port, tqueue); |
713 | 719 | struct tty_struct *tty; | |
714 | tty = info->tty; | ||
715 | if (!tty) | ||
716 | return; | ||
717 | 720 | ||
718 | if (test_and_clear_bit(Cy_EVENT_HANGUP, &info->event)) { | 721 | tty = info->tty; |
719 | tty_hangup(info->tty); | 722 | if (!tty) |
720 | wake_up_interruptible(&info->open_wait); | 723 | return; |
721 | info->flags &= ~ASYNC_NORMAL_ACTIVE; | ||
722 | } | ||
723 | if (test_and_clear_bit(Cy_EVENT_OPEN_WAKEUP, &info->event)) { | ||
724 | wake_up_interruptible(&info->open_wait); | ||
725 | } | ||
726 | if (test_and_clear_bit(Cy_EVENT_WRITE_WAKEUP, &info->event)) { | ||
727 | tty_wakeup(tty); | ||
728 | } | ||
729 | } /* do_softint */ | ||
730 | 724 | ||
725 | if (test_and_clear_bit(Cy_EVENT_HANGUP, &info->event)) { | ||
726 | tty_hangup(info->tty); | ||
727 | wake_up_interruptible(&info->open_wait); | ||
728 | info->flags &= ~ASYNC_NORMAL_ACTIVE; | ||
729 | } | ||
730 | if (test_and_clear_bit(Cy_EVENT_OPEN_WAKEUP, &info->event)) { | ||
731 | wake_up_interruptible(&info->open_wait); | ||
732 | } | ||
733 | if (test_and_clear_bit(Cy_EVENT_WRITE_WAKEUP, &info->event)) { | ||
734 | tty_wakeup(tty); | ||
735 | } | ||
736 | } /* do_softint */ | ||
731 | 737 | ||
732 | /* This is called whenever a port becomes active; | 738 | /* This is called whenever a port becomes active; |
733 | interrupts are enabled and DTR & RTS are turned on. | 739 | interrupts are enabled and DTR & RTS are turned on. |
734 | */ | 740 | */ |
735 | static int | 741 | static int startup(struct cyclades_port *info) |
736 | startup(struct cyclades_port * info) | ||
737 | { | 742 | { |
738 | unsigned long flags; | 743 | unsigned long flags; |
739 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; | 744 | volatile unsigned char *base_addr = (unsigned char *)BASE_ADDR; |
740 | int channel; | 745 | int channel; |
741 | 746 | ||
742 | if (info->flags & ASYNC_INITIALIZED){ | 747 | if (info->flags & ASYNC_INITIALIZED) { |
743 | return 0; | 748 | return 0; |
744 | } | 749 | } |
745 | 750 | ||
746 | if (!info->type){ | 751 | if (!info->type) { |
747 | if (info->tty){ | 752 | if (info->tty) { |
748 | set_bit(TTY_IO_ERROR, &info->tty->flags); | 753 | set_bit(TTY_IO_ERROR, &info->tty->flags); |
754 | } | ||
755 | return 0; | ||
749 | } | 756 | } |
750 | return 0; | 757 | if (!info->xmit_buf) { |
751 | } | 758 | info->xmit_buf = (unsigned char *)get_zeroed_page(GFP_KERNEL); |
752 | if (!info->xmit_buf){ | 759 | if (!info->xmit_buf) { |
753 | info->xmit_buf = (unsigned char *) get_zeroed_page (GFP_KERNEL); | 760 | return -ENOMEM; |
754 | if (!info->xmit_buf){ | 761 | } |
755 | return -ENOMEM; | ||
756 | } | 762 | } |
757 | } | ||
758 | 763 | ||
759 | config_setup(info); | 764 | config_setup(info); |
760 | 765 | ||
761 | channel = info->line; | 766 | channel = info->line; |
762 | 767 | ||
763 | #ifdef SERIAL_DEBUG_OPEN | 768 | #ifdef SERIAL_DEBUG_OPEN |
764 | printk("startup channel %d\n", channel); | 769 | printk("startup channel %d\n", channel); |
765 | #endif | 770 | #endif |
766 | 771 | ||
767 | local_irq_save(flags); | 772 | local_irq_save(flags); |
768 | base_addr[CyCAR] = (u_char)channel; | 773 | base_addr[CyCAR] = (u_char) channel; |
769 | write_cy_cmd(base_addr,CyENB_RCVR|CyENB_XMTR); | 774 | write_cy_cmd(base_addr, CyENB_RCVR | CyENB_XMTR); |
770 | 775 | ||
771 | base_addr[CyCAR] = (u_char)channel; /* !!! Is this needed? */ | 776 | base_addr[CyCAR] = (u_char) channel; /* !!! Is this needed? */ |
772 | base_addr[CyMSVR1] = CyRTS; | 777 | base_addr[CyMSVR1] = CyRTS; |
773 | /* CP('S');CP('1'); */ | 778 | /* CP('S');CP('1'); */ |
774 | base_addr[CyMSVR2] = CyDTR; | 779 | base_addr[CyMSVR2] = CyDTR; |
775 | 780 | ||
776 | #ifdef SERIAL_DEBUG_DTR | 781 | #ifdef SERIAL_DEBUG_DTR |
777 | printk("cyc: %d: raising DTR\n", __LINE__); | 782 | printk("cyc: %d: raising DTR\n", __LINE__); |
778 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]); | 783 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], |
784 | base_addr[CyMSVR2]); | ||
779 | #endif | 785 | #endif |
780 | 786 | ||
781 | base_addr[CyIER] |= CyRxData; | 787 | base_addr[CyIER] |= CyRxData; |
782 | info->flags |= ASYNC_INITIALIZED; | 788 | info->flags |= ASYNC_INITIALIZED; |
783 | 789 | ||
784 | if (info->tty){ | 790 | if (info->tty) { |
785 | clear_bit(TTY_IO_ERROR, &info->tty->flags); | 791 | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
786 | } | 792 | } |
787 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; | 793 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; |
788 | 794 | ||
789 | local_irq_restore(flags); | 795 | local_irq_restore(flags); |
790 | 796 | ||
791 | #ifdef SERIAL_DEBUG_OPEN | 797 | #ifdef SERIAL_DEBUG_OPEN |
792 | printk(" done\n"); | 798 | printk(" done\n"); |
793 | #endif | 799 | #endif |
794 | return 0; | 800 | return 0; |
795 | } /* startup */ | 801 | } /* startup */ |
796 | 802 | ||
797 | void | 803 | void start_xmit(struct cyclades_port *info) |
798 | start_xmit( struct cyclades_port *info ) | ||
799 | { | 804 | { |
800 | unsigned long flags; | 805 | unsigned long flags; |
801 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 806 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
802 | int channel; | 807 | int channel; |
803 | 808 | ||
804 | channel = info->line; | 809 | channel = info->line; |
805 | local_irq_save(flags); | 810 | local_irq_save(flags); |
806 | base_addr[CyCAR] = channel; | 811 | base_addr[CyCAR] = channel; |
807 | base_addr[CyIER] |= CyTxMpty; | 812 | base_addr[CyIER] |= CyTxMpty; |
808 | local_irq_restore(flags); | 813 | local_irq_restore(flags); |
809 | } /* start_xmit */ | 814 | } /* start_xmit */ |
810 | 815 | ||
811 | /* | 816 | /* |
812 | * This routine shuts down a serial port; interrupts are disabled, | 817 | * This routine shuts down a serial port; interrupts are disabled, |
813 | * and DTR is dropped if the hangup on close termio flag is on. | 818 | * and DTR is dropped if the hangup on close termio flag is on. |
814 | */ | 819 | */ |
815 | static void | 820 | static void shutdown(struct cyclades_port *info) |
816 | shutdown(struct cyclades_port * info) | ||
817 | { | 821 | { |
818 | unsigned long flags; | 822 | unsigned long flags; |
819 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 823 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
820 | int channel; | 824 | int channel; |
821 | 825 | ||
822 | if (!(info->flags & ASYNC_INITIALIZED)){ | 826 | if (!(info->flags & ASYNC_INITIALIZED)) { |
823 | /* CP('$'); */ | 827 | /* CP('$'); */ |
824 | return; | 828 | return; |
825 | } | 829 | } |
826 | 830 | ||
827 | channel = info->line; | 831 | channel = info->line; |
828 | 832 | ||
829 | #ifdef SERIAL_DEBUG_OPEN | 833 | #ifdef SERIAL_DEBUG_OPEN |
830 | printk("shutdown channel %d\n", channel); | 834 | printk("shutdown channel %d\n", channel); |
831 | #endif | 835 | #endif |
832 | 836 | ||
833 | /* !!! REALLY MUST WAIT FOR LAST CHARACTER TO BE | 837 | /* !!! REALLY MUST WAIT FOR LAST CHARACTER TO BE |
834 | SENT BEFORE DROPPING THE LINE !!! (Perhaps | 838 | SENT BEFORE DROPPING THE LINE !!! (Perhaps |
835 | set some flag that is read when XMTY happens.) | 839 | set some flag that is read when XMTY happens.) |
836 | Other choices are to delay some fixed interval | 840 | Other choices are to delay some fixed interval |
837 | or schedule some later processing. | 841 | or schedule some later processing. |
838 | */ | 842 | */ |
839 | local_irq_save(flags); | 843 | local_irq_save(flags); |
840 | if (info->xmit_buf){ | 844 | if (info->xmit_buf) { |
841 | free_page((unsigned long) info->xmit_buf); | 845 | free_page((unsigned long)info->xmit_buf); |
842 | info->xmit_buf = NULL; | 846 | info->xmit_buf = NULL; |
843 | } | 847 | } |
844 | 848 | ||
845 | base_addr[CyCAR] = (u_char)channel; | 849 | base_addr[CyCAR] = (u_char) channel; |
846 | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { | 850 | if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) { |
847 | base_addr[CyMSVR1] = 0; | 851 | base_addr[CyMSVR1] = 0; |
848 | /* CP('C');CP('1'); */ | 852 | /* CP('C');CP('1'); */ |
849 | base_addr[CyMSVR2] = 0; | 853 | base_addr[CyMSVR2] = 0; |
850 | #ifdef SERIAL_DEBUG_DTR | 854 | #ifdef SERIAL_DEBUG_DTR |
851 | printk("cyc: %d: dropping DTR\n", __LINE__); | 855 | printk("cyc: %d: dropping DTR\n", __LINE__); |
852 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]); | 856 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], |
857 | base_addr[CyMSVR2]); | ||
853 | #endif | 858 | #endif |
854 | } | 859 | } |
855 | write_cy_cmd(base_addr,CyDIS_RCVR); | 860 | write_cy_cmd(base_addr, CyDIS_RCVR); |
856 | /* it may be appropriate to clear _XMIT at | 861 | /* it may be appropriate to clear _XMIT at |
857 | some later date (after testing)!!! */ | 862 | some later date (after testing)!!! */ |
858 | 863 | ||
859 | if (info->tty){ | 864 | if (info->tty) { |
860 | set_bit(TTY_IO_ERROR, &info->tty->flags); | 865 | set_bit(TTY_IO_ERROR, &info->tty->flags); |
861 | } | 866 | } |
862 | info->flags &= ~ASYNC_INITIALIZED; | 867 | info->flags &= ~ASYNC_INITIALIZED; |
863 | local_irq_restore(flags); | 868 | local_irq_restore(flags); |
864 | 869 | ||
865 | #ifdef SERIAL_DEBUG_OPEN | 870 | #ifdef SERIAL_DEBUG_OPEN |
866 | printk(" done\n"); | 871 | printk(" done\n"); |
867 | #endif | 872 | #endif |
868 | return; | 873 | } /* shutdown */ |
869 | } /* shutdown */ | ||
870 | 874 | ||
871 | /* | 875 | /* |
872 | * This routine finds or computes the various line characteristics. | 876 | * This routine finds or computes the various line characteristics. |
873 | */ | 877 | */ |
874 | static void | 878 | static void config_setup(struct cyclades_port *info) |
875 | config_setup(struct cyclades_port * info) | ||
876 | { | 879 | { |
877 | unsigned long flags; | 880 | unsigned long flags; |
878 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 881 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
879 | int channel; | 882 | int channel; |
880 | unsigned cflag; | 883 | unsigned cflag; |
881 | int i; | 884 | int i; |
882 | unsigned char ti, need_init_chan = 0; | 885 | unsigned char ti, need_init_chan = 0; |
883 | 886 | ||
884 | if (!info->tty || !info->tty->termios){ | 887 | if (!info->tty || !info->tty->termios) { |
885 | return; | 888 | return; |
886 | } | 889 | } |
887 | if (info->line == -1){ | 890 | if (info->line == -1) { |
888 | return; | 891 | return; |
889 | } | 892 | } |
890 | cflag = info->tty->termios->c_cflag; | 893 | cflag = info->tty->termios->c_cflag; |
891 | 894 | ||
892 | /* baud rate */ | 895 | /* baud rate */ |
893 | i = cflag & CBAUD; | 896 | i = cflag & CBAUD; |
894 | #ifdef CBAUDEX | 897 | #ifdef CBAUDEX |
895 | /* Starting with kernel 1.1.65, there is direct support for | 898 | /* Starting with kernel 1.1.65, there is direct support for |
896 | higher baud rates. The following code supports those | 899 | higher baud rates. The following code supports those |
@@ -900,120 +903,123 @@ config_setup(struct cyclades_port * info) | |||
900 | is still the possibility of supporting 75 kbit/sec with | 903 | is still the possibility of supporting 75 kbit/sec with |
901 | the Cyclades board.) | 904 | the Cyclades board.) |
902 | */ | 905 | */ |
903 | if (i & CBAUDEX) { | 906 | if (i & CBAUDEX) { |
904 | if (i == B57600) | 907 | if (i == B57600) |
905 | i = 16; | 908 | i = 16; |
906 | else if(i == B115200) | 909 | else if (i == B115200) |
907 | i = 18; | 910 | i = 18; |
908 | #ifdef B78600 | 911 | #ifdef B78600 |
909 | else if(i == B78600) | 912 | else if (i == B78600) |
910 | i = 17; | 913 | i = 17; |
911 | #endif | 914 | #endif |
912 | else | 915 | else |
913 | info->tty->termios->c_cflag &= ~CBAUDEX; | 916 | info->tty->termios->c_cflag &= ~CBAUDEX; |
914 | } | 917 | } |
915 | #endif | 918 | #endif |
916 | if (i == 15) { | 919 | if (i == 15) { |
917 | if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) | 920 | if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) |
918 | i += 1; | 921 | i += 1; |
919 | if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) | 922 | if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) |
920 | i += 3; | 923 | i += 3; |
921 | } | 924 | } |
922 | /* Don't ever change the speed of the console port. It will | 925 | /* Don't ever change the speed of the console port. It will |
923 | * run at the speed specified in bootinfo, or at 19.2K */ | 926 | * run at the speed specified in bootinfo, or at 19.2K */ |
924 | /* Actually, it should run at whatever speed 166Bug was using */ | 927 | /* Actually, it should run at whatever speed 166Bug was using */ |
925 | /* Note info->timeout isn't used at present */ | 928 | /* Note info->timeout isn't used at present */ |
926 | if (info != serial_console_info) { | 929 | if (info != serial_console_info) { |
927 | info->tbpr = baud_bpr[i]; /* Tx BPR */ | 930 | info->tbpr = baud_bpr[i]; /* Tx BPR */ |
928 | info->tco = baud_co[i]; /* Tx CO */ | 931 | info->tco = baud_co[i]; /* Tx CO */ |
929 | info->rbpr = baud_bpr[i]; /* Rx BPR */ | 932 | info->rbpr = baud_bpr[i]; /* Rx BPR */ |
930 | info->rco = baud_co[i] >> 5; /* Rx CO */ | 933 | info->rco = baud_co[i] >> 5; /* Rx CO */ |
931 | if (baud_table[i] == 134) { | 934 | if (baud_table[i] == 134) { |
932 | info->timeout = (info->xmit_fifo_size*HZ*30/269) + 2; | 935 | info->timeout = |
933 | /* get it right for 134.5 baud */ | 936 | (info->xmit_fifo_size * HZ * 30 / 269) + 2; |
934 | } else if (baud_table[i]) { | 937 | /* get it right for 134.5 baud */ |
935 | info->timeout = (info->xmit_fifo_size*HZ*15/baud_table[i]) + 2; | 938 | } else if (baud_table[i]) { |
936 | /* this needs to be propagated into the card info */ | 939 | info->timeout = |
940 | (info->xmit_fifo_size * HZ * 15 / baud_table[i]) + | ||
941 | 2; | ||
942 | /* this needs to be propagated into the card info */ | ||
943 | } else { | ||
944 | info->timeout = 0; | ||
945 | } | ||
946 | } | ||
947 | /* By tradition (is it a standard?) a baud rate of zero | ||
948 | implies the line should be/has been closed. A bit | ||
949 | later in this routine such a test is performed. */ | ||
950 | |||
951 | /* byte size and parity */ | ||
952 | info->cor7 = 0; | ||
953 | info->cor6 = 0; | ||
954 | info->cor5 = 0; | ||
955 | info->cor4 = (info->default_threshold ? info->default_threshold : baud_cor4[i]); /* receive threshold */ | ||
956 | /* Following two lines added 101295, RGH. */ | ||
957 | /* It is obviously wrong to access CyCORx, and not info->corx here, | ||
958 | * try and remember to fix it later! */ | ||
959 | channel = info->line; | ||
960 | base_addr[CyCAR] = (u_char) channel; | ||
961 | if (C_CLOCAL(info->tty)) { | ||
962 | if (base_addr[CyIER] & CyMdmCh) | ||
963 | base_addr[CyIER] &= ~CyMdmCh; /* without modem intr */ | ||
964 | /* ignore 1->0 modem transitions */ | ||
965 | if (base_addr[CyCOR4] & (CyDSR | CyCTS | CyDCD)) | ||
966 | base_addr[CyCOR4] &= ~(CyDSR | CyCTS | CyDCD); | ||
967 | /* ignore 0->1 modem transitions */ | ||
968 | if (base_addr[CyCOR5] & (CyDSR | CyCTS | CyDCD)) | ||
969 | base_addr[CyCOR5] &= ~(CyDSR | CyCTS | CyDCD); | ||
937 | } else { | 970 | } else { |
938 | info->timeout = 0; | 971 | if ((base_addr[CyIER] & CyMdmCh) != CyMdmCh) |
939 | } | 972 | base_addr[CyIER] |= CyMdmCh; /* with modem intr */ |
940 | } | 973 | /* act on 1->0 modem transitions */ |
941 | /* By tradition (is it a standard?) a baud rate of zero | 974 | if ((base_addr[CyCOR4] & (CyDSR | CyCTS | CyDCD)) != |
942 | implies the line should be/has been closed. A bit | 975 | (CyDSR | CyCTS | CyDCD)) |
943 | later in this routine such a test is performed. */ | 976 | base_addr[CyCOR4] |= CyDSR | CyCTS | CyDCD; |
944 | 977 | /* act on 0->1 modem transitions */ | |
945 | /* byte size and parity */ | 978 | if ((base_addr[CyCOR5] & (CyDSR | CyCTS | CyDCD)) != |
946 | info->cor7 = 0; | 979 | (CyDSR | CyCTS | CyDCD)) |
947 | info->cor6 = 0; | 980 | base_addr[CyCOR5] |= CyDSR | CyCTS | CyDCD; |
948 | info->cor5 = 0; | 981 | } |
949 | info->cor4 = (info->default_threshold | 982 | info->cor3 = (cflag & CSTOPB) ? Cy_2_STOP : Cy_1_STOP; |
950 | ? info->default_threshold | 983 | info->cor2 = CyETC; |
951 | : baud_cor4[i]); /* receive threshold */ | 984 | switch (cflag & CSIZE) { |
952 | /* Following two lines added 101295, RGH. */ | 985 | case CS5: |
953 | /* It is obviously wrong to access CyCORx, and not info->corx here, | 986 | info->cor1 = Cy_5_BITS; |
954 | * try and remember to fix it later! */ | 987 | break; |
955 | channel = info->line; | 988 | case CS6: |
956 | base_addr[CyCAR] = (u_char)channel; | 989 | info->cor1 = Cy_6_BITS; |
957 | if (C_CLOCAL(info->tty)) { | 990 | break; |
958 | if (base_addr[CyIER] & CyMdmCh) | 991 | case CS7: |
959 | base_addr[CyIER] &= ~CyMdmCh; /* without modem intr */ | 992 | info->cor1 = Cy_7_BITS; |
960 | /* ignore 1->0 modem transitions */ | 993 | break; |
961 | if (base_addr[CyCOR4] & (CyDSR|CyCTS|CyDCD)) | 994 | case CS8: |
962 | base_addr[CyCOR4] &= ~(CyDSR|CyCTS|CyDCD); | 995 | info->cor1 = Cy_8_BITS; |
963 | /* ignore 0->1 modem transitions */ | 996 | break; |
964 | if (base_addr[CyCOR5] & (CyDSR|CyCTS|CyDCD)) | 997 | } |
965 | base_addr[CyCOR5] &= ~(CyDSR|CyCTS|CyDCD); | 998 | if (cflag & PARENB) { |
966 | } else { | 999 | if (cflag & PARODD) { |
967 | if ((base_addr[CyIER] & CyMdmCh) != CyMdmCh) | 1000 | info->cor1 |= CyPARITY_O; |
968 | base_addr[CyIER] |= CyMdmCh; /* with modem intr */ | 1001 | } else { |
969 | /* act on 1->0 modem transitions */ | 1002 | info->cor1 |= CyPARITY_E; |
970 | if ((base_addr[CyCOR4] & (CyDSR|CyCTS|CyDCD)) != (CyDSR|CyCTS|CyDCD)) | 1003 | } |
971 | base_addr[CyCOR4] |= CyDSR|CyCTS|CyDCD; | 1004 | } else { |
972 | /* act on 0->1 modem transitions */ | 1005 | info->cor1 |= CyPARITY_NONE; |
973 | if ((base_addr[CyCOR5] & (CyDSR|CyCTS|CyDCD)) != (CyDSR|CyCTS|CyDCD)) | 1006 | } |
974 | base_addr[CyCOR5] |= CyDSR|CyCTS|CyDCD; | 1007 | |
975 | } | 1008 | /* CTS flow control flag */ |
976 | info->cor3 = (cflag & CSTOPB) ? Cy_2_STOP : Cy_1_STOP; | ||
977 | info->cor2 = CyETC; | ||
978 | switch(cflag & CSIZE){ | ||
979 | case CS5: | ||
980 | info->cor1 = Cy_5_BITS; | ||
981 | break; | ||
982 | case CS6: | ||
983 | info->cor1 = Cy_6_BITS; | ||
984 | break; | ||
985 | case CS7: | ||
986 | info->cor1 = Cy_7_BITS; | ||
987 | break; | ||
988 | case CS8: | ||
989 | info->cor1 = Cy_8_BITS; | ||
990 | break; | ||
991 | } | ||
992 | if (cflag & PARENB){ | ||
993 | if (cflag & PARODD){ | ||
994 | info->cor1 |= CyPARITY_O; | ||
995 | }else{ | ||
996 | info->cor1 |= CyPARITY_E; | ||
997 | } | ||
998 | }else{ | ||
999 | info->cor1 |= CyPARITY_NONE; | ||
1000 | } | ||
1001 | |||
1002 | /* CTS flow control flag */ | ||
1003 | #if 0 | 1009 | #if 0 |
1004 | /* Don't complcate matters for now! RGH 141095 */ | 1010 | /* Don't complcate matters for now! RGH 141095 */ |
1005 | if (cflag & CRTSCTS){ | 1011 | if (cflag & CRTSCTS) { |
1006 | info->flags |= ASYNC_CTS_FLOW; | 1012 | info->flags |= ASYNC_CTS_FLOW; |
1007 | info->cor2 |= CyCtsAE; | 1013 | info->cor2 |= CyCtsAE; |
1008 | }else{ | 1014 | } else { |
1009 | info->flags &= ~ASYNC_CTS_FLOW; | 1015 | info->flags &= ~ASYNC_CTS_FLOW; |
1010 | info->cor2 &= ~CyCtsAE; | 1016 | info->cor2 &= ~CyCtsAE; |
1011 | } | 1017 | } |
1012 | #endif | 1018 | #endif |
1013 | if (cflag & CLOCAL) | 1019 | if (cflag & CLOCAL) |
1014 | info->flags &= ~ASYNC_CHECK_CD; | 1020 | info->flags &= ~ASYNC_CHECK_CD; |
1015 | else | 1021 | else |
1016 | info->flags |= ASYNC_CHECK_CD; | 1022 | info->flags |= ASYNC_CHECK_CD; |
1017 | 1023 | ||
1018 | /*********************************************** | 1024 | /*********************************************** |
1019 | The hardware option, CyRtsAO, presents RTS when | 1025 | The hardware option, CyRtsAO, presents RTS when |
@@ -1025,149 +1031,146 @@ config_setup(struct cyclades_port * info) | |||
1025 | cable. Contact Marcio Saito for details. | 1031 | cable. Contact Marcio Saito for details. |
1026 | ***********************************************/ | 1032 | ***********************************************/ |
1027 | 1033 | ||
1028 | channel = info->line; | 1034 | channel = info->line; |
1029 | 1035 | ||
1030 | local_irq_save(flags); | 1036 | local_irq_save(flags); |
1031 | base_addr[CyCAR] = (u_char)channel; | 1037 | base_addr[CyCAR] = (u_char) channel; |
1032 | 1038 | ||
1033 | /* CyCMR set once only in mvme167_init_serial() */ | 1039 | /* CyCMR set once only in mvme167_init_serial() */ |
1034 | if (base_addr[CyLICR] != channel << 2) | 1040 | if (base_addr[CyLICR] != channel << 2) |
1035 | base_addr[CyLICR] = channel << 2; | 1041 | base_addr[CyLICR] = channel << 2; |
1036 | if (base_addr[CyLIVR] != 0x5c) | 1042 | if (base_addr[CyLIVR] != 0x5c) |
1037 | base_addr[CyLIVR] = 0x5c; | 1043 | base_addr[CyLIVR] = 0x5c; |
1038 | 1044 | ||
1039 | /* tx and rx baud rate */ | 1045 | /* tx and rx baud rate */ |
1040 | 1046 | ||
1041 | if (base_addr[CyCOR1] != info->cor1) | 1047 | if (base_addr[CyCOR1] != info->cor1) |
1042 | need_init_chan = 1; | 1048 | need_init_chan = 1; |
1043 | if (base_addr[CyTCOR] != info->tco) | 1049 | if (base_addr[CyTCOR] != info->tco) |
1044 | base_addr[CyTCOR] = info->tco; | 1050 | base_addr[CyTCOR] = info->tco; |
1045 | if (base_addr[CyTBPR] != info->tbpr) | 1051 | if (base_addr[CyTBPR] != info->tbpr) |
1046 | base_addr[CyTBPR] = info->tbpr; | 1052 | base_addr[CyTBPR] = info->tbpr; |
1047 | if (base_addr[CyRCOR] != info->rco) | 1053 | if (base_addr[CyRCOR] != info->rco) |
1048 | base_addr[CyRCOR] = info->rco; | 1054 | base_addr[CyRCOR] = info->rco; |
1049 | if (base_addr[CyRBPR] != info->rbpr) | 1055 | if (base_addr[CyRBPR] != info->rbpr) |
1050 | base_addr[CyRBPR] = info->rbpr; | 1056 | base_addr[CyRBPR] = info->rbpr; |
1051 | 1057 | ||
1052 | /* set line characteristics according configuration */ | 1058 | /* set line characteristics according configuration */ |
1053 | 1059 | ||
1054 | if (base_addr[CySCHR1] != START_CHAR(info->tty)) | 1060 | if (base_addr[CySCHR1] != START_CHAR(info->tty)) |
1055 | base_addr[CySCHR1] = START_CHAR(info->tty); | 1061 | base_addr[CySCHR1] = START_CHAR(info->tty); |
1056 | if (base_addr[CySCHR2] != STOP_CHAR(info->tty)) | 1062 | if (base_addr[CySCHR2] != STOP_CHAR(info->tty)) |
1057 | base_addr[CySCHR2] = STOP_CHAR(info->tty); | 1063 | base_addr[CySCHR2] = STOP_CHAR(info->tty); |
1058 | if (base_addr[CySCRL] != START_CHAR(info->tty)) | 1064 | if (base_addr[CySCRL] != START_CHAR(info->tty)) |
1059 | base_addr[CySCRL] = START_CHAR(info->tty); | 1065 | base_addr[CySCRL] = START_CHAR(info->tty); |
1060 | if (base_addr[CySCRH] != START_CHAR(info->tty)) | 1066 | if (base_addr[CySCRH] != START_CHAR(info->tty)) |
1061 | base_addr[CySCRH] = START_CHAR(info->tty); | 1067 | base_addr[CySCRH] = START_CHAR(info->tty); |
1062 | if (base_addr[CyCOR1] != info->cor1) | 1068 | if (base_addr[CyCOR1] != info->cor1) |
1063 | base_addr[CyCOR1] = info->cor1; | 1069 | base_addr[CyCOR1] = info->cor1; |
1064 | if (base_addr[CyCOR2] != info->cor2) | 1070 | if (base_addr[CyCOR2] != info->cor2) |
1065 | base_addr[CyCOR2] = info->cor2; | 1071 | base_addr[CyCOR2] = info->cor2; |
1066 | if (base_addr[CyCOR3] != info->cor3) | 1072 | if (base_addr[CyCOR3] != info->cor3) |
1067 | base_addr[CyCOR3] = info->cor3; | 1073 | base_addr[CyCOR3] = info->cor3; |
1068 | if (base_addr[CyCOR4] != info->cor4) | 1074 | if (base_addr[CyCOR4] != info->cor4) |
1069 | base_addr[CyCOR4] = info->cor4; | 1075 | base_addr[CyCOR4] = info->cor4; |
1070 | if (base_addr[CyCOR5] != info->cor5) | 1076 | if (base_addr[CyCOR5] != info->cor5) |
1071 | base_addr[CyCOR5] = info->cor5; | 1077 | base_addr[CyCOR5] = info->cor5; |
1072 | if (base_addr[CyCOR6] != info->cor6) | 1078 | if (base_addr[CyCOR6] != info->cor6) |
1073 | base_addr[CyCOR6] = info->cor6; | 1079 | base_addr[CyCOR6] = info->cor6; |
1074 | if (base_addr[CyCOR7] != info->cor7) | 1080 | if (base_addr[CyCOR7] != info->cor7) |
1075 | base_addr[CyCOR7] = info->cor7; | 1081 | base_addr[CyCOR7] = info->cor7; |
1076 | 1082 | ||
1077 | if (need_init_chan) | 1083 | if (need_init_chan) |
1078 | write_cy_cmd(base_addr,CyINIT_CHAN); | 1084 | write_cy_cmd(base_addr, CyINIT_CHAN); |
1079 | 1085 | ||
1080 | base_addr[CyCAR] = (u_char)channel; /* !!! Is this needed? */ | 1086 | base_addr[CyCAR] = (u_char) channel; /* !!! Is this needed? */ |
1081 | 1087 | ||
1082 | /* 2ms default rx timeout */ | 1088 | /* 2ms default rx timeout */ |
1083 | ti = info->default_timeout ? info->default_timeout : 0x02; | 1089 | ti = info->default_timeout ? info->default_timeout : 0x02; |
1084 | if (base_addr[CyRTPRL] != ti) | 1090 | if (base_addr[CyRTPRL] != ti) |
1085 | base_addr[CyRTPRL] = ti; | 1091 | base_addr[CyRTPRL] = ti; |
1086 | if (base_addr[CyRTPRH] != 0) | 1092 | if (base_addr[CyRTPRH] != 0) |
1087 | base_addr[CyRTPRH] = 0; | 1093 | base_addr[CyRTPRH] = 0; |
1088 | 1094 | ||
1089 | /* Set up RTS here also ????? RGH 141095 */ | 1095 | /* Set up RTS here also ????? RGH 141095 */ |
1090 | if(i == 0){ /* baud rate is zero, turn off line */ | 1096 | if (i == 0) { /* baud rate is zero, turn off line */ |
1091 | if ((base_addr[CyMSVR2] & CyDTR) == CyDTR) | 1097 | if ((base_addr[CyMSVR2] & CyDTR) == CyDTR) |
1092 | base_addr[CyMSVR2] = 0; | 1098 | base_addr[CyMSVR2] = 0; |
1093 | #ifdef SERIAL_DEBUG_DTR | 1099 | #ifdef SERIAL_DEBUG_DTR |
1094 | printk("cyc: %d: dropping DTR\n", __LINE__); | 1100 | printk("cyc: %d: dropping DTR\n", __LINE__); |
1095 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]); | 1101 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], |
1102 | base_addr[CyMSVR2]); | ||
1096 | #endif | 1103 | #endif |
1097 | }else{ | 1104 | } else { |
1098 | if ((base_addr[CyMSVR2] & CyDTR) != CyDTR) | 1105 | if ((base_addr[CyMSVR2] & CyDTR) != CyDTR) |
1099 | base_addr[CyMSVR2] = CyDTR; | 1106 | base_addr[CyMSVR2] = CyDTR; |
1100 | #ifdef SERIAL_DEBUG_DTR | 1107 | #ifdef SERIAL_DEBUG_DTR |
1101 | printk("cyc: %d: raising DTR\n", __LINE__); | 1108 | printk("cyc: %d: raising DTR\n", __LINE__); |
1102 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]); | 1109 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], |
1110 | base_addr[CyMSVR2]); | ||
1103 | #endif | 1111 | #endif |
1104 | } | 1112 | } |
1105 | 1113 | ||
1106 | if (info->tty){ | 1114 | if (info->tty) { |
1107 | clear_bit(TTY_IO_ERROR, &info->tty->flags); | 1115 | clear_bit(TTY_IO_ERROR, &info->tty->flags); |
1108 | } | 1116 | } |
1109 | 1117 | ||
1110 | local_irq_restore(flags); | 1118 | local_irq_restore(flags); |
1111 | |||
1112 | } /* config_setup */ | ||
1113 | 1119 | ||
1120 | } /* config_setup */ | ||
1114 | 1121 | ||
1115 | static void | 1122 | static void cy_put_char(struct tty_struct *tty, unsigned char ch) |
1116 | cy_put_char(struct tty_struct *tty, unsigned char ch) | ||
1117 | { | 1123 | { |
1118 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1124 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1119 | unsigned long flags; | 1125 | unsigned long flags; |
1120 | 1126 | ||
1121 | #ifdef SERIAL_DEBUG_IO | 1127 | #ifdef SERIAL_DEBUG_IO |
1122 | printk("cy_put_char %s(0x%02x)\n", tty->name, ch); | 1128 | printk("cy_put_char %s(0x%02x)\n", tty->name, ch); |
1123 | #endif | 1129 | #endif |
1124 | 1130 | ||
1125 | if (serial_paranoia_check(info, tty->name, "cy_put_char")) | 1131 | if (serial_paranoia_check(info, tty->name, "cy_put_char")) |
1126 | return; | 1132 | return; |
1127 | 1133 | ||
1128 | if (!info->xmit_buf) | 1134 | if (!info->xmit_buf) |
1129 | return; | 1135 | return; |
1130 | 1136 | ||
1131 | local_irq_save(flags); | 1137 | local_irq_save(flags); |
1132 | if (info->xmit_cnt >= PAGE_SIZE - 1) { | 1138 | if (info->xmit_cnt >= PAGE_SIZE - 1) { |
1133 | local_irq_restore(flags); | 1139 | local_irq_restore(flags); |
1134 | return; | 1140 | return; |
1135 | } | 1141 | } |
1136 | 1142 | ||
1137 | info->xmit_buf[info->xmit_head++] = ch; | 1143 | info->xmit_buf[info->xmit_head++] = ch; |
1138 | info->xmit_head &= PAGE_SIZE - 1; | 1144 | info->xmit_head &= PAGE_SIZE - 1; |
1139 | info->xmit_cnt++; | 1145 | info->xmit_cnt++; |
1140 | local_irq_restore(flags); | 1146 | local_irq_restore(flags); |
1141 | } /* cy_put_char */ | 1147 | } /* cy_put_char */ |
1142 | |||
1143 | 1148 | ||
1144 | static void | 1149 | static void cy_flush_chars(struct tty_struct *tty) |
1145 | cy_flush_chars(struct tty_struct *tty) | ||
1146 | { | 1150 | { |
1147 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1151 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1148 | unsigned long flags; | 1152 | unsigned long flags; |
1149 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1153 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1150 | int channel; | 1154 | int channel; |
1151 | 1155 | ||
1152 | #ifdef SERIAL_DEBUG_IO | 1156 | #ifdef SERIAL_DEBUG_IO |
1153 | printk("cy_flush_chars %s\n", tty->name); /* */ | 1157 | printk("cy_flush_chars %s\n", tty->name); /* */ |
1154 | #endif | 1158 | #endif |
1155 | 1159 | ||
1156 | if (serial_paranoia_check(info, tty->name, "cy_flush_chars")) | 1160 | if (serial_paranoia_check(info, tty->name, "cy_flush_chars")) |
1157 | return; | 1161 | return; |
1158 | 1162 | ||
1159 | if (info->xmit_cnt <= 0 || tty->stopped | 1163 | if (info->xmit_cnt <= 0 || tty->stopped |
1160 | || tty->hw_stopped || !info->xmit_buf) | 1164 | || tty->hw_stopped || !info->xmit_buf) |
1161 | return; | 1165 | return; |
1162 | 1166 | ||
1163 | channel = info->line; | 1167 | channel = info->line; |
1164 | 1168 | ||
1165 | local_irq_save(flags); | 1169 | local_irq_save(flags); |
1166 | base_addr[CyCAR] = channel; | 1170 | base_addr[CyCAR] = channel; |
1167 | base_addr[CyIER] |= CyTxMpty; | 1171 | base_addr[CyIER] |= CyTxMpty; |
1168 | local_irq_restore(flags); | 1172 | local_irq_restore(flags); |
1169 | } /* cy_flush_chars */ | 1173 | } /* cy_flush_chars */ |
1170 | |||
1171 | 1174 | ||
1172 | /* This routine gets called when tty_write has put something into | 1175 | /* This routine gets called when tty_write has put something into |
1173 | the write_queue. If the port is not already transmitting stuff, | 1176 | the write_queue. If the port is not already transmitting stuff, |
@@ -1175,650 +1178,616 @@ cy_flush_chars(struct tty_struct *tty) | |||
1175 | routine will then ensure that the characters are sent. If the | 1178 | routine will then ensure that the characters are sent. If the |
1176 | port is already active, there is no need to kick it. | 1179 | port is already active, there is no need to kick it. |
1177 | */ | 1180 | */ |
1178 | static int | 1181 | static int cy_write(struct tty_struct *tty, const unsigned char *buf, int count) |
1179 | cy_write(struct tty_struct * tty, | ||
1180 | const unsigned char *buf, int count) | ||
1181 | { | 1182 | { |
1182 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1183 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1183 | unsigned long flags; | 1184 | unsigned long flags; |
1184 | int c, total = 0; | 1185 | int c, total = 0; |
1185 | 1186 | ||
1186 | #ifdef SERIAL_DEBUG_IO | 1187 | #ifdef SERIAL_DEBUG_IO |
1187 | printk("cy_write %s\n", tty->name); /* */ | 1188 | printk("cy_write %s\n", tty->name); /* */ |
1188 | #endif | 1189 | #endif |
1189 | 1190 | ||
1190 | if (serial_paranoia_check(info, tty->name, "cy_write")){ | 1191 | if (serial_paranoia_check(info, tty->name, "cy_write")) { |
1191 | return 0; | 1192 | return 0; |
1192 | } | 1193 | } |
1193 | |||
1194 | if (!info->xmit_buf){ | ||
1195 | return 0; | ||
1196 | } | ||
1197 | |||
1198 | while (1) { | ||
1199 | local_irq_save(flags); | ||
1200 | c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, | ||
1201 | SERIAL_XMIT_SIZE - info->xmit_head)); | ||
1202 | if (c <= 0) { | ||
1203 | local_irq_restore(flags); | ||
1204 | break; | ||
1205 | } | ||
1206 | |||
1207 | memcpy(info->xmit_buf + info->xmit_head, buf, c); | ||
1208 | info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1); | ||
1209 | info->xmit_cnt += c; | ||
1210 | local_irq_restore(flags); | ||
1211 | |||
1212 | buf += c; | ||
1213 | count -= c; | ||
1214 | total += c; | ||
1215 | } | ||
1216 | |||
1217 | if (info->xmit_cnt | ||
1218 | && !tty->stopped | ||
1219 | && !tty->hw_stopped ) { | ||
1220 | start_xmit(info); | ||
1221 | } | ||
1222 | return total; | ||
1223 | } /* cy_write */ | ||
1224 | 1194 | ||
1195 | if (!info->xmit_buf) { | ||
1196 | return 0; | ||
1197 | } | ||
1225 | 1198 | ||
1226 | static int | 1199 | while (1) { |
1227 | cy_write_room(struct tty_struct *tty) | 1200 | local_irq_save(flags); |
1201 | c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, | ||
1202 | SERIAL_XMIT_SIZE - info->xmit_head)); | ||
1203 | if (c <= 0) { | ||
1204 | local_irq_restore(flags); | ||
1205 | break; | ||
1206 | } | ||
1207 | |||
1208 | memcpy(info->xmit_buf + info->xmit_head, buf, c); | ||
1209 | info->xmit_head = | ||
1210 | (info->xmit_head + c) & (SERIAL_XMIT_SIZE - 1); | ||
1211 | info->xmit_cnt += c; | ||
1212 | local_irq_restore(flags); | ||
1213 | |||
1214 | buf += c; | ||
1215 | count -= c; | ||
1216 | total += c; | ||
1217 | } | ||
1218 | |||
1219 | if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped) { | ||
1220 | start_xmit(info); | ||
1221 | } | ||
1222 | return total; | ||
1223 | } /* cy_write */ | ||
1224 | |||
1225 | static int cy_write_room(struct tty_struct *tty) | ||
1228 | { | 1226 | { |
1229 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1227 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1230 | int ret; | 1228 | int ret; |
1231 | 1229 | ||
1232 | #ifdef SERIAL_DEBUG_IO | 1230 | #ifdef SERIAL_DEBUG_IO |
1233 | printk("cy_write_room %s\n", tty->name); /* */ | 1231 | printk("cy_write_room %s\n", tty->name); /* */ |
1234 | #endif | 1232 | #endif |
1235 | 1233 | ||
1236 | if (serial_paranoia_check(info, tty->name, "cy_write_room")) | 1234 | if (serial_paranoia_check(info, tty->name, "cy_write_room")) |
1237 | return 0; | 1235 | return 0; |
1238 | ret = PAGE_SIZE - info->xmit_cnt - 1; | 1236 | ret = PAGE_SIZE - info->xmit_cnt - 1; |
1239 | if (ret < 0) | 1237 | if (ret < 0) |
1240 | ret = 0; | 1238 | ret = 0; |
1241 | return ret; | 1239 | return ret; |
1242 | } /* cy_write_room */ | 1240 | } /* cy_write_room */ |
1243 | |||
1244 | 1241 | ||
1245 | static int | 1242 | static int cy_chars_in_buffer(struct tty_struct *tty) |
1246 | cy_chars_in_buffer(struct tty_struct *tty) | ||
1247 | { | 1243 | { |
1248 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1244 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1249 | 1245 | ||
1250 | #ifdef SERIAL_DEBUG_IO | 1246 | #ifdef SERIAL_DEBUG_IO |
1251 | printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt); /* */ | 1247 | printk("cy_chars_in_buffer %s %d\n", tty->name, info->xmit_cnt); /* */ |
1252 | #endif | 1248 | #endif |
1253 | 1249 | ||
1254 | if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer")) | 1250 | if (serial_paranoia_check(info, tty->name, "cy_chars_in_buffer")) |
1255 | return 0; | 1251 | return 0; |
1256 | |||
1257 | return info->xmit_cnt; | ||
1258 | } /* cy_chars_in_buffer */ | ||
1259 | 1252 | ||
1253 | return info->xmit_cnt; | ||
1254 | } /* cy_chars_in_buffer */ | ||
1260 | 1255 | ||
1261 | static void | 1256 | static void cy_flush_buffer(struct tty_struct *tty) |
1262 | cy_flush_buffer(struct tty_struct *tty) | ||
1263 | { | 1257 | { |
1264 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1258 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1265 | unsigned long flags; | 1259 | unsigned long flags; |
1266 | 1260 | ||
1267 | #ifdef SERIAL_DEBUG_IO | 1261 | #ifdef SERIAL_DEBUG_IO |
1268 | printk("cy_flush_buffer %s\n", tty->name); /* */ | 1262 | printk("cy_flush_buffer %s\n", tty->name); /* */ |
1269 | #endif | 1263 | #endif |
1270 | 1264 | ||
1271 | if (serial_paranoia_check(info, tty->name, "cy_flush_buffer")) | 1265 | if (serial_paranoia_check(info, tty->name, "cy_flush_buffer")) |
1272 | return; | 1266 | return; |
1273 | local_irq_save(flags); | 1267 | local_irq_save(flags); |
1274 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; | 1268 | info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; |
1275 | local_irq_restore(flags); | 1269 | local_irq_restore(flags); |
1276 | tty_wakeup(tty); | 1270 | tty_wakeup(tty); |
1277 | } /* cy_flush_buffer */ | 1271 | } /* cy_flush_buffer */ |
1278 | |||
1279 | 1272 | ||
1280 | /* This routine is called by the upper-layer tty layer to signal | 1273 | /* This routine is called by the upper-layer tty layer to signal |
1281 | that incoming characters should be throttled or that the | 1274 | that incoming characters should be throttled or that the |
1282 | throttle should be released. | 1275 | throttle should be released. |
1283 | */ | 1276 | */ |
1284 | static void | 1277 | static void cy_throttle(struct tty_struct *tty) |
1285 | cy_throttle(struct tty_struct * tty) | ||
1286 | { | 1278 | { |
1287 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1279 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1288 | unsigned long flags; | 1280 | unsigned long flags; |
1289 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1281 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1290 | int channel; | 1282 | int channel; |
1291 | 1283 | ||
1292 | #ifdef SERIAL_DEBUG_THROTTLE | 1284 | #ifdef SERIAL_DEBUG_THROTTLE |
1293 | char buf[64]; | 1285 | char buf[64]; |
1294 | 1286 | ||
1295 | printk("throttle %s: %d....\n", tty_name(tty, buf), | 1287 | printk("throttle %s: %d....\n", tty_name(tty, buf), |
1296 | tty->ldisc.chars_in_buffer(tty)); | 1288 | tty->ldisc.chars_in_buffer(tty)); |
1297 | printk("cy_throttle %s\n", tty->name); | 1289 | printk("cy_throttle %s\n", tty->name); |
1298 | #endif | 1290 | #endif |
1299 | 1291 | ||
1300 | if (serial_paranoia_check(info, tty->name, "cy_nthrottle")){ | 1292 | if (serial_paranoia_check(info, tty->name, "cy_nthrottle")) { |
1301 | return; | 1293 | return; |
1302 | } | 1294 | } |
1303 | 1295 | ||
1304 | if (I_IXOFF(tty)) { | 1296 | if (I_IXOFF(tty)) { |
1305 | info->x_char = STOP_CHAR(tty); | 1297 | info->x_char = STOP_CHAR(tty); |
1306 | /* Should use the "Send Special Character" feature!!! */ | 1298 | /* Should use the "Send Special Character" feature!!! */ |
1307 | } | 1299 | } |
1308 | 1300 | ||
1309 | channel = info->line; | 1301 | channel = info->line; |
1310 | 1302 | ||
1311 | local_irq_save(flags); | 1303 | local_irq_save(flags); |
1312 | base_addr[CyCAR] = (u_char)channel; | 1304 | base_addr[CyCAR] = (u_char) channel; |
1313 | base_addr[CyMSVR1] = 0; | 1305 | base_addr[CyMSVR1] = 0; |
1314 | local_irq_restore(flags); | 1306 | local_irq_restore(flags); |
1315 | 1307 | } /* cy_throttle */ | |
1316 | return; | ||
1317 | } /* cy_throttle */ | ||
1318 | |||
1319 | 1308 | ||
1320 | static void | 1309 | static void cy_unthrottle(struct tty_struct *tty) |
1321 | cy_unthrottle(struct tty_struct * tty) | ||
1322 | { | 1310 | { |
1323 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1311 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1324 | unsigned long flags; | 1312 | unsigned long flags; |
1325 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1313 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1326 | int channel; | 1314 | int channel; |
1327 | 1315 | ||
1328 | #ifdef SERIAL_DEBUG_THROTTLE | 1316 | #ifdef SERIAL_DEBUG_THROTTLE |
1329 | char buf[64]; | 1317 | char buf[64]; |
1330 | 1318 | ||
1331 | printk("throttle %s: %d....\n", tty_name(tty, buf), | 1319 | printk("throttle %s: %d....\n", tty_name(tty, buf), |
1332 | tty->ldisc.chars_in_buffer(tty)); | 1320 | tty->ldisc.chars_in_buffer(tty)); |
1333 | printk("cy_unthrottle %s\n", tty->name); | 1321 | printk("cy_unthrottle %s\n", tty->name); |
1334 | #endif | 1322 | #endif |
1335 | 1323 | ||
1336 | if (serial_paranoia_check(info, tty->name, "cy_nthrottle")){ | 1324 | if (serial_paranoia_check(info, tty->name, "cy_nthrottle")) { |
1337 | return; | 1325 | return; |
1338 | } | 1326 | } |
1339 | 1327 | ||
1340 | if (I_IXOFF(tty)) { | 1328 | if (I_IXOFF(tty)) { |
1341 | info->x_char = START_CHAR(tty); | 1329 | info->x_char = START_CHAR(tty); |
1342 | /* Should use the "Send Special Character" feature!!! */ | 1330 | /* Should use the "Send Special Character" feature!!! */ |
1343 | } | 1331 | } |
1344 | 1332 | ||
1345 | channel = info->line; | 1333 | channel = info->line; |
1346 | 1334 | ||
1347 | local_irq_save(flags); | 1335 | local_irq_save(flags); |
1348 | base_addr[CyCAR] = (u_char)channel; | 1336 | base_addr[CyCAR] = (u_char) channel; |
1349 | base_addr[CyMSVR1] = CyRTS; | 1337 | base_addr[CyMSVR1] = CyRTS; |
1350 | local_irq_restore(flags); | 1338 | local_irq_restore(flags); |
1351 | 1339 | } /* cy_unthrottle */ | |
1352 | return; | ||
1353 | } /* cy_unthrottle */ | ||
1354 | 1340 | ||
1355 | static int | 1341 | static int |
1356 | get_serial_info(struct cyclades_port * info, | 1342 | get_serial_info(struct cyclades_port *info, |
1357 | struct serial_struct __user * retinfo) | 1343 | struct serial_struct __user * retinfo) |
1358 | { | 1344 | { |
1359 | struct serial_struct tmp; | 1345 | struct serial_struct tmp; |
1360 | 1346 | ||
1361 | /* CP('g'); */ | 1347 | /* CP('g'); */ |
1362 | if (!retinfo) | 1348 | if (!retinfo) |
1363 | return -EFAULT; | 1349 | return -EFAULT; |
1364 | memset(&tmp, 0, sizeof(tmp)); | 1350 | memset(&tmp, 0, sizeof(tmp)); |
1365 | tmp.type = info->type; | 1351 | tmp.type = info->type; |
1366 | tmp.line = info->line; | 1352 | tmp.line = info->line; |
1367 | tmp.port = info->line; | 1353 | tmp.port = info->line; |
1368 | tmp.irq = 0; | 1354 | tmp.irq = 0; |
1369 | tmp.flags = info->flags; | 1355 | tmp.flags = info->flags; |
1370 | tmp.baud_base = 0; /*!!!*/ | 1356 | tmp.baud_base = 0; /*!!! */ |
1371 | tmp.close_delay = info->close_delay; | 1357 | tmp.close_delay = info->close_delay; |
1372 | tmp.custom_divisor = 0; /*!!!*/ | 1358 | tmp.custom_divisor = 0; /*!!! */ |
1373 | tmp.hub6 = 0; /*!!!*/ | 1359 | tmp.hub6 = 0; /*!!! */ |
1374 | return copy_to_user(retinfo,&tmp,sizeof(*retinfo)) ? -EFAULT : 0; | 1360 | return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0; |
1375 | } /* get_serial_info */ | 1361 | } /* get_serial_info */ |
1376 | 1362 | ||
1377 | static int | 1363 | static int |
1378 | set_serial_info(struct cyclades_port * info, | 1364 | set_serial_info(struct cyclades_port *info, |
1379 | struct serial_struct __user * new_info) | 1365 | struct serial_struct __user * new_info) |
1380 | { | 1366 | { |
1381 | struct serial_struct new_serial; | 1367 | struct serial_struct new_serial; |
1382 | struct cyclades_port old_info; | 1368 | struct cyclades_port old_info; |
1383 | 1369 | ||
1384 | /* CP('s'); */ | 1370 | /* CP('s'); */ |
1385 | if (!new_info) | 1371 | if (!new_info) |
1386 | return -EFAULT; | 1372 | return -EFAULT; |
1387 | if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) | 1373 | if (copy_from_user(&new_serial, new_info, sizeof(new_serial))) |
1388 | return -EFAULT; | 1374 | return -EFAULT; |
1389 | old_info = *info; | 1375 | old_info = *info; |
1376 | |||
1377 | if (!capable(CAP_SYS_ADMIN)) { | ||
1378 | if ((new_serial.close_delay != info->close_delay) || | ||
1379 | ((new_serial.flags & ASYNC_FLAGS & ~ASYNC_USR_MASK) != | ||
1380 | (info->flags & ASYNC_FLAGS & ~ASYNC_USR_MASK))) | ||
1381 | return -EPERM; | ||
1382 | info->flags = ((info->flags & ~ASYNC_USR_MASK) | | ||
1383 | (new_serial.flags & ASYNC_USR_MASK)); | ||
1384 | goto check_and_exit; | ||
1385 | } | ||
1390 | 1386 | ||
1391 | if (!capable(CAP_SYS_ADMIN)) { | 1387 | /* |
1392 | if ((new_serial.close_delay != info->close_delay) || | 1388 | * OK, past this point, all the error checking has been done. |
1393 | ((new_serial.flags & ASYNC_FLAGS & ~ASYNC_USR_MASK) != | 1389 | * At this point, we start making changes..... |
1394 | (info->flags & ASYNC_FLAGS & ~ASYNC_USR_MASK))) | 1390 | */ |
1395 | return -EPERM; | ||
1396 | info->flags = ((info->flags & ~ASYNC_USR_MASK) | | ||
1397 | (new_serial.flags & ASYNC_USR_MASK)); | ||
1398 | goto check_and_exit; | ||
1399 | } | ||
1400 | 1391 | ||
1392 | info->flags = ((info->flags & ~ASYNC_FLAGS) | | ||
1393 | (new_serial.flags & ASYNC_FLAGS)); | ||
1394 | info->close_delay = new_serial.close_delay; | ||
1401 | 1395 | ||
1402 | /* | 1396 | check_and_exit: |
1403 | * OK, past this point, all the error checking has been done. | 1397 | if (info->flags & ASYNC_INITIALIZED) { |
1404 | * At this point, we start making changes..... | 1398 | config_setup(info); |
1405 | */ | 1399 | return 0; |
1400 | } | ||
1401 | return startup(info); | ||
1402 | } /* set_serial_info */ | ||
1406 | 1403 | ||
1407 | info->flags = ((info->flags & ~ASYNC_FLAGS) | | 1404 | static int cy_tiocmget(struct tty_struct *tty, struct file *file) |
1408 | (new_serial.flags & ASYNC_FLAGS)); | 1405 | { |
1409 | info->close_delay = new_serial.close_delay; | 1406 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1407 | int channel; | ||
1408 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; | ||
1409 | unsigned long flags; | ||
1410 | unsigned char status; | ||
1410 | 1411 | ||
1412 | channel = info->line; | ||
1411 | 1413 | ||
1412 | check_and_exit: | 1414 | local_irq_save(flags); |
1413 | if (info->flags & ASYNC_INITIALIZED){ | 1415 | base_addr[CyCAR] = (u_char) channel; |
1414 | config_setup(info); | 1416 | status = base_addr[CyMSVR1] | base_addr[CyMSVR2]; |
1415 | return 0; | 1417 | local_irq_restore(flags); |
1416 | }else{ | ||
1417 | return startup(info); | ||
1418 | } | ||
1419 | } /* set_serial_info */ | ||
1420 | 1418 | ||
1421 | static int | 1419 | return ((status & CyRTS) ? TIOCM_RTS : 0) |
1422 | cy_tiocmget(struct tty_struct *tty, struct file *file) | 1420 | | ((status & CyDTR) ? TIOCM_DTR : 0) |
1423 | { | 1421 | | ((status & CyDCD) ? TIOCM_CAR : 0) |
1424 | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; | 1422 | | ((status & CyDSR) ? TIOCM_DSR : 0) |
1425 | int channel; | 1423 | | ((status & CyCTS) ? TIOCM_CTS : 0); |
1426 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1424 | } /* cy_tiocmget */ |
1427 | unsigned long flags; | ||
1428 | unsigned char status; | ||
1429 | |||
1430 | channel = info->line; | ||
1431 | |||
1432 | local_irq_save(flags); | ||
1433 | base_addr[CyCAR] = (u_char)channel; | ||
1434 | status = base_addr[CyMSVR1] | base_addr[CyMSVR2]; | ||
1435 | local_irq_restore(flags); | ||
1436 | |||
1437 | return ((status & CyRTS) ? TIOCM_RTS : 0) | ||
1438 | | ((status & CyDTR) ? TIOCM_DTR : 0) | ||
1439 | | ((status & CyDCD) ? TIOCM_CAR : 0) | ||
1440 | | ((status & CyDSR) ? TIOCM_DSR : 0) | ||
1441 | | ((status & CyCTS) ? TIOCM_CTS : 0); | ||
1442 | } /* cy_tiocmget */ | ||
1443 | 1425 | ||
1444 | static int | 1426 | static int |
1445 | cy_tiocmset(struct tty_struct *tty, struct file *file, | 1427 | cy_tiocmset(struct tty_struct *tty, struct file *file, |
1446 | unsigned int set, unsigned int clear) | 1428 | unsigned int set, unsigned int clear) |
1447 | { | 1429 | { |
1448 | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; | 1430 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1449 | int channel; | 1431 | int channel; |
1450 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1432 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1451 | unsigned long flags; | 1433 | unsigned long flags; |
1452 | 1434 | ||
1453 | channel = info->line; | 1435 | channel = info->line; |
1454 | 1436 | ||
1455 | if (set & TIOCM_RTS){ | 1437 | if (set & TIOCM_RTS) { |
1456 | local_irq_save(flags); | 1438 | local_irq_save(flags); |
1457 | base_addr[CyCAR] = (u_char)channel; | 1439 | base_addr[CyCAR] = (u_char) channel; |
1458 | base_addr[CyMSVR1] = CyRTS; | 1440 | base_addr[CyMSVR1] = CyRTS; |
1459 | local_irq_restore(flags); | 1441 | local_irq_restore(flags); |
1460 | } | 1442 | } |
1461 | if (set & TIOCM_DTR){ | 1443 | if (set & TIOCM_DTR) { |
1462 | local_irq_save(flags); | 1444 | local_irq_save(flags); |
1463 | base_addr[CyCAR] = (u_char)channel; | 1445 | base_addr[CyCAR] = (u_char) channel; |
1464 | /* CP('S');CP('2'); */ | 1446 | /* CP('S');CP('2'); */ |
1465 | base_addr[CyMSVR2] = CyDTR; | 1447 | base_addr[CyMSVR2] = CyDTR; |
1466 | #ifdef SERIAL_DEBUG_DTR | 1448 | #ifdef SERIAL_DEBUG_DTR |
1467 | printk("cyc: %d: raising DTR\n", __LINE__); | 1449 | printk("cyc: %d: raising DTR\n", __LINE__); |
1468 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]); | 1450 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], |
1451 | base_addr[CyMSVR2]); | ||
1469 | #endif | 1452 | #endif |
1470 | local_irq_restore(flags); | 1453 | local_irq_restore(flags); |
1471 | } | 1454 | } |
1472 | 1455 | ||
1473 | if (clear & TIOCM_RTS){ | 1456 | if (clear & TIOCM_RTS) { |
1474 | local_irq_save(flags); | 1457 | local_irq_save(flags); |
1475 | base_addr[CyCAR] = (u_char)channel; | 1458 | base_addr[CyCAR] = (u_char) channel; |
1476 | base_addr[CyMSVR1] = 0; | 1459 | base_addr[CyMSVR1] = 0; |
1477 | local_irq_restore(flags); | 1460 | local_irq_restore(flags); |
1478 | } | 1461 | } |
1479 | if (clear & TIOCM_DTR){ | 1462 | if (clear & TIOCM_DTR) { |
1480 | local_irq_save(flags); | 1463 | local_irq_save(flags); |
1481 | base_addr[CyCAR] = (u_char)channel; | 1464 | base_addr[CyCAR] = (u_char) channel; |
1482 | /* CP('C');CP('2'); */ | 1465 | /* CP('C');CP('2'); */ |
1483 | base_addr[CyMSVR2] = 0; | 1466 | base_addr[CyMSVR2] = 0; |
1484 | #ifdef SERIAL_DEBUG_DTR | 1467 | #ifdef SERIAL_DEBUG_DTR |
1485 | printk("cyc: %d: dropping DTR\n", __LINE__); | 1468 | printk("cyc: %d: dropping DTR\n", __LINE__); |
1486 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]); | 1469 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], |
1470 | base_addr[CyMSVR2]); | ||
1487 | #endif | 1471 | #endif |
1488 | local_irq_restore(flags); | 1472 | local_irq_restore(flags); |
1489 | } | 1473 | } |
1490 | 1474 | ||
1491 | return 0; | 1475 | return 0; |
1492 | } /* set_modem_info */ | 1476 | } /* set_modem_info */ |
1493 | 1477 | ||
1494 | static void | 1478 | static void send_break(struct cyclades_port *info, int duration) |
1495 | send_break( struct cyclades_port * info, int duration) | 1479 | { /* Let the transmit ISR take care of this (since it |
1496 | { /* Let the transmit ISR take care of this (since it | 1480 | requires stuffing characters into the output stream). |
1497 | requires stuffing characters into the output stream). | 1481 | */ |
1498 | */ | 1482 | info->x_break = duration; |
1499 | info->x_break = duration; | 1483 | if (!info->xmit_cnt) { |
1500 | if (!info->xmit_cnt ) { | 1484 | start_xmit(info); |
1501 | start_xmit(info); | 1485 | } |
1502 | } | 1486 | } /* send_break */ |
1503 | } /* send_break */ | ||
1504 | 1487 | ||
1505 | static int | 1488 | static int |
1506 | get_mon_info(struct cyclades_port * info, struct cyclades_monitor __user * mon) | 1489 | get_mon_info(struct cyclades_port *info, struct cyclades_monitor __user * mon) |
1507 | { | 1490 | { |
1508 | 1491 | ||
1509 | if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor))) | 1492 | if (copy_to_user(mon, &info->mon, sizeof(struct cyclades_monitor))) |
1510 | return -EFAULT; | 1493 | return -EFAULT; |
1511 | info->mon.int_count = 0; | 1494 | info->mon.int_count = 0; |
1512 | info->mon.char_count = 0; | 1495 | info->mon.char_count = 0; |
1513 | info->mon.char_max = 0; | 1496 | info->mon.char_max = 0; |
1514 | info->mon.char_last = 0; | 1497 | info->mon.char_last = 0; |
1515 | return 0; | 1498 | return 0; |
1516 | } | 1499 | } |
1517 | 1500 | ||
1518 | static int | 1501 | static int set_threshold(struct cyclades_port *info, unsigned long __user * arg) |
1519 | set_threshold(struct cyclades_port * info, unsigned long __user *arg) | ||
1520 | { | 1502 | { |
1521 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1503 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1522 | unsigned long value; | 1504 | unsigned long value; |
1523 | int channel; | 1505 | int channel; |
1524 | 1506 | ||
1525 | if (get_user(value, arg)) | 1507 | if (get_user(value, arg)) |
1526 | return -EFAULT; | 1508 | return -EFAULT; |
1527 | 1509 | ||
1528 | channel = info->line; | 1510 | channel = info->line; |
1529 | info->cor4 &= ~CyREC_FIFO; | 1511 | info->cor4 &= ~CyREC_FIFO; |
1530 | info->cor4 |= value & CyREC_FIFO; | 1512 | info->cor4 |= value & CyREC_FIFO; |
1531 | base_addr[CyCOR4] = info->cor4; | 1513 | base_addr[CyCOR4] = info->cor4; |
1532 | return 0; | 1514 | return 0; |
1533 | } | 1515 | } |
1534 | 1516 | ||
1535 | static int | 1517 | static int |
1536 | get_threshold(struct cyclades_port * info, unsigned long __user *value) | 1518 | get_threshold(struct cyclades_port *info, unsigned long __user * value) |
1537 | { | 1519 | { |
1538 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1520 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1539 | int channel; | 1521 | int channel; |
1540 | unsigned long tmp; | 1522 | unsigned long tmp; |
1541 | 1523 | ||
1542 | channel = info->line; | 1524 | channel = info->line; |
1543 | 1525 | ||
1544 | tmp = base_addr[CyCOR4] & CyREC_FIFO; | 1526 | tmp = base_addr[CyCOR4] & CyREC_FIFO; |
1545 | return put_user(tmp,value); | 1527 | return put_user(tmp, value); |
1546 | } | 1528 | } |
1547 | 1529 | ||
1548 | static int | 1530 | static int |
1549 | set_default_threshold(struct cyclades_port * info, unsigned long __user *arg) | 1531 | set_default_threshold(struct cyclades_port *info, unsigned long __user * arg) |
1550 | { | 1532 | { |
1551 | unsigned long value; | 1533 | unsigned long value; |
1552 | 1534 | ||
1553 | if (get_user(value, arg)) | 1535 | if (get_user(value, arg)) |
1554 | return -EFAULT; | 1536 | return -EFAULT; |
1555 | 1537 | ||
1556 | info->default_threshold = value & 0x0f; | 1538 | info->default_threshold = value & 0x0f; |
1557 | return 0; | 1539 | return 0; |
1558 | } | 1540 | } |
1559 | 1541 | ||
1560 | static int | 1542 | static int |
1561 | get_default_threshold(struct cyclades_port * info, unsigned long __user *value) | 1543 | get_default_threshold(struct cyclades_port *info, unsigned long __user * value) |
1562 | { | 1544 | { |
1563 | return put_user(info->default_threshold,value); | 1545 | return put_user(info->default_threshold, value); |
1564 | } | 1546 | } |
1565 | 1547 | ||
1566 | static int | 1548 | static int set_timeout(struct cyclades_port *info, unsigned long __user * arg) |
1567 | set_timeout(struct cyclades_port * info, unsigned long __user *arg) | ||
1568 | { | 1549 | { |
1569 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1550 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1570 | int channel; | 1551 | int channel; |
1571 | unsigned long value; | 1552 | unsigned long value; |
1572 | 1553 | ||
1573 | if (get_user(value, arg)) | 1554 | if (get_user(value, arg)) |
1574 | return -EFAULT; | 1555 | return -EFAULT; |
1575 | 1556 | ||
1576 | channel = info->line; | 1557 | channel = info->line; |
1577 | 1558 | ||
1578 | base_addr[CyRTPRL] = value & 0xff; | 1559 | base_addr[CyRTPRL] = value & 0xff; |
1579 | base_addr[CyRTPRH] = (value >> 8) & 0xff; | 1560 | base_addr[CyRTPRH] = (value >> 8) & 0xff; |
1580 | return 0; | 1561 | return 0; |
1581 | } | 1562 | } |
1582 | 1563 | ||
1583 | static int | 1564 | static int get_timeout(struct cyclades_port *info, unsigned long __user * value) |
1584 | get_timeout(struct cyclades_port * info, unsigned long __user *value) | ||
1585 | { | 1565 | { |
1586 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 1566 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
1587 | int channel; | 1567 | int channel; |
1588 | unsigned long tmp; | 1568 | unsigned long tmp; |
1589 | 1569 | ||
1590 | channel = info->line; | 1570 | channel = info->line; |
1591 | 1571 | ||
1592 | tmp = base_addr[CyRTPRL]; | 1572 | tmp = base_addr[CyRTPRL]; |
1593 | return put_user(tmp,value); | 1573 | return put_user(tmp, value); |
1594 | } | 1574 | } |
1595 | 1575 | ||
1596 | static int | 1576 | static int set_default_timeout(struct cyclades_port *info, unsigned long value) |
1597 | set_default_timeout(struct cyclades_port * info, unsigned long value) | ||
1598 | { | 1577 | { |
1599 | info->default_timeout = value & 0xff; | 1578 | info->default_timeout = value & 0xff; |
1600 | return 0; | 1579 | return 0; |
1601 | } | 1580 | } |
1602 | 1581 | ||
1603 | static int | 1582 | static int |
1604 | get_default_timeout(struct cyclades_port * info, unsigned long __user *value) | 1583 | get_default_timeout(struct cyclades_port *info, unsigned long __user * value) |
1605 | { | 1584 | { |
1606 | return put_user(info->default_timeout,value); | 1585 | return put_user(info->default_timeout, value); |
1607 | } | 1586 | } |
1608 | 1587 | ||
1609 | static int | 1588 | static int |
1610 | cy_ioctl(struct tty_struct *tty, struct file * file, | 1589 | cy_ioctl(struct tty_struct *tty, struct file *file, |
1611 | unsigned int cmd, unsigned long arg) | 1590 | unsigned int cmd, unsigned long arg) |
1612 | { | 1591 | { |
1613 | unsigned long val; | 1592 | unsigned long val; |
1614 | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; | 1593 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1615 | int ret_val = 0; | 1594 | int ret_val = 0; |
1616 | void __user *argp = (void __user *)arg; | 1595 | void __user *argp = (void __user *)arg; |
1617 | 1596 | ||
1618 | #ifdef SERIAL_DEBUG_OTHER | 1597 | #ifdef SERIAL_DEBUG_OTHER |
1619 | printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */ | 1598 | printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */ |
1620 | #endif | 1599 | #endif |
1621 | 1600 | ||
1622 | switch (cmd) { | 1601 | switch (cmd) { |
1623 | case CYGETMON: | 1602 | case CYGETMON: |
1624 | ret_val = get_mon_info(info, argp); | 1603 | ret_val = get_mon_info(info, argp); |
1625 | break; | 1604 | break; |
1626 | case CYGETTHRESH: | 1605 | case CYGETTHRESH: |
1627 | ret_val = get_threshold(info, argp); | 1606 | ret_val = get_threshold(info, argp); |
1628 | break; | 1607 | break; |
1629 | case CYSETTHRESH: | 1608 | case CYSETTHRESH: |
1630 | ret_val = set_threshold(info, argp); | 1609 | ret_val = set_threshold(info, argp); |
1631 | break; | 1610 | break; |
1632 | case CYGETDEFTHRESH: | 1611 | case CYGETDEFTHRESH: |
1633 | ret_val = get_default_threshold(info, argp); | 1612 | ret_val = get_default_threshold(info, argp); |
1634 | break; | 1613 | break; |
1635 | case CYSETDEFTHRESH: | 1614 | case CYSETDEFTHRESH: |
1636 | ret_val = set_default_threshold(info, argp); | 1615 | ret_val = set_default_threshold(info, argp); |
1637 | break; | 1616 | break; |
1638 | case CYGETTIMEOUT: | 1617 | case CYGETTIMEOUT: |
1639 | ret_val = get_timeout(info, argp); | 1618 | ret_val = get_timeout(info, argp); |
1640 | break; | 1619 | break; |
1641 | case CYSETTIMEOUT: | 1620 | case CYSETTIMEOUT: |
1642 | ret_val = set_timeout(info, argp); | 1621 | ret_val = set_timeout(info, argp); |
1643 | break; | 1622 | break; |
1644 | case CYGETDEFTIMEOUT: | 1623 | case CYGETDEFTIMEOUT: |
1645 | ret_val = get_default_timeout(info, argp); | 1624 | ret_val = get_default_timeout(info, argp); |
1646 | break; | 1625 | break; |
1647 | case CYSETDEFTIMEOUT: | 1626 | case CYSETDEFTIMEOUT: |
1648 | ret_val = set_default_timeout(info, (unsigned long)arg); | 1627 | ret_val = set_default_timeout(info, (unsigned long)arg); |
1649 | break; | 1628 | break; |
1650 | case TCSBRK: /* SVID version: non-zero arg --> no break */ | 1629 | case TCSBRK: /* SVID version: non-zero arg --> no break */ |
1651 | ret_val = tty_check_change(tty); | 1630 | ret_val = tty_check_change(tty); |
1652 | if (ret_val) | 1631 | if (ret_val) |
1653 | break; | 1632 | break; |
1654 | tty_wait_until_sent(tty,0); | 1633 | tty_wait_until_sent(tty, 0); |
1655 | if (!arg) | 1634 | if (!arg) |
1656 | send_break(info, HZ/4); /* 1/4 second */ | 1635 | send_break(info, HZ / 4); /* 1/4 second */ |
1657 | break; | 1636 | break; |
1658 | case TCSBRKP: /* support for POSIX tcsendbreak() */ | 1637 | case TCSBRKP: /* support for POSIX tcsendbreak() */ |
1659 | ret_val = tty_check_change(tty); | 1638 | ret_val = tty_check_change(tty); |
1660 | if (ret_val) | 1639 | if (ret_val) |
1640 | break; | ||
1641 | tty_wait_until_sent(tty, 0); | ||
1642 | send_break(info, arg ? arg * (HZ / 10) : HZ / 4); | ||
1661 | break; | 1643 | break; |
1662 | tty_wait_until_sent(tty,0); | ||
1663 | send_break(info, arg ? arg*(HZ/10) : HZ/4); | ||
1664 | break; | ||
1665 | 1644 | ||
1666 | /* The following commands are incompletely implemented!!! */ | 1645 | /* The following commands are incompletely implemented!!! */ |
1667 | case TIOCGSOFTCAR: | 1646 | case TIOCGSOFTCAR: |
1668 | ret_val = put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) argp); | 1647 | ret_val = |
1669 | break; | 1648 | put_user(C_CLOCAL(tty) ? 1 : 0, |
1670 | case TIOCSSOFTCAR: | 1649 | (unsigned long __user *)argp); |
1671 | ret_val = get_user(val, (unsigned long __user *) argp); | 1650 | break; |
1672 | if (ret_val) | 1651 | case TIOCSSOFTCAR: |
1673 | break; | 1652 | ret_val = get_user(val, (unsigned long __user *)argp); |
1674 | tty->termios->c_cflag = | 1653 | if (ret_val) |
1675 | ((tty->termios->c_cflag & ~CLOCAL) | (val ? CLOCAL : 0)); | 1654 | break; |
1676 | break; | 1655 | tty->termios->c_cflag = |
1677 | case TIOCGSERIAL: | 1656 | ((tty->termios->c_cflag & ~CLOCAL) | (val ? CLOCAL : 0)); |
1678 | ret_val = get_serial_info(info, argp); | 1657 | break; |
1679 | break; | 1658 | case TIOCGSERIAL: |
1680 | case TIOCSSERIAL: | 1659 | ret_val = get_serial_info(info, argp); |
1681 | ret_val = set_serial_info(info, argp); | 1660 | break; |
1682 | break; | 1661 | case TIOCSSERIAL: |
1683 | default: | 1662 | ret_val = set_serial_info(info, argp); |
1684 | ret_val = -ENOIOCTLCMD; | 1663 | break; |
1685 | } | 1664 | default: |
1665 | ret_val = -ENOIOCTLCMD; | ||
1666 | } | ||
1686 | 1667 | ||
1687 | #ifdef SERIAL_DEBUG_OTHER | 1668 | #ifdef SERIAL_DEBUG_OTHER |
1688 | printk("cy_ioctl done\n"); | 1669 | printk("cy_ioctl done\n"); |
1689 | #endif | 1670 | #endif |
1690 | 1671 | ||
1691 | return ret_val; | 1672 | return ret_val; |
1692 | } /* cy_ioctl */ | 1673 | } /* cy_ioctl */ |
1693 | |||
1694 | 1674 | ||
1695 | 1675 | static void cy_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |
1696 | |||
1697 | static void | ||
1698 | cy_set_termios(struct tty_struct *tty, struct ktermios * old_termios) | ||
1699 | { | 1676 | { |
1700 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; | 1677 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1701 | 1678 | ||
1702 | #ifdef SERIAL_DEBUG_OTHER | 1679 | #ifdef SERIAL_DEBUG_OTHER |
1703 | printk("cy_set_termios %s\n", tty->name); | 1680 | printk("cy_set_termios %s\n", tty->name); |
1704 | #endif | 1681 | #endif |
1705 | 1682 | ||
1706 | if (tty->termios->c_cflag == old_termios->c_cflag) | 1683 | if (tty->termios->c_cflag == old_termios->c_cflag) |
1707 | return; | 1684 | return; |
1708 | config_setup(info); | 1685 | config_setup(info); |
1709 | 1686 | ||
1710 | if ((old_termios->c_cflag & CRTSCTS) && | 1687 | if ((old_termios->c_cflag & CRTSCTS) && |
1711 | !(tty->termios->c_cflag & CRTSCTS)) { | 1688 | !(tty->termios->c_cflag & CRTSCTS)) { |
1712 | tty->stopped = 0; | 1689 | tty->stopped = 0; |
1713 | cy_start(tty); | 1690 | cy_start(tty); |
1714 | } | 1691 | } |
1715 | #ifdef tytso_patch_94Nov25_1726 | 1692 | #ifdef tytso_patch_94Nov25_1726 |
1716 | if (!(old_termios->c_cflag & CLOCAL) && | 1693 | if (!(old_termios->c_cflag & CLOCAL) && |
1717 | (tty->termios->c_cflag & CLOCAL)) | 1694 | (tty->termios->c_cflag & CLOCAL)) |
1718 | wake_up_interruptible(&info->open_wait); | 1695 | wake_up_interruptible(&info->open_wait); |
1719 | #endif | 1696 | #endif |
1697 | } /* cy_set_termios */ | ||
1720 | 1698 | ||
1721 | return; | 1699 | static void cy_close(struct tty_struct *tty, struct file *filp) |
1722 | } /* cy_set_termios */ | ||
1723 | |||
1724 | |||
1725 | static void | ||
1726 | cy_close(struct tty_struct * tty, struct file * filp) | ||
1727 | { | 1700 | { |
1728 | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; | 1701 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1729 | 1702 | ||
1730 | /* CP('C'); */ | 1703 | /* CP('C'); */ |
1731 | #ifdef SERIAL_DEBUG_OTHER | 1704 | #ifdef SERIAL_DEBUG_OTHER |
1732 | printk("cy_close %s\n", tty->name); | 1705 | printk("cy_close %s\n", tty->name); |
1733 | #endif | 1706 | #endif |
1734 | 1707 | ||
1735 | if (!info | 1708 | if (!info || serial_paranoia_check(info, tty->name, "cy_close")) { |
1736 | || serial_paranoia_check(info, tty->name, "cy_close")){ | 1709 | return; |
1737 | return; | 1710 | } |
1738 | } | ||
1739 | #ifdef SERIAL_DEBUG_OPEN | 1711 | #ifdef SERIAL_DEBUG_OPEN |
1740 | printk("cy_close %s, count = %d\n", tty->name, info->count); | 1712 | printk("cy_close %s, count = %d\n", tty->name, info->count); |
1741 | #endif | 1713 | #endif |
1742 | 1714 | ||
1743 | if ((tty->count == 1) && (info->count != 1)) { | 1715 | if ((tty->count == 1) && (info->count != 1)) { |
1744 | /* | 1716 | /* |
1745 | * Uh, oh. tty->count is 1, which means that the tty | 1717 | * Uh, oh. tty->count is 1, which means that the tty |
1746 | * structure will be freed. Info->count should always | 1718 | * structure will be freed. Info->count should always |
1747 | * be one in these conditions. If it's greater than | 1719 | * be one in these conditions. If it's greater than |
1748 | * one, we've got real problems, since it means the | 1720 | * one, we've got real problems, since it means the |
1749 | * serial port won't be shutdown. | 1721 | * serial port won't be shutdown. |
1750 | */ | 1722 | */ |
1751 | printk("cy_close: bad serial port count; tty->count is 1, " | 1723 | printk("cy_close: bad serial port count; tty->count is 1, " |
1752 | "info->count is %d\n", info->count); | 1724 | "info->count is %d\n", info->count); |
1753 | info->count = 1; | 1725 | info->count = 1; |
1754 | } | 1726 | } |
1755 | #ifdef SERIAL_DEBUG_COUNT | 1727 | #ifdef SERIAL_DEBUG_COUNT |
1756 | printk("cyc: %d: decrementing count to %d\n", __LINE__, info->count - 1); | 1728 | printk("cyc: %d: decrementing count to %d\n", __LINE__, |
1729 | info->count - 1); | ||
1757 | #endif | 1730 | #endif |
1758 | if (--info->count < 0) { | 1731 | if (--info->count < 0) { |
1759 | printk("cy_close: bad serial port count for ttys%d: %d\n", | 1732 | printk("cy_close: bad serial port count for ttys%d: %d\n", |
1760 | info->line, info->count); | 1733 | info->line, info->count); |
1761 | #ifdef SERIAL_DEBUG_COUNT | 1734 | #ifdef SERIAL_DEBUG_COUNT |
1762 | printk("cyc: %d: setting count to 0\n", __LINE__); | 1735 | printk("cyc: %d: setting count to 0\n", __LINE__); |
1763 | #endif | 1736 | #endif |
1764 | info->count = 0; | 1737 | info->count = 0; |
1765 | } | ||
1766 | if (info->count) | ||
1767 | return; | ||
1768 | info->flags |= ASYNC_CLOSING; | ||
1769 | if (info->flags & ASYNC_INITIALIZED) | ||
1770 | tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ | ||
1771 | shutdown(info); | ||
1772 | if (tty->driver->flush_buffer) | ||
1773 | tty->driver->flush_buffer(tty); | ||
1774 | tty_ldisc_flush(tty); | ||
1775 | info->event = 0; | ||
1776 | info->tty = NULL; | ||
1777 | if (info->blocked_open) { | ||
1778 | if (info->close_delay) { | ||
1779 | msleep_interruptible(jiffies_to_msecs(info->close_delay)); | ||
1780 | } | 1738 | } |
1781 | wake_up_interruptible(&info->open_wait); | 1739 | if (info->count) |
1782 | } | 1740 | return; |
1783 | info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); | 1741 | info->flags |= ASYNC_CLOSING; |
1784 | wake_up_interruptible(&info->close_wait); | 1742 | if (info->flags & ASYNC_INITIALIZED) |
1743 | tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */ | ||
1744 | shutdown(info); | ||
1745 | if (tty->driver->flush_buffer) | ||
1746 | tty->driver->flush_buffer(tty); | ||
1747 | tty_ldisc_flush(tty); | ||
1748 | info->event = 0; | ||
1749 | info->tty = NULL; | ||
1750 | if (info->blocked_open) { | ||
1751 | if (info->close_delay) { | ||
1752 | msleep_interruptible(jiffies_to_msecs | ||
1753 | (info->close_delay)); | ||
1754 | } | ||
1755 | wake_up_interruptible(&info->open_wait); | ||
1756 | } | ||
1757 | info->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING); | ||
1758 | wake_up_interruptible(&info->close_wait); | ||
1785 | 1759 | ||
1786 | #ifdef SERIAL_DEBUG_OTHER | 1760 | #ifdef SERIAL_DEBUG_OTHER |
1787 | printk("cy_close done\n"); | 1761 | printk("cy_close done\n"); |
1788 | #endif | 1762 | #endif |
1789 | 1763 | } /* cy_close */ | |
1790 | return; | ||
1791 | } /* cy_close */ | ||
1792 | 1764 | ||
1793 | /* | 1765 | /* |
1794 | * cy_hangup() --- called by tty_hangup() when a hangup is signaled. | 1766 | * cy_hangup() --- called by tty_hangup() when a hangup is signaled. |
1795 | */ | 1767 | */ |
1796 | void | 1768 | void cy_hangup(struct tty_struct *tty) |
1797 | cy_hangup(struct tty_struct *tty) | ||
1798 | { | 1769 | { |
1799 | struct cyclades_port * info = (struct cyclades_port *)tty->driver_data; | 1770 | struct cyclades_port *info = (struct cyclades_port *)tty->driver_data; |
1800 | 1771 | ||
1801 | #ifdef SERIAL_DEBUG_OTHER | 1772 | #ifdef SERIAL_DEBUG_OTHER |
1802 | printk("cy_hangup %s\n", tty->name); /* */ | 1773 | printk("cy_hangup %s\n", tty->name); /* */ |
1803 | #endif | 1774 | #endif |
1804 | 1775 | ||
1805 | if (serial_paranoia_check(info, tty->name, "cy_hangup")) | 1776 | if (serial_paranoia_check(info, tty->name, "cy_hangup")) |
1806 | return; | 1777 | return; |
1807 | 1778 | ||
1808 | shutdown(info); | 1779 | shutdown(info); |
1809 | #if 0 | 1780 | #if 0 |
1810 | info->event = 0; | 1781 | info->event = 0; |
1811 | info->count = 0; | 1782 | info->count = 0; |
1812 | #ifdef SERIAL_DEBUG_COUNT | 1783 | #ifdef SERIAL_DEBUG_COUNT |
1813 | printk("cyc: %d: setting count to 0\n", __LINE__); | 1784 | printk("cyc: %d: setting count to 0\n", __LINE__); |
1814 | #endif | 1785 | #endif |
1815 | info->tty = 0; | 1786 | info->tty = 0; |
1816 | #endif | 1787 | #endif |
1817 | info->flags &= ~ASYNC_NORMAL_ACTIVE; | 1788 | info->flags &= ~ASYNC_NORMAL_ACTIVE; |
1818 | wake_up_interruptible(&info->open_wait); | 1789 | wake_up_interruptible(&info->open_wait); |
1819 | } /* cy_hangup */ | 1790 | } /* cy_hangup */ |
1820 | |||
1821 | |||
1822 | 1791 | ||
1823 | /* | 1792 | /* |
1824 | * ------------------------------------------------------------ | 1793 | * ------------------------------------------------------------ |
@@ -1827,177 +1796,180 @@ cy_hangup(struct tty_struct *tty) | |||
1827 | */ | 1796 | */ |
1828 | 1797 | ||
1829 | static int | 1798 | static int |
1830 | block_til_ready(struct tty_struct *tty, struct file * filp, | 1799 | block_til_ready(struct tty_struct *tty, struct file *filp, |
1831 | struct cyclades_port *info) | 1800 | struct cyclades_port *info) |
1832 | { | 1801 | { |
1833 | DECLARE_WAITQUEUE(wait, current); | 1802 | DECLARE_WAITQUEUE(wait, current); |
1834 | unsigned long flags; | 1803 | unsigned long flags; |
1835 | int channel; | 1804 | int channel; |
1836 | int retval; | 1805 | int retval; |
1837 | volatile u_char *base_addr = (u_char *)BASE_ADDR; | 1806 | volatile u_char *base_addr = (u_char *) BASE_ADDR; |
1838 | 1807 | ||
1839 | /* | 1808 | /* |
1840 | * If the device is in the middle of being closed, then block | 1809 | * If the device is in the middle of being closed, then block |
1841 | * until it's done, and then try again. | 1810 | * until it's done, and then try again. |
1842 | */ | 1811 | */ |
1843 | if (info->flags & ASYNC_CLOSING) { | 1812 | if (info->flags & ASYNC_CLOSING) { |
1844 | interruptible_sleep_on(&info->close_wait); | 1813 | interruptible_sleep_on(&info->close_wait); |
1845 | if (info->flags & ASYNC_HUP_NOTIFY){ | 1814 | if (info->flags & ASYNC_HUP_NOTIFY) { |
1846 | return -EAGAIN; | 1815 | return -EAGAIN; |
1847 | }else{ | 1816 | } else { |
1848 | return -ERESTARTSYS; | 1817 | return -ERESTARTSYS; |
1849 | } | 1818 | } |
1850 | } | 1819 | } |
1851 | 1820 | ||
1852 | /* | 1821 | /* |
1853 | * If non-blocking mode is set, then make the check up front | 1822 | * If non-blocking mode is set, then make the check up front |
1854 | * and then exit. | 1823 | * and then exit. |
1855 | */ | 1824 | */ |
1856 | if (filp->f_flags & O_NONBLOCK) { | 1825 | if (filp->f_flags & O_NONBLOCK) { |
1857 | info->flags |= ASYNC_NORMAL_ACTIVE; | 1826 | info->flags |= ASYNC_NORMAL_ACTIVE; |
1858 | return 0; | 1827 | return 0; |
1859 | } | 1828 | } |
1860 | 1829 | ||
1861 | /* | 1830 | /* |
1862 | * Block waiting for the carrier detect and the line to become | 1831 | * Block waiting for the carrier detect and the line to become |
1863 | * free (i.e., not in use by the callout). While we are in | 1832 | * free (i.e., not in use by the callout). While we are in |
1864 | * this loop, info->count is dropped by one, so that | 1833 | * this loop, info->count is dropped by one, so that |
1865 | * cy_close() knows when to free things. We restore it upon | 1834 | * cy_close() knows when to free things. We restore it upon |
1866 | * exit, either normal or abnormal. | 1835 | * exit, either normal or abnormal. |
1867 | */ | 1836 | */ |
1868 | retval = 0; | 1837 | retval = 0; |
1869 | add_wait_queue(&info->open_wait, &wait); | 1838 | add_wait_queue(&info->open_wait, &wait); |
1870 | #ifdef SERIAL_DEBUG_OPEN | 1839 | #ifdef SERIAL_DEBUG_OPEN |
1871 | printk("block_til_ready before block: %s, count = %d\n", | 1840 | printk("block_til_ready before block: %s, count = %d\n", |
1872 | tty->name, info->count);/**/ | 1841 | tty->name, info->count); |
1842 | /**/ | ||
1873 | #endif | 1843 | #endif |
1874 | info->count--; | 1844 | info->count--; |
1875 | #ifdef SERIAL_DEBUG_COUNT | 1845 | #ifdef SERIAL_DEBUG_COUNT |
1876 | printk("cyc: %d: decrementing count to %d\n", __LINE__, info->count); | 1846 | printk("cyc: %d: decrementing count to %d\n", __LINE__, info->count); |
1877 | #endif | 1847 | #endif |
1878 | info->blocked_open++; | 1848 | info->blocked_open++; |
1879 | 1849 | ||
1880 | channel = info->line; | 1850 | channel = info->line; |
1881 | 1851 | ||
1882 | while (1) { | 1852 | while (1) { |
1883 | local_irq_save(flags); | 1853 | local_irq_save(flags); |
1884 | base_addr[CyCAR] = (u_char)channel; | 1854 | base_addr[CyCAR] = (u_char) channel; |
1885 | base_addr[CyMSVR1] = CyRTS; | 1855 | base_addr[CyMSVR1] = CyRTS; |
1886 | /* CP('S');CP('4'); */ | 1856 | /* CP('S');CP('4'); */ |
1887 | base_addr[CyMSVR2] = CyDTR; | 1857 | base_addr[CyMSVR2] = CyDTR; |
1888 | #ifdef SERIAL_DEBUG_DTR | 1858 | #ifdef SERIAL_DEBUG_DTR |
1889 | printk("cyc: %d: raising DTR\n", __LINE__); | 1859 | printk("cyc: %d: raising DTR\n", __LINE__); |
1890 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], base_addr[CyMSVR2]); | 1860 | printk(" status: 0x%x, 0x%x\n", base_addr[CyMSVR1], |
1891 | #endif | 1861 | base_addr[CyMSVR2]); |
1892 | local_irq_restore(flags); | 1862 | #endif |
1893 | set_current_state(TASK_INTERRUPTIBLE); | 1863 | local_irq_restore(flags); |
1894 | if (tty_hung_up_p(filp) | 1864 | set_current_state(TASK_INTERRUPTIBLE); |
1895 | || !(info->flags & ASYNC_INITIALIZED) ){ | 1865 | if (tty_hung_up_p(filp) |
1896 | if (info->flags & ASYNC_HUP_NOTIFY) { | 1866 | || !(info->flags & ASYNC_INITIALIZED)) { |
1897 | retval = -EAGAIN; | 1867 | if (info->flags & ASYNC_HUP_NOTIFY) { |
1898 | }else{ | 1868 | retval = -EAGAIN; |
1899 | retval = -ERESTARTSYS; | 1869 | } else { |
1900 | } | 1870 | retval = -ERESTARTSYS; |
1901 | break; | 1871 | } |
1902 | } | 1872 | break; |
1903 | local_irq_save(flags); | 1873 | } |
1904 | base_addr[CyCAR] = (u_char)channel; | 1874 | local_irq_save(flags); |
1875 | base_addr[CyCAR] = (u_char) channel; | ||
1905 | /* CP('L');CP1(1 && C_CLOCAL(tty)); CP1(1 && (base_addr[CyMSVR1] & CyDCD) ); */ | 1876 | /* CP('L');CP1(1 && C_CLOCAL(tty)); CP1(1 && (base_addr[CyMSVR1] & CyDCD) ); */ |
1906 | if (!(info->flags & ASYNC_CLOSING) | 1877 | if (!(info->flags & ASYNC_CLOSING) |
1907 | && (C_CLOCAL(tty) | 1878 | && (C_CLOCAL(tty) |
1908 | || (base_addr[CyMSVR1] & CyDCD))) { | 1879 | || (base_addr[CyMSVR1] & CyDCD))) { |
1909 | local_irq_restore(flags); | 1880 | local_irq_restore(flags); |
1910 | break; | 1881 | break; |
1911 | } | 1882 | } |
1912 | local_irq_restore(flags); | 1883 | local_irq_restore(flags); |
1913 | if (signal_pending(current)) { | 1884 | if (signal_pending(current)) { |
1914 | retval = -ERESTARTSYS; | 1885 | retval = -ERESTARTSYS; |
1915 | break; | 1886 | break; |
1916 | } | 1887 | } |
1917 | #ifdef SERIAL_DEBUG_OPEN | 1888 | #ifdef SERIAL_DEBUG_OPEN |
1918 | printk("block_til_ready blocking: %s, count = %d\n", | 1889 | printk("block_til_ready blocking: %s, count = %d\n", |
1919 | tty->name, info->count);/**/ | 1890 | tty->name, info->count); |
1920 | #endif | 1891 | /**/ |
1921 | schedule(); | 1892 | #endif |
1922 | } | 1893 | schedule(); |
1923 | current->state = TASK_RUNNING; | 1894 | } |
1924 | remove_wait_queue(&info->open_wait, &wait); | 1895 | current->state = TASK_RUNNING; |
1925 | if (!tty_hung_up_p(filp)){ | 1896 | remove_wait_queue(&info->open_wait, &wait); |
1926 | info->count++; | 1897 | if (!tty_hung_up_p(filp)) { |
1898 | info->count++; | ||
1927 | #ifdef SERIAL_DEBUG_COUNT | 1899 | #ifdef SERIAL_DEBUG_COUNT |
1928 | printk("cyc: %d: incrementing count to %d\n", __LINE__, info->count); | 1900 | printk("cyc: %d: incrementing count to %d\n", __LINE__, |
1901 | info->count); | ||
1929 | #endif | 1902 | #endif |
1930 | } | 1903 | } |
1931 | info->blocked_open--; | 1904 | info->blocked_open--; |
1932 | #ifdef SERIAL_DEBUG_OPEN | 1905 | #ifdef SERIAL_DEBUG_OPEN |
1933 | printk("block_til_ready after blocking: %s, count = %d\n", | 1906 | printk("block_til_ready after blocking: %s, count = %d\n", |
1934 | tty->name, info->count);/**/ | 1907 | tty->name, info->count); |
1908 | /**/ | ||
1935 | #endif | 1909 | #endif |
1936 | if (retval) | 1910 | if (retval) |
1937 | return retval; | 1911 | return retval; |
1938 | info->flags |= ASYNC_NORMAL_ACTIVE; | 1912 | info->flags |= ASYNC_NORMAL_ACTIVE; |
1939 | return 0; | 1913 | return 0; |
1940 | } /* block_til_ready */ | 1914 | } /* block_til_ready */ |
1941 | 1915 | ||
1942 | /* | 1916 | /* |
1943 | * This routine is called whenever a serial port is opened. It | 1917 | * This routine is called whenever a serial port is opened. It |
1944 | * performs the serial-specific initialization for the tty structure. | 1918 | * performs the serial-specific initialization for the tty structure. |
1945 | */ | 1919 | */ |
1946 | int | 1920 | int cy_open(struct tty_struct *tty, struct file *filp) |
1947 | cy_open(struct tty_struct *tty, struct file * filp) | ||
1948 | { | 1921 | { |
1949 | struct cyclades_port *info; | 1922 | struct cyclades_port *info; |
1950 | int retval, line; | 1923 | int retval, line; |
1951 | 1924 | ||
1952 | /* CP('O'); */ | 1925 | /* CP('O'); */ |
1953 | line = tty->index; | 1926 | line = tty->index; |
1954 | if ((line < 0) || (NR_PORTS <= line)){ | 1927 | if ((line < 0) || (NR_PORTS <= line)) { |
1955 | return -ENODEV; | 1928 | return -ENODEV; |
1956 | } | 1929 | } |
1957 | info = &cy_port[line]; | 1930 | info = &cy_port[line]; |
1958 | if (info->line < 0){ | 1931 | if (info->line < 0) { |
1959 | return -ENODEV; | 1932 | return -ENODEV; |
1960 | } | 1933 | } |
1961 | #ifdef SERIAL_DEBUG_OTHER | 1934 | #ifdef SERIAL_DEBUG_OTHER |
1962 | printk("cy_open %s\n", tty->name); /* */ | 1935 | printk("cy_open %s\n", tty->name); /* */ |
1963 | #endif | 1936 | #endif |
1964 | if (serial_paranoia_check(info, tty->name, "cy_open")){ | 1937 | if (serial_paranoia_check(info, tty->name, "cy_open")) { |
1965 | return -ENODEV; | 1938 | return -ENODEV; |
1966 | } | 1939 | } |
1967 | #ifdef SERIAL_DEBUG_OPEN | 1940 | #ifdef SERIAL_DEBUG_OPEN |
1968 | printk("cy_open %s, count = %d\n", tty->name, info->count);/**/ | 1941 | printk("cy_open %s, count = %d\n", tty->name, info->count); |
1942 | /**/ | ||
1969 | #endif | 1943 | #endif |
1970 | info->count++; | 1944 | info->count++; |
1971 | #ifdef SERIAL_DEBUG_COUNT | 1945 | #ifdef SERIAL_DEBUG_COUNT |
1972 | printk("cyc: %d: incrementing count to %d\n", __LINE__, info->count); | 1946 | printk("cyc: %d: incrementing count to %d\n", __LINE__, info->count); |
1973 | #endif | 1947 | #endif |
1974 | tty->driver_data = info; | 1948 | tty->driver_data = info; |
1975 | info->tty = tty; | 1949 | info->tty = tty; |
1976 | 1950 | ||
1977 | /* | 1951 | /* |
1978 | * Start up serial port | 1952 | * Start up serial port |
1979 | */ | 1953 | */ |
1980 | retval = startup(info); | 1954 | retval = startup(info); |
1981 | if (retval){ | 1955 | if (retval) { |
1982 | return retval; | 1956 | return retval; |
1983 | } | 1957 | } |
1984 | 1958 | ||
1985 | retval = block_til_ready(tty, filp, info); | 1959 | retval = block_til_ready(tty, filp, info); |
1986 | if (retval) { | 1960 | if (retval) { |
1987 | #ifdef SERIAL_DEBUG_OPEN | 1961 | #ifdef SERIAL_DEBUG_OPEN |
1988 | printk("cy_open returning after block_til_ready with %d\n", | 1962 | printk("cy_open returning after block_til_ready with %d\n", |
1989 | retval); | 1963 | retval); |
1990 | #endif | 1964 | #endif |
1991 | return retval; | 1965 | return retval; |
1992 | } | 1966 | } |
1993 | |||
1994 | #ifdef SERIAL_DEBUG_OPEN | 1967 | #ifdef SERIAL_DEBUG_OPEN |
1995 | printk("cy_open done\n");/**/ | 1968 | printk("cy_open done\n"); |
1969 | /**/ | ||
1996 | #endif | 1970 | #endif |
1997 | return 0; | 1971 | return 0; |
1998 | } /* cy_open */ | 1972 | } /* cy_open */ |
1999 | |||
2000 | |||
2001 | 1973 | ||
2002 | /* | 1974 | /* |
2003 | * --------------------------------------------------------------------- | 1975 | * --------------------------------------------------------------------- |
@@ -2012,11 +1984,10 @@ cy_open(struct tty_struct *tty, struct file * filp) | |||
2012 | * number, and identifies which options were configured into this | 1984 | * number, and identifies which options were configured into this |
2013 | * driver. | 1985 | * driver. |
2014 | */ | 1986 | */ |
2015 | static void | 1987 | static void show_version(void) |
2016 | show_version(void) | ||
2017 | { | 1988 | { |
2018 | printk("MVME166/167 cd2401 driver\n"); | 1989 | printk("MVME166/167 cd2401 driver\n"); |
2019 | } /* show_version */ | 1990 | } /* show_version */ |
2020 | 1991 | ||
2021 | /* initialize chips on card -- return number of valid | 1992 | /* initialize chips on card -- return number of valid |
2022 | chips (which is number of ports/4) */ | 1993 | chips (which is number of ports/4) */ |
@@ -2030,10 +2001,9 @@ show_version(void) | |||
2030 | * ... I wonder what I should do if this fails ... | 2001 | * ... I wonder what I should do if this fails ... |
2031 | */ | 2002 | */ |
2032 | 2003 | ||
2033 | void | 2004 | void mvme167_serial_console_setup(int cflag) |
2034 | mvme167_serial_console_setup(int cflag) | ||
2035 | { | 2005 | { |
2036 | volatile unsigned char* base_addr = (u_char *)BASE_ADDR; | 2006 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
2037 | int ch; | 2007 | int ch; |
2038 | u_char spd; | 2008 | u_char spd; |
2039 | u_char rcor, rbpr, badspeed = 0; | 2009 | u_char rcor, rbpr, badspeed = 0; |
@@ -2062,21 +2032,21 @@ mvme167_serial_console_setup(int cflag) | |||
2062 | 2032 | ||
2063 | /* OK, we have chosen a speed, now reset and reinitialise */ | 2033 | /* OK, we have chosen a speed, now reset and reinitialise */ |
2064 | 2034 | ||
2065 | my_udelay(20000L); /* Allow time for any active o/p to complete */ | 2035 | my_udelay(20000L); /* Allow time for any active o/p to complete */ |
2066 | if(base_addr[CyCCR] != 0x00){ | 2036 | if (base_addr[CyCCR] != 0x00) { |
2067 | local_irq_restore(flags); | 2037 | local_irq_restore(flags); |
2068 | /* printk(" chip is never idle (CCR != 0)\n"); */ | 2038 | /* printk(" chip is never idle (CCR != 0)\n"); */ |
2069 | return; | 2039 | return; |
2070 | } | 2040 | } |
2071 | 2041 | ||
2072 | base_addr[CyCCR] = CyCHIP_RESET; /* Reset the chip */ | 2042 | base_addr[CyCCR] = CyCHIP_RESET; /* Reset the chip */ |
2073 | my_udelay(1000L); | 2043 | my_udelay(1000L); |
2074 | 2044 | ||
2075 | if(base_addr[CyGFRCR] == 0x00){ | 2045 | if (base_addr[CyGFRCR] == 0x00) { |
2076 | local_irq_restore(flags); | 2046 | local_irq_restore(flags); |
2077 | /* printk(" chip is not responding (GFRCR stayed 0)\n"); */ | 2047 | /* printk(" chip is not responding (GFRCR stayed 0)\n"); */ |
2078 | return; | 2048 | return; |
2079 | } | 2049 | } |
2080 | 2050 | ||
2081 | /* | 2051 | /* |
2082 | * System clock is 20Mhz, divided by 2048, so divide by 10 for a 1.0ms | 2052 | * System clock is 20Mhz, divided by 2048, so divide by 10 for a 1.0ms |
@@ -2085,9 +2055,9 @@ mvme167_serial_console_setup(int cflag) | |||
2085 | 2055 | ||
2086 | base_addr[CyTPR] = 10; | 2056 | base_addr[CyTPR] = 10; |
2087 | 2057 | ||
2088 | base_addr[CyPILR1] = 0x01; /* Interrupt level for modem change */ | 2058 | base_addr[CyPILR1] = 0x01; /* Interrupt level for modem change */ |
2089 | base_addr[CyPILR2] = 0x02; /* Interrupt level for tx ints */ | 2059 | base_addr[CyPILR2] = 0x02; /* Interrupt level for tx ints */ |
2090 | base_addr[CyPILR3] = 0x03; /* Interrupt level for rx ints */ | 2060 | base_addr[CyPILR3] = 0x03; /* Interrupt level for rx ints */ |
2091 | 2061 | ||
2092 | /* | 2062 | /* |
2093 | * Attempt to set up all channels to something reasonable, and | 2063 | * Attempt to set up all channels to something reasonable, and |
@@ -2095,11 +2065,11 @@ mvme167_serial_console_setup(int cflag) | |||
2095 | * the ammount of fiddling we have to do in normal running. | 2065 | * the ammount of fiddling we have to do in normal running. |
2096 | */ | 2066 | */ |
2097 | 2067 | ||
2098 | for (ch = 3; ch >= 0 ; ch--) { | 2068 | for (ch = 3; ch >= 0; ch--) { |
2099 | base_addr[CyCAR] = (u_char)ch; | 2069 | base_addr[CyCAR] = (u_char) ch; |
2100 | base_addr[CyIER] = 0; | 2070 | base_addr[CyIER] = 0; |
2101 | base_addr[CyCMR] = CyASYNC; | 2071 | base_addr[CyCMR] = CyASYNC; |
2102 | base_addr[CyLICR] = (u_char)ch << 2; | 2072 | base_addr[CyLICR] = (u_char) ch << 2; |
2103 | base_addr[CyLIVR] = 0x5c; | 2073 | base_addr[CyLIVR] = 0x5c; |
2104 | base_addr[CyTCOR] = baud_co[spd]; | 2074 | base_addr[CyTCOR] = baud_co[spd]; |
2105 | base_addr[CyTBPR] = baud_bpr[spd]; | 2075 | base_addr[CyTBPR] = baud_bpr[spd]; |
@@ -2118,29 +2088,30 @@ mvme167_serial_console_setup(int cflag) | |||
2118 | base_addr[CyCOR7] = 0; | 2088 | base_addr[CyCOR7] = 0; |
2119 | base_addr[CyRTPRL] = 2; | 2089 | base_addr[CyRTPRL] = 2; |
2120 | base_addr[CyRTPRH] = 0; | 2090 | base_addr[CyRTPRH] = 0; |
2121 | base_addr[CyMSVR1] = 0; | 2091 | base_addr[CyMSVR1] = 0; |
2122 | base_addr[CyMSVR2] = 0; | 2092 | base_addr[CyMSVR2] = 0; |
2123 | write_cy_cmd(base_addr,CyINIT_CHAN|CyDIS_RCVR|CyDIS_XMTR); | 2093 | write_cy_cmd(base_addr, CyINIT_CHAN | CyDIS_RCVR | CyDIS_XMTR); |
2124 | } | 2094 | } |
2125 | 2095 | ||
2126 | /* | 2096 | /* |
2127 | * Now do specials for channel zero.... | 2097 | * Now do specials for channel zero.... |
2128 | */ | 2098 | */ |
2129 | 2099 | ||
2130 | base_addr[CyMSVR1] = CyRTS; | 2100 | base_addr[CyMSVR1] = CyRTS; |
2131 | base_addr[CyMSVR2] = CyDTR; | 2101 | base_addr[CyMSVR2] = CyDTR; |
2132 | base_addr[CyIER] = CyRxData; | 2102 | base_addr[CyIER] = CyRxData; |
2133 | write_cy_cmd(base_addr,CyENB_RCVR|CyENB_XMTR); | 2103 | write_cy_cmd(base_addr, CyENB_RCVR | CyENB_XMTR); |
2134 | 2104 | ||
2135 | local_irq_restore(flags); | 2105 | local_irq_restore(flags); |
2136 | 2106 | ||
2137 | my_udelay(20000L); /* Let it all settle down */ | 2107 | my_udelay(20000L); /* Let it all settle down */ |
2138 | 2108 | ||
2139 | printk("CD2401 initialised, chip is rev 0x%02x\n", base_addr[CyGFRCR]); | 2109 | printk("CD2401 initialised, chip is rev 0x%02x\n", base_addr[CyGFRCR]); |
2140 | if (badspeed) | 2110 | if (badspeed) |
2141 | printk(" WARNING: Failed to identify line speed, rcor=%02x,rbpr=%02x\n", | 2111 | printk |
2142 | rcor >> 5, rbpr); | 2112 | (" WARNING: Failed to identify line speed, rcor=%02x,rbpr=%02x\n", |
2143 | } /* serial_console_init */ | 2113 | rcor >> 5, rbpr); |
2114 | } /* serial_console_init */ | ||
2144 | 2115 | ||
2145 | static const struct tty_operations cy_ops = { | 2116 | static const struct tty_operations cy_ops = { |
2146 | .open = cy_open, | 2117 | .open = cy_open, |
@@ -2161,6 +2132,7 @@ static const struct tty_operations cy_ops = { | |||
2161 | .tiocmget = cy_tiocmget, | 2132 | .tiocmget = cy_tiocmget, |
2162 | .tiocmset = cy_tiocmset, | 2133 | .tiocmset = cy_tiocmset, |
2163 | }; | 2134 | }; |
2135 | |||
2164 | /* The serial driver boot-time initialization code! | 2136 | /* The serial driver boot-time initialization code! |
2165 | Hardware I/O ports are mapped to character special devices on a | 2137 | Hardware I/O ports are mapped to character special devices on a |
2166 | first found, first allocated manner. That is, this code searches | 2138 | first found, first allocated manner. That is, this code searches |
@@ -2177,214 +2149,214 @@ static const struct tty_operations cy_ops = { | |||
2177 | If there are more cards with more ports than have been statically | 2149 | If there are more cards with more ports than have been statically |
2178 | allocated above, a warning is printed and the extra ports are ignored. | 2150 | allocated above, a warning is printed and the extra ports are ignored. |
2179 | */ | 2151 | */ |
2180 | static int __init | 2152 | static int __init serial167_init(void) |
2181 | serial167_init(void) | ||
2182 | { | 2153 | { |
2183 | struct cyclades_port *info; | 2154 | struct cyclades_port *info; |
2184 | int ret = 0; | 2155 | int ret = 0; |
2185 | int good_ports = 0; | 2156 | int good_ports = 0; |
2186 | int port_num = 0; | 2157 | int port_num = 0; |
2187 | int index; | 2158 | int index; |
2188 | int DefSpeed; | 2159 | int DefSpeed; |
2189 | #ifdef notyet | 2160 | #ifdef notyet |
2190 | struct sigaction sa; | 2161 | struct sigaction sa; |
2191 | #endif | 2162 | #endif |
2192 | 2163 | ||
2193 | if (!(mvme16x_config &MVME16x_CONFIG_GOT_CD2401)) | 2164 | if (!(mvme16x_config & MVME16x_CONFIG_GOT_CD2401)) |
2194 | return 0; | 2165 | return 0; |
2195 | 2166 | ||
2196 | cy_serial_driver = alloc_tty_driver(NR_PORTS); | 2167 | cy_serial_driver = alloc_tty_driver(NR_PORTS); |
2197 | if (!cy_serial_driver) | 2168 | if (!cy_serial_driver) |
2198 | return -ENOMEM; | 2169 | return -ENOMEM; |
2199 | 2170 | ||
2200 | #if 0 | 2171 | #if 0 |
2201 | scrn[1] = '\0'; | 2172 | scrn[1] = '\0'; |
2202 | #endif | 2173 | #endif |
2203 | 2174 | ||
2204 | show_version(); | 2175 | show_version(); |
2205 | 2176 | ||
2206 | /* Has "console=0,9600n8" been used in bootinfo to change speed? */ | 2177 | /* Has "console=0,9600n8" been used in bootinfo to change speed? */ |
2207 | if (serial_console_cflag) | 2178 | if (serial_console_cflag) |
2208 | DefSpeed = serial_console_cflag & 0017; | 2179 | DefSpeed = serial_console_cflag & 0017; |
2209 | else { | 2180 | else { |
2210 | DefSpeed = initial_console_speed; | 2181 | DefSpeed = initial_console_speed; |
2211 | serial_console_info = &cy_port[0]; | 2182 | serial_console_info = &cy_port[0]; |
2212 | serial_console_cflag = DefSpeed | CS8; | 2183 | serial_console_cflag = DefSpeed | CS8; |
2213 | #if 0 | 2184 | #if 0 |
2214 | serial_console = 64; /*callout_driver.minor_start*/ | 2185 | serial_console = 64; /*callout_driver.minor_start */ |
2215 | #endif | 2186 | #endif |
2216 | } | 2187 | } |
2217 | |||
2218 | /* Initialize the tty_driver structure */ | ||
2219 | |||
2220 | cy_serial_driver->owner = THIS_MODULE; | ||
2221 | cy_serial_driver->name = "ttyS"; | ||
2222 | cy_serial_driver->major = TTY_MAJOR; | ||
2223 | cy_serial_driver->minor_start = 64; | ||
2224 | cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL; | ||
2225 | cy_serial_driver->subtype = SERIAL_TYPE_NORMAL; | ||
2226 | cy_serial_driver->init_termios = tty_std_termios; | ||
2227 | cy_serial_driver->init_termios.c_cflag = | ||
2228 | B9600 | CS8 | CREAD | HUPCL | CLOCAL; | ||
2229 | cy_serial_driver->flags = TTY_DRIVER_REAL_RAW; | ||
2230 | tty_set_operations(cy_serial_driver, &cy_ops); | ||
2231 | 2188 | ||
2232 | ret = tty_register_driver(cy_serial_driver); | 2189 | /* Initialize the tty_driver structure */ |
2233 | if (ret) { | ||
2234 | printk(KERN_ERR "Couldn't register MVME166/7 serial driver\n"); | ||
2235 | put_tty_driver(cy_serial_driver); | ||
2236 | return ret; | ||
2237 | } | ||
2238 | 2190 | ||
2239 | port_num = 0; | 2191 | cy_serial_driver->owner = THIS_MODULE; |
2240 | info = cy_port; | 2192 | cy_serial_driver->name = "ttyS"; |
2241 | for (index = 0; index < 1; index++) { | 2193 | cy_serial_driver->major = TTY_MAJOR; |
2194 | cy_serial_driver->minor_start = 64; | ||
2195 | cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL; | ||
2196 | cy_serial_driver->subtype = SERIAL_TYPE_NORMAL; | ||
2197 | cy_serial_driver->init_termios = tty_std_termios; | ||
2198 | cy_serial_driver->init_termios.c_cflag = | ||
2199 | B9600 | CS8 | CREAD | HUPCL | CLOCAL; | ||
2200 | cy_serial_driver->flags = TTY_DRIVER_REAL_RAW; | ||
2201 | tty_set_operations(cy_serial_driver, &cy_ops); | ||
2202 | |||
2203 | ret = tty_register_driver(cy_serial_driver); | ||
2204 | if (ret) { | ||
2205 | printk(KERN_ERR "Couldn't register MVME166/7 serial driver\n"); | ||
2206 | put_tty_driver(cy_serial_driver); | ||
2207 | return ret; | ||
2208 | } | ||
2242 | 2209 | ||
2243 | good_ports = 4; | 2210 | port_num = 0; |
2211 | info = cy_port; | ||
2212 | for (index = 0; index < 1; index++) { | ||
2244 | 2213 | ||
2245 | if(port_num < NR_PORTS){ | 2214 | good_ports = 4; |
2246 | while( good_ports-- && port_num < NR_PORTS){ | 2215 | |
2216 | if (port_num < NR_PORTS) { | ||
2217 | while (good_ports-- && port_num < NR_PORTS) { | ||
2247 | /*** initialize port ***/ | 2218 | /*** initialize port ***/ |
2248 | info->magic = CYCLADES_MAGIC; | 2219 | info->magic = CYCLADES_MAGIC; |
2249 | info->type = PORT_CIRRUS; | 2220 | info->type = PORT_CIRRUS; |
2250 | info->card = index; | 2221 | info->card = index; |
2251 | info->line = port_num; | 2222 | info->line = port_num; |
2252 | info->flags = STD_COM_FLAGS; | 2223 | info->flags = STD_COM_FLAGS; |
2253 | info->tty = NULL; | 2224 | info->tty = NULL; |
2254 | info->xmit_fifo_size = 12; | 2225 | info->xmit_fifo_size = 12; |
2255 | info->cor1 = CyPARITY_NONE|Cy_8_BITS; | 2226 | info->cor1 = CyPARITY_NONE | Cy_8_BITS; |
2256 | info->cor2 = CyETC; | 2227 | info->cor2 = CyETC; |
2257 | info->cor3 = Cy_1_STOP; | 2228 | info->cor3 = Cy_1_STOP; |
2258 | info->cor4 = 0x08; /* _very_ small receive threshold */ | 2229 | info->cor4 = 0x08; /* _very_ small receive threshold */ |
2259 | info->cor5 = 0; | 2230 | info->cor5 = 0; |
2260 | info->cor6 = 0; | 2231 | info->cor6 = 0; |
2261 | info->cor7 = 0; | 2232 | info->cor7 = 0; |
2262 | info->tbpr = baud_bpr[DefSpeed]; /* Tx BPR */ | 2233 | info->tbpr = baud_bpr[DefSpeed]; /* Tx BPR */ |
2263 | info->tco = baud_co[DefSpeed]; /* Tx CO */ | 2234 | info->tco = baud_co[DefSpeed]; /* Tx CO */ |
2264 | info->rbpr = baud_bpr[DefSpeed]; /* Rx BPR */ | 2235 | info->rbpr = baud_bpr[DefSpeed]; /* Rx BPR */ |
2265 | info->rco = baud_co[DefSpeed] >> 5; /* Rx CO */ | 2236 | info->rco = baud_co[DefSpeed] >> 5; /* Rx CO */ |
2266 | info->close_delay = 0; | 2237 | info->close_delay = 0; |
2267 | info->x_char = 0; | 2238 | info->x_char = 0; |
2268 | info->event = 0; | 2239 | info->event = 0; |
2269 | info->count = 0; | 2240 | info->count = 0; |
2270 | #ifdef SERIAL_DEBUG_COUNT | 2241 | #ifdef SERIAL_DEBUG_COUNT |
2271 | printk("cyc: %d: setting count to 0\n", __LINE__); | 2242 | printk("cyc: %d: setting count to 0\n", |
2272 | #endif | 2243 | __LINE__); |
2273 | info->blocked_open = 0; | 2244 | #endif |
2274 | info->default_threshold = 0; | 2245 | info->blocked_open = 0; |
2275 | info->default_timeout = 0; | 2246 | info->default_threshold = 0; |
2276 | INIT_WORK(&info->tqueue, do_softint); | 2247 | info->default_timeout = 0; |
2277 | init_waitqueue_head(&info->open_wait); | 2248 | INIT_WORK(&info->tqueue, do_softint); |
2278 | init_waitqueue_head(&info->close_wait); | 2249 | init_waitqueue_head(&info->open_wait); |
2279 | /* info->session */ | 2250 | init_waitqueue_head(&info->close_wait); |
2280 | /* info->pgrp */ | 2251 | /* info->session */ |
2252 | /* info->pgrp */ | ||
2281 | /*** !!!!!!!! this may expose new bugs !!!!!!!!! *********/ | 2253 | /*** !!!!!!!! this may expose new bugs !!!!!!!!! *********/ |
2282 | info->read_status_mask = CyTIMEOUT| CySPECHAR| CyBREAK | 2254 | info->read_status_mask = |
2283 | | CyPARITY| CyFRAME| CyOVERRUN; | 2255 | CyTIMEOUT | CySPECHAR | CyBREAK | CyPARITY | |
2284 | /* info->timeout */ | 2256 | CyFRAME | CyOVERRUN; |
2285 | 2257 | /* info->timeout */ | |
2286 | printk("ttyS%d ", info->line); | 2258 | |
2287 | port_num++;info++; | 2259 | printk("ttyS%d ", info->line); |
2288 | if(!(port_num & 7)){ | 2260 | port_num++; |
2289 | printk("\n "); | 2261 | info++; |
2262 | if (!(port_num & 7)) { | ||
2263 | printk("\n "); | ||
2264 | } | ||
2265 | } | ||
2290 | } | 2266 | } |
2291 | } | 2267 | printk("\n"); |
2292 | } | 2268 | } |
2293 | printk("\n"); | 2269 | while (port_num < NR_PORTS) { |
2294 | } | 2270 | info->line = -1; |
2295 | while( port_num < NR_PORTS){ | 2271 | port_num++; |
2296 | info->line = -1; | 2272 | info++; |
2297 | port_num++;info++; | 2273 | } |
2298 | } | ||
2299 | #ifdef CONFIG_REMOTE_DEBUG | 2274 | #ifdef CONFIG_REMOTE_DEBUG |
2300 | debug_setup(); | 2275 | debug_setup(); |
2301 | #endif | 2276 | #endif |
2302 | ret = request_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt, 0, | 2277 | ret = request_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt, 0, |
2303 | "cd2401_errors", cd2401_rxerr_interrupt); | 2278 | "cd2401_errors", cd2401_rxerr_interrupt); |
2304 | if (ret) { | 2279 | if (ret) { |
2305 | printk(KERN_ERR "Could't get cd2401_errors IRQ"); | 2280 | printk(KERN_ERR "Could't get cd2401_errors IRQ"); |
2306 | goto cleanup_serial_driver; | 2281 | goto cleanup_serial_driver; |
2307 | } | 2282 | } |
2308 | 2283 | ||
2309 | ret = request_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt, 0, | 2284 | ret = request_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt, 0, |
2310 | "cd2401_modem", cd2401_modem_interrupt); | 2285 | "cd2401_modem", cd2401_modem_interrupt); |
2311 | if (ret) { | 2286 | if (ret) { |
2312 | printk(KERN_ERR "Could't get cd2401_modem IRQ"); | 2287 | printk(KERN_ERR "Could't get cd2401_modem IRQ"); |
2313 | goto cleanup_irq_cd2401_errors; | 2288 | goto cleanup_irq_cd2401_errors; |
2314 | } | 2289 | } |
2315 | 2290 | ||
2316 | ret = request_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt, 0, | 2291 | ret = request_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt, 0, |
2317 | "cd2401_txints", cd2401_tx_interrupt); | 2292 | "cd2401_txints", cd2401_tx_interrupt); |
2318 | if (ret) { | 2293 | if (ret) { |
2319 | printk(KERN_ERR "Could't get cd2401_txints IRQ"); | 2294 | printk(KERN_ERR "Could't get cd2401_txints IRQ"); |
2320 | goto cleanup_irq_cd2401_modem; | 2295 | goto cleanup_irq_cd2401_modem; |
2321 | } | 2296 | } |
2322 | 2297 | ||
2323 | ret = request_irq(MVME167_IRQ_SER_RX, cd2401_rx_interrupt, 0, | 2298 | ret = request_irq(MVME167_IRQ_SER_RX, cd2401_rx_interrupt, 0, |
2324 | "cd2401_rxints", cd2401_rx_interrupt); | 2299 | "cd2401_rxints", cd2401_rx_interrupt); |
2325 | if (ret) { | 2300 | if (ret) { |
2326 | printk(KERN_ERR "Could't get cd2401_rxints IRQ"); | 2301 | printk(KERN_ERR "Could't get cd2401_rxints IRQ"); |
2327 | goto cleanup_irq_cd2401_txints; | 2302 | goto cleanup_irq_cd2401_txints; |
2328 | } | 2303 | } |
2329 | 2304 | ||
2330 | /* Now we have registered the interrupt handlers, allow the interrupts */ | 2305 | /* Now we have registered the interrupt handlers, allow the interrupts */ |
2331 | 2306 | ||
2332 | pcc2chip[PccSCCMICR] = 0x15; /* Serial ints are level 5 */ | 2307 | pcc2chip[PccSCCMICR] = 0x15; /* Serial ints are level 5 */ |
2333 | pcc2chip[PccSCCTICR] = 0x15; | 2308 | pcc2chip[PccSCCTICR] = 0x15; |
2334 | pcc2chip[PccSCCRICR] = 0x15; | 2309 | pcc2chip[PccSCCRICR] = 0x15; |
2335 | 2310 | ||
2336 | pcc2chip[PccIMLR] = 3; /* Allow PCC2 ints above 3!? */ | 2311 | pcc2chip[PccIMLR] = 3; /* Allow PCC2 ints above 3!? */ |
2337 | 2312 | ||
2338 | return 0; | 2313 | return 0; |
2339 | cleanup_irq_cd2401_txints: | 2314 | cleanup_irq_cd2401_txints: |
2340 | free_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt); | 2315 | free_irq(MVME167_IRQ_SER_TX, cd2401_tx_interrupt); |
2341 | cleanup_irq_cd2401_modem: | 2316 | cleanup_irq_cd2401_modem: |
2342 | free_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt); | 2317 | free_irq(MVME167_IRQ_SER_MODEM, cd2401_modem_interrupt); |
2343 | cleanup_irq_cd2401_errors: | 2318 | cleanup_irq_cd2401_errors: |
2344 | free_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt); | 2319 | free_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt); |
2345 | cleanup_serial_driver: | 2320 | cleanup_serial_driver: |
2346 | if (tty_unregister_driver(cy_serial_driver)) | 2321 | if (tty_unregister_driver(cy_serial_driver)) |
2347 | printk(KERN_ERR "Couldn't unregister MVME166/7 serial driver\n"); | 2322 | printk(KERN_ERR |
2348 | put_tty_driver(cy_serial_driver); | 2323 | "Couldn't unregister MVME166/7 serial driver\n"); |
2349 | return ret; | 2324 | put_tty_driver(cy_serial_driver); |
2350 | } /* serial167_init */ | 2325 | return ret; |
2326 | } /* serial167_init */ | ||
2351 | 2327 | ||
2352 | module_init(serial167_init); | 2328 | module_init(serial167_init); |
2353 | 2329 | ||
2354 | |||
2355 | #ifdef CYCLOM_SHOW_STATUS | 2330 | #ifdef CYCLOM_SHOW_STATUS |
2356 | static void | 2331 | static void show_status(int line_num) |
2357 | show_status(int line_num) | ||
2358 | { | 2332 | { |
2359 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 2333 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
2360 | int channel; | 2334 | int channel; |
2361 | struct cyclades_port * info; | 2335 | struct cyclades_port *info; |
2362 | unsigned long flags; | 2336 | unsigned long flags; |
2363 | 2337 | ||
2364 | info = &cy_port[line_num]; | 2338 | info = &cy_port[line_num]; |
2365 | channel = info->line; | 2339 | channel = info->line; |
2366 | printk(" channel %d\n", channel);/**/ | 2340 | printk(" channel %d\n", channel); |
2367 | 2341 | /**/ printk(" cy_port\n"); | |
2368 | printk(" cy_port\n"); | 2342 | printk(" card line flags = %d %d %x\n", |
2369 | printk(" card line flags = %d %d %x\n", | 2343 | info->card, info->line, info->flags); |
2370 | info->card, info->line, info->flags); | 2344 | printk |
2371 | printk(" *tty read_status_mask timeout xmit_fifo_size = %lx %x %x %x\n", | 2345 | (" *tty read_status_mask timeout xmit_fifo_size = %lx %x %x %x\n", |
2372 | (long)info->tty, info->read_status_mask, | 2346 | (long)info->tty, info->read_status_mask, info->timeout, |
2373 | info->timeout, info->xmit_fifo_size); | 2347 | info->xmit_fifo_size); |
2374 | printk(" cor1,cor2,cor3,cor4,cor5,cor6,cor7 = %x %x %x %x %x %x %x\n", | 2348 | printk(" cor1,cor2,cor3,cor4,cor5,cor6,cor7 = %x %x %x %x %x %x %x\n", |
2375 | info->cor1, info->cor2, info->cor3, info->cor4, info->cor5, | 2349 | info->cor1, info->cor2, info->cor3, info->cor4, info->cor5, |
2376 | info->cor6, info->cor7); | 2350 | info->cor6, info->cor7); |
2377 | printk(" tbpr,tco,rbpr,rco = %d %d %d %d\n", | 2351 | printk(" tbpr,tco,rbpr,rco = %d %d %d %d\n", info->tbpr, info->tco, |
2378 | info->tbpr, info->tco, info->rbpr, info->rco); | 2352 | info->rbpr, info->rco); |
2379 | printk(" close_delay event count = %d %d %d\n", | 2353 | printk(" close_delay event count = %d %d %d\n", info->close_delay, |
2380 | info->close_delay, info->event, info->count); | 2354 | info->event, info->count); |
2381 | printk(" x_char blocked_open = %x %x\n", | 2355 | printk(" x_char blocked_open = %x %x\n", info->x_char, |
2382 | info->x_char, info->blocked_open); | 2356 | info->blocked_open); |
2383 | printk(" open_wait = %lx %lx %lx\n", | 2357 | printk(" open_wait = %lx %lx %lx\n", (long)info->open_wait); |
2384 | (long)info->open_wait); | 2358 | |
2385 | 2359 | local_irq_save(flags); | |
2386 | |||
2387 | local_irq_save(flags); | ||
2388 | 2360 | ||
2389 | /* Global Registers */ | 2361 | /* Global Registers */ |
2390 | 2362 | ||
@@ -2398,7 +2370,7 @@ show_status(int line_num) | |||
2398 | printk(" CyMIR %x\n", base_addr[CyMIR]); | 2370 | printk(" CyMIR %x\n", base_addr[CyMIR]); |
2399 | printk(" CyTPR %x\n", base_addr[CyTPR]); | 2371 | printk(" CyTPR %x\n", base_addr[CyTPR]); |
2400 | 2372 | ||
2401 | base_addr[CyCAR] = (u_char)channel; | 2373 | base_addr[CyCAR] = (u_char) channel; |
2402 | 2374 | ||
2403 | /* Virtual Registers */ | 2375 | /* Virtual Registers */ |
2404 | 2376 | ||
@@ -2442,11 +2414,10 @@ show_status(int line_num) | |||
2442 | printk(" CyTBPR %x\n", base_addr[CyTBPR]); | 2414 | printk(" CyTBPR %x\n", base_addr[CyTBPR]); |
2443 | printk(" CyTCOR %x\n", base_addr[CyTCOR]); | 2415 | printk(" CyTCOR %x\n", base_addr[CyTCOR]); |
2444 | 2416 | ||
2445 | local_irq_restore(flags); | 2417 | local_irq_restore(flags); |
2446 | } /* show_status */ | 2418 | } /* show_status */ |
2447 | #endif | 2419 | #endif |
2448 | 2420 | ||
2449 | |||
2450 | #if 0 | 2421 | #if 0 |
2451 | /* Dummy routine in mvme16x/config.c for now */ | 2422 | /* Dummy routine in mvme16x/config.c for now */ |
2452 | 2423 | ||
@@ -2459,61 +2430,67 @@ void console_setup(char *str, int *ints) | |||
2459 | int cflag = 0; | 2430 | int cflag = 0; |
2460 | 2431 | ||
2461 | /* Sanity check. */ | 2432 | /* Sanity check. */ |
2462 | if (ints[0] > 3 || ints[1] > 3) return; | 2433 | if (ints[0] > 3 || ints[1] > 3) |
2434 | return; | ||
2463 | 2435 | ||
2464 | /* Get baud, bits and parity */ | 2436 | /* Get baud, bits and parity */ |
2465 | baud = 2400; | 2437 | baud = 2400; |
2466 | bits = 8; | 2438 | bits = 8; |
2467 | parity = 'n'; | 2439 | parity = 'n'; |
2468 | if (ints[2]) baud = ints[2]; | 2440 | if (ints[2]) |
2441 | baud = ints[2]; | ||
2469 | if ((s = strchr(str, ','))) { | 2442 | if ((s = strchr(str, ','))) { |
2470 | do { | 2443 | do { |
2471 | s++; | 2444 | s++; |
2472 | } while(*s >= '0' && *s <= '9'); | 2445 | } while (*s >= '0' && *s <= '9'); |
2473 | if (*s) parity = *s++; | 2446 | if (*s) |
2474 | if (*s) bits = *s - '0'; | 2447 | parity = *s++; |
2448 | if (*s) | ||
2449 | bits = *s - '0'; | ||
2475 | } | 2450 | } |
2476 | 2451 | ||
2477 | /* Now construct a cflag setting. */ | 2452 | /* Now construct a cflag setting. */ |
2478 | switch(baud) { | 2453 | switch (baud) { |
2479 | case 1200: | 2454 | case 1200: |
2480 | cflag |= B1200; | 2455 | cflag |= B1200; |
2481 | break; | 2456 | break; |
2482 | case 9600: | 2457 | case 9600: |
2483 | cflag |= B9600; | 2458 | cflag |= B9600; |
2484 | break; | 2459 | break; |
2485 | case 19200: | 2460 | case 19200: |
2486 | cflag |= B19200; | 2461 | cflag |= B19200; |
2487 | break; | 2462 | break; |
2488 | case 38400: | 2463 | case 38400: |
2489 | cflag |= B38400; | 2464 | cflag |= B38400; |
2490 | break; | 2465 | break; |
2491 | case 2400: | 2466 | case 2400: |
2492 | default: | 2467 | default: |
2493 | cflag |= B2400; | 2468 | cflag |= B2400; |
2494 | break; | 2469 | break; |
2495 | } | 2470 | } |
2496 | switch(bits) { | 2471 | switch (bits) { |
2497 | case 7: | 2472 | case 7: |
2498 | cflag |= CS7; | 2473 | cflag |= CS7; |
2499 | break; | 2474 | break; |
2500 | default: | 2475 | default: |
2501 | case 8: | 2476 | case 8: |
2502 | cflag |= CS8; | 2477 | cflag |= CS8; |
2503 | break; | 2478 | break; |
2504 | } | 2479 | } |
2505 | switch(parity) { | 2480 | switch (parity) { |
2506 | case 'o': case 'O': | 2481 | case 'o': |
2507 | cflag |= PARODD; | 2482 | case 'O': |
2508 | break; | 2483 | cflag |= PARODD; |
2509 | case 'e': case 'E': | 2484 | break; |
2510 | cflag |= PARENB; | 2485 | case 'e': |
2511 | break; | 2486 | case 'E': |
2487 | cflag |= PARENB; | ||
2488 | break; | ||
2512 | } | 2489 | } |
2513 | 2490 | ||
2514 | serial_console_info = &cy_port[ints[1]]; | 2491 | serial_console_info = &cy_port[ints[1]]; |
2515 | serial_console_cflag = cflag; | 2492 | serial_console_cflag = cflag; |
2516 | serial_console = ints[1] + 64; /*callout_driver.minor_start*/ | 2493 | serial_console = ints[1] + 64; /*callout_driver.minor_start */ |
2517 | } | 2494 | } |
2518 | #endif | 2495 | #endif |
2519 | 2496 | ||
@@ -2532,9 +2509,10 @@ void console_setup(char *str, int *ints) | |||
2532 | * The console must be locked when we get here. | 2509 | * The console must be locked when we get here. |
2533 | */ | 2510 | */ |
2534 | 2511 | ||
2535 | void serial167_console_write(struct console *co, const char *str, unsigned count) | 2512 | void serial167_console_write(struct console *co, const char *str, |
2513 | unsigned count) | ||
2536 | { | 2514 | { |
2537 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 2515 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
2538 | unsigned long flags; | 2516 | unsigned long flags; |
2539 | volatile u_char sink; | 2517 | volatile u_char sink; |
2540 | u_char ier; | 2518 | u_char ier; |
@@ -2547,7 +2525,7 @@ void serial167_console_write(struct console *co, const char *str, unsigned count | |||
2547 | /* Ensure transmitter is enabled! */ | 2525 | /* Ensure transmitter is enabled! */ |
2548 | 2526 | ||
2549 | port = 0; | 2527 | port = 0; |
2550 | base_addr[CyCAR] = (u_char)port; | 2528 | base_addr[CyCAR] = (u_char) port; |
2551 | while (base_addr[CyCCR]) | 2529 | while (base_addr[CyCCR]) |
2552 | ; | 2530 | ; |
2553 | base_addr[CyCCR] = CyENB_XMTR; | 2531 | base_addr[CyCCR] = CyENB_XMTR; |
@@ -2556,8 +2534,7 @@ void serial167_console_write(struct console *co, const char *str, unsigned count | |||
2556 | base_addr[CyIER] = CyTxMpty; | 2534 | base_addr[CyIER] = CyTxMpty; |
2557 | 2535 | ||
2558 | while (1) { | 2536 | while (1) { |
2559 | if (pcc2chip[PccSCCTICR] & 0x20) | 2537 | if (pcc2chip[PccSCCTICR] & 0x20) { |
2560 | { | ||
2561 | /* We have a Tx int. Acknowledge it */ | 2538 | /* We have a Tx int. Acknowledge it */ |
2562 | sink = pcc2chip[PccTPIACKR]; | 2539 | sink = pcc2chip[PccTPIACKR]; |
2563 | if ((base_addr[CyLICR] >> 2) == port) { | 2540 | if ((base_addr[CyLICR] >> 2) == port) { |
@@ -2571,18 +2548,15 @@ void serial167_console_write(struct console *co, const char *str, unsigned count | |||
2571 | str++; | 2548 | str++; |
2572 | i++; | 2549 | i++; |
2573 | do_lf = 0; | 2550 | do_lf = 0; |
2574 | } | 2551 | } else if (*str == '\n') { |
2575 | else if (*str == '\n') { | ||
2576 | base_addr[CyTDR] = '\r'; | 2552 | base_addr[CyTDR] = '\r'; |
2577 | do_lf = 1; | 2553 | do_lf = 1; |
2578 | } | 2554 | } else { |
2579 | else { | ||
2580 | base_addr[CyTDR] = *str++; | 2555 | base_addr[CyTDR] = *str++; |
2581 | i++; | 2556 | i++; |
2582 | } | 2557 | } |
2583 | base_addr[CyTEOIR] = 0; | 2558 | base_addr[CyTEOIR] = 0; |
2584 | } | 2559 | } else |
2585 | else | ||
2586 | base_addr[CyTEOIR] = CyNOTRANS; | 2560 | base_addr[CyTEOIR] = CyNOTRANS; |
2587 | } | 2561 | } |
2588 | } | 2562 | } |
@@ -2592,45 +2566,44 @@ void serial167_console_write(struct console *co, const char *str, unsigned count | |||
2592 | local_irq_restore(flags); | 2566 | local_irq_restore(flags); |
2593 | } | 2567 | } |
2594 | 2568 | ||
2595 | static struct tty_driver *serial167_console_device(struct console *c, int *index) | 2569 | static struct tty_driver *serial167_console_device(struct console *c, |
2570 | int *index) | ||
2596 | { | 2571 | { |
2597 | *index = c->index; | 2572 | *index = c->index; |
2598 | return cy_serial_driver; | 2573 | return cy_serial_driver; |
2599 | } | 2574 | } |
2600 | 2575 | ||
2601 | |||
2602 | static int __init serial167_console_setup(struct console *co, char *options) | 2576 | static int __init serial167_console_setup(struct console *co, char *options) |
2603 | { | 2577 | { |
2604 | return 0; | 2578 | return 0; |
2605 | } | 2579 | } |
2606 | 2580 | ||
2607 | |||
2608 | static struct console sercons = { | 2581 | static struct console sercons = { |
2609 | .name = "ttyS", | 2582 | .name = "ttyS", |
2610 | .write = serial167_console_write, | 2583 | .write = serial167_console_write, |
2611 | .device = serial167_console_device, | 2584 | .device = serial167_console_device, |
2612 | .setup = serial167_console_setup, | 2585 | .setup = serial167_console_setup, |
2613 | .flags = CON_PRINTBUFFER, | 2586 | .flags = CON_PRINTBUFFER, |
2614 | .index = -1, | 2587 | .index = -1, |
2615 | }; | 2588 | }; |
2616 | 2589 | ||
2617 | |||
2618 | static int __init serial167_console_init(void) | 2590 | static int __init serial167_console_init(void) |
2619 | { | 2591 | { |
2620 | if (vme_brdtype == VME_TYPE_MVME166 || | 2592 | if (vme_brdtype == VME_TYPE_MVME166 || |
2621 | vme_brdtype == VME_TYPE_MVME167 || | 2593 | vme_brdtype == VME_TYPE_MVME167 || |
2622 | vme_brdtype == VME_TYPE_MVME177) { | 2594 | vme_brdtype == VME_TYPE_MVME177) { |
2623 | mvme167_serial_console_setup(0); | 2595 | mvme167_serial_console_setup(0); |
2624 | register_console(&sercons); | 2596 | register_console(&sercons); |
2625 | } | 2597 | } |
2626 | return 0; | 2598 | return 0; |
2627 | } | 2599 | } |
2600 | |||
2628 | console_initcall(serial167_console_init); | 2601 | console_initcall(serial167_console_init); |
2629 | 2602 | ||
2630 | #ifdef CONFIG_REMOTE_DEBUG | 2603 | #ifdef CONFIG_REMOTE_DEBUG |
2631 | void putDebugChar (int c) | 2604 | void putDebugChar(int c) |
2632 | { | 2605 | { |
2633 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 2606 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
2634 | unsigned long flags; | 2607 | unsigned long flags; |
2635 | volatile u_char sink; | 2608 | volatile u_char sink; |
2636 | u_char ier; | 2609 | u_char ier; |
@@ -2641,7 +2614,7 @@ void putDebugChar (int c) | |||
2641 | /* Ensure transmitter is enabled! */ | 2614 | /* Ensure transmitter is enabled! */ |
2642 | 2615 | ||
2643 | port = DEBUG_PORT; | 2616 | port = DEBUG_PORT; |
2644 | base_addr[CyCAR] = (u_char)port; | 2617 | base_addr[CyCAR] = (u_char) port; |
2645 | while (base_addr[CyCCR]) | 2618 | while (base_addr[CyCCR]) |
2646 | ; | 2619 | ; |
2647 | base_addr[CyCCR] = CyENB_XMTR; | 2620 | base_addr[CyCCR] = CyENB_XMTR; |
@@ -2650,16 +2623,14 @@ void putDebugChar (int c) | |||
2650 | base_addr[CyIER] = CyTxMpty; | 2623 | base_addr[CyIER] = CyTxMpty; |
2651 | 2624 | ||
2652 | while (1) { | 2625 | while (1) { |
2653 | if (pcc2chip[PccSCCTICR] & 0x20) | 2626 | if (pcc2chip[PccSCCTICR] & 0x20) { |
2654 | { | ||
2655 | /* We have a Tx int. Acknowledge it */ | 2627 | /* We have a Tx int. Acknowledge it */ |
2656 | sink = pcc2chip[PccTPIACKR]; | 2628 | sink = pcc2chip[PccTPIACKR]; |
2657 | if ((base_addr[CyLICR] >> 2) == port) { | 2629 | if ((base_addr[CyLICR] >> 2) == port) { |
2658 | base_addr[CyTDR] = c; | 2630 | base_addr[CyTDR] = c; |
2659 | base_addr[CyTEOIR] = 0; | 2631 | base_addr[CyTEOIR] = 0; |
2660 | break; | 2632 | break; |
2661 | } | 2633 | } else |
2662 | else | ||
2663 | base_addr[CyTEOIR] = CyNOTRANS; | 2634 | base_addr[CyTEOIR] = CyNOTRANS; |
2664 | } | 2635 | } |
2665 | } | 2636 | } |
@@ -2671,7 +2642,7 @@ void putDebugChar (int c) | |||
2671 | 2642 | ||
2672 | int getDebugChar() | 2643 | int getDebugChar() |
2673 | { | 2644 | { |
2674 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 2645 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
2675 | unsigned long flags; | 2646 | unsigned long flags; |
2676 | volatile u_char sink; | 2647 | volatile u_char sink; |
2677 | u_char ier; | 2648 | u_char ier; |
@@ -2693,7 +2664,7 @@ int getDebugChar() | |||
2693 | /* Ensure receiver is enabled! */ | 2664 | /* Ensure receiver is enabled! */ |
2694 | 2665 | ||
2695 | port = DEBUG_PORT; | 2666 | port = DEBUG_PORT; |
2696 | base_addr[CyCAR] = (u_char)port; | 2667 | base_addr[CyCAR] = (u_char) port; |
2697 | #if 0 | 2668 | #if 0 |
2698 | while (base_addr[CyCCR]) | 2669 | while (base_addr[CyCCR]) |
2699 | ; | 2670 | ; |
@@ -2703,31 +2674,30 @@ int getDebugChar() | |||
2703 | base_addr[CyIER] = CyRxData; | 2674 | base_addr[CyIER] = CyRxData; |
2704 | 2675 | ||
2705 | while (1) { | 2676 | while (1) { |
2706 | if (pcc2chip[PccSCCRICR] & 0x20) | 2677 | if (pcc2chip[PccSCCRICR] & 0x20) { |
2707 | { | ||
2708 | /* We have a Rx int. Acknowledge it */ | 2678 | /* We have a Rx int. Acknowledge it */ |
2709 | sink = pcc2chip[PccRPIACKR]; | 2679 | sink = pcc2chip[PccRPIACKR]; |
2710 | if ((base_addr[CyLICR] >> 2) == port) { | 2680 | if ((base_addr[CyLICR] >> 2) == port) { |
2711 | int cnt = base_addr[CyRFOC]; | 2681 | int cnt = base_addr[CyRFOC]; |
2712 | while (cnt-- > 0) | 2682 | while (cnt-- > 0) { |
2713 | { | ||
2714 | c = base_addr[CyRDR]; | 2683 | c = base_addr[CyRDR]; |
2715 | if (c == 0) | 2684 | if (c == 0) |
2716 | printk ("!! debug char is null (cnt=%d) !!", cnt); | 2685 | printk |
2686 | ("!! debug char is null (cnt=%d) !!", | ||
2687 | cnt); | ||
2717 | else | 2688 | else |
2718 | queueDebugChar (c); | 2689 | queueDebugChar(c); |
2719 | } | 2690 | } |
2720 | base_addr[CyREOIR] = 0; | 2691 | base_addr[CyREOIR] = 0; |
2721 | i = debugiq.out; | 2692 | i = debugiq.out; |
2722 | if (i == debugiq.in) | 2693 | if (i == debugiq.in) |
2723 | panic ("Debug input queue empty!"); | 2694 | panic("Debug input queue empty!"); |
2724 | c = debugiq.buf[i]; | 2695 | c = debugiq.buf[i]; |
2725 | if (++i == DEBUG_LEN) | 2696 | if (++i == DEBUG_LEN) |
2726 | i = 0; | 2697 | i = 0; |
2727 | debugiq.out = i; | 2698 | debugiq.out = i; |
2728 | break; | 2699 | break; |
2729 | } | 2700 | } else |
2730 | else | ||
2731 | base_addr[CyREOIR] = CyNOTRANS; | 2701 | base_addr[CyREOIR] = CyNOTRANS; |
2732 | } | 2702 | } |
2733 | } | 2703 | } |
@@ -2739,7 +2709,7 @@ int getDebugChar() | |||
2739 | return (c); | 2709 | return (c); |
2740 | } | 2710 | } |
2741 | 2711 | ||
2742 | void queueDebugChar (int c) | 2712 | void queueDebugChar(int c) |
2743 | { | 2713 | { |
2744 | int i; | 2714 | int i; |
2745 | 2715 | ||
@@ -2751,73 +2721,71 @@ void queueDebugChar (int c) | |||
2751 | debugiq.in = i; | 2721 | debugiq.in = i; |
2752 | } | 2722 | } |
2753 | 2723 | ||
2754 | static void | 2724 | static void debug_setup() |
2755 | debug_setup() | ||
2756 | { | 2725 | { |
2757 | unsigned long flags; | 2726 | unsigned long flags; |
2758 | volatile unsigned char *base_addr = (u_char *)BASE_ADDR; | 2727 | volatile unsigned char *base_addr = (u_char *) BASE_ADDR; |
2759 | int i, cflag; | 2728 | int i, cflag; |
2760 | 2729 | ||
2761 | cflag = B19200; | 2730 | cflag = B19200; |
2762 | 2731 | ||
2763 | local_irq_save(flags); | 2732 | local_irq_save(flags); |
2764 | 2733 | ||
2765 | for (i = 0; i < 4; i++) | 2734 | for (i = 0; i < 4; i++) { |
2766 | { | 2735 | base_addr[CyCAR] = i; |
2767 | base_addr[CyCAR] = i; | 2736 | base_addr[CyLICR] = i << 2; |
2768 | base_addr[CyLICR] = i << 2; | 2737 | } |
2769 | } | ||
2770 | 2738 | ||
2771 | debugiq.in = debugiq.out = 0; | 2739 | debugiq.in = debugiq.out = 0; |
2772 | 2740 | ||
2773 | base_addr[CyCAR] = DEBUG_PORT; | 2741 | base_addr[CyCAR] = DEBUG_PORT; |
2774 | 2742 | ||
2775 | /* baud rate */ | 2743 | /* baud rate */ |
2776 | i = cflag & CBAUD; | 2744 | i = cflag & CBAUD; |
2777 | 2745 | ||
2778 | base_addr[CyIER] = 0; | 2746 | base_addr[CyIER] = 0; |
2779 | 2747 | ||
2780 | base_addr[CyCMR] = CyASYNC; | 2748 | base_addr[CyCMR] = CyASYNC; |
2781 | base_addr[CyLICR] = DEBUG_PORT << 2; | 2749 | base_addr[CyLICR] = DEBUG_PORT << 2; |
2782 | base_addr[CyLIVR] = 0x5c; | 2750 | base_addr[CyLIVR] = 0x5c; |
2783 | 2751 | ||
2784 | /* tx and rx baud rate */ | 2752 | /* tx and rx baud rate */ |
2785 | 2753 | ||
2786 | base_addr[CyTCOR] = baud_co[i]; | 2754 | base_addr[CyTCOR] = baud_co[i]; |
2787 | base_addr[CyTBPR] = baud_bpr[i]; | 2755 | base_addr[CyTBPR] = baud_bpr[i]; |
2788 | base_addr[CyRCOR] = baud_co[i] >> 5; | 2756 | base_addr[CyRCOR] = baud_co[i] >> 5; |
2789 | base_addr[CyRBPR] = baud_bpr[i]; | 2757 | base_addr[CyRBPR] = baud_bpr[i]; |
2790 | 2758 | ||
2791 | /* set line characteristics according configuration */ | 2759 | /* set line characteristics according configuration */ |
2792 | 2760 | ||
2793 | base_addr[CySCHR1] = 0; | 2761 | base_addr[CySCHR1] = 0; |
2794 | base_addr[CySCHR2] = 0; | 2762 | base_addr[CySCHR2] = 0; |
2795 | base_addr[CySCRL] = 0; | 2763 | base_addr[CySCRL] = 0; |
2796 | base_addr[CySCRH] = 0; | 2764 | base_addr[CySCRH] = 0; |
2797 | base_addr[CyCOR1] = Cy_8_BITS | CyPARITY_NONE; | 2765 | base_addr[CyCOR1] = Cy_8_BITS | CyPARITY_NONE; |
2798 | base_addr[CyCOR2] = 0; | 2766 | base_addr[CyCOR2] = 0; |
2799 | base_addr[CyCOR3] = Cy_1_STOP; | 2767 | base_addr[CyCOR3] = Cy_1_STOP; |
2800 | base_addr[CyCOR4] = baud_cor4[i]; | 2768 | base_addr[CyCOR4] = baud_cor4[i]; |
2801 | base_addr[CyCOR5] = 0; | 2769 | base_addr[CyCOR5] = 0; |
2802 | base_addr[CyCOR6] = 0; | 2770 | base_addr[CyCOR6] = 0; |
2803 | base_addr[CyCOR7] = 0; | 2771 | base_addr[CyCOR7] = 0; |
2804 | 2772 | ||
2805 | write_cy_cmd(base_addr,CyINIT_CHAN); | 2773 | write_cy_cmd(base_addr, CyINIT_CHAN); |
2806 | write_cy_cmd(base_addr,CyENB_RCVR); | 2774 | write_cy_cmd(base_addr, CyENB_RCVR); |
2807 | 2775 | ||
2808 | base_addr[CyCAR] = DEBUG_PORT; /* !!! Is this needed? */ | 2776 | base_addr[CyCAR] = DEBUG_PORT; /* !!! Is this needed? */ |
2809 | 2777 | ||
2810 | base_addr[CyRTPRL] = 2; | 2778 | base_addr[CyRTPRL] = 2; |
2811 | base_addr[CyRTPRH] = 0; | 2779 | base_addr[CyRTPRH] = 0; |
2812 | 2780 | ||
2813 | base_addr[CyMSVR1] = CyRTS; | 2781 | base_addr[CyMSVR1] = CyRTS; |
2814 | base_addr[CyMSVR2] = CyDTR; | 2782 | base_addr[CyMSVR2] = CyDTR; |
2815 | 2783 | ||
2816 | base_addr[CyIER] = CyRxData; | 2784 | base_addr[CyIER] = CyRxData; |
2817 | 2785 | ||
2818 | local_irq_restore(flags); | 2786 | local_irq_restore(flags); |
2819 | 2787 | ||
2820 | } /* debug_setup */ | 2788 | } /* debug_setup */ |
2821 | 2789 | ||
2822 | #endif | 2790 | #endif |
2823 | 2791 | ||
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 20946f5127e0..92043c8f2355 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -2350,10 +2350,8 @@ static void do_softint(struct work_struct *work) | |||
2350 | return; | 2350 | return; |
2351 | } | 2351 | } |
2352 | 2352 | ||
2353 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) { | 2353 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) |
2354 | tty_wakeup(tty); | 2354 | tty_wakeup(tty); |
2355 | //wake_up_interruptible(&tty->write_wait); | ||
2356 | } | ||
2357 | 2355 | ||
2358 | func_exit(); | 2356 | func_exit(); |
2359 | } | 2357 | } |
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index 3fa625db9e4b..bf76db1342c5 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -1148,10 +1148,8 @@ static void mgsl_bh_transmit(struct mgsl_struct *info) | |||
1148 | printk( "%s(%d):mgsl_bh_transmit() entry on %s\n", | 1148 | printk( "%s(%d):mgsl_bh_transmit() entry on %s\n", |
1149 | __FILE__,__LINE__,info->device_name); | 1149 | __FILE__,__LINE__,info->device_name); |
1150 | 1150 | ||
1151 | if (tty) { | 1151 | if (tty) |
1152 | tty_wakeup(tty); | 1152 | tty_wakeup(tty); |
1153 | wake_up_interruptible(&tty->write_wait); | ||
1154 | } | ||
1155 | 1153 | ||
1156 | /* if transmitter idle and loopmode_send_done_requested | 1154 | /* if transmitter idle and loopmode_send_done_requested |
1157 | * then start echoing RxD to TxD | 1155 | * then start echoing RxD to TxD |
@@ -2340,7 +2338,6 @@ static void mgsl_flush_buffer(struct tty_struct *tty) | |||
2340 | del_timer(&info->tx_timer); | 2338 | del_timer(&info->tx_timer); |
2341 | spin_unlock_irqrestore(&info->irq_spinlock,flags); | 2339 | spin_unlock_irqrestore(&info->irq_spinlock,flags); |
2342 | 2340 | ||
2343 | wake_up_interruptible(&tty->write_wait); | ||
2344 | tty_wakeup(tty); | 2341 | tty_wakeup(tty); |
2345 | } | 2342 | } |
2346 | 2343 | ||
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 792c79c315e0..54af763518fe 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -1045,7 +1045,6 @@ static void flush_buffer(struct tty_struct *tty) | |||
1045 | info->tx_count = 0; | 1045 | info->tx_count = 0; |
1046 | spin_unlock_irqrestore(&info->lock,flags); | 1046 | spin_unlock_irqrestore(&info->lock,flags); |
1047 | 1047 | ||
1048 | wake_up_interruptible(&tty->write_wait); | ||
1049 | tty_wakeup(tty); | 1048 | tty_wakeup(tty); |
1050 | } | 1049 | } |
1051 | 1050 | ||
@@ -1933,10 +1932,8 @@ static void bh_transmit(struct slgt_info *info) | |||
1933 | struct tty_struct *tty = info->tty; | 1932 | struct tty_struct *tty = info->tty; |
1934 | 1933 | ||
1935 | DBGBH(("%s bh_transmit\n", info->device_name)); | 1934 | DBGBH(("%s bh_transmit\n", info->device_name)); |
1936 | if (tty) { | 1935 | if (tty) |
1937 | tty_wakeup(tty); | 1936 | tty_wakeup(tty); |
1938 | wake_up_interruptible(&tty->write_wait); | ||
1939 | } | ||
1940 | } | 1937 | } |
1941 | 1938 | ||
1942 | static void dsr_change(struct slgt_info *info) | 1939 | static void dsr_change(struct slgt_info *info) |
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 8f4d67afe5bf..ebde4e552335 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -1258,7 +1258,6 @@ static void flush_buffer(struct tty_struct *tty) | |||
1258 | del_timer(&info->tx_timer); | 1258 | del_timer(&info->tx_timer); |
1259 | spin_unlock_irqrestore(&info->lock,flags); | 1259 | spin_unlock_irqrestore(&info->lock,flags); |
1260 | 1260 | ||
1261 | wake_up_interruptible(&tty->write_wait); | ||
1262 | tty_wakeup(tty); | 1261 | tty_wakeup(tty); |
1263 | } | 1262 | } |
1264 | 1263 | ||
@@ -2127,10 +2126,8 @@ void bh_transmit(SLMP_INFO *info) | |||
2127 | printk( "%s(%d):%s bh_transmit() entry\n", | 2126 | printk( "%s(%d):%s bh_transmit() entry\n", |
2128 | __FILE__,__LINE__,info->device_name); | 2127 | __FILE__,__LINE__,info->device_name); |
2129 | 2128 | ||
2130 | if (tty) { | 2129 | if (tty) |
2131 | tty_wakeup(tty); | 2130 | tty_wakeup(tty); |
2132 | wake_up_interruptible(&tty->write_wait); | ||
2133 | } | ||
2134 | } | 2131 | } |
2135 | 2132 | ||
2136 | void bh_status(SLMP_INFO *info) | 2133 | void bh_status(SLMP_INFO *info) |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 7fd3cd5ddf21..3757610b7835 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -88,9 +88,9 @@ static struct sysrq_key_op sysrq_loglevel_op = { | |||
88 | #ifdef CONFIG_VT | 88 | #ifdef CONFIG_VT |
89 | static void sysrq_handle_SAK(int key, struct tty_struct *tty) | 89 | static void sysrq_handle_SAK(int key, struct tty_struct *tty) |
90 | { | 90 | { |
91 | if (tty) | 91 | struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work; |
92 | do_SAK(tty); | 92 | PREPARE_WORK(SAK_work, vc_SAK); |
93 | reset_vc(vc_cons[fg_console].d); | 93 | schedule_work(SAK_work); |
94 | } | 94 | } |
95 | static struct sysrq_key_op sysrq_SAK_op = { | 95 | static struct sysrq_key_op sysrq_SAK_op = { |
96 | .handler = sysrq_handle_SAK, | 96 | .handler = sysrq_handle_SAK, |
diff --git a/drivers/char/toshiba.c b/drivers/char/toshiba.c index 07067c31c4ec..c346ec5a3dc9 100644 --- a/drivers/char/toshiba.c +++ b/drivers/char/toshiba.c | |||
@@ -68,6 +68,7 @@ | |||
68 | #include <linux/init.h> | 68 | #include <linux/init.h> |
69 | #include <linux/stat.h> | 69 | #include <linux/stat.h> |
70 | #include <linux/proc_fs.h> | 70 | #include <linux/proc_fs.h> |
71 | #include <linux/seq_file.h> | ||
71 | 72 | ||
72 | #include <linux/toshiba.h> | 73 | #include <linux/toshiba.h> |
73 | 74 | ||
@@ -298,12 +299,10 @@ static int tosh_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, | |||
298 | * Print the information for /proc/toshiba | 299 | * Print the information for /proc/toshiba |
299 | */ | 300 | */ |
300 | #ifdef CONFIG_PROC_FS | 301 | #ifdef CONFIG_PROC_FS |
301 | static int tosh_get_info(char *buffer, char **start, off_t fpos, int length) | 302 | static int proc_toshiba_show(struct seq_file *m, void *v) |
302 | { | 303 | { |
303 | char *temp; | ||
304 | int key; | 304 | int key; |
305 | 305 | ||
306 | temp = buffer; | ||
307 | key = tosh_fn_status(); | 306 | key = tosh_fn_status(); |
308 | 307 | ||
309 | /* Arguments | 308 | /* Arguments |
@@ -314,8 +313,7 @@ static int tosh_get_info(char *buffer, char **start, off_t fpos, int length) | |||
314 | 4) BIOS date (in SCI date format) | 313 | 4) BIOS date (in SCI date format) |
315 | 5) Fn Key status | 314 | 5) Fn Key status |
316 | */ | 315 | */ |
317 | 316 | seq_printf(m, "1.1 0x%04x %d.%d %d.%d 0x%04x 0x%02x\n", | |
318 | temp += sprintf(temp, "1.1 0x%04x %d.%d %d.%d 0x%04x 0x%02x\n", | ||
319 | tosh_id, | 317 | tosh_id, |
320 | (tosh_sci & 0xff00)>>8, | 318 | (tosh_sci & 0xff00)>>8, |
321 | tosh_sci & 0xff, | 319 | tosh_sci & 0xff, |
@@ -323,9 +321,21 @@ static int tosh_get_info(char *buffer, char **start, off_t fpos, int length) | |||
323 | tosh_bios & 0xff, | 321 | tosh_bios & 0xff, |
324 | tosh_date, | 322 | tosh_date, |
325 | key); | 323 | key); |
324 | return 0; | ||
325 | } | ||
326 | 326 | ||
327 | return temp-buffer; | 327 | static int proc_toshiba_open(struct inode *inode, struct file *file) |
328 | { | ||
329 | return single_open(file, proc_toshiba_show, NULL); | ||
328 | } | 330 | } |
331 | |||
332 | static const struct file_operations proc_toshiba_fops = { | ||
333 | .owner = THIS_MODULE, | ||
334 | .open = proc_toshiba_open, | ||
335 | .read = seq_read, | ||
336 | .llseek = seq_lseek, | ||
337 | .release = single_release, | ||
338 | }; | ||
329 | #endif | 339 | #endif |
330 | 340 | ||
331 | 341 | ||
@@ -508,10 +518,15 @@ static int __init toshiba_init(void) | |||
508 | return retval; | 518 | return retval; |
509 | 519 | ||
510 | #ifdef CONFIG_PROC_FS | 520 | #ifdef CONFIG_PROC_FS |
511 | /* register the proc entry */ | 521 | { |
512 | if (create_proc_info_entry("toshiba", 0, NULL, tosh_get_info) == NULL) { | 522 | struct proc_dir_entry *pde; |
513 | misc_deregister(&tosh_device); | 523 | |
514 | return -ENOMEM; | 524 | pde = create_proc_entry("toshiba", 0, NULL); |
525 | if (!pde) { | ||
526 | misc_deregister(&tosh_device); | ||
527 | return -ENOMEM; | ||
528 | } | ||
529 | pde->proc_fops = &proc_toshiba_fops; | ||
515 | } | 530 | } |
516 | #endif | 531 | #endif |
517 | 532 | ||
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 47a6eacb10bc..558ca927e32b 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -154,7 +154,7 @@ static int tty_release(struct inode *, struct file *); | |||
154 | int tty_ioctl(struct inode * inode, struct file * file, | 154 | int tty_ioctl(struct inode * inode, struct file * file, |
155 | unsigned int cmd, unsigned long arg); | 155 | unsigned int cmd, unsigned long arg); |
156 | static int tty_fasync(int fd, struct file * filp, int on); | 156 | static int tty_fasync(int fd, struct file * filp, int on); |
157 | static void release_mem(struct tty_struct *tty, int idx); | 157 | static void release_tty(struct tty_struct *tty, int idx); |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * alloc_tty_struct - allocate a tty object | 160 | * alloc_tty_struct - allocate a tty object |
@@ -1612,7 +1612,6 @@ void start_tty(struct tty_struct *tty) | |||
1612 | 1612 | ||
1613 | /* If we have a running line discipline it may need kicking */ | 1613 | /* If we have a running line discipline it may need kicking */ |
1614 | tty_wakeup(tty); | 1614 | tty_wakeup(tty); |
1615 | wake_up_interruptible(&tty->write_wait); | ||
1616 | } | 1615 | } |
1617 | 1616 | ||
1618 | EXPORT_SYMBOL(start_tty); | 1617 | EXPORT_SYMBOL(start_tty); |
@@ -2003,7 +2002,7 @@ static int init_dev(struct tty_driver *driver, int idx, | |||
2003 | 2002 | ||
2004 | /* | 2003 | /* |
2005 | * All structures have been allocated, so now we install them. | 2004 | * All structures have been allocated, so now we install them. |
2006 | * Failures after this point use release_mem to clean up, so | 2005 | * Failures after this point use release_tty to clean up, so |
2007 | * there's no need to null out the local pointers. | 2006 | * there's no need to null out the local pointers. |
2008 | */ | 2007 | */ |
2009 | if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM)) { | 2008 | if (!(driver->flags & TTY_DRIVER_DEVPTS_MEM)) { |
@@ -2024,8 +2023,8 @@ static int init_dev(struct tty_driver *driver, int idx, | |||
2024 | 2023 | ||
2025 | /* | 2024 | /* |
2026 | * Structures all installed ... call the ldisc open routines. | 2025 | * Structures all installed ... call the ldisc open routines. |
2027 | * If we fail here just call release_mem to clean up. No need | 2026 | * If we fail here just call release_tty to clean up. No need |
2028 | * to decrement the use counts, as release_mem doesn't care. | 2027 | * to decrement the use counts, as release_tty doesn't care. |
2029 | */ | 2028 | */ |
2030 | 2029 | ||
2031 | if (tty->ldisc.open) { | 2030 | if (tty->ldisc.open) { |
@@ -2095,17 +2094,17 @@ fail_no_mem: | |||
2095 | retval = -ENOMEM; | 2094 | retval = -ENOMEM; |
2096 | goto end_init; | 2095 | goto end_init; |
2097 | 2096 | ||
2098 | /* call the tty release_mem routine to clean out this slot */ | 2097 | /* call the tty release_tty routine to clean out this slot */ |
2099 | release_mem_out: | 2098 | release_mem_out: |
2100 | if (printk_ratelimit()) | 2099 | if (printk_ratelimit()) |
2101 | printk(KERN_INFO "init_dev: ldisc open failed, " | 2100 | printk(KERN_INFO "init_dev: ldisc open failed, " |
2102 | "clearing slot %d\n", idx); | 2101 | "clearing slot %d\n", idx); |
2103 | release_mem(tty, idx); | 2102 | release_tty(tty, idx); |
2104 | goto end_init; | 2103 | goto end_init; |
2105 | } | 2104 | } |
2106 | 2105 | ||
2107 | /** | 2106 | /** |
2108 | * release_mem - release tty structure memory | 2107 | * release_one_tty - release tty structure memory |
2109 | * | 2108 | * |
2110 | * Releases memory associated with a tty structure, and clears out the | 2109 | * Releases memory associated with a tty structure, and clears out the |
2111 | * driver table slots. This function is called when a device is no longer | 2110 | * driver table slots. This function is called when a device is no longer |
@@ -2117,37 +2116,14 @@ release_mem_out: | |||
2117 | * of ttys that the driver keeps. | 2116 | * of ttys that the driver keeps. |
2118 | * FIXME: should we require tty_mutex is held here ?? | 2117 | * FIXME: should we require tty_mutex is held here ?? |
2119 | */ | 2118 | */ |
2120 | 2119 | static void release_one_tty(struct tty_struct *tty, int idx) | |
2121 | static void release_mem(struct tty_struct *tty, int idx) | ||
2122 | { | 2120 | { |
2123 | struct tty_struct *o_tty; | ||
2124 | struct ktermios *tp; | ||
2125 | int devpts = tty->driver->flags & TTY_DRIVER_DEVPTS_MEM; | 2121 | int devpts = tty->driver->flags & TTY_DRIVER_DEVPTS_MEM; |
2126 | 2122 | struct ktermios *tp; | |
2127 | if ((o_tty = tty->link) != NULL) { | ||
2128 | if (!devpts) | ||
2129 | o_tty->driver->ttys[idx] = NULL; | ||
2130 | if (o_tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { | ||
2131 | tp = o_tty->termios; | ||
2132 | if (!devpts) | ||
2133 | o_tty->driver->termios[idx] = NULL; | ||
2134 | kfree(tp); | ||
2135 | |||
2136 | tp = o_tty->termios_locked; | ||
2137 | if (!devpts) | ||
2138 | o_tty->driver->termios_locked[idx] = NULL; | ||
2139 | kfree(tp); | ||
2140 | } | ||
2141 | o_tty->magic = 0; | ||
2142 | o_tty->driver->refcount--; | ||
2143 | file_list_lock(); | ||
2144 | list_del_init(&o_tty->tty_files); | ||
2145 | file_list_unlock(); | ||
2146 | free_tty_struct(o_tty); | ||
2147 | } | ||
2148 | 2123 | ||
2149 | if (!devpts) | 2124 | if (!devpts) |
2150 | tty->driver->ttys[idx] = NULL; | 2125 | tty->driver->ttys[idx] = NULL; |
2126 | |||
2151 | if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { | 2127 | if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { |
2152 | tp = tty->termios; | 2128 | tp = tty->termios; |
2153 | if (!devpts) | 2129 | if (!devpts) |
@@ -2160,15 +2136,39 @@ static void release_mem(struct tty_struct *tty, int idx) | |||
2160 | kfree(tp); | 2136 | kfree(tp); |
2161 | } | 2137 | } |
2162 | 2138 | ||
2139 | |||
2163 | tty->magic = 0; | 2140 | tty->magic = 0; |
2164 | tty->driver->refcount--; | 2141 | tty->driver->refcount--; |
2142 | |||
2165 | file_list_lock(); | 2143 | file_list_lock(); |
2166 | list_del_init(&tty->tty_files); | 2144 | list_del_init(&tty->tty_files); |
2167 | file_list_unlock(); | 2145 | file_list_unlock(); |
2168 | module_put(tty->driver->owner); | 2146 | |
2169 | free_tty_struct(tty); | 2147 | free_tty_struct(tty); |
2170 | } | 2148 | } |
2171 | 2149 | ||
2150 | /** | ||
2151 | * release_tty - release tty structure memory | ||
2152 | * | ||
2153 | * Release both @tty and a possible linked partner (think pty pair), | ||
2154 | * and decrement the refcount of the backing module. | ||
2155 | * | ||
2156 | * Locking: | ||
2157 | * tty_mutex - sometimes only | ||
2158 | * takes the file list lock internally when working on the list | ||
2159 | * of ttys that the driver keeps. | ||
2160 | * FIXME: should we require tty_mutex is held here ?? | ||
2161 | */ | ||
2162 | static void release_tty(struct tty_struct *tty, int idx) | ||
2163 | { | ||
2164 | struct tty_driver *driver = tty->driver; | ||
2165 | |||
2166 | if (tty->link) | ||
2167 | release_one_tty(tty->link, idx); | ||
2168 | release_one_tty(tty, idx); | ||
2169 | module_put(driver->owner); | ||
2170 | } | ||
2171 | |||
2172 | /* | 2172 | /* |
2173 | * Even releasing the tty structures is a tricky business.. We have | 2173 | * Even releasing the tty structures is a tricky business.. We have |
2174 | * to be very careful that the structures are all released at the | 2174 | * to be very careful that the structures are all released at the |
@@ -2436,10 +2436,10 @@ static void release_dev(struct file * filp) | |||
2436 | tty_set_termios_ldisc(o_tty,N_TTY); | 2436 | tty_set_termios_ldisc(o_tty,N_TTY); |
2437 | } | 2437 | } |
2438 | /* | 2438 | /* |
2439 | * The release_mem function takes care of the details of clearing | 2439 | * The release_tty function takes care of the details of clearing |
2440 | * the slots and preserving the termios structure. | 2440 | * the slots and preserving the termios structure. |
2441 | */ | 2441 | */ |
2442 | release_mem(tty, idx); | 2442 | release_tty(tty, idx); |
2443 | 2443 | ||
2444 | #ifdef CONFIG_UNIX98_PTYS | 2444 | #ifdef CONFIG_UNIX98_PTYS |
2445 | /* Make this pty number available for reallocation */ | 2445 | /* Make this pty number available for reallocation */ |
@@ -3324,10 +3324,8 @@ int tty_ioctl(struct inode * inode, struct file * file, | |||
3324 | * Nasty bug: do_SAK is being called in interrupt context. This can | 3324 | * Nasty bug: do_SAK is being called in interrupt context. This can |
3325 | * deadlock. We punt it up to process context. AKPM - 16Mar2001 | 3325 | * deadlock. We punt it up to process context. AKPM - 16Mar2001 |
3326 | */ | 3326 | */ |
3327 | static void __do_SAK(struct work_struct *work) | 3327 | void __do_SAK(struct tty_struct *tty) |
3328 | { | 3328 | { |
3329 | struct tty_struct *tty = | ||
3330 | container_of(work, struct tty_struct, SAK_work); | ||
3331 | #ifdef TTY_SOFT_SAK | 3329 | #ifdef TTY_SOFT_SAK |
3332 | tty_hangup(tty); | 3330 | tty_hangup(tty); |
3333 | #else | 3331 | #else |
@@ -3394,6 +3392,13 @@ static void __do_SAK(struct work_struct *work) | |||
3394 | #endif | 3392 | #endif |
3395 | } | 3393 | } |
3396 | 3394 | ||
3395 | static void do_SAK_work(struct work_struct *work) | ||
3396 | { | ||
3397 | struct tty_struct *tty = | ||
3398 | container_of(work, struct tty_struct, SAK_work); | ||
3399 | __do_SAK(tty); | ||
3400 | } | ||
3401 | |||
3397 | /* | 3402 | /* |
3398 | * The tq handling here is a little racy - tty->SAK_work may already be queued. | 3403 | * The tq handling here is a little racy - tty->SAK_work may already be queued. |
3399 | * Fortunately we don't need to worry, because if ->SAK_work is already queued, | 3404 | * Fortunately we don't need to worry, because if ->SAK_work is already queued, |
@@ -3404,7 +3409,7 @@ void do_SAK(struct tty_struct *tty) | |||
3404 | { | 3409 | { |
3405 | if (!tty) | 3410 | if (!tty) |
3406 | return; | 3411 | return; |
3407 | PREPARE_WORK(&tty->SAK_work, __do_SAK); | 3412 | PREPARE_WORK(&tty->SAK_work, do_SAK_work); |
3408 | schedule_work(&tty->SAK_work); | 3413 | schedule_work(&tty->SAK_work); |
3409 | } | 3414 | } |
3410 | 3415 | ||
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index dee47f40c6a3..fd471cb3338f 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c | |||
@@ -225,7 +225,7 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate); | |||
225 | 225 | ||
226 | /** | 226 | /** |
227 | * tty_termios_encode_baud_rate | 227 | * tty_termios_encode_baud_rate |
228 | * @termios: termios structure | 228 | * @termios: ktermios structure holding user requested state |
229 | * @ispeed: input speed | 229 | * @ispeed: input speed |
230 | * @ospeed: output speed | 230 | * @ospeed: output speed |
231 | * | 231 | * |
@@ -233,7 +233,10 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate); | |||
233 | * used as a library helper for drivers os that they can report back | 233 | * used as a library helper for drivers os that they can report back |
234 | * the actual speed selected when it differs from the speed requested | 234 | * the actual speed selected when it differs from the speed requested |
235 | * | 235 | * |
236 | * For now input and output speed must agree. | 236 | * For maximal back compatibility with legacy SYS5/POSIX *nix behaviour |
237 | * we need to carefully set the bits when the user does not get the | ||
238 | * desired speed. We allow small margins and preserve as much of possible | ||
239 | * of the input intent to keep compatiblity. | ||
237 | * | 240 | * |
238 | * Locking: Caller should hold termios lock. This is already held | 241 | * Locking: Caller should hold termios lock. This is already held |
239 | * when calling this function from the driver termios handler. | 242 | * when calling this function from the driver termios handler. |
@@ -242,32 +245,44 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate); | |||
242 | void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud) | 245 | void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud) |
243 | { | 246 | { |
244 | int i = 0; | 247 | int i = 0; |
245 | int ifound = 0, ofound = 0; | 248 | int ifound = -1, ofound = -1; |
249 | int iclose = ibaud/50, oclose = obaud/50; | ||
250 | int ibinput = 0; | ||
246 | 251 | ||
247 | termios->c_ispeed = ibaud; | 252 | termios->c_ispeed = ibaud; |
248 | termios->c_ospeed = obaud; | 253 | termios->c_ospeed = obaud; |
249 | 254 | ||
255 | /* If the user asked for a precise weird speed give a precise weird | ||
256 | answer. If they asked for a Bfoo speed they many have problems | ||
257 | digesting non-exact replies so fuzz a bit */ | ||
258 | |||
259 | if ((termios->c_cflag & CBAUD) == BOTHER) | ||
260 | oclose = 0; | ||
261 | if (((termios->c_cflag >> IBSHIFT) & CBAUD) == BOTHER) | ||
262 | iclose = 0; | ||
263 | if ((termios->c_cflag >> IBSHIFT) & CBAUD) | ||
264 | ibinput = 1; /* An input speed was specified */ | ||
265 | |||
250 | termios->c_cflag &= ~CBAUD; | 266 | termios->c_cflag &= ~CBAUD; |
251 | /* Identical speed means no input encoding (ie B0 << IBSHIFT)*/ | ||
252 | if (termios->c_ispeed == termios->c_ospeed) | ||
253 | ifound = 1; | ||
254 | 267 | ||
255 | do { | 268 | do { |
256 | if (obaud == baud_table[i]) { | 269 | if (obaud - oclose >= baud_table[i] && obaud + oclose <= baud_table[i]) { |
257 | termios->c_cflag |= baud_bits[i]; | 270 | termios->c_cflag |= baud_bits[i]; |
258 | ofound = 1; | 271 | ofound = i; |
259 | /* So that if ibaud == obaud we don't set it */ | ||
260 | continue; | ||
261 | } | 272 | } |
262 | if (ibaud == baud_table[i]) { | 273 | if (ibaud - iclose >= baud_table[i] && ibaud + iclose <= baud_table[i]) { |
263 | termios->c_cflag |= (baud_bits[i] << IBSHIFT); | 274 | /* For the case input == output don't set IBAUD bits if the user didn't do so */ |
264 | ifound = 1; | 275 | if (ofound != i || ibinput) |
276 | termios->c_cflag |= (baud_bits[i] << IBSHIFT); | ||
277 | ifound = i; | ||
265 | } | 278 | } |
266 | } | 279 | } |
267 | while(++i < n_baud_table); | 280 | while(++i < n_baud_table); |
268 | if (!ofound) | 281 | if (ofound == -1) |
269 | termios->c_cflag |= BOTHER; | 282 | termios->c_cflag |= BOTHER; |
270 | if (!ifound) | 283 | /* Set exact input bits only if the input and output differ or the |
284 | user already did */ | ||
285 | if (ifound == -1 && (ibaud != obaud || ibinput)) | ||
271 | termios->c_cflag |= (BOTHER << IBSHIFT); | 286 | termios->c_cflag |= (BOTHER << IBSHIFT); |
272 | } | 287 | } |
273 | 288 | ||
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 06c32a3e3ca4..13299b8fdbd6 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -136,9 +136,6 @@ const struct consw *conswitchp; | |||
136 | #define DEFAULT_BELL_PITCH 750 | 136 | #define DEFAULT_BELL_PITCH 750 |
137 | #define DEFAULT_BELL_DURATION (HZ/8) | 137 | #define DEFAULT_BELL_DURATION (HZ/8) |
138 | 138 | ||
139 | extern void vcs_make_sysfs(struct tty_struct *tty); | ||
140 | extern void vcs_remove_sysfs(struct tty_struct *tty); | ||
141 | |||
142 | struct vc vc_cons [MAX_NR_CONSOLES]; | 139 | struct vc vc_cons [MAX_NR_CONSOLES]; |
143 | 140 | ||
144 | #ifndef VT_SINGLE_DRIVER | 141 | #ifndef VT_SINGLE_DRIVER |
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index dc8368ebb1ac..3a5d301e783b 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -672,7 +672,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
672 | vc->vt_mode = tmp; | 672 | vc->vt_mode = tmp; |
673 | /* the frsig is ignored, so we set it to 0 */ | 673 | /* the frsig is ignored, so we set it to 0 */ |
674 | vc->vt_mode.frsig = 0; | 674 | vc->vt_mode.frsig = 0; |
675 | put_pid(xchg(&vc->vt_pid, get_pid(task_pid(current)))); | 675 | put_pid(vc->vt_pid); |
676 | vc->vt_pid = get_pid(task_pid(current)); | ||
676 | /* no switch is required -- saw@shade.msu.ru */ | 677 | /* no switch is required -- saw@shade.msu.ru */ |
677 | vc->vt_newvt = -1; | 678 | vc->vt_newvt = -1; |
678 | release_console_sem(); | 679 | release_console_sem(); |
@@ -1063,12 +1064,35 @@ void reset_vc(struct vc_data *vc) | |||
1063 | vc->vt_mode.relsig = 0; | 1064 | vc->vt_mode.relsig = 0; |
1064 | vc->vt_mode.acqsig = 0; | 1065 | vc->vt_mode.acqsig = 0; |
1065 | vc->vt_mode.frsig = 0; | 1066 | vc->vt_mode.frsig = 0; |
1066 | put_pid(xchg(&vc->vt_pid, NULL)); | 1067 | put_pid(vc->vt_pid); |
1068 | vc->vt_pid = NULL; | ||
1067 | vc->vt_newvt = -1; | 1069 | vc->vt_newvt = -1; |
1068 | if (!in_interrupt()) /* Via keyboard.c:SAK() - akpm */ | 1070 | if (!in_interrupt()) /* Via keyboard.c:SAK() - akpm */ |
1069 | reset_palette(vc); | 1071 | reset_palette(vc); |
1070 | } | 1072 | } |
1071 | 1073 | ||
1074 | void vc_SAK(struct work_struct *work) | ||
1075 | { | ||
1076 | struct vc *vc_con = | ||
1077 | container_of(work, struct vc, SAK_work); | ||
1078 | struct vc_data *vc; | ||
1079 | struct tty_struct *tty; | ||
1080 | |||
1081 | acquire_console_sem(); | ||
1082 | vc = vc_con->d; | ||
1083 | if (vc) { | ||
1084 | tty = vc->vc_tty; | ||
1085 | /* | ||
1086 | * SAK should also work in all raw modes and reset | ||
1087 | * them properly. | ||
1088 | */ | ||
1089 | if (tty) | ||
1090 | __do_SAK(tty); | ||
1091 | reset_vc(vc); | ||
1092 | } | ||
1093 | release_console_sem(); | ||
1094 | } | ||
1095 | |||
1072 | /* | 1096 | /* |
1073 | * Performs the back end of a vt switch | 1097 | * Performs the back end of a vt switch |
1074 | */ | 1098 | */ |
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c index 5c261e1f92b2..d8806e4f1829 100644 --- a/drivers/firmware/edd.c +++ b/drivers/firmware/edd.c | |||
@@ -233,6 +233,8 @@ edd_show_interface(struct edd_device *edev, char *buf) | |||
233 | 233 | ||
234 | /** | 234 | /** |
235 | * edd_show_raw_data() - copies raw data to buffer for userspace to parse | 235 | * edd_show_raw_data() - copies raw data to buffer for userspace to parse |
236 | * @edev: target edd_device | ||
237 | * @buf: output buffer | ||
236 | * | 238 | * |
237 | * Returns: number of bytes written, or -EINVAL on failure | 239 | * Returns: number of bytes written, or -EINVAL on failure |
238 | */ | 240 | */ |
@@ -634,8 +636,8 @@ static decl_subsys(edd,&ktype_edd,NULL); | |||
634 | 636 | ||
635 | /** | 637 | /** |
636 | * edd_dev_is_type() - is this EDD device a 'type' device? | 638 | * edd_dev_is_type() - is this EDD device a 'type' device? |
637 | * @edev | 639 | * @edev: target edd_device |
638 | * @type - a host bus or interface identifier string per the EDD spec | 640 | * @type: a host bus or interface identifier string per the EDD spec |
639 | * | 641 | * |
640 | * Returns 1 (TRUE) if it is a 'type' device, 0 otherwise. | 642 | * Returns 1 (TRUE) if it is a 'type' device, 0 otherwise. |
641 | */ | 643 | */ |
@@ -657,7 +659,7 @@ edd_dev_is_type(struct edd_device *edev, const char *type) | |||
657 | 659 | ||
658 | /** | 660 | /** |
659 | * edd_get_pci_dev() - finds pci_dev that matches edev | 661 | * edd_get_pci_dev() - finds pci_dev that matches edev |
660 | * @edev - edd_device | 662 | * @edev: edd_device |
661 | * | 663 | * |
662 | * Returns pci_dev if found, or NULL | 664 | * Returns pci_dev if found, or NULL |
663 | */ | 665 | */ |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index aa049dab3d95..ad49bd823ebd 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -413,7 +413,6 @@ void ide_add_proc_entries(struct proc_dir_entry *dir, ide_proc_entry_t *p, void | |||
413 | while (p->name != NULL) { | 413 | while (p->name != NULL) { |
414 | ent = create_proc_entry(p->name, p->mode, dir); | 414 | ent = create_proc_entry(p->name, p->mode, dir); |
415 | if (!ent) return; | 415 | if (!ent) return; |
416 | ent->nlink = 1; | ||
417 | ent->data = data; | 416 | ent->data = data; |
418 | ent->read_proc = p->read_proc; | 417 | ent->read_proc = p->read_proc; |
419 | ent->write_proc = p->write_proc; | 418 | ent->write_proc = p->write_proc; |
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index 9291a86ca053..6ebfa27e4e16 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c | |||
@@ -134,14 +134,13 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, | |||
134 | if (cqe >= 0xFFFFFFFF - 64 - additional_cqe) | 134 | if (cqe >= 0xFFFFFFFF - 64 - additional_cqe) |
135 | return ERR_PTR(-EINVAL); | 135 | return ERR_PTR(-EINVAL); |
136 | 136 | ||
137 | my_cq = kmem_cache_alloc(cq_cache, GFP_KERNEL); | 137 | my_cq = kmem_cache_zalloc(cq_cache, GFP_KERNEL); |
138 | if (!my_cq) { | 138 | if (!my_cq) { |
139 | ehca_err(device, "Out of memory for ehca_cq struct device=%p", | 139 | ehca_err(device, "Out of memory for ehca_cq struct device=%p", |
140 | device); | 140 | device); |
141 | return ERR_PTR(-ENOMEM); | 141 | return ERR_PTR(-ENOMEM); |
142 | } | 142 | } |
143 | 143 | ||
144 | memset(my_cq, 0, sizeof(struct ehca_cq)); | ||
145 | memset(¶m, 0, sizeof(struct ehca_alloc_cq_parms)); | 144 | memset(¶m, 0, sizeof(struct ehca_alloc_cq_parms)); |
146 | 145 | ||
147 | spin_lock_init(&my_cq->spinlock); | 146 | spin_lock_init(&my_cq->spinlock); |
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index cfb362a1029c..d22ab563633f 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -53,9 +53,8 @@ static struct ehca_mr *ehca_mr_new(void) | |||
53 | { | 53 | { |
54 | struct ehca_mr *me; | 54 | struct ehca_mr *me; |
55 | 55 | ||
56 | me = kmem_cache_alloc(mr_cache, GFP_KERNEL); | 56 | me = kmem_cache_zalloc(mr_cache, GFP_KERNEL); |
57 | if (me) { | 57 | if (me) { |
58 | memset(me, 0, sizeof(struct ehca_mr)); | ||
59 | spin_lock_init(&me->mrlock); | 58 | spin_lock_init(&me->mrlock); |
60 | } else | 59 | } else |
61 | ehca_gen_err("alloc failed"); | 60 | ehca_gen_err("alloc failed"); |
@@ -72,9 +71,8 @@ static struct ehca_mw *ehca_mw_new(void) | |||
72 | { | 71 | { |
73 | struct ehca_mw *me; | 72 | struct ehca_mw *me; |
74 | 73 | ||
75 | me = kmem_cache_alloc(mw_cache, GFP_KERNEL); | 74 | me = kmem_cache_zalloc(mw_cache, GFP_KERNEL); |
76 | if (me) { | 75 | if (me) { |
77 | memset(me, 0, sizeof(struct ehca_mw)); | ||
78 | spin_lock_init(&me->mwlock); | 76 | spin_lock_init(&me->mwlock); |
79 | } else | 77 | } else |
80 | ehca_gen_err("alloc failed"); | 78 | ehca_gen_err("alloc failed"); |
diff --git a/drivers/infiniband/hw/ehca/ehca_pd.c b/drivers/infiniband/hw/ehca/ehca_pd.c index d5345e5b3cd6..79d0591a8043 100644 --- a/drivers/infiniband/hw/ehca/ehca_pd.c +++ b/drivers/infiniband/hw/ehca/ehca_pd.c | |||
@@ -50,14 +50,13 @@ struct ib_pd *ehca_alloc_pd(struct ib_device *device, | |||
50 | { | 50 | { |
51 | struct ehca_pd *pd; | 51 | struct ehca_pd *pd; |
52 | 52 | ||
53 | pd = kmem_cache_alloc(pd_cache, GFP_KERNEL); | 53 | pd = kmem_cache_zalloc(pd_cache, GFP_KERNEL); |
54 | if (!pd) { | 54 | if (!pd) { |
55 | ehca_err(device, "device=%p context=%p out of memory", | 55 | ehca_err(device, "device=%p context=%p out of memory", |
56 | device, context); | 56 | device, context); |
57 | return ERR_PTR(-ENOMEM); | 57 | return ERR_PTR(-ENOMEM); |
58 | } | 58 | } |
59 | 59 | ||
60 | memset(pd, 0, sizeof(struct ehca_pd)); | ||
61 | pd->ownpid = current->tgid; | 60 | pd->ownpid = current->tgid; |
62 | 61 | ||
63 | /* | 62 | /* |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 95efef921f1d..df0516f24379 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -450,13 +450,12 @@ struct ib_qp *ehca_create_qp(struct ib_pd *pd, | |||
450 | if (pd->uobject && udata) | 450 | if (pd->uobject && udata) |
451 | context = pd->uobject->context; | 451 | context = pd->uobject->context; |
452 | 452 | ||
453 | my_qp = kmem_cache_alloc(qp_cache, GFP_KERNEL); | 453 | my_qp = kmem_cache_zalloc(qp_cache, GFP_KERNEL); |
454 | if (!my_qp) { | 454 | if (!my_qp) { |
455 | ehca_err(pd->device, "pd=%p not enough memory to alloc qp", pd); | 455 | ehca_err(pd->device, "pd=%p not enough memory to alloc qp", pd); |
456 | return ERR_PTR(-ENOMEM); | 456 | return ERR_PTR(-ENOMEM); |
457 | } | 457 | } |
458 | 458 | ||
459 | memset(my_qp, 0, sizeof(struct ehca_qp)); | ||
460 | memset (&parms, 0, sizeof(struct ehca_alloc_qp_parms)); | 459 | memset (&parms, 0, sizeof(struct ehca_alloc_qp_parms)); |
461 | spin_lock_init(&my_qp->spinlock_s); | 460 | spin_lock_init(&my_qp->spinlock_s); |
462 | spin_lock_init(&my_qp->spinlock_r); | 461 | spin_lock_init(&my_qp->spinlock_r); |
diff --git a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c index f68dbe6f7f04..7b7a546323cf 100644 --- a/drivers/input/gameport/ns558.c +++ b/drivers/input/gameport/ns558.c | |||
@@ -151,7 +151,6 @@ static int ns558_isa_probe(int io) | |||
151 | return -ENOMEM; | 151 | return -ENOMEM; |
152 | } | 152 | } |
153 | 153 | ||
154 | memset(ns558, 0, sizeof(struct ns558)); | ||
155 | ns558->io = io; | 154 | ns558->io = io; |
156 | ns558->size = 1 << i; | 155 | ns558->size = 1 << i; |
157 | ns558->gameport = port; | 156 | ns558->gameport = port; |
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index b5e7f9c7d74e..63e51dd6debe 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -257,10 +257,10 @@ static inline void dump_urb(enum debuglevel level, const char *tag, | |||
257 | urb->transfer_flags); | 257 | urb->transfer_flags); |
258 | gig_dbg(level, | 258 | gig_dbg(level, |
259 | " transfer_buffer=0x%08lx[%d], actual_length=%d, " | 259 | " transfer_buffer=0x%08lx[%d], actual_length=%d, " |
260 | "bandwidth=%d, setup_packet=0x%08lx,", | 260 | "setup_packet=0x%08lx,", |
261 | (unsigned long) urb->transfer_buffer, | 261 | (unsigned long) urb->transfer_buffer, |
262 | urb->transfer_buffer_length, urb->actual_length, | 262 | urb->transfer_buffer_length, urb->actual_length, |
263 | urb->bandwidth, (unsigned long) urb->setup_packet); | 263 | (unsigned long) urb->setup_packet); |
264 | gig_dbg(level, | 264 | gig_dbg(level, |
265 | " start_frame=%d, number_of_packets=%d, interval=%d, " | 265 | " start_frame=%d, number_of_packets=%d, interval=%d, " |
266 | "error_count=%d,", | 266 | "error_count=%d,", |
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 458b6462f937..f13de20947e0 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -599,19 +599,9 @@ out: | |||
599 | static void if_wake(unsigned long data) | 599 | static void if_wake(unsigned long data) |
600 | { | 600 | { |
601 | struct cardstate *cs = (struct cardstate *) data; | 601 | struct cardstate *cs = (struct cardstate *) data; |
602 | struct tty_struct *tty; | ||
603 | |||
604 | tty = cs->tty; | ||
605 | if (!tty) | ||
606 | return; | ||
607 | |||
608 | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && | ||
609 | tty->ldisc.write_wakeup) { | ||
610 | gig_dbg(DEBUG_IF, "write wakeup call"); | ||
611 | tty->ldisc.write_wakeup(tty); | ||
612 | } | ||
613 | 602 | ||
614 | wake_up_interruptible(&tty->write_wait); | 603 | if (cs->tty) |
604 | tty_wakeup(cs->tty); | ||
615 | } | 605 | } |
616 | 606 | ||
617 | /*** interface to common ***/ | 607 | /*** interface to common ***/ |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index fc80afe555b9..ea5f30d4a5a2 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -1261,7 +1261,6 @@ isdn_tty_flush_buffer(struct tty_struct *tty) | |||
1261 | } | 1261 | } |
1262 | isdn_tty_cleanup_xmit(info); | 1262 | isdn_tty_cleanup_xmit(info); |
1263 | info->xmit_count = 0; | 1263 | info->xmit_count = 0; |
1264 | wake_up_interruptible(&tty->write_wait); | ||
1265 | tty_wakeup(tty); | 1264 | tty_wakeup(tty); |
1266 | } | 1265 | } |
1267 | 1266 | ||
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 8ca75e52f637..eb6653f69ce4 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -516,7 +516,6 @@ static int __init via_pmu_dev_init(void) | |||
516 | proc_get_irqstats, NULL); | 516 | proc_get_irqstats, NULL); |
517 | proc_pmu_options = create_proc_entry("options", 0600, proc_pmu_root); | 517 | proc_pmu_options = create_proc_entry("options", 0600, proc_pmu_root); |
518 | if (proc_pmu_options) { | 518 | if (proc_pmu_options) { |
519 | proc_pmu_options->nlink = 1; | ||
520 | proc_pmu_options->read_proc = proc_read_options; | 519 | proc_pmu_options->read_proc = proc_read_options; |
521 | proc_pmu_options->write_proc = proc_write_options; | 520 | proc_pmu_options->write_proc = proc_write_options; |
522 | } | 521 | } |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 059704fbb753..5554adaa58f9 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -666,7 +666,7 @@ static void bitmap_file_put(struct bitmap *bitmap) | |||
666 | 666 | ||
667 | if (file) { | 667 | if (file) { |
668 | struct inode *inode = file->f_path.dentry->d_inode; | 668 | struct inode *inode = file->f_path.dentry->d_inode; |
669 | invalidate_inode_pages(inode->i_mapping); | 669 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
670 | fput(file); | 670 | fput(file); |
671 | } | 671 | } |
672 | } | 672 | } |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 862a984c2155..e10a9ee25fc5 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -562,7 +562,6 @@ jpg_fbuffer_alloc (struct file *file) | |||
562 | jpg_fbuffer_free(file); | 562 | jpg_fbuffer_free(file); |
563 | return -ENOBUFS; | 563 | return -ENOBUFS; |
564 | } | 564 | } |
565 | memset((void *) mem, 0, PAGE_SIZE); | ||
566 | fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem; | 565 | fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem; |
567 | fh->jpg_buffers.buffer[i].frag_tab_bus = | 566 | fh->jpg_buffers.buffer[i].frag_tab_bus = |
568 | virt_to_bus((void *) mem); | 567 | virt_to_bus((void *) mem); |
diff --git a/drivers/misc/hdpuftrs/hdpu_nexus.c b/drivers/misc/hdpuftrs/hdpu_nexus.c index ea9d5f233c83..6a51e99a8079 100644 --- a/drivers/misc/hdpuftrs/hdpu_nexus.c +++ b/drivers/misc/hdpuftrs/hdpu_nexus.c | |||
@@ -72,11 +72,9 @@ static int hdpu_nexus_probe(struct platform_device *pdev) | |||
72 | printk("Could not map slot id\n"); | 72 | printk("Could not map slot id\n"); |
73 | hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root); | 73 | hdpu_slot_id = create_proc_entry("sky_slot_id", 0666, &proc_root); |
74 | hdpu_slot_id->read_proc = hdpu_slot_id_read; | 74 | hdpu_slot_id->read_proc = hdpu_slot_id_read; |
75 | hdpu_slot_id->nlink = 1; | ||
76 | 75 | ||
77 | hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root); | 76 | hdpu_chassis_id = create_proc_entry("sky_chassis_id", 0666, &proc_root); |
78 | hdpu_chassis_id->read_proc = hdpu_chassis_id_read; | 77 | hdpu_chassis_id->read_proc = hdpu_chassis_id_read; |
79 | hdpu_chassis_id->nlink = 1; | ||
80 | return 0; | 78 | return 0; |
81 | } | 79 | } |
82 | 80 | ||
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index b995a15b7526..6a5a05d1f392 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c | |||
@@ -309,7 +309,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
309 | ret = -ENODEV; | 309 | ret = -ENODEV; |
310 | goto out_pci; | 310 | goto out_pci; |
311 | } | 311 | } |
312 | if (!request_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs), | 312 | if (!request_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs), |
313 | "ioc4_misc")) { | 313 | "ioc4_misc")) { |
314 | printk(KERN_WARNING | 314 | printk(KERN_WARNING |
315 | "%s: Unable to request IOC4 misc region " | 315 | "%s: Unable to request IOC4 misc region " |
@@ -379,7 +379,7 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
379 | return 0; | 379 | return 0; |
380 | 380 | ||
381 | out_misc_region: | 381 | out_misc_region: |
382 | release_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs)); | 382 | release_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs)); |
383 | out_pci: | 383 | out_pci: |
384 | kfree(idd); | 384 | kfree(idd); |
385 | out_idd: | 385 | out_idd: |
@@ -418,7 +418,7 @@ ioc4_remove(struct pci_dev *pdev) | |||
418 | "Device removal may be incomplete.\n", | 418 | "Device removal may be incomplete.\n", |
419 | __FUNCTION__, pci_name(idd->idd_pdev)); | 419 | __FUNCTION__, pci_name(idd->idd_pdev)); |
420 | } | 420 | } |
421 | release_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs)); | 421 | release_mem_region(idd->idd_bar0, sizeof(struct ioc4_misc_regs)); |
422 | 422 | ||
423 | /* Disable IOC4 and relinquish */ | 423 | /* Disable IOC4 and relinquish */ |
424 | pci_disable_device(pdev); | 424 | pci_disable_device(pdev); |
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 6d917a4daa9d..f9f2ce7806b0 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -278,7 +278,8 @@ static void block2mtd_free_device(struct block2mtd_dev *dev) | |||
278 | kfree(dev->mtd.name); | 278 | kfree(dev->mtd.name); |
279 | 279 | ||
280 | if (dev->blkdev) { | 280 | if (dev->blkdev) { |
281 | invalidate_inode_pages(dev->blkdev->bd_inode->i_mapping); | 281 | invalidate_mapping_pages(dev->blkdev->bd_inode->i_mapping, |
282 | 0, -1); | ||
282 | close_bdev_excl(dev->blkdev); | 283 | close_bdev_excl(dev->blkdev); |
283 | } | 284 | } |
284 | 285 | ||
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index c6de566188e4..0986f6c843e6 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -83,7 +83,7 @@ struct ppp_file { | |||
83 | int dead; /* unit/channel has been shut down */ | 83 | int dead; /* unit/channel has been shut down */ |
84 | }; | 84 | }; |
85 | 85 | ||
86 | #define PF_TO_X(pf, X) ((X *)((char *)(pf) - offsetof(X, file))) | 86 | #define PF_TO_X(pf, X) container_of(pf, X, file) |
87 | 87 | ||
88 | #define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp) | 88 | #define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp) |
89 | #define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel) | 89 | #define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel) |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 8dac2ba82bb9..9a731c101d10 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -252,7 +252,6 @@ static int __init led_create_procfs(void) | |||
252 | proc_pdc_root->owner = THIS_MODULE; | 252 | proc_pdc_root->owner = THIS_MODULE; |
253 | ent = create_proc_entry("led", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root); | 253 | ent = create_proc_entry("led", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root); |
254 | if (!ent) return -1; | 254 | if (!ent) return -1; |
255 | ent->nlink = 1; | ||
256 | ent->data = (void *)LED_NOLCD; /* LED */ | 255 | ent->data = (void *)LED_NOLCD; /* LED */ |
257 | ent->read_proc = led_proc_read; | 256 | ent->read_proc = led_proc_read; |
258 | ent->write_proc = led_proc_write; | 257 | ent->write_proc = led_proc_write; |
@@ -262,7 +261,6 @@ static int __init led_create_procfs(void) | |||
262 | { | 261 | { |
263 | ent = create_proc_entry("lcd", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root); | 262 | ent = create_proc_entry("lcd", S_IFREG|S_IRUGO|S_IWUSR, proc_pdc_root); |
264 | if (!ent) return -1; | 263 | if (!ent) return -1; |
265 | ent->nlink = 1; | ||
266 | ent->data = (void *)LED_HASLCD; /* LCD */ | 264 | ent->data = (void *)LED_HASLCD; /* LCD */ |
267 | ent->read_proc = led_proc_read; | 265 | ent->read_proc = led_proc_read; |
268 | ent->write_proc = led_proc_write; | 266 | ent->write_proc = led_proc_write; |
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h index 6b8c4cfd02a6..31a633f65547 100644 --- a/drivers/pnp/base.h +++ b/drivers/pnp/base.h | |||
@@ -1,4 +1,3 @@ | |||
1 | extern struct bus_type pnp_bus_type; | ||
2 | extern spinlock_t pnp_lock; | 1 | extern spinlock_t pnp_lock; |
3 | void *pnp_alloc(long size); | 2 | void *pnp_alloc(long size); |
4 | int pnp_interface_attach_device(struct pnp_dev *dev); | 3 | int pnp_interface_attach_device(struct pnp_dev *dev); |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index 95b79685a9d1..3c2ab8394e3f 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -530,7 +530,6 @@ pnpbios_parse_compatible_ids(unsigned char *p, unsigned char *end, struct pnp_de | |||
530 | dev_id = kzalloc(sizeof (struct pnp_id), GFP_KERNEL); | 530 | dev_id = kzalloc(sizeof (struct pnp_id), GFP_KERNEL); |
531 | if (!dev_id) | 531 | if (!dev_id) |
532 | return NULL; | 532 | return NULL; |
533 | memset(dev_id, 0, sizeof(struct pnp_id)); | ||
534 | pnpid32_to_pnpid(p[1] | p[2] << 8 | p[3] << 16 | p[4] << 24,id); | 533 | pnpid32_to_pnpid(p[1] | p[2] << 8 | p[3] << 16 | p[4] << 24,id); |
535 | memcpy(&dev_id->id, id, 7); | 534 | memcpy(&dev_id->id, id, 7); |
536 | pnp_add_id(dev_id, dev); | 535 | pnp_add_id(dev_id, dev); |
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 7bf7b2c88245..f935c1f71a58 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c | |||
@@ -326,14 +326,17 @@ static struct rio_dev *rio_setup_device(struct rio_net *net, | |||
326 | rio_mport_read_config_32(port, destid, hopcount, RIO_DST_OPS_CAR, | 326 | rio_mport_read_config_32(port, destid, hopcount, RIO_DST_OPS_CAR, |
327 | &rdev->dst_ops); | 327 | &rdev->dst_ops); |
328 | 328 | ||
329 | if (rio_device_has_destid(port, rdev->src_ops, rdev->dst_ops) | 329 | if (rio_device_has_destid(port, rdev->src_ops, rdev->dst_ops)) { |
330 | && do_enum) { | 330 | if (do_enum) { |
331 | rio_set_device_id(port, destid, hopcount, next_destid); | 331 | rio_set_device_id(port, destid, hopcount, next_destid); |
332 | rdev->destid = next_destid++; | 332 | rdev->destid = next_destid++; |
333 | if (next_destid == port->host_deviceid) | 333 | if (next_destid == port->host_deviceid) |
334 | next_destid++; | 334 | next_destid++; |
335 | } else | ||
336 | rdev->destid = rio_get_device_id(port, destid, hopcount); | ||
335 | } else | 337 | } else |
336 | rdev->destid = rio_get_device_id(port, destid, hopcount); | 338 | /* Switch device has an associated destID */ |
339 | rdev->destid = RIO_INVALID_DESTID; | ||
337 | 340 | ||
338 | /* If a PE has both switch and other functions, show it as a switch */ | 341 | /* If a PE has both switch and other functions, show it as a switch */ |
339 | if (rio_is_switch(rdev)) { | 342 | if (rio_is_switch(rdev)) { |
@@ -347,7 +350,7 @@ static struct rio_dev *rio_setup_device(struct rio_net *net, | |||
347 | } | 350 | } |
348 | rswitch->switchid = next_switchid; | 351 | rswitch->switchid = next_switchid; |
349 | rswitch->hopcount = hopcount; | 352 | rswitch->hopcount = hopcount; |
350 | rswitch->destid = 0xffff; | 353 | rswitch->destid = destid; |
351 | /* Initialize switch route table */ | 354 | /* Initialize switch route table */ |
352 | for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES; rdid++) | 355 | for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES; rdid++) |
353 | rswitch->route_table[rdid] = RIO_INVALID_ROUTE; | 356 | rswitch->route_table[rdid] = RIO_INVALID_ROUTE; |
@@ -422,7 +425,7 @@ rio_sport_is_active(struct rio_mport *port, u16 destid, u8 hopcount, int sport) | |||
422 | /** | 425 | /** |
423 | * rio_route_add_entry- Add a route entry to a switch routing table | 426 | * rio_route_add_entry- Add a route entry to a switch routing table |
424 | * @mport: Master port to send transaction | 427 | * @mport: Master port to send transaction |
425 | * @rdev: Switch device | 428 | * @rswitch: Switch device |
426 | * @table: Routing table ID | 429 | * @table: Routing table ID |
427 | * @route_destid: Destination ID to be routed | 430 | * @route_destid: Destination ID to be routed |
428 | * @route_port: Port number to be routed | 431 | * @route_port: Port number to be routed |
@@ -434,18 +437,18 @@ rio_sport_is_active(struct rio_mport *port, u16 destid, u8 hopcount, int sport) | |||
434 | * %RIO_GLOBAL_TABLE in @table. Returns %0 on success or %-EINVAL | 437 | * %RIO_GLOBAL_TABLE in @table. Returns %0 on success or %-EINVAL |
435 | * on failure. | 438 | * on failure. |
436 | */ | 439 | */ |
437 | static int rio_route_add_entry(struct rio_mport *mport, struct rio_dev *rdev, | 440 | static int rio_route_add_entry(struct rio_mport *mport, struct rio_switch *rswitch, |
438 | u16 table, u16 route_destid, u8 route_port) | 441 | u16 table, u16 route_destid, u8 route_port) |
439 | { | 442 | { |
440 | return rdev->rswitch->add_entry(mport, rdev->rswitch->destid, | 443 | return rswitch->add_entry(mport, rswitch->destid, |
441 | rdev->rswitch->hopcount, table, | 444 | rswitch->hopcount, table, |
442 | route_destid, route_port); | 445 | route_destid, route_port); |
443 | } | 446 | } |
444 | 447 | ||
445 | /** | 448 | /** |
446 | * rio_route_get_entry- Read a route entry in a switch routing table | 449 | * rio_route_get_entry- Read a route entry in a switch routing table |
447 | * @mport: Master port to send transaction | 450 | * @mport: Master port to send transaction |
448 | * @rdev: Switch device | 451 | * @rswitch: Switch device |
449 | * @table: Routing table ID | 452 | * @table: Routing table ID |
450 | * @route_destid: Destination ID to be routed | 453 | * @route_destid: Destination ID to be routed |
451 | * @route_port: Pointer to read port number into | 454 | * @route_port: Pointer to read port number into |
@@ -458,11 +461,11 @@ static int rio_route_add_entry(struct rio_mport *mport, struct rio_dev *rdev, | |||
458 | * on failure. | 461 | * on failure. |
459 | */ | 462 | */ |
460 | static int | 463 | static int |
461 | rio_route_get_entry(struct rio_mport *mport, struct rio_dev *rdev, u16 table, | 464 | rio_route_get_entry(struct rio_mport *mport, struct rio_switch *rswitch, u16 table, |
462 | u16 route_destid, u8 * route_port) | 465 | u16 route_destid, u8 * route_port) |
463 | { | 466 | { |
464 | return rdev->rswitch->get_entry(mport, rdev->rswitch->destid, | 467 | return rswitch->get_entry(mport, rswitch->destid, |
465 | rdev->rswitch->hopcount, table, | 468 | rswitch->hopcount, table, |
466 | route_destid, route_port); | 469 | route_destid, route_port); |
467 | } | 470 | } |
468 | 471 | ||
@@ -552,6 +555,8 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, | |||
552 | int port_num; | 555 | int port_num; |
553 | int num_ports; | 556 | int num_ports; |
554 | int cur_destid; | 557 | int cur_destid; |
558 | int sw_destid; | ||
559 | int sw_inport; | ||
555 | struct rio_dev *rdev; | 560 | struct rio_dev *rdev; |
556 | u16 destid; | 561 | u16 destid; |
557 | int tmp; | 562 | int tmp; |
@@ -594,15 +599,17 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, | |||
594 | 599 | ||
595 | if (rio_is_switch(rdev)) { | 600 | if (rio_is_switch(rdev)) { |
596 | next_switchid++; | 601 | next_switchid++; |
602 | sw_inport = rio_get_swpinfo_inport(port, RIO_ANY_DESTID, hopcount); | ||
603 | rio_route_add_entry(port, rdev->rswitch, RIO_GLOBAL_TABLE, | ||
604 | port->host_deviceid, sw_inport); | ||
605 | rdev->rswitch->route_table[port->host_deviceid] = sw_inport; | ||
597 | 606 | ||
598 | for (destid = 0; destid < next_destid; destid++) { | 607 | for (destid = 0; destid < next_destid; destid++) { |
599 | rio_route_add_entry(port, rdev, RIO_GLOBAL_TABLE, | 608 | if (destid == port->host_deviceid) |
600 | destid, rio_get_swpinfo_inport(port, | 609 | continue; |
601 | RIO_ANY_DESTID, | 610 | rio_route_add_entry(port, rdev->rswitch, RIO_GLOBAL_TABLE, |
602 | hopcount)); | 611 | destid, sw_inport); |
603 | rdev->rswitch->route_table[destid] = | 612 | rdev->rswitch->route_table[destid] = sw_inport; |
604 | rio_get_swpinfo_inport(port, RIO_ANY_DESTID, | ||
605 | hopcount); | ||
606 | } | 613 | } |
607 | 614 | ||
608 | num_ports = | 615 | num_ports = |
@@ -610,9 +617,9 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, | |||
610 | pr_debug( | 617 | pr_debug( |
611 | "RIO: found %s (vid %4.4x did %4.4x) with %d ports\n", | 618 | "RIO: found %s (vid %4.4x did %4.4x) with %d ports\n", |
612 | rio_name(rdev), rdev->vid, rdev->did, num_ports); | 619 | rio_name(rdev), rdev->vid, rdev->did, num_ports); |
620 | sw_destid = next_destid; | ||
613 | for (port_num = 0; port_num < num_ports; port_num++) { | 621 | for (port_num = 0; port_num < num_ports; port_num++) { |
614 | if (rio_get_swpinfo_inport | 622 | if (sw_inport == port_num) |
615 | (port, RIO_ANY_DESTID, hopcount) == port_num) | ||
616 | continue; | 623 | continue; |
617 | 624 | ||
618 | cur_destid = next_destid; | 625 | cur_destid = next_destid; |
@@ -622,7 +629,7 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, | |||
622 | pr_debug( | 629 | pr_debug( |
623 | "RIO: scanning device on port %d\n", | 630 | "RIO: scanning device on port %d\n", |
624 | port_num); | 631 | port_num); |
625 | rio_route_add_entry(port, rdev, | 632 | rio_route_add_entry(port, rdev->rswitch, |
626 | RIO_GLOBAL_TABLE, | 633 | RIO_GLOBAL_TABLE, |
627 | RIO_ANY_DESTID, port_num); | 634 | RIO_ANY_DESTID, port_num); |
628 | 635 | ||
@@ -633,7 +640,9 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, | |||
633 | if (next_destid > cur_destid) { | 640 | if (next_destid > cur_destid) { |
634 | for (destid = cur_destid; | 641 | for (destid = cur_destid; |
635 | destid < next_destid; destid++) { | 642 | destid < next_destid; destid++) { |
636 | rio_route_add_entry(port, rdev, | 643 | if (destid == port->host_deviceid) |
644 | continue; | ||
645 | rio_route_add_entry(port, rdev->rswitch, | ||
637 | RIO_GLOBAL_TABLE, | 646 | RIO_GLOBAL_TABLE, |
638 | destid, | 647 | destid, |
639 | port_num); | 648 | port_num); |
@@ -641,10 +650,18 @@ static int rio_enum_peer(struct rio_net *net, struct rio_mport *port, | |||
641 | route_table[destid] = | 650 | route_table[destid] = |
642 | port_num; | 651 | port_num; |
643 | } | 652 | } |
644 | rdev->rswitch->destid = cur_destid; | ||
645 | } | 653 | } |
646 | } | 654 | } |
647 | } | 655 | } |
656 | |||
657 | /* Check for empty switch */ | ||
658 | if (next_destid == sw_destid) { | ||
659 | next_destid++; | ||
660 | if (next_destid == port->host_deviceid) | ||
661 | next_destid++; | ||
662 | } | ||
663 | |||
664 | rdev->rswitch->destid = sw_destid; | ||
648 | } else | 665 | } else |
649 | pr_debug("RIO: found %s (vid %4.4x did %4.4x)\n", | 666 | pr_debug("RIO: found %s (vid %4.4x did %4.4x)\n", |
650 | rio_name(rdev), rdev->vid, rdev->did); | 667 | rio_name(rdev), rdev->vid, rdev->did); |
@@ -721,7 +738,7 @@ rio_disc_peer(struct rio_net *net, struct rio_mport *port, u16 destid, | |||
721 | port_num); | 738 | port_num); |
722 | for (ndestid = 0; ndestid < RIO_ANY_DESTID; | 739 | for (ndestid = 0; ndestid < RIO_ANY_DESTID; |
723 | ndestid++) { | 740 | ndestid++) { |
724 | rio_route_get_entry(port, rdev, | 741 | rio_route_get_entry(port, rdev->rswitch, |
725 | RIO_GLOBAL_TABLE, | 742 | RIO_GLOBAL_TABLE, |
726 | ndestid, | 743 | ndestid, |
727 | &route_port); | 744 | &route_port); |
@@ -798,6 +815,44 @@ static struct rio_net __devinit *rio_alloc_net(struct rio_mport *port) | |||
798 | } | 815 | } |
799 | 816 | ||
800 | /** | 817 | /** |
818 | * rio_update_route_tables- Updates route tables in switches | ||
819 | * @port: Master port associated with the RIO network | ||
820 | * | ||
821 | * For each enumerated device, ensure that each switch in a system | ||
822 | * has correct routing entries. Add routes for devices that where | ||
823 | * unknown dirung the first enumeration pass through the switch. | ||
824 | */ | ||
825 | static void rio_update_route_tables(struct rio_mport *port) | ||
826 | { | ||
827 | struct rio_dev *rdev; | ||
828 | struct rio_switch *rswitch; | ||
829 | u8 sport; | ||
830 | u16 destid; | ||
831 | |||
832 | list_for_each_entry(rdev, &rio_devices, global_list) { | ||
833 | |||
834 | destid = (rio_is_switch(rdev))?rdev->rswitch->destid:rdev->destid; | ||
835 | |||
836 | list_for_each_entry(rswitch, &rio_switches, node) { | ||
837 | |||
838 | if (rio_is_switch(rdev) && (rdev->rswitch == rswitch)) | ||
839 | continue; | ||
840 | |||
841 | if (RIO_INVALID_ROUTE == rswitch->route_table[destid]) { | ||
842 | |||
843 | sport = rio_get_swpinfo_inport(port, | ||
844 | rswitch->destid, rswitch->hopcount); | ||
845 | |||
846 | if (rswitch->add_entry) { | ||
847 | rio_route_add_entry(port, rswitch, RIO_GLOBAL_TABLE, destid, sport); | ||
848 | rswitch->route_table[destid] = sport; | ||
849 | } | ||
850 | } | ||
851 | } | ||
852 | } | ||
853 | } | ||
854 | |||
855 | /** | ||
801 | * rio_enum_mport- Start enumeration through a master port | 856 | * rio_enum_mport- Start enumeration through a master port |
802 | * @mport: Master port to send transactions | 857 | * @mport: Master port to send transactions |
803 | * | 858 | * |
@@ -838,6 +893,7 @@ int rio_enum_mport(struct rio_mport *mport) | |||
838 | rc = -EBUSY; | 893 | rc = -EBUSY; |
839 | goto out; | 894 | goto out; |
840 | } | 895 | } |
896 | rio_update_route_tables(mport); | ||
841 | rio_clear_locks(mport); | 897 | rio_clear_locks(mport); |
842 | } else { | 898 | } else { |
843 | printk(KERN_INFO "RIO: master port %d link inactive\n", | 899 | printk(KERN_INFO "RIO: master port %d link inactive\n", |
@@ -865,8 +921,8 @@ static void rio_build_route_tables(void) | |||
865 | if (rio_is_switch(rdev)) | 921 | if (rio_is_switch(rdev)) |
866 | for (i = 0; i < RIO_MAX_ROUTE_ENTRIES; i++) { | 922 | for (i = 0; i < RIO_MAX_ROUTE_ENTRIES; i++) { |
867 | if (rio_route_get_entry | 923 | if (rio_route_get_entry |
868 | (rdev->net->hport, rdev, RIO_GLOBAL_TABLE, i, | 924 | (rdev->net->hport, rdev->rswitch, RIO_GLOBAL_TABLE, |
869 | &sport) < 0) | 925 | i, &sport) < 0) |
870 | continue; | 926 | continue; |
871 | rdev->rswitch->route_table[i] = sport; | 927 | rdev->rswitch->route_table[i] = sport; |
872 | } | 928 | } |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 09660e2ab051..4bbca500d3d2 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -1,4 +1,4 @@ | |||
1 | \# | 1 | # |
2 | # RTC class/drivers configuration | 2 | # RTC class/drivers configuration |
3 | # | 3 | # |
4 | 4 | ||
@@ -95,6 +95,29 @@ config RTC_INTF_DEV_UIE_EMUL | |||
95 | comment "RTC drivers" | 95 | comment "RTC drivers" |
96 | depends on RTC_CLASS | 96 | depends on RTC_CLASS |
97 | 97 | ||
98 | # this 'CMOS' RTC driver is arch dependent because <asm-generic/rtc.h> | ||
99 | # requires <asm/mc146818rtc.h> defining CMOS_READ/CMOS_WRITE, and a | ||
100 | # global rtc_lock ... it's not yet just another platform_device. | ||
101 | |||
102 | config RTC_DRV_CMOS | ||
103 | tristate "PC-style 'CMOS' real time clock" | ||
104 | depends on RTC_CLASS && (X86_PC || ALPHA || ARM26 || ARM \ | ||
105 | || M32R || ATARI || POWERPC) | ||
106 | help | ||
107 | Say "yes" here to get direct support for the real time clock | ||
108 | found in every PC or ACPI-based system, and some other boards. | ||
109 | Specifically the original MC146818, compatibles like those in | ||
110 | PC south bridges, the DS12887 or M48T86, some multifunction | ||
111 | or LPC bus chips, and so on. | ||
112 | |||
113 | Your system will need to define the platform device used by | ||
114 | this driver, otherwise it won't be accessible. This means | ||
115 | you can safely enable this driver if you don't know whether | ||
116 | or not your board has this kind of hardware. | ||
117 | |||
118 | This driver can also be built as a module. If so, the module | ||
119 | will be called rtc-cmos. | ||
120 | |||
98 | config RTC_DRV_X1205 | 121 | config RTC_DRV_X1205 |
99 | tristate "Xicor/Intersil X1205" | 122 | tristate "Xicor/Intersil X1205" |
100 | depends on RTC_CLASS && I2C | 123 | depends on RTC_CLASS && I2C |
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index e6beedacc966..92bfe1b3a5fa 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile | |||
@@ -15,6 +15,7 @@ obj-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o | |||
15 | obj-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o | 15 | obj-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o |
16 | obj-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o | 16 | obj-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o |
17 | 17 | ||
18 | obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o | ||
18 | obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o | 19 | obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o |
19 | obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o | 20 | obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o |
20 | obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o | 21 | obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o |
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c new file mode 100644 index 000000000000..85bf795abdcc --- /dev/null +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -0,0 +1,725 @@ | |||
1 | /* | ||
2 | * RTC class driver for "CMOS RTC": PCs, ACPI, etc | ||
3 | * | ||
4 | * Copyright (C) 1996 Paul Gortmaker (drivers/char/rtc.c) | ||
5 | * Copyright (C) 2006 David Brownell (convert to new framework) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version | ||
10 | * 2 of the License, or (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | /* | ||
14 | * The original "cmos clock" chip was an MC146818 chip, now obsolete. | ||
15 | * That defined the register interface now provided by all PCs, some | ||
16 | * non-PC systems, and incorporated into ACPI. Modern PC chipsets | ||
17 | * integrate an MC146818 clone in their southbridge, and boards use | ||
18 | * that instead of discrete clones like the DS12887 or M48T86. There | ||
19 | * are also clones that connect using the LPC bus. | ||
20 | * | ||
21 | * That register API is also used directly by various other drivers | ||
22 | * (notably for integrated NVRAM), infrastructure (x86 has code to | ||
23 | * bypass the RTC framework, directly reading the RTC during boot | ||
24 | * and updating minutes/seconds for systems using NTP synch) and | ||
25 | * utilities (like userspace 'hwclock', if no /dev node exists). | ||
26 | * | ||
27 | * So **ALL** calls to CMOS_READ and CMOS_WRITE must be done with | ||
28 | * interrupts disabled, holding the global rtc_lock, to exclude those | ||
29 | * other drivers and utilities on correctly configured systems. | ||
30 | */ | ||
31 | #include <linux/kernel.h> | ||
32 | #include <linux/module.h> | ||
33 | #include <linux/init.h> | ||
34 | #include <linux/interrupt.h> | ||
35 | #include <linux/spinlock.h> | ||
36 | #include <linux/platform_device.h> | ||
37 | #include <linux/mod_devicetable.h> | ||
38 | |||
39 | /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ | ||
40 | #include <asm-generic/rtc.h> | ||
41 | |||
42 | |||
43 | struct cmos_rtc { | ||
44 | struct rtc_device *rtc; | ||
45 | struct device *dev; | ||
46 | int irq; | ||
47 | struct resource *iomem; | ||
48 | |||
49 | u8 suspend_ctrl; | ||
50 | |||
51 | /* newer hardware extends the original register set */ | ||
52 | u8 day_alrm; | ||
53 | u8 mon_alrm; | ||
54 | u8 century; | ||
55 | }; | ||
56 | |||
57 | /* both platform and pnp busses use negative numbers for invalid irqs */ | ||
58 | #define is_valid_irq(n) ((n) >= 0) | ||
59 | |||
60 | static const char driver_name[] = "rtc_cmos"; | ||
61 | |||
62 | /*----------------------------------------------------------------*/ | ||
63 | |||
64 | static int cmos_read_time(struct device *dev, struct rtc_time *t) | ||
65 | { | ||
66 | /* REVISIT: if the clock has a "century" register, use | ||
67 | * that instead of the heuristic in get_rtc_time(). | ||
68 | * That'll make Y3K compatility (year > 2070) easy! | ||
69 | */ | ||
70 | get_rtc_time(t); | ||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | static int cmos_set_time(struct device *dev, struct rtc_time *t) | ||
75 | { | ||
76 | /* REVISIT: set the "century" register if available | ||
77 | * | ||
78 | * NOTE: this ignores the issue whereby updating the seconds | ||
79 | * takes effect exactly 500ms after we write the register. | ||
80 | * (Also queueing and other delays before we get this far.) | ||
81 | */ | ||
82 | return set_rtc_time(t); | ||
83 | } | ||
84 | |||
85 | static int cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t) | ||
86 | { | ||
87 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
88 | unsigned char rtc_control; | ||
89 | |||
90 | if (!is_valid_irq(cmos->irq)) | ||
91 | return -EIO; | ||
92 | |||
93 | /* Basic alarms only support hour, minute, and seconds fields. | ||
94 | * Some also support day and month, for alarms up to a year in | ||
95 | * the future. | ||
96 | */ | ||
97 | t->time.tm_mday = -1; | ||
98 | t->time.tm_mon = -1; | ||
99 | |||
100 | spin_lock_irq(&rtc_lock); | ||
101 | t->time.tm_sec = CMOS_READ(RTC_SECONDS_ALARM); | ||
102 | t->time.tm_min = CMOS_READ(RTC_MINUTES_ALARM); | ||
103 | t->time.tm_hour = CMOS_READ(RTC_HOURS_ALARM); | ||
104 | |||
105 | if (cmos->day_alrm) { | ||
106 | t->time.tm_mday = CMOS_READ(cmos->day_alrm); | ||
107 | if (!t->time.tm_mday) | ||
108 | t->time.tm_mday = -1; | ||
109 | |||
110 | if (cmos->mon_alrm) { | ||
111 | t->time.tm_mon = CMOS_READ(cmos->mon_alrm); | ||
112 | if (!t->time.tm_mon) | ||
113 | t->time.tm_mon = -1; | ||
114 | } | ||
115 | } | ||
116 | |||
117 | rtc_control = CMOS_READ(RTC_CONTROL); | ||
118 | spin_unlock_irq(&rtc_lock); | ||
119 | |||
120 | /* REVISIT this assumes PC style usage: always BCD */ | ||
121 | |||
122 | if (((unsigned)t->time.tm_sec) < 0x60) | ||
123 | t->time.tm_sec = BCD2BIN(t->time.tm_sec); | ||
124 | else | ||
125 | t->time.tm_sec = -1; | ||
126 | if (((unsigned)t->time.tm_min) < 0x60) | ||
127 | t->time.tm_min = BCD2BIN(t->time.tm_min); | ||
128 | else | ||
129 | t->time.tm_min = -1; | ||
130 | if (((unsigned)t->time.tm_hour) < 0x24) | ||
131 | t->time.tm_hour = BCD2BIN(t->time.tm_hour); | ||
132 | else | ||
133 | t->time.tm_hour = -1; | ||
134 | |||
135 | if (cmos->day_alrm) { | ||
136 | if (((unsigned)t->time.tm_mday) <= 0x31) | ||
137 | t->time.tm_mday = BCD2BIN(t->time.tm_mday); | ||
138 | else | ||
139 | t->time.tm_mday = -1; | ||
140 | if (cmos->mon_alrm) { | ||
141 | if (((unsigned)t->time.tm_mon) <= 0x12) | ||
142 | t->time.tm_mon = BCD2BIN(t->time.tm_mon) - 1; | ||
143 | else | ||
144 | t->time.tm_mon = -1; | ||
145 | } | ||
146 | } | ||
147 | t->time.tm_year = -1; | ||
148 | |||
149 | t->enabled = !!(rtc_control & RTC_AIE); | ||
150 | t->pending = 0; | ||
151 | |||
152 | return 0; | ||
153 | } | ||
154 | |||
155 | static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t) | ||
156 | { | ||
157 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
158 | unsigned char mon, mday, hrs, min, sec; | ||
159 | unsigned char rtc_control, rtc_intr; | ||
160 | |||
161 | if (!is_valid_irq(cmos->irq)) | ||
162 | return -EIO; | ||
163 | |||
164 | /* REVISIT this assumes PC style usage: always BCD */ | ||
165 | |||
166 | /* Writing 0xff means "don't care" or "match all". */ | ||
167 | |||
168 | mon = t->time.tm_mon; | ||
169 | mon = (mon < 12) ? BIN2BCD(mon) : 0xff; | ||
170 | mon++; | ||
171 | |||
172 | mday = t->time.tm_mday; | ||
173 | mday = (mday >= 1 && mday <= 31) ? BIN2BCD(mday) : 0xff; | ||
174 | |||
175 | hrs = t->time.tm_hour; | ||
176 | hrs = (hrs < 24) ? BIN2BCD(hrs) : 0xff; | ||
177 | |||
178 | min = t->time.tm_min; | ||
179 | min = (min < 60) ? BIN2BCD(min) : 0xff; | ||
180 | |||
181 | sec = t->time.tm_sec; | ||
182 | sec = (sec < 60) ? BIN2BCD(sec) : 0xff; | ||
183 | |||
184 | spin_lock_irq(&rtc_lock); | ||
185 | |||
186 | /* next rtc irq must not be from previous alarm setting */ | ||
187 | rtc_control = CMOS_READ(RTC_CONTROL); | ||
188 | rtc_control &= ~RTC_AIE; | ||
189 | CMOS_WRITE(rtc_control, RTC_CONTROL); | ||
190 | rtc_intr = CMOS_READ(RTC_INTR_FLAGS); | ||
191 | if (rtc_intr) | ||
192 | rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr); | ||
193 | |||
194 | /* update alarm */ | ||
195 | CMOS_WRITE(hrs, RTC_HOURS_ALARM); | ||
196 | CMOS_WRITE(min, RTC_MINUTES_ALARM); | ||
197 | CMOS_WRITE(sec, RTC_SECONDS_ALARM); | ||
198 | |||
199 | /* the system may support an "enhanced" alarm */ | ||
200 | if (cmos->day_alrm) { | ||
201 | CMOS_WRITE(mday, cmos->day_alrm); | ||
202 | if (cmos->mon_alrm) | ||
203 | CMOS_WRITE(mon, cmos->mon_alrm); | ||
204 | } | ||
205 | |||
206 | if (t->enabled) { | ||
207 | rtc_control |= RTC_AIE; | ||
208 | CMOS_WRITE(rtc_control, RTC_CONTROL); | ||
209 | rtc_intr = CMOS_READ(RTC_INTR_FLAGS); | ||
210 | if (rtc_intr) | ||
211 | rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr); | ||
212 | } | ||
213 | |||
214 | spin_unlock_irq(&rtc_lock); | ||
215 | |||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | static int cmos_set_freq(struct device *dev, int freq) | ||
220 | { | ||
221 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
222 | int f; | ||
223 | unsigned long flags; | ||
224 | |||
225 | if (!is_valid_irq(cmos->irq)) | ||
226 | return -ENXIO; | ||
227 | |||
228 | /* 0 = no irqs; 1 = 2^15 Hz ... 15 = 2^0 Hz */ | ||
229 | f = ffs(freq); | ||
230 | if (f != 0) { | ||
231 | if (f-- > 16 || freq != (1 << f)) | ||
232 | return -EINVAL; | ||
233 | f = 16 - f; | ||
234 | } | ||
235 | |||
236 | spin_lock_irqsave(&rtc_lock, flags); | ||
237 | CMOS_WRITE(RTC_REF_CLCK_32KHZ | f, RTC_FREQ_SELECT); | ||
238 | spin_unlock_irqrestore(&rtc_lock, flags); | ||
239 | |||
240 | return 0; | ||
241 | } | ||
242 | |||
243 | #if defined(CONFIG_RTC_INTF_DEV) || defined(CONFIG_RTC_INTF_DEV_MODULE) | ||
244 | |||
245 | static int | ||
246 | cmos_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) | ||
247 | { | ||
248 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
249 | unsigned char rtc_control, rtc_intr; | ||
250 | unsigned long flags; | ||
251 | |||
252 | switch (cmd) { | ||
253 | case RTC_AIE_OFF: | ||
254 | case RTC_AIE_ON: | ||
255 | case RTC_UIE_OFF: | ||
256 | case RTC_UIE_ON: | ||
257 | case RTC_PIE_OFF: | ||
258 | case RTC_PIE_ON: | ||
259 | if (!is_valid_irq(cmos->irq)) | ||
260 | return -EINVAL; | ||
261 | break; | ||
262 | default: | ||
263 | return -ENOIOCTLCMD; | ||
264 | } | ||
265 | |||
266 | spin_lock_irqsave(&rtc_lock, flags); | ||
267 | rtc_control = CMOS_READ(RTC_CONTROL); | ||
268 | switch (cmd) { | ||
269 | case RTC_AIE_OFF: /* alarm off */ | ||
270 | rtc_control &= ~RTC_AIE; | ||
271 | break; | ||
272 | case RTC_AIE_ON: /* alarm on */ | ||
273 | rtc_control |= RTC_AIE; | ||
274 | break; | ||
275 | case RTC_UIE_OFF: /* update off */ | ||
276 | rtc_control &= ~RTC_UIE; | ||
277 | break; | ||
278 | case RTC_UIE_ON: /* update on */ | ||
279 | rtc_control |= RTC_UIE; | ||
280 | break; | ||
281 | case RTC_PIE_OFF: /* periodic off */ | ||
282 | rtc_control &= ~RTC_PIE; | ||
283 | break; | ||
284 | case RTC_PIE_ON: /* periodic on */ | ||
285 | rtc_control |= RTC_PIE; | ||
286 | break; | ||
287 | } | ||
288 | CMOS_WRITE(rtc_control, RTC_CONTROL); | ||
289 | rtc_intr = CMOS_READ(RTC_INTR_FLAGS); | ||
290 | if (rtc_intr) | ||
291 | rtc_update_irq(&cmos->rtc->class_dev, 1, rtc_intr); | ||
292 | spin_unlock_irqrestore(&rtc_lock, flags); | ||
293 | return 0; | ||
294 | } | ||
295 | |||
296 | #else | ||
297 | #define cmos_rtc_ioctl NULL | ||
298 | #endif | ||
299 | |||
300 | #if defined(CONFIG_RTC_INTF_PROC) || defined(CONFIG_RTC_INTF_PROC_MODULE) | ||
301 | |||
302 | static int cmos_procfs(struct device *dev, struct seq_file *seq) | ||
303 | { | ||
304 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
305 | unsigned char rtc_control, valid; | ||
306 | |||
307 | spin_lock_irq(&rtc_lock); | ||
308 | rtc_control = CMOS_READ(RTC_CONTROL); | ||
309 | valid = CMOS_READ(RTC_VALID); | ||
310 | spin_unlock_irq(&rtc_lock); | ||
311 | |||
312 | /* NOTE: at least ICH6 reports battery status using a different | ||
313 | * (non-RTC) bit; and SQWE is ignored on many current systems. | ||
314 | */ | ||
315 | return seq_printf(seq, | ||
316 | "periodic_IRQ\t: %s\n" | ||
317 | "update_IRQ\t: %s\n" | ||
318 | // "square_wave\t: %s\n" | ||
319 | // "BCD\t\t: %s\n" | ||
320 | "DST_enable\t: %s\n" | ||
321 | "periodic_freq\t: %d\n" | ||
322 | "batt_status\t: %s\n", | ||
323 | (rtc_control & RTC_PIE) ? "yes" : "no", | ||
324 | (rtc_control & RTC_UIE) ? "yes" : "no", | ||
325 | // (rtc_control & RTC_SQWE) ? "yes" : "no", | ||
326 | // (rtc_control & RTC_DM_BINARY) ? "no" : "yes", | ||
327 | (rtc_control & RTC_DST_EN) ? "yes" : "no", | ||
328 | cmos->rtc->irq_freq, | ||
329 | (valid & RTC_VRT) ? "okay" : "dead"); | ||
330 | } | ||
331 | |||
332 | #else | ||
333 | #define cmos_procfs NULL | ||
334 | #endif | ||
335 | |||
336 | static const struct rtc_class_ops cmos_rtc_ops = { | ||
337 | .ioctl = cmos_rtc_ioctl, | ||
338 | .read_time = cmos_read_time, | ||
339 | .set_time = cmos_set_time, | ||
340 | .read_alarm = cmos_read_alarm, | ||
341 | .set_alarm = cmos_set_alarm, | ||
342 | .proc = cmos_procfs, | ||
343 | .irq_set_freq = cmos_set_freq, | ||
344 | }; | ||
345 | |||
346 | /*----------------------------------------------------------------*/ | ||
347 | |||
348 | static struct cmos_rtc cmos_rtc; | ||
349 | |||
350 | static irqreturn_t cmos_interrupt(int irq, void *p) | ||
351 | { | ||
352 | u8 irqstat; | ||
353 | |||
354 | spin_lock(&rtc_lock); | ||
355 | irqstat = CMOS_READ(RTC_INTR_FLAGS); | ||
356 | spin_unlock(&rtc_lock); | ||
357 | |||
358 | if (irqstat) { | ||
359 | /* NOTE: irqstat may have e.g. RTC_PF set | ||
360 | * even when RTC_PIE is clear... | ||
361 | */ | ||
362 | rtc_update_irq(p, 1, irqstat); | ||
363 | return IRQ_HANDLED; | ||
364 | } else | ||
365 | return IRQ_NONE; | ||
366 | } | ||
367 | |||
368 | #ifdef CONFIG_PNPACPI | ||
369 | #define is_pnpacpi() 1 | ||
370 | #define INITSECTION | ||
371 | |||
372 | #else | ||
373 | #define is_pnpacpi() 0 | ||
374 | #define INITSECTION __init | ||
375 | #endif | ||
376 | |||
377 | static int INITSECTION | ||
378 | cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) | ||
379 | { | ||
380 | struct cmos_rtc_board_info *info = dev->platform_data; | ||
381 | int retval = 0; | ||
382 | unsigned char rtc_control; | ||
383 | |||
384 | /* there can be only one ... */ | ||
385 | if (cmos_rtc.dev) | ||
386 | return -EBUSY; | ||
387 | |||
388 | if (!ports) | ||
389 | return -ENODEV; | ||
390 | |||
391 | cmos_rtc.irq = rtc_irq; | ||
392 | cmos_rtc.iomem = ports; | ||
393 | |||
394 | /* For ACPI systems the info comes from the FADT. On others, | ||
395 | * board specific setup provides it as appropriate. | ||
396 | */ | ||
397 | if (info) { | ||
398 | cmos_rtc.day_alrm = info->rtc_day_alarm; | ||
399 | cmos_rtc.mon_alrm = info->rtc_mon_alarm; | ||
400 | cmos_rtc.century = info->rtc_century; | ||
401 | } | ||
402 | |||
403 | cmos_rtc.rtc = rtc_device_register(driver_name, dev, | ||
404 | &cmos_rtc_ops, THIS_MODULE); | ||
405 | if (IS_ERR(cmos_rtc.rtc)) | ||
406 | return PTR_ERR(cmos_rtc.rtc); | ||
407 | |||
408 | cmos_rtc.dev = dev; | ||
409 | dev_set_drvdata(dev, &cmos_rtc); | ||
410 | |||
411 | /* platform and pnp busses handle resources incompatibly. | ||
412 | * | ||
413 | * REVISIT for non-x86 systems we may need to handle io memory | ||
414 | * resources: ioremap them, and request_mem_region(). | ||
415 | */ | ||
416 | if (is_pnpacpi()) { | ||
417 | retval = request_resource(&ioport_resource, ports); | ||
418 | if (retval < 0) { | ||
419 | dev_dbg(dev, "i/o registers already in use\n"); | ||
420 | goto cleanup0; | ||
421 | } | ||
422 | } | ||
423 | rename_region(ports, cmos_rtc.rtc->class_dev.class_id); | ||
424 | |||
425 | spin_lock_irq(&rtc_lock); | ||
426 | |||
427 | /* force periodic irq to CMOS reset default of 1024Hz; | ||
428 | * | ||
429 | * REVISIT it's been reported that at least one x86_64 ALI mobo | ||
430 | * doesn't use 32KHz here ... for portability we might need to | ||
431 | * do something about other clock frequencies. | ||
432 | */ | ||
433 | CMOS_WRITE(RTC_REF_CLCK_32KHZ | 0x06, RTC_FREQ_SELECT); | ||
434 | cmos_rtc.rtc->irq_freq = 1024; | ||
435 | |||
436 | /* disable irqs. | ||
437 | * | ||
438 | * NOTE after changing RTC_xIE bits we always read INTR_FLAGS; | ||
439 | * allegedly some older rtcs need that to handle irqs properly | ||
440 | */ | ||
441 | rtc_control = CMOS_READ(RTC_CONTROL); | ||
442 | rtc_control &= ~(RTC_PIE | RTC_AIE | RTC_UIE); | ||
443 | CMOS_WRITE(rtc_control, RTC_CONTROL); | ||
444 | CMOS_READ(RTC_INTR_FLAGS); | ||
445 | |||
446 | spin_unlock_irq(&rtc_lock); | ||
447 | |||
448 | /* FIXME teach the alarm code how to handle binary mode; | ||
449 | * <asm-generic/rtc.h> doesn't know 12-hour mode either. | ||
450 | */ | ||
451 | if (!(rtc_control & RTC_24H) || (rtc_control & (RTC_DM_BINARY))) { | ||
452 | dev_dbg(dev, "only 24-hr BCD mode supported\n"); | ||
453 | retval = -ENXIO; | ||
454 | goto cleanup1; | ||
455 | } | ||
456 | |||
457 | if (is_valid_irq(rtc_irq)) | ||
458 | retval = request_irq(rtc_irq, cmos_interrupt, IRQF_DISABLED, | ||
459 | cmos_rtc.rtc->class_dev.class_id, | ||
460 | &cmos_rtc.rtc->class_dev); | ||
461 | if (retval < 0) { | ||
462 | dev_dbg(dev, "IRQ %d is already in use\n", rtc_irq); | ||
463 | goto cleanup1; | ||
464 | } | ||
465 | |||
466 | /* REVISIT optionally make 50 or 114 bytes NVRAM available, | ||
467 | * like rtc-ds1553, rtc-ds1742 ... this will often include | ||
468 | * registers for century, and day/month alarm. | ||
469 | */ | ||
470 | |||
471 | pr_info("%s: alarms up to one %s%s\n", | ||
472 | cmos_rtc.rtc->class_dev.class_id, | ||
473 | is_valid_irq(rtc_irq) | ||
474 | ? (cmos_rtc.mon_alrm | ||
475 | ? "year" | ||
476 | : (cmos_rtc.day_alrm | ||
477 | ? "month" : "day")) | ||
478 | : "no", | ||
479 | cmos_rtc.century ? ", y3k" : "" | ||
480 | ); | ||
481 | |||
482 | return 0; | ||
483 | |||
484 | cleanup1: | ||
485 | rename_region(ports, NULL); | ||
486 | cleanup0: | ||
487 | rtc_device_unregister(cmos_rtc.rtc); | ||
488 | return retval; | ||
489 | } | ||
490 | |||
491 | static void cmos_do_shutdown(void) | ||
492 | { | ||
493 | unsigned char rtc_control; | ||
494 | |||
495 | spin_lock_irq(&rtc_lock); | ||
496 | rtc_control = CMOS_READ(RTC_CONTROL); | ||
497 | rtc_control &= ~(RTC_PIE|RTC_AIE|RTC_UIE); | ||
498 | CMOS_WRITE(rtc_control, RTC_CONTROL); | ||
499 | CMOS_READ(RTC_INTR_FLAGS); | ||
500 | spin_unlock_irq(&rtc_lock); | ||
501 | } | ||
502 | |||
503 | static void __exit cmos_do_remove(struct device *dev) | ||
504 | { | ||
505 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
506 | |||
507 | cmos_do_shutdown(); | ||
508 | |||
509 | if (is_pnpacpi()) | ||
510 | release_resource(cmos->iomem); | ||
511 | rename_region(cmos->iomem, NULL); | ||
512 | |||
513 | if (is_valid_irq(cmos->irq)) | ||
514 | free_irq(cmos->irq, &cmos_rtc.rtc->class_dev); | ||
515 | |||
516 | rtc_device_unregister(cmos_rtc.rtc); | ||
517 | |||
518 | cmos_rtc.dev = NULL; | ||
519 | dev_set_drvdata(dev, NULL); | ||
520 | } | ||
521 | |||
522 | #ifdef CONFIG_PM | ||
523 | |||
524 | static int cmos_suspend(struct device *dev, pm_message_t mesg) | ||
525 | { | ||
526 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
527 | int do_wake = device_may_wakeup(dev); | ||
528 | unsigned char tmp, irqstat; | ||
529 | |||
530 | /* only the alarm might be a wakeup event source */ | ||
531 | spin_lock_irq(&rtc_lock); | ||
532 | cmos->suspend_ctrl = tmp = CMOS_READ(RTC_CONTROL); | ||
533 | if (tmp & (RTC_PIE|RTC_AIE|RTC_UIE)) { | ||
534 | if (do_wake) | ||
535 | tmp &= ~(RTC_PIE|RTC_UIE); | ||
536 | else | ||
537 | tmp &= ~(RTC_PIE|RTC_AIE|RTC_UIE); | ||
538 | CMOS_WRITE(tmp, RTC_CONTROL); | ||
539 | irqstat = CMOS_READ(RTC_INTR_FLAGS); | ||
540 | } else | ||
541 | irqstat = 0; | ||
542 | spin_unlock_irq(&rtc_lock); | ||
543 | |||
544 | if (irqstat) | ||
545 | rtc_update_irq(&cmos->rtc->class_dev, 1, irqstat); | ||
546 | |||
547 | /* ACPI HOOK: enable ACPI_EVENT_RTC when (tmp & RTC_AIE) | ||
548 | * ... it'd be best if we could do that under rtc_lock. | ||
549 | */ | ||
550 | |||
551 | pr_debug("%s: suspend%s, ctrl %02x\n", | ||
552 | cmos_rtc.rtc->class_dev.class_id, | ||
553 | (tmp & RTC_AIE) ? ", alarm may wake" : "", | ||
554 | tmp); | ||
555 | |||
556 | return 0; | ||
557 | } | ||
558 | |||
559 | static int cmos_resume(struct device *dev) | ||
560 | { | ||
561 | struct cmos_rtc *cmos = dev_get_drvdata(dev); | ||
562 | unsigned char tmp = cmos->suspend_ctrl; | ||
563 | |||
564 | /* REVISIT: a mechanism to resync the system clock (jiffies) | ||
565 | * on resume should be portable between platforms ... | ||
566 | */ | ||
567 | |||
568 | /* re-enable any irqs previously active */ | ||
569 | if (tmp & (RTC_PIE|RTC_AIE|RTC_UIE)) { | ||
570 | |||
571 | /* ACPI HOOK: disable ACPI_EVENT_RTC when (tmp & RTC_AIE) */ | ||
572 | |||
573 | spin_lock_irq(&rtc_lock); | ||
574 | CMOS_WRITE(tmp, RTC_CONTROL); | ||
575 | tmp = CMOS_READ(RTC_INTR_FLAGS); | ||
576 | spin_unlock_irq(&rtc_lock); | ||
577 | if (tmp) | ||
578 | rtc_update_irq(&cmos->rtc->class_dev, 1, tmp); | ||
579 | } | ||
580 | |||
581 | pr_debug("%s: resume, ctrl %02x\n", | ||
582 | cmos_rtc.rtc->class_dev.class_id, | ||
583 | cmos->suspend_ctrl); | ||
584 | |||
585 | |||
586 | return 0; | ||
587 | } | ||
588 | |||
589 | #else | ||
590 | #define cmos_suspend NULL | ||
591 | #define cmos_resume NULL | ||
592 | #endif | ||
593 | |||
594 | /*----------------------------------------------------------------*/ | ||
595 | |||
596 | /* The "CMOS" RTC normally lives on the platform_bus. On ACPI systems, | ||
597 | * the device node may alternatively be created as a PNP device. | ||
598 | */ | ||
599 | |||
600 | #ifdef CONFIG_PNPACPI | ||
601 | |||
602 | #include <linux/pnp.h> | ||
603 | |||
604 | static int __devinit | ||
605 | cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) | ||
606 | { | ||
607 | /* REVISIT paranoia argues for a shutdown notifier, since PNP | ||
608 | * drivers can't provide shutdown() methods to disable IRQs. | ||
609 | * Or better yet, fix PNP to allow those methods... | ||
610 | */ | ||
611 | return cmos_do_probe(&pnp->dev, | ||
612 | &pnp->res.port_resource[0], | ||
613 | pnp->res.irq_resource[0].start); | ||
614 | } | ||
615 | |||
616 | static void __exit cmos_pnp_remove(struct pnp_dev *pnp) | ||
617 | { | ||
618 | cmos_do_remove(&pnp->dev); | ||
619 | } | ||
620 | |||
621 | #ifdef CONFIG_PM | ||
622 | |||
623 | static int cmos_pnp_suspend(struct pnp_dev *pnp, pm_message_t mesg) | ||
624 | { | ||
625 | return cmos_suspend(&pnp->dev, mesg); | ||
626 | } | ||
627 | |||
628 | static int cmos_pnp_resume(struct pnp_dev *pnp) | ||
629 | { | ||
630 | return cmos_resume(&pnp->dev); | ||
631 | } | ||
632 | |||
633 | #else | ||
634 | #define cmos_pnp_suspend NULL | ||
635 | #define cmos_pnp_resume NULL | ||
636 | #endif | ||
637 | |||
638 | |||
639 | static const struct pnp_device_id rtc_ids[] = { | ||
640 | { .id = "PNP0b00", }, | ||
641 | { .id = "PNP0b01", }, | ||
642 | { .id = "PNP0b02", }, | ||
643 | { }, | ||
644 | }; | ||
645 | MODULE_DEVICE_TABLE(pnp, rtc_ids); | ||
646 | |||
647 | static struct pnp_driver cmos_pnp_driver = { | ||
648 | .name = (char *) driver_name, | ||
649 | .id_table = rtc_ids, | ||
650 | .probe = cmos_pnp_probe, | ||
651 | .remove = __exit_p(cmos_pnp_remove), | ||
652 | |||
653 | /* flag ensures resume() gets called, and stops syslog spam */ | ||
654 | .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, | ||
655 | .suspend = cmos_pnp_suspend, | ||
656 | .resume = cmos_pnp_resume, | ||
657 | }; | ||
658 | |||
659 | static int __init cmos_init(void) | ||
660 | { | ||
661 | return pnp_register_driver(&cmos_pnp_driver); | ||
662 | } | ||
663 | module_init(cmos_init); | ||
664 | |||
665 | static void __exit cmos_exit(void) | ||
666 | { | ||
667 | pnp_unregister_driver(&cmos_pnp_driver); | ||
668 | } | ||
669 | module_exit(cmos_exit); | ||
670 | |||
671 | #else /* no PNPACPI */ | ||
672 | |||
673 | /*----------------------------------------------------------------*/ | ||
674 | |||
675 | /* Platform setup should have set up an RTC device, when PNPACPI is | ||
676 | * unavailable ... this is the normal case, common even on PCs. | ||
677 | */ | ||
678 | |||
679 | static int __init cmos_platform_probe(struct platform_device *pdev) | ||
680 | { | ||
681 | return cmos_do_probe(&pdev->dev, | ||
682 | platform_get_resource(pdev, IORESOURCE_IO, 0), | ||
683 | platform_get_irq(pdev, 0)); | ||
684 | } | ||
685 | |||
686 | static int __exit cmos_platform_remove(struct platform_device *pdev) | ||
687 | { | ||
688 | cmos_do_remove(&pdev->dev); | ||
689 | return 0; | ||
690 | } | ||
691 | |||
692 | static void cmos_platform_shutdown(struct platform_device *pdev) | ||
693 | { | ||
694 | cmos_do_shutdown(); | ||
695 | } | ||
696 | |||
697 | static struct platform_driver cmos_platform_driver = { | ||
698 | .remove = __exit_p(cmos_platform_remove), | ||
699 | .shutdown = cmos_platform_shutdown, | ||
700 | .driver = { | ||
701 | .name = (char *) driver_name, | ||
702 | .suspend = cmos_suspend, | ||
703 | .resume = cmos_resume, | ||
704 | } | ||
705 | }; | ||
706 | |||
707 | static int __init cmos_init(void) | ||
708 | { | ||
709 | return platform_driver_probe(&cmos_platform_driver, | ||
710 | cmos_platform_probe); | ||
711 | } | ||
712 | module_init(cmos_init); | ||
713 | |||
714 | static void __exit cmos_exit(void) | ||
715 | { | ||
716 | platform_driver_unregister(&cmos_platform_driver); | ||
717 | } | ||
718 | module_exit(cmos_exit); | ||
719 | |||
720 | |||
721 | #endif /* !PNPACPI */ | ||
722 | |||
723 | MODULE_AUTHOR("David Brownell"); | ||
724 | MODULE_DESCRIPTION("Driver for PC-style 'CMOS' RTCs"); | ||
725 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index b9e59bc9435a..2c785148d21e 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c | |||
@@ -1063,7 +1063,6 @@ int __init zcrypt_api_init(void) | |||
1063 | rc = -ENOMEM; | 1063 | rc = -ENOMEM; |
1064 | goto out_misc; | 1064 | goto out_misc; |
1065 | } | 1065 | } |
1066 | zcrypt_entry->nlink = 1; | ||
1067 | zcrypt_entry->data = NULL; | 1066 | zcrypt_entry->data = NULL; |
1068 | zcrypt_entry->read_proc = zcrypt_status_read; | 1067 | zcrypt_entry->read_proc = zcrypt_status_read; |
1069 | zcrypt_entry->write_proc = zcrypt_status_write; | 1068 | zcrypt_entry->write_proc = zcrypt_status_write; |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index b97dd15bdb9a..ecca1046714e 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1511,8 +1511,7 @@ lcs_txbuffer_cb(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
1511 | LCS_DBF_TEXT(5, trace, "txbuffcb"); | 1511 | LCS_DBF_TEXT(5, trace, "txbuffcb"); |
1512 | /* Put buffer back to pool. */ | 1512 | /* Put buffer back to pool. */ |
1513 | lcs_release_buffer(channel, buffer); | 1513 | lcs_release_buffer(channel, buffer); |
1514 | card = (struct lcs_card *) | 1514 | card = container_of(channel, struct lcs_card, write); |
1515 | ((char *) channel - offsetof(struct lcs_card, write)); | ||
1516 | if (netif_queue_stopped(card->dev) && netif_carrier_ok(card->dev)) | 1515 | if (netif_queue_stopped(card->dev) && netif_carrier_ok(card->dev)) |
1517 | netif_wake_queue(card->dev); | 1516 | netif_wake_queue(card->dev); |
1518 | spin_lock(&card->lock); | 1517 | spin_lock(&card->lock); |
@@ -1810,8 +1809,7 @@ lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
1810 | LCS_DBF_TEXT(4, trace, "-eiogpkt"); | 1809 | LCS_DBF_TEXT(4, trace, "-eiogpkt"); |
1811 | return; | 1810 | return; |
1812 | } | 1811 | } |
1813 | card = (struct lcs_card *) | 1812 | card = container_of(channel, struct lcs_card, read); |
1814 | ((char *) channel - offsetof(struct lcs_card, read)); | ||
1815 | offset = 0; | 1813 | offset = 0; |
1816 | while (lcs_hdr->offset != 0) { | 1814 | while (lcs_hdr->offset != 0) { |
1817 | if (lcs_hdr->offset <= 0 || | 1815 | if (lcs_hdr->offset <= 0 || |
diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c index 640536ef77dc..9c3794310879 100644 --- a/drivers/scsi/53c7xx.c +++ b/drivers/scsi/53c7xx.c | |||
@@ -3099,7 +3099,6 @@ allocate_cmd (Scsi_Cmnd *cmd) { | |||
3099 | real = get_zeroed_page(GFP_ATOMIC); | 3099 | real = get_zeroed_page(GFP_ATOMIC); |
3100 | if (real == 0) | 3100 | if (real == 0) |
3101 | return NULL; | 3101 | return NULL; |
3102 | memset((void *)real, 0, 4096); | ||
3103 | cache_push(virt_to_phys((void *)real), 4096); | 3102 | cache_push(virt_to_phys((void *)real), 4096); |
3104 | cache_clear(virt_to_phys((void *)real), 4096); | 3103 | cache_clear(virt_to_phys((void *)real), 4096); |
3105 | kernel_set_cachemode((void *)real, 4096, IOMAP_NOCACHE_SER); | 3104 | kernel_set_cachemode((void *)real, 4096, IOMAP_NOCACHE_SER); |
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index da94e126ca83..0cd7eed9196c 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c | |||
@@ -1052,10 +1052,9 @@ static inline struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha, | |||
1052 | struct asd_ascb *ascb; | 1052 | struct asd_ascb *ascb; |
1053 | unsigned long flags; | 1053 | unsigned long flags; |
1054 | 1054 | ||
1055 | ascb = kmem_cache_alloc(asd_ascb_cache, gfp_flags); | 1055 | ascb = kmem_cache_zalloc(asd_ascb_cache, gfp_flags); |
1056 | 1056 | ||
1057 | if (ascb) { | 1057 | if (ascb) { |
1058 | memset(ascb, 0, sizeof(*ascb)); | ||
1059 | ascb->dma_scb.size = sizeof(struct scb); | 1058 | ascb->dma_scb.size = sizeof(struct scb); |
1060 | ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool, | 1059 | ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool, |
1061 | gfp_flags, | 1060 | gfp_flags, |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f02f48a882a9..a1cd6e6a292a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -388,10 +388,9 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, | |||
388 | int err = 0; | 388 | int err = 0; |
389 | int write = (data_direction == DMA_TO_DEVICE); | 389 | int write = (data_direction == DMA_TO_DEVICE); |
390 | 390 | ||
391 | sioc = kmem_cache_alloc(scsi_io_context_cache, gfp); | 391 | sioc = kmem_cache_zalloc(scsi_io_context_cache, gfp); |
392 | if (!sioc) | 392 | if (!sioc) |
393 | return DRIVER_ERROR << 24; | 393 | return DRIVER_ERROR << 24; |
394 | memset(sioc, 0, sizeof(*sioc)); | ||
395 | 394 | ||
396 | req = blk_get_request(sdev->request_queue, write, gfp); | 395 | req = blk_get_request(sdev->request_queue, write, gfp); |
397 | if (!req) | 396 | if (!req) |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 5261f0af8b10..2964ca9df5a0 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -920,12 +920,16 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags) | |||
920 | #ifdef __i386__ | 920 | #ifdef __i386__ |
921 | outb(0xff, 0x080); | 921 | outb(0xff, 0x080); |
922 | #endif | 922 | #endif |
923 | scratch2 = serial_inp(up, UART_IER); | 923 | /* |
924 | * Mask out IER[7:4] bits for test as some UARTs (e.g. TL | ||
925 | * 16C754B) allow only to modify them if an EFR bit is set. | ||
926 | */ | ||
927 | scratch2 = serial_inp(up, UART_IER) & 0x0f; | ||
924 | serial_outp(up, UART_IER, 0x0F); | 928 | serial_outp(up, UART_IER, 0x0F); |
925 | #ifdef __i386__ | 929 | #ifdef __i386__ |
926 | outb(0, 0x080); | 930 | outb(0, 0x080); |
927 | #endif | 931 | #endif |
928 | scratch3 = serial_inp(up, UART_IER); | 932 | scratch3 = serial_inp(up, UART_IER) & 0x0f; |
929 | serial_outp(up, UART_IER, scratch); | 933 | serial_outp(up, UART_IER, scratch); |
930 | if (scratch2 != 0 || scratch3 != 0x0F) { | 934 | if (scratch2 != 0 || scratch3 != 0x0F) { |
931 | /* | 935 | /* |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 52e2e64c6649..a2dac378bda9 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -679,6 +679,13 @@ static struct pci_serial_quirk pci_serial_quirks[] = { | |||
679 | */ | 679 | */ |
680 | { | 680 | { |
681 | .vendor = PCI_VENDOR_ID_PLX, | 681 | .vendor = PCI_VENDOR_ID_PLX, |
682 | .device = PCI_DEVICE_ID_PLX_9030, | ||
683 | .subvendor = PCI_SUBVENDOR_ID_PERLE, | ||
684 | .subdevice = PCI_ANY_ID, | ||
685 | .setup = pci_default_setup, | ||
686 | }, | ||
687 | { | ||
688 | .vendor = PCI_VENDOR_ID_PLX, | ||
682 | .device = PCI_DEVICE_ID_PLX_9050, | 689 | .device = PCI_DEVICE_ID_PLX_9050, |
683 | .subvendor = PCI_SUBVENDOR_ID_EXSYS, | 690 | .subvendor = PCI_SUBVENDOR_ID_EXSYS, |
684 | .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055, | 691 | .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055, |
@@ -936,6 +943,7 @@ enum pci_board_num_t { | |||
936 | 943 | ||
937 | pbn_b2_1_115200, | 944 | pbn_b2_1_115200, |
938 | pbn_b2_2_115200, | 945 | pbn_b2_2_115200, |
946 | pbn_b2_4_115200, | ||
939 | pbn_b2_8_115200, | 947 | pbn_b2_8_115200, |
940 | 948 | ||
941 | pbn_b2_1_460800, | 949 | pbn_b2_1_460800, |
@@ -1249,6 +1257,12 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
1249 | .base_baud = 115200, | 1257 | .base_baud = 115200, |
1250 | .uart_offset = 8, | 1258 | .uart_offset = 8, |
1251 | }, | 1259 | }, |
1260 | [pbn_b2_4_115200] = { | ||
1261 | .flags = FL_BASE2, | ||
1262 | .num_ports = 4, | ||
1263 | .base_baud = 115200, | ||
1264 | .uart_offset = 8, | ||
1265 | }, | ||
1252 | [pbn_b2_8_115200] = { | 1266 | [pbn_b2_8_115200] = { |
1253 | .flags = FL_BASE2, | 1267 | .flags = FL_BASE2, |
1254 | .num_ports = 8, | 1268 | .num_ports = 8, |
@@ -1990,6 +2004,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
1990 | { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM, | 2004 | { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM, |
1991 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 2005 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
1992 | pbn_panacom2 }, | 2006 | pbn_panacom2 }, |
2007 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, | ||
2008 | PCI_VENDOR_ID_ESDGMBH, | ||
2009 | PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0, | ||
2010 | pbn_b2_4_115200 }, | ||
1993 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, | 2011 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
1994 | PCI_SUBVENDOR_ID_CHASE_PCIFAST, | 2012 | PCI_SUBVENDOR_ID_CHASE_PCIFAST, |
1995 | PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0, | 2013 | PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0, |
@@ -2379,6 +2397,15 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
2379 | pbn_b2_2_115200 }, | 2397 | pbn_b2_2_115200 }, |
2380 | 2398 | ||
2381 | /* | 2399 | /* |
2400 | * Perle PCI-RAS cards | ||
2401 | */ | ||
2402 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, | ||
2403 | PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4, | ||
2404 | 0, 0, pbn_b2_4_921600 }, | ||
2405 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, | ||
2406 | PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8, | ||
2407 | 0, 0, pbn_b2_8_921600 }, | ||
2408 | /* | ||
2382 | * These entries match devices with class COMMUNICATION_SERIAL, | 2409 | * These entries match devices with class COMMUNICATION_SERIAL, |
2383 | * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL | 2410 | * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL |
2384 | */ | 2411 | */ |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 2978c09860ee..5cc6b91f8408 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -916,6 +916,11 @@ config SERIAL_TXX9 | |||
916 | config HAS_TXX9_SERIAL | 916 | config HAS_TXX9_SERIAL |
917 | bool | 917 | bool |
918 | 918 | ||
919 | config SERIAL_TXX9_NR_UARTS | ||
920 | int "Maximum number of TMPTX39XX/49XX SIO ports" | ||
921 | depends on SERIAL_TXX9 | ||
922 | default "6" | ||
923 | |||
919 | config SERIAL_TXX9_CONSOLE | 924 | config SERIAL_TXX9_CONSOLE |
920 | bool "TMPTX39XX/49XX SIO Console support" | 925 | bool "TMPTX39XX/49XX SIO Console support" |
921 | depends on SERIAL_TXX9=y | 926 | depends on SERIAL_TXX9=y |
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 42b050c46abe..312bef6bd583 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -3173,12 +3173,8 @@ do_softint(void *private_) | |||
3173 | if (!tty) | 3173 | if (!tty) |
3174 | return; | 3174 | return; |
3175 | 3175 | ||
3176 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { | 3176 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) |
3177 | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && | 3177 | tty_wakeup(tty); |
3178 | tty->ldisc.write_wakeup) | ||
3179 | (tty->ldisc.write_wakeup)(tty); | ||
3180 | wake_up_interruptible(&tty->write_wait); | ||
3181 | } | ||
3182 | } | 3178 | } |
3183 | 3179 | ||
3184 | static int | 3180 | static int |
@@ -3798,11 +3794,7 @@ rs_flush_buffer(struct tty_struct *tty) | |||
3798 | info->xmit.head = info->xmit.tail = 0; | 3794 | info->xmit.head = info->xmit.tail = 0; |
3799 | restore_flags(flags); | 3795 | restore_flags(flags); |
3800 | 3796 | ||
3801 | wake_up_interruptible(&tty->write_wait); | 3797 | tty_wakeup(tty); |
3802 | |||
3803 | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && | ||
3804 | tty->ldisc.write_wakeup) | ||
3805 | (tty->ldisc.write_wakeup)(tty); | ||
3806 | } | 3798 | } |
3807 | 3799 | ||
3808 | /* | 3800 | /* |
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index c862f67c985a..f540212e7409 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c | |||
@@ -2685,7 +2685,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd) | |||
2685 | free_irq(control->ic_irq, soft); | 2685 | free_irq(control->ic_irq, soft); |
2686 | if (soft->is_ioc4_serial_addr) { | 2686 | if (soft->is_ioc4_serial_addr) { |
2687 | iounmap(soft->is_ioc4_serial_addr); | 2687 | iounmap(soft->is_ioc4_serial_addr); |
2688 | release_region((unsigned long) | 2688 | release_mem_region((unsigned long) |
2689 | soft->is_ioc4_serial_addr, | 2689 | soft->is_ioc4_serial_addr, |
2690 | sizeof(struct ioc4_serial)); | 2690 | sizeof(struct ioc4_serial)); |
2691 | } | 2691 | } |
@@ -2790,7 +2790,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd) | |||
2790 | /* request serial registers */ | 2790 | /* request serial registers */ |
2791 | tmp_addr1 = idd->idd_bar0 + IOC4_SERIAL_OFFSET; | 2791 | tmp_addr1 = idd->idd_bar0 + IOC4_SERIAL_OFFSET; |
2792 | 2792 | ||
2793 | if (!request_region(tmp_addr1, sizeof(struct ioc4_serial), | 2793 | if (!request_mem_region(tmp_addr1, sizeof(struct ioc4_serial), |
2794 | "sioc4_uart")) { | 2794 | "sioc4_uart")) { |
2795 | printk(KERN_WARNING | 2795 | printk(KERN_WARNING |
2796 | "ioc4 (%p): unable to get request region for " | 2796 | "ioc4 (%p): unable to get request region for " |
@@ -2889,7 +2889,7 @@ out3: | |||
2889 | out2: | 2889 | out2: |
2890 | if (serial) | 2890 | if (serial) |
2891 | iounmap(serial); | 2891 | iounmap(serial); |
2892 | release_region(tmp_addr1, sizeof(struct ioc4_serial)); | 2892 | release_mem_region(tmp_addr1, sizeof(struct ioc4_serial)); |
2893 | out1: | 2893 | out1: |
2894 | 2894 | ||
2895 | return ret; | 2895 | return ret; |
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index 7186a82c4759..f4440d329310 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -37,6 +37,7 @@ | |||
37 | * 1.06 Do not insert a char caused previous overrun. | 37 | * 1.06 Do not insert a char caused previous overrun. |
38 | * Fix some spin_locks. | 38 | * Fix some spin_locks. |
39 | * Do not call uart_add_one_port for absent ports. | 39 | * Do not call uart_add_one_port for absent ports. |
40 | * 1.07 Use CONFIG_SERIAL_TXX9_NR_UARTS. Cleanup. | ||
40 | */ | 41 | */ |
41 | 42 | ||
42 | #if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 43 | #if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
@@ -58,9 +59,8 @@ | |||
58 | #include <linux/mutex.h> | 59 | #include <linux/mutex.h> |
59 | 60 | ||
60 | #include <asm/io.h> | 61 | #include <asm/io.h> |
61 | #include <asm/irq.h> | ||
62 | 62 | ||
63 | static char *serial_version = "1.06"; | 63 | static char *serial_version = "1.07"; |
64 | static char *serial_name = "TX39/49 Serial driver"; | 64 | static char *serial_name = "TX39/49 Serial driver"; |
65 | 65 | ||
66 | #define PASS_LIMIT 256 | 66 | #define PASS_LIMIT 256 |
@@ -88,12 +88,7 @@ static char *serial_name = "TX39/49 Serial driver"; | |||
88 | /* | 88 | /* |
89 | * Number of serial ports | 89 | * Number of serial ports |
90 | */ | 90 | */ |
91 | #ifdef ENABLE_SERIAL_TXX9_PCI | 91 | #define UART_NR CONFIG_SERIAL_TXX9_NR_UARTS |
92 | #define NR_PCI_BOARDS 4 | ||
93 | #define UART_NR (4 + NR_PCI_BOARDS) | ||
94 | #else | ||
95 | #define UART_NR 4 | ||
96 | #endif | ||
97 | 92 | ||
98 | #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) | 93 | #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) |
99 | 94 | ||
@@ -987,6 +982,7 @@ int __init early_serial_txx9_setup(struct uart_port *port) | |||
987 | } | 982 | } |
988 | 983 | ||
989 | #ifdef ENABLE_SERIAL_TXX9_PCI | 984 | #ifdef ENABLE_SERIAL_TXX9_PCI |
985 | #ifdef CONFIG_PM | ||
990 | /** | 986 | /** |
991 | * serial_txx9_suspend_port - suspend one serial port | 987 | * serial_txx9_suspend_port - suspend one serial port |
992 | * @line: serial line number | 988 | * @line: serial line number |
@@ -1008,6 +1004,7 @@ static void serial_txx9_resume_port(int line) | |||
1008 | { | 1004 | { |
1009 | uart_resume_port(&serial_txx9_reg, &serial_txx9_ports[line].port); | 1005 | uart_resume_port(&serial_txx9_reg, &serial_txx9_ports[line].port); |
1010 | } | 1006 | } |
1007 | #endif | ||
1011 | 1008 | ||
1012 | static DEFINE_MUTEX(serial_txx9_mutex); | 1009 | static DEFINE_MUTEX(serial_txx9_mutex); |
1013 | 1010 | ||
@@ -1118,6 +1115,7 @@ static void __devexit pciserial_txx9_remove_one(struct pci_dev *dev) | |||
1118 | } | 1115 | } |
1119 | } | 1116 | } |
1120 | 1117 | ||
1118 | #ifdef CONFIG_PM | ||
1121 | static int pciserial_txx9_suspend_one(struct pci_dev *dev, pm_message_t state) | 1119 | static int pciserial_txx9_suspend_one(struct pci_dev *dev, pm_message_t state) |
1122 | { | 1120 | { |
1123 | int line = (int)(long)pci_get_drvdata(dev); | 1121 | int line = (int)(long)pci_get_drvdata(dev); |
@@ -1142,11 +1140,10 @@ static int pciserial_txx9_resume_one(struct pci_dev *dev) | |||
1142 | } | 1140 | } |
1143 | return 0; | 1141 | return 0; |
1144 | } | 1142 | } |
1143 | #endif | ||
1145 | 1144 | ||
1146 | static struct pci_device_id serial_txx9_pci_tbl[] = { | 1145 | static const struct pci_device_id serial_txx9_pci_tbl[] = { |
1147 | { PCI_VENDOR_ID_TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC, | 1146 | { PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC) }, |
1148 | PCI_ANY_ID, PCI_ANY_ID, | ||
1149 | 0, 0, 0 }, | ||
1150 | { 0, } | 1147 | { 0, } |
1151 | }; | 1148 | }; |
1152 | 1149 | ||
@@ -1154,8 +1151,10 @@ static struct pci_driver serial_txx9_pci_driver = { | |||
1154 | .name = "serial_txx9", | 1151 | .name = "serial_txx9", |
1155 | .probe = pciserial_txx9_init_one, | 1152 | .probe = pciserial_txx9_init_one, |
1156 | .remove = __devexit_p(pciserial_txx9_remove_one), | 1153 | .remove = __devexit_p(pciserial_txx9_remove_one), |
1154 | #ifdef CONFIG_PM | ||
1157 | .suspend = pciserial_txx9_suspend_one, | 1155 | .suspend = pciserial_txx9_suspend_one, |
1158 | .resume = pciserial_txx9_resume_one, | 1156 | .resume = pciserial_txx9_resume_one, |
1157 | #endif | ||
1159 | .id_table = serial_txx9_pci_tbl, | 1158 | .id_table = serial_txx9_pci_tbl, |
1160 | }; | 1159 | }; |
1161 | 1160 | ||
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index cd6b65333b71..2dd6eed50aa0 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
@@ -654,7 +654,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
654 | ret = -ENODEV; | 654 | ret = -ENODEV; |
655 | goto out_pci; | 655 | goto out_pci; |
656 | } | 656 | } |
657 | if (!request_region(idd->pma, IOC3_PCI_SIZE, "ioc3")) { | 657 | if (!request_mem_region(idd->pma, IOC3_PCI_SIZE, "ioc3")) { |
658 | printk(KERN_WARNING | 658 | printk(KERN_WARNING |
659 | "%s: Unable to request IOC3 region " | 659 | "%s: Unable to request IOC3 region " |
660 | "for pci_dev %s.\n", | 660 | "for pci_dev %s.\n", |
@@ -744,7 +744,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
744 | return 0; | 744 | return 0; |
745 | 745 | ||
746 | out_misc_region: | 746 | out_misc_region: |
747 | release_region(idd->pma, IOC3_PCI_SIZE); | 747 | release_mem_region(idd->pma, IOC3_PCI_SIZE); |
748 | out_pci: | 748 | out_pci: |
749 | kfree(idd); | 749 | kfree(idd); |
750 | out_idd: | 750 | out_idd: |
@@ -785,7 +785,7 @@ static void ioc3_remove(struct pci_dev *pdev) | |||
785 | if(idd->dual_irq) | 785 | if(idd->dual_irq) |
786 | free_irq(idd->irq_eth, (void *)idd); | 786 | free_irq(idd->irq_eth, (void *)idd); |
787 | iounmap(idd->vma); | 787 | iounmap(idd->vma); |
788 | release_region(idd->pma, IOC3_PCI_SIZE); | 788 | release_mem_region(idd->pma, IOC3_PCI_SIZE); |
789 | 789 | ||
790 | /* Disable IOC3 and relinquish */ | 790 | /* Disable IOC3 and relinquish */ |
791 | pci_disable_device(pdev); | 791 | pci_disable_device(pdev); |
diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index fc3197273663..3d72aa5cfc71 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c | |||
@@ -626,10 +626,8 @@ static void do_softint(unsigned long private_) | |||
626 | if (!tty) | 626 | if (!tty) |
627 | return; | 627 | return; |
628 | 628 | ||
629 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) { | 629 | if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) |
630 | tty_wakeup(tty); | 630 | tty_wakeup(tty); |
631 | wake_up_interruptible(&tty->write_wait); | ||
632 | } | ||
633 | } | 631 | } |
634 | 632 | ||
635 | static int zs_startup(struct dec_serial * info) | 633 | static int zs_startup(struct dec_serial * info) |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index f04a29a46646..c6b6479fa4dd 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -1953,7 +1953,7 @@ static void invalidate_sub(struct lun *curlun) | |||
1953 | struct inode *inode = filp->f_path.dentry->d_inode; | 1953 | struct inode *inode = filp->f_path.dentry->d_inode; |
1954 | unsigned long rc; | 1954 | unsigned long rc; |
1955 | 1955 | ||
1956 | rc = invalidate_inode_pages(inode->i_mapping); | 1956 | rc = invalidate_mapping_pages(inode->i_mapping, 0, -1); |
1957 | VLDBG(curlun, "invalidate_inode_pages -> %ld\n", rc); | 1957 | VLDBG(curlun, "invalidate_inode_pages -> %ld\n", rc); |
1958 | } | 1958 | } |
1959 | 1959 | ||
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 408c3380d602..6ec8cf1a3ccb 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -1419,7 +1419,6 @@ int __devinit rndis_init (void) | |||
1419 | return -EIO; | 1419 | return -EIO; |
1420 | } | 1420 | } |
1421 | 1421 | ||
1422 | rndis_connect_state [i]->nlink = 1; | ||
1423 | rndis_connect_state [i]->write_proc = rndis_proc_write; | 1422 | rndis_connect_state [i]->write_proc = rndis_proc_write; |
1424 | rndis_connect_state [i]->read_proc = rndis_proc_read; | 1423 | rndis_connect_state [i]->read_proc = rndis_proc_read; |
1425 | rndis_connect_state [i]->data = (void *) | 1424 | rndis_connect_state [i]->data = (void *) |
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c index 282d82efc0b0..f0ffb8907f29 100644 --- a/drivers/usb/host/hc_crisv10.c +++ b/drivers/usb/host/hc_crisv10.c | |||
@@ -2163,9 +2163,8 @@ static void etrax_usb_add_to_bulk_sb_list(struct urb *urb, int epid) | |||
2163 | 2163 | ||
2164 | maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)); | 2164 | maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)); |
2165 | 2165 | ||
2166 | sb_desc = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG); | 2166 | sb_desc = kmem_cache_zalloc(usb_desc_cache, SLAB_FLAG); |
2167 | assert(sb_desc != NULL); | 2167 | assert(sb_desc != NULL); |
2168 | memset(sb_desc, 0, sizeof(USB_SB_Desc_t)); | ||
2169 | 2168 | ||
2170 | 2169 | ||
2171 | if (usb_pipeout(urb->pipe)) { | 2170 | if (usb_pipeout(urb->pipe)) { |
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index 2cbb239e63f8..68e66b33e726 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c | |||
@@ -624,12 +624,10 @@ static inline struct urb_priv *uhci_alloc_urb_priv(struct uhci_hcd *uhci, | |||
624 | { | 624 | { |
625 | struct urb_priv *urbp; | 625 | struct urb_priv *urbp; |
626 | 626 | ||
627 | urbp = kmem_cache_alloc(uhci_up_cachep, GFP_ATOMIC); | 627 | urbp = kmem_cache_zalloc(uhci_up_cachep, GFP_ATOMIC); |
628 | if (!urbp) | 628 | if (!urbp) |
629 | return NULL; | 629 | return NULL; |
630 | 630 | ||
631 | memset((void *)urbp, 0, sizeof(*urbp)); | ||
632 | |||
633 | urbp->urb = urb; | 631 | urbp->urb = urb; |
634 | urb->hcpriv = urbp; | 632 | urb->hcpriv = urbp; |
635 | 633 | ||
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 0b0fb51bad3e..d78692c01cfa 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c | |||
@@ -616,15 +616,7 @@ static void digi_wakeup_write_lock(struct work_struct *work) | |||
616 | 616 | ||
617 | static void digi_wakeup_write( struct usb_serial_port *port ) | 617 | static void digi_wakeup_write( struct usb_serial_port *port ) |
618 | { | 618 | { |
619 | 619 | tty_wakeup(port->tty); | |
620 | struct tty_struct *tty = port->tty; | ||
621 | |||
622 | |||
623 | /* wake up port processes */ | ||
624 | wake_up_interruptible( &port->write_wait ); | ||
625 | |||
626 | /* wake up line discipline */ | ||
627 | tty_wakeup(tty); | ||
628 | } | 620 | } |
629 | 621 | ||
630 | 622 | ||
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index da514cb785b3..dd0b66a6ed5d 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -182,13 +182,8 @@ static void keyspan_pda_wakeup_write(struct work_struct *work) | |||
182 | struct keyspan_pda_private *priv = | 182 | struct keyspan_pda_private *priv = |
183 | container_of(work, struct keyspan_pda_private, wakeup_work); | 183 | container_of(work, struct keyspan_pda_private, wakeup_work); |
184 | struct usb_serial_port *port = priv->port; | 184 | struct usb_serial_port *port = priv->port; |
185 | struct tty_struct *tty = port->tty; | ||
186 | 185 | ||
187 | /* wake up port processes */ | 186 | tty_wakeup(port->tty); |
188 | wake_up_interruptible( &port->write_wait ); | ||
189 | |||
190 | /* wake up line discipline */ | ||
191 | tty_wakeup(tty); | ||
192 | } | 187 | } |
193 | 188 | ||
194 | static void keyspan_pda_request_unthrottle(struct work_struct *work) | 189 | static void keyspan_pda_request_unthrottle(struct work_struct *work) |
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 6109c6704a73..2d588fb82573 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -269,18 +269,8 @@ static void mos7720_bulk_out_data_callback(struct urb *urb) | |||
269 | 269 | ||
270 | tty = mos7720_port->port->tty; | 270 | tty = mos7720_port->port->tty; |
271 | 271 | ||
272 | if (tty && mos7720_port->open) { | 272 | if (tty && mos7720_port->open) |
273 | /* let the tty driver wakeup if it has a special * | 273 | tty_wakeup(tty); |
274 | * write_wakeup function */ | ||
275 | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && | ||
276 | tty->ldisc.write_wakeup) | ||
277 | (tty->ldisc.write_wakeup)(tty); | ||
278 | |||
279 | /* tell the tty driver that something has changed */ | ||
280 | wake_up_interruptible(&tty->write_wait); | ||
281 | } | ||
282 | |||
283 | /* schedule_work(&mos7720_port->port->work); */ | ||
284 | } | 274 | } |
285 | 275 | ||
286 | /* | 276 | /* |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index b2264a87617b..c6cca859af45 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -755,18 +755,8 @@ static void mos7840_bulk_out_data_callback(struct urb *urb) | |||
755 | 755 | ||
756 | tty = mos7840_port->port->tty; | 756 | tty = mos7840_port->port->tty; |
757 | 757 | ||
758 | if (tty && mos7840_port->open) { | 758 | if (tty && mos7840_port->open) |
759 | /* let the tty driver wakeup if it has a special * | 759 | tty_wakeup(tty); |
760 | * write_wakeup function */ | ||
761 | |||
762 | if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) | ||
763 | && tty->ldisc.write_wakeup) { | ||
764 | (tty->ldisc.write_wakeup) (tty); | ||
765 | } | ||
766 | |||
767 | /* tell the tty driver that something has changed */ | ||
768 | wake_up_interruptible(&tty->write_wait); | ||
769 | } | ||
770 | 760 | ||
771 | } | 761 | } |
772 | 762 | ||
diff --git a/drivers/video/sa1100fb.h b/drivers/video/sa1100fb.h index 0b07f6ae3367..48066ef3af05 100644 --- a/drivers/video/sa1100fb.h +++ b/drivers/video/sa1100fb.h | |||
@@ -110,9 +110,7 @@ struct sa1100fb_info { | |||
110 | #endif | 110 | #endif |
111 | }; | 111 | }; |
112 | 112 | ||
113 | #define __type_entry(ptr,type,member) ((type *)((char *)(ptr)-offsetof(type,member))) | 113 | #define TO_INF(ptr,member) container_of(ptr,struct sa1100fb_info,member) |
114 | |||
115 | #define TO_INF(ptr,member) __type_entry(ptr,struct sa1100fb_info,member) | ||
116 | 114 | ||
117 | #define SA1100_PALETTE_MODE_VAL(bpp) (((bpp) & 0x018) << 9) | 115 | #define SA1100_PALETTE_MODE_VAL(bpp) (((bpp) & 0x018) << 9) |
118 | 116 | ||
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 9f17b0cacdd0..6c78343cf690 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c | |||
@@ -110,7 +110,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) | |||
110 | 110 | ||
111 | if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { | 111 | if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { |
112 | filemap_write_and_wait(inode->i_mapping); | 112 | filemap_write_and_wait(inode->i_mapping); |
113 | invalidate_inode_pages(&inode->i_data); | 113 | invalidate_mapping_pages(&inode->i_data, 0, -1); |
114 | } | 114 | } |
115 | 115 | ||
116 | return res; | 116 | return res; |
@@ -234,7 +234,7 @@ v9fs_file_write(struct file *filp, const char __user * data, | |||
234 | total += result; | 234 | total += result; |
235 | } while (count); | 235 | } while (count); |
236 | 236 | ||
237 | invalidate_inode_pages2(inode->i_mapping); | 237 | invalidate_inode_pages2(inode->i_mapping); |
238 | return total; | 238 | return total; |
239 | } | 239 | } |
240 | 240 | ||
diff --git a/fs/Kconfig b/fs/Kconfig index 5e8e9d9ccb33..11c59329ed06 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -674,12 +674,6 @@ config ZISOFS | |||
674 | necessary to create such a filesystem. Say Y here if you want to be | 674 | necessary to create such a filesystem. Say Y here if you want to be |
675 | able to read such compressed CD-ROMs. | 675 | able to read such compressed CD-ROMs. |
676 | 676 | ||
677 | config ZISOFS_FS | ||
678 | # for fs/nls/Config.in | ||
679 | tristate | ||
680 | depends on ZISOFS | ||
681 | default ISO9660_FS | ||
682 | |||
683 | config UDF_FS | 677 | config UDF_FS |
684 | tristate "UDF file system support" | 678 | tristate "UDF file system support" |
685 | help | 679 | help |
@@ -132,7 +132,7 @@ static int aio_setup_ring(struct kioctx *ctx) | |||
132 | dprintk("attempting mmap of %lu bytes\n", info->mmap_size); | 132 | dprintk("attempting mmap of %lu bytes\n", info->mmap_size); |
133 | down_write(&ctx->mm->mmap_sem); | 133 | down_write(&ctx->mm->mmap_sem); |
134 | info->mmap_base = do_mmap(NULL, 0, info->mmap_size, | 134 | info->mmap_base = do_mmap(NULL, 0, info->mmap_size, |
135 | PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, | 135 | PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, |
136 | 0); | 136 | 0); |
137 | if (IS_ERR((void *)info->mmap_base)) { | 137 | if (IS_ERR((void *)info->mmap_base)) { |
138 | up_write(&ctx->mm->mmap_sem); | 138 | up_write(&ctx->mm->mmap_sem); |
@@ -211,11 +211,10 @@ static struct kioctx *ioctx_alloc(unsigned nr_events) | |||
211 | if ((unsigned long)nr_events > aio_max_nr) | 211 | if ((unsigned long)nr_events > aio_max_nr) |
212 | return ERR_PTR(-EAGAIN); | 212 | return ERR_PTR(-EAGAIN); |
213 | 213 | ||
214 | ctx = kmem_cache_alloc(kioctx_cachep, GFP_KERNEL); | 214 | ctx = kmem_cache_zalloc(kioctx_cachep, GFP_KERNEL); |
215 | if (!ctx) | 215 | if (!ctx) |
216 | return ERR_PTR(-ENOMEM); | 216 | return ERR_PTR(-ENOMEM); |
217 | 217 | ||
218 | memset(ctx, 0, sizeof(*ctx)); | ||
219 | ctx->max_reqs = nr_events; | 218 | ctx->max_reqs = nr_events; |
220 | mm = ctx->mm = current->mm; | 219 | mm = ctx->mm = current->mm; |
221 | atomic_inc(&mm->mm_count); | 220 | atomic_inc(&mm->mm_count); |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index a4d933a51208..5810aa1339fd 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -372,7 +372,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, | |||
372 | down_write(¤t->mm->mmap_sem); | 372 | down_write(¤t->mm->mmap_sem); |
373 | current->mm->start_brk = do_mmap(NULL, 0, stack_size, | 373 | current->mm->start_brk = do_mmap(NULL, 0, stack_size, |
374 | PROT_READ | PROT_WRITE | PROT_EXEC, | 374 | PROT_READ | PROT_WRITE | PROT_EXEC, |
375 | MAP_PRIVATE | MAP_ANON | MAP_GROWSDOWN, | 375 | MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN, |
376 | 0); | 376 | 0); |
377 | 377 | ||
378 | if (IS_ERR_VALUE(current->mm->start_brk)) { | 378 | if (IS_ERR_VALUE(current->mm->start_brk)) { |
diff --git a/fs/buffer.c b/fs/buffer.c index 1ad674fd348c..7ff6e9346fae 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -78,6 +78,7 @@ EXPORT_SYMBOL(__lock_buffer); | |||
78 | 78 | ||
79 | void fastcall unlock_buffer(struct buffer_head *bh) | 79 | void fastcall unlock_buffer(struct buffer_head *bh) |
80 | { | 80 | { |
81 | smp_mb__before_clear_bit(); | ||
81 | clear_buffer_locked(bh); | 82 | clear_buffer_locked(bh); |
82 | smp_mb__after_clear_bit(); | 83 | smp_mb__after_clear_bit(); |
83 | wake_up_bit(&bh->b_state, BH_Lock); | 84 | wake_up_bit(&bh->b_state, BH_Lock); |
@@ -345,7 +346,7 @@ void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers) | |||
345 | * We really want to use invalidate_inode_pages2() for | 346 | * We really want to use invalidate_inode_pages2() for |
346 | * that, but not until that's cleaned up. | 347 | * that, but not until that's cleaned up. |
347 | */ | 348 | */ |
348 | invalidate_inode_pages(mapping); | 349 | invalidate_mapping_pages(mapping, 0, -1); |
349 | } | 350 | } |
350 | 351 | ||
351 | /* | 352 | /* |
diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 1c82e9a7d7c8..db3b1a9c9a5b 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/sysctl.h> | 16 | #include <linux/sysctl.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/seq_file.h> | ||
18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
19 | #include <linux/stat.h> | 20 | #include <linux/stat.h> |
20 | #include <linux/ctype.h> | 21 | #include <linux/ctype.h> |
@@ -84,15 +85,11 @@ static int do_reset_coda_cache_inv_stats( ctl_table * table, int write, | |||
84 | return 0; | 85 | return 0; |
85 | } | 86 | } |
86 | 87 | ||
87 | static int coda_vfs_stats_get_info( char * buffer, char ** start, | 88 | static int proc_vfs_stats_show(struct seq_file *m, void *v) |
88 | off_t offset, int length) | ||
89 | { | 89 | { |
90 | int len=0; | ||
91 | off_t begin; | ||
92 | struct coda_vfs_stats * ps = & coda_vfs_stat; | 90 | struct coda_vfs_stats * ps = & coda_vfs_stat; |
93 | 91 | ||
94 | /* this works as long as we are below 1024 characters! */ | 92 | seq_printf(m, |
95 | len += sprintf( buffer, | ||
96 | "Coda VFS statistics\n" | 93 | "Coda VFS statistics\n" |
97 | "===================\n\n" | 94 | "===================\n\n" |
98 | "File Operations:\n" | 95 | "File Operations:\n" |
@@ -132,28 +129,14 @@ static int coda_vfs_stats_get_info( char * buffer, char ** start, | |||
132 | ps->rmdir, | 129 | ps->rmdir, |
133 | ps->rename, | 130 | ps->rename, |
134 | ps->permission); | 131 | ps->permission); |
135 | 132 | return 0; | |
136 | begin = offset; | ||
137 | *start = buffer + begin; | ||
138 | len -= begin; | ||
139 | |||
140 | if ( len > length ) | ||
141 | len = length; | ||
142 | if ( len < 0 ) | ||
143 | len = 0; | ||
144 | |||
145 | return len; | ||
146 | } | 133 | } |
147 | 134 | ||
148 | static int coda_cache_inv_stats_get_info( char * buffer, char ** start, | 135 | static int proc_cache_inv_stats_show(struct seq_file *m, void *v) |
149 | off_t offset, int length) | ||
150 | { | 136 | { |
151 | int len=0; | ||
152 | off_t begin; | ||
153 | struct coda_cache_inv_stats * ps = & coda_cache_inv_stat; | 137 | struct coda_cache_inv_stats * ps = & coda_cache_inv_stat; |
154 | 138 | ||
155 | /* this works as long as we are below 1024 characters! */ | 139 | seq_printf(m, |
156 | len += sprintf( buffer, | ||
157 | "Coda cache invalidation statistics\n" | 140 | "Coda cache invalidation statistics\n" |
158 | "==================================\n\n" | 141 | "==================================\n\n" |
159 | "flush\t\t%9d\n" | 142 | "flush\t\t%9d\n" |
@@ -170,19 +153,35 @@ static int coda_cache_inv_stats_get_info( char * buffer, char ** start, | |||
170 | ps->zap_vnode, | 153 | ps->zap_vnode, |
171 | ps->purge_fid, | 154 | ps->purge_fid, |
172 | ps->replace ); | 155 | ps->replace ); |
173 | 156 | return 0; | |
174 | begin = offset; | 157 | } |
175 | *start = buffer + begin; | ||
176 | len -= begin; | ||
177 | 158 | ||
178 | if ( len > length ) | 159 | static int proc_vfs_stats_open(struct inode *inode, struct file *file) |
179 | len = length; | 160 | { |
180 | if ( len < 0 ) | 161 | return single_open(file, proc_vfs_stats_show, NULL); |
181 | len = 0; | 162 | } |
182 | 163 | ||
183 | return len; | 164 | static int proc_cache_inv_stats_open(struct inode *inode, struct file *file) |
165 | { | ||
166 | return single_open(file, proc_cache_inv_stats_show, NULL); | ||
184 | } | 167 | } |
185 | 168 | ||
169 | static const struct file_operations proc_vfs_stats_fops = { | ||
170 | .owner = THIS_MODULE, | ||
171 | .open = proc_vfs_stats_open, | ||
172 | .read = seq_read, | ||
173 | .llseek = seq_lseek, | ||
174 | .release = single_release, | ||
175 | }; | ||
176 | |||
177 | static const struct file_operations proc_cache_inv_stats_fops = { | ||
178 | .owner = THIS_MODULE, | ||
179 | .open = proc_cache_inv_stats_open, | ||
180 | .read = seq_read, | ||
181 | .llseek = seq_lseek, | ||
182 | .release = single_release, | ||
183 | }; | ||
184 | |||
186 | static ctl_table coda_table[] = { | 185 | static ctl_table coda_table[] = { |
187 | {CODA_TIMEOUT, "timeout", &coda_timeout, sizeof(int), 0644, NULL, &proc_dointvec}, | 186 | {CODA_TIMEOUT, "timeout", &coda_timeout, sizeof(int), 0644, NULL, &proc_dointvec}, |
188 | {CODA_HARD, "hard", &coda_hard, sizeof(int), 0644, NULL, &proc_dointvec}, | 187 | {CODA_HARD, "hard", &coda_hard, sizeof(int), 0644, NULL, &proc_dointvec}, |
@@ -212,9 +211,6 @@ static struct proc_dir_entry* proc_fs_coda; | |||
212 | 211 | ||
213 | #endif | 212 | #endif |
214 | 213 | ||
215 | #define coda_proc_create(name,get_info) \ | ||
216 | create_proc_info_entry(name, 0, proc_fs_coda, get_info) | ||
217 | |||
218 | void coda_sysctl_init(void) | 214 | void coda_sysctl_init(void) |
219 | { | 215 | { |
220 | reset_coda_vfs_stats(); | 216 | reset_coda_vfs_stats(); |
@@ -223,9 +219,15 @@ void coda_sysctl_init(void) | |||
223 | #ifdef CONFIG_PROC_FS | 219 | #ifdef CONFIG_PROC_FS |
224 | proc_fs_coda = proc_mkdir("coda", proc_root_fs); | 220 | proc_fs_coda = proc_mkdir("coda", proc_root_fs); |
225 | if (proc_fs_coda) { | 221 | if (proc_fs_coda) { |
222 | struct proc_dir_entry *pde; | ||
223 | |||
226 | proc_fs_coda->owner = THIS_MODULE; | 224 | proc_fs_coda->owner = THIS_MODULE; |
227 | coda_proc_create("vfs_stats", coda_vfs_stats_get_info); | 225 | pde = create_proc_entry("vfs_stats", 0, proc_fs_coda); |
228 | coda_proc_create("cache_inv_stats", coda_cache_inv_stats_get_info); | 226 | if (pde) |
227 | pde->proc_fops = &proc_vfs_stats_fops; | ||
228 | pde = create_proc_entry("cache_inv_stats", 0, proc_fs_coda); | ||
229 | if (pde) | ||
230 | pde->proc_fops = &proc_cache_inv_stats_fops; | ||
229 | } | 231 | } |
230 | #endif | 232 | #endif |
231 | 233 | ||
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 1814ba446809..9371ee209954 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
@@ -72,11 +72,10 @@ static struct configfs_dirent *configfs_new_dirent(struct configfs_dirent * pare | |||
72 | { | 72 | { |
73 | struct configfs_dirent * sd; | 73 | struct configfs_dirent * sd; |
74 | 74 | ||
75 | sd = kmem_cache_alloc(configfs_dir_cachep, GFP_KERNEL); | 75 | sd = kmem_cache_zalloc(configfs_dir_cachep, GFP_KERNEL); |
76 | if (!sd) | 76 | if (!sd) |
77 | return NULL; | 77 | return NULL; |
78 | 78 | ||
79 | memset(sd, 0, sizeof(*sd)); | ||
80 | atomic_set(&sd->s_count, 1); | 79 | atomic_set(&sd->s_count, 1); |
81 | INIT_LIST_HEAD(&sd->s_links); | 80 | INIT_LIST_HEAD(&sd->s_links); |
82 | INIT_LIST_HEAD(&sd->s_children); | 81 | INIT_LIST_HEAD(&sd->s_children); |
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c index 5352b03ff5aa..f858fef6e41c 100644 --- a/fs/dlm/memory.c +++ b/fs/dlm/memory.c | |||
@@ -76,9 +76,7 @@ struct dlm_lkb *allocate_lkb(struct dlm_ls *ls) | |||
76 | { | 76 | { |
77 | struct dlm_lkb *lkb; | 77 | struct dlm_lkb *lkb; |
78 | 78 | ||
79 | lkb = kmem_cache_alloc(lkb_cache, GFP_KERNEL); | 79 | lkb = kmem_cache_zalloc(lkb_cache, GFP_KERNEL); |
80 | if (lkb) | ||
81 | memset(lkb, 0, sizeof(*lkb)); | ||
82 | return lkb; | 80 | return lkb; |
83 | } | 81 | } |
84 | 82 | ||
diff --git a/fs/dquot.c b/fs/dquot.c index 0952cc474d9a..a561fb29e203 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -600,11 +600,10 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type) | |||
600 | { | 600 | { |
601 | struct dquot *dquot; | 601 | struct dquot *dquot; |
602 | 602 | ||
603 | dquot = kmem_cache_alloc(dquot_cachep, GFP_NOFS); | 603 | dquot = kmem_cache_zalloc(dquot_cachep, GFP_NOFS); |
604 | if(!dquot) | 604 | if(!dquot) |
605 | return NODQUOT; | 605 | return NODQUOT; |
606 | 606 | ||
607 | memset((caddr_t)dquot, 0, sizeof(struct dquot)); | ||
608 | mutex_init(&dquot->dq_lock); | 607 | mutex_init(&dquot->dq_lock); |
609 | INIT_LIST_HEAD(&dquot->dq_free); | 608 | INIT_LIST_HEAD(&dquot->dq_free); |
610 | INIT_LIST_HEAD(&dquot->dq_inuse); | 609 | INIT_LIST_HEAD(&dquot->dq_inuse); |
diff --git a/fs/drop_caches.c b/fs/drop_caches.c index 4e4762389bdc..03ea7696fe39 100644 --- a/fs/drop_caches.c +++ b/fs/drop_caches.c | |||
@@ -20,7 +20,7 @@ static void drop_pagecache_sb(struct super_block *sb) | |||
20 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { | 20 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { |
21 | if (inode->i_state & (I_FREEING|I_WILL_FREE)) | 21 | if (inode->i_state & (I_FREEING|I_WILL_FREE)) |
22 | continue; | 22 | continue; |
23 | invalidate_inode_pages(inode->i_mapping); | 23 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
24 | } | 24 | } |
25 | spin_unlock(&inode_lock); | 25 | spin_unlock(&inode_lock); |
26 | } | 26 | } |
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index a86a55ccf874..75bbfae55081 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -1332,13 +1332,13 @@ int ecryptfs_write_headers(struct dentry *ecryptfs_dentry, | |||
1332 | goto out; | 1332 | goto out; |
1333 | } | 1333 | } |
1334 | /* Released in this function */ | 1334 | /* Released in this function */ |
1335 | page_virt = kmem_cache_alloc(ecryptfs_header_cache_0, GFP_USER); | 1335 | page_virt = kmem_cache_zalloc(ecryptfs_header_cache_0, GFP_USER); |
1336 | if (!page_virt) { | 1336 | if (!page_virt) { |
1337 | ecryptfs_printk(KERN_ERR, "Out of memory\n"); | 1337 | ecryptfs_printk(KERN_ERR, "Out of memory\n"); |
1338 | rc = -ENOMEM; | 1338 | rc = -ENOMEM; |
1339 | goto out; | 1339 | goto out; |
1340 | } | 1340 | } |
1341 | memset(page_virt, 0, PAGE_CACHE_SIZE); | 1341 | |
1342 | rc = ecryptfs_write_headers_virt(page_virt, crypt_stat, | 1342 | rc = ecryptfs_write_headers_virt(page_virt, crypt_stat, |
1343 | ecryptfs_dentry); | 1343 | ecryptfs_dentry); |
1344 | if (unlikely(rc)) { | 1344 | if (unlikely(rc)) { |
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index c5a2e5298f15..779c3477d93c 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -251,7 +251,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
251 | int lower_flags; | 251 | int lower_flags; |
252 | 252 | ||
253 | /* Released in ecryptfs_release or end of function if failure */ | 253 | /* Released in ecryptfs_release or end of function if failure */ |
254 | file_info = kmem_cache_alloc(ecryptfs_file_info_cache, GFP_KERNEL); | 254 | file_info = kmem_cache_zalloc(ecryptfs_file_info_cache, GFP_KERNEL); |
255 | ecryptfs_set_file_private(file, file_info); | 255 | ecryptfs_set_file_private(file, file_info); |
256 | if (!file_info) { | 256 | if (!file_info) { |
257 | ecryptfs_printk(KERN_ERR, | 257 | ecryptfs_printk(KERN_ERR, |
@@ -259,7 +259,6 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
259 | rc = -ENOMEM; | 259 | rc = -ENOMEM; |
260 | goto out; | 260 | goto out; |
261 | } | 261 | } |
262 | memset(file_info, 0, sizeof(*file_info)); | ||
263 | lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); | 262 | lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); |
264 | crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; | 263 | crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat; |
265 | mount_crypt_stat = &ecryptfs_superblock_to_private( | 264 | mount_crypt_stat = &ecryptfs_superblock_to_private( |
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 11f5e5076aef..d4f02f3e18d7 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -361,8 +361,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
361 | goto out; | 361 | goto out; |
362 | } | 362 | } |
363 | /* Released in this function */ | 363 | /* Released in this function */ |
364 | page_virt = | 364 | page_virt = kmem_cache_zalloc(ecryptfs_header_cache_2, |
365 | (char *)kmem_cache_alloc(ecryptfs_header_cache_2, | ||
366 | GFP_USER); | 365 | GFP_USER); |
367 | if (!page_virt) { | 366 | if (!page_virt) { |
368 | rc = -ENOMEM; | 367 | rc = -ENOMEM; |
@@ -370,7 +369,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, | |||
370 | "Cannot ecryptfs_kmalloc a page\n"); | 369 | "Cannot ecryptfs_kmalloc a page\n"); |
371 | goto out_dput; | 370 | goto out_dput; |
372 | } | 371 | } |
373 | memset(page_virt, 0, PAGE_CACHE_SIZE); | 372 | |
374 | rc = ecryptfs_read_header_region(page_virt, lower_dentry, nd->mnt); | 373 | rc = ecryptfs_read_header_region(page_virt, lower_dentry, nd->mnt); |
375 | crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat; | 374 | crypt_stat = &ecryptfs_inode_to_private(dentry->d_inode)->crypt_stat; |
376 | if (!ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_POLICY_APPLIED)) | 375 | if (!ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_POLICY_APPLIED)) |
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 745c0f1bfbbd..80bccd5ff8e6 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -207,14 +207,12 @@ parse_tag_3_packet(struct ecryptfs_crypt_stat *crypt_stat, | |||
207 | /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or | 207 | /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or |
208 | * at end of function upon failure */ | 208 | * at end of function upon failure */ |
209 | auth_tok_list_item = | 209 | auth_tok_list_item = |
210 | kmem_cache_alloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL); | 210 | kmem_cache_zalloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL); |
211 | if (!auth_tok_list_item) { | 211 | if (!auth_tok_list_item) { |
212 | ecryptfs_printk(KERN_ERR, "Unable to allocate memory\n"); | 212 | ecryptfs_printk(KERN_ERR, "Unable to allocate memory\n"); |
213 | rc = -ENOMEM; | 213 | rc = -ENOMEM; |
214 | goto out; | 214 | goto out; |
215 | } | 215 | } |
216 | memset(auth_tok_list_item, 0, | ||
217 | sizeof(struct ecryptfs_auth_tok_list_item)); | ||
218 | (*new_auth_tok) = &auth_tok_list_item->auth_tok; | 216 | (*new_auth_tok) = &auth_tok_list_item->auth_tok; |
219 | 217 | ||
220 | /* check for body size - one to two bytes */ | 218 | /* check for body size - one to two bytes */ |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index d0541ae8faba..fe41ab1566ee 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -378,15 +378,13 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
378 | 378 | ||
379 | /* Released in ecryptfs_put_super() */ | 379 | /* Released in ecryptfs_put_super() */ |
380 | ecryptfs_set_superblock_private(sb, | 380 | ecryptfs_set_superblock_private(sb, |
381 | kmem_cache_alloc(ecryptfs_sb_info_cache, | 381 | kmem_cache_zalloc(ecryptfs_sb_info_cache, |
382 | GFP_KERNEL)); | 382 | GFP_KERNEL)); |
383 | if (!ecryptfs_superblock_to_private(sb)) { | 383 | if (!ecryptfs_superblock_to_private(sb)) { |
384 | ecryptfs_printk(KERN_WARNING, "Out of memory\n"); | 384 | ecryptfs_printk(KERN_WARNING, "Out of memory\n"); |
385 | rc = -ENOMEM; | 385 | rc = -ENOMEM; |
386 | goto out; | 386 | goto out; |
387 | } | 387 | } |
388 | memset(ecryptfs_superblock_to_private(sb), 0, | ||
389 | sizeof(struct ecryptfs_sb_info)); | ||
390 | sb->s_op = &ecryptfs_sops; | 388 | sb->s_op = &ecryptfs_sops; |
391 | /* Released through deactivate_super(sb) from get_sb_nodev */ | 389 | /* Released through deactivate_super(sb) from get_sb_nodev */ |
392 | sb->s_root = d_alloc(NULL, &(const struct qstr) { | 390 | sb->s_root = d_alloc(NULL, &(const struct qstr) { |
@@ -402,7 +400,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
402 | /* Released in d_release when dput(sb->s_root) is called */ | 400 | /* Released in d_release when dput(sb->s_root) is called */ |
403 | /* through deactivate_super(sb) from get_sb_nodev() */ | 401 | /* through deactivate_super(sb) from get_sb_nodev() */ |
404 | ecryptfs_set_dentry_private(sb->s_root, | 402 | ecryptfs_set_dentry_private(sb->s_root, |
405 | kmem_cache_alloc(ecryptfs_dentry_info_cache, | 403 | kmem_cache_zalloc(ecryptfs_dentry_info_cache, |
406 | GFP_KERNEL)); | 404 | GFP_KERNEL)); |
407 | if (!ecryptfs_dentry_to_private(sb->s_root)) { | 405 | if (!ecryptfs_dentry_to_private(sb->s_root)) { |
408 | ecryptfs_printk(KERN_ERR, | 406 | ecryptfs_printk(KERN_ERR, |
@@ -410,8 +408,6 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
410 | rc = -ENOMEM; | 408 | rc = -ENOMEM; |
411 | goto out; | 409 | goto out; |
412 | } | 410 | } |
413 | memset(ecryptfs_dentry_to_private(sb->s_root), 0, | ||
414 | sizeof(struct ecryptfs_dentry_info)); | ||
415 | rc = 0; | 411 | rc = 0; |
416 | out: | 412 | out: |
417 | /* Should be able to rely on deactivate_super called from | 413 | /* Should be able to rely on deactivate_super called from |
@@ -405,12 +405,10 @@ int setup_arg_pages(struct linux_binprm *bprm, | |||
405 | bprm->loader += stack_base; | 405 | bprm->loader += stack_base; |
406 | bprm->exec += stack_base; | 406 | bprm->exec += stack_base; |
407 | 407 | ||
408 | mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); | 408 | mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
409 | if (!mpnt) | 409 | if (!mpnt) |
410 | return -ENOMEM; | 410 | return -ENOMEM; |
411 | 411 | ||
412 | memset(mpnt, 0, sizeof(*mpnt)); | ||
413 | |||
414 | down_write(&mm->mmap_sem); | 412 | down_write(&mm->mmap_sem); |
415 | { | 413 | { |
416 | mpnt->vm_mm = mm; | 414 | mpnt->vm_mm = mm; |
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 0b02ba9642d2..e89bfc8cf957 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c | |||
@@ -368,6 +368,14 @@ struct ext2_dir_entry_2 * ext2_find_entry (struct inode * dir, | |||
368 | } | 368 | } |
369 | if (++n >= npages) | 369 | if (++n >= npages) |
370 | n = 0; | 370 | n = 0; |
371 | /* next page is past the blocks we've got */ | ||
372 | if (unlikely(n > (dir->i_blocks >> (PAGE_CACHE_SHIFT - 9)))) { | ||
373 | ext2_error(dir->i_sb, __FUNCTION__, | ||
374 | "dir %lu size %lld exceeds block count %llu", | ||
375 | dir->i_ino, dir->i_size, | ||
376 | (unsigned long long)dir->i_blocks); | ||
377 | goto out; | ||
378 | } | ||
371 | } while (n != start); | 379 | } while (n != start); |
372 | out: | 380 | out: |
373 | return NULL; | 381 | return NULL; |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 6347c2dbdd81..daaa243eee9b 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -708,10 +708,14 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) | |||
708 | set_opt(sbi->s_mount_opt, GRPID); | 708 | set_opt(sbi->s_mount_opt, GRPID); |
709 | if (def_mount_opts & EXT2_DEFM_UID16) | 709 | if (def_mount_opts & EXT2_DEFM_UID16) |
710 | set_opt(sbi->s_mount_opt, NO_UID32); | 710 | set_opt(sbi->s_mount_opt, NO_UID32); |
711 | #ifdef CONFIG_EXT2_FS_XATTR | ||
711 | if (def_mount_opts & EXT2_DEFM_XATTR_USER) | 712 | if (def_mount_opts & EXT2_DEFM_XATTR_USER) |
712 | set_opt(sbi->s_mount_opt, XATTR_USER); | 713 | set_opt(sbi->s_mount_opt, XATTR_USER); |
714 | #endif | ||
715 | #ifdef CONFIG_EXT2_FS_POSIX_ACL | ||
713 | if (def_mount_opts & EXT2_DEFM_ACL) | 716 | if (def_mount_opts & EXT2_DEFM_ACL) |
714 | set_opt(sbi->s_mount_opt, POSIX_ACL); | 717 | set_opt(sbi->s_mount_opt, POSIX_ACL); |
718 | #endif | ||
715 | 719 | ||
716 | if (le16_to_cpu(sbi->s_es->s_errors) == EXT2_ERRORS_PANIC) | 720 | if (le16_to_cpu(sbi->s_es->s_errors) == EXT2_ERRORS_PANIC) |
717 | set_opt(sbi->s_mount_opt, ERRORS_PANIC); | 721 | set_opt(sbi->s_mount_opt, ERRORS_PANIC); |
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index beaf25f5112f..8a824f4ce5c6 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -947,7 +947,7 @@ out: | |||
947 | static int ext3_get_block(struct inode *inode, sector_t iblock, | 947 | static int ext3_get_block(struct inode *inode, sector_t iblock, |
948 | struct buffer_head *bh_result, int create) | 948 | struct buffer_head *bh_result, int create) |
949 | { | 949 | { |
950 | handle_t *handle = journal_current_handle(); | 950 | handle_t *handle = ext3_journal_current_handle(); |
951 | int ret = 0; | 951 | int ret = 0; |
952 | unsigned max_blocks = bh_result->b_size >> inode->i_blkbits; | 952 | unsigned max_blocks = bh_result->b_size >> inode->i_blkbits; |
953 | 953 | ||
@@ -1717,7 +1717,7 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, | |||
1717 | /* | 1717 | /* |
1718 | * Reacquire the handle: ext3_get_block() can restart the transaction | 1718 | * Reacquire the handle: ext3_get_block() can restart the transaction |
1719 | */ | 1719 | */ |
1720 | handle = journal_current_handle(); | 1720 | handle = ext3_journal_current_handle(); |
1721 | 1721 | ||
1722 | out_stop: | 1722 | out_stop: |
1723 | if (handle) { | 1723 | if (handle) { |
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 4df39c4315e1..a8e89328e66d 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -1618,21 +1618,6 @@ static int ext3_delete_entry (handle_t *handle, | |||
1618 | return -ENOENT; | 1618 | return -ENOENT; |
1619 | } | 1619 | } |
1620 | 1620 | ||
1621 | /* | ||
1622 | * ext3_mark_inode_dirty is somewhat expensive, so unlike ext2 we | ||
1623 | * do not perform it in these functions. We perform it at the call site, | ||
1624 | * if it is needed. | ||
1625 | */ | ||
1626 | static inline void ext3_inc_count(handle_t *handle, struct inode *inode) | ||
1627 | { | ||
1628 | inc_nlink(inode); | ||
1629 | } | ||
1630 | |||
1631 | static inline void ext3_dec_count(handle_t *handle, struct inode *inode) | ||
1632 | { | ||
1633 | drop_nlink(inode); | ||
1634 | } | ||
1635 | |||
1636 | static int ext3_add_nondir(handle_t *handle, | 1621 | static int ext3_add_nondir(handle_t *handle, |
1637 | struct dentry *dentry, struct inode *inode) | 1622 | struct dentry *dentry, struct inode *inode) |
1638 | { | 1623 | { |
@@ -1642,7 +1627,7 @@ static int ext3_add_nondir(handle_t *handle, | |||
1642 | d_instantiate(dentry, inode); | 1627 | d_instantiate(dentry, inode); |
1643 | return 0; | 1628 | return 0; |
1644 | } | 1629 | } |
1645 | ext3_dec_count(handle, inode); | 1630 | drop_nlink(inode); |
1646 | iput(inode); | 1631 | iput(inode); |
1647 | return err; | 1632 | return err; |
1648 | } | 1633 | } |
@@ -2163,7 +2148,7 @@ retry: | |||
2163 | err = __page_symlink(inode, symname, l, | 2148 | err = __page_symlink(inode, symname, l, |
2164 | mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); | 2149 | mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); |
2165 | if (err) { | 2150 | if (err) { |
2166 | ext3_dec_count(handle, inode); | 2151 | drop_nlink(inode); |
2167 | ext3_mark_inode_dirty(handle, inode); | 2152 | ext3_mark_inode_dirty(handle, inode); |
2168 | iput (inode); | 2153 | iput (inode); |
2169 | goto out_stop; | 2154 | goto out_stop; |
@@ -2191,6 +2176,12 @@ static int ext3_link (struct dentry * old_dentry, | |||
2191 | 2176 | ||
2192 | if (inode->i_nlink >= EXT3_LINK_MAX) | 2177 | if (inode->i_nlink >= EXT3_LINK_MAX) |
2193 | return -EMLINK; | 2178 | return -EMLINK; |
2179 | /* | ||
2180 | * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing | ||
2181 | * otherwise has the potential to corrupt the orphan inode list. | ||
2182 | */ | ||
2183 | if (inode->i_nlink == 0) | ||
2184 | return -ENOENT; | ||
2194 | 2185 | ||
2195 | retry: | 2186 | retry: |
2196 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + | 2187 | handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS(dir->i_sb) + |
@@ -2202,7 +2193,7 @@ retry: | |||
2202 | handle->h_sync = 1; | 2193 | handle->h_sync = 1; |
2203 | 2194 | ||
2204 | inode->i_ctime = CURRENT_TIME_SEC; | 2195 | inode->i_ctime = CURRENT_TIME_SEC; |
2205 | ext3_inc_count(handle, inode); | 2196 | inc_nlink(inode); |
2206 | atomic_inc(&inode->i_count); | 2197 | atomic_inc(&inode->i_count); |
2207 | 2198 | ||
2208 | err = ext3_add_nondir(handle, dentry, inode); | 2199 | err = ext3_add_nondir(handle, dentry, inode); |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index b34886734a44..a0623a84a4b2 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -1459,10 +1459,14 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) | |||
1459 | set_opt(sbi->s_mount_opt, GRPID); | 1459 | set_opt(sbi->s_mount_opt, GRPID); |
1460 | if (def_mount_opts & EXT3_DEFM_UID16) | 1460 | if (def_mount_opts & EXT3_DEFM_UID16) |
1461 | set_opt(sbi->s_mount_opt, NO_UID32); | 1461 | set_opt(sbi->s_mount_opt, NO_UID32); |
1462 | #ifdef CONFIG_EXT3_FS_XATTR | ||
1462 | if (def_mount_opts & EXT3_DEFM_XATTR_USER) | 1463 | if (def_mount_opts & EXT3_DEFM_XATTR_USER) |
1463 | set_opt(sbi->s_mount_opt, XATTR_USER); | 1464 | set_opt(sbi->s_mount_opt, XATTR_USER); |
1465 | #endif | ||
1466 | #ifdef CONFIG_EXT3_FS_POSIX_ACL | ||
1464 | if (def_mount_opts & EXT3_DEFM_ACL) | 1467 | if (def_mount_opts & EXT3_DEFM_ACL) |
1465 | set_opt(sbi->s_mount_opt, POSIX_ACL); | 1468 | set_opt(sbi->s_mount_opt, POSIX_ACL); |
1469 | #endif | ||
1466 | if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_DATA) | 1470 | if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_DATA) |
1467 | sbi->s_mount_opt |= EXT3_MOUNT_JOURNAL_DATA; | 1471 | sbi->s_mount_opt |= EXT3_MOUNT_JOURNAL_DATA; |
1468 | else if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_ORDERED) | 1472 | else if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_ORDERED) |
@@ -2344,6 +2348,22 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) | |||
2344 | err = -EROFS; | 2348 | err = -EROFS; |
2345 | goto restore_opts; | 2349 | goto restore_opts; |
2346 | } | 2350 | } |
2351 | |||
2352 | /* | ||
2353 | * If we have an unprocessed orphan list hanging | ||
2354 | * around from a previously readonly bdev mount, | ||
2355 | * require a full umount/remount for now. | ||
2356 | */ | ||
2357 | if (es->s_last_orphan) { | ||
2358 | printk(KERN_WARNING "EXT3-fs: %s: couldn't " | ||
2359 | "remount RDWR because of unprocessed " | ||
2360 | "orphan inode list. Please " | ||
2361 | "umount/remount instead.\n", | ||
2362 | sb->s_id); | ||
2363 | err = -EINVAL; | ||
2364 | goto restore_opts; | ||
2365 | } | ||
2366 | |||
2347 | /* | 2367 | /* |
2348 | * Mounting a RDONLY partition read-write, so reread | 2368 | * Mounting a RDONLY partition read-write, so reread |
2349 | * and store the current valid flag. (It may have | 2369 | * and store the current valid flag. (It may have |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index a127cc03c9fa..fbff4b9e122a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -946,7 +946,7 @@ out: | |||
946 | static int ext4_get_block(struct inode *inode, sector_t iblock, | 946 | static int ext4_get_block(struct inode *inode, sector_t iblock, |
947 | struct buffer_head *bh_result, int create) | 947 | struct buffer_head *bh_result, int create) |
948 | { | 948 | { |
949 | handle_t *handle = journal_current_handle(); | 949 | handle_t *handle = ext4_journal_current_handle(); |
950 | int ret = 0; | 950 | int ret = 0; |
951 | unsigned max_blocks = bh_result->b_size >> inode->i_blkbits; | 951 | unsigned max_blocks = bh_result->b_size >> inode->i_blkbits; |
952 | 952 | ||
@@ -1716,7 +1716,7 @@ static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb, | |||
1716 | /* | 1716 | /* |
1717 | * Reacquire the handle: ext4_get_block() can restart the transaction | 1717 | * Reacquire the handle: ext4_get_block() can restart the transaction |
1718 | */ | 1718 | */ |
1719 | handle = journal_current_handle(); | 1719 | handle = ext4_journal_current_handle(); |
1720 | 1720 | ||
1721 | out_stop: | 1721 | out_stop: |
1722 | if (handle) { | 1722 | if (handle) { |
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index e5a74a5ac261..34b3448b40f9 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -1616,21 +1616,6 @@ static int ext4_delete_entry (handle_t *handle, | |||
1616 | return -ENOENT; | 1616 | return -ENOENT; |
1617 | } | 1617 | } |
1618 | 1618 | ||
1619 | /* | ||
1620 | * ext4_mark_inode_dirty is somewhat expensive, so unlike ext2 we | ||
1621 | * do not perform it in these functions. We perform it at the call site, | ||
1622 | * if it is needed. | ||
1623 | */ | ||
1624 | static inline void ext4_inc_count(handle_t *handle, struct inode *inode) | ||
1625 | { | ||
1626 | inc_nlink(inode); | ||
1627 | } | ||
1628 | |||
1629 | static inline void ext4_dec_count(handle_t *handle, struct inode *inode) | ||
1630 | { | ||
1631 | drop_nlink(inode); | ||
1632 | } | ||
1633 | |||
1634 | static int ext4_add_nondir(handle_t *handle, | 1619 | static int ext4_add_nondir(handle_t *handle, |
1635 | struct dentry *dentry, struct inode *inode) | 1620 | struct dentry *dentry, struct inode *inode) |
1636 | { | 1621 | { |
@@ -1640,7 +1625,7 @@ static int ext4_add_nondir(handle_t *handle, | |||
1640 | d_instantiate(dentry, inode); | 1625 | d_instantiate(dentry, inode); |
1641 | return 0; | 1626 | return 0; |
1642 | } | 1627 | } |
1643 | ext4_dec_count(handle, inode); | 1628 | drop_nlink(inode); |
1644 | iput(inode); | 1629 | iput(inode); |
1645 | return err; | 1630 | return err; |
1646 | } | 1631 | } |
@@ -2161,7 +2146,7 @@ retry: | |||
2161 | err = __page_symlink(inode, symname, l, | 2146 | err = __page_symlink(inode, symname, l, |
2162 | mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); | 2147 | mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS); |
2163 | if (err) { | 2148 | if (err) { |
2164 | ext4_dec_count(handle, inode); | 2149 | drop_nlink(inode); |
2165 | ext4_mark_inode_dirty(handle, inode); | 2150 | ext4_mark_inode_dirty(handle, inode); |
2166 | iput (inode); | 2151 | iput (inode); |
2167 | goto out_stop; | 2152 | goto out_stop; |
@@ -2189,6 +2174,12 @@ static int ext4_link (struct dentry * old_dentry, | |||
2189 | 2174 | ||
2190 | if (inode->i_nlink >= EXT4_LINK_MAX) | 2175 | if (inode->i_nlink >= EXT4_LINK_MAX) |
2191 | return -EMLINK; | 2176 | return -EMLINK; |
2177 | /* | ||
2178 | * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing | ||
2179 | * otherwise has the potential to corrupt the orphan inode list. | ||
2180 | */ | ||
2181 | if (inode->i_nlink == 0) | ||
2182 | return -ENOENT; | ||
2192 | 2183 | ||
2193 | retry: | 2184 | retry: |
2194 | handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + | 2185 | handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + |
@@ -2200,7 +2191,7 @@ retry: | |||
2200 | handle->h_sync = 1; | 2191 | handle->h_sync = 1; |
2201 | 2192 | ||
2202 | inode->i_ctime = CURRENT_TIME_SEC; | 2193 | inode->i_ctime = CURRENT_TIME_SEC; |
2203 | ext4_inc_count(handle, inode); | 2194 | inc_nlink(inode); |
2204 | atomic_inc(&inode->i_count); | 2195 | atomic_inc(&inode->i_count); |
2205 | 2196 | ||
2206 | err = ext4_add_nondir(handle, dentry, inode); | 2197 | err = ext4_add_nondir(handle, dentry, inode); |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 486a641ca71b..c63a18b574dd 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1518,10 +1518,14 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
1518 | set_opt(sbi->s_mount_opt, GRPID); | 1518 | set_opt(sbi->s_mount_opt, GRPID); |
1519 | if (def_mount_opts & EXT4_DEFM_UID16) | 1519 | if (def_mount_opts & EXT4_DEFM_UID16) |
1520 | set_opt(sbi->s_mount_opt, NO_UID32); | 1520 | set_opt(sbi->s_mount_opt, NO_UID32); |
1521 | #ifdef CONFIG_EXT4DEV_FS_XATTR | ||
1521 | if (def_mount_opts & EXT4_DEFM_XATTR_USER) | 1522 | if (def_mount_opts & EXT4_DEFM_XATTR_USER) |
1522 | set_opt(sbi->s_mount_opt, XATTR_USER); | 1523 | set_opt(sbi->s_mount_opt, XATTR_USER); |
1524 | #endif | ||
1525 | #ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | ||
1523 | if (def_mount_opts & EXT4_DEFM_ACL) | 1526 | if (def_mount_opts & EXT4_DEFM_ACL) |
1524 | set_opt(sbi->s_mount_opt, POSIX_ACL); | 1527 | set_opt(sbi->s_mount_opt, POSIX_ACL); |
1528 | #endif | ||
1525 | if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA) | 1529 | if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA) |
1526 | sbi->s_mount_opt |= EXT4_MOUNT_JOURNAL_DATA; | 1530 | sbi->s_mount_opt |= EXT4_MOUNT_JOURNAL_DATA; |
1527 | else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED) | 1531 | else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED) |
@@ -2419,6 +2423,22 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data) | |||
2419 | err = -EROFS; | 2423 | err = -EROFS; |
2420 | goto restore_opts; | 2424 | goto restore_opts; |
2421 | } | 2425 | } |
2426 | |||
2427 | /* | ||
2428 | * If we have an unprocessed orphan list hanging | ||
2429 | * around from a previously readonly bdev mount, | ||
2430 | * require a full umount/remount for now. | ||
2431 | */ | ||
2432 | if (es->s_last_orphan) { | ||
2433 | printk(KERN_WARNING "EXT4-fs: %s: couldn't " | ||
2434 | "remount RDWR because of unprocessed " | ||
2435 | "orphan inode list. Please " | ||
2436 | "umount/remount instead.\n", | ||
2437 | sb->s_id); | ||
2438 | err = -EINVAL; | ||
2439 | goto restore_opts; | ||
2440 | } | ||
2441 | |||
2422 | /* | 2442 | /* |
2423 | * Mounting a RDONLY partition read-write, so reread | 2443 | * Mounting a RDONLY partition read-write, so reread |
2424 | * and store the current valid flag. (It may have | 2444 | * and store the current valid flag. (It may have |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index f63efe1337ec..2fd06927e851 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -69,7 +69,7 @@ void fuse_finish_open(struct inode *inode, struct file *file, | |||
69 | if (outarg->open_flags & FOPEN_DIRECT_IO) | 69 | if (outarg->open_flags & FOPEN_DIRECT_IO) |
70 | file->f_op = &fuse_direct_io_file_operations; | 70 | file->f_op = &fuse_direct_io_file_operations; |
71 | if (!(outarg->open_flags & FOPEN_KEEP_CACHE)) | 71 | if (!(outarg->open_flags & FOPEN_KEEP_CACHE)) |
72 | invalidate_inode_pages(inode->i_mapping); | 72 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
73 | ff->fh = outarg->fh; | 73 | ff->fh = outarg->fh; |
74 | file->private_data = ff; | 74 | file->private_data = ff; |
75 | } | 75 | } |
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 12450d2b320e..220255110d76 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -112,7 +112,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr) | |||
112 | { | 112 | { |
113 | struct fuse_conn *fc = get_fuse_conn(inode); | 113 | struct fuse_conn *fc = get_fuse_conn(inode); |
114 | if (S_ISREG(inode->i_mode) && i_size_read(inode) != attr->size) | 114 | if (S_ISREG(inode->i_mode) && i_size_read(inode) != attr->size) |
115 | invalidate_inode_pages(inode->i_mapping); | 115 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
116 | 116 | ||
117 | inode->i_ino = attr->ino; | 117 | inode->i_ino = attr->ino; |
118 | inode->i_mode = (inode->i_mode & S_IFMT) + (attr->mode & 07777); | 118 | inode->i_mode = (inode->i_mode & S_IFMT) + (attr->mode & 07777); |
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 0e34d9918973..e62d4f620c58 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -282,8 +282,7 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, | |||
282 | return; | 282 | return; |
283 | } | 283 | } |
284 | 284 | ||
285 | bd = kmem_cache_alloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL), | 285 | bd = kmem_cache_zalloc(gfs2_bufdata_cachep, GFP_NOFS | __GFP_NOFAIL), |
286 | memset(bd, 0, sizeof(struct gfs2_bufdata)); | ||
287 | bd->bd_bh = bh; | 286 | bd->bd_bh = bh; |
288 | bd->bd_gl = gl; | 287 | bd->bd_gl = gl; |
289 | 288 | ||
diff --git a/fs/hfs/hfs.h b/fs/hfs/hfs.h index 88099ab1a180..1445e3a56ed4 100644 --- a/fs/hfs/hfs.h +++ b/fs/hfs/hfs.h | |||
@@ -83,8 +83,6 @@ | |||
83 | 83 | ||
84 | /*======== HFS structures as they appear on the disk ========*/ | 84 | /*======== HFS structures as they appear on the disk ========*/ |
85 | 85 | ||
86 | #define __packed __attribute__ ((packed)) | ||
87 | |||
88 | /* Pascal-style string of up to 31 characters */ | 86 | /* Pascal-style string of up to 31 characters */ |
89 | struct hfs_name { | 87 | struct hfs_name { |
90 | u8 len; | 88 | u8 len; |
diff --git a/fs/hfsplus/hfsplus_raw.h b/fs/hfsplus/hfsplus_raw.h index 49205531a500..fe99fe8db61a 100644 --- a/fs/hfsplus/hfsplus_raw.h +++ b/fs/hfsplus/hfsplus_raw.h | |||
@@ -15,8 +15,6 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | #define __packed __attribute__ ((packed)) | ||
19 | |||
20 | /* Some constants */ | 18 | /* Some constants */ |
21 | #define HFSPLUS_SECTOR_SIZE 512 | 19 | #define HFSPLUS_SECTOR_SIZE 512 |
22 | #define HFSPLUS_SECTOR_SHIFT 9 | 20 | #define HFSPLUS_SECTOR_SHIFT 9 |
diff --git a/fs/inode.c b/fs/inode.c index bf21dc6d0dbd..e6d93070f140 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -414,7 +414,8 @@ static void prune_icache(int nr_to_scan) | |||
414 | __iget(inode); | 414 | __iget(inode); |
415 | spin_unlock(&inode_lock); | 415 | spin_unlock(&inode_lock); |
416 | if (remove_inode_buffers(inode)) | 416 | if (remove_inode_buffers(inode)) |
417 | reap += invalidate_inode_pages(&inode->i_data); | 417 | reap += invalidate_mapping_pages(&inode->i_data, |
418 | 0, -1); | ||
418 | iput(inode); | 419 | iput(inode); |
419 | spin_lock(&inode_lock); | 420 | spin_lock(&inode_lock); |
420 | 421 | ||
@@ -709,7 +710,7 @@ EXPORT_SYMBOL(iunique); | |||
709 | struct inode *igrab(struct inode *inode) | 710 | struct inode *igrab(struct inode *inode) |
710 | { | 711 | { |
711 | spin_lock(&inode_lock); | 712 | spin_lock(&inode_lock); |
712 | if (!(inode->i_state & (I_FREEING|I_WILL_FREE))) | 713 | if (!(inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE))) |
713 | __iget(inode); | 714 | __iget(inode); |
714 | else | 715 | else |
715 | /* | 716 | /* |
@@ -1160,11 +1161,9 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry) | |||
1160 | struct inode *inode = dentry->d_inode; | 1161 | struct inode *inode = dentry->d_inode; |
1161 | struct timespec now; | 1162 | struct timespec now; |
1162 | 1163 | ||
1163 | if (IS_RDONLY(inode)) | ||
1164 | return; | ||
1165 | if (inode->i_flags & S_NOATIME) | 1164 | if (inode->i_flags & S_NOATIME) |
1166 | return; | 1165 | return; |
1167 | if (inode->i_sb->s_flags & MS_NOATIME) | 1166 | if (IS_NOATIME(inode)) |
1168 | return; | 1167 | return; |
1169 | if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) | 1168 | if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) |
1170 | return; | 1169 | return; |
diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 43baa1afa021..6ee206688502 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c | |||
@@ -296,7 +296,7 @@ jffs_setattr(struct dentry *dentry, struct iattr *iattr) | |||
296 | inode->i_blocks = (inode->i_size + 511) >> 9; | 296 | inode->i_blocks = (inode->i_size + 511) >> 9; |
297 | 297 | ||
298 | if (len) { | 298 | if (len) { |
299 | invalidate_inode_pages(inode->i_mapping); | 299 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
300 | } | 300 | } |
301 | inode->i_ctime = CURRENT_TIME_SEC; | 301 | inode->i_ctime = CURRENT_TIME_SEC; |
302 | inode->i_mtime = inode->i_ctime; | 302 | inode->i_mtime = inode->i_ctime; |
@@ -1518,7 +1518,7 @@ jffs_file_write(struct file *filp, const char *buf, size_t count, | |||
1518 | } | 1518 | } |
1519 | inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; | 1519 | inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; |
1520 | mark_inode_dirty(inode); | 1520 | mark_inode_dirty(inode); |
1521 | invalidate_inode_pages(inode->i_mapping); | 1521 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
1522 | 1522 | ||
1523 | out_isem: | 1523 | out_isem: |
1524 | return err; | 1524 | return err; |
diff --git a/fs/namespace.c b/fs/namespace.c index 5ef336c1103c..fd999cab7b57 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -53,9 +53,8 @@ static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) | |||
53 | 53 | ||
54 | struct vfsmount *alloc_vfsmnt(const char *name) | 54 | struct vfsmount *alloc_vfsmnt(const char *name) |
55 | { | 55 | { |
56 | struct vfsmount *mnt = kmem_cache_alloc(mnt_cache, GFP_KERNEL); | 56 | struct vfsmount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL); |
57 | if (mnt) { | 57 | if (mnt) { |
58 | memset(mnt, 0, sizeof(struct vfsmount)); | ||
59 | atomic_set(&mnt->mnt_count, 1); | 58 | atomic_set(&mnt->mnt_count, 1); |
60 | INIT_LIST_HEAD(&mnt->mnt_hash); | 59 | INIT_LIST_HEAD(&mnt->mnt_hash); |
61 | INIT_LIST_HEAD(&mnt->mnt_child); | 60 | INIT_LIST_HEAD(&mnt->mnt_child); |
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c index d964d1f90dec..4ccec4cd1367 100644 --- a/fs/partitions/msdos.c +++ b/fs/partitions/msdos.c | |||
@@ -63,15 +63,25 @@ msdos_magic_present(unsigned char *p) | |||
63 | #define AIX_LABEL_MAGIC4 0xC1 | 63 | #define AIX_LABEL_MAGIC4 0xC1 |
64 | static int aix_magic_present(unsigned char *p, struct block_device *bdev) | 64 | static int aix_magic_present(unsigned char *p, struct block_device *bdev) |
65 | { | 65 | { |
66 | struct partition *pt = (struct partition *) (p + 0x1be); | ||
66 | Sector sect; | 67 | Sector sect; |
67 | unsigned char *d; | 68 | unsigned char *d; |
68 | int ret = 0; | 69 | int slot, ret = 0; |
69 | 70 | ||
70 | if (p[0] != AIX_LABEL_MAGIC1 && | 71 | if (!(p[0] == AIX_LABEL_MAGIC1 && |
71 | p[1] != AIX_LABEL_MAGIC2 && | 72 | p[1] == AIX_LABEL_MAGIC2 && |
72 | p[2] != AIX_LABEL_MAGIC3 && | 73 | p[2] == AIX_LABEL_MAGIC3 && |
73 | p[3] != AIX_LABEL_MAGIC4) | 74 | p[3] == AIX_LABEL_MAGIC4)) |
74 | return 0; | 75 | return 0; |
76 | /* Assume the partition table is valid if Linux partitions exists */ | ||
77 | for (slot = 1; slot <= 4; slot++, pt++) { | ||
78 | if (pt->sys_ind == LINUX_SWAP_PARTITION || | ||
79 | pt->sys_ind == LINUX_RAID_PARTITION || | ||
80 | pt->sys_ind == LINUX_DATA_PARTITION || | ||
81 | pt->sys_ind == LINUX_LVM_PARTITION || | ||
82 | is_extended_partition(pt)) | ||
83 | return 0; | ||
84 | } | ||
75 | d = read_dev_sector(bdev, 7, §); | 85 | d = read_dev_sector(bdev, 7, §); |
76 | if (d) { | 86 | if (d) { |
77 | if (d[0] == '_' && d[1] == 'L' && d[2] == 'V' && d[3] == 'M') | 87 | if (d[0] == '_' && d[1] == 'L' && d[2] == 'V' && d[3] == 'M') |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 1a979ea3b379..7fb37d6f2864 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1810,17 +1810,21 @@ static int proc_base_fill_cache(struct file *filp, void *dirent, filldir_t filld | |||
1810 | static int proc_pid_io_accounting(struct task_struct *task, char *buffer) | 1810 | static int proc_pid_io_accounting(struct task_struct *task, char *buffer) |
1811 | { | 1811 | { |
1812 | return sprintf(buffer, | 1812 | return sprintf(buffer, |
1813 | #ifdef CONFIG_TASK_XACCT | ||
1813 | "rchar: %llu\n" | 1814 | "rchar: %llu\n" |
1814 | "wchar: %llu\n" | 1815 | "wchar: %llu\n" |
1815 | "syscr: %llu\n" | 1816 | "syscr: %llu\n" |
1816 | "syscw: %llu\n" | 1817 | "syscw: %llu\n" |
1818 | #endif | ||
1817 | "read_bytes: %llu\n" | 1819 | "read_bytes: %llu\n" |
1818 | "write_bytes: %llu\n" | 1820 | "write_bytes: %llu\n" |
1819 | "cancelled_write_bytes: %llu\n", | 1821 | "cancelled_write_bytes: %llu\n", |
1822 | #ifdef CONFIG_TASK_XACCT | ||
1820 | (unsigned long long)task->rchar, | 1823 | (unsigned long long)task->rchar, |
1821 | (unsigned long long)task->wchar, | 1824 | (unsigned long long)task->wchar, |
1822 | (unsigned long long)task->syscr, | 1825 | (unsigned long long)task->syscr, |
1823 | (unsigned long long)task->syscw, | 1826 | (unsigned long long)task->syscw, |
1827 | #endif | ||
1824 | (unsigned long long)task->ioac.read_bytes, | 1828 | (unsigned long long)task->ioac.read_bytes, |
1825 | (unsigned long long)task->ioac.write_bytes, | 1829 | (unsigned long long)task->ioac.write_bytes, |
1826 | (unsigned long long)task->ioac.cancelled_write_bytes); | 1830 | (unsigned long long)task->ioac.cancelled_write_bytes); |
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index b37ce33f67ea..5e2d4359c292 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -121,16 +121,11 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
121 | { | 121 | { |
122 | struct sysinfo i; | 122 | struct sysinfo i; |
123 | int len; | 123 | int len; |
124 | unsigned long inactive; | ||
125 | unsigned long active; | ||
126 | unsigned long free; | ||
127 | unsigned long committed; | 124 | unsigned long committed; |
128 | unsigned long allowed; | 125 | unsigned long allowed; |
129 | struct vmalloc_info vmi; | 126 | struct vmalloc_info vmi; |
130 | long cached; | 127 | long cached; |
131 | 128 | ||
132 | get_zone_counts(&active, &inactive, &free); | ||
133 | |||
134 | /* | 129 | /* |
135 | * display in kilobytes. | 130 | * display in kilobytes. |
136 | */ | 131 | */ |
@@ -187,8 +182,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
187 | K(i.bufferram), | 182 | K(i.bufferram), |
188 | K(cached), | 183 | K(cached), |
189 | K(total_swapcache_pages), | 184 | K(total_swapcache_pages), |
190 | K(active), | 185 | K(global_page_state(NR_ACTIVE)), |
191 | K(inactive), | 186 | K(global_page_state(NR_INACTIVE)), |
192 | #ifdef CONFIG_HIGHMEM | 187 | #ifdef CONFIG_HIGHMEM |
193 | K(i.totalhigh), | 188 | K(i.totalhigh), |
194 | K(i.freehigh), | 189 | K(i.freehigh), |
@@ -672,7 +667,6 @@ void create_seq_entry(char *name, mode_t mode, const struct file_operations *f) | |||
672 | 667 | ||
673 | void __init proc_misc_init(void) | 668 | void __init proc_misc_init(void) |
674 | { | 669 | { |
675 | struct proc_dir_entry *entry; | ||
676 | static struct { | 670 | static struct { |
677 | char *name; | 671 | char *name; |
678 | int (*read_proc)(char*,char**,off_t,int,int*,void*); | 672 | int (*read_proc)(char*,char**,off_t,int,int*,void*); |
@@ -700,9 +694,12 @@ void __init proc_misc_init(void) | |||
700 | 694 | ||
701 | /* And now for trickier ones */ | 695 | /* And now for trickier ones */ |
702 | #ifdef CONFIG_PRINTK | 696 | #ifdef CONFIG_PRINTK |
703 | entry = create_proc_entry("kmsg", S_IRUSR, &proc_root); | 697 | { |
704 | if (entry) | 698 | struct proc_dir_entry *entry; |
705 | entry->proc_fops = &proc_kmsg_operations; | 699 | entry = create_proc_entry("kmsg", S_IRUSR, &proc_root); |
700 | if (entry) | ||
701 | entry->proc_fops = &proc_kmsg_operations; | ||
702 | } | ||
706 | #endif | 703 | #endif |
707 | create_seq_entry("devices", 0, &proc_devinfo_operations); | 704 | create_seq_entry("devices", 0, &proc_devinfo_operations); |
708 | create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations); | 705 | create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations); |
@@ -743,8 +740,11 @@ void __init proc_misc_init(void) | |||
743 | proc_vmcore->proc_fops = &proc_vmcore_operations; | 740 | proc_vmcore->proc_fops = &proc_vmcore_operations; |
744 | #endif | 741 | #endif |
745 | #ifdef CONFIG_MAGIC_SYSRQ | 742 | #ifdef CONFIG_MAGIC_SYSRQ |
746 | entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL); | 743 | { |
747 | if (entry) | 744 | struct proc_dir_entry *entry; |
748 | entry->proc_fops = &proc_sysrq_trigger_operations; | 745 | entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL); |
746 | if (entry) | ||
747 | entry->proc_fops = &proc_sysrq_trigger_operations; | ||
748 | } | ||
749 | #endif | 749 | #endif |
750 | } | 750 | } |
diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c index 54ebbc84207f..b935a3dd4b65 100644 --- a/fs/ramfs/file-mmu.c +++ b/fs/ramfs/file-mmu.c | |||
@@ -31,7 +31,7 @@ const struct address_space_operations ramfs_aops = { | |||
31 | .readpage = simple_readpage, | 31 | .readpage = simple_readpage, |
32 | .prepare_write = simple_prepare_write, | 32 | .prepare_write = simple_prepare_write, |
33 | .commit_write = simple_commit_write, | 33 | .commit_write = simple_commit_write, |
34 | .set_page_dirty = __set_page_dirty_nobuffers, | 34 | .set_page_dirty = __set_page_dirty_no_writeback, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | const struct file_operations ramfs_file_operations = { | 37 | const struct file_operations ramfs_file_operations = { |
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index e9d6c4733282..d05e09ac9a99 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c | |||
@@ -32,7 +32,7 @@ const struct address_space_operations ramfs_aops = { | |||
32 | .readpage = simple_readpage, | 32 | .readpage = simple_readpage, |
33 | .prepare_write = simple_prepare_write, | 33 | .prepare_write = simple_prepare_write, |
34 | .commit_write = simple_commit_write, | 34 | .commit_write = simple_commit_write, |
35 | .set_page_dirty = __set_page_dirty_nobuffers, | 35 | .set_page_dirty = __set_page_dirty_no_writeback, |
36 | }; | 36 | }; |
37 | 37 | ||
38 | const struct file_operations ramfs_file_operations = { | 38 | const struct file_operations ramfs_file_operations = { |
diff --git a/fs/read_write.c b/fs/read_write.c index 707ac21700d3..bcb0ef2aae3d 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -274,9 +274,9 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) | |||
274 | ret = do_sync_read(file, buf, count, pos); | 274 | ret = do_sync_read(file, buf, count, pos); |
275 | if (ret > 0) { | 275 | if (ret > 0) { |
276 | fsnotify_access(file->f_path.dentry); | 276 | fsnotify_access(file->f_path.dentry); |
277 | current->rchar += ret; | 277 | add_rchar(current, ret); |
278 | } | 278 | } |
279 | current->syscr++; | 279 | inc_syscr(current); |
280 | } | 280 | } |
281 | } | 281 | } |
282 | 282 | ||
@@ -332,9 +332,9 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ | |||
332 | ret = do_sync_write(file, buf, count, pos); | 332 | ret = do_sync_write(file, buf, count, pos); |
333 | if (ret > 0) { | 333 | if (ret > 0) { |
334 | fsnotify_modify(file->f_path.dentry); | 334 | fsnotify_modify(file->f_path.dentry); |
335 | current->wchar += ret; | 335 | add_wchar(current, ret); |
336 | } | 336 | } |
337 | current->syscw++; | 337 | inc_syscw(current); |
338 | } | 338 | } |
339 | } | 339 | } |
340 | 340 | ||
@@ -675,8 +675,8 @@ sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) | |||
675 | } | 675 | } |
676 | 676 | ||
677 | if (ret > 0) | 677 | if (ret > 0) |
678 | current->rchar += ret; | 678 | add_rchar(current, ret); |
679 | current->syscr++; | 679 | inc_syscr(current); |
680 | return ret; | 680 | return ret; |
681 | } | 681 | } |
682 | 682 | ||
@@ -696,8 +696,8 @@ sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) | |||
696 | } | 696 | } |
697 | 697 | ||
698 | if (ret > 0) | 698 | if (ret > 0) |
699 | current->wchar += ret; | 699 | add_wchar(current, ret); |
700 | current->syscw++; | 700 | inc_syscw(current); |
701 | return ret; | 701 | return ret; |
702 | } | 702 | } |
703 | 703 | ||
@@ -779,12 +779,12 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, | |||
779 | retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file); | 779 | retval = in_file->f_op->sendfile(in_file, ppos, count, file_send_actor, out_file); |
780 | 780 | ||
781 | if (retval > 0) { | 781 | if (retval > 0) { |
782 | current->rchar += retval; | 782 | add_rchar(current, retval); |
783 | current->wchar += retval; | 783 | add_wchar(current, retval); |
784 | } | 784 | } |
785 | current->syscr++; | ||
786 | current->syscw++; | ||
787 | 785 | ||
786 | inc_syscr(current); | ||
787 | inc_syscw(current); | ||
788 | if (*ppos > max) | 788 | if (*ppos > max) |
789 | retval = -EOVERFLOW; | 789 | retval = -EOVERFLOW; |
790 | 790 | ||
diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index a4bcae8a9aff..42261dbdf60f 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c | |||
@@ -61,7 +61,7 @@ static struct smb_request *smb_do_alloc_request(struct smb_sb_info *server, | |||
61 | struct smb_request *req; | 61 | struct smb_request *req; |
62 | unsigned char *buf = NULL; | 62 | unsigned char *buf = NULL; |
63 | 63 | ||
64 | req = kmem_cache_alloc(req_cachep, GFP_KERNEL); | 64 | req = kmem_cache_zalloc(req_cachep, GFP_KERNEL); |
65 | VERBOSE("allocating request: %p\n", req); | 65 | VERBOSE("allocating request: %p\n", req); |
66 | if (!req) | 66 | if (!req) |
67 | goto out; | 67 | goto out; |
@@ -74,7 +74,6 @@ static struct smb_request *smb_do_alloc_request(struct smb_sb_info *server, | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | memset(req, 0, sizeof(struct smb_request)); | ||
78 | req->rq_buffer = buf; | 77 | req->rq_buffer = buf; |
79 | req->rq_bufsize = bufsize; | 78 | req->rq_bufsize = bufsize; |
80 | req->rq_server = server; | 79 | req->rq_server = server; |
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 9dcdf556c99c..9e95e7abaf69 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -37,11 +37,10 @@ static struct sysfs_dirent * __sysfs_new_dirent(void * element) | |||
37 | { | 37 | { |
38 | struct sysfs_dirent * sd; | 38 | struct sysfs_dirent * sd; |
39 | 39 | ||
40 | sd = kmem_cache_alloc(sysfs_dir_cachep, GFP_KERNEL); | 40 | sd = kmem_cache_zalloc(sysfs_dir_cachep, GFP_KERNEL); |
41 | if (!sd) | 41 | if (!sd) |
42 | return NULL; | 42 | return NULL; |
43 | 43 | ||
44 | memset(sd, 0, sizeof(*sd)); | ||
45 | atomic_set(&sd->s_count, 1); | 44 | atomic_set(&sd->s_count, 1); |
46 | atomic_set(&sd->s_event, 1); | 45 | atomic_set(&sd->s_event, 1); |
47 | INIT_LIST_HEAD(&sd->s_children); | 46 | INIT_LIST_HEAD(&sd->s_children); |
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index 5f24c755f577..90d7c35d2867 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h | |||
@@ -49,7 +49,6 @@ | |||
49 | #define MADV_DOFORK 11 /* do inherit across fork */ | 49 | #define MADV_DOFORK 11 /* do inherit across fork */ |
50 | 50 | ||
51 | /* compatibility flags */ | 51 | /* compatibility flags */ |
52 | #define MAP_ANON MAP_ANONYMOUS | ||
53 | #define MAP_FILE 0 | 52 | #define MAP_FILE 0 |
54 | 53 | ||
55 | #endif /* __ALPHA_MMAN_H__ */ | 54 | #endif /* __ALPHA_MMAN_H__ */ |
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h index 48348fe34c19..651ebb141b24 100644 --- a/include/asm-alpha/percpu.h +++ b/include/asm-alpha/percpu.h | |||
@@ -1,6 +1,20 @@ | |||
1 | #ifndef __ALPHA_PERCPU_H | 1 | #ifndef __ALPHA_PERCPU_H |
2 | #define __ALPHA_PERCPU_H | 2 | #define __ALPHA_PERCPU_H |
3 | 3 | ||
4 | /* | ||
5 | * Increase the per cpu area for Alpha so that | ||
6 | * modules using percpu area can load. | ||
7 | */ | ||
8 | #ifdef CONFIG_MODULES | ||
9 | # define PERCPU_MODULE_RESERVE 8192 | ||
10 | #else | ||
11 | # define PERCPU_MODULE_RESERVE 0 | ||
12 | #endif | ||
13 | |||
14 | #define PERCPU_ENOUGH_ROOM \ | ||
15 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ | ||
16 | PERCPU_MODULE_RESERVE) | ||
17 | |||
4 | #include <asm-generic/percpu.h> | 18 | #include <asm-generic/percpu.h> |
5 | 19 | ||
6 | #endif /* __ALPHA_PERCPU_H */ | 20 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h index 1cfd27f0ad73..39e492c3bfa3 100644 --- a/include/asm-alpha/termios.h +++ b/include/asm-alpha/termios.h | |||
@@ -66,24 +66,6 @@ struct termio { | |||
66 | #define _VEOL2 6 | 66 | #define _VEOL2 6 |
67 | #define _VSWTC 7 | 67 | #define _VSWTC 7 |
68 | 68 | ||
69 | /* line disciplines */ | ||
70 | #define N_TTY 0 | ||
71 | #define N_SLIP 1 | ||
72 | #define N_MOUSE 2 | ||
73 | #define N_PPP 3 | ||
74 | #define N_STRIP 4 | ||
75 | #define N_AX25 5 | ||
76 | #define N_X25 6 /* X.25 async */ | ||
77 | #define N_6PACK 7 | ||
78 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
79 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
80 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
81 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
82 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
83 | #define N_HDLC 13 /* synchronous HDLC */ | ||
84 | #define N_SYNC_PPP 14 | ||
85 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
86 | |||
87 | #ifdef __KERNEL__ | 69 | #ifdef __KERNEL__ |
88 | /* eof=^D eol=\0 eol2=\0 erase=del | 70 | /* eof=^D eol=\0 eol2=\0 erase=del |
89 | werase=^W kill=^U reprint=^R sxtc=\0 | 71 | werase=^W kill=^U reprint=^R sxtc=\0 |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 861092fbaa53..800ba5254daf 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -85,7 +85,6 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
85 | * Write locks are easy - we just set bit 31. When unlocking, we can | 85 | * Write locks are easy - we just set bit 31. When unlocking, we can |
86 | * just write zero since the lock is exclusively held. | 86 | * just write zero since the lock is exclusively held. |
87 | */ | 87 | */ |
88 | #define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) | ||
89 | 88 | ||
90 | static inline void __raw_write_lock(raw_rwlock_t *rw) | 89 | static inline void __raw_write_lock(raw_rwlock_t *rw) |
91 | { | 90 | { |
diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h index 7b8f5e8ae063..329c324c4040 100644 --- a/include/asm-arm/termios.h +++ b/include/asm-arm/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 5f420a0149f1..c92df958802e 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h | |||
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs) | |||
76 | 76 | ||
77 | /* We use 33-bit arithmetic here... */ | 77 | /* We use 33-bit arithmetic here... */ |
78 | #define __range_ok(addr,size) ({ \ | 78 | #define __range_ok(addr,size) ({ \ |
79 | unsigned long flag, sum; \ | 79 | unsigned long flag, roksum; \ |
80 | __chk_user_ptr(addr); \ | 80 | __chk_user_ptr(addr); \ |
81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ | 81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ |
82 | : "=&r" (flag), "=&r" (sum) \ | 82 | : "=&r" (flag), "=&r" (roksum) \ |
83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
84 | : "cc"); \ | 84 | : "cc"); \ |
85 | flag; }) | 85 | flag; }) |
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h index 7b8f5e8ae063..329c324c4040 100644 --- a/include/asm-arm26/termios.h +++ b/include/asm-arm26/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h index 19f798e338c9..ade76ec02995 100644 --- a/include/asm-arm26/uaccess-asm.h +++ b/include/asm-arm26/uaccess-asm.h | |||
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | #define __range_ok(addr,size) ({ \ | 36 | #define __range_ok(addr,size) ({ \ |
37 | unsigned long flag, sum; \ | 37 | unsigned long flag, roksum; \ |
38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ | 38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ |
39 | : "=&r" (flag), "=&r" (sum) \ | 39 | : "=&r" (flag), "=&r" (roksum) \ |
40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
41 | : "cc"); \ | 41 | : "cc"); \ |
42 | flag; }) | 42 | flag; }) |
diff --git a/include/asm-avr32/termios.h b/include/asm-avr32/termios.h index 615bc0639e5c..0152aba35154 100644 --- a/include/asm-avr32/termios.h +++ b/include/asm-avr32/termios.h | |||
@@ -46,24 +46,6 @@ struct termio { | |||
46 | 46 | ||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
48 | 48 | ||
49 | /* line disciplines */ | ||
50 | #define N_TTY 0 | ||
51 | #define N_SLIP 1 | ||
52 | #define N_MOUSE 2 | ||
53 | #define N_PPP 3 | ||
54 | #define N_STRIP 4 | ||
55 | #define N_AX25 5 | ||
56 | #define N_X25 6 /* X.25 async */ | ||
57 | #define N_6PACK 7 | ||
58 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
59 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
60 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
61 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
62 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
63 | #define N_HDLC 13 /* synchronous HDLC */ | ||
64 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
65 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
66 | |||
67 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
68 | /* intr=^C quit=^\ erase=del kill=^U | 50 | /* intr=^C quit=^\ erase=del kill=^U |
69 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 51 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h index a8e1e6cb7cd0..27bfeca1b981 100644 --- a/include/asm-cris/semaphore-helper.h +++ b/include/asm-cris/semaphore-helper.h | |||
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem) | |||
30 | unsigned long flags; | 30 | unsigned long flags; |
31 | int ret = 0; | 31 | int ret = 0; |
32 | 32 | ||
33 | local_save_flags(flags); | 33 | local_irq_save(flags); |
34 | local_irq_disable(); | ||
35 | if (read(&sem->waking) > 0) { | 34 | if (read(&sem->waking) > 0) { |
36 | dec(&sem->waking); | 35 | dec(&sem->waking); |
37 | ret = 1; | 36 | ret = 1; |
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem, | |||
46 | int ret = 0; | 45 | int ret = 0; |
47 | unsigned long flags; | 46 | unsigned long flags; |
48 | 47 | ||
49 | local_save_flags(flags); | 48 | local_irq_save(flags); |
50 | local_irq_disable(); | ||
51 | if (read(&sem->waking) > 0) { | 49 | if (read(&sem->waking) > 0) { |
52 | dec(&sem->waking); | 50 | dec(&sem->waking); |
53 | ret = 1; | 51 | ret = 1; |
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem) | |||
64 | int ret = 1; | 62 | int ret = 1; |
65 | unsigned long flags; | 63 | unsigned long flags; |
66 | 64 | ||
67 | local_save_flags(flags); | 65 | local_irq_save(flags); |
68 | local_irq_disable(); | ||
69 | if (read(&sem->waking) <= 0) | 66 | if (read(&sem->waking) <= 0) |
70 | inc(&sem->count); | 67 | inc(&sem->count); |
71 | else { | 68 | else { |
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index b869f6161aaa..fea0e8d57cb5 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h | |||
@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable | 44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable |
45 | irq's (if enabled) and do it with move.d's */ | 45 | irq's (if enabled) and do it with move.d's */ |
46 | unsigned long flags,temp; | 46 | unsigned long flags,temp; |
47 | local_save_flags(flags); /* save flags, including irq enable bit */ | 47 | local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ |
48 | local_irq_disable(); /* shut off irq's */ | ||
49 | switch (size) { | 48 | switch (size) { |
50 | case 1: | 49 | case 1: |
51 | *((unsigned char *)&temp) = x; | 50 | *((unsigned char *)&temp) = x; |
diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h index 5ce1023c5d7b..c9dbd4d43368 100644 --- a/include/asm-cris/termios.h +++ b/include/asm-cris/termios.h | |||
@@ -40,24 +40,6 @@ struct termio { | |||
40 | 40 | ||
41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
42 | 42 | ||
43 | /* line disciplines */ | ||
44 | #define N_TTY 0 | ||
45 | #define N_SLIP 1 | ||
46 | #define N_MOUSE 2 | ||
47 | #define N_PPP 3 | ||
48 | #define N_STRIP 4 | ||
49 | #define N_AX25 5 | ||
50 | #define N_X25 6 /* X.25 async */ | ||
51 | #define N_6PACK 7 | ||
52 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
53 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
54 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
55 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
56 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
57 | #define N_HDLC 13 /* synchronous HDLC */ | ||
58 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
59 | #define N_BT 15 /* bluetooth */ | ||
60 | |||
61 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
62 | 44 | ||
63 | /* intr=^C quit=^\ erase=del kill=^U | 45 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h index 8840cf95e8dd..a62fb5872375 100644 --- a/include/asm-frv/termios.h +++ b/include/asm-frv/termios.h | |||
@@ -51,24 +51,6 @@ struct termio { | |||
51 | 51 | ||
52 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 52 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
53 | 53 | ||
54 | /* line disciplines */ | ||
55 | #define N_TTY 0 | ||
56 | #define N_SLIP 1 | ||
57 | #define N_MOUSE 2 | ||
58 | #define N_PPP 3 | ||
59 | #define N_STRIP 4 | ||
60 | #define N_AX25 5 | ||
61 | #define N_X25 6 /* X.25 async */ | ||
62 | #define N_6PACK 7 | ||
63 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
64 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
65 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
66 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
67 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
68 | #define N_HDLC 13 /* synchronous HDLC */ | ||
69 | #define N_SYNC_PPP 14 | ||
70 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
71 | |||
72 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
73 | #include <asm-generic/termios.h> | 55 | #include <asm-generic/termios.h> |
74 | #endif | 56 | #endif |
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 8078cbd2c016..30d8d33491dd 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h | |||
@@ -54,7 +54,7 @@ | |||
54 | #define __page_to_pfn(pg) \ | 54 | #define __page_to_pfn(pg) \ |
55 | ({ struct page *__pg = (pg); \ | 55 | ({ struct page *__pg = (pg); \ |
56 | int __sec = page_to_section(__pg); \ | 56 | int __sec = page_to_section(__pg); \ |
57 | __pg - __section_mem_map_addr(__nr_to_section(__sec)); \ | 57 | (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \ |
58 | }) | 58 | }) |
59 | 59 | ||
60 | #define __pfn_to_page(pfn) \ | 60 | #define __pfn_to_page(pfn) \ |
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h index 3b41d2bb70da..5e3dde2ee5ad 100644 --- a/include/asm-generic/mman.h +++ b/include/asm-generic/mman.h | |||
@@ -36,7 +36,6 @@ | |||
36 | #define MADV_DOFORK 11 /* do inherit across fork */ | 36 | #define MADV_DOFORK 11 /* do inherit across fork */ |
37 | 37 | ||
38 | /* compatibility flags */ | 38 | /* compatibility flags */ |
39 | #define MAP_ANON MAP_ANONYMOUS | ||
40 | #define MAP_FILE 0 | 39 | #define MAP_FILE 0 |
41 | 40 | ||
42 | #endif | 41 | #endif |
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h index e2319f992af2..fb2925d08c49 100644 --- a/include/asm-h8300/termios.h +++ b/include/asm-h8300/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index c57441bb2905..4dd272331361 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h | |||
@@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) | |||
211 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 211 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * atomic_add_unless - add unless the number is a given value | 214 | * atomic_add_unless - add unless the number is already a given value |
215 | * @v: pointer of type atomic_t | 215 | * @v: pointer of type atomic_t |
216 | * @a: the amount to add to v... | 216 | * @a: the amount to add to v... |
217 | * @u: ...unless v is equal to u. | 217 | * @u: ...unless v is equal to u. |
218 | * | 218 | * |
219 | * Atomically adds @a to @v, so long as it was not @u. | 219 | * Atomically adds @a to @v, so long as @v was not already @u. |
220 | * Returns non-zero if @v was not @u, and zero otherwise. | 220 | * Returns non-zero if @v was not @u, and zero otherwise. |
221 | */ | 221 | */ |
222 | #define atomic_add_unless(v, a, u) \ | 222 | #define atomic_add_unless(v, a, u) \ |
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index 1c780fa1e762..273b50629357 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h | |||
@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word) | |||
371 | * | 371 | * |
372 | * This is defined the same way as | 372 | * This is defined the same way as |
373 | * the libc and compiler builtin ffs routines, therefore | 373 | * the libc and compiler builtin ffs routines, therefore |
374 | * differs in spirit from the above ffz (man ffs). | 374 | * differs in spirit from the above ffz() (man ffs). |
375 | */ | 375 | */ |
376 | static inline int ffs(int x) | 376 | static inline int ffs(int x) |
377 | { | 377 | { |
@@ -388,7 +388,7 @@ static inline int ffs(int x) | |||
388 | * fls - find last bit set | 388 | * fls - find last bit set |
389 | * @x: the word to search | 389 | * @x: the word to search |
390 | * | 390 | * |
391 | * This is defined the same way as ffs. | 391 | * This is defined the same way as ffs(). |
392 | */ | 392 | */ |
393 | static inline int fls(int x) | 393 | static inline int fls(int x) |
394 | { | 394 | { |
diff --git a/include/asm-i386/termios.h b/include/asm-i386/termios.h index 03f548536d6b..7c99678a8f86 100644 --- a/include/asm-i386/termios.h +++ b/include/asm-i386/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | #include <linux/module.h> | 43 | #include <linux/module.h> |
62 | 44 | ||
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index eef5133b9ce2..70829ae3ad52 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h | |||
@@ -54,10 +54,10 @@ extern struct movsl_mask { | |||
54 | * This needs 33-bit arithmetic. We have a carry... | 54 | * This needs 33-bit arithmetic. We have a carry... |
55 | */ | 55 | */ |
56 | #define __range_ok(addr,size) ({ \ | 56 | #define __range_ok(addr,size) ({ \ |
57 | unsigned long flag,sum; \ | 57 | unsigned long flag,roksum; \ |
58 | __chk_user_ptr(addr); \ | 58 | __chk_user_ptr(addr); \ |
59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ | 59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ |
60 | :"=&r" (flag), "=r" (sum) \ | 60 | :"=&r" (flag), "=r" (roksum) \ |
61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ | 61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ |
62 | flag; }) | 62 | flag; }) |
63 | 63 | ||
diff --git a/include/asm-ia64/termios.h b/include/asm-ia64/termios.h index 42c95693240c..08750c2d3607 100644 --- a/include/asm-ia64/termios.h +++ b/include/asm-ia64/termios.h | |||
@@ -46,24 +46,6 @@ struct termio { | |||
46 | 46 | ||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
48 | 48 | ||
49 | /* line disciplines */ | ||
50 | #define N_TTY 0 | ||
51 | #define N_SLIP 1 | ||
52 | #define N_MOUSE 2 | ||
53 | #define N_PPP 3 | ||
54 | #define N_STRIP 4 | ||
55 | #define N_AX25 5 | ||
56 | #define N_X25 6 /* X.25 async */ | ||
57 | #define N_6PACK 7 | ||
58 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
59 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
60 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
61 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
62 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS msgs */ | ||
63 | #define N_HDLC 13 /* synchronous HDLC */ | ||
64 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
65 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
66 | |||
67 | # ifdef __KERNEL__ | 49 | # ifdef __KERNEL__ |
68 | 50 | ||
69 | /* intr=^C quit=^\ erase=del kill=^U | 51 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h index 4619ba5c372e..9a4a5d20160a 100644 --- a/include/asm-m32r/a.out.h +++ b/include/asm-m32r/a.out.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_A_OUT_H | 1 | #ifndef _ASM_M32R_A_OUT_H |
2 | #define _ASM_M32R_A_OUT_H | 2 | #define _ASM_M32R_A_OUT_H |
3 | 3 | ||
4 | /* orig : i386 2.4.18 */ | ||
5 | |||
6 | struct exec | 4 | struct exec |
7 | { | 5 | { |
8 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | 6 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ |
diff --git a/include/asm-m32r/addrspace.h b/include/asm-m32r/addrspace.h index 06a83dc94648..81782c122da4 100644 --- a/include/asm-m32r/addrspace.h +++ b/include/asm-m32r/addrspace.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id$ */ | ||
2 | /* | 1 | /* |
3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
diff --git a/include/asm-m32r/bugs.h b/include/asm-m32r/bugs.h index 9a56f661bdb3..f77214eff136 100644 --- a/include/asm-m32r/bugs.h +++ b/include/asm-m32r/bugs.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_BUGS_H | 1 | #ifndef _ASM_M32R_BUGS_H |
2 | #define _ASM_M32R_BUGS_H | 2 | #define _ASM_M32R_BUGS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * This is included by init/main.c to check for architecture-dependent bugs. | 5 | * This is included by init/main.c to check for architecture-dependent bugs. |
8 | * | 6 | * |
diff --git a/include/asm-m32r/byteorder.h b/include/asm-m32r/byteorder.h index 3c0b9a2e03bc..10b2c1d11614 100644 --- a/include/asm-m32r/byteorder.h +++ b/include/asm-m32r/byteorder.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_BYTEORDER_H | 1 | #ifndef _ASM_M32R_BYTEORDER_H |
2 | #define _ASM_M32R_BYTEORDER_H | 2 | #define _ASM_M32R_BYTEORDER_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm/types.h> | 4 | #include <asm/types.h> |
7 | 5 | ||
8 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 6 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
diff --git a/include/asm-m32r/cache.h b/include/asm-m32r/cache.h index 9c2b2d9998bc..40b3ee98193d 100644 --- a/include/asm-m32r/cache.h +++ b/include/asm-m32r/cache.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_CACHE_H | 1 | #ifndef _ASM_M32R_CACHE_H |
2 | #define _ASM_M32R_CACHE_H | 2 | #define _ASM_M32R_CACHE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* L1 cache line size */ | 4 | /* L1 cache line size */ |
7 | #define L1_CACHE_SHIFT 4 | 5 | #define L1_CACHE_SHIFT 4 |
8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 6 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h index 56961a9511b2..78587c958146 100644 --- a/include/asm-m32r/cacheflush.h +++ b/include/asm-m32r/cacheflush.h | |||
@@ -67,4 +67,3 @@ do { \ | |||
67 | memcpy(dst, src, len) | 67 | memcpy(dst, src, len) |
68 | 68 | ||
69 | #endif /* _ASM_M32R_CACHEFLUSH_H */ | 69 | #endif /* _ASM_M32R_CACHEFLUSH_H */ |
70 | |||
diff --git a/include/asm-m32r/current.h b/include/asm-m32r/current.h index c19d927ff22d..7859d864f2c2 100644 --- a/include/asm-m32r/current.h +++ b/include/asm-m32r/current.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_CURRENT_H | 1 | #ifndef _ASM_M32R_CURRENT_H |
2 | #define _ASM_M32R_CURRENT_H | 2 | #define _ASM_M32R_CURRENT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/thread_info.h> | 4 | #include <linux/thread_info.h> |
7 | 5 | ||
8 | struct task_struct; | 6 | struct task_struct; |
@@ -15,4 +13,3 @@ static __inline__ struct task_struct *get_current(void) | |||
15 | #define current (get_current()) | 13 | #define current (get_current()) |
16 | 14 | ||
17 | #endif /* _ASM_M32R_CURRENT_H */ | 15 | #endif /* _ASM_M32R_CURRENT_H */ |
18 | |||
diff --git a/include/asm-m32r/delay.h b/include/asm-m32r/delay.h index f285eaee7d27..164448d23850 100644 --- a/include/asm-m32r/delay.h +++ b/include/asm-m32r/delay.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_DELAY_H | 1 | #ifndef _ASM_M32R_DELAY_H |
2 | #define _ASM_M32R_DELAY_H | 2 | #define _ASM_M32R_DELAY_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * Copyright (C) 1993 Linus Torvalds | 5 | * Copyright (C) 1993 Linus Torvalds |
8 | * | 6 | * |
diff --git a/include/asm-m32r/dma.h b/include/asm-m32r/dma.h index 7263b013b67e..52f6a22dd232 100644 --- a/include/asm-m32r/dma.h +++ b/include/asm-m32r/dma.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_DMA_H | 1 | #ifndef _ASM_M32R_DMA_H |
2 | #define _ASM_M32R_DMA_H | 2 | #define _ASM_M32R_DMA_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm/io.h> | 4 | #include <asm/io.h> |
7 | 5 | ||
8 | /* | 6 | /* |
diff --git a/include/asm-m32r/errno.h b/include/asm-m32r/errno.h index 7a98520194a7..777149262aad 100644 --- a/include/asm-m32r/errno.h +++ b/include/asm-m32r/errno.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_ERRNO_H | 1 | #ifndef _ASM_M32R_ERRNO_H |
2 | #define _ASM_M32R_ERRNO_H | 2 | #define _ASM_M32R_ERRNO_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/errno.h> | 4 | #include <asm-generic/errno.h> |
7 | 5 | ||
8 | #endif /* _ASM_M32R_ERRNO_H */ | 6 | #endif /* _ASM_M32R_ERRNO_H */ |
9 | |||
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index c82ebe8f250d..4672a49e8760 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_IDE_H | 1 | #ifndef _ASM_M32R_IDE_H |
2 | #define _ASM_M32R_IDE_H | 2 | #define _ASM_M32R_IDE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * linux/include/asm-m32r/ide.h | 5 | * linux/include/asm-m32r/ide.h |
8 | * | 6 | * |
@@ -15,6 +13,7 @@ | |||
15 | 13 | ||
16 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
17 | 15 | ||
16 | #include <asm/m32r.h> | ||
18 | 17 | ||
19 | #ifndef MAX_HWIFS | 18 | #ifndef MAX_HWIFS |
20 | # ifdef CONFIG_BLK_DEV_IDEPCI | 19 | # ifdef CONFIG_BLK_DEV_IDEPCI |
@@ -24,9 +23,6 @@ | |||
24 | # endif | 23 | # endif |
25 | #endif | 24 | #endif |
26 | 25 | ||
27 | #include <asm/m32r.h> | ||
28 | |||
29 | |||
30 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 26 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
31 | 27 | ||
32 | static __inline__ int ide_default_irq(unsigned long base) | 28 | static __inline__ int ide_default_irq(unsigned long base) |
diff --git a/include/asm-m32r/ioctls.h b/include/asm-m32r/ioctls.h index b3508292246a..d23cfc45738a 100644 --- a/include/asm-m32r/ioctls.h +++ b/include/asm-m32r/ioctls.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef __ARCH_M32R_IOCTLS_H__ | 1 | #ifndef __ARCH_M32R_IOCTLS_H__ |
2 | #define __ARCH_M32R_IOCTLS_H__ | 2 | #define __ARCH_M32R_IOCTLS_H__ |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.5.67 */ | ||
7 | |||
8 | #include <asm/ioctl.h> | 4 | #include <asm/ioctl.h> |
9 | 5 | ||
10 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | 6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ |
@@ -85,4 +81,3 @@ | |||
85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 81 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
86 | 82 | ||
87 | #endif /* __ARCH_M32R_IOCTLS_H__ */ | 83 | #endif /* __ARCH_M32R_IOCTLS_H__ */ |
88 | |||
diff --git a/include/asm-m32r/ipcbuf.h b/include/asm-m32r/ipcbuf.h index 7c77fb0b1467..8d2d7c8ffdb0 100644 --- a/include/asm-m32r/ipcbuf.h +++ b/include/asm-m32r/ipcbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_IPCBUF_H | 1 | #ifndef _ASM_M32R_IPCBUF_H |
2 | #define _ASM_M32R_IPCBUF_H | 2 | #define _ASM_M32R_IPCBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The ipc64_perm structure for m32r architecture. | 5 | * The ipc64_perm structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/kmap_types.h b/include/asm-m32r/kmap_types.h index 0524d89edb0f..fa94dc6410ea 100644 --- a/include/asm-m32r/kmap_types.h +++ b/include/asm-m32r/kmap_types.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef __M32R_KMAP_TYPES_H | 1 | #ifndef __M32R_KMAP_TYPES_H |
2 | #define __M32R_KMAP_TYPES_H | 2 | #define __M32R_KMAP_TYPES_H |
3 | 3 | ||
4 | /* Dummy header just to define km_type. */ | ||
5 | |||
6 | |||
7 | #ifdef CONFIG_DEBUG_HIGHMEM | 4 | #ifdef CONFIG_DEBUG_HIGHMEM |
8 | # define D(n) __KM_FENCE_##n , | 5 | # define D(n) __KM_FENCE_##n , |
9 | #else | 6 | #else |
@@ -30,4 +27,3 @@ D(13) KM_TYPE_NR | |||
30 | #undef D | 27 | #undef D |
31 | 28 | ||
32 | #endif /* __M32R_KMAP_TYPES_H */ | 29 | #endif /* __M32R_KMAP_TYPES_H */ |
33 | |||
diff --git a/include/asm-m32r/m32104ut/m32104ut_pld.h b/include/asm-m32r/m32104ut/m32104ut_pld.h index cbdbc5891445..2dc89d68b6d9 100644 --- a/include/asm-m32r/m32104ut/m32104ut_pld.h +++ b/include/asm-m32r/m32104ut/m32104ut_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32104UT_M32104UT_PLD_H | ||
2 | #define _M32104UT_M32104UT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32104ut/m32104ut_pld.h | 5 | * include/asm-m32r/m32104ut/m32104ut_pld.h |
3 | * | 6 | * |
@@ -12,10 +15,6 @@ | |||
12 | * this archive for more details. | 15 | * this archive for more details. |
13 | */ | 16 | */ |
14 | 17 | ||
15 | #ifndef _M32104UT_M32104UT_PLD_H | ||
16 | #define _M32104UT_M32104UT_PLD_H | ||
17 | |||
18 | |||
19 | #if defined(CONFIG_PLAT_M32104UT) | 18 | #if defined(CONFIG_PLAT_M32104UT) |
20 | #define PLD_PLAT_BASE 0x02c00000 | 19 | #define PLD_PLAT_BASE 0x02c00000 |
21 | #else | 20 | #else |
@@ -35,7 +34,7 @@ | |||
35 | #define __reg8 | 34 | #define __reg8 |
36 | #define __reg16 | 35 | #define __reg16 |
37 | #define __reg32 | 36 | #define __reg32 |
38 | #endif /* __ASSEMBLY__ */ | 37 | #endif /* __ASSEMBLY__ */ |
39 | 38 | ||
40 | /* CFC */ | 39 | /* CFC */ |
41 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 40 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -159,4 +158,4 @@ | |||
159 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 158 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
160 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 159 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
161 | 160 | ||
162 | #endif /* _M32104UT_M32104UT_PLD_H */ | 161 | #endif /* _M32104UT_M32104UT_PLD_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_lan.h b/include/asm-m32r/m32700ut/m32700ut_lan.h index f1e47ae1f891..aae810a4fb2c 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lan.h +++ b/include/asm-m32r/m32700ut/m32700ut_lan.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_LAN_H | ||
2 | #define _M32700UT_M32700UT_LAN_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_lan.h | 5 | * include/asm-m32r/m32700ut/m32700ut_lan.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_LAN_H | ||
16 | #define _M32700UT_M32700UT_LAN_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* ICU | 25 | /* ICU |
29 | * ICUISTS: status register | 26 | * ICUISTS: status register |
@@ -103,4 +100,4 @@ | |||
103 | #define PLDI2CSTS_BB 0x00000010 | 100 | #define PLDI2CSTS_BB 0x00000010 |
104 | #define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ | 101 | #define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ |
105 | 102 | ||
106 | #endif /* _M32700UT_M32700UT_LAN_H */ | 103 | #endif /* _M32700UT_M32700UT_LAN_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_lcd.h b/include/asm-m32r/m32700ut/m32700ut_lcd.h index e41c4aa48b4c..4c2489079788 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lcd.h +++ b/include/asm-m32r/m32700ut/m32700ut_lcd.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_LCD_H | ||
2 | #define _M32700UT_M32700UT_LCD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_lcd.h | 5 | * include/asm-m32r/m32700ut/m32700ut_lcd.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_LCD_H | ||
16 | #define _M32700UT_M32700UT_LCD_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* | 25 | /* |
29 | * ICU | 26 | * ICU |
@@ -55,4 +52,4 @@ | |||
55 | #define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) | 52 | #define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) |
56 | #define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) | 53 | #define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) |
57 | 54 | ||
58 | #endif /* _M32700UT_M32700UT_LCD_H */ | 55 | #endif /* _M32700UT_M32700UT_LCD_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_pld.h b/include/asm-m32r/m32700ut/m32700ut_pld.h index a48c22c978ca..d39121279a1a 100644 --- a/include/asm-m32r/m32700ut/m32700ut_pld.h +++ b/include/asm-m32r/m32700ut/m32700ut_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_PLD_H | ||
2 | #define _M32700UT_M32700UT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_pld.h | 5 | * include/asm-m32r/m32700ut/m32700ut_pld.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_PLD_H | ||
16 | #define _M32700UT_M32700UT_PLD_H | ||
17 | |||
18 | |||
19 | #if defined(CONFIG_PLAT_M32700UT_Alpha) | 16 | #if defined(CONFIG_PLAT_M32700UT_Alpha) |
20 | #define PLD_PLAT_BASE 0x08c00000 | 17 | #define PLD_PLAT_BASE 0x08c00000 |
21 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) | 18 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) |
@@ -37,7 +34,7 @@ | |||
37 | #define __reg8 | 34 | #define __reg8 |
38 | #define __reg16 | 35 | #define __reg16 |
39 | #define __reg32 | 36 | #define __reg32 |
40 | #endif /* __ASSEMBLY__ */ | 37 | #endif /* __ASSEMBLY__ */ |
41 | 38 | ||
42 | /* CFC */ | 39 | /* CFC */ |
43 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 40 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -261,4 +258,4 @@ | |||
261 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 258 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
262 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 259 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
263 | 260 | ||
264 | #endif /* _M32700UT_M32700UT_PLD.H */ | 261 | #endif /* _M32700UT_M32700UT_PLD.H */ |
diff --git a/include/asm-m32r/mappi2/mappi2_pld.h b/include/asm-m32r/mappi2/mappi2_pld.h index 56a2b12f2bfc..2624c9db7255 100644 --- a/include/asm-m32r/mappi2/mappi2_pld.h +++ b/include/asm-m32r/mappi2/mappi2_pld.h | |||
@@ -1,18 +1,17 @@ | |||
1 | #ifndef _MAPPI2_PLD_H | ||
2 | #define _MAPPI2_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/mappi2/mappi2_pld.h | 5 | * include/asm-m32r/mappi2/mappi2_pld.h |
3 | * | 6 | * |
4 | * Definitions for Extended IO Logic on MAPPI2 board. | 7 | * Definitions for Extended IO Logic on MAPPI2 board. |
5 | * based on m32700ut_pld.h by | 8 | * based on m32700ut_pld.h |
6 | * | 9 | * |
7 | * This file is subject to the terms and conditions of the GNU General | 10 | * This file is subject to the terms and conditions of the GNU General |
8 | * Public License. See the file "COPYING" in the main directory of | 11 | * Public License. See the file "COPYING" in the main directory of |
9 | * this archive for more details. | 12 | * this archive for more details. |
10 | * | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | #ifndef _MAPPI2_PLD_H | ||
14 | #define _MAPPI2_PLD_H | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
17 | /* FIXME: | 16 | /* FIXME: |
18 | * Some C functions use non-cache address, so can't define non-cache address. | 17 | * Some C functions use non-cache address, so can't define non-cache address. |
@@ -26,7 +25,7 @@ | |||
26 | #define __reg8 | 25 | #define __reg8 |
27 | #define __reg16 | 26 | #define __reg16 |
28 | #define __reg32 | 27 | #define __reg32 |
29 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
30 | 29 | ||
31 | /* CFC */ | 30 | /* CFC */ |
32 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 31 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -148,4 +147,4 @@ | |||
148 | 147 | ||
149 | #endif | 148 | #endif |
150 | 149 | ||
151 | #endif /* _MAPPI2_PLD.H */ | 150 | #endif /* _MAPPI2_PLD.H */ |
diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h index 92f10defaef8..451c40ee70af 100644 --- a/include/asm-m32r/mappi3/mappi3_pld.h +++ b/include/asm-m32r/mappi3/mappi3_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _MAPPI3_PLD_H | ||
2 | #define _MAPPI3_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/mappi3/mappi3_pld.h | 5 | * include/asm-m32r/mappi3/mappi3_pld.h |
3 | * | 6 | * |
@@ -7,12 +10,8 @@ | |||
7 | * This file is subject to the terms and conditions of the GNU General | 10 | * This file is subject to the terms and conditions of the GNU General |
8 | * Public License. See the file "COPYING" in the main directory of | 11 | * Public License. See the file "COPYING" in the main directory of |
9 | * this archive for more details. | 12 | * this archive for more details. |
10 | * | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | #ifndef _MAPPI3_PLD_H | ||
14 | #define _MAPPI3_PLD_H | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
17 | /* FIXME: | 16 | /* FIXME: |
18 | * Some C functions use non-cache address, so can't define non-cache address. | 17 | * Some C functions use non-cache address, so can't define non-cache address. |
@@ -26,7 +25,7 @@ | |||
26 | #define __reg8 | 25 | #define __reg8 |
27 | #define __reg16 | 26 | #define __reg16 |
28 | #define __reg32 | 27 | #define __reg32 |
29 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
30 | 29 | ||
31 | /* CFC */ | 30 | /* CFC */ |
32 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 31 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -140,4 +139,4 @@ | |||
140 | /* Reset Control */ | 139 | /* Reset Control */ |
141 | #define PLD_REBOOT __reg16(PLD_BASE + 0x38000) | 140 | #define PLD_REBOOT __reg16(PLD_BASE + 0x38000) |
142 | 141 | ||
143 | #endif /* _MAPPI3_PLD.H */ | 142 | #endif /* _MAPPI3_PLD.H */ |
diff --git a/include/asm-m32r/mc146818rtc.h b/include/asm-m32r/mc146818rtc.h index 755601d053cc..aa1b7bf84f51 100644 --- a/include/asm-m32r/mc146818rtc.h +++ b/include/asm-m32r/mc146818rtc.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | 8 | ||
9 | #ifndef RTC_PORT | 9 | #ifndef RTC_PORT |
10 | // #define RTC_PORT(x) (0x70 + (x)) | ||
11 | #define RTC_PORT(x) ((x)) | 10 | #define RTC_PORT(x) ((x)) |
12 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ | 11 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ |
13 | #endif | 12 | #endif |
@@ -26,7 +25,5 @@ outb_p((val),RTC_PORT(1)); \ | |||
26 | }) | 25 | }) |
27 | 26 | ||
28 | #define RTC_IRQ 8 | 27 | #define RTC_IRQ 8 |
29 | #if 0 | ||
30 | #endif | ||
31 | 28 | ||
32 | #endif /* _ASM_MC146818RTC_H */ | 29 | #endif /* _ASM_MC146818RTC_H */ |
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h index 695a860c024f..516a8973b130 100644 --- a/include/asm-m32r/mman.h +++ b/include/asm-m32r/mman.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/mman.h> | 4 | #include <asm-generic/mman.h> |
5 | 5 | ||
6 | /* orig : i386 2.6.0-test6 */ | ||
7 | |||
8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
10 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 8 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h index cf3f6d78ac66..d9bd724479cf 100644 --- a/include/asm-m32r/mmu.h +++ b/include/asm-m32r/mmu.h | |||
@@ -1,13 +1,14 @@ | |||
1 | #ifndef _ASM_M32R_MMU_H | 1 | #ifndef _ASM_M32R_MMU_H |
2 | #define _ASM_M32R_MMU_H | 2 | #define _ASM_M32R_MMU_H |
3 | 3 | ||
4 | |||
5 | #if !defined(CONFIG_MMU) | 4 | #if !defined(CONFIG_MMU) |
5 | |||
6 | typedef struct { | 6 | typedef struct { |
7 | struct vm_list_struct *vmlist; | 7 | struct vm_list_struct *vmlist; |
8 | unsigned long end_brk; | 8 | unsigned long end_brk; |
9 | } mm_context_t; | 9 | } mm_context_t; |
10 | #else | 10 | |
11 | #else /* CONFIG_MMU */ | ||
11 | 12 | ||
12 | /* Default "unsigned long" context */ | 13 | /* Default "unsigned long" context */ |
13 | #ifndef CONFIG_SMP | 14 | #ifndef CONFIG_SMP |
@@ -16,5 +17,6 @@ typedef unsigned long mm_context_t; | |||
16 | typedef unsigned long mm_context_t[NR_CPUS]; | 17 | typedef unsigned long mm_context_t[NR_CPUS]; |
17 | #endif | 18 | #endif |
18 | 19 | ||
19 | #endif /* CONFIG_MMU */ | 20 | #endif /* CONFIG_MMU */ |
20 | #endif /* _ASM_M32R_MMU_H */ | 21 | |
22 | #endif /* _ASM_M32R_MMU_H */ | ||
diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h index 542302eb6bcb..1f40d4a0acf1 100644 --- a/include/asm-m32r/mmu_context.h +++ b/include/asm-m32r/mmu_context.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_M32R_MMU_CONTEXT_H | 1 | #ifndef _ASM_M32R_MMU_CONTEXT_H |
2 | #define _ASM_M32R_MMU_CONTEXT_H | 2 | #define _ASM_M32R_MMU_CONTEXT_H |
3 | |||
4 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
5 | 4 | ||
6 | |||
7 | #include <asm/m32r.h> | 5 | #include <asm/m32r.h> |
8 | 6 | ||
9 | #define MMU_CONTEXT_ASID_MASK (0x000000FF) | 7 | #define MMU_CONTEXT_ASID_MASK (0x000000FF) |
@@ -11,7 +9,6 @@ | |||
11 | #define MMU_CONTEXT_FIRST_VERSION (0x00000100) | 9 | #define MMU_CONTEXT_FIRST_VERSION (0x00000100) |
12 | #define NO_CONTEXT (0x00000000) | 10 | #define NO_CONTEXT (0x00000000) |
13 | 11 | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
16 | 13 | ||
17 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
@@ -147,7 +144,7 @@ static inline void switch_mm(struct mm_struct *prev, | |||
147 | #define activate_mm(prev, next) \ | 144 | #define activate_mm(prev, next) \ |
148 | switch_mm((prev), (next), NULL) | 145 | switch_mm((prev), (next), NULL) |
149 | 146 | ||
150 | #else | 147 | #else /* not CONFIG_MMU */ |
151 | #define get_mmu_context(mm) do { } while (0) | 148 | #define get_mmu_context(mm) do { } while (0) |
152 | #define init_new_context(tsk,mm) (0) | 149 | #define init_new_context(tsk,mm) (0) |
153 | #define destroy_context(mm) do { } while (0) | 150 | #define destroy_context(mm) do { } while (0) |
@@ -158,11 +155,9 @@ static inline void switch_mm(struct mm_struct *prev, | |||
158 | #define deactivate_mm(mm,tsk) do { } while (0) | 155 | #define deactivate_mm(mm,tsk) do { } while (0) |
159 | #define activate_mm(prev,next) do { } while (0) | 156 | #define activate_mm(prev,next) do { } while (0) |
160 | #define enter_lazy_tlb(mm,tsk) do { } while (0) | 157 | #define enter_lazy_tlb(mm,tsk) do { } while (0) |
161 | #endif /* CONFIG_MMU */ | 158 | #endif /* not CONFIG_MMU */ |
162 | |||
163 | 159 | ||
164 | #endif /* not __ASSEMBLY__ */ | 160 | #endif /* not __ASSEMBLY__ */ |
165 | 161 | ||
166 | #endif /* __KERNEL__ */ | 162 | #endif /* __KERNEL__ */ |
167 | |||
168 | #endif /* _ASM_M32R_MMU_CONTEXT_H */ | 163 | #endif /* _ASM_M32R_MMU_CONTEXT_H */ |
diff --git a/include/asm-m32r/module.h b/include/asm-m32r/module.h index 3f2541c92a7b..eb73ee011215 100644 --- a/include/asm-m32r/module.h +++ b/include/asm-m32r/module.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_MODULE_H | 1 | #ifndef _ASM_M32R_MODULE_H |
2 | #define _ASM_M32R_MODULE_H | 2 | #define _ASM_M32R_MODULE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | struct mod_arch_specific { }; | 4 | struct mod_arch_specific { }; |
7 | 5 | ||
8 | #define Elf_Shdr Elf32_Shdr | 6 | #define Elf_Shdr Elf32_Shdr |
@@ -10,4 +8,3 @@ struct mod_arch_specific { }; | |||
10 | #define Elf_Ehdr Elf32_Ehdr | 8 | #define Elf_Ehdr Elf32_Ehdr |
11 | 9 | ||
12 | #endif /* _ASM_M32R_MODULE_H */ | 10 | #endif /* _ASM_M32R_MODULE_H */ |
13 | |||
diff --git a/include/asm-m32r/msgbuf.h b/include/asm-m32r/msgbuf.h index 852ff52af4c2..0d5a877b813e 100644 --- a/include/asm-m32r/msgbuf.h +++ b/include/asm-m32r/msgbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_MSGBUF_H | 1 | #ifndef _ASM_M32R_MSGBUF_H |
2 | #define _ASM_M32R_MSGBUF_H | 2 | #define _ASM_M32R_MSGBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The msqid64_ds structure for m32r architecture. | 5 | * The msqid64_ds structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/namei.h b/include/asm-m32r/namei.h index 7172d3d2e260..210f8056b805 100644 --- a/include/asm-m32r/namei.h +++ b/include/asm-m32r/namei.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_NAMEI_H | 1 | #ifndef _ASM_M32R_NAMEI_H |
2 | #define _ASM_M32R_NAMEI_H | 2 | #define _ASM_M32R_NAMEI_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * linux/include/asm-m32r/namei.h | 5 | * linux/include/asm-m32r/namei.h |
10 | * | 6 | * |
diff --git a/include/asm-m32r/opsput/opsput_lan.h b/include/asm-m32r/opsput/opsput_lan.h index f53e10187c03..a5f18dd1ab20 100644 --- a/include/asm-m32r/opsput/opsput_lan.h +++ b/include/asm-m32r/opsput/opsput_lan.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_LAN_H | ||
2 | #define _OPSPUT_OPSPUT_LAN_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_lan.h | 5 | * include/asm-m32r/opsput/opsput_lan.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_lan.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_LAN_H | ||
16 | #define _OPSPUT_OPSPUT_LAN_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* ICU | 25 | /* ICU |
29 | * ICUISTS: status register | 26 | * ICUISTS: status register |
@@ -52,4 +49,4 @@ | |||
52 | #define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) | 49 | #define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) |
53 | #define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) | 50 | #define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) |
54 | 51 | ||
55 | #endif /* _OPSPUT_OPSPUT_LAN_H */ | 52 | #endif /* _OPSPUT_OPSPUT_LAN_H */ |
diff --git a/include/asm-m32r/opsput/opsput_lcd.h b/include/asm-m32r/opsput/opsput_lcd.h index 99f296e1b61b..369c9f0832a6 100644 --- a/include/asm-m32r/opsput/opsput_lcd.h +++ b/include/asm-m32r/opsput/opsput_lcd.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_LCD_H | ||
2 | #define _OPSPUT_OPSPUT_LCD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_lcd.h | 5 | * include/asm-m32r/opsput/opsput_lcd.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_lcd.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_LCD_H | ||
16 | #define _OPSPUT_OPSPUT_LCD_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* | 25 | /* |
29 | * ICU | 26 | * ICU |
@@ -55,4 +52,4 @@ | |||
55 | #define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) | 52 | #define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) |
56 | #define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) | 53 | #define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) |
57 | 54 | ||
58 | #endif /* _OPSPUT_OPSPUT_LCD_H */ | 55 | #endif /* _OPSPUT_OPSPUT_LCD_H */ |
diff --git a/include/asm-m32r/opsput/opsput_pld.h b/include/asm-m32r/opsput/opsput_pld.h index a8d6452076f1..3f11ea1aac2d 100644 --- a/include/asm-m32r/opsput/opsput_pld.h +++ b/include/asm-m32r/opsput/opsput_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_PLD_H | ||
2 | #define _OPSPUT_OPSPUT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_pld.h | 5 | * include/asm-m32r/opsput/opsput_pld.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_pld.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_PLD_H | ||
16 | #define _OPSPUT_OPSPUT_PLD_H | ||
17 | |||
18 | |||
19 | #define PLD_PLAT_BASE 0x1cc00000 | 16 | #define PLD_PLAT_BASE 0x1cc00000 |
20 | 17 | ||
21 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
@@ -31,7 +28,7 @@ | |||
31 | #define __reg8 | 28 | #define __reg8 |
32 | #define __reg16 | 29 | #define __reg16 |
33 | #define __reg32 | 30 | #define __reg32 |
34 | #endif /* __ASSEMBLY__ */ | 31 | #endif /* __ASSEMBLY__ */ |
35 | 32 | ||
36 | /* CFC */ | 33 | /* CFC */ |
37 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 34 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -255,4 +252,4 @@ | |||
255 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 252 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
256 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 253 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
257 | 254 | ||
258 | #endif /* _OPSPUT_OPSPUT_PLD.H */ | 255 | #endif /* _OPSPUT_OPSPUT_PLD.H */ |
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 404a4c24007b..6f6ecf7d14a3 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PAGE_H | 1 | #ifndef _ASM_M32R_PAGE_H |
2 | #define _ASM_M32R_PAGE_H | 2 | #define _ASM_M32R_PAGE_H |
3 | 3 | ||
4 | |||
5 | /* PAGE_SHIFT determines the page size */ | 4 | /* PAGE_SHIFT determines the page size */ |
6 | #define PAGE_SHIFT 12 | 5 | #define PAGE_SHIFT 12 |
7 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 6 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
@@ -57,9 +56,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
57 | * and CONFIG_HIGHMEM64G options in the kernel configuration. | 56 | * and CONFIG_HIGHMEM64G options in the kernel configuration. |
58 | */ | 57 | */ |
59 | 58 | ||
60 | |||
61 | /* This handles the memory map.. */ | ||
62 | |||
63 | #define __MEMORY_START CONFIG_MEMORY_START | 59 | #define __MEMORY_START CONFIG_MEMORY_START |
64 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE | 60 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE |
65 | 61 | ||
@@ -92,4 +88,3 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
92 | 88 | ||
93 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
94 | #endif /* _ASM_M32R_PAGE_H */ | 90 | #endif /* _ASM_M32R_PAGE_H */ |
95 | |||
diff --git a/include/asm-m32r/param.h b/include/asm-m32r/param.h index 750b938ccb52..3e14026e39cd 100644 --- a/include/asm-m32r/param.h +++ b/include/asm-m32r/param.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PARAM_H | 1 | #ifndef _ASM_M32R_PARAM_H |
2 | #define _ASM_M32R_PARAM_H | 2 | #define _ASM_M32R_PARAM_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.5.67 */ | ||
7 | |||
8 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
9 | # define HZ 100 /* Internal kernel timer frequency */ | 5 | # define HZ 100 /* Internal kernel timer frequency */ |
10 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | 6 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ |
diff --git a/include/asm-m32r/pci.h b/include/asm-m32r/pci.h index 00d7b6f39a33..fe785d167db6 100644 --- a/include/asm-m32r/pci.h +++ b/include/asm-m32r/pci.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PCI_H | 1 | #ifndef _ASM_M32R_PCI_H |
2 | #define _ASM_M32R_PCI_H | 2 | #define _ASM_M32R_PCI_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/pci.h> | 4 | #include <asm-generic/pci.h> |
7 | 5 | ||
8 | #define PCI_DMA_BUS_IS_PHYS (1) | 6 | #define PCI_DMA_BUS_IS_PHYS (1) |
diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h index e09a86c3cadf..943ba63c1ebc 100644 --- a/include/asm-m32r/pgalloc.h +++ b/include/asm-m32r/pgalloc.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PGALLOC_H | 1 | #ifndef _ASM_M32R_PGALLOC_H |
2 | #define _ASM_M32R_PGALLOC_H | 2 | #define _ASM_M32R_PGALLOC_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
7 | 5 | ||
8 | #include <asm/io.h> | 6 | #include <asm/io.h> |
@@ -74,4 +72,3 @@ static __inline__ void pte_free(struct page *pte) | |||
74 | #define check_pgt_cache() do { } while (0) | 72 | #define check_pgt_cache() do { } while (0) |
75 | 73 | ||
76 | #endif /* _ASM_M32R_PGALLOC_H */ | 74 | #endif /* _ASM_M32R_PGALLOC_H */ |
77 | |||
diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h index 84152760e0b5..750925726a10 100644 --- a/include/asm-m32r/pgtable-2level.h +++ b/include/asm-m32r/pgtable-2level.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_M32R_PGTABLE_2LEVEL_H | 1 | #ifndef _ASM_M32R_PGTABLE_2LEVEL_H |
2 | #define _ASM_M32R_PGTABLE_2LEVEL_H | 2 | #define _ASM_M32R_PGTABLE_2LEVEL_H |
3 | |||
4 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
5 | 4 | ||
6 | |||
7 | /* | 5 | /* |
8 | * traditional M32R two-level paging structure: | 6 | * traditional M32R two-level paging structure: |
9 | */ | 7 | */ |
@@ -77,5 +75,4 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address) | |||
77 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) | 75 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) |
78 | 76 | ||
79 | #endif /* __KERNEL__ */ | 77 | #endif /* __KERNEL__ */ |
80 | |||
81 | #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ | 78 | #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ |
diff --git a/include/asm-m32r/posix_types.h b/include/asm-m32r/posix_types.h index 47e7e85a3dc3..1caac65d208f 100644 --- a/include/asm-m32r/posix_types.h +++ b/include/asm-m32r/posix_types.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_POSIX_TYPES_H | 1 | #ifndef _ASM_M32R_POSIX_TYPES_H |
2 | #define _ASM_M32R_POSIX_TYPES_H | 2 | #define _ASM_M32R_POSIX_TYPES_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386, sh 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * This file is generally used by user-level software, so you need to | 5 | * This file is generally used by user-level software, so you need to |
10 | * be a little careful about namespace pollution etc. Also, we cannot | 6 | * be a little careful about namespace pollution etc. Also, we cannot |
diff --git a/include/asm-m32r/rtc.h b/include/asm-m32r/rtc.h index 6b2b837c5978..0340633f3f4d 100644 --- a/include/asm-m32r/rtc.h +++ b/include/asm-m32r/rtc.h | |||
@@ -1,10 +1,6 @@ | |||
1 | /* $Id: rtc.h,v 1.1.1.1 2004/03/25 04:29:22 hitoshiy Exp $ */ | ||
2 | |||
3 | #ifndef __RTC_H__ | 1 | #ifndef __RTC_H__ |
4 | #define __RTC_H__ | 2 | #define __RTC_H__ |
5 | 3 | ||
6 | |||
7 | |||
8 | /* Dallas DS1302 clock/calendar register numbers. */ | 4 | /* Dallas DS1302 clock/calendar register numbers. */ |
9 | # define RTC_SECONDS 0 | 5 | # define RTC_SECONDS 0 |
10 | # define RTC_MINUTES 1 | 6 | # define RTC_MINUTES 1 |
diff --git a/include/asm-m32r/scatterlist.h b/include/asm-m32r/scatterlist.h index 09a10e43bf0f..c2de96cb69ed 100644 --- a/include/asm-m32r/scatterlist.h +++ b/include/asm-m32r/scatterlist.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SCATTERLIST_H | 1 | #ifndef _ASM_M32R_SCATTERLIST_H |
2 | #define _ASM_M32R_SCATTERLIST_H | 2 | #define _ASM_M32R_SCATTERLIST_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | struct scatterlist { | 4 | struct scatterlist { |
7 | char * address; /* Location data is to be transferred to, NULL for | 5 | char * address; /* Location data is to be transferred to, NULL for |
8 | * highmem page */ | 6 | * highmem page */ |
diff --git a/include/asm-m32r/sections.h b/include/asm-m32r/sections.h index 6b969e53b806..5e5d21c4908a 100644 --- a/include/asm-m32r/sections.h +++ b/include/asm-m32r/sections.h | |||
@@ -5,4 +5,3 @@ | |||
5 | #include <asm-generic/sections.h> | 5 | #include <asm-generic/sections.h> |
6 | 6 | ||
7 | #endif /* _M32R_SECTIONS_H */ | 7 | #endif /* _M32R_SECTIONS_H */ |
8 | |||
diff --git a/include/asm-m32r/segment.h b/include/asm-m32r/segment.h index e45db68e6c2d..42b11aeb3249 100644 --- a/include/asm-m32r/segment.h +++ b/include/asm-m32r/segment.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SEGMENT_H | 1 | #ifndef _ASM_M32R_SEGMENT_H |
2 | #define _ASM_M32R_SEGMENT_H | 2 | #define _ASM_M32R_SEGMENT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 (2.4.18) */ | ||
7 | |||
8 | #define __KERNEL_CS 0x10 | 4 | #define __KERNEL_CS 0x10 |
9 | #define __KERNEL_DS 0x18 | 5 | #define __KERNEL_DS 0x18 |
10 | 6 | ||
diff --git a/include/asm-m32r/sembuf.h b/include/asm-m32r/sembuf.h index e69018e6ff71..c9873d6890e2 100644 --- a/include/asm-m32r/sembuf.h +++ b/include/asm-m32r/sembuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SEMBUF_H | 1 | #ifndef _ASM_M32R_SEMBUF_H |
2 | #define _ASM_M32R_SEMBUF_H | 2 | #define _ASM_M32R_SEMBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The semid64_ds structure for m32r architecture. | 5 | * The semid64_ds structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/setup.h b/include/asm-m32r/setup.h index 6a0b32202d4e..c637ab992394 100644 --- a/include/asm-m32r/setup.h +++ b/include/asm-m32r/setup.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SETUP_H | ||
2 | #define _ASM_M32R_SETUP_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * This is set up by the setup-routine at boot-time | 5 | * This is set up by the setup-routine at boot-time |
3 | */ | 6 | */ |
@@ -32,3 +35,4 @@ extern unsigned long memory_end; | |||
32 | 35 | ||
33 | #endif /* __KERNEL__ */ | 36 | #endif /* __KERNEL__ */ |
34 | 37 | ||
38 | #endif /* _ASM_M32R_SETUP_H */ | ||
diff --git a/include/asm-m32r/shmbuf.h b/include/asm-m32r/shmbuf.h index b84e897fa87b..b0cdf0aa7d65 100644 --- a/include/asm-m32r/shmbuf.h +++ b/include/asm-m32r/shmbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SHMBUF_H | 1 | #ifndef _ASM_M32R_SHMBUF_H |
2 | #define _ASM_M32R_SHMBUF_H | 2 | #define _ASM_M32R_SHMBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The shmid64_ds structure for M32R architecture. | 5 | * The shmid64_ds structure for M32R architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/shmparam.h b/include/asm-m32r/shmparam.h index db0019ba955d..35986d81a528 100644 --- a/include/asm-m32r/shmparam.h +++ b/include/asm-m32r/shmparam.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SHMPARAM_H | 1 | #ifndef _ASM_M32R_SHMPARAM_H |
2 | #define _ASM_M32R_SHMPARAM_H | 2 | #define _ASM_M32R_SHMPARAM_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | 4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ |
7 | 5 | ||
8 | #endif /* _ASM_M32R_SHMPARAM_H */ | 6 | #endif /* _ASM_M32R_SHMPARAM_H */ |
diff --git a/include/asm-m32r/sigcontext.h b/include/asm-m32r/sigcontext.h index 62537dc4dec9..da4a9c36d09b 100644 --- a/include/asm-m32r/sigcontext.h +++ b/include/asm-m32r/sigcontext.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SIGCONTEXT_H | 1 | #ifndef _ASM_M32R_SIGCONTEXT_H |
2 | #define _ASM_M32R_SIGCONTEXT_H | 2 | #define _ASM_M32R_SIGCONTEXT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | |||
7 | struct sigcontext { | 4 | struct sigcontext { |
8 | /* CPU registers */ | 5 | /* CPU registers */ |
9 | /* Saved main processor registers. */ | 6 | /* Saved main processor registers. */ |
diff --git a/include/asm-m32r/siginfo.h b/include/asm-m32r/siginfo.h index 482202f2e77f..7d9cd9ebfd0e 100644 --- a/include/asm-m32r/siginfo.h +++ b/include/asm-m32r/siginfo.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M32R_SIGINFO_H | 1 | #ifndef _M32R_SIGINFO_H |
2 | #define _M32R_SIGINFO_H | 2 | #define _M32R_SIGINFO_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/siginfo.h> | 4 | #include <asm-generic/siginfo.h> |
7 | 5 | ||
8 | #endif /* _M32R_SIGINFO_H */ | 6 | #endif /* _M32R_SIGINFO_H */ |
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index 65423bed32b1..937258686ba5 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SIGNAL_H | 1 | #ifndef _ASM_M32R_SIGNAL_H |
2 | #define _ASM_M32R_SIGNAL_H | 2 | #define _ASM_M32R_SIGNAL_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | #include <linux/types.h> | 4 | #include <linux/types.h> |
9 | #include <linux/time.h> | 5 | #include <linux/time.h> |
10 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index 650d2558c304..abd937ac5239 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SMP_H | 1 | #ifndef _ASM_M32R_SMP_H |
2 | #define _ASM_M32R_SMP_H | 2 | #define _ASM_M32R_SMP_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | |||
7 | #ifdef CONFIG_SMP | 4 | #ifdef CONFIG_SMP |
8 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
9 | 6 | ||
diff --git a/include/asm-m32r/sockios.h b/include/asm-m32r/sockios.h index 147a118442ac..f89962e231fe 100644 --- a/include/asm-m32r/sockios.h +++ b/include/asm-m32r/sockios.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SOCKIOS_H | 1 | #ifndef _ASM_M32R_SOCKIOS_H |
2 | #define _ASM_M32R_SOCKIOS_H | 2 | #define _ASM_M32R_SOCKIOS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* Socket-level I/O control calls. */ | 4 | /* Socket-level I/O control calls. */ |
7 | #define FIOSETOWN 0x8901 | 5 | #define FIOSETOWN 0x8901 |
8 | #define SIOCSPGRP 0x8902 | 6 | #define SIOCSPGRP 0x8902 |
diff --git a/include/asm-m32r/spinlock_types.h b/include/asm-m32r/spinlock_types.h index 7e9941c45f40..83f52105c0e4 100644 --- a/include/asm-m32r/spinlock_types.h +++ b/include/asm-m32r/spinlock_types.h | |||
@@ -20,4 +20,4 @@ typedef struct { | |||
20 | 20 | ||
21 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } | 21 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } |
22 | 22 | ||
23 | #endif | 23 | #endif /* _ASM_M32R_SPINLOCK_TYPES_H */ |
diff --git a/include/asm-m32r/stat.h b/include/asm-m32r/stat.h index 05748fef4c8e..da4518f82d6d 100644 --- a/include/asm-m32r/stat.h +++ b/include/asm-m32r/stat.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_STAT_H | 1 | #ifndef _ASM_M32R_STAT_H |
2 | #define _ASM_M32R_STAT_H | 2 | #define _ASM_M32R_STAT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | #include <asm/byteorder.h> | 4 | #include <asm/byteorder.h> |
9 | 5 | ||
10 | struct __old_kernel_stat { | 6 | struct __old_kernel_stat { |
diff --git a/include/asm-m32r/string.h b/include/asm-m32r/string.h index cb54bcc2e677..e61e2b0bfc1f 100644 --- a/include/asm-m32r/string.h +++ b/include/asm-m32r/string.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_STRING_H | 1 | #ifndef _ASM_M32R_STRING_H |
2 | #define _ASM_M32R_STRING_H | 2 | #define _ASM_M32R_STRING_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #define __HAVE_ARCH_STRLEN | 4 | #define __HAVE_ARCH_STRLEN |
7 | extern size_t strlen(const char * s); | 5 | extern size_t strlen(const char * s); |
8 | 6 | ||
diff --git a/include/asm-m32r/syscall.h b/include/asm-m32r/syscall.h index d8d4b2c7a7d4..25f316f2b78d 100644 --- a/include/asm-m32r/syscall.h +++ b/include/asm-m32r/syscall.h | |||
@@ -1,11 +1,8 @@ | |||
1 | #ifndef _ASM_M32R_SYSCALL_H | 1 | #ifndef _ASM_M32R_SYSCALL_H |
2 | #define _ASM_M32R_SYSCALL_H | 2 | #define _ASM_M32R_SYSCALL_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* Definitions for the system call vector. */ | 4 | /* Definitions for the system call vector. */ |
7 | #define SYSCALL_VECTOR "2" | 5 | #define SYSCALL_VECTOR "2" |
8 | #define SYSCALL_VECTOR_ADDRESS "0xa0" | 6 | #define SYSCALL_VECTOR_ADDRESS "0xa0" |
9 | 7 | ||
10 | #endif /* _ASM_M32R_SYSCALL_H */ | 8 | #endif /* _ASM_M32R_SYSCALL_H */ |
11 | |||
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 4ce0619f6989..99ee09889ff7 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -339,4 +339,4 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
339 | 339 | ||
340 | #define arch_align_stack(x) (x) | 340 | #define arch_align_stack(x) (x) |
341 | 341 | ||
342 | #endif /* _ASM_M32R_SYSTEM_H */ | 342 | #endif /* _ASM_M32R_SYSTEM_H */ |
diff --git a/include/asm-m32r/termbits.h b/include/asm-m32r/termbits.h index faf2bd0504c1..e402641dfbad 100644 --- a/include/asm-m32r/termbits.h +++ b/include/asm-m32r/termbits.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_TERMBITS_H | 1 | #ifndef _ASM_M32R_TERMBITS_H |
2 | #define _ASM_M32R_TERMBITS_H | 2 | #define _ASM_M32R_TERMBITS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/posix_types.h> | 4 | #include <linux/posix_types.h> |
7 | 5 | ||
8 | typedef unsigned char cc_t; | 6 | typedef unsigned char cc_t; |
@@ -184,4 +182,4 @@ struct ktermios { | |||
184 | #define TCSADRAIN 1 | 182 | #define TCSADRAIN 1 |
185 | #define TCSAFLUSH 2 | 183 | #define TCSAFLUSH 2 |
186 | 184 | ||
187 | #endif /* _ASM_M32R_TERMBITS_H */ | 185 | #endif /* _ASM_M32R_TERMBITS_H */ |
diff --git a/include/asm-m32r/termios.h b/include/asm-m32r/termios.h index fc99d2e178d8..4943dd8db44d 100644 --- a/include/asm-m32r/termios.h +++ b/include/asm-m32r/termios.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M32R_TERMIOS_H | 1 | #ifndef _M32R_TERMIOS_H |
2 | #define _M32R_TERMIOS_H | 2 | #define _M32R_TERMIOS_H |
3 | 3 | ||
4 | /* orig : i386 2.6.0-test5 */ | ||
5 | |||
6 | #include <asm/termbits.h> | 4 | #include <asm/termbits.h> |
7 | #include <asm/ioctls.h> | 5 | #include <asm/ioctls.h> |
8 | 6 | ||
@@ -41,24 +39,6 @@ struct termio { | |||
41 | 39 | ||
42 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
43 | 41 | ||
44 | /* line disciplines */ | ||
45 | #define N_TTY 0 | ||
46 | #define N_SLIP 1 | ||
47 | #define N_MOUSE 2 | ||
48 | #define N_PPP 3 | ||
49 | #define N_STRIP 4 | ||
50 | #define N_AX25 5 | ||
51 | #define N_X25 6 /* X.25 async */ | ||
52 | #define N_6PACK 7 | ||
53 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
54 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
55 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
56 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
57 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
58 | #define N_HDLC 13 /* synchronous HDLC */ | ||
59 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
60 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
61 | |||
62 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
63 | #include <linux/module.h> | 43 | #include <linux/module.h> |
64 | 44 | ||
diff --git a/include/asm-m32r/timex.h b/include/asm-m32r/timex.h index 019441c1d7a0..bb9fe4feb12d 100644 --- a/include/asm-m32r/timex.h +++ b/include/asm-m32r/timex.h | |||
@@ -1,15 +1,12 @@ | |||
1 | #ifndef _ASM_M32R_TIMEX_H | 1 | #ifndef _ASM_M32R_TIMEX_H |
2 | #define _ASM_M32R_TIMEX_H | 2 | #define _ASM_M32R_TIMEX_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * linux/include/asm-m32r/timex.h | 5 | * linux/include/asm-m32r/timex.h |
8 | * | 6 | * |
9 | * m32r architecture timex specifications | 7 | * m32r architecture timex specifications |
10 | */ | 8 | */ |
11 | 9 | ||
12 | |||
13 | #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) | 10 | #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) |
14 | #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ | 11 | #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ |
15 | 12 | ||
diff --git a/include/asm-m32r/tlbflush.h b/include/asm-m32r/tlbflush.h index ae4494960593..3d37ac002bcc 100644 --- a/include/asm-m32r/tlbflush.h +++ b/include/asm-m32r/tlbflush.h | |||
@@ -98,4 +98,3 @@ static __inline__ void __flush_tlb_all(void) | |||
98 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | 98 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); |
99 | 99 | ||
100 | #endif /* _ASM_M32R_TLBFLUSH_H */ | 100 | #endif /* _ASM_M32R_TLBFLUSH_H */ |
101 | |||
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index fcf24c64c3ba..27d3eb539c50 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
6 | /* $Id$ */ | ||
7 | |||
8 | /* orig : i386 2.4.18 */ | ||
9 | |||
10 | typedef unsigned short umode_t; | 6 | typedef unsigned short umode_t; |
11 | 7 | ||
12 | /* | 8 | /* |
@@ -59,4 +55,4 @@ typedef u64 dma64_addr_t; | |||
59 | 55 | ||
60 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
61 | 57 | ||
62 | #endif /* _ASM_M32R_TYPES_H */ | 58 | #endif /* _ASM_M32R_TYPES_H */ |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 26e978c7e3b4..bd8c83765a5c 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s) | |||
68 | * This needs 33-bit arithmetic. We have a carry... | 68 | * This needs 33-bit arithmetic. We have a carry... |
69 | */ | 69 | */ |
70 | #define __range_ok(addr,size) ({ \ | 70 | #define __range_ok(addr,size) ({ \ |
71 | unsigned long flag, sum; \ | 71 | unsigned long flag, roksum; \ |
72 | __chk_user_ptr(addr); \ | 72 | __chk_user_ptr(addr); \ |
73 | asm ( \ | 73 | asm ( \ |
74 | " cmpu %1, %1 ; clear cbit\n" \ | 74 | " cmpu %1, %1 ; clear cbit\n" \ |
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s) | |||
76 | " subx %0, %0\n" \ | 76 | " subx %0, %0\n" \ |
77 | " cmpu %4, %1\n" \ | 77 | " cmpu %4, %1\n" \ |
78 | " subx %0, %5\n" \ | 78 | " subx %0, %5\n" \ |
79 | : "=&r" (flag), "=r" (sum) \ | 79 | : "=&r" (flag), "=r" (roksum) \ |
80 | : "1" (addr), "r" ((int)(size)), \ | 80 | : "1" (addr), "r" ((int)(size)), \ |
81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ | 81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ |
82 | : "cbit" ); \ | 82 | : "cbit" ); \ |
diff --git a/include/asm-m32r/ucontext.h b/include/asm-m32r/ucontext.h index 2de709a5c53c..09324741eec3 100644 --- a/include/asm-m32r/ucontext.h +++ b/include/asm-m32r/ucontext.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UCONTEXT_H | 1 | #ifndef _ASM_M32R_UCONTEXT_H |
2 | #define _ASM_M32R_UCONTEXT_H | 2 | #define _ASM_M32R_UCONTEXT_H |
3 | 3 | ||
4 | /* orig : i386 2.4.18 */ | ||
5 | |||
6 | struct ucontext { | 4 | struct ucontext { |
7 | unsigned long uc_flags; | 5 | unsigned long uc_flags; |
8 | struct ucontext *uc_link; | 6 | struct ucontext *uc_link; |
diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h index 3aef9ac8d3aa..fccc180c3913 100644 --- a/include/asm-m32r/unaligned.h +++ b/include/asm-m32r/unaligned.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UNALIGNED_H | 1 | #ifndef _ASM_M32R_UNALIGNED_H |
2 | #define _ASM_M32R_UNALIGNED_H | 2 | #define _ASM_M32R_UNALIGNED_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : generic 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * For the benefit of those who are trying to port Linux to another | 5 | * For the benefit of those who are trying to port Linux to another |
10 | * architecture, here are some C-language equivalents. | 6 | * architecture, here are some C-language equivalents. |
@@ -12,7 +8,6 @@ | |||
12 | 8 | ||
13 | #include <asm/string.h> | 9 | #include <asm/string.h> |
14 | 10 | ||
15 | |||
16 | #define get_unaligned(ptr) \ | 11 | #define get_unaligned(ptr) \ |
17 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) | 12 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) |
18 | 13 | ||
@@ -21,5 +16,4 @@ | |||
21 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ | 16 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ |
22 | (void)0; }) | 17 | (void)0; }) |
23 | 18 | ||
24 | 19 | #endif /* _ASM_M32R_UNALIGNED_H */ | |
25 | #endif /* _ASM_M32R_UNALIGNED_H */ | ||
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 5b66bd3c6ed6..cbbd53762ea6 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UNISTD_H | 1 | #ifndef _ASM_M32R_UNISTD_H |
2 | #define _ASM_M32R_UNISTD_H | 2 | #define _ASM_M32R_UNISTD_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * This file contains the system call numbers. | 5 | * This file contains the system call numbers. |
8 | */ | 6 | */ |
diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h index 1ad4ded8483b..035258d713d0 100644 --- a/include/asm-m32r/user.h +++ b/include/asm-m32r/user.h | |||
@@ -1,12 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_USER_H | 1 | #ifndef _ASM_M32R_USER_H |
2 | #define _ASM_M32R_USER_H | 2 | #define _ASM_M32R_USER_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : sh 2.4.18 | ||
7 | * mod : remove fpu registers | ||
8 | */ | ||
9 | |||
10 | #include <linux/types.h> | 4 | #include <linux/types.h> |
11 | #include <asm/ptrace.h> | 5 | #include <asm/ptrace.h> |
12 | #include <asm/page.h> | 6 | #include <asm/page.h> |
diff --git a/include/asm-m32r/vga.h b/include/asm-m32r/vga.h index 533163447cc9..a1b63061c06f 100644 --- a/include/asm-m32r/vga.h +++ b/include/asm-m32r/vga.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_VGA_H | 1 | #ifndef _ASM_M32R_VGA_H |
2 | #define _ASM_M32R_VGA_H | 2 | #define _ASM_M32R_VGA_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * Access to VGA videoram | 5 | * Access to VGA videoram |
8 | * | 6 | * |
@@ -19,4 +17,4 @@ | |||
19 | #define vga_readb(x) (*(x)) | 17 | #define vga_readb(x) (*(x)) |
20 | #define vga_writeb(x,y) (*(y) = (x)) | 18 | #define vga_writeb(x,y) (*(y) = (x)) |
21 | 19 | ||
22 | #endif /* _ASM_M32R_VGA_H */ | 20 | #endif /* _ASM_M32R_VGA_H */ |
diff --git a/include/asm-m32r/xor.h b/include/asm-m32r/xor.h index fd960dc9bf76..6d525259df3e 100644 --- a/include/asm-m32r/xor.h +++ b/include/asm-m32r/xor.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_XOR_H | 1 | #ifndef _ASM_M32R_XOR_H |
2 | #define _ASM_M32R_XOR_H | 2 | #define _ASM_M32R_XOR_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/xor.h> | 4 | #include <asm-generic/xor.h> |
7 | 5 | ||
8 | #endif /* _ASM_M32R_XOR_H */ | 6 | #endif /* _ASM_M32R_XOR_H */ |
diff --git a/include/asm-m68k/math-emu.h b/include/asm-m68k/math-emu.h index 7ac6259b68df..ddfab96403cb 100644 --- a/include/asm-m68k/math-emu.h +++ b/include/asm-m68k/math-emu.h | |||
@@ -226,6 +226,21 @@ extern unsigned int fp_debugprint; | |||
226 | .previous | 226 | .previous |
227 | .endm | 227 | .endm |
228 | 228 | ||
229 | /* work around binutils idiocy */ | ||
230 | old_gas=-1 | ||
231 | .irp gas_ident.x .x | ||
232 | old_gas=old_gas+1 | ||
233 | .endr | ||
234 | .if !old_gas | ||
235 | .irp m b,w,l | ||
236 | .macro getuser.\m src,dest,label,addr | ||
237 | getuser .\m,\src,\dest,\label,\addr | ||
238 | .endm | ||
239 | .macro putuser.\m src,dest,label,addr | ||
240 | putuser .\m,\src,\dest,\label,\addr | ||
241 | .endm | ||
242 | .endr | ||
243 | .endif | ||
229 | 244 | ||
230 | .macro movestack nr,arg1,arg2,arg3,arg4,arg5 | 245 | .macro movestack nr,arg1,arg2,arg3,arg4,arg5 |
231 | .if \nr | 246 | .if \nr |
diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h index 857f0c9a9120..00edabd76168 100644 --- a/include/asm-m68k/termios.h +++ b/include/asm-m68k/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-m68k/user.h b/include/asm-m68k/user.h index d7c0b109bd45..8c56ccab4849 100644 --- a/include/asm-m68k/user.h +++ b/include/asm-m68k/user.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M68K_USER_H | 1 | #ifndef _M68K_USER_H |
2 | #define _M68K_USER_H | 2 | #define _M68K_USER_H |
3 | 3 | ||
4 | #include <asm/page.h> | ||
5 | |||
6 | /* Core file format: The core file is written in such a way that gdb | 4 | /* Core file format: The core file is written in such a way that gdb |
7 | can understand it and provide useful information to the user (under | 5 | can understand it and provide useful information to the user (under |
8 | linux we use the 'trad-core' bfd). There are quite a number of | 6 | linux we use the 'trad-core' bfd). There are quite a number of |
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index 046cf686bee7..e4d6f1fb1cf7 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h | |||
@@ -72,7 +72,6 @@ | |||
72 | #define MADV_DOFORK 11 /* do inherit across fork */ | 72 | #define MADV_DOFORK 11 /* do inherit across fork */ |
73 | 73 | ||
74 | /* compatibility flags */ | 74 | /* compatibility flags */ |
75 | #define MAP_ANON MAP_ANONYMOUS | ||
76 | #define MAP_FILE 0 | 75 | #define MAP_FILE 0 |
77 | 76 | ||
78 | #endif /* _ASM_MMAN_H */ | 77 | #endif /* _ASM_MMAN_H */ |
diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h index 4906204d34fe..2ce07f4be369 100644 --- a/include/asm-mips/termios.h +++ b/include/asm-mips/termios.h | |||
@@ -87,24 +87,6 @@ struct termio { | |||
87 | #define TIOCM_OUT2 0x4000 | 87 | #define TIOCM_OUT2 0x4000 |
88 | #define TIOCM_LOOP 0x8000 | 88 | #define TIOCM_LOOP 0x8000 |
89 | 89 | ||
90 | /* line disciplines */ | ||
91 | #define N_TTY 0 | ||
92 | #define N_SLIP 1 | ||
93 | #define N_MOUSE 2 | ||
94 | #define N_PPP 3 | ||
95 | #define N_STRIP 4 | ||
96 | #define N_AX25 5 | ||
97 | #define N_X25 6 /* X.25 async */ | ||
98 | #define N_6PACK 7 | ||
99 | #define N_MASC 8 /* Reserved fo Mobitex module <kaz@cafe.net> */ | ||
100 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
101 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
102 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
103 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
104 | #define N_HDLC 13 /* synchronous HDLC */ | ||
105 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
106 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
107 | |||
108 | #ifdef __KERNEL__ | 90 | #ifdef __KERNEL__ |
109 | 91 | ||
110 | #include <linux/string.h> | 92 | #include <linux/string.h> |
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index 0ef15ee0f17e..defe752cc996 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h | |||
@@ -55,7 +55,6 @@ | |||
55 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ | 55 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ |
56 | 56 | ||
57 | /* compatibility flags */ | 57 | /* compatibility flags */ |
58 | #define MAP_ANON MAP_ANONYMOUS | ||
59 | #define MAP_FILE 0 | 58 | #define MAP_FILE 0 |
60 | #define MAP_VARIABLE 0 | 59 | #define MAP_VARIABLE 0 |
61 | 60 | ||
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h index 6965e8f6c3e1..5345b3420475 100644 --- a/include/asm-parisc/termios.h +++ b/include/asm-parisc/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h index 7f80a019b6a0..2c14fea07c8a 100644 --- a/include/asm-powerpc/termios.h +++ b/include/asm-powerpc/termios.h | |||
@@ -71,24 +71,6 @@ struct termio { | |||
71 | #define _VEOL2 8 | 71 | #define _VEOL2 8 |
72 | #define _VSWTC 9 | 72 | #define _VSWTC 9 |
73 | 73 | ||
74 | /* line disciplines */ | ||
75 | #define N_TTY 0 | ||
76 | #define N_SLIP 1 | ||
77 | #define N_MOUSE 2 | ||
78 | #define N_PPP 3 | ||
79 | #define N_STRIP 4 | ||
80 | #define N_AX25 5 | ||
81 | #define N_X25 6 /* X.25 async */ | ||
82 | #define N_6PACK 7 | ||
83 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
84 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
85 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
86 | #define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */ | ||
87 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
88 | #define N_HDLC 13 /* synchronous HDLC */ | ||
89 | #define N_SYNC_PPP 14 | ||
90 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
91 | |||
92 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
93 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ | 75 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ |
94 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" | 76 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" |
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index a4c2d550dad4..dca6a6cc103f 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <linux/vmalloc.h> | ||
17 | #include <asm/page.h> | 16 | #include <asm/page.h> |
18 | 17 | ||
19 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffffffff |
@@ -41,70 +40,6 @@ static inline void * phys_to_virt(unsigned long address) | |||
41 | return __io_virt(address); | 40 | return __io_virt(address); |
42 | } | 41 | } |
43 | 42 | ||
44 | extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); | ||
45 | |||
46 | static inline void * ioremap (unsigned long offset, unsigned long size) | ||
47 | { | ||
48 | return __ioremap(offset, size, 0); | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * This one maps high address device memory and turns off caching for that area. | ||
53 | * it's useful if some control registers are in such an area and write combining | ||
54 | * or read caching is not desirable: | ||
55 | */ | ||
56 | static inline void * ioremap_nocache (unsigned long offset, unsigned long size) | ||
57 | { | ||
58 | return __ioremap(offset, size, 0); | ||
59 | } | ||
60 | |||
61 | extern void iounmap(void *addr); | ||
62 | |||
63 | /* | ||
64 | * IO bus memory addresses are also 1:1 with the physical address | ||
65 | */ | ||
66 | #define virt_to_bus virt_to_phys | ||
67 | #define bus_to_virt phys_to_virt | ||
68 | |||
69 | /* | ||
70 | * readX/writeX() are used to access memory mapped devices. On some | ||
71 | * architectures the memory mapped IO stuff needs to be accessed | ||
72 | * differently. | ||
73 | */ | ||
74 | |||
75 | #define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) | ||
76 | #define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) | ||
77 | #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) | ||
78 | #define readq(addr) (*(volatile unsigned long long *) __io_virt(addr)) | ||
79 | |||
80 | #define readb_relaxed(addr) readb(addr) | ||
81 | #define readw_relaxed(addr) readw(addr) | ||
82 | #define readl_relaxed(addr) readl(addr) | ||
83 | #define readq_relaxed(addr) readq(addr) | ||
84 | #define __raw_readb readb | ||
85 | #define __raw_readw readw | ||
86 | #define __raw_readl readl | ||
87 | #define __raw_readq readq | ||
88 | |||
89 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) | ||
90 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) | ||
91 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) | ||
92 | #define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b)) | ||
93 | #define __raw_writeb writeb | ||
94 | #define __raw_writew writew | ||
95 | #define __raw_writel writel | ||
96 | #define __raw_writeq writeq | ||
97 | |||
98 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) | ||
99 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) | ||
100 | #define memcpy_toio(a,b,c) memcpy(__io_virt(a),(b),(c)) | ||
101 | |||
102 | #define inb_p(addr) readb(addr) | ||
103 | #define inb(addr) readb(addr) | ||
104 | |||
105 | #define outb(x,addr) ((void) writeb(x,addr)) | ||
106 | #define outb_p(x,addr) outb(x,addr) | ||
107 | |||
108 | #define mmiowb() do { } while (0) | 43 | #define mmiowb() do { } while (0) |
109 | 44 | ||
110 | /* | 45 | /* |
diff --git a/include/asm-s390/termios.h b/include/asm-s390/termios.h index 62b23caf370e..a3480e25eb4b 100644 --- a/include/asm-s390/termios.h +++ b/include/asm-s390/termios.h | |||
@@ -47,24 +47,6 @@ struct termio { | |||
47 | 47 | ||
48 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 48 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
49 | 49 | ||
50 | /* line disciplines */ | ||
51 | #define N_TTY 0 | ||
52 | #define N_SLIP 1 | ||
53 | #define N_MOUSE 2 | ||
54 | #define N_PPP 3 | ||
55 | #define N_STRIP 4 | ||
56 | #define N_AX25 5 | ||
57 | #define N_X25 6 /* X.25 async */ | ||
58 | #define N_6PACK 7 | ||
59 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
60 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
61 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
62 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
63 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
64 | #define N_HDLC 13 /* synchronous HDLC */ | ||
65 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
66 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
67 | |||
68 | #ifdef __KERNEL__ | 50 | #ifdef __KERNEL__ |
69 | 51 | ||
70 | /* intr=^C quit=^\ erase=del kill=^U | 52 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h index 44edfd471443..e7c8f86ef890 100644 --- a/include/asm-sh/termios.h +++ b/include/asm-sh/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sh64/termios.h b/include/asm-sh64/termios.h index 4a9c7fb411bc..dc44e6ed3a7c 100644 --- a/include/asm-sh64/termios.h +++ b/include/asm-sh64/termios.h | |||
@@ -50,24 +50,6 @@ struct termio { | |||
50 | 50 | ||
51 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 51 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
52 | 52 | ||
53 | /* line disciplines */ | ||
54 | #define N_TTY 0 | ||
55 | #define N_SLIP 1 | ||
56 | #define N_MOUSE 2 | ||
57 | #define N_PPP 3 | ||
58 | #define N_STRIP 4 | ||
59 | #define N_AX25 5 | ||
60 | #define N_X25 6 /* X.25 async */ | ||
61 | #define N_6PACK 7 | ||
62 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
63 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
64 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
65 | #define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */ | ||
66 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
67 | #define N_HDLC 13 /* synchronous HDLC */ | ||
68 | #define N_SYNC_PPP 14 | ||
69 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
70 | |||
71 | #ifdef __KERNEL__ | 53 | #ifdef __KERNEL__ |
72 | 54 | ||
73 | /* intr=^C quit=^\ erase=del kill=^U | 55 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index cab0b851b8b1..c23e74a0eaa8 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h | |||
@@ -256,6 +256,35 @@ extern void iounmap(volatile void __iomem *addr); | |||
256 | #define iowrite16(val,X) writew(val,X) | 256 | #define iowrite16(val,X) writew(val,X) |
257 | #define iowrite32(val,X) writel(val,X) | 257 | #define iowrite32(val,X) writel(val,X) |
258 | 258 | ||
259 | static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) | ||
260 | { | ||
261 | insb((unsigned long __force)port, buf, count); | ||
262 | } | ||
263 | static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) | ||
264 | { | ||
265 | insw((unsigned long __force)port, buf, count); | ||
266 | } | ||
267 | |||
268 | static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) | ||
269 | { | ||
270 | insl((unsigned long __force)port, buf, count); | ||
271 | } | ||
272 | |||
273 | static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) | ||
274 | { | ||
275 | outsb((unsigned long __force)port, buf, count); | ||
276 | } | ||
277 | |||
278 | static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) | ||
279 | { | ||
280 | outsw((unsigned long __force)port, buf, count); | ||
281 | } | ||
282 | |||
283 | static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) | ||
284 | { | ||
285 | outsl((unsigned long __force)port, buf, count); | ||
286 | } | ||
287 | |||
259 | /* Create a virtual mapping cookie for an IO port range */ | 288 | /* Create a virtual mapping cookie for an IO port range */ |
260 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | 289 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); |
261 | extern void ioport_unmap(void __iomem *); | 290 | extern void ioport_unmap(void __iomem *); |
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index d05f83c80989..d767f206ab33 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -45,24 +45,6 @@ struct winsize { | |||
45 | unsigned short ws_ypixel; | 45 | unsigned short ws_ypixel; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* line disciplines */ | ||
49 | #define N_TTY 0 | ||
50 | #define N_SLIP 1 | ||
51 | #define N_MOUSE 2 | ||
52 | #define N_PPP 3 | ||
53 | #define N_STRIP 4 | ||
54 | #define N_AX25 5 | ||
55 | #define N_X25 6 | ||
56 | #define N_6PACK 7 | ||
57 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
58 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
59 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
60 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
61 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
62 | #define N_HDLC 13 /* synchronous HDLC */ | ||
63 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
64 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
65 | |||
66 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
67 | #include <linux/module.h> | 49 | #include <linux/module.h> |
68 | 50 | ||
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index ee26a071c677..f05d390993d5 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -45,24 +45,6 @@ struct winsize { | |||
45 | unsigned short ws_ypixel; | 45 | unsigned short ws_ypixel; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* line disciplines */ | ||
49 | #define N_TTY 0 | ||
50 | #define N_SLIP 1 | ||
51 | #define N_MOUSE 2 | ||
52 | #define N_PPP 3 | ||
53 | #define N_STRIP 4 | ||
54 | #define N_AX25 5 | ||
55 | #define N_X25 6 | ||
56 | #define N_6PACK 7 | ||
57 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
58 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
59 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
60 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
61 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
62 | #define N_HDLC 13 /* synchronous HDLC */ | ||
63 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
64 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
65 | |||
66 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
67 | #include <linux/module.h> | 49 | #include <linux/module.h> |
68 | 50 | ||
diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h index 99711134e477..d3b90b7ac3e9 100644 --- a/include/asm-um/elf-ppc.h +++ b/include/asm-um/elf-ppc.h | |||
@@ -11,7 +11,7 @@ extern long elf_aux_hwcap; | |||
11 | 11 | ||
12 | #define elf_check_arch(x) (1) | 12 | #define elf_check_arch(x) (1) |
13 | 13 | ||
14 | #ifdef CONFIG_64_BIT | 14 | #ifdef CONFIG_64BIT |
15 | #define ELF_CLASS ELFCLASS64 | 15 | #define ELF_CLASS ELFCLASS64 |
16 | #else | 16 | #else |
17 | #define ELF_CLASS ELFCLASS32 | 17 | #define ELF_CLASS ELFCLASS32 |
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index 10609af376c0..31c2d4d685bd 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h | |||
@@ -13,6 +13,7 @@ | |||
13 | struct arch_thread { | 13 | struct arch_thread { |
14 | unsigned long debugregs[8]; | 14 | unsigned long debugregs[8]; |
15 | int debugregs_seq; | 15 | int debugregs_seq; |
16 | unsigned long fs; | ||
16 | struct faultinfo faultinfo; | 17 | struct faultinfo faultinfo; |
17 | }; | 18 | }; |
18 | 19 | ||
@@ -25,8 +26,9 @@ extern inline void rep_nop(void) | |||
25 | #define cpu_relax() rep_nop() | 26 | #define cpu_relax() rep_nop() |
26 | 27 | ||
27 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ | 28 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ |
28 | .debugregs_seq = 0, \ | 29 | .debugregs_seq = 0, \ |
29 | .faultinfo = { 0, 0, 0 } } | 30 | .fs = 0, \ |
31 | .faultinfo = { 0, 0, 0 } } | ||
30 | 32 | ||
31 | static inline void arch_flush_thread(struct arch_thread *thread) | 33 | static inline void arch_flush_thread(struct arch_thread *thread) |
32 | { | 34 | { |
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h index 03b4af4ac09a..bf61d17de3f7 100644 --- a/include/asm-um/ptrace-x86_64.h +++ b/include/asm-um/ptrace-x86_64.h | |||
@@ -81,9 +81,10 @@ static inline void arch_switch_to_tt(struct task_struct *from, | |||
81 | { | 81 | { |
82 | } | 82 | } |
83 | 83 | ||
84 | static inline void arch_switch_to_skas(struct task_struct *from, | 84 | extern void arch_switch_to_skas(struct task_struct *from, |
85 | struct task_struct *to) | 85 | struct task_struct *to); |
86 | { | 86 | |
87 | } | 87 | extern long arch_prctl_skas(struct task_struct *task, int code, |
88 | unsigned long __user *addr); | ||
88 | 89 | ||
89 | #endif | 90 | #endif |
diff --git a/include/asm-v850/termios.h b/include/asm-v850/termios.h index 79e97b59806e..c2c2b1d58776 100644 --- a/include/asm-v850/termios.h +++ b/include/asm-v850/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-x86_64/termios.h b/include/asm-x86_64/termios.h index 443b225537f0..35ee59b78329 100644 --- a/include/asm-x86_64/termios.h +++ b/include/asm-x86_64/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index c0eac519840b..8079e29c14fd 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h | |||
@@ -37,11 +37,11 @@ | |||
37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. | 37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. |
38 | */ | 38 | */ |
39 | #define __range_not_ok(addr,size) ({ \ | 39 | #define __range_not_ok(addr,size) ({ \ |
40 | unsigned long flag,sum; \ | 40 | unsigned long flag,roksum; \ |
41 | __chk_user_ptr(addr); \ | 41 | __chk_user_ptr(addr); \ |
42 | asm("# range_ok\n\r" \ | 42 | asm("# range_ok\n\r" \ |
43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ | 43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ |
44 | :"=&r" (flag), "=r" (sum) \ | 44 | :"=&r" (flag), "=r" (roksum) \ |
45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ | 45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ |
46 | flag; }) | 46 | flag; }) |
47 | 47 | ||
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h index ba394cbb4807..9b92620c8a1e 100644 --- a/include/asm-xtensa/mman.h +++ b/include/asm-xtensa/mman.h | |||
@@ -79,7 +79,6 @@ | |||
79 | #define MADV_DOFORK 11 /* do inherit across fork */ | 79 | #define MADV_DOFORK 11 /* do inherit across fork */ |
80 | 80 | ||
81 | /* compatibility flags */ | 81 | /* compatibility flags */ |
82 | #define MAP_ANON MAP_ANONYMOUS | ||
83 | #define MAP_FILE 0 | 82 | #define MAP_FILE 0 |
84 | 83 | ||
85 | #endif /* _XTENSA_MMAN_H */ | 84 | #endif /* _XTENSA_MMAN_H */ |
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h index 83c6aed1d115..f14b42c8dac0 100644 --- a/include/asm-xtensa/termios.h +++ b/include/asm-xtensa/termios.h | |||
@@ -52,25 +52,6 @@ struct termio { | |||
52 | 52 | ||
53 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 53 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
54 | 54 | ||
55 | /* Line disciplines */ | ||
56 | |||
57 | #define N_TTY 0 | ||
58 | #define N_SLIP 1 | ||
59 | #define N_MOUSE 2 | ||
60 | #define N_PPP 3 | ||
61 | #define N_STRIP 4 | ||
62 | #define N_AX25 5 | ||
63 | #define N_X25 6 /* X.25 async */ | ||
64 | #define N_6PACK 7 | ||
65 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
66 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
67 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
68 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
69 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
70 | #define N_HDLC 13 /* synchronous HDLC */ | ||
71 | #define N_SYNC_PPP 14 | ||
72 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
73 | |||
74 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
75 | 56 | ||
76 | /* intr=^C quit=^\ erase=del kill=^U | 57 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 683513e310de..bb881c3219fa 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -156,7 +156,6 @@ header-y += video_encoder.h | |||
156 | header-y += videotext.h | 156 | header-y += videotext.h |
157 | header-y += vt.h | 157 | header-y += vt.h |
158 | header-y += wireless.h | 158 | header-y += wireless.h |
159 | header-y += xattr.h | ||
160 | header-y += x25.h | 159 | header-y += x25.h |
161 | 160 | ||
162 | unifdef-y += acct.h | 161 | unifdef-y += acct.h |
@@ -336,6 +335,7 @@ unifdef-y += wait.h | |||
336 | unifdef-y += wanrouter.h | 335 | unifdef-y += wanrouter.h |
337 | unifdef-y += watchdog.h | 336 | unifdef-y += watchdog.h |
338 | unifdef-y += wireless.h | 337 | unifdef-y += wireless.h |
338 | unifdef-y += xattr.h | ||
339 | unifdef-y += xfrm.h | 339 | unifdef-y += xfrm.h |
340 | 340 | ||
341 | objhdr-y += version.h | 341 | objhdr-y += version.h |
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild index 56499ab9e32e..79bedddfd9ca 100644 --- a/include/linux/byteorder/Kbuild +++ b/include/linux/byteorder/Kbuild | |||
@@ -1,7 +1,5 @@ | |||
1 | header-y += big_endian.h | 1 | header-y += big_endian.h |
2 | header-y += little_endian.h | 2 | header-y += little_endian.h |
3 | header-y += pdp_endian.h | ||
4 | 3 | ||
5 | unifdef-y += generic.h | 4 | unifdef-y += generic.h |
6 | unifdef-y += swabb.h | ||
7 | unifdef-y += swab.h | 5 | unifdef-y += swab.h |
diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h deleted file mode 100644 index 618631cbc6e3..000000000000 --- a/include/linux/byteorder/pdp_endian.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | #ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
2 | #define _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
3 | |||
4 | /* | ||
5 | * Could have been named NUXI-endian, but we use the same name as in glibc. | ||
6 | * hopefully only the PDP and its evolutions (old VAXen in compatibility mode) | ||
7 | * should ever use this braindead byteorder. | ||
8 | * This file *should* work, but has not been tested. | ||
9 | * | ||
10 | * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412 | ||
11 | * | ||
12 | * I thought vaxen were NUXI-endian, but was told they were correct-endian | ||
13 | * (little-endian), though indeed there existed NUXI-endian machines | ||
14 | * (DEC PDP-11 and old VAXen in compatibility mode). | ||
15 | * This makes this file a bit useless, but as a proof-of-concept. | ||
16 | * | ||
17 | * But what does a __u64 look like: is it 34127856 or 78563412 ??? | ||
18 | * I don't dare imagine! Hence, no 64-bit byteorder support yet. | ||
19 | * Hopefully, there 64-bit pdp-endian support shouldn't ever be required. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __PDP_ENDIAN | ||
24 | #define __PDP_ENDIAN 3412 | ||
25 | #endif | ||
26 | #ifndef __PDP_ENDIAN_BITFIELD | ||
27 | #define __PDP_ENDIAN_BITFIELD | ||
28 | #endif | ||
29 | |||
30 | #include <linux/byteorder/swab.h> | ||
31 | #include <linux/byteorder/swabb.h> | ||
32 | |||
33 | #define __constant_htonl(x) ___constant_swahb32((x)) | ||
34 | #define __constant_ntohl(x) ___constant_swahb32((x)) | ||
35 | #define __constant_htons(x) ___constant_swab16((x)) | ||
36 | #define __constant_ntohs(x) ___constant_swab16((x)) | ||
37 | #define __constant_cpu_to_le64(x) I DON'T KNOW | ||
38 | #define __constant_le64_to_cpu(x) I DON'T KNOW | ||
39 | #define __constant_cpu_to_le32(x) ___constant_swahw32((x)) | ||
40 | #define __constant_le32_to_cpu(x) ___constant_swahw32((x)) | ||
41 | #define __constant_cpu_to_le16(x) ((__u16)(x) | ||
42 | #define __constant_le16_to_cpu(x) ((__u16)(x) | ||
43 | #define __constant_cpu_to_be64(x) I DON'T KNOW | ||
44 | #define __constant_be64_to_cpu(x) I DON'T KNOW | ||
45 | #define __constant_cpu_to_be32(x) ___constant_swahb32((x)) | ||
46 | #define __constant_be32_to_cpu(x) ___constant_swahb32((x)) | ||
47 | #define __constant_cpu_to_be16(x) ___constant_swab16((x)) | ||
48 | #define __constant_be16_to_cpu(x) ___constant_swab16((x)) | ||
49 | #define __cpu_to_le64(x) I DON'T KNOW | ||
50 | #define __le64_to_cpu(x) I DON'T KNOW | ||
51 | #define __cpu_to_le32(x) ___swahw32((x)) | ||
52 | #define __le32_to_cpu(x) ___swahw32((x)) | ||
53 | #define __cpu_to_le16(x) ((__u16)(x) | ||
54 | #define __le16_to_cpu(x) ((__u16)(x) | ||
55 | #define __cpu_to_be64(x) I DON'T KNOW | ||
56 | #define __be64_to_cpu(x) I DON'T KNOW | ||
57 | #define __cpu_to_be32(x) __swahb32((x)) | ||
58 | #define __be32_to_cpu(x) __swahb32((x)) | ||
59 | #define __cpu_to_be16(x) __swab16((x)) | ||
60 | #define __be16_to_cpu(x) __swab16((x)) | ||
61 | #define __cpu_to_le64p(x) I DON'T KNOW | ||
62 | #define __le64_to_cpup(x) I DON'T KNOW | ||
63 | #define __cpu_to_le32p(x) ___swahw32p((x)) | ||
64 | #define __le32_to_cpup(x) ___swahw32p((x)) | ||
65 | #define __cpu_to_le16p(x) (*(__u16*)(x)) | ||
66 | #define __le16_to_cpup(x) (*(__u16*)(x)) | ||
67 | #define __cpu_to_be64p(x) I DON'T KNOW | ||
68 | #define __be64_to_cpup(x) I DON'T KNOW | ||
69 | #define __cpu_to_be32p(x) __swahb32p((x)) | ||
70 | #define __be32_to_cpup(x) __swahb32p((x)) | ||
71 | #define __cpu_to_be16p(x) __swab16p((x)) | ||
72 | #define __be16_to_cpup(x) __swab16p((x)) | ||
73 | #define __cpu_to_le64s(x) I DON'T KNOW | ||
74 | #define __le64_to_cpus(x) I DON'T KNOW | ||
75 | #define __cpu_to_le32s(x) ___swahw32s((x)) | ||
76 | #define __le32_to_cpus(x) ___swahw32s((x)) | ||
77 | #define __cpu_to_le16s(x) do {} while (0) | ||
78 | #define __le16_to_cpus(x) do {} while (0) | ||
79 | #define __cpu_to_be64s(x) I DON'T KNOW | ||
80 | #define __be64_to_cpus(x) I DON'T KNOW | ||
81 | #define __cpu_to_be32s(x) __swahb32s((x)) | ||
82 | #define __be32_to_cpus(x) __swahb32s((x)) | ||
83 | #define __cpu_to_be16s(x) __swab16s((x)) | ||
84 | #define __be16_to_cpus(x) __swab16s((x)) | ||
85 | |||
86 | #include <linux/byteorder/generic.h> | ||
87 | |||
88 | #endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */ | ||
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index ae5e5f914bf4..8c780c7d779e 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | #define ___swahw32(x) \ | 30 | #define ___swahw32(x) \ |
29 | ({ \ | 31 | ({ \ |
30 | __u32 __x = (x); \ | 32 | __u32 __x = (x); \ |
@@ -77,19 +79,14 @@ | |||
77 | /* | 79 | /* |
78 | * Allow constant folding | 80 | * Allow constant folding |
79 | */ | 81 | */ |
80 | #if defined(__GNUC__) && defined(__OPTIMIZE__) | 82 | #define __swahw32(x) \ |
81 | # define __swahw32(x) \ | ||
82 | (__builtin_constant_p((__u32)(x)) ? \ | 83 | (__builtin_constant_p((__u32)(x)) ? \ |
83 | ___swahw32((x)) : \ | 84 | ___swahw32((x)) : \ |
84 | __fswahw32((x))) | 85 | __fswahw32((x))) |
85 | # define __swahb32(x) \ | 86 | #define __swahb32(x) \ |
86 | (__builtin_constant_p((__u32)(x)) ? \ | 87 | (__builtin_constant_p((__u32)(x)) ? \ |
87 | ___swahb32((x)) : \ | 88 | ___swahb32((x)) : \ |
88 | __fswahb32((x))) | 89 | __fswahb32((x))) |
89 | #else | ||
90 | # define __swahw32(x) __fswahw32(x) | ||
91 | # define __swahb32(x) __fswahb32(x) | ||
92 | #endif /* OPTIMIZE */ | ||
93 | 90 | ||
94 | 91 | ||
95 | static inline __u32 __fswahw32(__u32 x) | 92 | static inline __u32 __fswahw32(__u32 x) |
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr) | |||
128 | */ | 125 | */ |
129 | #endif /* __BYTEORDER_HAS_U64__ */ | 126 | #endif /* __BYTEORDER_HAS_U64__ */ |
130 | 127 | ||
131 | #if defined(__KERNEL__) | ||
132 | #define swahw32 __swahw32 | 128 | #define swahw32 __swahw32 |
133 | #define swahb32 __swahb32 | 129 | #define swahb32 __swahb32 |
134 | #define swahw32p __swahw32p | 130 | #define swahw32p __swahw32p |
135 | #define swahb32p __swahb32p | 131 | #define swahb32p __swahb32p |
136 | #define swahw32s __swahw32s | 132 | #define swahw32s __swahw32s |
137 | #define swahb32s __swahb32s | 133 | #define swahb32s __swahb32s |
138 | #endif | ||
139 | 134 | ||
140 | #endif /* _LINUX_BYTEORDER_SWABB_H */ | 135 | #endif /* _LINUX_BYTEORDER_SWABB_H */ |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h new file mode 100644 index 000000000000..0bc45e69da5a --- /dev/null +++ b/include/linux/cfag12864b.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Filename: cfag12864b.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: cfag12864b LCD driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-12 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _CFAG12864B_H_ | ||
26 | #define _CFAG12864B_H_ | ||
27 | |||
28 | #define CFAG12864B_WIDTH (128) | ||
29 | #define CFAG12864B_HEIGHT (64) | ||
30 | #define CFAG12864B_CONTROLLERS (2) | ||
31 | #define CFAG12864B_PAGES (8) | ||
32 | #define CFAG12864B_ADDRESSES (64) | ||
33 | #define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \ | ||
34 | (CFAG12864B_PAGES) * \ | ||
35 | (CFAG12864B_ADDRESSES)) | ||
36 | |||
37 | /* | ||
38 | * The driver will blit this buffer to the LCD | ||
39 | * | ||
40 | * Its size is CFAG12864B_SIZE. | ||
41 | */ | ||
42 | extern unsigned char * cfag12864b_buffer; | ||
43 | |||
44 | /* | ||
45 | * Get the refresh rate of the LCD | ||
46 | * | ||
47 | * Returns the refresh rate (hertzs). | ||
48 | */ | ||
49 | extern unsigned int cfag12864b_getrate(void); | ||
50 | |||
51 | /* | ||
52 | * Enable refreshing | ||
53 | * | ||
54 | * Returns 0 if successful (anyone was using it), | ||
55 | * or != 0 if failed (someone is using it). | ||
56 | */ | ||
57 | extern unsigned char cfag12864b_enable(void); | ||
58 | |||
59 | /* | ||
60 | * Disable refreshing | ||
61 | * | ||
62 | * You should call this only when you finish using the LCD. | ||
63 | */ | ||
64 | extern void cfag12864b_disable(void); | ||
65 | |||
66 | /* | ||
67 | * Is enabled refreshing? (is anyone using the module?) | ||
68 | * | ||
69 | * Returns 0 if refreshing is not enabled (anyone is using it), | ||
70 | * or != 0 if refreshing is enabled (someone is using it). | ||
71 | * | ||
72 | * Useful for buffer read-only modules. | ||
73 | */ | ||
74 | extern unsigned char cfag12864b_isenabled(void); | ||
75 | |||
76 | #endif /* _CFAG12864B_H_ */ | ||
77 | |||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 6e1c44a935d4..9008eabb9c3d 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -27,6 +27,13 @@ | |||
27 | #define __inline__ __inline__ __attribute__((always_inline)) | 27 | #define __inline__ __inline__ __attribute__((always_inline)) |
28 | #define __inline __inline __attribute__((always_inline)) | 28 | #define __inline __inline __attribute__((always_inline)) |
29 | #define __deprecated __attribute__((deprecated)) | 29 | #define __deprecated __attribute__((deprecated)) |
30 | #define __packed __attribute__((packed)) | ||
31 | #define __weak __attribute__((weak)) | ||
32 | #define __naked __attribute__((naked)) | ||
33 | #define __noreturn __attribute__((noreturn)) | ||
34 | #define __pure __attribute__((pure)) | ||
35 | #define __aligned(x) __attribute__((aligned(x))) | ||
36 | #define __printf(a,b) __attribute__((format(printf,a,b))) | ||
30 | #define noinline __attribute__((noinline)) | 37 | #define noinline __attribute__((noinline)) |
31 | #define __attribute_pure__ __attribute__((pure)) | 38 | #define __attribute_pure__ __attribute__((pure)) |
32 | #define __attribute_const__ __attribute__((__const__)) | 39 | #define __attribute_const__ __attribute__((__const__)) |
diff --git a/include/linux/console.h b/include/linux/console.h index 7d0420274de0..de25ee3b7919 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -21,6 +21,7 @@ struct vc_data; | |||
21 | struct console_font_op; | 21 | struct console_font_op; |
22 | struct console_font; | 22 | struct console_font; |
23 | struct module; | 23 | struct module; |
24 | struct tty_struct; | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * this is what the terminal answers to a ESC-Z or csi0c query. | 27 | * this is what the terminal answers to a ESC-Z or csi0c query. |
@@ -132,6 +133,9 @@ static inline void resume_console(void) {} | |||
132 | int mda_console_init(void); | 133 | int mda_console_init(void); |
133 | void prom_con_init(void); | 134 | void prom_con_init(void); |
134 | 135 | ||
136 | void vcs_make_sysfs(struct tty_struct *tty); | ||
137 | void vcs_remove_sysfs(struct tty_struct *tty); | ||
138 | |||
135 | /* Some debug stub to catch some of the obvious races in the VT code */ | 139 | /* Some debug stub to catch some of the obvious races in the VT code */ |
136 | #if 1 | 140 | #if 1 |
137 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) | 141 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) |
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index ed6c0fee1ac7..a86162b26c0d 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/wait.h> | 12 | #include <linux/wait.h> |
13 | #include <linux/vt.h> | 13 | #include <linux/vt.h> |
14 | #include <linux/workqueue.h> | ||
14 | 15 | ||
15 | struct vt_struct; | 16 | struct vt_struct; |
16 | 17 | ||
@@ -103,6 +104,7 @@ struct vc_data { | |||
103 | 104 | ||
104 | struct vc { | 105 | struct vc { |
105 | struct vc_data *d; | 106 | struct vc_data *d; |
107 | struct work_struct SAK_work; | ||
106 | 108 | ||
107 | /* might add scrmem, vt_struct, kbd at some time, | 109 | /* might add scrmem, vt_struct, kbd at some time, |
108 | to have everything in one place - the disadvantage | 110 | to have everything in one place - the disadvantage |
@@ -110,6 +112,7 @@ struct vc { | |||
110 | }; | 112 | }; |
111 | 113 | ||
112 | extern struct vc vc_cons [MAX_NR_CONSOLES]; | 114 | extern struct vc vc_cons [MAX_NR_CONSOLES]; |
115 | extern void vc_SAK(struct work_struct *work); | ||
113 | 116 | ||
114 | #define CUR_DEF 0 | 117 | #define CUR_DEF 0 |
115 | #define CUR_NONE 1 | 118 | #define CUR_NONE 1 |
diff --git a/include/linux/dn.h b/include/linux/dn.h index 10b6a6fd5837..02bba040fcfb 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
@@ -113,7 +113,7 @@ struct accessdata_dn | |||
113 | * DECnet logical link information structure | 113 | * DECnet logical link information structure |
114 | */ | 114 | */ |
115 | struct linkinfo_dn { | 115 | struct linkinfo_dn { |
116 | __le16 idn_segsize; /* Segment size for link */ | 116 | __u16 idn_segsize; /* Segment size for link */ |
117 | __u8 idn_linkstate; /* Logical link state */ | 117 | __u8 idn_linkstate; /* Logical link state */ |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1410e5330c8d..20fd1619ccfb 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -169,6 +169,7 @@ extern int dir_notify_enable; | |||
169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ | 169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ |
170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) | 170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) |
171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) | 171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) |
172 | #define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) | ||
172 | 173 | ||
173 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) | 174 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) |
174 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) | 175 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) |
@@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int); | |||
1572 | extern int invalidate_inodes(struct super_block *); | 1573 | extern int invalidate_inodes(struct super_block *); |
1573 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1574 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1574 | pgoff_t start, pgoff_t end); | 1575 | pgoff_t start, pgoff_t end); |
1575 | unsigned long invalidate_inode_pages(struct address_space *mapping); | 1576 | |
1577 | static inline unsigned long __deprecated | ||
1578 | invalidate_inode_pages(struct address_space *mapping) | ||
1579 | { | ||
1580 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
1581 | } | ||
1582 | |||
1576 | static inline void invalidate_remote_inode(struct inode *inode) | 1583 | static inline void invalidate_remote_inode(struct inode *inode) |
1577 | { | 1584 | { |
1578 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 1585 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
1579 | S_ISLNK(inode->i_mode)) | 1586 | S_ISLNK(inode->i_mode)) |
1580 | invalidate_inode_pages(inode->i_mapping); | 1587 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
1581 | } | 1588 | } |
1582 | extern int invalidate_inode_pages2(struct address_space *mapping); | 1589 | extern int invalidate_inode_pages2(struct address_space *mapping); |
1583 | extern int invalidate_inode_pages2_range(struct address_space *mapping, | 1590 | extern int invalidate_inode_pages2_range(struct address_space *mapping, |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 247734f7881f..2c65da7cabb2 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -23,6 +23,8 @@ enum { | |||
23 | SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION, | 23 | SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION, |
24 | 24 | ||
25 | LINUX_SWAP_PARTITION = 0x82, | 25 | LINUX_SWAP_PARTITION = 0x82, |
26 | LINUX_DATA_PARTITION = 0x83, | ||
27 | LINUX_LVM_PARTITION = 0x8e, | ||
26 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ | 28 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ |
27 | 29 | ||
28 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, | 30 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 063799ea6be0..2a7d15bcde46 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -85,8 +85,10 @@ struct vm_area_struct; | |||
85 | 85 | ||
86 | static inline enum zone_type gfp_zone(gfp_t flags) | 86 | static inline enum zone_type gfp_zone(gfp_t flags) |
87 | { | 87 | { |
88 | #ifdef CONFIG_ZONE_DMA | ||
88 | if (flags & __GFP_DMA) | 89 | if (flags & __GFP_DMA) |
89 | return ZONE_DMA; | 90 | return ZONE_DMA; |
91 | #endif | ||
90 | #ifdef CONFIG_ZONE_DMA32 | 92 | #ifdef CONFIG_ZONE_DMA32 |
91 | if (flags & __GFP_DMA32) | 93 | if (flags & __GFP_DMA32) |
92 | return ZONE_DMA32; | 94 | return ZONE_DMA32; |
diff --git a/include/linux/init.h b/include/linux/init.h index 5a593a1dec1e..c65f5107d512 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -172,7 +172,7 @@ void __init parse_early_param(void); | |||
172 | * module_init() - driver initialization entry point | 172 | * module_init() - driver initialization entry point |
173 | * @x: function to be run at kernel boot time or module insertion | 173 | * @x: function to be run at kernel boot time or module insertion |
174 | * | 174 | * |
175 | * module_init() will either be called during do_initcalls (if | 175 | * module_init() will either be called during do_initcalls() (if |
176 | * builtin) or at module insertion time (if a module). There can only | 176 | * builtin) or at module insertion time (if a module). There can only |
177 | * be one per module. | 177 | * be one per module. |
178 | */ | 178 | */ |
diff --git a/include/linux/io.h b/include/linux/io.h index 9e419ebfc98b..c244a0cc9319 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -43,12 +43,6 @@ void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | |||
43 | unsigned long size); | 43 | unsigned long size); |
44 | void devm_iounmap(struct device *dev, void __iomem *addr); | 44 | void devm_iounmap(struct device *dev, void __iomem *addr); |
45 | 45 | ||
46 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
47 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
48 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
49 | |||
50 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
51 | |||
52 | /** | 46 | /** |
53 | * check_signature - find BIOS signatures | 47 | * check_signature - find BIOS signatures |
54 | * @io_addr: mmio address to check | 48 | * @io_addr: mmio address to check |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 63fb18dcac30..e91dce75bbcc 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -176,6 +176,7 @@ static inline void console_verbose(void) | |||
176 | } | 176 | } |
177 | 177 | ||
178 | extern void bust_spinlocks(int yes); | 178 | extern void bust_spinlocks(int yes); |
179 | extern void wake_up_klogd(void); | ||
179 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 180 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
180 | extern int panic_timeout; | 181 | extern int panic_timeout; |
181 | extern int panic_on_oops; | 182 | extern int panic_on_oops; |
@@ -200,6 +201,7 @@ extern enum system_states { | |||
200 | #define TAINT_FORCED_RMMOD (1<<3) | 201 | #define TAINT_FORCED_RMMOD (1<<3) |
201 | #define TAINT_MACHINE_CHECK (1<<4) | 202 | #define TAINT_MACHINE_CHECK (1<<4) |
202 | #define TAINT_BAD_PAGE (1<<5) | 203 | #define TAINT_BAD_PAGE (1<<5) |
204 | #define TAINT_USER (1<<6) | ||
203 | 205 | ||
204 | extern void dump_stack(void); | 206 | extern void dump_stack(void); |
205 | 207 | ||
@@ -312,6 +314,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * | |||
312 | (void)__tmp; \ | 314 | (void)__tmp; \ |
313 | }) | 315 | }) |
314 | 316 | ||
317 | struct sysinfo; | ||
318 | extern int do_sysinfo(struct sysinfo *info); | ||
319 | |||
315 | #endif /* __KERNEL__ */ | 320 | #endif /* __KERNEL__ */ |
316 | 321 | ||
317 | #define SI_LOAD_SHIFT 16 | 322 | #define SI_LOAD_SHIFT 16 |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 48eccd865bd8..404f4464cb1a 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo) | |||
74 | * @buffer: the data to be added. | 74 | * @buffer: the data to be added. |
75 | * @len: the length of the data to be added. | 75 | * @len: the length of the data to be added. |
76 | * | 76 | * |
77 | * This function copies at most 'len' bytes from the 'buffer' into | 77 | * This function copies at most @len bytes from the @buffer into |
78 | * the FIFO depending on the free space, and returns the number of | 78 | * the FIFO depending on the free space, and returns the number of |
79 | * bytes copied. | 79 | * bytes copied. |
80 | */ | 80 | */ |
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo, | |||
99 | * @buffer: where the data must be copied. | 99 | * @buffer: where the data must be copied. |
100 | * @len: the size of the destination buffer. | 100 | * @len: the size of the destination buffer. |
101 | * | 101 | * |
102 | * This function copies at most 'len' bytes from the FIFO into the | 102 | * This function copies at most @len bytes from the FIFO into the |
103 | * 'buffer' and returns the number of copied bytes. | 103 | * @buffer and returns the number of copied bytes. |
104 | */ | 104 | */ |
105 | static inline unsigned int kfifo_get(struct kfifo *fifo, | 105 | static inline unsigned int kfifo_get(struct kfifo *fifo, |
106 | unsigned char *buffer, unsigned int len) | 106 | unsigned char *buffer, unsigned int len) |
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h new file mode 100644 index 000000000000..8047d4b17bf1 --- /dev/null +++ b/include/linux/ks0108.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Filename: ks0108.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: ks0108 LCD Controller driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-31 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _KS0108_H_ | ||
26 | #define _KS0108_H_ | ||
27 | |||
28 | /* Write a byte to the data port */ | ||
29 | extern void ks0108_writedata(unsigned char byte); | ||
30 | |||
31 | /* Write a byte to the control port */ | ||
32 | extern void ks0108_writecontrol(unsigned char byte); | ||
33 | |||
34 | /* Set the controller's current display state (0..1) */ | ||
35 | extern void ks0108_displaystate(unsigned char state); | ||
36 | |||
37 | /* Set the controller's current startline (0..63) */ | ||
38 | extern void ks0108_startline(unsigned char startline); | ||
39 | |||
40 | /* Set the controller's current address (0..63) */ | ||
41 | extern void ks0108_address(unsigned char address); | ||
42 | |||
43 | /* Set the controller's current page (0..7) */ | ||
44 | extern void ks0108_page(unsigned char page); | ||
45 | |||
46 | #endif /* _KS0108_H_ */ | ||
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 611f17f79eef..7444a6326231 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) | |||
163 | * @add1: addend1 | 163 | * @add1: addend1 |
164 | * @add2: addend2 | 164 | * @add2: addend2 |
165 | * | 165 | * |
166 | * Returns the sum of addend1 and addend2 | 166 | * Returns the sum of @add1 and @add2. |
167 | */ | 167 | */ |
168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | 168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) |
169 | { | 169 | { |
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | |||
189 | * @kt: addend | 189 | * @kt: addend |
190 | * @nsec: the scalar nsec value to add | 190 | * @nsec: the scalar nsec value to add |
191 | * | 191 | * |
192 | * Returns the sum of kt and nsec in ktime_t format | 192 | * Returns the sum of @kt and @nsec in ktime_t format |
193 | */ | 193 | */ |
194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); | 194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); |
195 | 195 | ||
@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt) | |||
246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds | 246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds |
247 | * @kt: the ktime_t variable to convert | 247 | * @kt: the ktime_t variable to convert |
248 | * | 248 | * |
249 | * Returns the scalar nanoseconds representation of kt | 249 | * Returns the scalar nanoseconds representation of @kt |
250 | */ | 250 | */ |
251 | static inline s64 ktime_to_ns(const ktime_t kt) | 251 | static inline s64 ktime_to_ns(const ktime_t kt) |
252 | { | 252 | { |
diff --git a/include/linux/list.h b/include/linux/list.h index 611059d633f4..f9d71eab05ee 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) | |||
161 | /** | 161 | /** |
162 | * list_del - deletes entry from list. | 162 | * list_del - deletes entry from list. |
163 | * @entry: the element to delete from the list. | 163 | * @entry: the element to delete from the list. |
164 | * Note: list_empty on entry does not return true after this, the entry is | 164 | * Note: list_empty() on entry does not return true after this, the entry is |
165 | * in an undefined state. | 165 | * in an undefined state. |
166 | */ | 166 | */ |
167 | #ifndef CONFIG_DEBUG_LIST | 167 | #ifndef CONFIG_DEBUG_LIST |
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry); | |||
179 | * list_del_rcu - deletes entry from list without re-initialization | 179 | * list_del_rcu - deletes entry from list without re-initialization |
180 | * @entry: the element to delete from the list. | 180 | * @entry: the element to delete from the list. |
181 | * | 181 | * |
182 | * Note: list_empty on entry does not return true after this, | 182 | * Note: list_empty() on entry does not return true after this, |
183 | * the entry is in an undefined state. It is useful for RCU based | 183 | * the entry is in an undefined state. It is useful for RCU based |
184 | * lockfree traversal. | 184 | * lockfree traversal. |
185 | * | 185 | * |
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry) | |||
209 | * list_replace - replace old entry by new one | 209 | * list_replace - replace old entry by new one |
210 | * @old : the element to be replaced | 210 | * @old : the element to be replaced |
211 | * @new : the new element to insert | 211 | * @new : the new element to insert |
212 | * Note: if 'old' was empty, it will be overwritten. | 212 | * |
213 | * If @old was empty, it will be overwritten. | ||
213 | */ | 214 | */ |
214 | static inline void list_replace(struct list_head *old, | 215 | static inline void list_replace(struct list_head *old, |
215 | struct list_head *new) | 216 | struct list_head *new) |
@@ -360,6 +361,62 @@ static inline void list_splice_init(struct list_head *list, | |||
360 | } | 361 | } |
361 | 362 | ||
362 | /** | 363 | /** |
364 | * list_splice_init_rcu - splice an RCU-protected list into an existing list. | ||
365 | * @list: the RCU-protected list to splice | ||
366 | * @head: the place in the list to splice the first list into | ||
367 | * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ... | ||
368 | * | ||
369 | * @head can be RCU-read traversed concurrently with this function. | ||
370 | * | ||
371 | * Note that this function blocks. | ||
372 | * | ||
373 | * Important note: the caller must take whatever action is necessary to | ||
374 | * prevent any other updates to @head. In principle, it is possible | ||
375 | * to modify the list as soon as sync() begins execution. | ||
376 | * If this sort of thing becomes necessary, an alternative version | ||
377 | * based on call_rcu() could be created. But only if -really- | ||
378 | * needed -- there is no shortage of RCU API members. | ||
379 | */ | ||
380 | static inline void list_splice_init_rcu(struct list_head *list, | ||
381 | struct list_head *head, | ||
382 | void (*sync)(void)) | ||
383 | { | ||
384 | struct list_head *first = list->next; | ||
385 | struct list_head *last = list->prev; | ||
386 | struct list_head *at = head->next; | ||
387 | |||
388 | if (list_empty(head)) | ||
389 | return; | ||
390 | |||
391 | /* "first" and "last" tracking list, so initialize it. */ | ||
392 | |||
393 | INIT_LIST_HEAD(list); | ||
394 | |||
395 | /* | ||
396 | * At this point, the list body still points to the source list. | ||
397 | * Wait for any readers to finish using the list before splicing | ||
398 | * the list body into the new list. Any new readers will see | ||
399 | * an empty list. | ||
400 | */ | ||
401 | |||
402 | sync(); | ||
403 | |||
404 | /* | ||
405 | * Readers are finished with the source list, so perform splice. | ||
406 | * The order is important if the new list is global and accessible | ||
407 | * to concurrent RCU readers. Note that RCU readers are not | ||
408 | * permitted to traverse the prev pointers without excluding | ||
409 | * this function. | ||
410 | */ | ||
411 | |||
412 | last->next = at; | ||
413 | smp_wmb(); | ||
414 | head->next = first; | ||
415 | first->prev = head; | ||
416 | at->prev = last; | ||
417 | } | ||
418 | |||
419 | /** | ||
363 | * list_entry - get the struct for this entry | 420 | * list_entry - get the struct for this entry |
364 | * @ptr: the &struct list_head pointer. | 421 | * @ptr: the &struct list_head pointer. |
365 | * @type: the type of the struct this is embedded in. | 422 | * @type: the type of the struct this is embedded in. |
@@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list, | |||
432 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 489 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
433 | 490 | ||
434 | /** | 491 | /** |
435 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue | 492 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() |
436 | * @pos: the type * to use as a start point | 493 | * @pos: the type * to use as a start point |
437 | * @head: the head of the list | 494 | * @head: the head of the list |
438 | * @member: the name of the list_struct within the struct. | 495 | * @member: the name of the list_struct within the struct. |
439 | * | 496 | * |
440 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue. | 497 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue(). |
441 | */ | 498 | */ |
442 | #define list_prepare_entry(pos, head, member) \ | 499 | #define list_prepare_entry(pos, head, member) \ |
443 | ((pos) ? : list_entry(head, typeof(*pos), member)) | 500 | ((pos) ? : list_entry(head, typeof(*pos), member)) |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index ea097dddc44f..7e1160dde5e7 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -132,6 +132,7 @@ struct lock_list { | |||
132 | struct list_head entry; | 132 | struct list_head entry; |
133 | struct lock_class *class; | 133 | struct lock_class *class; |
134 | struct stack_trace trace; | 134 | struct stack_trace trace; |
135 | int distance; | ||
135 | }; | 136 | }; |
136 | 137 | ||
137 | /* | 138 | /* |
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 432b2fa24929..bdc01127dced 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h | |||
@@ -18,6 +18,16 @@ | |||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/spinlock.h> /* spinlock_t */ | 19 | #include <linux/spinlock.h> /* spinlock_t */ |
20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ | 20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ |
21 | |||
22 | /* Some RTCs extend the mc146818 register set to support alarms of more | ||
23 | * than 24 hours in the future; or dates that include a century code. | ||
24 | * This platform_data structure can pass this information to the driver. | ||
25 | */ | ||
26 | struct cmos_rtc_board_info { | ||
27 | u8 rtc_day_alarm; /* zero, or register index */ | ||
28 | u8 rtc_mon_alarm; /* zero, or register index */ | ||
29 | u8 rtc_century; /* zero, or register index */ | ||
30 | }; | ||
21 | #endif | 31 | #endif |
22 | 32 | ||
23 | /********************************************************************** | 33 | /********************************************************************** |
diff --git a/include/linux/mm.h b/include/linux/mm.h index bb793a4c8e9e..77a76101dcd9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page) | |||
437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ | 437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ |
438 | #ifdef NODE_NOT_IN_PAGEFLAGS | 438 | #ifdef NODE_NOT_IN_PAGEFLAGS |
439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) | 439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) |
440 | #define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ | ||
441 | SECTIONS_PGOFF : ZONES_PGOFF) | ||
440 | #else | 442 | #else |
441 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) | 443 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) |
444 | #define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \ | ||
445 | NODES_PGOFF : ZONES_PGOFF) | ||
442 | #endif | 446 | #endif |
443 | 447 | ||
444 | #if ZONES_WIDTH > 0 | 448 | #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) |
445 | #define ZONEID_PGSHIFT ZONES_PGSHIFT | ||
446 | #else | ||
447 | #define ZONEID_PGSHIFT NODES_PGOFF | ||
448 | #endif | ||
449 | 449 | ||
450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page) | |||
471 | */ | 471 | */ |
472 | static inline int page_zone_id(struct page *page) | 472 | static inline int page_zone_id(struct page *page) |
473 | { | 473 | { |
474 | BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK); | ||
475 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; | 474 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; |
476 | } | 475 | } |
477 | 476 | ||
@@ -786,6 +785,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | |||
786 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 785 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
787 | 786 | ||
788 | int __set_page_dirty_nobuffers(struct page *page); | 787 | int __set_page_dirty_nobuffers(struct page *page); |
788 | int __set_page_dirty_no_writeback(struct page *page); | ||
789 | int redirty_page_for_writepage(struct writeback_control *wbc, | 789 | int redirty_page_for_writepage(struct writeback_control *wbc, |
790 | struct page *page); | 790 | struct page *page); |
791 | int FASTCALL(set_page_dirty(struct page *page)); | 791 | int FASTCALL(set_page_dirty(struct page *page)); |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 3b6723dfaff3..895bc4e93039 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
@@ -1,30 +1,29 @@ | |||
1 | |||
2 | static inline void | 1 | static inline void |
3 | add_page_to_active_list(struct zone *zone, struct page *page) | 2 | add_page_to_active_list(struct zone *zone, struct page *page) |
4 | { | 3 | { |
5 | list_add(&page->lru, &zone->active_list); | 4 | list_add(&page->lru, &zone->active_list); |
6 | zone->nr_active++; | 5 | __inc_zone_state(zone, NR_ACTIVE); |
7 | } | 6 | } |
8 | 7 | ||
9 | static inline void | 8 | static inline void |
10 | add_page_to_inactive_list(struct zone *zone, struct page *page) | 9 | add_page_to_inactive_list(struct zone *zone, struct page *page) |
11 | { | 10 | { |
12 | list_add(&page->lru, &zone->inactive_list); | 11 | list_add(&page->lru, &zone->inactive_list); |
13 | zone->nr_inactive++; | 12 | __inc_zone_state(zone, NR_INACTIVE); |
14 | } | 13 | } |
15 | 14 | ||
16 | static inline void | 15 | static inline void |
17 | del_page_from_active_list(struct zone *zone, struct page *page) | 16 | del_page_from_active_list(struct zone *zone, struct page *page) |
18 | { | 17 | { |
19 | list_del(&page->lru); | 18 | list_del(&page->lru); |
20 | zone->nr_active--; | 19 | __dec_zone_state(zone, NR_ACTIVE); |
21 | } | 20 | } |
22 | 21 | ||
23 | static inline void | 22 | static inline void |
24 | del_page_from_inactive_list(struct zone *zone, struct page *page) | 23 | del_page_from_inactive_list(struct zone *zone, struct page *page) |
25 | { | 24 | { |
26 | list_del(&page->lru); | 25 | list_del(&page->lru); |
27 | zone->nr_inactive--; | 26 | __dec_zone_state(zone, NR_INACTIVE); |
28 | } | 27 | } |
29 | 28 | ||
30 | static inline void | 29 | static inline void |
@@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
33 | list_del(&page->lru); | 32 | list_del(&page->lru); |
34 | if (PageActive(page)) { | 33 | if (PageActive(page)) { |
35 | __ClearPageActive(page); | 34 | __ClearPageActive(page); |
36 | zone->nr_active--; | 35 | __dec_zone_state(zone, NR_ACTIVE); |
37 | } else { | 36 | } else { |
38 | zone->nr_inactive--; | 37 | __dec_zone_state(zone, NR_INACTIVE); |
39 | } | 38 | } |
40 | } | 39 | } |
41 | 40 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index b262f47961fb..ee9e3143df4f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -47,15 +47,20 @@ struct zone_padding { | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | enum zone_stat_item { | 49 | enum zone_stat_item { |
50 | /* First 128 byte cacheline (assuming 64 bit words) */ | ||
51 | NR_FREE_PAGES, | ||
52 | NR_INACTIVE, | ||
53 | NR_ACTIVE, | ||
50 | NR_ANON_PAGES, /* Mapped anonymous pages */ | 54 | NR_ANON_PAGES, /* Mapped anonymous pages */ |
51 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. | 55 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. |
52 | only modified from process context */ | 56 | only modified from process context */ |
53 | NR_FILE_PAGES, | 57 | NR_FILE_PAGES, |
54 | NR_SLAB_RECLAIMABLE, | ||
55 | NR_SLAB_UNRECLAIMABLE, | ||
56 | NR_PAGETABLE, /* used for pagetables */ | ||
57 | NR_FILE_DIRTY, | 58 | NR_FILE_DIRTY, |
58 | NR_WRITEBACK, | 59 | NR_WRITEBACK, |
60 | /* Second 128 byte cacheline */ | ||
61 | NR_SLAB_RECLAIMABLE, | ||
62 | NR_SLAB_UNRECLAIMABLE, | ||
63 | NR_PAGETABLE, /* used for pagetables */ | ||
59 | NR_UNSTABLE_NFS, /* NFS unstable pages */ | 64 | NR_UNSTABLE_NFS, /* NFS unstable pages */ |
60 | NR_BOUNCE, | 65 | NR_BOUNCE, |
61 | NR_VMSCAN_WRITE, | 66 | NR_VMSCAN_WRITE, |
@@ -91,6 +96,7 @@ struct per_cpu_pageset { | |||
91 | #endif | 96 | #endif |
92 | 97 | ||
93 | enum zone_type { | 98 | enum zone_type { |
99 | #ifdef CONFIG_ZONE_DMA | ||
94 | /* | 100 | /* |
95 | * ZONE_DMA is used when there are devices that are not able | 101 | * ZONE_DMA is used when there are devices that are not able |
96 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we | 102 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we |
@@ -111,6 +117,7 @@ enum zone_type { | |||
111 | * <16M. | 117 | * <16M. |
112 | */ | 118 | */ |
113 | ZONE_DMA, | 119 | ZONE_DMA, |
120 | #endif | ||
114 | #ifdef CONFIG_ZONE_DMA32 | 121 | #ifdef CONFIG_ZONE_DMA32 |
115 | /* | 122 | /* |
116 | * x86_64 needs two ZONE_DMAs because it supports devices that are | 123 | * x86_64 needs two ZONE_DMAs because it supports devices that are |
@@ -147,15 +154,30 @@ enum zone_type { | |||
147 | * match the requested limits. See gfp_zone() in include/linux/gfp.h | 154 | * match the requested limits. See gfp_zone() in include/linux/gfp.h |
148 | */ | 155 | */ |
149 | 156 | ||
150 | #if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM) | 157 | /* |
158 | * Count the active zones. Note that the use of defined(X) outside | ||
159 | * #if and family is not necessarily defined so ensure we cannot use | ||
160 | * it later. Use __ZONE_COUNT to work out how many shift bits we need. | ||
161 | */ | ||
162 | #define __ZONE_COUNT ( \ | ||
163 | defined(CONFIG_ZONE_DMA) \ | ||
164 | + defined(CONFIG_ZONE_DMA32) \ | ||
165 | + 1 \ | ||
166 | + defined(CONFIG_HIGHMEM) \ | ||
167 | ) | ||
168 | #if __ZONE_COUNT < 2 | ||
169 | #define ZONES_SHIFT 0 | ||
170 | #elif __ZONE_COUNT <= 2 | ||
151 | #define ZONES_SHIFT 1 | 171 | #define ZONES_SHIFT 1 |
152 | #else | 172 | #elif __ZONE_COUNT <= 4 |
153 | #define ZONES_SHIFT 2 | 173 | #define ZONES_SHIFT 2 |
174 | #else | ||
175 | #error ZONES_SHIFT -- too many zones configured adjust calculation | ||
154 | #endif | 176 | #endif |
177 | #undef __ZONE_COUNT | ||
155 | 178 | ||
156 | struct zone { | 179 | struct zone { |
157 | /* Fields commonly accessed by the page allocator */ | 180 | /* Fields commonly accessed by the page allocator */ |
158 | unsigned long free_pages; | ||
159 | unsigned long pages_min, pages_low, pages_high; | 181 | unsigned long pages_min, pages_low, pages_high; |
160 | /* | 182 | /* |
161 | * We don't know if the memory that we're going to allocate will be freeable | 183 | * We don't know if the memory that we're going to allocate will be freeable |
@@ -197,8 +219,6 @@ struct zone { | |||
197 | struct list_head inactive_list; | 219 | struct list_head inactive_list; |
198 | unsigned long nr_scan_active; | 220 | unsigned long nr_scan_active; |
199 | unsigned long nr_scan_inactive; | 221 | unsigned long nr_scan_inactive; |
200 | unsigned long nr_active; | ||
201 | unsigned long nr_inactive; | ||
202 | unsigned long pages_scanned; /* since last reclaim */ | 222 | unsigned long pages_scanned; /* since last reclaim */ |
203 | int all_unreclaimable; /* All pages pinned */ | 223 | int all_unreclaimable; /* All pages pinned */ |
204 | 224 | ||
@@ -442,8 +462,6 @@ typedef struct pglist_data { | |||
442 | 462 | ||
443 | #include <linux/memory_hotplug.h> | 463 | #include <linux/memory_hotplug.h> |
444 | 464 | ||
445 | void __get_zone_counts(unsigned long *active, unsigned long *inactive, | ||
446 | unsigned long *free, struct pglist_data *pgdat); | ||
447 | void get_zone_counts(unsigned long *active, unsigned long *inactive, | 465 | void get_zone_counts(unsigned long *active, unsigned long *inactive, |
448 | unsigned long *free); | 466 | unsigned long *free); |
449 | void build_all_zonelists(void); | 467 | void build_all_zonelists(void); |
@@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone) | |||
523 | 541 | ||
524 | static inline int is_dma(struct zone *zone) | 542 | static inline int is_dma(struct zone *zone) |
525 | { | 543 | { |
544 | #ifdef CONFIG_ZONE_DMA | ||
526 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; | 545 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; |
546 | #else | ||
547 | return 0; | ||
548 | #endif | ||
527 | } | 549 | } |
528 | 550 | ||
529 | /* These two functions are used to setup the per zone pages min values */ | 551 | /* These two functions are used to setup the per zone pages min values */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 1b7e178b0d84..dab69afee2fa 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -43,9 +43,8 @@ struct vfsmount { | |||
43 | struct super_block *mnt_sb; /* pointer to superblock */ | 43 | struct super_block *mnt_sb; /* pointer to superblock */ |
44 | struct list_head mnt_mounts; /* list of children, anchored here */ | 44 | struct list_head mnt_mounts; /* list of children, anchored here */ |
45 | struct list_head mnt_child; /* and going through their mnt_child */ | 45 | struct list_head mnt_child; /* and going through their mnt_child */ |
46 | atomic_t mnt_count; | ||
47 | int mnt_flags; | 46 | int mnt_flags; |
48 | int mnt_expiry_mark; /* true if marked for expiry */ | 47 | /* 4 bytes hole on 64bits arches */ |
49 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 48 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
50 | struct list_head mnt_list; | 49 | struct list_head mnt_list; |
51 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 50 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
@@ -54,6 +53,13 @@ struct vfsmount { | |||
54 | struct list_head mnt_slave; /* slave list entry */ | 53 | struct list_head mnt_slave; /* slave list entry */ |
55 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 54 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ |
56 | struct mnt_namespace *mnt_ns; /* containing namespace */ | 55 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
56 | /* | ||
57 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount | ||
58 | * to let these frequently modified fields in a separate cache line | ||
59 | * (so that reads of mnt_flags wont ping-pong on SMP machines) | ||
60 | */ | ||
61 | atomic_t mnt_count; | ||
62 | int mnt_expiry_mark; /* true if marked for expiry */ | ||
57 | int mnt_pinned; | 63 | int mnt_pinned; |
58 | }; | 64 | }; |
59 | 65 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 9e3042e7e1cc..98c8765a488e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -840,6 +840,11 @@ enum pci_fixup_pass { | |||
840 | 840 | ||
841 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 841 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |
842 | 842 | ||
843 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
844 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
845 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
846 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
847 | |||
843 | extern int pci_pci_problems; | 848 | extern int pci_pci_problems; |
844 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ | 849 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ |
845 | #define PCIPCI_TRITON 2 | 850 | #define PCIPCI_TRITON 2 |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index e67b68ca235a..8fb9c3e06eef 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -959,6 +959,7 @@ | |||
959 | #define PCI_DEVICE_ID_PLX_R753 0x1152 | 959 | #define PCI_DEVICE_ID_PLX_R753 0x1152 |
960 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 | 960 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 |
961 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 | 961 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 |
962 | #define PCI_DEVICE_ID_PLX_9030 0x9030 | ||
962 | #define PCI_DEVICE_ID_PLX_9050 0x9050 | 963 | #define PCI_DEVICE_ID_PLX_9050 0x9050 |
963 | #define PCI_DEVICE_ID_PLX_9080 0x9080 | 964 | #define PCI_DEVICE_ID_PLX_9080 0x9080 |
964 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 | 965 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 |
@@ -1696,6 +1697,8 @@ | |||
1696 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 | 1697 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 |
1697 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 | 1698 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 |
1698 | 1699 | ||
1700 | #define PCI_VENDOR_ID_ESDGMBH 0x12fe | ||
1701 | #define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111 | ||
1699 | 1702 | ||
1700 | #define PCI_VENDOR_ID_SIIG 0x131f | 1703 | #define PCI_VENDOR_ID_SIIG 0x131f |
1701 | #define PCI_SUBVENDOR_ID_SIIG 0x131f | 1704 | #define PCI_SUBVENDOR_ID_SIIG 0x131f |
@@ -1811,6 +1814,9 @@ | |||
1811 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 | 1814 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 |
1812 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 | 1815 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 |
1813 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 | 1816 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 |
1817 | #define PCI_DEVICE_ID_MOXA_CP204J 0x2040 | ||
1818 | #define PCI_DEVICE_ID_MOXA_C218 0x2180 | ||
1819 | #define PCI_DEVICE_ID_MOXA_C320 0x3200 | ||
1814 | 1820 | ||
1815 | #define PCI_VENDOR_ID_CCD 0x1397 | 1821 | #define PCI_VENDOR_ID_CCD 0x1397 |
1816 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 | 1822 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 |
@@ -1991,6 +1997,10 @@ | |||
1991 | 1997 | ||
1992 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 1998 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
1993 | 1999 | ||
2000 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | ||
2001 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | ||
2002 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | ||
2003 | |||
1994 | 2004 | ||
1995 | #define PCI_VENDOR_ID_SYBA 0x1592 | 2005 | #define PCI_VENDOR_ID_SYBA 0x1592 |
1996 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 2006 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index ab8a8dd8d64c..9a5226f0f169 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -352,6 +352,8 @@ struct pnp_protocol { | |||
352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) | 352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) |
353 | 353 | ||
354 | 354 | ||
355 | extern struct bus_type pnp_bus_type; | ||
356 | |||
355 | #if defined(CONFIG_PNP) | 357 | #if defined(CONFIG_PNP) |
356 | 358 | ||
357 | /* device management */ | 359 | /* device management */ |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 966c35851b2e..66a96814d614 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -2,7 +2,10 @@ | |||
2 | File: linux/reiserfs_xattr.h | 2 | File: linux/reiserfs_xattr.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/xattr.h> | 5 | #ifndef _LINUX_REISERFS_XATTR_H |
6 | #define _LINUX_REISERFS_XATTR_H | ||
7 | |||
8 | #include <linux/types.h> | ||
6 | 9 | ||
7 | /* Magic value in header */ | 10 | /* Magic value in header */ |
8 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ | 11 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ |
@@ -13,7 +16,18 @@ struct reiserfs_xattr_header { | |||
13 | }; | 16 | }; |
14 | 17 | ||
15 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | |||
16 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/list.h> | ||
22 | #include <linux/rwsem.h> | ||
23 | #include <linux/reiserfs_fs_i.h> | ||
24 | #include <linux/reiserfs_fs.h> | ||
25 | |||
26 | struct inode; | ||
27 | struct dentry; | ||
28 | struct iattr; | ||
29 | struct super_block; | ||
30 | struct nameidata; | ||
17 | 31 | ||
18 | struct reiserfs_xattr_handler { | 32 | struct reiserfs_xattr_handler { |
19 | char *prefix; | 33 | char *prefix; |
@@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); | |||
49 | 63 | ||
50 | extern struct reiserfs_xattr_handler user_handler; | 64 | extern struct reiserfs_xattr_handler user_handler; |
51 | extern struct reiserfs_xattr_handler trusted_handler; | 65 | extern struct reiserfs_xattr_handler trusted_handler; |
52 | #ifdef CONFIG_REISERFS_FS_SECURITY | ||
53 | extern struct reiserfs_xattr_handler security_handler; | 66 | extern struct reiserfs_xattr_handler security_handler; |
54 | #endif | ||
55 | 67 | ||
56 | int reiserfs_xattr_register_handlers(void) __init; | 68 | int reiserfs_xattr_register_handlers(void) __init; |
57 | void reiserfs_xattr_unregister_handlers(void); | 69 | void reiserfs_xattr_unregister_handlers(void); |
@@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) | |||
137 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | 149 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) |
138 | { | 150 | { |
139 | } | 151 | } |
140 | #endif | 152 | #endif /* CONFIG_REISERFS_FS_XATTR */ |
153 | |||
154 | #endif /* __KERNEL__ */ | ||
141 | 155 | ||
142 | #endif /* __KERNEL__ */ | 156 | #endif /* _LINUX_REISERFS_XATTR_H */ |
diff --git a/include/linux/relay.h b/include/linux/relay.h index c6a48bfc8b14..759a0f97bec2 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -24,7 +24,7 @@ | |||
24 | /* | 24 | /* |
25 | * Tracks changes to rchan/rchan_buf structs | 25 | * Tracks changes to rchan/rchan_buf structs |
26 | */ | 26 | */ |
27 | #define RELAYFS_CHANNEL_VERSION 6 | 27 | #define RELAYFS_CHANNEL_VERSION 7 |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Per-cpu relay channel buffer | 30 | * Per-cpu relay channel buffer |
@@ -64,6 +64,10 @@ struct rchan | |||
64 | void *private_data; /* for user-defined data */ | 64 | void *private_data; /* for user-defined data */ |
65 | size_t last_toobig; /* tried to log event > subbuf size */ | 65 | size_t last_toobig; /* tried to log event > subbuf size */ |
66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | 66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ |
67 | int is_global; /* One global buffer ? */ | ||
68 | struct list_head list; /* for channel list */ | ||
69 | struct dentry *parent; /* parent dentry passed to open */ | ||
70 | char base_filename[NAME_MAX]; /* saved base filename */ | ||
67 | }; | 71 | }; |
68 | 72 | ||
69 | /* | 73 | /* |
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename, | |||
162 | struct dentry *parent, | 166 | struct dentry *parent, |
163 | size_t subbuf_size, | 167 | size_t subbuf_size, |
164 | size_t n_subbufs, | 168 | size_t n_subbufs, |
165 | struct rchan_callbacks *cb); | 169 | struct rchan_callbacks *cb, |
170 | void *private_data); | ||
166 | extern void relay_close(struct rchan *chan); | 171 | extern void relay_close(struct rchan *chan); |
167 | extern void relay_flush(struct rchan *chan); | 172 | extern void relay_flush(struct rchan *chan); |
168 | extern void relay_subbufs_consumed(struct rchan *chan, | 173 | extern void relay_subbufs_consumed(struct rchan *chan, |
diff --git a/include/linux/rio.h b/include/linux/rio.h index d93857056cb9..68e3f6853fa6 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define RIO_ANY_DESTID 0xff | 26 | #define RIO_ANY_DESTID 0xff |
27 | #define RIO_NO_HOPCOUNT -1 | 27 | #define RIO_NO_HOPCOUNT -1 |
28 | #define RIO_INVALID_DESTID 0xffff | ||
28 | 29 | ||
29 | #define RIO_MAX_MPORT_RESOURCES 16 | 30 | #define RIO_MAX_MPORT_RESOURCES 16 |
30 | #define RIO_MAX_DEV_RESOURCES 16 | 31 | #define RIO_MAX_DEV_RESOURCES 16 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 446373535190..76c8e2dc48dd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1013,8 +1013,10 @@ struct task_struct { | |||
1013 | * to a stack based synchronous wait) if its doing sync IO. | 1013 | * to a stack based synchronous wait) if its doing sync IO. |
1014 | */ | 1014 | */ |
1015 | wait_queue_t *io_wait; | 1015 | wait_queue_t *io_wait; |
1016 | #ifdef CONFIG_TASK_XACCT | ||
1016 | /* i/o counters(bytes read/written, #syscalls */ | 1017 | /* i/o counters(bytes read/written, #syscalls */ |
1017 | u64 rchar, wchar, syscr, syscw; | 1018 | u64 rchar, wchar, syscr, syscw; |
1019 | #endif | ||
1018 | struct task_io_accounting ioac; | 1020 | struct task_io_accounting ioac; |
1019 | #if defined(CONFIG_TASK_XACCT) | 1021 | #if defined(CONFIG_TASK_XACCT) |
1020 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1022 | u64 acct_rss_mem1; /* accumulated rss usage */ |
@@ -1649,6 +1651,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | |||
1649 | 1651 | ||
1650 | extern void normalize_rt_tasks(void); | 1652 | extern void normalize_rt_tasks(void); |
1651 | 1653 | ||
1654 | #ifdef CONFIG_TASK_XACCT | ||
1655 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1656 | { | ||
1657 | tsk->rchar += amt; | ||
1658 | } | ||
1659 | |||
1660 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1661 | { | ||
1662 | tsk->wchar += amt; | ||
1663 | } | ||
1664 | |||
1665 | static inline void inc_syscr(struct task_struct *tsk) | ||
1666 | { | ||
1667 | tsk->syscr++; | ||
1668 | } | ||
1669 | |||
1670 | static inline void inc_syscw(struct task_struct *tsk) | ||
1671 | { | ||
1672 | tsk->syscw++; | ||
1673 | } | ||
1674 | #else | ||
1675 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1676 | { | ||
1677 | } | ||
1678 | |||
1679 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1680 | { | ||
1681 | } | ||
1682 | |||
1683 | static inline void inc_syscr(struct task_struct *tsk) | ||
1684 | { | ||
1685 | } | ||
1686 | |||
1687 | static inline void inc_syscw(struct task_struct *tsk) | ||
1688 | { | ||
1689 | } | ||
1690 | #endif | ||
1691 | |||
1652 | #endif /* __KERNEL__ */ | 1692 | #endif /* __KERNEL__ */ |
1653 | 1693 | ||
1654 | #endif | 1694 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 83cdefae9931..c554f60f18e4 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -492,7 +492,7 @@ struct request_sock; | |||
492 | * Note that the fown_struct, @fown, is never outside the context of a | 492 | * Note that the fown_struct, @fown, is never outside the context of a |
493 | * struct file, so the file structure (and associated security information) | 493 | * struct file, so the file structure (and associated security information) |
494 | * can always be obtained: | 494 | * can always be obtained: |
495 | * (struct file *)((long)fown - offsetof(struct file,f_owner)); | 495 | * container_of(fown, struct file, f_owner) |
496 | * @tsk contains the structure of task receiving signal. | 496 | * @tsk contains the structure of task receiving signal. |
497 | * @fown contains the file owner information. | 497 | * @fown contains the file owner information. |
498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. | 498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 4b463e66ddea..5e4364644ed1 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -19,7 +19,9 @@ | |||
19 | struct cache_sizes { | 19 | struct cache_sizes { |
20 | size_t cs_size; | 20 | size_t cs_size; |
21 | struct kmem_cache *cs_cachep; | 21 | struct kmem_cache *cs_cachep; |
22 | #ifdef CONFIG_ZONE_DMA | ||
22 | struct kmem_cache *cs_dmacachep; | 23 | struct kmem_cache *cs_dmacachep; |
24 | #endif | ||
23 | }; | 25 | }; |
24 | extern struct cache_sizes malloc_sizes[]; | 26 | extern struct cache_sizes malloc_sizes[]; |
25 | 27 | ||
@@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
39 | __you_cannot_kmalloc_that_much(); | 41 | __you_cannot_kmalloc_that_much(); |
40 | } | 42 | } |
41 | found: | 43 | found: |
42 | return kmem_cache_alloc((flags & GFP_DMA) ? | 44 | #ifdef CONFIG_ZONE_DMA |
43 | malloc_sizes[i].cs_dmacachep : | 45 | if (flags & GFP_DMA) |
44 | malloc_sizes[i].cs_cachep, flags); | 46 | return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep, |
47 | flags); | ||
48 | #endif | ||
49 | return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags); | ||
45 | } | 50 | } |
46 | return __kmalloc(size, flags); | 51 | return __kmalloc(size, flags); |
47 | } | 52 | } |
@@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
62 | __you_cannot_kzalloc_that_much(); | 67 | __you_cannot_kzalloc_that_much(); |
63 | } | 68 | } |
64 | found: | 69 | found: |
65 | return kmem_cache_zalloc((flags & GFP_DMA) ? | 70 | #ifdef CONFIG_ZONE_DMA |
66 | malloc_sizes[i].cs_dmacachep : | 71 | if (flags & GFP_DMA) |
67 | malloc_sizes[i].cs_cachep, flags); | 72 | return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep, |
73 | flags); | ||
74 | #endif | ||
75 | return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags); | ||
68 | } | 76 | } |
69 | return __kzalloc(size, flags); | 77 | return __kzalloc(size, flags); |
70 | } | 78 | } |
@@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
88 | __you_cannot_kmalloc_that_much(); | 96 | __you_cannot_kmalloc_that_much(); |
89 | } | 97 | } |
90 | found: | 98 | found: |
91 | return kmem_cache_alloc_node((flags & GFP_DMA) ? | 99 | #ifdef CONFIG_ZONE_DMA |
92 | malloc_sizes[i].cs_dmacachep : | 100 | if (flags & GFP_DMA) |
93 | malloc_sizes[i].cs_cachep, flags, node); | 101 | return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep, |
102 | flags, node); | ||
103 | #endif | ||
104 | return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep, | ||
105 | flags, node); | ||
94 | } | 106 | } |
95 | return __kmalloc_node(size, flags, node); | 107 | return __kmalloc_node(size, flags, node); |
96 | } | 108 | } |
diff --git a/include/linux/socket.h b/include/linux/socket.h index fcd35a210e7f..28157a36e6cc 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
18 | 18 | ||
19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #ifdef __KERNEL__ |
20 | 20 | ||
21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 94b767d64275..61fef376ed2e 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -228,15 +228,30 @@ do { \ | |||
228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) | 228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) |
229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) | 229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) |
230 | #else | 230 | #else |
231 | # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) | 231 | # define spin_unlock(lock) \ |
232 | # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) | 232 | do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
233 | # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) | 233 | # define read_unlock(lock) \ |
234 | # define spin_unlock_irq(lock) \ | 234 | do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
235 | do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 235 | # define write_unlock(lock) \ |
236 | # define read_unlock_irq(lock) \ | 236 | do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
237 | do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 237 | # define spin_unlock_irq(lock) \ |
238 | # define write_unlock_irq(lock) \ | 238 | do { \ |
239 | do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 239 | __raw_spin_unlock(&(lock)->raw_lock); \ |
240 | __release(lock); \ | ||
241 | local_irq_enable(); \ | ||
242 | } while (0) | ||
243 | # define read_unlock_irq(lock) \ | ||
244 | do { \ | ||
245 | __raw_read_unlock(&(lock)->raw_lock); \ | ||
246 | __release(lock); \ | ||
247 | local_irq_enable(); \ | ||
248 | } while (0) | ||
249 | # define write_unlock_irq(lock) \ | ||
250 | do { \ | ||
251 | __raw_write_unlock(&(lock)->raw_lock); \ | ||
252 | __release(lock); \ | ||
253 | local_irq_enable(); \ | ||
254 | } while (0) | ||
240 | #endif | 255 | #endif |
241 | 256 | ||
242 | #define spin_unlock_irqrestore(lock, flags) \ | 257 | #define spin_unlock_irqrestore(lock, flags) \ |
diff --git a/include/linux/stat.h b/include/linux/stat.h index 679ef0d70b6b..4f8539ccff6c 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #define S_IFMT 00170000 | 12 | #define S_IFMT 00170000 |
13 | #define S_IFSOCK 0140000 | 13 | #define S_IFSOCK 0140000 |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 5423559a44a6..006868881346 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * | |||
170 | extern unsigned long totalram_pages; | 170 | extern unsigned long totalram_pages; |
171 | extern unsigned long totalreserve_pages; | 171 | extern unsigned long totalreserve_pages; |
172 | extern long nr_swap_pages; | 172 | extern long nr_swap_pages; |
173 | extern unsigned int nr_free_pages(void); | ||
174 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); | ||
175 | extern unsigned int nr_free_buffer_pages(void); | 173 | extern unsigned int nr_free_buffer_pages(void); |
176 | extern unsigned int nr_free_pagecache_pages(void); | 174 | extern unsigned int nr_free_pagecache_pages(void); |
177 | 175 | ||
176 | /* Definition of global_page_state not available yet */ | ||
177 | #define nr_free_pages() global_page_state(NR_FREE_PAGES) | ||
178 | |||
179 | |||
178 | /* linux/mm/swap.c */ | 180 | /* linux/mm/swap.c */ |
179 | extern void FASTCALL(lru_cache_add(struct page *)); | 181 | extern void FASTCALL(lru_cache_add(struct page *)); |
180 | extern void FASTCALL(lru_cache_add_active(struct page *)); | 182 | extern void FASTCALL(lru_cache_add_active(struct page *)); |
diff --git a/include/linux/time.h b/include/linux/time.h index a5b739967b74..55cee172d723 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b) | |||
46 | * lhs == rhs: return 0 | 46 | * lhs == rhs: return 0 |
47 | * lhs > rhs: return >0 | 47 | * lhs > rhs: return >0 |
48 | */ | 48 | */ |
49 | static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | 49 | static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) |
50 | { | 50 | { |
51 | if (lhs->tv_sec < rhs->tv_sec) | 51 | if (lhs->tv_sec < rhs->tv_sec) |
52 | return -1; | 52 | return -1; |
@@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | |||
55 | return lhs->tv_nsec - rhs->tv_nsec; | 55 | return lhs->tv_nsec - rhs->tv_nsec; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) | 58 | static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) |
59 | { | 59 | { |
60 | if (lhs->tv_sec < rhs->tv_sec) | 60 | if (lhs->tv_sec < rhs->tv_sec) |
61 | return -1; | 61 | return -1; |
diff --git a/include/linux/timex.h b/include/linux/timex.h index db501dc23c29..9a24e500c311 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -255,10 +255,10 @@ struct time_interpolator { | |||
255 | u8 jitter; /* if set compensate for fluctuations */ | 255 | u8 jitter; /* if set compensate for fluctuations */ |
256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ | 256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ |
257 | void *addr; /* address of counter or function */ | 257 | void *addr; /* address of counter or function */ |
258 | u64 mask; /* mask the valid bits of the counter */ | 258 | cycles_t mask; /* mask the valid bits of the counter */ |
259 | unsigned long offset; /* nsec offset at last update of interpolator */ | 259 | unsigned long offset; /* nsec offset at last update of interpolator */ |
260 | u64 last_counter; /* counter value in units of the counter at last update */ | 260 | u64 last_counter; /* counter value in units of the counter at last update */ |
261 | u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ | 261 | cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ |
262 | u64 frequency; /* frequency in counts/second */ | 262 | u64 frequency; /* frequency in counts/second */ |
263 | long drift; /* drift in parts-per-million (or -1) */ | 263 | long drift; /* drift in parts-per-million (or -1) */ |
264 | unsigned long skips; /* skips forward */ | 264 | unsigned long skips; /* skips forward */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 65cbcf22c31e..8427c9e98e6b 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -24,7 +24,27 @@ | |||
24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ | 24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ |
25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
27 | #define NR_LDISCS 16 | 27 | #define NR_LDISCS 17 |
28 | |||
29 | /* line disciplines */ | ||
30 | #define N_TTY 0 | ||
31 | #define N_SLIP 1 | ||
32 | #define N_MOUSE 2 | ||
33 | #define N_PPP 3 | ||
34 | #define N_STRIP 4 | ||
35 | #define N_AX25 5 | ||
36 | #define N_X25 6 /* X.25 async */ | ||
37 | #define N_6PACK 7 | ||
38 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
39 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
40 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
41 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
42 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | ||
43 | /* cards about SMS messages */ | ||
44 | #define N_HDLC 13 /* synchronous HDLC */ | ||
45 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
46 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
47 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | ||
28 | 48 | ||
29 | /* | 49 | /* |
30 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 50 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty); | |||
291 | extern void tty_unhangup(struct file *filp); | 311 | extern void tty_unhangup(struct file *filp); |
292 | extern int tty_hung_up_p(struct file * filp); | 312 | extern int tty_hung_up_p(struct file * filp); |
293 | extern void do_SAK(struct tty_struct *tty); | 313 | extern void do_SAK(struct tty_struct *tty); |
314 | extern void __do_SAK(struct tty_struct *tty); | ||
294 | extern void disassociate_ctty(int priv); | 315 | extern void disassociate_ctty(int priv); |
295 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 316 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
296 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | 317 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5e9803ed17fc..acb1f105870c 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -3,20 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/mm.h> | ||
6 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | #ifdef CONFIG_VM_EVENT_COUNTERS | 10 | #ifdef CONFIG_ZONE_DMA |
10 | /* | 11 | #define DMA_ZONE(xx) xx##_DMA, |
11 | * Light weight per cpu counter implementation. | 12 | #else |
12 | * | 13 | #define DMA_ZONE(xx) |
13 | * Counters should only be incremented. You need to set EMBEDDED | 14 | #endif |
14 | * to disable VM_EVENT_COUNTERS. Things like procps (vmstat, | ||
15 | * top, etc) use /proc/vmstat and depend on these counters. | ||
16 | * | ||
17 | * Counters are handled completely inline. On many platforms the code | ||
18 | * generated will simply be the increment of a global address. | ||
19 | */ | ||
20 | 15 | ||
21 | #ifdef CONFIG_ZONE_DMA32 | 16 | #ifdef CONFIG_ZONE_DMA32 |
22 | #define DMA32_ZONE(xx) xx##_DMA32, | 17 | #define DMA32_ZONE(xx) xx##_DMA32, |
@@ -30,7 +25,7 @@ | |||
30 | #define HIGHMEM_ZONE(xx) | 25 | #define HIGHMEM_ZONE(xx) |
31 | #endif | 26 | #endif |
32 | 27 | ||
33 | #define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) | 28 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) |
34 | 29 | ||
35 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | 30 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
36 | FOR_ALL_ZONES(PGALLOC), | 31 | FOR_ALL_ZONES(PGALLOC), |
@@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
45 | NR_VM_EVENT_ITEMS | 40 | NR_VM_EVENT_ITEMS |
46 | }; | 41 | }; |
47 | 42 | ||
43 | #ifdef CONFIG_VM_EVENT_COUNTERS | ||
44 | /* | ||
45 | * Light weight per cpu counter implementation. | ||
46 | * | ||
47 | * Counters should only be incremented and no critical kernel component | ||
48 | * should rely on the counter values. | ||
49 | * | ||
50 | * Counters are handled completely inline. On many platforms the code | ||
51 | * generated will simply be the increment of a global address. | ||
52 | */ | ||
53 | |||
48 | struct vm_event_state { | 54 | struct vm_event_state { |
49 | unsigned long event[NR_VM_EVENT_ITEMS]; | 55 | unsigned long event[NR_VM_EVENT_ITEMS]; |
50 | }; | 56 | }; |
@@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu) | |||
85 | #else | 91 | #else |
86 | 92 | ||
87 | /* Disable counters */ | 93 | /* Disable counters */ |
88 | #define get_cpu_vm_events(e) 0L | 94 | static inline void count_vm_event(enum vm_event_item item) |
89 | #define count_vm_event(e) do { } while (0) | 95 | { |
90 | #define count_vm_events(e,d) do { } while (0) | 96 | } |
91 | #define __count_vm_event(e) do { } while (0) | 97 | static inline void count_vm_events(enum vm_event_item item, long delta) |
92 | #define __count_vm_events(e,d) do { } while (0) | 98 | { |
93 | #define vm_events_fold_cpu(x) do { } while (0) | 99 | } |
100 | static inline void __count_vm_event(enum vm_event_item item) | ||
101 | { | ||
102 | } | ||
103 | static inline void __count_vm_events(enum vm_event_item item, long delta) | ||
104 | { | ||
105 | } | ||
106 | static inline void all_vm_events(unsigned long *ret) | ||
107 | { | ||
108 | } | ||
109 | static inline void vm_events_fold_cpu(int cpu) | ||
110 | { | ||
111 | } | ||
94 | 112 | ||
95 | #endif /* CONFIG_VM_EVENT_COUNTERS */ | 113 | #endif /* CONFIG_VM_EVENT_COUNTERS */ |
96 | 114 | ||
97 | #define __count_zone_vm_events(item, zone, delta) \ | 115 | #define __count_zone_vm_events(item, zone, delta) \ |
98 | __count_vm_events(item##_DMA + zone_idx(zone), delta) | 116 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ |
117 | zone_idx(zone), delta) | ||
99 | 118 | ||
100 | /* | 119 | /* |
101 | * Zone based page accounting with per cpu differentials. | 120 | * Zone based page accounting with per cpu differentials. |
@@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node, | |||
142 | struct zone *zones = NODE_DATA(node)->node_zones; | 161 | struct zone *zones = NODE_DATA(node)->node_zones; |
143 | 162 | ||
144 | return | 163 | return |
164 | #ifdef CONFIG_ZONE_DMA | ||
165 | zone_page_state(&zones[ZONE_DMA], item) + | ||
166 | #endif | ||
145 | #ifdef CONFIG_ZONE_DMA32 | 167 | #ifdef CONFIG_ZONE_DMA32 |
146 | zone_page_state(&zones[ZONE_DMA32], item) + | 168 | zone_page_state(&zones[ZONE_DMA32], item) + |
147 | #endif | 169 | #endif |
148 | zone_page_state(&zones[ZONE_NORMAL], item) + | ||
149 | #ifdef CONFIG_HIGHMEM | 170 | #ifdef CONFIG_HIGHMEM |
150 | zone_page_state(&zones[ZONE_HIGHMEM], item) + | 171 | zone_page_state(&zones[ZONE_HIGHMEM], item) + |
151 | #endif | 172 | #endif |
152 | zone_page_state(&zones[ZONE_DMA], item); | 173 | zone_page_state(&zones[ZONE_NORMAL], item); |
153 | } | 174 | } |
154 | 175 | ||
155 | extern void zone_statistics(struct zonelist *, struct zone *); | 176 | extern void zone_statistics(struct zonelist *, struct zone *); |
@@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item); | |||
186 | void dec_zone_page_state(struct page *, enum zone_stat_item); | 207 | void dec_zone_page_state(struct page *, enum zone_stat_item); |
187 | 208 | ||
188 | extern void inc_zone_state(struct zone *, enum zone_stat_item); | 209 | extern void inc_zone_state(struct zone *, enum zone_stat_item); |
210 | extern void __inc_zone_state(struct zone *, enum zone_stat_item); | ||
211 | extern void dec_zone_state(struct zone *, enum zone_stat_item); | ||
212 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); | ||
189 | 213 | ||
190 | void refresh_cpu_vm_stats(int); | 214 | void refresh_cpu_vm_stats(int); |
191 | void refresh_vm_stats(void); | 215 | void refresh_vm_stats(void); |
@@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page, | |||
214 | __inc_zone_state(page_zone(page), item); | 238 | __inc_zone_state(page_zone(page), item); |
215 | } | 239 | } |
216 | 240 | ||
241 | static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) | ||
242 | { | ||
243 | atomic_long_dec(&zone->vm_stat[item]); | ||
244 | atomic_long_dec(&vm_stat[item]); | ||
245 | } | ||
246 | |||
217 | static inline void __dec_zone_page_state(struct page *page, | 247 | static inline void __dec_zone_page_state(struct page *page, |
218 | enum zone_stat_item item) | 248 | enum zone_stat_item item) |
219 | { | 249 | { |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 0e7f1e20ea45..def131a5ac70 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ | 13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ |
14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ | 14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | |||
16 | /* Namespaces */ | 20 | /* Namespaces */ |
17 | #define XATTR_OS2_PREFIX "os2." | 21 | #define XATTR_OS2_PREFIX "os2." |
18 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) | 22 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) |
@@ -29,6 +33,8 @@ | |||
29 | #define XATTR_USER_PREFIX "user." | 33 | #define XATTR_USER_PREFIX "user." |
30 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) | 34 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) |
31 | 35 | ||
36 | struct inode; | ||
37 | struct dentry; | ||
32 | 38 | ||
33 | struct xattr_handler { | 39 | struct xattr_handler { |
34 | char *prefix; | 40 | char *prefix; |
@@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz | |||
50 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); | 56 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); |
51 | int generic_removexattr(struct dentry *dentry, const char *name); | 57 | int generic_removexattr(struct dentry *dentry, const char *name); |
52 | 58 | ||
59 | #endif /* __KERNEL__ */ | ||
60 | |||
53 | #endif /* _LINUX_XATTR_H */ | 61 | #endif /* _LINUX_XATTR_H */ |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 0c775fceb675..0689e004a281 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -558,10 +558,9 @@ struct sas_task { | |||
558 | static inline struct sas_task *sas_alloc_task(gfp_t flags) | 558 | static inline struct sas_task *sas_alloc_task(gfp_t flags) |
559 | { | 559 | { |
560 | extern struct kmem_cache *sas_task_cache; | 560 | extern struct kmem_cache *sas_task_cache; |
561 | struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); | 561 | struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags); |
562 | 562 | ||
563 | if (task) { | 563 | if (task) { |
564 | memset(task, 0, sizeof(*task)); | ||
565 | INIT_LIST_HEAD(&task->list); | 564 | INIT_LIST_HEAD(&task->list); |
566 | spin_lock_init(&task->task_state_lock); | 565 | spin_lock_init(&task->task_state_lock); |
567 | task->task_state_flags = SAS_TASK_STATE_PENDING; | 566 | task->task_state_flags = SAS_TASK_STATE_PENDING; |
diff --git a/init/Kconfig b/init/Kconfig index a3f83e2c8250..ad33c979e0b3 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -192,6 +192,24 @@ config TASK_DELAY_ACCT | |||
192 | 192 | ||
193 | Say N if unsure. | 193 | Say N if unsure. |
194 | 194 | ||
195 | config TASK_XACCT | ||
196 | bool "Enable extended accounting over taskstats (EXPERIMENTAL)" | ||
197 | depends on TASKSTATS | ||
198 | help | ||
199 | Collect extended task accounting data and send the data | ||
200 | to userland for processing over the taskstats interface. | ||
201 | |||
202 | Say N if unsure. | ||
203 | |||
204 | config TASK_IO_ACCOUNTING | ||
205 | bool "Enable per-task storage I/O accounting (EXPERIMENTAL)" | ||
206 | depends on TASK_XACCT | ||
207 | help | ||
208 | Collect information on the number of bytes of storage I/O which this | ||
209 | task has caused. | ||
210 | |||
211 | Say N if unsure. | ||
212 | |||
195 | config UTS_NS | 213 | config UTS_NS |
196 | bool "UTS Namespaces" | 214 | bool "UTS Namespaces" |
197 | default n | 215 | default n |
@@ -280,8 +298,12 @@ config RELAY | |||
280 | 298 | ||
281 | If unsure, say N. | 299 | If unsure, say N. |
282 | 300 | ||
301 | if BLK_DEV_INITRD | ||
302 | |||
283 | source "usr/Kconfig" | 303 | source "usr/Kconfig" |
284 | 304 | ||
305 | endif | ||
306 | |||
285 | config CC_OPTIMIZE_FOR_SIZE | 307 | config CC_OPTIMIZE_FOR_SIZE |
286 | bool "Optimize for size (Look out for broken compilers!)" | 308 | bool "Optimize for size (Look out for broken compilers!)" |
287 | default y | 309 | default y |
@@ -295,24 +317,6 @@ config CC_OPTIMIZE_FOR_SIZE | |||
295 | 317 | ||
296 | If unsure, say N. | 318 | If unsure, say N. |
297 | 319 | ||
298 | config TASK_XACCT | ||
299 | bool "Enable extended accounting over taskstats (EXPERIMENTAL)" | ||
300 | depends on TASKSTATS | ||
301 | help | ||
302 | Collect extended task accounting data and send the data | ||
303 | to userland for processing over the taskstats interface. | ||
304 | |||
305 | Say N if unsure. | ||
306 | |||
307 | config TASK_IO_ACCOUNTING | ||
308 | bool "Enable per-task storage I/O accounting (EXPERIMENTAL)" | ||
309 | depends on TASK_XACCT | ||
310 | help | ||
311 | Collect information on the number of bytes of storage I/O which this | ||
312 | task has caused. | ||
313 | |||
314 | Say N if unsure. | ||
315 | |||
316 | config SYSCTL | 320 | config SYSCTL |
317 | bool | 321 | bool |
318 | 322 | ||
diff --git a/init/Makefile b/init/Makefile index 633a268d270d..0154aea1e52d 100644 --- a/init/Makefile +++ b/init/Makefile | |||
@@ -2,7 +2,12 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := main.o version.o mounts.o initramfs.o | 5 | obj-y := main.o version.o mounts.o |
6 | ifneq ($(CONFIG_BLK_DEV_INITRD),y) | ||
7 | obj-y += noinitramfs.o | ||
8 | else | ||
9 | obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o | ||
10 | endif | ||
6 | obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o | 11 | obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o |
7 | 12 | ||
8 | mounts-y := do_mounts.o | 13 | mounts-y := do_mounts.o |
diff --git a/init/initramfs.c b/init/initramfs.c index 4fa0f7977de1..00eff7a11085 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -491,6 +491,17 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) | |||
491 | return message; | 491 | return message; |
492 | } | 492 | } |
493 | 493 | ||
494 | static int __initdata do_retain_initrd; | ||
495 | |||
496 | static int __init retain_initrd_param(char *str) | ||
497 | { | ||
498 | if (*str) | ||
499 | return 0; | ||
500 | do_retain_initrd = 1; | ||
501 | return 1; | ||
502 | } | ||
503 | __setup("retain_initrd", retain_initrd_param); | ||
504 | |||
494 | extern char __initramfs_start[], __initramfs_end[]; | 505 | extern char __initramfs_start[], __initramfs_end[]; |
495 | #ifdef CONFIG_BLK_DEV_INITRD | 506 | #ifdef CONFIG_BLK_DEV_INITRD |
496 | #include <linux/initrd.h> | 507 | #include <linux/initrd.h> |
@@ -501,7 +512,11 @@ static void __init free_initrd(void) | |||
501 | #ifdef CONFIG_KEXEC | 512 | #ifdef CONFIG_KEXEC |
502 | unsigned long crashk_start = (unsigned long)__va(crashk_res.start); | 513 | unsigned long crashk_start = (unsigned long)__va(crashk_res.start); |
503 | unsigned long crashk_end = (unsigned long)__va(crashk_res.end); | 514 | unsigned long crashk_end = (unsigned long)__va(crashk_res.end); |
515 | #endif | ||
516 | if (do_retain_initrd) | ||
517 | goto skip; | ||
504 | 518 | ||
519 | #ifdef CONFIG_KEXEC | ||
505 | /* | 520 | /* |
506 | * If the initrd region is overlapped with crashkernel reserved region, | 521 | * If the initrd region is overlapped with crashkernel reserved region, |
507 | * free only memory that is not part of crashkernel region. | 522 | * free only memory that is not part of crashkernel region. |
@@ -519,7 +534,7 @@ static void __init free_initrd(void) | |||
519 | } else | 534 | } else |
520 | #endif | 535 | #endif |
521 | free_initrd_mem(initrd_start, initrd_end); | 536 | free_initrd_mem(initrd_start, initrd_end); |
522 | 537 | skip: | |
523 | initrd_start = 0; | 538 | initrd_start = 0; |
524 | initrd_end = 0; | 539 | initrd_end = 0; |
525 | } | 540 | } |
diff --git a/init/main.c b/init/main.c index 8b4a7d769162..4e88bddfbebf 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -395,11 +395,6 @@ static void __init smp_init(void) | |||
395 | /* Any cleanup work */ | 395 | /* Any cleanup work */ |
396 | printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus()); | 396 | printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus()); |
397 | smp_cpus_done(max_cpus); | 397 | smp_cpus_done(max_cpus); |
398 | #if 0 | ||
399 | /* Get other processors into their bootup holding patterns. */ | ||
400 | |||
401 | smp_commence(); | ||
402 | #endif | ||
403 | } | 398 | } |
404 | 399 | ||
405 | #endif | 400 | #endif |
diff --git a/init/noinitramfs.c b/init/noinitramfs.c new file mode 100644 index 000000000000..f4c1a3a1b8c5 --- /dev/null +++ b/init/noinitramfs.c | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * init/noinitramfs.c | ||
3 | * | ||
4 | * Copyright (C) 2006, NXP Semiconductors, All Rights Reserved | ||
5 | * Author: Jean-Paul Saman <jean-paul.saman@nxp.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/stat.h> | ||
22 | #include <linux/kdev_t.h> | ||
23 | #include <linux/syscalls.h> | ||
24 | |||
25 | /* | ||
26 | * Create a simple rootfs that is similar to the default initramfs | ||
27 | */ | ||
28 | static int __init default_rootfs(void) | ||
29 | { | ||
30 | int err; | ||
31 | |||
32 | err = sys_mkdir("/dev", 0755); | ||
33 | if (err < 0) | ||
34 | goto out; | ||
35 | |||
36 | err = sys_mknod((const char __user *) "/dev/console", | ||
37 | S_IFCHR | S_IRUSR | S_IWUSR, | ||
38 | new_encode_dev(MKDEV(5, 1))); | ||
39 | if (err < 0) | ||
40 | goto out; | ||
41 | |||
42 | err = sys_mkdir("/root", 0700); | ||
43 | if (err < 0) | ||
44 | goto out; | ||
45 | |||
46 | return 0; | ||
47 | |||
48 | out: | ||
49 | printk(KERN_WARNING "Failed to create a rootfs\n"); | ||
50 | return err; | ||
51 | } | ||
52 | rootfs_initcall(default_rootfs); | ||
diff --git a/ipc/util.c b/ipc/util.c index a9b7a227b8d4..0c97cb746160 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -150,7 +150,7 @@ void free_ipc_ns(struct kref *kref) | |||
150 | * ipc_init - initialise IPC subsystem | 150 | * ipc_init - initialise IPC subsystem |
151 | * | 151 | * |
152 | * The various system5 IPC resources (semaphores, messages and shared | 152 | * The various system5 IPC resources (semaphores, messages and shared |
153 | * memory are initialised | 153 | * memory) are initialised |
154 | */ | 154 | */ |
155 | 155 | ||
156 | static int __init ipc_init(void) | 156 | static int __init ipc_init(void) |
@@ -207,8 +207,7 @@ void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size) | |||
207 | #ifdef CONFIG_PROC_FS | 207 | #ifdef CONFIG_PROC_FS |
208 | static struct file_operations sysvipc_proc_fops; | 208 | static struct file_operations sysvipc_proc_fops; |
209 | /** | 209 | /** |
210 | * ipc_init_proc_interface - Create a proc interface for sysipc types | 210 | * ipc_init_proc_interface - Create a proc interface for sysipc types using a seq_file interface. |
211 | * using a seq_file interface. | ||
212 | * @path: Path in procfs | 211 | * @path: Path in procfs |
213 | * @header: Banner to be printed at the beginning of the file. | 212 | * @header: Banner to be printed at the beginning of the file. |
214 | * @ids: ipc id table to iterate. | 213 | * @ids: ipc id table to iterate. |
@@ -417,7 +416,7 @@ void* ipc_alloc(int size) | |||
417 | * @ptr: pointer returned by ipc_alloc | 416 | * @ptr: pointer returned by ipc_alloc |
418 | * @size: size of block | 417 | * @size: size of block |
419 | * | 418 | * |
420 | * Free a block created with ipc_alloc. The caller must know the size | 419 | * Free a block created with ipc_alloc(). The caller must know the size |
421 | * used in the allocation call. | 420 | * used in the allocation call. |
422 | */ | 421 | */ |
423 | 422 | ||
@@ -524,7 +523,7 @@ static void ipc_do_vfree(struct work_struct *work) | |||
524 | * @head: RCU callback structure for queued work | 523 | * @head: RCU callback structure for queued work |
525 | * | 524 | * |
526 | * Since RCU callback function is called in bh, | 525 | * Since RCU callback function is called in bh, |
527 | * we need to defer the vfree to schedule_work | 526 | * we need to defer the vfree to schedule_work(). |
528 | */ | 527 | */ |
529 | static void ipc_schedule_free(struct rcu_head *head) | 528 | static void ipc_schedule_free(struct rcu_head *head) |
530 | { | 529 | { |
@@ -541,7 +540,7 @@ static void ipc_schedule_free(struct rcu_head *head) | |||
541 | * ipc_immediate_free - free ipc + rcu space | 540 | * ipc_immediate_free - free ipc + rcu space |
542 | * @head: RCU callback structure that contains pointer to be freed | 541 | * @head: RCU callback structure that contains pointer to be freed |
543 | * | 542 | * |
544 | * Free from the RCU callback context | 543 | * Free from the RCU callback context. |
545 | */ | 544 | */ |
546 | static void ipc_immediate_free(struct rcu_head *head) | 545 | static void ipc_immediate_free(struct rcu_head *head) |
547 | { | 546 | { |
@@ -603,8 +602,8 @@ int ipcperms (struct kern_ipc_perm *ipcp, short flag) | |||
603 | * @in: kernel permissions | 602 | * @in: kernel permissions |
604 | * @out: new style IPC permissions | 603 | * @out: new style IPC permissions |
605 | * | 604 | * |
606 | * Turn the kernel object 'in' into a set of permissions descriptions | 605 | * Turn the kernel object @in into a set of permissions descriptions |
607 | * for returning to userspace (out). | 606 | * for returning to userspace (@out). |
608 | */ | 607 | */ |
609 | 608 | ||
610 | 609 | ||
@@ -624,8 +623,8 @@ void kernel_to_ipc64_perm (struct kern_ipc_perm *in, struct ipc64_perm *out) | |||
624 | * @in: new style IPC permissions | 623 | * @in: new style IPC permissions |
625 | * @out: old style IPC permissions | 624 | * @out: old style IPC permissions |
626 | * | 625 | * |
627 | * Turn the new style permissions object in into a compatibility | 626 | * Turn the new style permissions object @in into a compatibility |
628 | * object and store it into the 'out' pointer. | 627 | * object and store it into the @out pointer. |
629 | */ | 628 | */ |
630 | 629 | ||
631 | void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out) | 630 | void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out) |
@@ -722,7 +721,7 @@ int ipc_checkid(struct ipc_ids* ids, struct kern_ipc_perm* ipcp, int uid) | |||
722 | * @cmd: pointer to command | 721 | * @cmd: pointer to command |
723 | * | 722 | * |
724 | * Return IPC_64 for new style IPC and IPC_OLD for old style IPC. | 723 | * Return IPC_64 for new style IPC and IPC_OLD for old style IPC. |
725 | * The cmd value is turned from an encoding command and version into | 724 | * The @cmd value is turned from an encoding command and version into |
726 | * just the command code. | 725 | * just the command code. |
727 | */ | 726 | */ |
728 | 727 | ||
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 9c8c23227c7f..87865f8b4ce3 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -1601,8 +1601,8 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb, | |||
1601 | 1601 | ||
1602 | int audit_filter_user(struct netlink_skb_parms *cb, int type) | 1602 | int audit_filter_user(struct netlink_skb_parms *cb, int type) |
1603 | { | 1603 | { |
1604 | enum audit_state state = AUDIT_DISABLED; | ||
1604 | struct audit_entry *e; | 1605 | struct audit_entry *e; |
1605 | enum audit_state state; | ||
1606 | int ret = 1; | 1606 | int ret = 1; |
1607 | 1607 | ||
1608 | rcu_read_lock(); | 1608 | rcu_read_lock(); |
diff --git a/kernel/compat.c b/kernel/compat.c index 6952dd057300..cebb4c28c039 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -1016,3 +1016,69 @@ asmlinkage long compat_sys_migrate_pages(compat_pid_t pid, | |||
1016 | return sys_migrate_pages(pid, nr_bits + 1, old, new); | 1016 | return sys_migrate_pages(pid, nr_bits + 1, old, new); |
1017 | } | 1017 | } |
1018 | #endif | 1018 | #endif |
1019 | |||
1020 | struct compat_sysinfo { | ||
1021 | s32 uptime; | ||
1022 | u32 loads[3]; | ||
1023 | u32 totalram; | ||
1024 | u32 freeram; | ||
1025 | u32 sharedram; | ||
1026 | u32 bufferram; | ||
1027 | u32 totalswap; | ||
1028 | u32 freeswap; | ||
1029 | u16 procs; | ||
1030 | u16 pad; | ||
1031 | u32 totalhigh; | ||
1032 | u32 freehigh; | ||
1033 | u32 mem_unit; | ||
1034 | char _f[20-2*sizeof(u32)-sizeof(int)]; | ||
1035 | }; | ||
1036 | |||
1037 | asmlinkage long | ||
1038 | compat_sys_sysinfo(struct compat_sysinfo __user *info) | ||
1039 | { | ||
1040 | struct sysinfo s; | ||
1041 | |||
1042 | do_sysinfo(&s); | ||
1043 | |||
1044 | /* Check to see if any memory value is too large for 32-bit and scale | ||
1045 | * down if needed | ||
1046 | */ | ||
1047 | if ((s.totalram >> 32) || (s.totalswap >> 32)) { | ||
1048 | int bitcount = 0; | ||
1049 | |||
1050 | while (s.mem_unit < PAGE_SIZE) { | ||
1051 | s.mem_unit <<= 1; | ||
1052 | bitcount++; | ||
1053 | } | ||
1054 | |||
1055 | s.totalram >>= bitcount; | ||
1056 | s.freeram >>= bitcount; | ||
1057 | s.sharedram >>= bitcount; | ||
1058 | s.bufferram >>= bitcount; | ||
1059 | s.totalswap >>= bitcount; | ||
1060 | s.freeswap >>= bitcount; | ||
1061 | s.totalhigh >>= bitcount; | ||
1062 | s.freehigh >>= bitcount; | ||
1063 | } | ||
1064 | |||
1065 | if (!access_ok(VERIFY_WRITE, info, sizeof(struct compat_sysinfo)) || | ||
1066 | __put_user (s.uptime, &info->uptime) || | ||
1067 | __put_user (s.loads[0], &info->loads[0]) || | ||
1068 | __put_user (s.loads[1], &info->loads[1]) || | ||
1069 | __put_user (s.loads[2], &info->loads[2]) || | ||
1070 | __put_user (s.totalram, &info->totalram) || | ||
1071 | __put_user (s.freeram, &info->freeram) || | ||
1072 | __put_user (s.sharedram, &info->sharedram) || | ||
1073 | __put_user (s.bufferram, &info->bufferram) || | ||
1074 | __put_user (s.totalswap, &info->totalswap) || | ||
1075 | __put_user (s.freeswap, &info->freeswap) || | ||
1076 | __put_user (s.procs, &info->procs) || | ||
1077 | __put_user (s.totalhigh, &info->totalhigh) || | ||
1078 | __put_user (s.freehigh, &info->freehigh) || | ||
1079 | __put_user (s.mem_unit, &info->mem_unit)) | ||
1080 | return -EFAULT; | ||
1081 | |||
1082 | return 0; | ||
1083 | } | ||
1084 | |||
diff --git a/kernel/cpu.c b/kernel/cpu.c index 7406fe6966f9..3d4206ada5c9 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -309,6 +309,8 @@ void enable_nonboot_cpus(void) | |||
309 | mutex_lock(&cpu_add_remove_lock); | 309 | mutex_lock(&cpu_add_remove_lock); |
310 | cpu_hotplug_disabled = 0; | 310 | cpu_hotplug_disabled = 0; |
311 | mutex_unlock(&cpu_add_remove_lock); | 311 | mutex_unlock(&cpu_add_remove_lock); |
312 | if (cpus_empty(frozen_cpus)) | ||
313 | return; | ||
312 | 314 | ||
313 | printk("Enabling non-boot CPUs ...\n"); | 315 | printk("Enabling non-boot CPUs ...\n"); |
314 | for_each_cpu_mask(cpu, frozen_cpus) { | 316 | for_each_cpu_mask(cpu, frozen_cpus) { |
diff --git a/kernel/exit.c b/kernel/exit.c index fec12eb12471..bc71fdfcd8a7 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -257,8 +257,7 @@ static int has_stopped_jobs(int pgrp) | |||
257 | } | 257 | } |
258 | 258 | ||
259 | /** | 259 | /** |
260 | * reparent_to_init - Reparent the calling kernel thread to the init task | 260 | * reparent_to_init - Reparent the calling kernel thread to the init task of the pid space that the thread belongs to. |
261 | * of the pid space that the thread belongs to. | ||
262 | * | 261 | * |
263 | * If a kernel thread is launched as a result of a system call, or if | 262 | * If a kernel thread is launched as a result of a system call, or if |
264 | * it ever exits, it should generally reparent itself to init so that | 263 | * it ever exits, it should generally reparent itself to init so that |
diff --git a/kernel/fork.c b/kernel/fork.c index d57118da73ff..80284eb488ce 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1038,10 +1038,12 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1038 | p->utime = cputime_zero; | 1038 | p->utime = cputime_zero; |
1039 | p->stime = cputime_zero; | 1039 | p->stime = cputime_zero; |
1040 | p->sched_time = 0; | 1040 | p->sched_time = 0; |
1041 | #ifdef CONFIG_TASK_XACCT | ||
1041 | p->rchar = 0; /* I/O counter: bytes read */ | 1042 | p->rchar = 0; /* I/O counter: bytes read */ |
1042 | p->wchar = 0; /* I/O counter: bytes written */ | 1043 | p->wchar = 0; /* I/O counter: bytes written */ |
1043 | p->syscr = 0; /* I/O counter: read syscalls */ | 1044 | p->syscr = 0; /* I/O counter: read syscalls */ |
1044 | p->syscw = 0; /* I/O counter: write syscalls */ | 1045 | p->syscw = 0; /* I/O counter: write syscalls */ |
1046 | #endif | ||
1045 | task_io_accounting_init(p); | 1047 | task_io_accounting_init(p); |
1046 | acct_clear_integrals(p); | 1048 | acct_clear_integrals(p); |
1047 | 1049 | ||
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index d0ba190dfeb6..f44e499e8fca 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -102,7 +102,7 @@ static DEFINE_PER_CPU(struct hrtimer_base, hrtimer_bases[MAX_HRTIMER_BASES]) = | |||
102 | * | 102 | * |
103 | * The function calculates the monotonic clock from the realtime | 103 | * The function calculates the monotonic clock from the realtime |
104 | * clock and the wall_to_monotonic offset and stores the result | 104 | * clock and the wall_to_monotonic offset and stores the result |
105 | * in normalized timespec format in the variable pointed to by ts. | 105 | * in normalized timespec format in the variable pointed to by @ts. |
106 | */ | 106 | */ |
107 | void ktime_get_ts(struct timespec *ts) | 107 | void ktime_get_ts(struct timespec *ts) |
108 | { | 108 | { |
@@ -583,8 +583,8 @@ EXPORT_SYMBOL_GPL(hrtimer_init); | |||
583 | * @which_clock: which clock to query | 583 | * @which_clock: which clock to query |
584 | * @tp: pointer to timespec variable to store the resolution | 584 | * @tp: pointer to timespec variable to store the resolution |
585 | * | 585 | * |
586 | * Store the resolution of the clock selected by which_clock in the | 586 | * Store the resolution of the clock selected by @which_clock in the |
587 | * variable pointed to by tp. | 587 | * variable pointed to by @tp. |
588 | */ | 588 | */ |
589 | int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp) | 589 | int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp) |
590 | { | 590 | { |
diff --git a/kernel/irq/Makefile b/kernel/irq/Makefile index 1dab0ac3f797..681c52dbfe22 100644 --- a/kernel/irq/Makefile +++ b/kernel/irq/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | obj-y := handle.o manage.o spurious.o resend.o chip.o | 2 | obj-y := handle.o manage.o spurious.o resend.o chip.o devres.o |
3 | obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o | 3 | obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o |
4 | obj-$(CONFIG_PROC_FS) += proc.o | 4 | obj-$(CONFIG_PROC_FS) += proc.o |
5 | obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o | 5 | obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o |
diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c new file mode 100644 index 000000000000..85a430da0fb6 --- /dev/null +++ b/kernel/irq/devres.c | |||
@@ -0,0 +1,88 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/interrupt.h> | ||
3 | |||
4 | /* | ||
5 | * Device resource management aware IRQ request/free implementation. | ||
6 | */ | ||
7 | struct irq_devres { | ||
8 | unsigned int irq; | ||
9 | void *dev_id; | ||
10 | }; | ||
11 | |||
12 | static void devm_irq_release(struct device *dev, void *res) | ||
13 | { | ||
14 | struct irq_devres *this = res; | ||
15 | |||
16 | free_irq(this->irq, this->dev_id); | ||
17 | } | ||
18 | |||
19 | static int devm_irq_match(struct device *dev, void *res, void *data) | ||
20 | { | ||
21 | struct irq_devres *this = res, *match = data; | ||
22 | |||
23 | return this->irq == match->irq && this->dev_id == match->dev_id; | ||
24 | } | ||
25 | |||
26 | /** | ||
27 | * devm_request_irq - allocate an interrupt line for a managed device | ||
28 | * @dev: device to request interrupt for | ||
29 | * @irq: Interrupt line to allocate | ||
30 | * @handler: Function to be called when the IRQ occurs | ||
31 | * @irqflags: Interrupt type flags | ||
32 | * @devname: An ascii name for the claiming device | ||
33 | * @dev_id: A cookie passed back to the handler function | ||
34 | * | ||
35 | * Except for the extra @dev argument, this function takes the | ||
36 | * same arguments and performs the same function as | ||
37 | * request_irq(). IRQs requested with this function will be | ||
38 | * automatically freed on driver detach. | ||
39 | * | ||
40 | * If an IRQ allocated with this function needs to be freed | ||
41 | * separately, dev_free_irq() must be used. | ||
42 | */ | ||
43 | int devm_request_irq(struct device *dev, unsigned int irq, | ||
44 | irq_handler_t handler, unsigned long irqflags, | ||
45 | const char *devname, void *dev_id) | ||
46 | { | ||
47 | struct irq_devres *dr; | ||
48 | int rc; | ||
49 | |||
50 | dr = devres_alloc(devm_irq_release, sizeof(struct irq_devres), | ||
51 | GFP_KERNEL); | ||
52 | if (!dr) | ||
53 | return -ENOMEM; | ||
54 | |||
55 | rc = request_irq(irq, handler, irqflags, devname, dev_id); | ||
56 | if (rc) { | ||
57 | kfree(dr); | ||
58 | return rc; | ||
59 | } | ||
60 | |||
61 | dr->irq = irq; | ||
62 | dr->dev_id = dev_id; | ||
63 | devres_add(dev, dr); | ||
64 | |||
65 | return 0; | ||
66 | } | ||
67 | EXPORT_SYMBOL(devm_request_irq); | ||
68 | |||
69 | /** | ||
70 | * devm_free_irq - free an interrupt | ||
71 | * @dev: device to free interrupt for | ||
72 | * @irq: Interrupt line to free | ||
73 | * @dev_id: Device identity to free | ||
74 | * | ||
75 | * Except for the extra @dev argument, this function takes the | ||
76 | * same arguments and performs the same function as free_irq(). | ||
77 | * This function instead of free_irq() should be used to manually | ||
78 | * free IRQs allocated with dev_request_irq(). | ||
79 | */ | ||
80 | void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id) | ||
81 | { | ||
82 | struct irq_devres match_data = { irq, dev_id }; | ||
83 | |||
84 | free_irq(irq, dev_id); | ||
85 | WARN_ON(devres_destroy(dev, devm_irq_release, devm_irq_match, | ||
86 | &match_data)); | ||
87 | } | ||
88 | EXPORT_SYMBOL(devm_free_irq); | ||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index c4b7ed1cebf7..8b961adc3bd2 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -482,89 +482,3 @@ int request_irq(unsigned int irq, irq_handler_t handler, | |||
482 | return retval; | 482 | return retval; |
483 | } | 483 | } |
484 | EXPORT_SYMBOL(request_irq); | 484 | EXPORT_SYMBOL(request_irq); |
485 | |||
486 | /* | ||
487 | * Device resource management aware IRQ request/free implementation. | ||
488 | */ | ||
489 | struct irq_devres { | ||
490 | unsigned int irq; | ||
491 | void *dev_id; | ||
492 | }; | ||
493 | |||
494 | static void devm_irq_release(struct device *dev, void *res) | ||
495 | { | ||
496 | struct irq_devres *this = res; | ||
497 | |||
498 | free_irq(this->irq, this->dev_id); | ||
499 | } | ||
500 | |||
501 | static int devm_irq_match(struct device *dev, void *res, void *data) | ||
502 | { | ||
503 | struct irq_devres *this = res, *match = data; | ||
504 | |||
505 | return this->irq == match->irq && this->dev_id == match->dev_id; | ||
506 | } | ||
507 | |||
508 | /** | ||
509 | * devm_request_irq - allocate an interrupt line for a managed device | ||
510 | * @dev: device to request interrupt for | ||
511 | * @irq: Interrupt line to allocate | ||
512 | * @handler: Function to be called when the IRQ occurs | ||
513 | * @irqflags: Interrupt type flags | ||
514 | * @devname: An ascii name for the claiming device | ||
515 | * @dev_id: A cookie passed back to the handler function | ||
516 | * | ||
517 | * Except for the extra @dev argument, this function takes the | ||
518 | * same arguments and performs the same function as | ||
519 | * request_irq(). IRQs requested with this function will be | ||
520 | * automatically freed on driver detach. | ||
521 | * | ||
522 | * If an IRQ allocated with this function needs to be freed | ||
523 | * separately, dev_free_irq() must be used. | ||
524 | */ | ||
525 | int devm_request_irq(struct device *dev, unsigned int irq, | ||
526 | irq_handler_t handler, unsigned long irqflags, | ||
527 | const char *devname, void *dev_id) | ||
528 | { | ||
529 | struct irq_devres *dr; | ||
530 | int rc; | ||
531 | |||
532 | dr = devres_alloc(devm_irq_release, sizeof(struct irq_devres), | ||
533 | GFP_KERNEL); | ||
534 | if (!dr) | ||
535 | return -ENOMEM; | ||
536 | |||
537 | rc = request_irq(irq, handler, irqflags, devname, dev_id); | ||
538 | if (rc) { | ||
539 | kfree(dr); | ||
540 | return rc; | ||
541 | } | ||
542 | |||
543 | dr->irq = irq; | ||
544 | dr->dev_id = dev_id; | ||
545 | devres_add(dev, dr); | ||
546 | |||
547 | return 0; | ||
548 | } | ||
549 | EXPORT_SYMBOL(devm_request_irq); | ||
550 | |||
551 | /** | ||
552 | * devm_free_irq - free an interrupt | ||
553 | * @dev: device to free interrupt for | ||
554 | * @irq: Interrupt line to free | ||
555 | * @dev_id: Device identity to free | ||
556 | * | ||
557 | * Except for the extra @dev argument, this function takes the | ||
558 | * same arguments and performs the same function as free_irq(). | ||
559 | * This function instead of free_irq() should be used to manually | ||
560 | * free IRQs allocated with dev_request_irq(). | ||
561 | */ | ||
562 | void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id) | ||
563 | { | ||
564 | struct irq_devres match_data = { irq, dev_id }; | ||
565 | |||
566 | free_irq(irq, dev_id); | ||
567 | WARN_ON(devres_destroy(dev, devm_irq_release, devm_irq_match, | ||
568 | &match_data)); | ||
569 | } | ||
570 | EXPORT_SYMBOL(devm_free_irq); | ||
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 61f5c717a8f5..6d3be06e8ce6 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -136,7 +136,6 @@ void register_irq_proc(unsigned int irq) | |||
136 | entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir); | 136 | entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir); |
137 | 137 | ||
138 | if (entry) { | 138 | if (entry) { |
139 | entry->nlink = 1; | ||
140 | entry->data = (void *)(long)irq; | 139 | entry->data = (void *)(long)irq; |
141 | entry->read_proc = irq_affinity_read_proc; | 140 | entry->read_proc = irq_affinity_read_proc; |
142 | entry->write_proc = irq_affinity_write_proc; | 141 | entry->write_proc = irq_affinity_write_proc; |
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 5d1d907378a2..cee419143fd4 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
@@ -32,8 +32,8 @@ | |||
32 | * @gfp_mask: get_free_pages mask, passed to kmalloc() | 32 | * @gfp_mask: get_free_pages mask, passed to kmalloc() |
33 | * @lock: the lock to be used to protect the fifo buffer | 33 | * @lock: the lock to be used to protect the fifo buffer |
34 | * | 34 | * |
35 | * Do NOT pass the kfifo to kfifo_free() after use ! Simply free the | 35 | * Do NOT pass the kfifo to kfifo_free() after use! Simply free the |
36 | * struct kfifo with kfree(). | 36 | * &struct kfifo with kfree(). |
37 | */ | 37 | */ |
38 | struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, | 38 | struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, |
39 | gfp_t gfp_mask, spinlock_t *lock) | 39 | gfp_t gfp_mask, spinlock_t *lock) |
@@ -108,7 +108,7 @@ EXPORT_SYMBOL(kfifo_free); | |||
108 | * @buffer: the data to be added. | 108 | * @buffer: the data to be added. |
109 | * @len: the length of the data to be added. | 109 | * @len: the length of the data to be added. |
110 | * | 110 | * |
111 | * This function copies at most 'len' bytes from the 'buffer' into | 111 | * This function copies at most @len bytes from the @buffer into |
112 | * the FIFO depending on the free space, and returns the number of | 112 | * the FIFO depending on the free space, and returns the number of |
113 | * bytes copied. | 113 | * bytes copied. |
114 | * | 114 | * |
@@ -155,8 +155,8 @@ EXPORT_SYMBOL(__kfifo_put); | |||
155 | * @buffer: where the data must be copied. | 155 | * @buffer: where the data must be copied. |
156 | * @len: the size of the destination buffer. | 156 | * @len: the size of the destination buffer. |
157 | * | 157 | * |
158 | * This function copies at most 'len' bytes from the FIFO into the | 158 | * This function copies at most @len bytes from the FIFO into the |
159 | * 'buffer' and returns the number of copied bytes. | 159 | * @buffer and returns the number of copied bytes. |
160 | * | 160 | * |
161 | * Note that with only one concurrent reader and one concurrent | 161 | * Note that with only one concurrent reader and one concurrent |
162 | * writer, you don't need extra locking to use these functions. | 162 | * writer, you don't need extra locking to use these functions. |
diff --git a/kernel/kthread.c b/kernel/kthread.c index 1db8c72d0d38..87c50ccd1d4e 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -50,7 +50,7 @@ static struct kthread_stop_info kthread_stop_info; | |||
50 | /** | 50 | /** |
51 | * kthread_should_stop - should this kthread return now? | 51 | * kthread_should_stop - should this kthread return now? |
52 | * | 52 | * |
53 | * When someone calls kthread_stop on your kthread, it will be woken | 53 | * When someone calls kthread_stop() on your kthread, it will be woken |
54 | * and this will return true. You should then return, and your return | 54 | * and this will return true. You should then return, and your return |
55 | * value will be passed through to kthread_stop(). | 55 | * value will be passed through to kthread_stop(). |
56 | */ | 56 | */ |
@@ -143,7 +143,7 @@ static void keventd_create_kthread(struct work_struct *work) | |||
143 | * it. See also kthread_run(), kthread_create_on_cpu(). | 143 | * it. See also kthread_run(), kthread_create_on_cpu(). |
144 | * | 144 | * |
145 | * When woken, the thread will run @threadfn() with @data as its | 145 | * When woken, the thread will run @threadfn() with @data as its |
146 | * argument. @threadfn can either call do_exit() directly if it is a | 146 | * argument. @threadfn() can either call do_exit() directly if it is a |
147 | * standalone thread for which noone will call kthread_stop(), or | 147 | * standalone thread for which noone will call kthread_stop(), or |
148 | * return when 'kthread_should_stop()' is true (which means | 148 | * return when 'kthread_should_stop()' is true (which means |
149 | * kthread_stop() has been called). The return value should be zero | 149 | * kthread_stop() has been called). The return value should be zero |
@@ -192,7 +192,7 @@ EXPORT_SYMBOL(kthread_create); | |||
192 | * | 192 | * |
193 | * Description: This function is equivalent to set_cpus_allowed(), | 193 | * Description: This function is equivalent to set_cpus_allowed(), |
194 | * except that @cpu doesn't need to be online, and the thread must be | 194 | * except that @cpu doesn't need to be online, and the thread must be |
195 | * stopped (i.e., just returned from kthread_create(). | 195 | * stopped (i.e., just returned from kthread_create()). |
196 | */ | 196 | */ |
197 | void kthread_bind(struct task_struct *k, unsigned int cpu) | 197 | void kthread_bind(struct task_struct *k, unsigned int cpu) |
198 | { | 198 | { |
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 509efd49540f..592c576d77a7 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -70,6 +70,9 @@ static int graph_lock(void) | |||
70 | 70 | ||
71 | static inline int graph_unlock(void) | 71 | static inline int graph_unlock(void) |
72 | { | 72 | { |
73 | if (debug_locks && !__raw_spin_is_locked(&lockdep_lock)) | ||
74 | return DEBUG_LOCKS_WARN_ON(1); | ||
75 | |||
73 | __raw_spin_unlock(&lockdep_lock); | 76 | __raw_spin_unlock(&lockdep_lock); |
74 | return 0; | 77 | return 0; |
75 | } | 78 | } |
@@ -487,7 +490,7 @@ static void print_lock_dependencies(struct lock_class *class, int depth) | |||
487 | * Add a new dependency to the head of the list: | 490 | * Add a new dependency to the head of the list: |
488 | */ | 491 | */ |
489 | static int add_lock_to_list(struct lock_class *class, struct lock_class *this, | 492 | static int add_lock_to_list(struct lock_class *class, struct lock_class *this, |
490 | struct list_head *head, unsigned long ip) | 493 | struct list_head *head, unsigned long ip, int distance) |
491 | { | 494 | { |
492 | struct lock_list *entry; | 495 | struct lock_list *entry; |
493 | /* | 496 | /* |
@@ -499,6 +502,7 @@ static int add_lock_to_list(struct lock_class *class, struct lock_class *this, | |||
499 | return 0; | 502 | return 0; |
500 | 503 | ||
501 | entry->class = this; | 504 | entry->class = this; |
505 | entry->distance = distance; | ||
502 | if (!save_trace(&entry->trace)) | 506 | if (!save_trace(&entry->trace)) |
503 | return 0; | 507 | return 0; |
504 | 508 | ||
@@ -712,6 +716,9 @@ find_usage_backwards(struct lock_class *source, unsigned int depth) | |||
712 | struct lock_list *entry; | 716 | struct lock_list *entry; |
713 | int ret; | 717 | int ret; |
714 | 718 | ||
719 | if (!__raw_spin_is_locked(&lockdep_lock)) | ||
720 | return DEBUG_LOCKS_WARN_ON(1); | ||
721 | |||
715 | if (depth > max_recursion_depth) | 722 | if (depth > max_recursion_depth) |
716 | max_recursion_depth = depth; | 723 | max_recursion_depth = depth; |
717 | if (depth >= RECURSION_LIMIT) | 724 | if (depth >= RECURSION_LIMIT) |
@@ -900,7 +907,7 @@ check_deadlock(struct task_struct *curr, struct held_lock *next, | |||
900 | */ | 907 | */ |
901 | static int | 908 | static int |
902 | check_prev_add(struct task_struct *curr, struct held_lock *prev, | 909 | check_prev_add(struct task_struct *curr, struct held_lock *prev, |
903 | struct held_lock *next) | 910 | struct held_lock *next, int distance) |
904 | { | 911 | { |
905 | struct lock_list *entry; | 912 | struct lock_list *entry; |
906 | int ret; | 913 | int ret; |
@@ -978,8 +985,11 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, | |||
978 | * L2 added to its dependency list, due to the first chain.) | 985 | * L2 added to its dependency list, due to the first chain.) |
979 | */ | 986 | */ |
980 | list_for_each_entry(entry, &prev->class->locks_after, entry) { | 987 | list_for_each_entry(entry, &prev->class->locks_after, entry) { |
981 | if (entry->class == next->class) | 988 | if (entry->class == next->class) { |
989 | if (distance == 1) | ||
990 | entry->distance = 1; | ||
982 | return 2; | 991 | return 2; |
992 | } | ||
983 | } | 993 | } |
984 | 994 | ||
985 | /* | 995 | /* |
@@ -987,12 +997,13 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, | |||
987 | * to the previous lock's dependency list: | 997 | * to the previous lock's dependency list: |
988 | */ | 998 | */ |
989 | ret = add_lock_to_list(prev->class, next->class, | 999 | ret = add_lock_to_list(prev->class, next->class, |
990 | &prev->class->locks_after, next->acquire_ip); | 1000 | &prev->class->locks_after, next->acquire_ip, distance); |
1001 | |||
991 | if (!ret) | 1002 | if (!ret) |
992 | return 0; | 1003 | return 0; |
993 | 1004 | ||
994 | ret = add_lock_to_list(next->class, prev->class, | 1005 | ret = add_lock_to_list(next->class, prev->class, |
995 | &next->class->locks_before, next->acquire_ip); | 1006 | &next->class->locks_before, next->acquire_ip, distance); |
996 | if (!ret) | 1007 | if (!ret) |
997 | return 0; | 1008 | return 0; |
998 | 1009 | ||
@@ -1040,13 +1051,14 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next) | |||
1040 | goto out_bug; | 1051 | goto out_bug; |
1041 | 1052 | ||
1042 | for (;;) { | 1053 | for (;;) { |
1054 | int distance = curr->lockdep_depth - depth + 1; | ||
1043 | hlock = curr->held_locks + depth-1; | 1055 | hlock = curr->held_locks + depth-1; |
1044 | /* | 1056 | /* |
1045 | * Only non-recursive-read entries get new dependencies | 1057 | * Only non-recursive-read entries get new dependencies |
1046 | * added: | 1058 | * added: |
1047 | */ | 1059 | */ |
1048 | if (hlock->read != 2) { | 1060 | if (hlock->read != 2) { |
1049 | if (!check_prev_add(curr, hlock, next)) | 1061 | if (!check_prev_add(curr, hlock, next, distance)) |
1050 | return 0; | 1062 | return 0; |
1051 | /* | 1063 | /* |
1052 | * Stop after the first non-trylock entry, | 1064 | * Stop after the first non-trylock entry, |
@@ -1293,7 +1305,8 @@ out_unlock_set: | |||
1293 | if (!subclass || force) | 1305 | if (!subclass || force) |
1294 | lock->class_cache = class; | 1306 | lock->class_cache = class; |
1295 | 1307 | ||
1296 | DEBUG_LOCKS_WARN_ON(class->subclass != subclass); | 1308 | if (DEBUG_LOCKS_WARN_ON(class->subclass != subclass)) |
1309 | return NULL; | ||
1297 | 1310 | ||
1298 | return class; | 1311 | return class; |
1299 | } | 1312 | } |
@@ -1308,7 +1321,8 @@ static inline int lookup_chain_cache(u64 chain_key, struct lock_class *class) | |||
1308 | struct list_head *hash_head = chainhashentry(chain_key); | 1321 | struct list_head *hash_head = chainhashentry(chain_key); |
1309 | struct lock_chain *chain; | 1322 | struct lock_chain *chain; |
1310 | 1323 | ||
1311 | DEBUG_LOCKS_WARN_ON(!irqs_disabled()); | 1324 | if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) |
1325 | return 0; | ||
1312 | /* | 1326 | /* |
1313 | * We can walk it lock-free, because entries only get added | 1327 | * We can walk it lock-free, because entries only get added |
1314 | * to the hash: | 1328 | * to the hash: |
@@ -1394,7 +1408,9 @@ static void check_chain_key(struct task_struct *curr) | |||
1394 | return; | 1408 | return; |
1395 | } | 1409 | } |
1396 | id = hlock->class - lock_classes; | 1410 | id = hlock->class - lock_classes; |
1397 | DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS); | 1411 | if (DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS)) |
1412 | return; | ||
1413 | |||
1398 | if (prev_hlock && (prev_hlock->irq_context != | 1414 | if (prev_hlock && (prev_hlock->irq_context != |
1399 | hlock->irq_context)) | 1415 | hlock->irq_context)) |
1400 | chain_key = 0; | 1416 | chain_key = 0; |
@@ -2205,7 +2221,11 @@ out_calc_hash: | |||
2205 | if (!check_prevs_add(curr, hlock)) | 2221 | if (!check_prevs_add(curr, hlock)) |
2206 | return 0; | 2222 | return 0; |
2207 | graph_unlock(); | 2223 | graph_unlock(); |
2208 | } | 2224 | } else |
2225 | /* after lookup_chain_cache(): */ | ||
2226 | if (unlikely(!debug_locks)) | ||
2227 | return 0; | ||
2228 | |||
2209 | curr->lockdep_depth++; | 2229 | curr->lockdep_depth++; |
2210 | check_chain_key(curr); | 2230 | check_chain_key(curr); |
2211 | if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { | 2231 | if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { |
@@ -2214,6 +2234,7 @@ out_calc_hash: | |||
2214 | printk("turning off the locking correctness validator.\n"); | 2234 | printk("turning off the locking correctness validator.\n"); |
2215 | return 0; | 2235 | return 0; |
2216 | } | 2236 | } |
2237 | |||
2217 | if (unlikely(curr->lockdep_depth > max_lockdep_depth)) | 2238 | if (unlikely(curr->lockdep_depth > max_lockdep_depth)) |
2218 | max_lockdep_depth = curr->lockdep_depth; | 2239 | max_lockdep_depth = curr->lockdep_depth; |
2219 | 2240 | ||
@@ -2764,4 +2785,3 @@ void debug_show_held_locks(struct task_struct *task) | |||
2764 | } | 2785 | } |
2765 | 2786 | ||
2766 | EXPORT_SYMBOL_GPL(debug_show_held_locks); | 2787 | EXPORT_SYMBOL_GPL(debug_show_held_locks); |
2767 | |||
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c index b554b40a4aa6..88fc611b3ae9 100644 --- a/kernel/lockdep_proc.c +++ b/kernel/lockdep_proc.c | |||
@@ -77,12 +77,29 @@ static unsigned long count_backward_deps(struct lock_class *class) | |||
77 | return ret; | 77 | return ret; |
78 | } | 78 | } |
79 | 79 | ||
80 | static void print_name(struct seq_file *m, struct lock_class *class) | ||
81 | { | ||
82 | char str[128]; | ||
83 | const char *name = class->name; | ||
84 | |||
85 | if (!name) { | ||
86 | name = __get_key_name(class->key, str); | ||
87 | seq_printf(m, "%s", name); | ||
88 | } else{ | ||
89 | seq_printf(m, "%s", name); | ||
90 | if (class->name_version > 1) | ||
91 | seq_printf(m, "#%d", class->name_version); | ||
92 | if (class->subclass) | ||
93 | seq_printf(m, "/%d", class->subclass); | ||
94 | } | ||
95 | } | ||
96 | |||
80 | static int l_show(struct seq_file *m, void *v) | 97 | static int l_show(struct seq_file *m, void *v) |
81 | { | 98 | { |
82 | unsigned long nr_forward_deps, nr_backward_deps; | 99 | unsigned long nr_forward_deps, nr_backward_deps; |
83 | struct lock_class *class = m->private; | 100 | struct lock_class *class = m->private; |
84 | char str[128], c1, c2, c3, c4; | 101 | struct lock_list *entry; |
85 | const char *name; | 102 | char c1, c2, c3, c4; |
86 | 103 | ||
87 | seq_printf(m, "%p", class->key); | 104 | seq_printf(m, "%p", class->key); |
88 | #ifdef CONFIG_DEBUG_LOCKDEP | 105 | #ifdef CONFIG_DEBUG_LOCKDEP |
@@ -97,16 +114,16 @@ static int l_show(struct seq_file *m, void *v) | |||
97 | get_usage_chars(class, &c1, &c2, &c3, &c4); | 114 | get_usage_chars(class, &c1, &c2, &c3, &c4); |
98 | seq_printf(m, " %c%c%c%c", c1, c2, c3, c4); | 115 | seq_printf(m, " %c%c%c%c", c1, c2, c3, c4); |
99 | 116 | ||
100 | name = class->name; | 117 | seq_printf(m, ": "); |
101 | if (!name) { | 118 | print_name(m, class); |
102 | name = __get_key_name(class->key, str); | 119 | seq_puts(m, "\n"); |
103 | seq_printf(m, ": %s", name); | 120 | |
104 | } else{ | 121 | list_for_each_entry(entry, &class->locks_after, entry) { |
105 | seq_printf(m, ": %s", name); | 122 | if (entry->distance == 1) { |
106 | if (class->name_version > 1) | 123 | seq_printf(m, " -> [%p] ", entry->class); |
107 | seq_printf(m, "#%d", class->name_version); | 124 | print_name(m, entry->class); |
108 | if (class->subclass) | 125 | seq_puts(m, "\n"); |
109 | seq_printf(m, "/%d", class->subclass); | 126 | } |
110 | } | 127 | } |
111 | seq_puts(m, "\n"); | 128 | seq_puts(m, "\n"); |
112 | 129 | ||
@@ -227,7 +244,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v) | |||
227 | 244 | ||
228 | sum_forward_deps += count_forward_deps(class); | 245 | sum_forward_deps += count_forward_deps(class); |
229 | } | 246 | } |
230 | #ifdef CONFIG_LOCKDEP_DEBUG | 247 | #ifdef CONFIG_DEBUG_LOCKDEP |
231 | DEBUG_LOCKS_WARN_ON(debug_atomic_read(&nr_unused_locks) != nr_unused); | 248 | DEBUG_LOCKS_WARN_ON(debug_atomic_read(&nr_unused_locks) != nr_unused); |
232 | #endif | 249 | #endif |
233 | seq_printf(m, " lock-classes: %11lu [max: %lu]\n", | 250 | seq_printf(m, " lock-classes: %11lu [max: %lu]\n", |
diff --git a/kernel/panic.c b/kernel/panic.c index 525e365f7239..623d1828259a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -150,6 +150,7 @@ EXPORT_SYMBOL(panic); | |||
150 | * 'R' - User forced a module unload. | 150 | * 'R' - User forced a module unload. |
151 | * 'M' - Machine had a machine check experience. | 151 | * 'M' - Machine had a machine check experience. |
152 | * 'B' - System has hit bad_page. | 152 | * 'B' - System has hit bad_page. |
153 | * 'U' - Userspace-defined naughtiness. | ||
153 | * | 154 | * |
154 | * The string is overwritten by the next call to print_taint(). | 155 | * The string is overwritten by the next call to print_taint(). |
155 | */ | 156 | */ |
@@ -158,13 +159,14 @@ const char *print_tainted(void) | |||
158 | { | 159 | { |
159 | static char buf[20]; | 160 | static char buf[20]; |
160 | if (tainted) { | 161 | if (tainted) { |
161 | snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c", | 162 | snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c", |
162 | tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G', | 163 | tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G', |
163 | tainted & TAINT_FORCED_MODULE ? 'F' : ' ', | 164 | tainted & TAINT_FORCED_MODULE ? 'F' : ' ', |
164 | tainted & TAINT_UNSAFE_SMP ? 'S' : ' ', | 165 | tainted & TAINT_UNSAFE_SMP ? 'S' : ' ', |
165 | tainted & TAINT_FORCED_RMMOD ? 'R' : ' ', | 166 | tainted & TAINT_FORCED_RMMOD ? 'R' : ' ', |
166 | tainted & TAINT_MACHINE_CHECK ? 'M' : ' ', | 167 | tainted & TAINT_MACHINE_CHECK ? 'M' : ' ', |
167 | tainted & TAINT_BAD_PAGE ? 'B' : ' '); | 168 | tainted & TAINT_BAD_PAGE ? 'B' : ' ', |
169 | tainted & TAINT_USER ? 'U' : ' '); | ||
168 | } | 170 | } |
169 | else | 171 | else |
170 | snprintf(buf, sizeof(buf), "Not tainted"); | 172 | snprintf(buf, sizeof(buf), "Not tainted"); |
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 5fe87de10ff0..a1bf61617839 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -399,10 +399,9 @@ EXPORT_SYMBOL_GPL(register_posix_clock); | |||
399 | static struct k_itimer * alloc_posix_timer(void) | 399 | static struct k_itimer * alloc_posix_timer(void) |
400 | { | 400 | { |
401 | struct k_itimer *tmr; | 401 | struct k_itimer *tmr; |
402 | tmr = kmem_cache_alloc(posix_timers_cache, GFP_KERNEL); | 402 | tmr = kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL); |
403 | if (!tmr) | 403 | if (!tmr) |
404 | return tmr; | 404 | return tmr; |
405 | memset(tmr, 0, sizeof (struct k_itimer)); | ||
406 | if (unlikely(!(tmr->sigq = sigqueue_alloc()))) { | 405 | if (unlikely(!(tmr->sigq = sigqueue_alloc()))) { |
407 | kmem_cache_free(posix_timers_cache, tmr); | 406 | kmem_cache_free(posix_timers_cache, tmr); |
408 | tmr = NULL; | 407 | tmr = NULL; |
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 88fc5d7ac737..406b20adb27a 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -87,52 +87,24 @@ static inline void platform_finish(void) | |||
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | static void unprepare_processes(void) | ||
91 | { | ||
92 | thaw_processes(); | ||
93 | pm_restore_console(); | ||
94 | } | ||
95 | |||
90 | static int prepare_processes(void) | 96 | static int prepare_processes(void) |
91 | { | 97 | { |
92 | int error = 0; | 98 | int error = 0; |
93 | 99 | ||
94 | pm_prepare_console(); | 100 | pm_prepare_console(); |
95 | |||
96 | error = disable_nonboot_cpus(); | ||
97 | if (error) | ||
98 | goto enable_cpus; | ||
99 | |||
100 | if (freeze_processes()) { | 101 | if (freeze_processes()) { |
101 | error = -EBUSY; | 102 | error = -EBUSY; |
102 | goto thaw; | 103 | unprepare_processes(); |
103 | } | 104 | } |
104 | |||
105 | if (pm_disk_mode == PM_DISK_TESTPROC) { | ||
106 | printk("swsusp debug: Waiting for 5 seconds.\n"); | ||
107 | mdelay(5000); | ||
108 | goto thaw; | ||
109 | } | ||
110 | |||
111 | error = platform_prepare(); | ||
112 | if (error) | ||
113 | goto thaw; | ||
114 | |||
115 | /* Free memory before shutting down devices. */ | ||
116 | if (!(error = swsusp_shrink_memory())) | ||
117 | return 0; | ||
118 | |||
119 | platform_finish(); | ||
120 | thaw: | ||
121 | thaw_processes(); | ||
122 | enable_cpus: | ||
123 | enable_nonboot_cpus(); | ||
124 | pm_restore_console(); | ||
125 | return error; | 105 | return error; |
126 | } | 106 | } |
127 | 107 | ||
128 | static void unprepare_processes(void) | ||
129 | { | ||
130 | platform_finish(); | ||
131 | thaw_processes(); | ||
132 | enable_nonboot_cpus(); | ||
133 | pm_restore_console(); | ||
134 | } | ||
135 | |||
136 | /** | 108 | /** |
137 | * pm_suspend_disk - The granpappy of hibernation power management. | 109 | * pm_suspend_disk - The granpappy of hibernation power management. |
138 | * | 110 | * |
@@ -150,29 +122,45 @@ int pm_suspend_disk(void) | |||
150 | if (error) | 122 | if (error) |
151 | return error; | 123 | return error; |
152 | 124 | ||
153 | if (pm_disk_mode == PM_DISK_TESTPROC) | 125 | if (pm_disk_mode == PM_DISK_TESTPROC) { |
154 | return 0; | 126 | printk("swsusp debug: Waiting for 5 seconds.\n"); |
127 | mdelay(5000); | ||
128 | goto Thaw; | ||
129 | } | ||
130 | /* Free memory before shutting down devices. */ | ||
131 | error = swsusp_shrink_memory(); | ||
132 | if (error) | ||
133 | goto Thaw; | ||
134 | |||
135 | error = platform_prepare(); | ||
136 | if (error) | ||
137 | goto Thaw; | ||
155 | 138 | ||
156 | suspend_console(); | 139 | suspend_console(); |
157 | error = device_suspend(PMSG_FREEZE); | 140 | error = device_suspend(PMSG_FREEZE); |
158 | if (error) { | 141 | if (error) { |
159 | resume_console(); | 142 | printk(KERN_ERR "PM: Some devices failed to suspend\n"); |
160 | printk("Some devices failed to suspend\n"); | 143 | goto Resume_devices; |
161 | goto Thaw; | ||
162 | } | 144 | } |
145 | error = disable_nonboot_cpus(); | ||
146 | if (error) | ||
147 | goto Enable_cpus; | ||
163 | 148 | ||
164 | if (pm_disk_mode == PM_DISK_TEST) { | 149 | if (pm_disk_mode == PM_DISK_TEST) { |
165 | printk("swsusp debug: Waiting for 5 seconds.\n"); | 150 | printk("swsusp debug: Waiting for 5 seconds.\n"); |
166 | mdelay(5000); | 151 | mdelay(5000); |
167 | goto Done; | 152 | goto Enable_cpus; |
168 | } | 153 | } |
169 | 154 | ||
170 | pr_debug("PM: snapshotting memory.\n"); | 155 | pr_debug("PM: snapshotting memory.\n"); |
171 | in_suspend = 1; | 156 | in_suspend = 1; |
172 | if ((error = swsusp_suspend())) | 157 | error = swsusp_suspend(); |
173 | goto Done; | 158 | if (error) |
159 | goto Enable_cpus; | ||
174 | 160 | ||
175 | if (in_suspend) { | 161 | if (in_suspend) { |
162 | enable_nonboot_cpus(); | ||
163 | platform_finish(); | ||
176 | device_resume(); | 164 | device_resume(); |
177 | resume_console(); | 165 | resume_console(); |
178 | pr_debug("PM: writing image.\n"); | 166 | pr_debug("PM: writing image.\n"); |
@@ -188,7 +176,10 @@ int pm_suspend_disk(void) | |||
188 | } | 176 | } |
189 | 177 | ||
190 | swsusp_free(); | 178 | swsusp_free(); |
191 | Done: | 179 | Enable_cpus: |
180 | enable_nonboot_cpus(); | ||
181 | Resume_devices: | ||
182 | platform_finish(); | ||
192 | device_resume(); | 183 | device_resume(); |
193 | resume_console(); | 184 | resume_console(); |
194 | Thaw: | 185 | Thaw: |
@@ -237,19 +228,28 @@ static int software_resume(void) | |||
237 | 228 | ||
238 | pr_debug("PM: Checking swsusp image.\n"); | 229 | pr_debug("PM: Checking swsusp image.\n"); |
239 | 230 | ||
240 | if ((error = swsusp_check())) | 231 | error = swsusp_check(); |
232 | if (error) | ||
241 | goto Done; | 233 | goto Done; |
242 | 234 | ||
243 | pr_debug("PM: Preparing processes for restore.\n"); | 235 | pr_debug("PM: Preparing processes for restore.\n"); |
244 | 236 | ||
245 | if ((error = prepare_processes())) { | 237 | error = prepare_processes(); |
238 | if (error) { | ||
246 | swsusp_close(); | 239 | swsusp_close(); |
247 | goto Done; | 240 | goto Done; |
248 | } | 241 | } |
249 | 242 | ||
243 | error = platform_prepare(); | ||
244 | if (error) { | ||
245 | swsusp_free(); | ||
246 | goto Thaw; | ||
247 | } | ||
248 | |||
250 | pr_debug("PM: Reading swsusp image.\n"); | 249 | pr_debug("PM: Reading swsusp image.\n"); |
251 | 250 | ||
252 | if ((error = swsusp_read())) { | 251 | error = swsusp_read(); |
252 | if (error) { | ||
253 | swsusp_free(); | 253 | swsusp_free(); |
254 | goto Thaw; | 254 | goto Thaw; |
255 | } | 255 | } |
@@ -257,21 +257,22 @@ static int software_resume(void) | |||
257 | pr_debug("PM: Preparing devices for restore.\n"); | 257 | pr_debug("PM: Preparing devices for restore.\n"); |
258 | 258 | ||
259 | suspend_console(); | 259 | suspend_console(); |
260 | if ((error = device_suspend(PMSG_PRETHAW))) { | 260 | error = device_suspend(PMSG_PRETHAW); |
261 | resume_console(); | 261 | if (error) |
262 | printk("Some devices failed to suspend\n"); | 262 | goto Free; |
263 | swsusp_free(); | ||
264 | goto Thaw; | ||
265 | } | ||
266 | 263 | ||
267 | mb(); | 264 | error = disable_nonboot_cpus(); |
265 | if (!error) | ||
266 | swsusp_resume(); | ||
268 | 267 | ||
269 | pr_debug("PM: Restoring saved image.\n"); | 268 | enable_nonboot_cpus(); |
270 | swsusp_resume(); | 269 | Free: |
271 | pr_debug("PM: Restore failed, recovering.n"); | 270 | swsusp_free(); |
271 | platform_finish(); | ||
272 | device_resume(); | 272 | device_resume(); |
273 | resume_console(); | 273 | resume_console(); |
274 | Thaw: | 274 | Thaw: |
275 | printk(KERN_ERR "PM: Restore failed, recovering.\n"); | ||
275 | unprepare_processes(); | 276 | unprepare_processes(); |
276 | Done: | 277 | Done: |
277 | /* For success case, the suspend path will release the lock */ | 278 | /* For success case, the suspend path will release the lock */ |
diff --git a/kernel/power/main.c b/kernel/power/main.c index ff3a6182f5f0..e1c413120469 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
21 | #include <linux/resume-trace.h> | 21 | #include <linux/resume-trace.h> |
22 | #include <linux/freezer.h> | 22 | #include <linux/freezer.h> |
23 | #include <linux/vmstat.h> | ||
23 | 24 | ||
24 | #include "power.h" | 25 | #include "power.h" |
25 | 26 | ||
@@ -43,6 +44,11 @@ void pm_set_ops(struct pm_ops * ops) | |||
43 | mutex_unlock(&pm_mutex); | 44 | mutex_unlock(&pm_mutex); |
44 | } | 45 | } |
45 | 46 | ||
47 | static inline void pm_finish(suspend_state_t state) | ||
48 | { | ||
49 | if (pm_ops->finish) | ||
50 | pm_ops->finish(state); | ||
51 | } | ||
46 | 52 | ||
47 | /** | 53 | /** |
48 | * suspend_prepare - Do prep work before entering low-power state. | 54 | * suspend_prepare - Do prep work before entering low-power state. |
@@ -63,16 +69,13 @@ static int suspend_prepare(suspend_state_t state) | |||
63 | 69 | ||
64 | pm_prepare_console(); | 70 | pm_prepare_console(); |
65 | 71 | ||
66 | error = disable_nonboot_cpus(); | ||
67 | if (error) | ||
68 | goto Enable_cpu; | ||
69 | |||
70 | if (freeze_processes()) { | 72 | if (freeze_processes()) { |
71 | error = -EAGAIN; | 73 | error = -EAGAIN; |
72 | goto Thaw; | 74 | goto Thaw; |
73 | } | 75 | } |
74 | 76 | ||
75 | if ((free_pages = nr_free_pages()) < FREE_PAGE_NUMBER) { | 77 | if ((free_pages = global_page_state(NR_FREE_PAGES)) |
78 | < FREE_PAGE_NUMBER) { | ||
76 | pr_debug("PM: free some memory\n"); | 79 | pr_debug("PM: free some memory\n"); |
77 | shrink_all_memory(FREE_PAGE_NUMBER - free_pages); | 80 | shrink_all_memory(FREE_PAGE_NUMBER - free_pages); |
78 | if (nr_free_pages() < FREE_PAGE_NUMBER) { | 81 | if (nr_free_pages() < FREE_PAGE_NUMBER) { |
@@ -88,18 +91,22 @@ static int suspend_prepare(suspend_state_t state) | |||
88 | } | 91 | } |
89 | 92 | ||
90 | suspend_console(); | 93 | suspend_console(); |
91 | if ((error = device_suspend(PMSG_SUSPEND))) { | 94 | error = device_suspend(PMSG_SUSPEND); |
95 | if (error) { | ||
92 | printk(KERN_ERR "Some devices failed to suspend\n"); | 96 | printk(KERN_ERR "Some devices failed to suspend\n"); |
93 | goto Finish; | 97 | goto Resume_devices; |
94 | } | 98 | } |
95 | return 0; | 99 | error = disable_nonboot_cpus(); |
96 | Finish: | 100 | if (!error) |
97 | if (pm_ops->finish) | 101 | return 0; |
98 | pm_ops->finish(state); | 102 | |
103 | enable_nonboot_cpus(); | ||
104 | Resume_devices: | ||
105 | pm_finish(state); | ||
106 | device_resume(); | ||
107 | resume_console(); | ||
99 | Thaw: | 108 | Thaw: |
100 | thaw_processes(); | 109 | thaw_processes(); |
101 | Enable_cpu: | ||
102 | enable_nonboot_cpus(); | ||
103 | pm_restore_console(); | 110 | pm_restore_console(); |
104 | return error; | 111 | return error; |
105 | } | 112 | } |
@@ -134,12 +141,11 @@ int suspend_enter(suspend_state_t state) | |||
134 | 141 | ||
135 | static void suspend_finish(suspend_state_t state) | 142 | static void suspend_finish(suspend_state_t state) |
136 | { | 143 | { |
144 | enable_nonboot_cpus(); | ||
145 | pm_finish(state); | ||
137 | device_resume(); | 146 | device_resume(); |
138 | resume_console(); | 147 | resume_console(); |
139 | thaw_processes(); | 148 | thaw_processes(); |
140 | enable_nonboot_cpus(); | ||
141 | if (pm_ops && pm_ops->finish) | ||
142 | pm_ops->finish(state); | ||
143 | pm_restore_console(); | 149 | pm_restore_console(); |
144 | } | 150 | } |
145 | 151 | ||
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index c024606221c4..fc53ad068128 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -591,7 +591,7 @@ static unsigned int count_free_highmem_pages(void) | |||
591 | 591 | ||
592 | for_each_zone(zone) | 592 | for_each_zone(zone) |
593 | if (populated_zone(zone) && is_highmem(zone)) | 593 | if (populated_zone(zone) && is_highmem(zone)) |
594 | cnt += zone->free_pages; | 594 | cnt += zone_page_state(zone, NR_FREE_PAGES); |
595 | 595 | ||
596 | return cnt; | 596 | return cnt; |
597 | } | 597 | } |
@@ -869,7 +869,7 @@ static int enough_free_mem(unsigned int nr_pages, unsigned int nr_highmem) | |||
869 | for_each_zone(zone) { | 869 | for_each_zone(zone) { |
870 | meta += snapshot_additional_pages(zone); | 870 | meta += snapshot_additional_pages(zone); |
871 | if (!is_highmem(zone)) | 871 | if (!is_highmem(zone)) |
872 | free += zone->free_pages; | 872 | free += zone_page_state(zone, NR_FREE_PAGES); |
873 | } | 873 | } |
874 | 874 | ||
875 | nr_pages += count_pages_for_highmem(nr_highmem); | 875 | nr_pages += count_pages_for_highmem(nr_highmem); |
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 31aa0390c777..7fb834397a0d 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -230,9 +230,10 @@ int swsusp_shrink_memory(void) | |||
230 | for_each_zone (zone) | 230 | for_each_zone (zone) |
231 | if (populated_zone(zone)) { | 231 | if (populated_zone(zone)) { |
232 | if (is_highmem(zone)) { | 232 | if (is_highmem(zone)) { |
233 | highmem_size -= zone->free_pages; | 233 | highmem_size -= |
234 | zone_page_state(zone, NR_FREE_PAGES); | ||
234 | } else { | 235 | } else { |
235 | tmp -= zone->free_pages; | 236 | tmp -= zone_page_state(zone, NR_FREE_PAGES); |
236 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; | 237 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; |
237 | tmp += snapshot_additional_pages(zone); | 238 | tmp += snapshot_additional_pages(zone); |
238 | } | 239 | } |
diff --git a/kernel/power/user.c b/kernel/power/user.c index f7b7a785a5c6..dd09efe7df54 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -37,6 +37,7 @@ static struct snapshot_data { | |||
37 | int mode; | 37 | int mode; |
38 | char frozen; | 38 | char frozen; |
39 | char ready; | 39 | char ready; |
40 | char platform_suspend; | ||
40 | } snapshot_state; | 41 | } snapshot_state; |
41 | 42 | ||
42 | static atomic_t device_available = ATOMIC_INIT(1); | 43 | static atomic_t device_available = ATOMIC_INIT(1); |
@@ -66,6 +67,7 @@ static int snapshot_open(struct inode *inode, struct file *filp) | |||
66 | data->bitmap = NULL; | 67 | data->bitmap = NULL; |
67 | data->frozen = 0; | 68 | data->frozen = 0; |
68 | data->ready = 0; | 69 | data->ready = 0; |
70 | data->platform_suspend = 0; | ||
69 | 71 | ||
70 | return 0; | 72 | return 0; |
71 | } | 73 | } |
@@ -122,6 +124,92 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf, | |||
122 | return res; | 124 | return res; |
123 | } | 125 | } |
124 | 126 | ||
127 | static inline int platform_prepare(void) | ||
128 | { | ||
129 | int error = 0; | ||
130 | |||
131 | if (pm_ops && pm_ops->prepare) | ||
132 | error = pm_ops->prepare(PM_SUSPEND_DISK); | ||
133 | |||
134 | return error; | ||
135 | } | ||
136 | |||
137 | static inline void platform_finish(void) | ||
138 | { | ||
139 | if (pm_ops && pm_ops->finish) | ||
140 | pm_ops->finish(PM_SUSPEND_DISK); | ||
141 | } | ||
142 | |||
143 | static inline int snapshot_suspend(int platform_suspend) | ||
144 | { | ||
145 | int error; | ||
146 | |||
147 | mutex_lock(&pm_mutex); | ||
148 | /* Free memory before shutting down devices. */ | ||
149 | error = swsusp_shrink_memory(); | ||
150 | if (error) | ||
151 | goto Finish; | ||
152 | |||
153 | if (platform_suspend) { | ||
154 | error = platform_prepare(); | ||
155 | if (error) | ||
156 | goto Finish; | ||
157 | } | ||
158 | suspend_console(); | ||
159 | error = device_suspend(PMSG_FREEZE); | ||
160 | if (error) | ||
161 | goto Resume_devices; | ||
162 | |||
163 | error = disable_nonboot_cpus(); | ||
164 | if (!error) { | ||
165 | in_suspend = 1; | ||
166 | error = swsusp_suspend(); | ||
167 | } | ||
168 | enable_nonboot_cpus(); | ||
169 | Resume_devices: | ||
170 | if (platform_suspend) | ||
171 | platform_finish(); | ||
172 | |||
173 | device_resume(); | ||
174 | resume_console(); | ||
175 | Finish: | ||
176 | mutex_unlock(&pm_mutex); | ||
177 | return error; | ||
178 | } | ||
179 | |||
180 | static inline int snapshot_restore(int platform_suspend) | ||
181 | { | ||
182 | int error; | ||
183 | |||
184 | mutex_lock(&pm_mutex); | ||
185 | pm_prepare_console(); | ||
186 | if (platform_suspend) { | ||
187 | error = platform_prepare(); | ||
188 | if (error) | ||
189 | goto Finish; | ||
190 | } | ||
191 | suspend_console(); | ||
192 | error = device_suspend(PMSG_PRETHAW); | ||
193 | if (error) | ||
194 | goto Resume_devices; | ||
195 | |||
196 | error = disable_nonboot_cpus(); | ||
197 | if (!error) | ||
198 | error = swsusp_resume(); | ||
199 | |||
200 | enable_nonboot_cpus(); | ||
201 | Resume_devices: | ||
202 | if (platform_suspend) | ||
203 | platform_finish(); | ||
204 | |||
205 | device_resume(); | ||
206 | resume_console(); | ||
207 | Finish: | ||
208 | pm_restore_console(); | ||
209 | mutex_unlock(&pm_mutex); | ||
210 | return error; | ||
211 | } | ||
212 | |||
125 | static int snapshot_ioctl(struct inode *inode, struct file *filp, | 213 | static int snapshot_ioctl(struct inode *inode, struct file *filp, |
126 | unsigned int cmd, unsigned long arg) | 214 | unsigned int cmd, unsigned long arg) |
127 | { | 215 | { |
@@ -145,14 +233,9 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
145 | if (data->frozen) | 233 | if (data->frozen) |
146 | break; | 234 | break; |
147 | mutex_lock(&pm_mutex); | 235 | mutex_lock(&pm_mutex); |
148 | error = disable_nonboot_cpus(); | 236 | if (freeze_processes()) { |
149 | if (!error) { | 237 | thaw_processes(); |
150 | error = freeze_processes(); | 238 | error = -EBUSY; |
151 | if (error) { | ||
152 | thaw_processes(); | ||
153 | enable_nonboot_cpus(); | ||
154 | error = -EBUSY; | ||
155 | } | ||
156 | } | 239 | } |
157 | mutex_unlock(&pm_mutex); | 240 | mutex_unlock(&pm_mutex); |
158 | if (!error) | 241 | if (!error) |
@@ -164,7 +247,6 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
164 | break; | 247 | break; |
165 | mutex_lock(&pm_mutex); | 248 | mutex_lock(&pm_mutex); |
166 | thaw_processes(); | 249 | thaw_processes(); |
167 | enable_nonboot_cpus(); | ||
168 | mutex_unlock(&pm_mutex); | 250 | mutex_unlock(&pm_mutex); |
169 | data->frozen = 0; | 251 | data->frozen = 0; |
170 | break; | 252 | break; |
@@ -174,20 +256,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
174 | error = -EPERM; | 256 | error = -EPERM; |
175 | break; | 257 | break; |
176 | } | 258 | } |
177 | mutex_lock(&pm_mutex); | 259 | error = snapshot_suspend(data->platform_suspend); |
178 | /* Free memory before shutting down devices. */ | ||
179 | error = swsusp_shrink_memory(); | ||
180 | if (!error) { | ||
181 | suspend_console(); | ||
182 | error = device_suspend(PMSG_FREEZE); | ||
183 | if (!error) { | ||
184 | in_suspend = 1; | ||
185 | error = swsusp_suspend(); | ||
186 | device_resume(); | ||
187 | } | ||
188 | resume_console(); | ||
189 | } | ||
190 | mutex_unlock(&pm_mutex); | ||
191 | if (!error) | 260 | if (!error) |
192 | error = put_user(in_suspend, (unsigned int __user *)arg); | 261 | error = put_user(in_suspend, (unsigned int __user *)arg); |
193 | if (!error) | 262 | if (!error) |
@@ -201,17 +270,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
201 | error = -EPERM; | 270 | error = -EPERM; |
202 | break; | 271 | break; |
203 | } | 272 | } |
204 | mutex_lock(&pm_mutex); | 273 | error = snapshot_restore(data->platform_suspend); |
205 | pm_prepare_console(); | ||
206 | suspend_console(); | ||
207 | error = device_suspend(PMSG_PRETHAW); | ||
208 | if (!error) { | ||
209 | error = swsusp_resume(); | ||
210 | device_resume(); | ||
211 | } | ||
212 | resume_console(); | ||
213 | pm_restore_console(); | ||
214 | mutex_unlock(&pm_mutex); | ||
215 | break; | 274 | break; |
216 | 275 | ||
217 | case SNAPSHOT_FREE: | 276 | case SNAPSHOT_FREE: |
@@ -282,6 +341,11 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
282 | break; | 341 | break; |
283 | 342 | ||
284 | case SNAPSHOT_S2RAM: | 343 | case SNAPSHOT_S2RAM: |
344 | if (!pm_ops) { | ||
345 | error = -ENOSYS; | ||
346 | break; | ||
347 | } | ||
348 | |||
285 | if (!data->frozen) { | 349 | if (!data->frozen) { |
286 | error = -EPERM; | 350 | error = -EPERM; |
287 | break; | 351 | break; |
@@ -319,28 +383,35 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, | |||
319 | break; | 383 | break; |
320 | 384 | ||
321 | case SNAPSHOT_PMOPS: | 385 | case SNAPSHOT_PMOPS: |
386 | error = -EINVAL; | ||
387 | |||
322 | switch (arg) { | 388 | switch (arg) { |
323 | 389 | ||
324 | case PMOPS_PREPARE: | 390 | case PMOPS_PREPARE: |
325 | if (pm_ops->prepare) { | 391 | if (pm_ops && pm_ops->enter) { |
326 | error = pm_ops->prepare(PM_SUSPEND_DISK); | 392 | data->platform_suspend = 1; |
393 | error = 0; | ||
394 | } else { | ||
395 | error = -ENOSYS; | ||
327 | } | 396 | } |
328 | break; | 397 | break; |
329 | 398 | ||
330 | case PMOPS_ENTER: | 399 | case PMOPS_ENTER: |
331 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); | 400 | if (data->platform_suspend) { |
332 | error = pm_ops->enter(PM_SUSPEND_DISK); | 401 | kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK); |
402 | error = pm_ops->enter(PM_SUSPEND_DISK); | ||
403 | error = 0; | ||
404 | } | ||
333 | break; | 405 | break; |
334 | 406 | ||
335 | case PMOPS_FINISH: | 407 | case PMOPS_FINISH: |
336 | if (pm_ops && pm_ops->finish) { | 408 | if (data->platform_suspend) |
337 | pm_ops->finish(PM_SUSPEND_DISK); | 409 | error = 0; |
338 | } | 410 | |
339 | break; | 411 | break; |
340 | 412 | ||
341 | default: | 413 | default: |
342 | printk(KERN_ERR "SNAPSHOT_PMOPS: invalid argument %ld\n", arg); | 414 | printk(KERN_ERR "SNAPSHOT_PMOPS: invalid argument %ld\n", arg); |
343 | error = -EINVAL; | ||
344 | 415 | ||
345 | } | 416 | } |
346 | break; | 417 | break; |
diff --git a/kernel/printk.c b/kernel/printk.c index c770e1a4e882..0c151877ff71 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -483,7 +483,7 @@ static int have_callable_console(void) | |||
483 | * printk - print a kernel message | 483 | * printk - print a kernel message |
484 | * @fmt: format string | 484 | * @fmt: format string |
485 | * | 485 | * |
486 | * This is printk. It can be called from any context. We want it to work. | 486 | * This is printk(). It can be called from any context. We want it to work. |
487 | * | 487 | * |
488 | * We try to grab the console_sem. If we succeed, it's easy - we log the output and | 488 | * We try to grab the console_sem. If we succeed, it's easy - we log the output and |
489 | * call the console drivers. If we fail to get the semaphore we place the output | 489 | * call the console drivers. If we fail to get the semaphore we place the output |
@@ -529,7 +529,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
529 | zap_locks(); | 529 | zap_locks(); |
530 | 530 | ||
531 | /* This stops the holder of console_sem just where we want him */ | 531 | /* This stops the holder of console_sem just where we want him */ |
532 | local_irq_save(flags); | 532 | raw_local_irq_save(flags); |
533 | lockdep_off(); | 533 | lockdep_off(); |
534 | spin_lock(&logbuf_lock); | 534 | spin_lock(&logbuf_lock); |
535 | printk_cpu = smp_processor_id(); | 535 | printk_cpu = smp_processor_id(); |
@@ -618,7 +618,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
618 | up(&console_sem); | 618 | up(&console_sem); |
619 | } | 619 | } |
620 | lockdep_on(); | 620 | lockdep_on(); |
621 | local_irq_restore(flags); | 621 | raw_local_irq_restore(flags); |
622 | } else { | 622 | } else { |
623 | /* | 623 | /* |
624 | * Someone else owns the drivers. We drop the spinlock, which | 624 | * Someone else owns the drivers. We drop the spinlock, which |
@@ -628,7 +628,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
628 | printk_cpu = UINT_MAX; | 628 | printk_cpu = UINT_MAX; |
629 | spin_unlock(&logbuf_lock); | 629 | spin_unlock(&logbuf_lock); |
630 | lockdep_on(); | 630 | lockdep_on(); |
631 | local_irq_restore(flags); | 631 | raw_local_irq_restore(flags); |
632 | } | 632 | } |
633 | 633 | ||
634 | preempt_enable(); | 634 | preempt_enable(); |
@@ -783,6 +783,12 @@ int is_console_locked(void) | |||
783 | return console_locked; | 783 | return console_locked; |
784 | } | 784 | } |
785 | 785 | ||
786 | void wake_up_klogd(void) | ||
787 | { | ||
788 | if (!oops_in_progress && waitqueue_active(&log_wait)) | ||
789 | wake_up_interruptible(&log_wait); | ||
790 | } | ||
791 | |||
786 | /** | 792 | /** |
787 | * release_console_sem - unlock the console system | 793 | * release_console_sem - unlock the console system |
788 | * | 794 | * |
@@ -825,8 +831,8 @@ void release_console_sem(void) | |||
825 | console_locked = 0; | 831 | console_locked = 0; |
826 | up(&console_sem); | 832 | up(&console_sem); |
827 | spin_unlock_irqrestore(&logbuf_lock, flags); | 833 | spin_unlock_irqrestore(&logbuf_lock, flags); |
828 | if (wake_klogd && !oops_in_progress && waitqueue_active(&log_wait)) | 834 | if (wake_klogd) |
829 | wake_up_interruptible(&log_wait); | 835 | wake_up_klogd(); |
830 | } | 836 | } |
831 | EXPORT_SYMBOL(release_console_sem); | 837 | EXPORT_SYMBOL(release_console_sem); |
832 | 838 | ||
diff --git a/kernel/profile.c b/kernel/profile.c index d6579d511069..9bfadb248dd8 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -449,7 +449,6 @@ void create_prof_cpu_mask(struct proc_dir_entry *root_irq_dir) | |||
449 | /* create /proc/irq/prof_cpu_mask */ | 449 | /* create /proc/irq/prof_cpu_mask */ |
450 | if (!(entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir))) | 450 | if (!(entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir))) |
451 | return; | 451 | return; |
452 | entry->nlink = 1; | ||
453 | entry->data = (void *)&prof_cpu_mask; | 452 | entry->data = (void *)&prof_cpu_mask; |
454 | entry->read_proc = prof_cpu_mask_read_proc; | 453 | entry->read_proc = prof_cpu_mask_read_proc; |
455 | entry->write_proc = prof_cpu_mask_write_proc; | 454 | entry->write_proc = prof_cpu_mask_write_proc; |
diff --git a/kernel/relay.c b/kernel/relay.c index 284e2e8b4eed..ef8a935710a2 100644 --- a/kernel/relay.c +++ b/kernel/relay.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * Copyright (C) 1999-2005 - Karim Yaghmour (karim@opersys.com) | 7 | * Copyright (C) 1999-2005 - Karim Yaghmour (karim@opersys.com) |
8 | * | 8 | * |
9 | * Moved to kernel/relay.c by Paul Mundt, 2006. | 9 | * Moved to kernel/relay.c by Paul Mundt, 2006. |
10 | * November 2006 - CPU hotplug support by Mathieu Desnoyers | ||
11 | * (mathieu.desnoyers@polymtl.ca) | ||
10 | * | 12 | * |
11 | * This file is released under the GPL. | 13 | * This file is released under the GPL. |
12 | */ | 14 | */ |
@@ -18,6 +20,11 @@ | |||
18 | #include <linux/relay.h> | 20 | #include <linux/relay.h> |
19 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
20 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/cpu.h> | ||
24 | |||
25 | /* list of open channels, for cpu hotplug */ | ||
26 | static DEFINE_MUTEX(relay_channels_mutex); | ||
27 | static LIST_HEAD(relay_channels); | ||
21 | 28 | ||
22 | /* | 29 | /* |
23 | * close() vm_op implementation for relay file mapping. | 30 | * close() vm_op implementation for relay file mapping. |
@@ -187,6 +194,7 @@ void relay_destroy_buf(struct rchan_buf *buf) | |||
187 | __free_page(buf->page_array[i]); | 194 | __free_page(buf->page_array[i]); |
188 | kfree(buf->page_array); | 195 | kfree(buf->page_array); |
189 | } | 196 | } |
197 | chan->buf[buf->cpu] = NULL; | ||
190 | kfree(buf->padding); | 198 | kfree(buf->padding); |
191 | kfree(buf); | 199 | kfree(buf); |
192 | kref_put(&chan->kref, relay_destroy_channel); | 200 | kref_put(&chan->kref, relay_destroy_channel); |
@@ -320,7 +328,7 @@ static void wakeup_readers(struct work_struct *work) | |||
320 | * @buf: the channel buffer | 328 | * @buf: the channel buffer |
321 | * @init: 1 if this is a first-time initialization | 329 | * @init: 1 if this is a first-time initialization |
322 | * | 330 | * |
323 | * See relay_reset for description of effect. | 331 | * See relay_reset() for description of effect. |
324 | */ | 332 | */ |
325 | static void __relay_reset(struct rchan_buf *buf, unsigned int init) | 333 | static void __relay_reset(struct rchan_buf *buf, unsigned int init) |
326 | { | 334 | { |
@@ -356,57 +364,75 @@ static void __relay_reset(struct rchan_buf *buf, unsigned int init) | |||
356 | * and restarting the channel in its initial state. The buffers | 364 | * and restarting the channel in its initial state. The buffers |
357 | * are not freed, so any mappings are still in effect. | 365 | * are not freed, so any mappings are still in effect. |
358 | * | 366 | * |
359 | * NOTE: Care should be taken that the channel isn't actually | 367 | * NOTE. Care should be taken that the channel isn't actually |
360 | * being used by anything when this call is made. | 368 | * being used by anything when this call is made. |
361 | */ | 369 | */ |
362 | void relay_reset(struct rchan *chan) | 370 | void relay_reset(struct rchan *chan) |
363 | { | 371 | { |
364 | unsigned int i; | 372 | unsigned int i; |
365 | struct rchan_buf *prev = NULL; | ||
366 | 373 | ||
367 | if (!chan) | 374 | if (!chan) |
368 | return; | 375 | return; |
369 | 376 | ||
370 | for (i = 0; i < NR_CPUS; i++) { | 377 | if (chan->is_global && chan->buf[0]) { |
371 | if (!chan->buf[i] || chan->buf[i] == prev) | 378 | __relay_reset(chan->buf[0], 0); |
372 | break; | 379 | return; |
373 | __relay_reset(chan->buf[i], 0); | ||
374 | prev = chan->buf[i]; | ||
375 | } | 380 | } |
381 | |||
382 | mutex_lock(&relay_channels_mutex); | ||
383 | for_each_online_cpu(i) | ||
384 | if (chan->buf[i]) | ||
385 | __relay_reset(chan->buf[i], 0); | ||
386 | mutex_unlock(&relay_channels_mutex); | ||
376 | } | 387 | } |
377 | EXPORT_SYMBOL_GPL(relay_reset); | 388 | EXPORT_SYMBOL_GPL(relay_reset); |
378 | 389 | ||
379 | /* | 390 | /* |
380 | * relay_open_buf - create a new relay channel buffer | 391 | * relay_open_buf - create a new relay channel buffer |
381 | * | 392 | * |
382 | * Internal - used by relay_open(). | 393 | * used by relay_open() and CPU hotplug. |
383 | */ | 394 | */ |
384 | static struct rchan_buf *relay_open_buf(struct rchan *chan, | 395 | static struct rchan_buf *relay_open_buf(struct rchan *chan, unsigned int cpu) |
385 | const char *filename, | ||
386 | struct dentry *parent, | ||
387 | int *is_global) | ||
388 | { | 396 | { |
389 | struct rchan_buf *buf; | 397 | struct rchan_buf *buf = NULL; |
390 | struct dentry *dentry; | 398 | struct dentry *dentry; |
399 | char *tmpname; | ||
391 | 400 | ||
392 | if (*is_global) | 401 | if (chan->is_global) |
393 | return chan->buf[0]; | 402 | return chan->buf[0]; |
394 | 403 | ||
404 | tmpname = kzalloc(NAME_MAX + 1, GFP_KERNEL); | ||
405 | if (!tmpname) | ||
406 | goto end; | ||
407 | snprintf(tmpname, NAME_MAX, "%s%d", chan->base_filename, cpu); | ||
408 | |||
395 | buf = relay_create_buf(chan); | 409 | buf = relay_create_buf(chan); |
396 | if (!buf) | 410 | if (!buf) |
397 | return NULL; | 411 | goto free_name; |
412 | |||
413 | buf->cpu = cpu; | ||
414 | __relay_reset(buf, 1); | ||
398 | 415 | ||
399 | /* Create file in fs */ | 416 | /* Create file in fs */ |
400 | dentry = chan->cb->create_buf_file(filename, parent, S_IRUSR, | 417 | dentry = chan->cb->create_buf_file(tmpname, chan->parent, S_IRUSR, |
401 | buf, is_global); | 418 | buf, &chan->is_global); |
402 | if (!dentry) { | 419 | if (!dentry) |
403 | relay_destroy_buf(buf); | 420 | goto free_buf; |
404 | return NULL; | ||
405 | } | ||
406 | 421 | ||
407 | buf->dentry = dentry; | 422 | buf->dentry = dentry; |
408 | __relay_reset(buf, 1); | ||
409 | 423 | ||
424 | if(chan->is_global) { | ||
425 | chan->buf[0] = buf; | ||
426 | buf->cpu = 0; | ||
427 | } | ||
428 | |||
429 | goto free_name; | ||
430 | |||
431 | free_buf: | ||
432 | relay_destroy_buf(buf); | ||
433 | free_name: | ||
434 | kfree(tmpname); | ||
435 | end: | ||
410 | return buf; | 436 | return buf; |
411 | } | 437 | } |
412 | 438 | ||
@@ -448,31 +474,71 @@ static void setup_callbacks(struct rchan *chan, | |||
448 | } | 474 | } |
449 | 475 | ||
450 | /** | 476 | /** |
477 | * | ||
478 | * relay_hotcpu_callback - CPU hotplug callback | ||
479 | * @nb: notifier block | ||
480 | * @action: hotplug action to take | ||
481 | * @hcpu: CPU number | ||
482 | * | ||
483 | * Returns the success/failure of the operation. (NOTIFY_OK, NOTIFY_BAD) | ||
484 | */ | ||
485 | static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb, | ||
486 | unsigned long action, | ||
487 | void *hcpu) | ||
488 | { | ||
489 | unsigned int hotcpu = (unsigned long)hcpu; | ||
490 | struct rchan *chan; | ||
491 | |||
492 | switch(action) { | ||
493 | case CPU_UP_PREPARE: | ||
494 | mutex_lock(&relay_channels_mutex); | ||
495 | list_for_each_entry(chan, &relay_channels, list) { | ||
496 | if (chan->buf[hotcpu]) | ||
497 | continue; | ||
498 | chan->buf[hotcpu] = relay_open_buf(chan, hotcpu); | ||
499 | if(!chan->buf[hotcpu]) { | ||
500 | printk(KERN_ERR | ||
501 | "relay_hotcpu_callback: cpu %d buffer " | ||
502 | "creation failed\n", hotcpu); | ||
503 | mutex_unlock(&relay_channels_mutex); | ||
504 | return NOTIFY_BAD; | ||
505 | } | ||
506 | } | ||
507 | mutex_unlock(&relay_channels_mutex); | ||
508 | break; | ||
509 | case CPU_DEAD: | ||
510 | /* No need to flush the cpu : will be flushed upon | ||
511 | * final relay_flush() call. */ | ||
512 | break; | ||
513 | } | ||
514 | return NOTIFY_OK; | ||
515 | } | ||
516 | |||
517 | /** | ||
451 | * relay_open - create a new relay channel | 518 | * relay_open - create a new relay channel |
452 | * @base_filename: base name of files to create | 519 | * @base_filename: base name of files to create |
453 | * @parent: dentry of parent directory, %NULL for root directory | 520 | * @parent: dentry of parent directory, %NULL for root directory |
454 | * @subbuf_size: size of sub-buffers | 521 | * @subbuf_size: size of sub-buffers |
455 | * @n_subbufs: number of sub-buffers | 522 | * @n_subbufs: number of sub-buffers |
456 | * @cb: client callback functions | 523 | * @cb: client callback functions |
524 | * @private_data: user-defined data | ||
457 | * | 525 | * |
458 | * Returns channel pointer if successful, %NULL otherwise. | 526 | * Returns channel pointer if successful, %NULL otherwise. |
459 | * | 527 | * |
460 | * Creates a channel buffer for each cpu using the sizes and | 528 | * Creates a channel buffer for each cpu using the sizes and |
461 | * attributes specified. The created channel buffer files | 529 | * attributes specified. The created channel buffer files |
462 | * will be named base_filename0...base_filenameN-1. File | 530 | * will be named base_filename0...base_filenameN-1. File |
463 | * permissions will be S_IRUSR. | 531 | * permissions will be %S_IRUSR. |
464 | */ | 532 | */ |
465 | struct rchan *relay_open(const char *base_filename, | 533 | struct rchan *relay_open(const char *base_filename, |
466 | struct dentry *parent, | 534 | struct dentry *parent, |
467 | size_t subbuf_size, | 535 | size_t subbuf_size, |
468 | size_t n_subbufs, | 536 | size_t n_subbufs, |
469 | struct rchan_callbacks *cb) | 537 | struct rchan_callbacks *cb, |
538 | void *private_data) | ||
470 | { | 539 | { |
471 | unsigned int i; | 540 | unsigned int i; |
472 | struct rchan *chan; | 541 | struct rchan *chan; |
473 | char *tmpname; | ||
474 | int is_global = 0; | ||
475 | |||
476 | if (!base_filename) | 542 | if (!base_filename) |
477 | return NULL; | 543 | return NULL; |
478 | 544 | ||
@@ -487,38 +553,32 @@ struct rchan *relay_open(const char *base_filename, | |||
487 | chan->n_subbufs = n_subbufs; | 553 | chan->n_subbufs = n_subbufs; |
488 | chan->subbuf_size = subbuf_size; | 554 | chan->subbuf_size = subbuf_size; |
489 | chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs); | 555 | chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs); |
556 | chan->parent = parent; | ||
557 | chan->private_data = private_data; | ||
558 | strlcpy(chan->base_filename, base_filename, NAME_MAX); | ||
490 | setup_callbacks(chan, cb); | 559 | setup_callbacks(chan, cb); |
491 | kref_init(&chan->kref); | 560 | kref_init(&chan->kref); |
492 | 561 | ||
493 | tmpname = kmalloc(NAME_MAX + 1, GFP_KERNEL); | 562 | mutex_lock(&relay_channels_mutex); |
494 | if (!tmpname) | ||
495 | goto free_chan; | ||
496 | |||
497 | for_each_online_cpu(i) { | 563 | for_each_online_cpu(i) { |
498 | sprintf(tmpname, "%s%d", base_filename, i); | 564 | chan->buf[i] = relay_open_buf(chan, i); |
499 | chan->buf[i] = relay_open_buf(chan, tmpname, parent, | ||
500 | &is_global); | ||
501 | if (!chan->buf[i]) | 565 | if (!chan->buf[i]) |
502 | goto free_bufs; | 566 | goto free_bufs; |
503 | |||
504 | chan->buf[i]->cpu = i; | ||
505 | } | 567 | } |
568 | list_add(&chan->list, &relay_channels); | ||
569 | mutex_unlock(&relay_channels_mutex); | ||
506 | 570 | ||
507 | kfree(tmpname); | ||
508 | return chan; | 571 | return chan; |
509 | 572 | ||
510 | free_bufs: | 573 | free_bufs: |
511 | for (i = 0; i < NR_CPUS; i++) { | 574 | for_each_online_cpu(i) { |
512 | if (!chan->buf[i]) | 575 | if (!chan->buf[i]) |
513 | break; | 576 | break; |
514 | relay_close_buf(chan->buf[i]); | 577 | relay_close_buf(chan->buf[i]); |
515 | if (is_global) | ||
516 | break; | ||
517 | } | 578 | } |
518 | kfree(tmpname); | ||
519 | 579 | ||
520 | free_chan: | ||
521 | kref_put(&chan->kref, relay_destroy_channel); | 580 | kref_put(&chan->kref, relay_destroy_channel); |
581 | mutex_unlock(&relay_channels_mutex); | ||
522 | return NULL; | 582 | return NULL; |
523 | } | 583 | } |
524 | EXPORT_SYMBOL_GPL(relay_open); | 584 | EXPORT_SYMBOL_GPL(relay_open); |
@@ -588,7 +648,7 @@ EXPORT_SYMBOL_GPL(relay_switch_subbuf); | |||
588 | * subbufs_consumed should be the number of sub-buffers newly consumed, | 648 | * subbufs_consumed should be the number of sub-buffers newly consumed, |
589 | * not the total consumed. | 649 | * not the total consumed. |
590 | * | 650 | * |
591 | * NOTE: Kernel clients don't need to call this function if the channel | 651 | * NOTE. Kernel clients don't need to call this function if the channel |
592 | * mode is 'overwrite'. | 652 | * mode is 'overwrite'. |
593 | */ | 653 | */ |
594 | void relay_subbufs_consumed(struct rchan *chan, | 654 | void relay_subbufs_consumed(struct rchan *chan, |
@@ -619,24 +679,26 @@ EXPORT_SYMBOL_GPL(relay_subbufs_consumed); | |||
619 | void relay_close(struct rchan *chan) | 679 | void relay_close(struct rchan *chan) |
620 | { | 680 | { |
621 | unsigned int i; | 681 | unsigned int i; |
622 | struct rchan_buf *prev = NULL; | ||
623 | 682 | ||
624 | if (!chan) | 683 | if (!chan) |
625 | return; | 684 | return; |
626 | 685 | ||
627 | for (i = 0; i < NR_CPUS; i++) { | 686 | mutex_lock(&relay_channels_mutex); |
628 | if (!chan->buf[i] || chan->buf[i] == prev) | 687 | if (chan->is_global && chan->buf[0]) |
629 | break; | 688 | relay_close_buf(chan->buf[0]); |
630 | relay_close_buf(chan->buf[i]); | 689 | else |
631 | prev = chan->buf[i]; | 690 | for_each_possible_cpu(i) |
632 | } | 691 | if (chan->buf[i]) |
692 | relay_close_buf(chan->buf[i]); | ||
633 | 693 | ||
634 | if (chan->last_toobig) | 694 | if (chan->last_toobig) |
635 | printk(KERN_WARNING "relay: one or more items not logged " | 695 | printk(KERN_WARNING "relay: one or more items not logged " |
636 | "[item size (%Zd) > sub-buffer size (%Zd)]\n", | 696 | "[item size (%Zd) > sub-buffer size (%Zd)]\n", |
637 | chan->last_toobig, chan->subbuf_size); | 697 | chan->last_toobig, chan->subbuf_size); |
638 | 698 | ||
699 | list_del(&chan->list); | ||
639 | kref_put(&chan->kref, relay_destroy_channel); | 700 | kref_put(&chan->kref, relay_destroy_channel); |
701 | mutex_unlock(&relay_channels_mutex); | ||
640 | } | 702 | } |
641 | EXPORT_SYMBOL_GPL(relay_close); | 703 | EXPORT_SYMBOL_GPL(relay_close); |
642 | 704 | ||
@@ -649,17 +711,20 @@ EXPORT_SYMBOL_GPL(relay_close); | |||
649 | void relay_flush(struct rchan *chan) | 711 | void relay_flush(struct rchan *chan) |
650 | { | 712 | { |
651 | unsigned int i; | 713 | unsigned int i; |
652 | struct rchan_buf *prev = NULL; | ||
653 | 714 | ||
654 | if (!chan) | 715 | if (!chan) |
655 | return; | 716 | return; |
656 | 717 | ||
657 | for (i = 0; i < NR_CPUS; i++) { | 718 | if (chan->is_global && chan->buf[0]) { |
658 | if (!chan->buf[i] || chan->buf[i] == prev) | 719 | relay_switch_subbuf(chan->buf[0], 0); |
659 | break; | 720 | return; |
660 | relay_switch_subbuf(chan->buf[i], 0); | ||
661 | prev = chan->buf[i]; | ||
662 | } | 721 | } |
722 | |||
723 | mutex_lock(&relay_channels_mutex); | ||
724 | for_each_possible_cpu(i) | ||
725 | if (chan->buf[i]) | ||
726 | relay_switch_subbuf(chan->buf[i], 0); | ||
727 | mutex_unlock(&relay_channels_mutex); | ||
663 | } | 728 | } |
664 | EXPORT_SYMBOL_GPL(relay_flush); | 729 | EXPORT_SYMBOL_GPL(relay_flush); |
665 | 730 | ||
@@ -684,7 +749,7 @@ static int relay_file_open(struct inode *inode, struct file *filp) | |||
684 | * @filp: the file | 749 | * @filp: the file |
685 | * @vma: the vma describing what to map | 750 | * @vma: the vma describing what to map |
686 | * | 751 | * |
687 | * Calls upon relay_mmap_buf to map the file into user space. | 752 | * Calls upon relay_mmap_buf() to map the file into user space. |
688 | */ | 753 | */ |
689 | static int relay_file_mmap(struct file *filp, struct vm_area_struct *vma) | 754 | static int relay_file_mmap(struct file *filp, struct vm_area_struct *vma) |
690 | { | 755 | { |
@@ -826,7 +891,7 @@ static size_t relay_file_read_subbuf_avail(size_t read_pos, | |||
826 | * @read_pos: file read position | 891 | * @read_pos: file read position |
827 | * @buf: relay channel buffer | 892 | * @buf: relay channel buffer |
828 | * | 893 | * |
829 | * If the read_pos is in the middle of padding, return the | 894 | * If the @read_pos is in the middle of padding, return the |
830 | * position of the first actually available byte, otherwise | 895 | * position of the first actually available byte, otherwise |
831 | * return the original value. | 896 | * return the original value. |
832 | */ | 897 | */ |
@@ -1022,3 +1087,12 @@ const struct file_operations relay_file_operations = { | |||
1022 | .sendfile = relay_file_sendfile, | 1087 | .sendfile = relay_file_sendfile, |
1023 | }; | 1088 | }; |
1024 | EXPORT_SYMBOL_GPL(relay_file_operations); | 1089 | EXPORT_SYMBOL_GPL(relay_file_operations); |
1090 | |||
1091 | static __init int relay_init(void) | ||
1092 | { | ||
1093 | |||
1094 | hotcpu_notifier(relay_hotcpu_callback, 0); | ||
1095 | return 0; | ||
1096 | } | ||
1097 | |||
1098 | module_init(relay_init); | ||
diff --git a/kernel/sched.c b/kernel/sched.c index cca93cc0dd7d..1fd67e16cd31 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -57,6 +57,16 @@ | |||
57 | #include <asm/unistd.h> | 57 | #include <asm/unistd.h> |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Scheduler clock - returns current time in nanosec units. | ||
61 | * This is default implementation. | ||
62 | * Architectures and sub-architectures can override this. | ||
63 | */ | ||
64 | unsigned long long __attribute__((weak)) sched_clock(void) | ||
65 | { | ||
66 | return (unsigned long long)jiffies * (1000000000 / HZ); | ||
67 | } | ||
68 | |||
69 | /* | ||
60 | * Convert user-nice values [ -20 ... 0 ... 19 ] | 70 | * Convert user-nice values [ -20 ... 0 ... 19 ] |
61 | * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], | 71 | * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], |
62 | * and back. | 72 | * and back. |
@@ -4193,13 +4203,12 @@ static void __setscheduler(struct task_struct *p, int policy, int prio) | |||
4193 | } | 4203 | } |
4194 | 4204 | ||
4195 | /** | 4205 | /** |
4196 | * sched_setscheduler - change the scheduling policy and/or RT priority of | 4206 | * sched_setscheduler - change the scheduling policy and/or RT priority of a thread. |
4197 | * a thread. | ||
4198 | * @p: the task in question. | 4207 | * @p: the task in question. |
4199 | * @policy: new policy. | 4208 | * @policy: new policy. |
4200 | * @param: structure containing the new RT priority. | 4209 | * @param: structure containing the new RT priority. |
4201 | * | 4210 | * |
4202 | * NOTE: the task may be already dead | 4211 | * NOTE that the task may be already dead. |
4203 | */ | 4212 | */ |
4204 | int sched_setscheduler(struct task_struct *p, int policy, | 4213 | int sched_setscheduler(struct task_struct *p, int policy, |
4205 | struct sched_param *param) | 4214 | struct sched_param *param) |
@@ -4567,7 +4576,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, | |||
4567 | /** | 4576 | /** |
4568 | * sys_sched_yield - yield the current processor to other threads. | 4577 | * sys_sched_yield - yield the current processor to other threads. |
4569 | * | 4578 | * |
4570 | * this function yields the current CPU by moving the calling thread | 4579 | * This function yields the current CPU by moving the calling thread |
4571 | * to the expired array. If there are no other threads running on this | 4580 | * to the expired array. If there are no other threads running on this |
4572 | * CPU then this function will return. | 4581 | * CPU then this function will return. |
4573 | */ | 4582 | */ |
@@ -4694,7 +4703,7 @@ EXPORT_SYMBOL(cond_resched_softirq); | |||
4694 | /** | 4703 | /** |
4695 | * yield - yield the current processor to other threads. | 4704 | * yield - yield the current processor to other threads. |
4696 | * | 4705 | * |
4697 | * this is a shortcut for kernel-space yielding - it marks the | 4706 | * This is a shortcut for kernel-space yielding - it marks the |
4698 | * thread runnable and calls sys_sched_yield(). | 4707 | * thread runnable and calls sys_sched_yield(). |
4699 | */ | 4708 | */ |
4700 | void __sched yield(void) | 4709 | void __sched yield(void) |
diff --git a/kernel/signal.c b/kernel/signal.c index 5630255d2e2a..228fdb5c01d1 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1119,19 +1119,18 @@ kill_pg_info(int sig, struct siginfo *info, pid_t pgrp) | |||
1119 | int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) | 1119 | int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) |
1120 | { | 1120 | { |
1121 | int error; | 1121 | int error; |
1122 | int acquired_tasklist_lock = 0; | ||
1123 | struct task_struct *p; | 1122 | struct task_struct *p; |
1124 | 1123 | ||
1125 | rcu_read_lock(); | 1124 | rcu_read_lock(); |
1126 | if (unlikely(sig_needs_tasklist(sig))) { | 1125 | if (unlikely(sig_needs_tasklist(sig))) |
1127 | read_lock(&tasklist_lock); | 1126 | read_lock(&tasklist_lock); |
1128 | acquired_tasklist_lock = 1; | 1127 | |
1129 | } | ||
1130 | p = pid_task(pid, PIDTYPE_PID); | 1128 | p = pid_task(pid, PIDTYPE_PID); |
1131 | error = -ESRCH; | 1129 | error = -ESRCH; |
1132 | if (p) | 1130 | if (p) |
1133 | error = group_send_sig_info(sig, info, p); | 1131 | error = group_send_sig_info(sig, info, p); |
1134 | if (unlikely(acquired_tasklist_lock)) | 1132 | |
1133 | if (unlikely(sig_needs_tasklist(sig))) | ||
1135 | read_unlock(&tasklist_lock); | 1134 | read_unlock(&tasklist_lock); |
1136 | rcu_read_unlock(); | 1135 | rcu_read_unlock(); |
1137 | return error; | 1136 | return error; |
@@ -2283,7 +2282,7 @@ static int do_tkill(int tgid, int pid, int sig) | |||
2283 | * @pid: the PID of the thread | 2282 | * @pid: the PID of the thread |
2284 | * @sig: signal to be sent | 2283 | * @sig: signal to be sent |
2285 | * | 2284 | * |
2286 | * This syscall also checks the tgid and returns -ESRCH even if the PID | 2285 | * This syscall also checks the @tgid and returns -ESRCH even if the PID |
2287 | * exists but it's not belonging to the target process anymore. This | 2286 | * exists but it's not belonging to the target process anymore. This |
2288 | * method solves the problem of threads exiting and PIDs getting reused. | 2287 | * method solves the problem of threads exiting and PIDs getting reused. |
2289 | */ | 2288 | */ |
diff --git a/kernel/sys.c b/kernel/sys.c index 6e2101dec0fc..e1024383314d 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -215,7 +215,7 @@ EXPORT_SYMBOL_GPL(atomic_notifier_chain_unregister); | |||
215 | * This routine uses RCU to synchronize with changes to the chain. | 215 | * This routine uses RCU to synchronize with changes to the chain. |
216 | * | 216 | * |
217 | * If the return value of the notifier can be and'ed | 217 | * If the return value of the notifier can be and'ed |
218 | * with %NOTIFY_STOP_MASK then atomic_notifier_call_chain | 218 | * with %NOTIFY_STOP_MASK then atomic_notifier_call_chain() |
219 | * will return immediately, with the return value of | 219 | * will return immediately, with the return value of |
220 | * the notifier function which halted execution. | 220 | * the notifier function which halted execution. |
221 | * Otherwise the return value is the return value | 221 | * Otherwise the return value is the return value |
@@ -313,7 +313,7 @@ EXPORT_SYMBOL_GPL(blocking_notifier_chain_unregister); | |||
313 | * run in a process context, so they are allowed to block. | 313 | * run in a process context, so they are allowed to block. |
314 | * | 314 | * |
315 | * If the return value of the notifier can be and'ed | 315 | * If the return value of the notifier can be and'ed |
316 | * with %NOTIFY_STOP_MASK then blocking_notifier_call_chain | 316 | * with %NOTIFY_STOP_MASK then blocking_notifier_call_chain() |
317 | * will return immediately, with the return value of | 317 | * will return immediately, with the return value of |
318 | * the notifier function which halted execution. | 318 | * the notifier function which halted execution. |
319 | * Otherwise the return value is the return value | 319 | * Otherwise the return value is the return value |
@@ -393,7 +393,7 @@ EXPORT_SYMBOL_GPL(raw_notifier_chain_unregister); | |||
393 | * All locking must be provided by the caller. | 393 | * All locking must be provided by the caller. |
394 | * | 394 | * |
395 | * If the return value of the notifier can be and'ed | 395 | * If the return value of the notifier can be and'ed |
396 | * with %NOTIFY_STOP_MASK then raw_notifier_call_chain | 396 | * with %NOTIFY_STOP_MASK then raw_notifier_call_chain() |
397 | * will return immediately, with the return value of | 397 | * will return immediately, with the return value of |
398 | * the notifier function which halted execution. | 398 | * the notifier function which halted execution. |
399 | * Otherwise the return value is the return value | 399 | * Otherwise the return value is the return value |
@@ -487,7 +487,7 @@ EXPORT_SYMBOL_GPL(srcu_notifier_chain_unregister); | |||
487 | * run in a process context, so they are allowed to block. | 487 | * run in a process context, so they are allowed to block. |
488 | * | 488 | * |
489 | * If the return value of the notifier can be and'ed | 489 | * If the return value of the notifier can be and'ed |
490 | * with %NOTIFY_STOP_MASK then srcu_notifier_call_chain | 490 | * with %NOTIFY_STOP_MASK then srcu_notifier_call_chain() |
491 | * will return immediately, with the return value of | 491 | * will return immediately, with the return value of |
492 | * the notifier function which halted execution. | 492 | * the notifier function which halted execution. |
493 | * Otherwise the return value is the return value | 493 | * Otherwise the return value is the return value |
@@ -538,7 +538,7 @@ EXPORT_SYMBOL_GPL(srcu_init_notifier_head); | |||
538 | * Registers a function with the list of functions | 538 | * Registers a function with the list of functions |
539 | * to be called at reboot time. | 539 | * to be called at reboot time. |
540 | * | 540 | * |
541 | * Currently always returns zero, as blocking_notifier_chain_register | 541 | * Currently always returns zero, as blocking_notifier_chain_register() |
542 | * always returns zero. | 542 | * always returns zero. |
543 | */ | 543 | */ |
544 | 544 | ||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 600b33358ded..e0ac6cd79fcf 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -151,6 +151,8 @@ static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, | |||
151 | #ifdef CONFIG_PROC_SYSCTL | 151 | #ifdef CONFIG_PROC_SYSCTL |
152 | static int proc_do_cad_pid(ctl_table *table, int write, struct file *filp, | 152 | static int proc_do_cad_pid(ctl_table *table, int write, struct file *filp, |
153 | void __user *buffer, size_t *lenp, loff_t *ppos); | 153 | void __user *buffer, size_t *lenp, loff_t *ppos); |
154 | static int proc_dointvec_taint(ctl_table *table, int write, struct file *filp, | ||
155 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
154 | #endif | 156 | #endif |
155 | 157 | ||
156 | static ctl_table root_table[]; | 158 | static ctl_table root_table[]; |
@@ -174,6 +176,7 @@ extern ctl_table inotify_table[]; | |||
174 | int sysctl_legacy_va_layout; | 176 | int sysctl_legacy_va_layout; |
175 | #endif | 177 | #endif |
176 | 178 | ||
179 | |||
177 | static void *get_uts(ctl_table *table, int write) | 180 | static void *get_uts(ctl_table *table, int write) |
178 | { | 181 | { |
179 | char *which = table->data; | 182 | char *which = table->data; |
@@ -344,14 +347,16 @@ static ctl_table kern_table[] = { | |||
344 | .proc_handler = &proc_dostring, | 347 | .proc_handler = &proc_dostring, |
345 | .strategy = &sysctl_string, | 348 | .strategy = &sysctl_string, |
346 | }, | 349 | }, |
350 | #ifdef CONFIG_PROC_SYSCTL | ||
347 | { | 351 | { |
348 | .ctl_name = KERN_TAINTED, | 352 | .ctl_name = KERN_TAINTED, |
349 | .procname = "tainted", | 353 | .procname = "tainted", |
350 | .data = &tainted, | 354 | .data = &tainted, |
351 | .maxlen = sizeof(int), | 355 | .maxlen = sizeof(int), |
352 | .mode = 0444, | 356 | .mode = 0644, |
353 | .proc_handler = &proc_dointvec, | 357 | .proc_handler = &proc_dointvec_taint, |
354 | }, | 358 | }, |
359 | #endif | ||
355 | { | 360 | { |
356 | .ctl_name = KERN_CAP_BSET, | 361 | .ctl_name = KERN_CAP_BSET, |
357 | .procname = "cap-bound", | 362 | .procname = "cap-bound", |
@@ -1681,13 +1686,12 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
1681 | size_t len; | 1686 | size_t len; |
1682 | char __user *p; | 1687 | char __user *p; |
1683 | char c; | 1688 | char c; |
1684 | 1689 | ||
1685 | if (!data || !maxlen || !*lenp || | 1690 | if (!data || !maxlen || !*lenp) { |
1686 | (*ppos && !write)) { | ||
1687 | *lenp = 0; | 1691 | *lenp = 0; |
1688 | return 0; | 1692 | return 0; |
1689 | } | 1693 | } |
1690 | 1694 | ||
1691 | if (write) { | 1695 | if (write) { |
1692 | len = 0; | 1696 | len = 0; |
1693 | p = buffer; | 1697 | p = buffer; |
@@ -1708,6 +1712,15 @@ static int _proc_do_string(void* data, int maxlen, int write, | |||
1708 | len = strlen(data); | 1712 | len = strlen(data); |
1709 | if (len > maxlen) | 1713 | if (len > maxlen) |
1710 | len = maxlen; | 1714 | len = maxlen; |
1715 | |||
1716 | if (*ppos > len) { | ||
1717 | *lenp = 0; | ||
1718 | return 0; | ||
1719 | } | ||
1720 | |||
1721 | data += *ppos; | ||
1722 | len -= *ppos; | ||
1723 | |||
1711 | if (len > *lenp) | 1724 | if (len > *lenp) |
1712 | len = *lenp; | 1725 | len = *lenp; |
1713 | if (len) | 1726 | if (len) |
@@ -1927,6 +1940,7 @@ int proc_dointvec(ctl_table *table, int write, struct file *filp, | |||
1927 | 1940 | ||
1928 | #define OP_SET 0 | 1941 | #define OP_SET 0 |
1929 | #define OP_AND 1 | 1942 | #define OP_AND 1 |
1943 | #define OP_OR 2 | ||
1930 | 1944 | ||
1931 | static int do_proc_dointvec_bset_conv(int *negp, unsigned long *lvalp, | 1945 | static int do_proc_dointvec_bset_conv(int *negp, unsigned long *lvalp, |
1932 | int *valp, | 1946 | int *valp, |
@@ -1938,6 +1952,7 @@ static int do_proc_dointvec_bset_conv(int *negp, unsigned long *lvalp, | |||
1938 | switch(op) { | 1952 | switch(op) { |
1939 | case OP_SET: *valp = val; break; | 1953 | case OP_SET: *valp = val; break; |
1940 | case OP_AND: *valp &= val; break; | 1954 | case OP_AND: *valp &= val; break; |
1955 | case OP_OR: *valp |= val; break; | ||
1941 | } | 1956 | } |
1942 | } else { | 1957 | } else { |
1943 | int val = *valp; | 1958 | int val = *valp; |
@@ -1961,7 +1976,7 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp, | |||
1961 | { | 1976 | { |
1962 | int op; | 1977 | int op; |
1963 | 1978 | ||
1964 | if (!capable(CAP_SYS_MODULE)) { | 1979 | if (write && !capable(CAP_SYS_MODULE)) { |
1965 | return -EPERM; | 1980 | return -EPERM; |
1966 | } | 1981 | } |
1967 | 1982 | ||
@@ -1970,6 +1985,22 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp, | |||
1970 | do_proc_dointvec_bset_conv,&op); | 1985 | do_proc_dointvec_bset_conv,&op); |
1971 | } | 1986 | } |
1972 | 1987 | ||
1988 | /* | ||
1989 | * Taint values can only be increased | ||
1990 | */ | ||
1991 | static int proc_dointvec_taint(ctl_table *table, int write, struct file *filp, | ||
1992 | void __user *buffer, size_t *lenp, loff_t *ppos) | ||
1993 | { | ||
1994 | int op; | ||
1995 | |||
1996 | if (!capable(CAP_SYS_ADMIN)) | ||
1997 | return -EPERM; | ||
1998 | |||
1999 | op = OP_OR; | ||
2000 | return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, | ||
2001 | do_proc_dointvec_bset_conv,&op); | ||
2002 | } | ||
2003 | |||
1973 | struct do_proc_dointvec_minmax_conv_param { | 2004 | struct do_proc_dointvec_minmax_conv_param { |
1974 | int *min; | 2005 | int *min; |
1975 | int *max; | 2006 | int *max; |
@@ -2553,17 +2584,23 @@ int sysctl_jiffies(ctl_table *table, int __user *name, int nlen, | |||
2553 | void __user *oldval, size_t __user *oldlenp, | 2584 | void __user *oldval, size_t __user *oldlenp, |
2554 | void __user *newval, size_t newlen) | 2585 | void __user *newval, size_t newlen) |
2555 | { | 2586 | { |
2556 | if (oldval) { | 2587 | if (oldval && oldlenp) { |
2557 | size_t olen; | 2588 | size_t olen; |
2558 | if (oldlenp) { | 2589 | |
2559 | if (get_user(olen, oldlenp)) | 2590 | if (get_user(olen, oldlenp)) |
2591 | return -EFAULT; | ||
2592 | if (olen) { | ||
2593 | int val; | ||
2594 | |||
2595 | if (olen < sizeof(int)) | ||
2596 | return -EINVAL; | ||
2597 | |||
2598 | val = *(int *)(table->data) / HZ; | ||
2599 | if (put_user(val, (int __user *)oldval)) | ||
2600 | return -EFAULT; | ||
2601 | if (put_user(sizeof(int), oldlenp)) | ||
2560 | return -EFAULT; | 2602 | return -EFAULT; |
2561 | if (olen!=sizeof(int)) | ||
2562 | return -EINVAL; | ||
2563 | } | 2603 | } |
2564 | if (put_user(*(int *)(table->data)/HZ, (int __user *)oldval) || | ||
2565 | (oldlenp && put_user(sizeof(int),oldlenp))) | ||
2566 | return -EFAULT; | ||
2567 | } | 2604 | } |
2568 | if (newval && newlen) { | 2605 | if (newval && newlen) { |
2569 | int new; | 2606 | int new; |
@@ -2581,17 +2618,23 @@ int sysctl_ms_jiffies(ctl_table *table, int __user *name, int nlen, | |||
2581 | void __user *oldval, size_t __user *oldlenp, | 2618 | void __user *oldval, size_t __user *oldlenp, |
2582 | void __user *newval, size_t newlen) | 2619 | void __user *newval, size_t newlen) |
2583 | { | 2620 | { |
2584 | if (oldval) { | 2621 | if (oldval && oldlenp) { |
2585 | size_t olen; | 2622 | size_t olen; |
2586 | if (oldlenp) { | 2623 | |
2587 | if (get_user(olen, oldlenp)) | 2624 | if (get_user(olen, oldlenp)) |
2625 | return -EFAULT; | ||
2626 | if (olen) { | ||
2627 | int val; | ||
2628 | |||
2629 | if (olen < sizeof(int)) | ||
2630 | return -EINVAL; | ||
2631 | |||
2632 | val = jiffies_to_msecs(*(int *)(table->data)); | ||
2633 | if (put_user(val, (int __user *)oldval)) | ||
2634 | return -EFAULT; | ||
2635 | if (put_user(sizeof(int), oldlenp)) | ||
2588 | return -EFAULT; | 2636 | return -EFAULT; |
2589 | if (olen!=sizeof(int)) | ||
2590 | return -EINVAL; | ||
2591 | } | 2637 | } |
2592 | if (put_user(jiffies_to_msecs(*(int *)(table->data)), (int __user *)oldval) || | ||
2593 | (oldlenp && put_user(sizeof(int),oldlenp))) | ||
2594 | return -EFAULT; | ||
2595 | } | 2638 | } |
2596 | if (newval && newlen) { | 2639 | if (newval && newlen) { |
2597 | int new; | 2640 | int new; |
@@ -2732,12 +2775,14 @@ static int sysctl_uts_string(ctl_table *table, int __user *name, int nlen, | |||
2732 | { | 2775 | { |
2733 | return -ENOSYS; | 2776 | return -ENOSYS; |
2734 | } | 2777 | } |
2778 | #ifdef CONFIG_SYSVIPC | ||
2735 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, | 2779 | static int sysctl_ipc_data(ctl_table *table, int __user *name, int nlen, |
2736 | void __user *oldval, size_t __user *oldlenp, | 2780 | void __user *oldval, size_t __user *oldlenp, |
2737 | void __user *newval, size_t newlen) | 2781 | void __user *newval, size_t newlen) |
2738 | { | 2782 | { |
2739 | return -ENOSYS; | 2783 | return -ENOSYS; |
2740 | } | 2784 | } |
2785 | #endif | ||
2741 | #endif /* CONFIG_SYSCTL_SYSCALL */ | 2786 | #endif /* CONFIG_SYSCTL_SYSCALL */ |
2742 | 2787 | ||
2743 | /* | 2788 | /* |
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 22504afc0d34..d9ef176c4e09 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/sysdev.h> | 28 | #include <linux/sysdev.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */ | ||
31 | 32 | ||
32 | /* XXX - Would like a better way for initializing curr_clocksource */ | 33 | /* XXX - Would like a better way for initializing curr_clocksource */ |
33 | extern struct clocksource clocksource_jiffies; | 34 | extern struct clocksource clocksource_jiffies; |
diff --git a/kernel/timer.c b/kernel/timer.c index c2a8ccfc2882..8533c3796082 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -85,7 +85,7 @@ static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = &boot_tvec_bases; | |||
85 | * @j: the time in (absolute) jiffies that should be rounded | 85 | * @j: the time in (absolute) jiffies that should be rounded |
86 | * @cpu: the processor number on which the timeout will happen | 86 | * @cpu: the processor number on which the timeout will happen |
87 | * | 87 | * |
88 | * __round_jiffies rounds an absolute time in the future (in jiffies) | 88 | * __round_jiffies() rounds an absolute time in the future (in jiffies) |
89 | * up or down to (approximately) full seconds. This is useful for timers | 89 | * up or down to (approximately) full seconds. This is useful for timers |
90 | * for which the exact time they fire does not matter too much, as long as | 90 | * for which the exact time they fire does not matter too much, as long as |
91 | * they fire approximately every X seconds. | 91 | * they fire approximately every X seconds. |
@@ -98,7 +98,7 @@ static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = &boot_tvec_bases; | |||
98 | * processors firing at the exact same time, which could lead | 98 | * processors firing at the exact same time, which could lead |
99 | * to lock contention or spurious cache line bouncing. | 99 | * to lock contention or spurious cache line bouncing. |
100 | * | 100 | * |
101 | * The return value is the rounded version of the "j" parameter. | 101 | * The return value is the rounded version of the @j parameter. |
102 | */ | 102 | */ |
103 | unsigned long __round_jiffies(unsigned long j, int cpu) | 103 | unsigned long __round_jiffies(unsigned long j, int cpu) |
104 | { | 104 | { |
@@ -142,7 +142,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies); | |||
142 | * @j: the time in (relative) jiffies that should be rounded | 142 | * @j: the time in (relative) jiffies that should be rounded |
143 | * @cpu: the processor number on which the timeout will happen | 143 | * @cpu: the processor number on which the timeout will happen |
144 | * | 144 | * |
145 | * __round_jiffies_relative rounds a time delta in the future (in jiffies) | 145 | * __round_jiffies_relative() rounds a time delta in the future (in jiffies) |
146 | * up or down to (approximately) full seconds. This is useful for timers | 146 | * up or down to (approximately) full seconds. This is useful for timers |
147 | * for which the exact time they fire does not matter too much, as long as | 147 | * for which the exact time they fire does not matter too much, as long as |
148 | * they fire approximately every X seconds. | 148 | * they fire approximately every X seconds. |
@@ -155,7 +155,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies); | |||
155 | * processors firing at the exact same time, which could lead | 155 | * processors firing at the exact same time, which could lead |
156 | * to lock contention or spurious cache line bouncing. | 156 | * to lock contention or spurious cache line bouncing. |
157 | * | 157 | * |
158 | * The return value is the rounded version of the "j" parameter. | 158 | * The return value is the rounded version of the @j parameter. |
159 | */ | 159 | */ |
160 | unsigned long __round_jiffies_relative(unsigned long j, int cpu) | 160 | unsigned long __round_jiffies_relative(unsigned long j, int cpu) |
161 | { | 161 | { |
@@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies_relative); | |||
173 | * round_jiffies - function to round jiffies to a full second | 173 | * round_jiffies - function to round jiffies to a full second |
174 | * @j: the time in (absolute) jiffies that should be rounded | 174 | * @j: the time in (absolute) jiffies that should be rounded |
175 | * | 175 | * |
176 | * round_jiffies rounds an absolute time in the future (in jiffies) | 176 | * round_jiffies() rounds an absolute time in the future (in jiffies) |
177 | * up or down to (approximately) full seconds. This is useful for timers | 177 | * up or down to (approximately) full seconds. This is useful for timers |
178 | * for which the exact time they fire does not matter too much, as long as | 178 | * for which the exact time they fire does not matter too much, as long as |
179 | * they fire approximately every X seconds. | 179 | * they fire approximately every X seconds. |
@@ -182,7 +182,7 @@ EXPORT_SYMBOL_GPL(__round_jiffies_relative); | |||
182 | * at the same time, rather than at various times spread out. The goal | 182 | * at the same time, rather than at various times spread out. The goal |
183 | * of this is to have the CPU wake up less, which saves power. | 183 | * of this is to have the CPU wake up less, which saves power. |
184 | * | 184 | * |
185 | * The return value is the rounded version of the "j" parameter. | 185 | * The return value is the rounded version of the @j parameter. |
186 | */ | 186 | */ |
187 | unsigned long round_jiffies(unsigned long j) | 187 | unsigned long round_jiffies(unsigned long j) |
188 | { | 188 | { |
@@ -194,7 +194,7 @@ EXPORT_SYMBOL_GPL(round_jiffies); | |||
194 | * round_jiffies_relative - function to round jiffies to a full second | 194 | * round_jiffies_relative - function to round jiffies to a full second |
195 | * @j: the time in (relative) jiffies that should be rounded | 195 | * @j: the time in (relative) jiffies that should be rounded |
196 | * | 196 | * |
197 | * round_jiffies_relative rounds a time delta in the future (in jiffies) | 197 | * round_jiffies_relative() rounds a time delta in the future (in jiffies) |
198 | * up or down to (approximately) full seconds. This is useful for timers | 198 | * up or down to (approximately) full seconds. This is useful for timers |
199 | * for which the exact time they fire does not matter too much, as long as | 199 | * for which the exact time they fire does not matter too much, as long as |
200 | * they fire approximately every X seconds. | 200 | * they fire approximately every X seconds. |
@@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(round_jiffies); | |||
203 | * at the same time, rather than at various times spread out. The goal | 203 | * at the same time, rather than at various times spread out. The goal |
204 | * of this is to have the CPU wake up less, which saves power. | 204 | * of this is to have the CPU wake up less, which saves power. |
205 | * | 205 | * |
206 | * The return value is the rounded version of the "j" parameter. | 206 | * The return value is the rounded version of the @j parameter. |
207 | */ | 207 | */ |
208 | unsigned long round_jiffies_relative(unsigned long j) | 208 | unsigned long round_jiffies_relative(unsigned long j) |
209 | { | 209 | { |
@@ -387,7 +387,7 @@ void add_timer_on(struct timer_list *timer, int cpu) | |||
387 | * @timer: the timer to be modified | 387 | * @timer: the timer to be modified |
388 | * @expires: new timeout in jiffies | 388 | * @expires: new timeout in jiffies |
389 | * | 389 | * |
390 | * mod_timer is a more efficient way to update the expire field of an | 390 | * mod_timer() is a more efficient way to update the expire field of an |
391 | * active timer (if the timer is inactive it will be activated) | 391 | * active timer (if the timer is inactive it will be activated) |
392 | * | 392 | * |
393 | * mod_timer(timer, expires) is equivalent to: | 393 | * mod_timer(timer, expires) is equivalent to: |
@@ -490,7 +490,7 @@ out: | |||
490 | * the timer it also makes sure the handler has finished executing on other | 490 | * the timer it also makes sure the handler has finished executing on other |
491 | * CPUs. | 491 | * CPUs. |
492 | * | 492 | * |
493 | * Synchronization rules: callers must prevent restarting of the timer, | 493 | * Synchronization rules: Callers must prevent restarting of the timer, |
494 | * otherwise this function is meaningless. It must not be called from | 494 | * otherwise this function is meaningless. It must not be called from |
495 | * interrupt contexts. The caller must not hold locks which would prevent | 495 | * interrupt contexts. The caller must not hold locks which would prevent |
496 | * completion of the timer's handler. The timer's handler must not call | 496 | * completion of the timer's handler. The timer's handler must not call |
@@ -1392,17 +1392,16 @@ asmlinkage long sys_gettid(void) | |||
1392 | } | 1392 | } |
1393 | 1393 | ||
1394 | /** | 1394 | /** |
1395 | * sys_sysinfo - fill in sysinfo struct | 1395 | * do_sysinfo - fill in sysinfo struct |
1396 | * @info: pointer to buffer to fill | 1396 | * @info: pointer to buffer to fill |
1397 | */ | 1397 | */ |
1398 | asmlinkage long sys_sysinfo(struct sysinfo __user *info) | 1398 | int do_sysinfo(struct sysinfo *info) |
1399 | { | 1399 | { |
1400 | struct sysinfo val; | ||
1401 | unsigned long mem_total, sav_total; | 1400 | unsigned long mem_total, sav_total; |
1402 | unsigned int mem_unit, bitcount; | 1401 | unsigned int mem_unit, bitcount; |
1403 | unsigned long seq; | 1402 | unsigned long seq; |
1404 | 1403 | ||
1405 | memset((char *)&val, 0, sizeof(struct sysinfo)); | 1404 | memset(info, 0, sizeof(struct sysinfo)); |
1406 | 1405 | ||
1407 | do { | 1406 | do { |
1408 | struct timespec tp; | 1407 | struct timespec tp; |
@@ -1422,17 +1421,17 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info) | |||
1422 | tp.tv_nsec = tp.tv_nsec - NSEC_PER_SEC; | 1421 | tp.tv_nsec = tp.tv_nsec - NSEC_PER_SEC; |
1423 | tp.tv_sec++; | 1422 | tp.tv_sec++; |
1424 | } | 1423 | } |
1425 | val.uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0); | 1424 | info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0); |
1426 | 1425 | ||
1427 | val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT); | 1426 | info->loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT); |
1428 | val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT); | 1427 | info->loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT); |
1429 | val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT); | 1428 | info->loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT); |
1430 | 1429 | ||
1431 | val.procs = nr_threads; | 1430 | info->procs = nr_threads; |
1432 | } while (read_seqretry(&xtime_lock, seq)); | 1431 | } while (read_seqretry(&xtime_lock, seq)); |
1433 | 1432 | ||
1434 | si_meminfo(&val); | 1433 | si_meminfo(info); |
1435 | si_swapinfo(&val); | 1434 | si_swapinfo(info); |
1436 | 1435 | ||
1437 | /* | 1436 | /* |
1438 | * If the sum of all the available memory (i.e. ram + swap) | 1437 | * If the sum of all the available memory (i.e. ram + swap) |
@@ -1443,11 +1442,11 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info) | |||
1443 | * -Erik Andersen <andersee@debian.org> | 1442 | * -Erik Andersen <andersee@debian.org> |
1444 | */ | 1443 | */ |
1445 | 1444 | ||
1446 | mem_total = val.totalram + val.totalswap; | 1445 | mem_total = info->totalram + info->totalswap; |
1447 | if (mem_total < val.totalram || mem_total < val.totalswap) | 1446 | if (mem_total < info->totalram || mem_total < info->totalswap) |
1448 | goto out; | 1447 | goto out; |
1449 | bitcount = 0; | 1448 | bitcount = 0; |
1450 | mem_unit = val.mem_unit; | 1449 | mem_unit = info->mem_unit; |
1451 | while (mem_unit > 1) { | 1450 | while (mem_unit > 1) { |
1452 | bitcount++; | 1451 | bitcount++; |
1453 | mem_unit >>= 1; | 1452 | mem_unit >>= 1; |
@@ -1459,22 +1458,31 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info) | |||
1459 | 1458 | ||
1460 | /* | 1459 | /* |
1461 | * If mem_total did not overflow, multiply all memory values by | 1460 | * If mem_total did not overflow, multiply all memory values by |
1462 | * val.mem_unit and set it to 1. This leaves things compatible | 1461 | * info->mem_unit and set it to 1. This leaves things compatible |
1463 | * with 2.2.x, and also retains compatibility with earlier 2.4.x | 1462 | * with 2.2.x, and also retains compatibility with earlier 2.4.x |
1464 | * kernels... | 1463 | * kernels... |
1465 | */ | 1464 | */ |
1466 | 1465 | ||
1467 | val.mem_unit = 1; | 1466 | info->mem_unit = 1; |
1468 | val.totalram <<= bitcount; | 1467 | info->totalram <<= bitcount; |
1469 | val.freeram <<= bitcount; | 1468 | info->freeram <<= bitcount; |
1470 | val.sharedram <<= bitcount; | 1469 | info->sharedram <<= bitcount; |
1471 | val.bufferram <<= bitcount; | 1470 | info->bufferram <<= bitcount; |
1472 | val.totalswap <<= bitcount; | 1471 | info->totalswap <<= bitcount; |
1473 | val.freeswap <<= bitcount; | 1472 | info->freeswap <<= bitcount; |
1474 | val.totalhigh <<= bitcount; | 1473 | info->totalhigh <<= bitcount; |
1475 | val.freehigh <<= bitcount; | 1474 | info->freehigh <<= bitcount; |
1475 | |||
1476 | out: | ||
1477 | return 0; | ||
1478 | } | ||
1479 | |||
1480 | asmlinkage long sys_sysinfo(struct sysinfo __user *info) | ||
1481 | { | ||
1482 | struct sysinfo val; | ||
1483 | |||
1484 | do_sysinfo(&val); | ||
1476 | 1485 | ||
1477 | out: | ||
1478 | if (copy_to_user(info, &val, sizeof(struct sysinfo))) | 1486 | if (copy_to_user(info, &val, sizeof(struct sysinfo))) |
1479 | return -EFAULT; | 1487 | return -EFAULT; |
1480 | 1488 | ||
@@ -1624,7 +1632,7 @@ struct time_interpolator *time_interpolator __read_mostly; | |||
1624 | static struct time_interpolator *time_interpolator_list __read_mostly; | 1632 | static struct time_interpolator *time_interpolator_list __read_mostly; |
1625 | static DEFINE_SPINLOCK(time_interpolator_lock); | 1633 | static DEFINE_SPINLOCK(time_interpolator_lock); |
1626 | 1634 | ||
1627 | static inline u64 time_interpolator_get_cycles(unsigned int src) | 1635 | static inline cycles_t time_interpolator_get_cycles(unsigned int src) |
1628 | { | 1636 | { |
1629 | unsigned long (*x)(void); | 1637 | unsigned long (*x)(void); |
1630 | 1638 | ||
@@ -1650,8 +1658,8 @@ static inline u64 time_interpolator_get_counter(int writelock) | |||
1650 | 1658 | ||
1651 | if (time_interpolator->jitter) | 1659 | if (time_interpolator->jitter) |
1652 | { | 1660 | { |
1653 | u64 lcycle; | 1661 | cycles_t lcycle; |
1654 | u64 now; | 1662 | cycles_t now; |
1655 | 1663 | ||
1656 | do { | 1664 | do { |
1657 | lcycle = time_interpolator->last_cycle; | 1665 | lcycle = time_interpolator->last_cycle; |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index a3da07c5af28..020d1fff57dc 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -656,8 +656,7 @@ void flush_scheduled_work(void) | |||
656 | EXPORT_SYMBOL(flush_scheduled_work); | 656 | EXPORT_SYMBOL(flush_scheduled_work); |
657 | 657 | ||
658 | /** | 658 | /** |
659 | * cancel_rearming_delayed_workqueue - reliably kill off a delayed | 659 | * cancel_rearming_delayed_workqueue - reliably kill off a delayed work whose handler rearms the delayed work. |
660 | * work whose handler rearms the delayed work. | ||
661 | * @wq: the controlling workqueue structure | 660 | * @wq: the controlling workqueue structure |
662 | * @dwork: the delayed work struct | 661 | * @dwork: the delayed work struct |
663 | */ | 662 | */ |
@@ -670,8 +669,7 @@ void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | |||
670 | EXPORT_SYMBOL(cancel_rearming_delayed_workqueue); | 669 | EXPORT_SYMBOL(cancel_rearming_delayed_workqueue); |
671 | 670 | ||
672 | /** | 671 | /** |
673 | * cancel_rearming_delayed_work - reliably kill off a delayed keventd | 672 | * cancel_rearming_delayed_work - reliably kill off a delayed keventd work whose handler rearms the delayed work. |
674 | * work whose handler rearms the delayed work. | ||
675 | * @dwork: the delayed work struct | 673 | * @dwork: the delayed work struct |
676 | */ | 674 | */ |
677 | void cancel_rearming_delayed_work(struct delayed_work *dwork) | 675 | void cancel_rearming_delayed_work(struct delayed_work *dwork) |
diff --git a/lib/Kconfig b/lib/Kconfig index 9b03581cdecb..384249915047 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
@@ -101,9 +101,14 @@ config TEXTSEARCH_FSM | |||
101 | config PLIST | 101 | config PLIST |
102 | boolean | 102 | boolean |
103 | 103 | ||
104 | config IOMAP_COPY | 104 | config HAS_IOMEM |
105 | boolean | 105 | boolean |
106 | depends on !UML | 106 | depends on !NO_IOMEM |
107 | default y | ||
108 | |||
109 | config HAS_IOPORT | ||
110 | boolean | ||
111 | depends on HAS_IOMEM && !NO_IOPORT | ||
107 | default y | 112 | default y |
108 | 113 | ||
109 | endmenu | 114 | endmenu |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 5c2681875b9a..356a5ab8279c 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -181,19 +181,11 @@ config DEBUG_MUTEXES | |||
181 | This feature allows mutex semantics violations to be detected and | 181 | This feature allows mutex semantics violations to be detected and |
182 | reported. | 182 | reported. |
183 | 183 | ||
184 | config DEBUG_RWSEMS | ||
185 | bool "RW-sem debugging: basic checks" | ||
186 | depends on DEBUG_KERNEL | ||
187 | help | ||
188 | This feature allows read-write semaphore semantics violations to | ||
189 | be detected and reported. | ||
190 | |||
191 | config DEBUG_LOCK_ALLOC | 184 | config DEBUG_LOCK_ALLOC |
192 | bool "Lock debugging: detect incorrect freeing of live locks" | 185 | bool "Lock debugging: detect incorrect freeing of live locks" |
193 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 186 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
194 | select DEBUG_SPINLOCK | 187 | select DEBUG_SPINLOCK |
195 | select DEBUG_MUTEXES | 188 | select DEBUG_MUTEXES |
196 | select DEBUG_RWSEMS | ||
197 | select LOCKDEP | 189 | select LOCKDEP |
198 | help | 190 | help |
199 | This feature will check whether any held lock (spinlock, rwlock, | 191 | This feature will check whether any held lock (spinlock, rwlock, |
@@ -209,7 +201,6 @@ config PROVE_LOCKING | |||
209 | select LOCKDEP | 201 | select LOCKDEP |
210 | select DEBUG_SPINLOCK | 202 | select DEBUG_SPINLOCK |
211 | select DEBUG_MUTEXES | 203 | select DEBUG_MUTEXES |
212 | select DEBUG_RWSEMS | ||
213 | select DEBUG_LOCK_ALLOC | 204 | select DEBUG_LOCK_ALLOC |
214 | default n | 205 | default n |
215 | help | 206 | help |
diff --git a/lib/Makefile b/lib/Makefile index 3b605da448f4..992a39ef9ffd 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y := ctype.o string.o vsprintf.o cmdline.o \ | 5 | lib-y := ctype.o string.o vsprintf.o cmdline.o \ |
6 | bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ | 6 | rbtree.o radix-tree.o dump_stack.o \ |
7 | idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ | 7 | idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ |
8 | sha1.o irq_regs.o reciprocal_div.o | 8 | sha1.o irq_regs.o reciprocal_div.o |
9 | 9 | ||
@@ -12,14 +12,15 @@ lib-$(CONFIG_SMP) += cpumask.o | |||
12 | 12 | ||
13 | lib-y += kobject.o kref.o kobject_uevent.o klist.o | 13 | lib-y += kobject.o kref.o kobject_uevent.o klist.o |
14 | 14 | ||
15 | obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o iomap.o | 15 | obj-y += sort.o parser.o halfmd4.o debug_locks.o random32.o bust_spinlocks.o |
16 | 16 | ||
17 | ifeq ($(CONFIG_DEBUG_KOBJECT),y) | 17 | ifeq ($(CONFIG_DEBUG_KOBJECT),y) |
18 | CFLAGS_kobject.o += -DDEBUG | 18 | CFLAGS_kobject.o += -DDEBUG |
19 | CFLAGS_kobject_uevent.o += -DDEBUG | 19 | CFLAGS_kobject_uevent.o += -DDEBUG |
20 | endif | 20 | endif |
21 | 21 | ||
22 | obj-$(CONFIG_IOMAP_COPY) += iomap_copy.o | 22 | obj-$(CONFIG_GENERIC_IOMAP) += iomap.o |
23 | obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o | ||
23 | obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o | 24 | obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o |
24 | obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o | 25 | obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o |
25 | lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o | 26 | lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o |
diff --git a/lib/bitmap.c b/lib/bitmap.c index 037fa9aa2ed7..ee6e58fce8f7 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -95,7 +95,7 @@ void __bitmap_complement(unsigned long *dst, const unsigned long *src, int bits) | |||
95 | } | 95 | } |
96 | EXPORT_SYMBOL(__bitmap_complement); | 96 | EXPORT_SYMBOL(__bitmap_complement); |
97 | 97 | ||
98 | /* | 98 | /** |
99 | * __bitmap_shift_right - logical right shift of the bits in a bitmap | 99 | * __bitmap_shift_right - logical right shift of the bits in a bitmap |
100 | * @dst - destination bitmap | 100 | * @dst - destination bitmap |
101 | * @src - source bitmap | 101 | * @src - source bitmap |
@@ -139,7 +139,7 @@ void __bitmap_shift_right(unsigned long *dst, | |||
139 | EXPORT_SYMBOL(__bitmap_shift_right); | 139 | EXPORT_SYMBOL(__bitmap_shift_right); |
140 | 140 | ||
141 | 141 | ||
142 | /* | 142 | /** |
143 | * __bitmap_shift_left - logical left shift of the bits in a bitmap | 143 | * __bitmap_shift_left - logical left shift of the bits in a bitmap |
144 | * @dst - destination bitmap | 144 | * @dst - destination bitmap |
145 | * @src - source bitmap | 145 | * @src - source bitmap |
@@ -529,7 +529,7 @@ int bitmap_parselist(const char *bp, unsigned long *maskp, int nmaskbits) | |||
529 | } | 529 | } |
530 | EXPORT_SYMBOL(bitmap_parselist); | 530 | EXPORT_SYMBOL(bitmap_parselist); |
531 | 531 | ||
532 | /* | 532 | /** |
533 | * bitmap_pos_to_ord(buf, pos, bits) | 533 | * bitmap_pos_to_ord(buf, pos, bits) |
534 | * @buf: pointer to a bitmap | 534 | * @buf: pointer to a bitmap |
535 | * @pos: a bit position in @buf (0 <= @pos < @bits) | 535 | * @pos: a bit position in @buf (0 <= @pos < @bits) |
@@ -804,7 +804,7 @@ EXPORT_SYMBOL(bitmap_find_free_region); | |||
804 | * @pos: beginning of bit region to release | 804 | * @pos: beginning of bit region to release |
805 | * @order: region size (log base 2 of number of bits) to release | 805 | * @order: region size (log base 2 of number of bits) to release |
806 | * | 806 | * |
807 | * This is the complement to __bitmap_find_free_region and releases | 807 | * This is the complement to __bitmap_find_free_region() and releases |
808 | * the found region (by clearing it in the bitmap). | 808 | * the found region (by clearing it in the bitmap). |
809 | * | 809 | * |
810 | * No return value. | 810 | * No return value. |
diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c index a2055bc3ef62..accb35658169 100644 --- a/lib/bust_spinlocks.c +++ b/lib/bust_spinlocks.c | |||
@@ -14,24 +14,16 @@ | |||
14 | #include <linux/vt_kern.h> | 14 | #include <linux/vt_kern.h> |
15 | 15 | ||
16 | 16 | ||
17 | void bust_spinlocks(int yes) | 17 | void __attribute__((weak)) bust_spinlocks(int yes) |
18 | { | 18 | { |
19 | if (yes) { | 19 | if (yes) { |
20 | oops_in_progress = 1; | 20 | oops_in_progress = 1; |
21 | } else { | 21 | } else { |
22 | int loglevel_save = console_loglevel; | ||
23 | #ifdef CONFIG_VT | 22 | #ifdef CONFIG_VT |
24 | unblank_screen(); | 23 | unblank_screen(); |
25 | #endif | 24 | #endif |
26 | oops_in_progress = 0; | 25 | oops_in_progress = 0; |
27 | /* | 26 | wake_up_klogd(); |
28 | * OK, the message is on the console. Now we call printk() | ||
29 | * without oops_in_progress set so that printk() will give klogd | ||
30 | * and the blanked console a poke. Hold onto your hats... | ||
31 | */ | ||
32 | console_loglevel = 15; /* NMI oopser may have shut the console up */ | ||
33 | printk(" "); | ||
34 | console_loglevel = loglevel_save; | ||
35 | } | 27 | } |
36 | } | 28 | } |
37 | 29 | ||
diff --git a/lib/cmdline.c b/lib/cmdline.c index 8a5b5303bd4f..f596c08d213a 100644 --- a/lib/cmdline.c +++ b/lib/cmdline.c | |||
@@ -43,10 +43,10 @@ static int get_range(char **str, int *pint) | |||
43 | * comma as well. | 43 | * comma as well. |
44 | * | 44 | * |
45 | * Return values: | 45 | * Return values: |
46 | * 0 : no int in string | 46 | * 0 - no int in string |
47 | * 1 : int found, no subsequent comma | 47 | * 1 - int found, no subsequent comma |
48 | * 2 : int found including a subsequent comma | 48 | * 2 - int found including a subsequent comma |
49 | * 3 : hyphen found to denote a range | 49 | * 3 - hyphen found to denote a range |
50 | */ | 50 | */ |
51 | 51 | ||
52 | int get_option (char **str, int *pint) | 52 | int get_option (char **str, int *pint) |
diff --git a/lib/devres.c b/lib/devres.c new file mode 100644 index 000000000000..2a668dd7cac7 --- /dev/null +++ b/lib/devres.c | |||
@@ -0,0 +1,300 @@ | |||
1 | #include <linux/pci.h> | ||
2 | #include <linux/io.h> | ||
3 | #include <linux/module.h> | ||
4 | |||
5 | static void devm_ioremap_release(struct device *dev, void *res) | ||
6 | { | ||
7 | iounmap(*(void __iomem **)res); | ||
8 | } | ||
9 | |||
10 | static int devm_ioremap_match(struct device *dev, void *res, void *match_data) | ||
11 | { | ||
12 | return *(void **)res == match_data; | ||
13 | } | ||
14 | |||
15 | /** | ||
16 | * devm_ioremap - Managed ioremap() | ||
17 | * @dev: Generic device to remap IO address for | ||
18 | * @offset: BUS offset to map | ||
19 | * @size: Size of map | ||
20 | * | ||
21 | * Managed ioremap(). Map is automatically unmapped on driver detach. | ||
22 | */ | ||
23 | void __iomem *devm_ioremap(struct device *dev, unsigned long offset, | ||
24 | unsigned long size) | ||
25 | { | ||
26 | void __iomem **ptr, *addr; | ||
27 | |||
28 | ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL); | ||
29 | if (!ptr) | ||
30 | return NULL; | ||
31 | |||
32 | addr = ioremap(offset, size); | ||
33 | if (addr) { | ||
34 | *ptr = addr; | ||
35 | devres_add(dev, ptr); | ||
36 | } else | ||
37 | devres_free(ptr); | ||
38 | |||
39 | return addr; | ||
40 | } | ||
41 | EXPORT_SYMBOL(devm_ioremap); | ||
42 | |||
43 | /** | ||
44 | * devm_ioremap_nocache - Managed ioremap_nocache() | ||
45 | * @dev: Generic device to remap IO address for | ||
46 | * @offset: BUS offset to map | ||
47 | * @size: Size of map | ||
48 | * | ||
49 | * Managed ioremap_nocache(). Map is automatically unmapped on driver | ||
50 | * detach. | ||
51 | */ | ||
52 | void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset, | ||
53 | unsigned long size) | ||
54 | { | ||
55 | void __iomem **ptr, *addr; | ||
56 | |||
57 | ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL); | ||
58 | if (!ptr) | ||
59 | return NULL; | ||
60 | |||
61 | addr = ioremap_nocache(offset, size); | ||
62 | if (addr) { | ||
63 | *ptr = addr; | ||
64 | devres_add(dev, ptr); | ||
65 | } else | ||
66 | devres_free(ptr); | ||
67 | |||
68 | return addr; | ||
69 | } | ||
70 | EXPORT_SYMBOL(devm_ioremap_nocache); | ||
71 | |||
72 | /** | ||
73 | * devm_iounmap - Managed iounmap() | ||
74 | * @dev: Generic device to unmap for | ||
75 | * @addr: Address to unmap | ||
76 | * | ||
77 | * Managed iounmap(). @addr must have been mapped using devm_ioremap*(). | ||
78 | */ | ||
79 | void devm_iounmap(struct device *dev, void __iomem *addr) | ||
80 | { | ||
81 | iounmap(addr); | ||
82 | WARN_ON(devres_destroy(dev, devm_ioremap_release, devm_ioremap_match, | ||
83 | (void *)addr)); | ||
84 | } | ||
85 | EXPORT_SYMBOL(devm_iounmap); | ||
86 | |||
87 | #ifdef CONFIG_HAS_IOPORT | ||
88 | /* | ||
89 | * Generic iomap devres | ||
90 | */ | ||
91 | static void devm_ioport_map_release(struct device *dev, void *res) | ||
92 | { | ||
93 | ioport_unmap(*(void __iomem **)res); | ||
94 | } | ||
95 | |||
96 | static int devm_ioport_map_match(struct device *dev, void *res, | ||
97 | void *match_data) | ||
98 | { | ||
99 | return *(void **)res == match_data; | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * devm_ioport_map - Managed ioport_map() | ||
104 | * @dev: Generic device to map ioport for | ||
105 | * @port: Port to map | ||
106 | * @nr: Number of ports to map | ||
107 | * | ||
108 | * Managed ioport_map(). Map is automatically unmapped on driver | ||
109 | * detach. | ||
110 | */ | ||
111 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, | ||
112 | unsigned int nr) | ||
113 | { | ||
114 | void __iomem **ptr, *addr; | ||
115 | |||
116 | ptr = devres_alloc(devm_ioport_map_release, sizeof(*ptr), GFP_KERNEL); | ||
117 | if (!ptr) | ||
118 | return NULL; | ||
119 | |||
120 | addr = ioport_map(port, nr); | ||
121 | if (addr) { | ||
122 | *ptr = addr; | ||
123 | devres_add(dev, ptr); | ||
124 | } else | ||
125 | devres_free(ptr); | ||
126 | |||
127 | return addr; | ||
128 | } | ||
129 | EXPORT_SYMBOL(devm_ioport_map); | ||
130 | |||
131 | /** | ||
132 | * devm_ioport_unmap - Managed ioport_unmap() | ||
133 | * @dev: Generic device to unmap for | ||
134 | * @addr: Address to unmap | ||
135 | * | ||
136 | * Managed ioport_unmap(). @addr must have been mapped using | ||
137 | * devm_ioport_map(). | ||
138 | */ | ||
139 | void devm_ioport_unmap(struct device *dev, void __iomem *addr) | ||
140 | { | ||
141 | ioport_unmap(addr); | ||
142 | WARN_ON(devres_destroy(dev, devm_ioport_map_release, | ||
143 | devm_ioport_map_match, (void *)addr)); | ||
144 | } | ||
145 | EXPORT_SYMBOL(devm_ioport_unmap); | ||
146 | |||
147 | #ifdef CONFIG_PCI | ||
148 | /* | ||
149 | * PCI iomap devres | ||
150 | */ | ||
151 | #define PCIM_IOMAP_MAX PCI_ROM_RESOURCE | ||
152 | |||
153 | struct pcim_iomap_devres { | ||
154 | void __iomem *table[PCIM_IOMAP_MAX]; | ||
155 | }; | ||
156 | |||
157 | static void pcim_iomap_release(struct device *gendev, void *res) | ||
158 | { | ||
159 | struct pci_dev *dev = container_of(gendev, struct pci_dev, dev); | ||
160 | struct pcim_iomap_devres *this = res; | ||
161 | int i; | ||
162 | |||
163 | for (i = 0; i < PCIM_IOMAP_MAX; i++) | ||
164 | if (this->table[i]) | ||
165 | pci_iounmap(dev, this->table[i]); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * pcim_iomap_table - access iomap allocation table | ||
170 | * @pdev: PCI device to access iomap table for | ||
171 | * | ||
172 | * Access iomap allocation table for @dev. If iomap table doesn't | ||
173 | * exist and @pdev is managed, it will be allocated. All iomaps | ||
174 | * recorded in the iomap table are automatically unmapped on driver | ||
175 | * detach. | ||
176 | * | ||
177 | * This function might sleep when the table is first allocated but can | ||
178 | * be safely called without context and guaranteed to succed once | ||
179 | * allocated. | ||
180 | */ | ||
181 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev) | ||
182 | { | ||
183 | struct pcim_iomap_devres *dr, *new_dr; | ||
184 | |||
185 | dr = devres_find(&pdev->dev, pcim_iomap_release, NULL, NULL); | ||
186 | if (dr) | ||
187 | return dr->table; | ||
188 | |||
189 | new_dr = devres_alloc(pcim_iomap_release, sizeof(*new_dr), GFP_KERNEL); | ||
190 | if (!new_dr) | ||
191 | return NULL; | ||
192 | dr = devres_get(&pdev->dev, new_dr, NULL, NULL); | ||
193 | return dr->table; | ||
194 | } | ||
195 | EXPORT_SYMBOL(pcim_iomap_table); | ||
196 | |||
197 | /** | ||
198 | * pcim_iomap - Managed pcim_iomap() | ||
199 | * @pdev: PCI device to iomap for | ||
200 | * @bar: BAR to iomap | ||
201 | * @maxlen: Maximum length of iomap | ||
202 | * | ||
203 | * Managed pci_iomap(). Map is automatically unmapped on driver | ||
204 | * detach. | ||
205 | */ | ||
206 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen) | ||
207 | { | ||
208 | void __iomem **tbl; | ||
209 | |||
210 | BUG_ON(bar >= PCIM_IOMAP_MAX); | ||
211 | |||
212 | tbl = (void __iomem **)pcim_iomap_table(pdev); | ||
213 | if (!tbl || tbl[bar]) /* duplicate mappings not allowed */ | ||
214 | return NULL; | ||
215 | |||
216 | tbl[bar] = pci_iomap(pdev, bar, maxlen); | ||
217 | return tbl[bar]; | ||
218 | } | ||
219 | EXPORT_SYMBOL(pcim_iomap); | ||
220 | |||
221 | /** | ||
222 | * pcim_iounmap - Managed pci_iounmap() | ||
223 | * @pdev: PCI device to iounmap for | ||
224 | * @addr: Address to unmap | ||
225 | * | ||
226 | * Managed pci_iounmap(). @addr must have been mapped using pcim_iomap(). | ||
227 | */ | ||
228 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr) | ||
229 | { | ||
230 | void __iomem **tbl; | ||
231 | int i; | ||
232 | |||
233 | pci_iounmap(pdev, addr); | ||
234 | |||
235 | tbl = (void __iomem **)pcim_iomap_table(pdev); | ||
236 | BUG_ON(!tbl); | ||
237 | |||
238 | for (i = 0; i < PCIM_IOMAP_MAX; i++) | ||
239 | if (tbl[i] == addr) { | ||
240 | tbl[i] = NULL; | ||
241 | return; | ||
242 | } | ||
243 | WARN_ON(1); | ||
244 | } | ||
245 | EXPORT_SYMBOL(pcim_iounmap); | ||
246 | |||
247 | /** | ||
248 | * pcim_iomap_regions - Request and iomap PCI BARs | ||
249 | * @pdev: PCI device to map IO resources for | ||
250 | * @mask: Mask of BARs to request and iomap | ||
251 | * @name: Name used when requesting regions | ||
252 | * | ||
253 | * Request and iomap regions specified by @mask. | ||
254 | */ | ||
255 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name) | ||
256 | { | ||
257 | void __iomem * const *iomap; | ||
258 | int i, rc; | ||
259 | |||
260 | iomap = pcim_iomap_table(pdev); | ||
261 | if (!iomap) | ||
262 | return -ENOMEM; | ||
263 | |||
264 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
265 | unsigned long len; | ||
266 | |||
267 | if (!(mask & (1 << i))) | ||
268 | continue; | ||
269 | |||
270 | rc = -EINVAL; | ||
271 | len = pci_resource_len(pdev, i); | ||
272 | if (!len) | ||
273 | goto err_inval; | ||
274 | |||
275 | rc = pci_request_region(pdev, i, name); | ||
276 | if (rc) | ||
277 | goto err_region; | ||
278 | |||
279 | rc = -ENOMEM; | ||
280 | if (!pcim_iomap(pdev, i, 0)) | ||
281 | goto err_iomap; | ||
282 | } | ||
283 | |||
284 | return 0; | ||
285 | |||
286 | err_iomap: | ||
287 | pcim_iounmap(pdev, iomap[i]); | ||
288 | err_region: | ||
289 | pci_release_region(pdev, i); | ||
290 | err_inval: | ||
291 | while (--i >= 0) { | ||
292 | pcim_iounmap(pdev, iomap[i]); | ||
293 | pci_release_region(pdev, i); | ||
294 | } | ||
295 | |||
296 | return rc; | ||
297 | } | ||
298 | EXPORT_SYMBOL(pcim_iomap_regions); | ||
299 | #endif | ||
300 | #endif | ||
@@ -329,8 +329,8 @@ static void sub_remove(struct idr *idp, int shift, int id) | |||
329 | 329 | ||
330 | /** | 330 | /** |
331 | * idr_remove - remove the given id and free it's slot | 331 | * idr_remove - remove the given id and free it's slot |
332 | * idp: idr handle | 332 | * @idp: idr handle |
333 | * id: uniqueue key | 333 | * @id: unique key |
334 | */ | 334 | */ |
335 | void idr_remove(struct idr *idp, int id) | 335 | void idr_remove(struct idr *idp, int id) |
336 | { | 336 | { |
diff --git a/lib/iomap.c b/lib/iomap.c index 4990c736bc4b..4d43f37c0154 100644 --- a/lib/iomap.c +++ b/lib/iomap.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <linux/pci.h> | 6 | #include <linux/pci.h> |
7 | #include <linux/io.h> | 7 | #include <linux/io.h> |
8 | 8 | ||
9 | #ifdef CONFIG_GENERIC_IOMAP | ||
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
11 | 10 | ||
12 | /* | 11 | /* |
@@ -256,298 +255,3 @@ void pci_iounmap(struct pci_dev *dev, void __iomem * addr) | |||
256 | } | 255 | } |
257 | EXPORT_SYMBOL(pci_iomap); | 256 | EXPORT_SYMBOL(pci_iomap); |
258 | EXPORT_SYMBOL(pci_iounmap); | 257 | EXPORT_SYMBOL(pci_iounmap); |
259 | |||
260 | #endif /* CONFIG_GENERIC_IOMAP */ | ||
261 | |||
262 | /* | ||
263 | * Generic iomap devres | ||
264 | */ | ||
265 | static void devm_ioport_map_release(struct device *dev, void *res) | ||
266 | { | ||
267 | ioport_unmap(*(void __iomem **)res); | ||
268 | } | ||
269 | |||
270 | static int devm_ioport_map_match(struct device *dev, void *res, | ||
271 | void *match_data) | ||
272 | { | ||
273 | return *(void **)res == match_data; | ||
274 | } | ||
275 | |||
276 | /** | ||
277 | * devm_ioport_map - Managed ioport_map() | ||
278 | * @dev: Generic device to map ioport for | ||
279 | * @port: Port to map | ||
280 | * @nr: Number of ports to map | ||
281 | * | ||
282 | * Managed ioport_map(). Map is automatically unmapped on driver | ||
283 | * detach. | ||
284 | */ | ||
285 | void __iomem * devm_ioport_map(struct device *dev, unsigned long port, | ||
286 | unsigned int nr) | ||
287 | { | ||
288 | void __iomem **ptr, *addr; | ||
289 | |||
290 | ptr = devres_alloc(devm_ioport_map_release, sizeof(*ptr), GFP_KERNEL); | ||
291 | if (!ptr) | ||
292 | return NULL; | ||
293 | |||
294 | addr = ioport_map(port, nr); | ||
295 | if (addr) { | ||
296 | *ptr = addr; | ||
297 | devres_add(dev, ptr); | ||
298 | } else | ||
299 | devres_free(ptr); | ||
300 | |||
301 | return addr; | ||
302 | } | ||
303 | EXPORT_SYMBOL(devm_ioport_map); | ||
304 | |||
305 | /** | ||
306 | * devm_ioport_unmap - Managed ioport_unmap() | ||
307 | * @dev: Generic device to unmap for | ||
308 | * @addr: Address to unmap | ||
309 | * | ||
310 | * Managed ioport_unmap(). @addr must have been mapped using | ||
311 | * devm_ioport_map(). | ||
312 | */ | ||
313 | void devm_ioport_unmap(struct device *dev, void __iomem *addr) | ||
314 | { | ||
315 | ioport_unmap(addr); | ||
316 | WARN_ON(devres_destroy(dev, devm_ioport_map_release, | ||
317 | devm_ioport_map_match, (void *)addr)); | ||
318 | } | ||
319 | EXPORT_SYMBOL(devm_ioport_unmap); | ||
320 | |||
321 | static void devm_ioremap_release(struct device *dev, void *res) | ||
322 | { | ||
323 | iounmap(*(void __iomem **)res); | ||
324 | } | ||
325 | |||
326 | static int devm_ioremap_match(struct device *dev, void *res, void *match_data) | ||
327 | { | ||
328 | return *(void **)res == match_data; | ||
329 | } | ||
330 | |||
331 | /** | ||
332 | * devm_ioremap - Managed ioremap() | ||
333 | * @dev: Generic device to remap IO address for | ||
334 | * @offset: BUS offset to map | ||
335 | * @size: Size of map | ||
336 | * | ||
337 | * Managed ioremap(). Map is automatically unmapped on driver detach. | ||
338 | */ | ||
339 | void __iomem *devm_ioremap(struct device *dev, unsigned long offset, | ||
340 | unsigned long size) | ||
341 | { | ||
342 | void __iomem **ptr, *addr; | ||
343 | |||
344 | ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL); | ||
345 | if (!ptr) | ||
346 | return NULL; | ||
347 | |||
348 | addr = ioremap(offset, size); | ||
349 | if (addr) { | ||
350 | *ptr = addr; | ||
351 | devres_add(dev, ptr); | ||
352 | } else | ||
353 | devres_free(ptr); | ||
354 | |||
355 | return addr; | ||
356 | } | ||
357 | EXPORT_SYMBOL(devm_ioremap); | ||
358 | |||
359 | /** | ||
360 | * devm_ioremap_nocache - Managed ioremap_nocache() | ||
361 | * @dev: Generic device to remap IO address for | ||
362 | * @offset: BUS offset to map | ||
363 | * @size: Size of map | ||
364 | * | ||
365 | * Managed ioremap_nocache(). Map is automatically unmapped on driver | ||
366 | * detach. | ||
367 | */ | ||
368 | void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset, | ||
369 | unsigned long size) | ||
370 | { | ||
371 | void __iomem **ptr, *addr; | ||
372 | |||
373 | ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL); | ||
374 | if (!ptr) | ||
375 | return NULL; | ||
376 | |||
377 | addr = ioremap_nocache(offset, size); | ||
378 | if (addr) { | ||
379 | *ptr = addr; | ||
380 | devres_add(dev, ptr); | ||
381 | } else | ||
382 | devres_free(ptr); | ||
383 | |||
384 | return addr; | ||
385 | } | ||
386 | EXPORT_SYMBOL(devm_ioremap_nocache); | ||
387 | |||
388 | /** | ||
389 | * devm_iounmap - Managed iounmap() | ||
390 | * @dev: Generic device to unmap for | ||
391 | * @addr: Address to unmap | ||
392 | * | ||
393 | * Managed iounmap(). @addr must have been mapped using devm_ioremap*(). | ||
394 | */ | ||
395 | void devm_iounmap(struct device *dev, void __iomem *addr) | ||
396 | { | ||
397 | iounmap(addr); | ||
398 | WARN_ON(devres_destroy(dev, devm_ioremap_release, devm_ioremap_match, | ||
399 | (void *)addr)); | ||
400 | } | ||
401 | EXPORT_SYMBOL(devm_iounmap); | ||
402 | |||
403 | /* | ||
404 | * PCI iomap devres | ||
405 | */ | ||
406 | #define PCIM_IOMAP_MAX PCI_ROM_RESOURCE | ||
407 | |||
408 | struct pcim_iomap_devres { | ||
409 | void __iomem *table[PCIM_IOMAP_MAX]; | ||
410 | }; | ||
411 | |||
412 | static void pcim_iomap_release(struct device *gendev, void *res) | ||
413 | { | ||
414 | struct pci_dev *dev = container_of(gendev, struct pci_dev, dev); | ||
415 | struct pcim_iomap_devres *this = res; | ||
416 | int i; | ||
417 | |||
418 | for (i = 0; i < PCIM_IOMAP_MAX; i++) | ||
419 | if (this->table[i]) | ||
420 | pci_iounmap(dev, this->table[i]); | ||
421 | } | ||
422 | |||
423 | /** | ||
424 | * pcim_iomap_table - access iomap allocation table | ||
425 | * @pdev: PCI device to access iomap table for | ||
426 | * | ||
427 | * Access iomap allocation table for @dev. If iomap table doesn't | ||
428 | * exist and @pdev is managed, it will be allocated. All iomaps | ||
429 | * recorded in the iomap table are automatically unmapped on driver | ||
430 | * detach. | ||
431 | * | ||
432 | * This function might sleep when the table is first allocated but can | ||
433 | * be safely called without context and guaranteed to succed once | ||
434 | * allocated. | ||
435 | */ | ||
436 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev) | ||
437 | { | ||
438 | struct pcim_iomap_devres *dr, *new_dr; | ||
439 | |||
440 | dr = devres_find(&pdev->dev, pcim_iomap_release, NULL, NULL); | ||
441 | if (dr) | ||
442 | return dr->table; | ||
443 | |||
444 | new_dr = devres_alloc(pcim_iomap_release, sizeof(*new_dr), GFP_KERNEL); | ||
445 | if (!new_dr) | ||
446 | return NULL; | ||
447 | dr = devres_get(&pdev->dev, new_dr, NULL, NULL); | ||
448 | return dr->table; | ||
449 | } | ||
450 | EXPORT_SYMBOL(pcim_iomap_table); | ||
451 | |||
452 | /** | ||
453 | * pcim_iomap - Managed pcim_iomap() | ||
454 | * @pdev: PCI device to iomap for | ||
455 | * @bar: BAR to iomap | ||
456 | * @maxlen: Maximum length of iomap | ||
457 | * | ||
458 | * Managed pci_iomap(). Map is automatically unmapped on driver | ||
459 | * detach. | ||
460 | */ | ||
461 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen) | ||
462 | { | ||
463 | void __iomem **tbl; | ||
464 | |||
465 | BUG_ON(bar >= PCIM_IOMAP_MAX); | ||
466 | |||
467 | tbl = (void __iomem **)pcim_iomap_table(pdev); | ||
468 | if (!tbl || tbl[bar]) /* duplicate mappings not allowed */ | ||
469 | return NULL; | ||
470 | |||
471 | tbl[bar] = pci_iomap(pdev, bar, maxlen); | ||
472 | return tbl[bar]; | ||
473 | } | ||
474 | EXPORT_SYMBOL(pcim_iomap); | ||
475 | |||
476 | /** | ||
477 | * pcim_iounmap - Managed pci_iounmap() | ||
478 | * @pdev: PCI device to iounmap for | ||
479 | * @addr: Address to unmap | ||
480 | * | ||
481 | * Managed pci_iounmap(). @addr must have been mapped using pcim_iomap(). | ||
482 | */ | ||
483 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr) | ||
484 | { | ||
485 | void __iomem **tbl; | ||
486 | int i; | ||
487 | |||
488 | pci_iounmap(pdev, addr); | ||
489 | |||
490 | tbl = (void __iomem **)pcim_iomap_table(pdev); | ||
491 | BUG_ON(!tbl); | ||
492 | |||
493 | for (i = 0; i < PCIM_IOMAP_MAX; i++) | ||
494 | if (tbl[i] == addr) { | ||
495 | tbl[i] = NULL; | ||
496 | return; | ||
497 | } | ||
498 | WARN_ON(1); | ||
499 | } | ||
500 | EXPORT_SYMBOL(pcim_iounmap); | ||
501 | |||
502 | /** | ||
503 | * pcim_iomap_regions - Request and iomap PCI BARs | ||
504 | * @pdev: PCI device to map IO resources for | ||
505 | * @mask: Mask of BARs to request and iomap | ||
506 | * @name: Name used when requesting regions | ||
507 | * | ||
508 | * Request and iomap regions specified by @mask. | ||
509 | */ | ||
510 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name) | ||
511 | { | ||
512 | void __iomem * const *iomap; | ||
513 | int i, rc; | ||
514 | |||
515 | iomap = pcim_iomap_table(pdev); | ||
516 | if (!iomap) | ||
517 | return -ENOMEM; | ||
518 | |||
519 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
520 | unsigned long len; | ||
521 | |||
522 | if (!(mask & (1 << i))) | ||
523 | continue; | ||
524 | |||
525 | rc = -EINVAL; | ||
526 | len = pci_resource_len(pdev, i); | ||
527 | if (!len) | ||
528 | goto err_inval; | ||
529 | |||
530 | rc = pci_request_region(pdev, i, name); | ||
531 | if (rc) | ||
532 | goto err_region; | ||
533 | |||
534 | rc = -ENOMEM; | ||
535 | if (!pcim_iomap(pdev, i, 0)) | ||
536 | goto err_iomap; | ||
537 | } | ||
538 | |||
539 | return 0; | ||
540 | |||
541 | err_iomap: | ||
542 | pcim_iounmap(pdev, iomap[i]); | ||
543 | err_region: | ||
544 | pci_release_region(pdev, i); | ||
545 | err_inval: | ||
546 | while (--i >= 0) { | ||
547 | pcim_iounmap(pdev, iomap[i]); | ||
548 | pci_release_region(pdev, i); | ||
549 | } | ||
550 | |||
551 | return rc; | ||
552 | } | ||
553 | EXPORT_SYMBOL(pcim_iomap_regions); | ||
diff --git a/lib/kobject.c b/lib/kobject.c index c2917ffe8bf1..2782f49e906e 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -97,11 +97,12 @@ static void fill_kobj_path(struct kobject *kobj, char *path, int length) | |||
97 | } | 97 | } |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * kobject_get_path - generate and return the path associated with a given kobj | 100 | * kobject_get_path - generate and return the path associated with a given kobj and kset pair. |
101 | * and kset pair. The result must be freed by the caller with kfree(). | ||
102 | * | 101 | * |
103 | * @kobj: kobject in question, with which to build the path | 102 | * @kobj: kobject in question, with which to build the path |
104 | * @gfp_mask: the allocation type used to allocate the path | 103 | * @gfp_mask: the allocation type used to allocate the path |
104 | * | ||
105 | * The result must be freed by the caller with kfree(). | ||
105 | */ | 106 | */ |
106 | char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) | 107 | char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) |
107 | { | 108 | { |
diff --git a/lib/sha1.c b/lib/sha1.c index 1cdabe3065f9..4c45fd50e913 100644 --- a/lib/sha1.c +++ b/lib/sha1.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #define K3 0x8F1BBCDCL /* Rounds 40-59: sqrt(5) * 2^30 */ | 20 | #define K3 0x8F1BBCDCL /* Rounds 40-59: sqrt(5) * 2^30 */ |
21 | #define K4 0xCA62C1D6L /* Rounds 60-79: sqrt(10) * 2^30 */ | 21 | #define K4 0xCA62C1D6L /* Rounds 60-79: sqrt(10) * 2^30 */ |
22 | 22 | ||
23 | /* | 23 | /** |
24 | * sha_transform: single block SHA1 transform | 24 | * sha_transform - single block SHA1 transform |
25 | * | 25 | * |
26 | * @digest: 160 bit digest to update | 26 | * @digest: 160 bit digest to update |
27 | * @data: 512 bits of data to hash | 27 | * @data: 512 bits of data to hash |
@@ -80,9 +80,8 @@ void sha_transform(__u32 *digest, const char *in, __u32 *W) | |||
80 | } | 80 | } |
81 | EXPORT_SYMBOL(sha_transform); | 81 | EXPORT_SYMBOL(sha_transform); |
82 | 82 | ||
83 | /* | 83 | /** |
84 | * sha_init: initialize the vectors for a SHA1 digest | 84 | * sha_init - initialize the vectors for a SHA1 digest |
85 | * | ||
86 | * @buf: vector to initialize | 85 | * @buf: vector to initialize |
87 | */ | 86 | */ |
88 | void sha_init(__u32 *buf) | 87 | void sha_init(__u32 *buf) |
diff --git a/lib/sort.c b/lib/sort.c index 488788b341cb..961567894d16 100644 --- a/lib/sort.c +++ b/lib/sort.c | |||
@@ -27,7 +27,7 @@ static void generic_swap(void *a, void *b, int size) | |||
27 | } while (--size > 0); | 27 | } while (--size > 0); |
28 | } | 28 | } |
29 | 29 | ||
30 | /* | 30 | /** |
31 | * sort - sort an array of elements | 31 | * sort - sort an array of elements |
32 | * @base: pointer to data to sort | 32 | * @base: pointer to data to sort |
33 | * @num: number of elements | 33 | * @num: number of elements |
diff --git a/lib/string.c b/lib/string.c index a485d75962af..bab440fb0dfc 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -160,7 +160,7 @@ EXPORT_SYMBOL(strcat); | |||
160 | * @src: The string to append to it | 160 | * @src: The string to append to it |
161 | * @count: The maximum numbers of bytes to copy | 161 | * @count: The maximum numbers of bytes to copy |
162 | * | 162 | * |
163 | * Note that in contrast to strncpy, strncat ensures the result is | 163 | * Note that in contrast to strncpy(), strncat() ensures the result is |
164 | * terminated. | 164 | * terminated. |
165 | */ | 165 | */ |
166 | char *strncat(char *dest, const char *src, size_t count) | 166 | char *strncat(char *dest, const char *src, size_t count) |
@@ -366,8 +366,7 @@ EXPORT_SYMBOL(strnlen); | |||
366 | 366 | ||
367 | #ifndef __HAVE_ARCH_STRSPN | 367 | #ifndef __HAVE_ARCH_STRSPN |
368 | /** | 368 | /** |
369 | * strspn - Calculate the length of the initial substring of @s which only | 369 | * strspn - Calculate the length of the initial substring of @s which only contain letters in @accept |
370 | * contain letters in @accept | ||
371 | * @s: The string to be searched | 370 | * @s: The string to be searched |
372 | * @accept: The string to search for | 371 | * @accept: The string to search for |
373 | */ | 372 | */ |
@@ -394,8 +393,7 @@ EXPORT_SYMBOL(strspn); | |||
394 | 393 | ||
395 | #ifndef __HAVE_ARCH_STRCSPN | 394 | #ifndef __HAVE_ARCH_STRCSPN |
396 | /** | 395 | /** |
397 | * strcspn - Calculate the length of the initial substring of @s which does | 396 | * strcspn - Calculate the length of the initial substring of @s which does not contain letters in @reject |
398 | * not contain letters in @reject | ||
399 | * @s: The string to be searched | 397 | * @s: The string to be searched |
400 | * @reject: The string to avoid | 398 | * @reject: The string to avoid |
401 | */ | 399 | */ |
diff --git a/lib/textsearch.c b/lib/textsearch.c index 98bcadc01185..9e2a002c5b54 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c | |||
@@ -218,7 +218,7 @@ static unsigned int get_linear_data(unsigned int consumed, const u8 **dst, | |||
218 | * Call textsearch_next() to retrieve subsequent matches. | 218 | * Call textsearch_next() to retrieve subsequent matches. |
219 | * | 219 | * |
220 | * Returns the position of first occurrence of the pattern or | 220 | * Returns the position of first occurrence of the pattern or |
221 | * UINT_MAX if no occurrence was found. | 221 | * %UINT_MAX if no occurrence was found. |
222 | */ | 222 | */ |
223 | unsigned int textsearch_find_continuous(struct ts_config *conf, | 223 | unsigned int textsearch_find_continuous(struct ts_config *conf, |
224 | struct ts_state *state, | 224 | struct ts_state *state, |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index bed7229378f2..44f0e339a947 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -247,12 +247,12 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i | |||
247 | * be generated for the given input, excluding the trailing | 247 | * be generated for the given input, excluding the trailing |
248 | * '\0', as per ISO C99. If you want to have the exact | 248 | * '\0', as per ISO C99. If you want to have the exact |
249 | * number of characters written into @buf as return value | 249 | * number of characters written into @buf as return value |
250 | * (not including the trailing '\0'), use vscnprintf. If the | 250 | * (not including the trailing '\0'), use vscnprintf(). If the |
251 | * return is greater than or equal to @size, the resulting | 251 | * return is greater than or equal to @size, the resulting |
252 | * string is truncated. | 252 | * string is truncated. |
253 | * | 253 | * |
254 | * Call this function if you are already dealing with a va_list. | 254 | * Call this function if you are already dealing with a va_list. |
255 | * You probably want snprintf instead. | 255 | * You probably want snprintf() instead. |
256 | */ | 256 | */ |
257 | int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) | 257 | int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) |
258 | { | 258 | { |
@@ -509,7 +509,7 @@ EXPORT_SYMBOL(vsnprintf); | |||
509 | * returns 0. | 509 | * returns 0. |
510 | * | 510 | * |
511 | * Call this function if you are already dealing with a va_list. | 511 | * Call this function if you are already dealing with a va_list. |
512 | * You probably want scnprintf instead. | 512 | * You probably want scnprintf() instead. |
513 | */ | 513 | */ |
514 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) | 514 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) |
515 | { | 515 | { |
@@ -577,11 +577,11 @@ EXPORT_SYMBOL(scnprintf); | |||
577 | * @args: Arguments for the format string | 577 | * @args: Arguments for the format string |
578 | * | 578 | * |
579 | * The function returns the number of characters written | 579 | * The function returns the number of characters written |
580 | * into @buf. Use vsnprintf or vscnprintf in order to avoid | 580 | * into @buf. Use vsnprintf() or vscnprintf() in order to avoid |
581 | * buffer overflows. | 581 | * buffer overflows. |
582 | * | 582 | * |
583 | * Call this function if you are already dealing with a va_list. | 583 | * Call this function if you are already dealing with a va_list. |
584 | * You probably want sprintf instead. | 584 | * You probably want sprintf() instead. |
585 | */ | 585 | */ |
586 | int vsprintf(char *buf, const char *fmt, va_list args) | 586 | int vsprintf(char *buf, const char *fmt, va_list args) |
587 | { | 587 | { |
@@ -597,7 +597,7 @@ EXPORT_SYMBOL(vsprintf); | |||
597 | * @...: Arguments for the format string | 597 | * @...: Arguments for the format string |
598 | * | 598 | * |
599 | * The function returns the number of characters written | 599 | * The function returns the number of characters written |
600 | * into @buf. Use snprintf or scnprintf in order to avoid | 600 | * into @buf. Use snprintf() or scnprintf() in order to avoid |
601 | * buffer overflows. | 601 | * buffer overflows. |
602 | */ | 602 | */ |
603 | int sprintf(char * buf, const char *fmt, ...) | 603 | int sprintf(char * buf, const char *fmt, ...) |
diff --git a/mm/Kconfig b/mm/Kconfig index db7c55de92cd..7942b333e46c 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -157,3 +157,9 @@ config RESOURCES_64BIT | |||
157 | default 64BIT | 157 | default 64BIT |
158 | help | 158 | help |
159 | This option allows memory and IO resources to be 64 bit. | 159 | This option allows memory and IO resources to be 64 bit. |
160 | |||
161 | config ZONE_DMA_FLAG | ||
162 | int | ||
163 | default "0" if !ZONE_DMA | ||
164 | default "1" | ||
165 | |||
diff --git a/mm/filemap.c b/mm/filemap.c index f30ef28405d3..00414849a867 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -327,7 +327,7 @@ EXPORT_SYMBOL(sync_page_range); | |||
327 | * @pos: beginning offset in pages to write | 327 | * @pos: beginning offset in pages to write |
328 | * @count: number of bytes to write | 328 | * @count: number of bytes to write |
329 | * | 329 | * |
330 | * Note: Holding i_mutex across sync_page_range_nolock is not a good idea | 330 | * Note: Holding i_mutex across sync_page_range_nolock() is not a good idea |
331 | * as it forces O_SYNC writers to different parts of the same file | 331 | * as it forces O_SYNC writers to different parts of the same file |
332 | * to be serialised right until io completion. | 332 | * to be serialised right until io completion. |
333 | */ | 333 | */ |
@@ -784,7 +784,7 @@ unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, | |||
784 | * @mapping: target address_space | 784 | * @mapping: target address_space |
785 | * @index: the page index | 785 | * @index: the page index |
786 | * | 786 | * |
787 | * Same as grab_cache_page, but do not wait if the page is unavailable. | 787 | * Same as grab_cache_page(), but do not wait if the page is unavailable. |
788 | * This is intended for speculative data generators, where the data can | 788 | * This is intended for speculative data generators, where the data can |
789 | * be regenerated if the page couldn't be grabbed. This routine should | 789 | * be regenerated if the page couldn't be grabbed. This routine should |
790 | * be safe to call while holding the lock for another page. | 790 | * be safe to call while holding the lock for another page. |
diff --git a/mm/highmem.c b/mm/highmem.c index 0206e7e5018c..51e1c1995fec 100644 --- a/mm/highmem.c +++ b/mm/highmem.c | |||
@@ -47,7 +47,8 @@ unsigned int nr_free_highpages (void) | |||
47 | unsigned int pages = 0; | 47 | unsigned int pages = 0; |
48 | 48 | ||
49 | for_each_online_pgdat(pgdat) | 49 | for_each_online_pgdat(pgdat) |
50 | pages += pgdat->node_zones[ZONE_HIGHMEM].free_pages; | 50 | pages += zone_page_state(&pgdat->node_zones[ZONE_HIGHMEM], |
51 | NR_FREE_PAGES); | ||
51 | 52 | ||
52 | return pages; | 53 | return pages; |
53 | } | 54 | } |
diff --git a/mm/memory.c b/mm/memory.c index ef09f0acb1d8..072c1135ad37 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -678,7 +678,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, | |||
678 | if (pte_dirty(ptent)) | 678 | if (pte_dirty(ptent)) |
679 | set_page_dirty(page); | 679 | set_page_dirty(page); |
680 | if (pte_young(ptent)) | 680 | if (pte_young(ptent)) |
681 | mark_page_accessed(page); | 681 | SetPageReferenced(page); |
682 | file_rss--; | 682 | file_rss--; |
683 | } | 683 | } |
684 | page_remove_rmap(page, vma); | 684 | page_remove_rmap(page, vma); |
@@ -1531,8 +1531,6 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1531 | if (vma->vm_ops->page_mkwrite(vma, old_page) < 0) | 1531 | if (vma->vm_ops->page_mkwrite(vma, old_page) < 0) |
1532 | goto unwritable_page; | 1532 | goto unwritable_page; |
1533 | 1533 | ||
1534 | page_cache_release(old_page); | ||
1535 | |||
1536 | /* | 1534 | /* |
1537 | * Since we dropped the lock we need to revalidate | 1535 | * Since we dropped the lock we need to revalidate |
1538 | * the PTE as someone else may have changed it. If | 1536 | * the PTE as someone else may have changed it. If |
@@ -1541,6 +1539,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1541 | */ | 1539 | */ |
1542 | page_table = pte_offset_map_lock(mm, pmd, address, | 1540 | page_table = pte_offset_map_lock(mm, pmd, address, |
1543 | &ptl); | 1541 | &ptl); |
1542 | page_cache_release(old_page); | ||
1544 | if (!pte_same(*page_table, orig_pte)) | 1543 | if (!pte_same(*page_table, orig_pte)) |
1545 | goto unlock; | 1544 | goto unlock; |
1546 | } | 1545 | } |
@@ -1776,9 +1775,7 @@ restart: | |||
1776 | } | 1775 | } |
1777 | 1776 | ||
1778 | /** | 1777 | /** |
1779 | * unmap_mapping_range - unmap the portion of all mmaps | 1778 | * unmap_mapping_range - unmap the portion of all mmaps in the specified address_space corresponding to the specified page range in the underlying file. |
1780 | * in the specified address_space corresponding to the specified | ||
1781 | * page range in the underlying file. | ||
1782 | * @mapping: the address space containing mmaps to be unmapped. | 1779 | * @mapping: the address space containing mmaps to be unmapped. |
1783 | * @holebegin: byte in first page to unmap, relative to the start of | 1780 | * @holebegin: byte in first page to unmap, relative to the start of |
1784 | * the underlying file. This will be rounded down to a PAGE_SIZE | 1781 | * the underlying file. This will be rounded down to a PAGE_SIZE |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index c2aec0e1090d..259a706bd83e 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -105,7 +105,7 @@ static struct kmem_cache *sn_cache; | |||
105 | 105 | ||
106 | /* Highest zone. An specific allocation for a zone below that is not | 106 | /* Highest zone. An specific allocation for a zone below that is not |
107 | policied. */ | 107 | policied. */ |
108 | enum zone_type policy_zone = ZONE_DMA; | 108 | enum zone_type policy_zone = 0; |
109 | 109 | ||
110 | struct mempolicy default_policy = { | 110 | struct mempolicy default_policy = { |
111 | .refcnt = ATOMIC_INIT(1), /* never free it */ | 111 | .refcnt = ATOMIC_INIT(1), /* never free it */ |
diff --git a/mm/mempool.c b/mm/mempool.c index ccd8cb8cd41f..cc1ca86dfc24 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
@@ -46,9 +46,9 @@ static void free_pool(mempool_t *pool) | |||
46 | * @pool_data: optional private data available to the user-defined functions. | 46 | * @pool_data: optional private data available to the user-defined functions. |
47 | * | 47 | * |
48 | * this function creates and allocates a guaranteed size, preallocated | 48 | * this function creates and allocates a guaranteed size, preallocated |
49 | * memory pool. The pool can be used from the mempool_alloc and mempool_free | 49 | * memory pool. The pool can be used from the mempool_alloc() and mempool_free() |
50 | * functions. This function might sleep. Both the alloc_fn() and the free_fn() | 50 | * functions. This function might sleep. Both the alloc_fn() and the free_fn() |
51 | * functions might sleep - as long as the mempool_alloc function is not called | 51 | * functions might sleep - as long as the mempool_alloc() function is not called |
52 | * from IRQ contexts. | 52 | * from IRQ contexts. |
53 | */ | 53 | */ |
54 | mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, | 54 | mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, |
@@ -195,7 +195,7 @@ EXPORT_SYMBOL(mempool_destroy); | |||
195 | * mempool_create(). | 195 | * mempool_create(). |
196 | * @gfp_mask: the usual allocation bitmask. | 196 | * @gfp_mask: the usual allocation bitmask. |
197 | * | 197 | * |
198 | * this function only sleeps if the alloc_fn function sleeps or | 198 | * this function only sleeps if the alloc_fn() function sleeps or |
199 | * returns NULL. Note that due to preallocation, this function | 199 | * returns NULL. Note that due to preallocation, this function |
200 | * *never* fails when called from process contexts. (it might | 200 | * *never* fails when called from process contexts. (it might |
201 | * fail if called from an IRQ context.) | 201 | * fail if called from an IRQ context.) |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index be0efbde4994..f7e088f5a309 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -515,7 +515,7 @@ static int __cpuinit | |||
515 | ratelimit_handler(struct notifier_block *self, unsigned long u, void *v) | 515 | ratelimit_handler(struct notifier_block *self, unsigned long u, void *v) |
516 | { | 516 | { |
517 | writeback_set_ratelimit(); | 517 | writeback_set_ratelimit(); |
518 | return 0; | 518 | return NOTIFY_DONE; |
519 | } | 519 | } |
520 | 520 | ||
521 | static struct notifier_block __cpuinitdata ratelimit_nb = { | 521 | static struct notifier_block __cpuinitdata ratelimit_nb = { |
@@ -549,9 +549,7 @@ void __init page_writeback_init(void) | |||
549 | } | 549 | } |
550 | 550 | ||
551 | /** | 551 | /** |
552 | * generic_writepages - walk the list of dirty pages of the given | 552 | * generic_writepages - walk the list of dirty pages of the given address space and writepage() all of them. |
553 | * address space and writepage() all of them. | ||
554 | * | ||
555 | * @mapping: address space structure to write | 553 | * @mapping: address space structure to write |
556 | * @wbc: subtract the number of written pages from *@wbc->nr_to_write | 554 | * @wbc: subtract the number of written pages from *@wbc->nr_to_write |
557 | * | 555 | * |
@@ -698,7 +696,6 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc) | |||
698 | 696 | ||
699 | /** | 697 | /** |
700 | * write_one_page - write out a single page and optionally wait on I/O | 698 | * write_one_page - write out a single page and optionally wait on I/O |
701 | * | ||
702 | * @page: the page to write | 699 | * @page: the page to write |
703 | * @wait: if true, wait on writeout | 700 | * @wait: if true, wait on writeout |
704 | * | 701 | * |
@@ -737,6 +734,16 @@ int write_one_page(struct page *page, int wait) | |||
737 | EXPORT_SYMBOL(write_one_page); | 734 | EXPORT_SYMBOL(write_one_page); |
738 | 735 | ||
739 | /* | 736 | /* |
737 | * For address_spaces which do not use buffers nor write back. | ||
738 | */ | ||
739 | int __set_page_dirty_no_writeback(struct page *page) | ||
740 | { | ||
741 | if (!PageDirty(page)) | ||
742 | SetPageDirty(page); | ||
743 | return 0; | ||
744 | } | ||
745 | |||
746 | /* | ||
740 | * For address_spaces which do not use buffers. Just tag the page as dirty in | 747 | * For address_spaces which do not use buffers. Just tag the page as dirty in |
741 | * its radix tree. | 748 | * its radix tree. |
742 | * | 749 | * |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f12052dc23ff..d461b23a27a1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -73,7 +73,9 @@ static void __free_pages_ok(struct page *page, unsigned int order); | |||
73 | * don't need any ZONE_NORMAL reservation | 73 | * don't need any ZONE_NORMAL reservation |
74 | */ | 74 | */ |
75 | int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { | 75 | int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { |
76 | #ifdef CONFIG_ZONE_DMA | ||
76 | 256, | 77 | 256, |
78 | #endif | ||
77 | #ifdef CONFIG_ZONE_DMA32 | 79 | #ifdef CONFIG_ZONE_DMA32 |
78 | 256, | 80 | 256, |
79 | #endif | 81 | #endif |
@@ -85,7 +87,9 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { | |||
85 | EXPORT_SYMBOL(totalram_pages); | 87 | EXPORT_SYMBOL(totalram_pages); |
86 | 88 | ||
87 | static char * const zone_names[MAX_NR_ZONES] = { | 89 | static char * const zone_names[MAX_NR_ZONES] = { |
90 | #ifdef CONFIG_ZONE_DMA | ||
88 | "DMA", | 91 | "DMA", |
92 | #endif | ||
89 | #ifdef CONFIG_ZONE_DMA32 | 93 | #ifdef CONFIG_ZONE_DMA32 |
90 | "DMA32", | 94 | "DMA32", |
91 | #endif | 95 | #endif |
@@ -395,7 +399,7 @@ static inline void __free_one_page(struct page *page, | |||
395 | VM_BUG_ON(page_idx & (order_size - 1)); | 399 | VM_BUG_ON(page_idx & (order_size - 1)); |
396 | VM_BUG_ON(bad_range(zone, page)); | 400 | VM_BUG_ON(bad_range(zone, page)); |
397 | 401 | ||
398 | zone->free_pages += order_size; | 402 | __mod_zone_page_state(zone, NR_FREE_PAGES, order_size); |
399 | while (order < MAX_ORDER-1) { | 403 | while (order < MAX_ORDER-1) { |
400 | unsigned long combined_idx; | 404 | unsigned long combined_idx; |
401 | struct free_area *area; | 405 | struct free_area *area; |
@@ -631,7 +635,7 @@ static struct page *__rmqueue(struct zone *zone, unsigned int order) | |||
631 | list_del(&page->lru); | 635 | list_del(&page->lru); |
632 | rmv_page_order(page); | 636 | rmv_page_order(page); |
633 | area->nr_free--; | 637 | area->nr_free--; |
634 | zone->free_pages -= 1UL << order; | 638 | __mod_zone_page_state(zone, NR_FREE_PAGES, - (1UL << order)); |
635 | expand(zone, page, order, current_order, area); | 639 | expand(zone, page, order, current_order, area); |
636 | return page; | 640 | return page; |
637 | } | 641 | } |
@@ -989,7 +993,8 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | |||
989 | int classzone_idx, int alloc_flags) | 993 | int classzone_idx, int alloc_flags) |
990 | { | 994 | { |
991 | /* free_pages my go negative - that's OK */ | 995 | /* free_pages my go negative - that's OK */ |
992 | long min = mark, free_pages = z->free_pages - (1 << order) + 1; | 996 | long min = mark; |
997 | long free_pages = zone_page_state(z, NR_FREE_PAGES) - (1 << order) + 1; | ||
993 | int o; | 998 | int o; |
994 | 999 | ||
995 | if (alloc_flags & ALLOC_HIGH) | 1000 | if (alloc_flags & ALLOC_HIGH) |
@@ -1439,35 +1444,6 @@ fastcall void free_pages(unsigned long addr, unsigned int order) | |||
1439 | 1444 | ||
1440 | EXPORT_SYMBOL(free_pages); | 1445 | EXPORT_SYMBOL(free_pages); |
1441 | 1446 | ||
1442 | /* | ||
1443 | * Total amount of free (allocatable) RAM: | ||
1444 | */ | ||
1445 | unsigned int nr_free_pages(void) | ||
1446 | { | ||
1447 | unsigned int sum = 0; | ||
1448 | struct zone *zone; | ||
1449 | |||
1450 | for_each_zone(zone) | ||
1451 | sum += zone->free_pages; | ||
1452 | |||
1453 | return sum; | ||
1454 | } | ||
1455 | |||
1456 | EXPORT_SYMBOL(nr_free_pages); | ||
1457 | |||
1458 | #ifdef CONFIG_NUMA | ||
1459 | unsigned int nr_free_pages_pgdat(pg_data_t *pgdat) | ||
1460 | { | ||
1461 | unsigned int sum = 0; | ||
1462 | enum zone_type i; | ||
1463 | |||
1464 | for (i = 0; i < MAX_NR_ZONES; i++) | ||
1465 | sum += pgdat->node_zones[i].free_pages; | ||
1466 | |||
1467 | return sum; | ||
1468 | } | ||
1469 | #endif | ||
1470 | |||
1471 | static unsigned int nr_free_zone_pages(int offset) | 1447 | static unsigned int nr_free_zone_pages(int offset) |
1472 | { | 1448 | { |
1473 | /* Just pick one node, since fallback list is circular */ | 1449 | /* Just pick one node, since fallback list is circular */ |
@@ -1514,7 +1490,7 @@ void si_meminfo(struct sysinfo *val) | |||
1514 | { | 1490 | { |
1515 | val->totalram = totalram_pages; | 1491 | val->totalram = totalram_pages; |
1516 | val->sharedram = 0; | 1492 | val->sharedram = 0; |
1517 | val->freeram = nr_free_pages(); | 1493 | val->freeram = global_page_state(NR_FREE_PAGES); |
1518 | val->bufferram = nr_blockdev_pages(); | 1494 | val->bufferram = nr_blockdev_pages(); |
1519 | val->totalhigh = totalhigh_pages; | 1495 | val->totalhigh = totalhigh_pages; |
1520 | val->freehigh = nr_free_highpages(); | 1496 | val->freehigh = nr_free_highpages(); |
@@ -1529,10 +1505,11 @@ void si_meminfo_node(struct sysinfo *val, int nid) | |||
1529 | pg_data_t *pgdat = NODE_DATA(nid); | 1505 | pg_data_t *pgdat = NODE_DATA(nid); |
1530 | 1506 | ||
1531 | val->totalram = pgdat->node_present_pages; | 1507 | val->totalram = pgdat->node_present_pages; |
1532 | val->freeram = nr_free_pages_pgdat(pgdat); | 1508 | val->freeram = node_page_state(nid, NR_FREE_PAGES); |
1533 | #ifdef CONFIG_HIGHMEM | 1509 | #ifdef CONFIG_HIGHMEM |
1534 | val->totalhigh = pgdat->node_zones[ZONE_HIGHMEM].present_pages; | 1510 | val->totalhigh = pgdat->node_zones[ZONE_HIGHMEM].present_pages; |
1535 | val->freehigh = pgdat->node_zones[ZONE_HIGHMEM].free_pages; | 1511 | val->freehigh = zone_page_state(&pgdat->node_zones[ZONE_HIGHMEM], |
1512 | NR_FREE_PAGES); | ||
1536 | #else | 1513 | #else |
1537 | val->totalhigh = 0; | 1514 | val->totalhigh = 0; |
1538 | val->freehigh = 0; | 1515 | val->freehigh = 0; |
@@ -1551,9 +1528,6 @@ void si_meminfo_node(struct sysinfo *val, int nid) | |||
1551 | void show_free_areas(void) | 1528 | void show_free_areas(void) |
1552 | { | 1529 | { |
1553 | int cpu; | 1530 | int cpu; |
1554 | unsigned long active; | ||
1555 | unsigned long inactive; | ||
1556 | unsigned long free; | ||
1557 | struct zone *zone; | 1531 | struct zone *zone; |
1558 | 1532 | ||
1559 | for_each_zone(zone) { | 1533 | for_each_zone(zone) { |
@@ -1577,16 +1551,14 @@ void show_free_areas(void) | |||
1577 | } | 1551 | } |
1578 | } | 1552 | } |
1579 | 1553 | ||
1580 | get_zone_counts(&active, &inactive, &free); | ||
1581 | |||
1582 | printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu unstable:%lu\n" | 1554 | printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu unstable:%lu\n" |
1583 | " free:%u slab:%lu mapped:%lu pagetables:%lu bounce:%lu\n", | 1555 | " free:%lu slab:%lu mapped:%lu pagetables:%lu bounce:%lu\n", |
1584 | active, | 1556 | global_page_state(NR_ACTIVE), |
1585 | inactive, | 1557 | global_page_state(NR_INACTIVE), |
1586 | global_page_state(NR_FILE_DIRTY), | 1558 | global_page_state(NR_FILE_DIRTY), |
1587 | global_page_state(NR_WRITEBACK), | 1559 | global_page_state(NR_WRITEBACK), |
1588 | global_page_state(NR_UNSTABLE_NFS), | 1560 | global_page_state(NR_UNSTABLE_NFS), |
1589 | nr_free_pages(), | 1561 | global_page_state(NR_FREE_PAGES), |
1590 | global_page_state(NR_SLAB_RECLAIMABLE) + | 1562 | global_page_state(NR_SLAB_RECLAIMABLE) + |
1591 | global_page_state(NR_SLAB_UNRECLAIMABLE), | 1563 | global_page_state(NR_SLAB_UNRECLAIMABLE), |
1592 | global_page_state(NR_FILE_MAPPED), | 1564 | global_page_state(NR_FILE_MAPPED), |
@@ -1612,12 +1584,12 @@ void show_free_areas(void) | |||
1612 | " all_unreclaimable? %s" | 1584 | " all_unreclaimable? %s" |
1613 | "\n", | 1585 | "\n", |
1614 | zone->name, | 1586 | zone->name, |
1615 | K(zone->free_pages), | 1587 | K(zone_page_state(zone, NR_FREE_PAGES)), |
1616 | K(zone->pages_min), | 1588 | K(zone->pages_min), |
1617 | K(zone->pages_low), | 1589 | K(zone->pages_low), |
1618 | K(zone->pages_high), | 1590 | K(zone->pages_high), |
1619 | K(zone->nr_active), | 1591 | K(zone_page_state(zone, NR_ACTIVE)), |
1620 | K(zone->nr_inactive), | 1592 | K(zone_page_state(zone, NR_INACTIVE)), |
1621 | K(zone->present_pages), | 1593 | K(zone->present_pages), |
1622 | zone->pages_scanned, | 1594 | zone->pages_scanned, |
1623 | (zone->all_unreclaimable ? "yes" : "no") | 1595 | (zone->all_unreclaimable ? "yes" : "no") |
@@ -2651,11 +2623,11 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat, | |||
2651 | " %s zone: %lu pages exceeds realsize %lu\n", | 2623 | " %s zone: %lu pages exceeds realsize %lu\n", |
2652 | zone_names[j], memmap_pages, realsize); | 2624 | zone_names[j], memmap_pages, realsize); |
2653 | 2625 | ||
2654 | /* Account for reserved DMA pages */ | 2626 | /* Account for reserved pages */ |
2655 | if (j == ZONE_DMA && realsize > dma_reserve) { | 2627 | if (j == 0 && realsize > dma_reserve) { |
2656 | realsize -= dma_reserve; | 2628 | realsize -= dma_reserve; |
2657 | printk(KERN_DEBUG " DMA zone: %lu pages reserved\n", | 2629 | printk(KERN_DEBUG " %s zone: %lu pages reserved\n", |
2658 | dma_reserve); | 2630 | zone_names[0], dma_reserve); |
2659 | } | 2631 | } |
2660 | 2632 | ||
2661 | if (!is_highmem_idx(j)) | 2633 | if (!is_highmem_idx(j)) |
@@ -2675,7 +2647,6 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat, | |||
2675 | spin_lock_init(&zone->lru_lock); | 2647 | spin_lock_init(&zone->lru_lock); |
2676 | zone_seqlock_init(zone); | 2648 | zone_seqlock_init(zone); |
2677 | zone->zone_pgdat = pgdat; | 2649 | zone->zone_pgdat = pgdat; |
2678 | zone->free_pages = 0; | ||
2679 | 2650 | ||
2680 | zone->prev_priority = DEF_PRIORITY; | 2651 | zone->prev_priority = DEF_PRIORITY; |
2681 | 2652 | ||
@@ -2684,8 +2655,6 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat, | |||
2684 | INIT_LIST_HEAD(&zone->inactive_list); | 2655 | INIT_LIST_HEAD(&zone->inactive_list); |
2685 | zone->nr_scan_active = 0; | 2656 | zone->nr_scan_active = 0; |
2686 | zone->nr_scan_inactive = 0; | 2657 | zone->nr_scan_inactive = 0; |
2687 | zone->nr_active = 0; | ||
2688 | zone->nr_inactive = 0; | ||
2689 | zap_zone_vm_stats(zone); | 2658 | zap_zone_vm_stats(zone); |
2690 | atomic_set(&zone->reclaim_in_progress, 0); | 2659 | atomic_set(&zone->reclaim_in_progress, 0); |
2691 | if (!size) | 2660 | if (!size) |
@@ -2877,20 +2846,23 @@ static void __init sort_node_map(void) | |||
2877 | cmp_node_active_region, NULL); | 2846 | cmp_node_active_region, NULL); |
2878 | } | 2847 | } |
2879 | 2848 | ||
2880 | /* Find the lowest pfn for a node. This depends on a sorted early_node_map */ | 2849 | /* Find the lowest pfn for a node */ |
2881 | unsigned long __init find_min_pfn_for_node(unsigned long nid) | 2850 | unsigned long __init find_min_pfn_for_node(unsigned long nid) |
2882 | { | 2851 | { |
2883 | int i; | 2852 | int i; |
2884 | 2853 | unsigned long min_pfn = ULONG_MAX; | |
2885 | /* Regions in the early_node_map can be in any order */ | ||
2886 | sort_node_map(); | ||
2887 | 2854 | ||
2888 | /* Assuming a sorted map, the first range found has the starting pfn */ | 2855 | /* Assuming a sorted map, the first range found has the starting pfn */ |
2889 | for_each_active_range_index_in_nid(i, nid) | 2856 | for_each_active_range_index_in_nid(i, nid) |
2890 | return early_node_map[i].start_pfn; | 2857 | min_pfn = min(min_pfn, early_node_map[i].start_pfn); |
2891 | 2858 | ||
2892 | printk(KERN_WARNING "Could not find start_pfn for node %lu\n", nid); | 2859 | if (min_pfn == ULONG_MAX) { |
2893 | return 0; | 2860 | printk(KERN_WARNING |
2861 | "Could not find start_pfn for node %lu\n", nid); | ||
2862 | return 0; | ||
2863 | } | ||
2864 | |||
2865 | return min_pfn; | ||
2894 | } | 2866 | } |
2895 | 2867 | ||
2896 | /** | 2868 | /** |
@@ -2939,6 +2911,9 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn) | |||
2939 | unsigned long nid; | 2911 | unsigned long nid; |
2940 | enum zone_type i; | 2912 | enum zone_type i; |
2941 | 2913 | ||
2914 | /* Sort early_node_map as initialisation assumes it is sorted */ | ||
2915 | sort_node_map(); | ||
2916 | |||
2942 | /* Record where the zone boundaries are */ | 2917 | /* Record where the zone boundaries are */ |
2943 | memset(arch_zone_lowest_possible_pfn, 0, | 2918 | memset(arch_zone_lowest_possible_pfn, 0, |
2944 | sizeof(arch_zone_lowest_possible_pfn)); | 2919 | sizeof(arch_zone_lowest_possible_pfn)); |
diff --git a/mm/readahead.c b/mm/readahead.c index 0f539e8e827a..93d9ee692fd8 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -575,10 +575,6 @@ void handle_ra_miss(struct address_space *mapping, | |||
575 | */ | 575 | */ |
576 | unsigned long max_sane_readahead(unsigned long nr) | 576 | unsigned long max_sane_readahead(unsigned long nr) |
577 | { | 577 | { |
578 | unsigned long active; | 578 | return min(nr, (node_page_state(numa_node_id(), NR_INACTIVE) |
579 | unsigned long inactive; | 579 | + node_page_state(numa_node_id(), NR_FREE_PAGES)) / 2); |
580 | unsigned long free; | ||
581 | |||
582 | __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id())); | ||
583 | return min(nr, (inactive + free) / 2); | ||
584 | } | 580 | } |
diff --git a/mm/shmem.c b/mm/shmem.c index 70da7a0981bf..b38e17169271 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2316,7 +2316,7 @@ static void destroy_inodecache(void) | |||
2316 | 2316 | ||
2317 | static const struct address_space_operations shmem_aops = { | 2317 | static const struct address_space_operations shmem_aops = { |
2318 | .writepage = shmem_writepage, | 2318 | .writepage = shmem_writepage, |
2319 | .set_page_dirty = __set_page_dirty_nobuffers, | 2319 | .set_page_dirty = __set_page_dirty_no_writeback, |
2320 | #ifdef CONFIG_TMPFS | 2320 | #ifdef CONFIG_TMPFS |
2321 | .prepare_write = shmem_prepare_write, | 2321 | .prepare_write = shmem_prepare_write, |
2322 | .commit_write = simple_commit_write, | 2322 | .commit_write = simple_commit_write, |
@@ -793,8 +793,10 @@ static inline struct kmem_cache *__find_general_cachep(size_t size, | |||
793 | * has cs_{dma,}cachep==NULL. Thus no special case | 793 | * has cs_{dma,}cachep==NULL. Thus no special case |
794 | * for large kmalloc calls required. | 794 | * for large kmalloc calls required. |
795 | */ | 795 | */ |
796 | #ifdef CONFIG_ZONE_DMA | ||
796 | if (unlikely(gfpflags & GFP_DMA)) | 797 | if (unlikely(gfpflags & GFP_DMA)) |
797 | return csizep->cs_dmacachep; | 798 | return csizep->cs_dmacachep; |
799 | #endif | ||
798 | return csizep->cs_cachep; | 800 | return csizep->cs_cachep; |
799 | } | 801 | } |
800 | 802 | ||
@@ -1493,13 +1495,15 @@ void __init kmem_cache_init(void) | |||
1493 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, | 1495 | ARCH_KMALLOC_FLAGS|SLAB_PANIC, |
1494 | NULL, NULL); | 1496 | NULL, NULL); |
1495 | } | 1497 | } |
1496 | 1498 | #ifdef CONFIG_ZONE_DMA | |
1497 | sizes->cs_dmacachep = kmem_cache_create(names->name_dma, | 1499 | sizes->cs_dmacachep = kmem_cache_create( |
1500 | names->name_dma, | ||
1498 | sizes->cs_size, | 1501 | sizes->cs_size, |
1499 | ARCH_KMALLOC_MINALIGN, | 1502 | ARCH_KMALLOC_MINALIGN, |
1500 | ARCH_KMALLOC_FLAGS|SLAB_CACHE_DMA| | 1503 | ARCH_KMALLOC_FLAGS|SLAB_CACHE_DMA| |
1501 | SLAB_PANIC, | 1504 | SLAB_PANIC, |
1502 | NULL, NULL); | 1505 | NULL, NULL); |
1506 | #endif | ||
1503 | sizes++; | 1507 | sizes++; |
1504 | names++; | 1508 | names++; |
1505 | } | 1509 | } |
@@ -2321,7 +2325,7 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2321 | cachep->slab_size = slab_size; | 2325 | cachep->slab_size = slab_size; |
2322 | cachep->flags = flags; | 2326 | cachep->flags = flags; |
2323 | cachep->gfpflags = 0; | 2327 | cachep->gfpflags = 0; |
2324 | if (flags & SLAB_CACHE_DMA) | 2328 | if (CONFIG_ZONE_DMA_FLAG && (flags & SLAB_CACHE_DMA)) |
2325 | cachep->gfpflags |= GFP_DMA; | 2329 | cachep->gfpflags |= GFP_DMA; |
2326 | cachep->buffer_size = size; | 2330 | cachep->buffer_size = size; |
2327 | cachep->reciprocal_buffer_size = reciprocal_value(size); | 2331 | cachep->reciprocal_buffer_size = reciprocal_value(size); |
@@ -2516,7 +2520,7 @@ EXPORT_SYMBOL(kmem_cache_shrink); | |||
2516 | * kmem_cache_destroy - delete a cache | 2520 | * kmem_cache_destroy - delete a cache |
2517 | * @cachep: the cache to destroy | 2521 | * @cachep: the cache to destroy |
2518 | * | 2522 | * |
2519 | * Remove a struct kmem_cache object from the slab cache. | 2523 | * Remove a &struct kmem_cache object from the slab cache. |
2520 | * | 2524 | * |
2521 | * It is expected this function will be called by a module when it is | 2525 | * It is expected this function will be called by a module when it is |
2522 | * unloaded. This will remove the cache completely, and avoid a duplicate | 2526 | * unloaded. This will remove the cache completely, and avoid a duplicate |
@@ -2643,10 +2647,12 @@ static void cache_init_objs(struct kmem_cache *cachep, | |||
2643 | 2647 | ||
2644 | static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags) | 2648 | static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags) |
2645 | { | 2649 | { |
2646 | if (flags & GFP_DMA) | 2650 | if (CONFIG_ZONE_DMA_FLAG) { |
2647 | BUG_ON(!(cachep->gfpflags & GFP_DMA)); | 2651 | if (flags & GFP_DMA) |
2648 | else | 2652 | BUG_ON(!(cachep->gfpflags & GFP_DMA)); |
2649 | BUG_ON(cachep->gfpflags & GFP_DMA); | 2653 | else |
2654 | BUG_ON(cachep->gfpflags & GFP_DMA); | ||
2655 | } | ||
2650 | } | 2656 | } |
2651 | 2657 | ||
2652 | static void *slab_get_obj(struct kmem_cache *cachep, struct slab *slabp, | 2658 | static void *slab_get_obj(struct kmem_cache *cachep, struct slab *slabp, |
@@ -2814,19 +2820,11 @@ failed: | |||
2814 | */ | 2820 | */ |
2815 | static void kfree_debugcheck(const void *objp) | 2821 | static void kfree_debugcheck(const void *objp) |
2816 | { | 2822 | { |
2817 | struct page *page; | ||
2818 | |||
2819 | if (!virt_addr_valid(objp)) { | 2823 | if (!virt_addr_valid(objp)) { |
2820 | printk(KERN_ERR "kfree_debugcheck: out of range ptr %lxh.\n", | 2824 | printk(KERN_ERR "kfree_debugcheck: out of range ptr %lxh.\n", |
2821 | (unsigned long)objp); | 2825 | (unsigned long)objp); |
2822 | BUG(); | 2826 | BUG(); |
2823 | } | 2827 | } |
2824 | page = virt_to_page(objp); | ||
2825 | if (!PageSlab(page)) { | ||
2826 | printk(KERN_ERR "kfree_debugcheck: bad ptr %lxh.\n", | ||
2827 | (unsigned long)objp); | ||
2828 | BUG(); | ||
2829 | } | ||
2830 | } | 2828 | } |
2831 | 2829 | ||
2832 | static inline void verify_redzone_free(struct kmem_cache *cache, void *obj) | 2830 | static inline void verify_redzone_free(struct kmem_cache *cache, void *obj) |
@@ -3197,35 +3195,6 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags) | |||
3197 | return objp; | 3195 | return objp; |
3198 | } | 3196 | } |
3199 | 3197 | ||
3200 | static __always_inline void *__cache_alloc(struct kmem_cache *cachep, | ||
3201 | gfp_t flags, void *caller) | ||
3202 | { | ||
3203 | unsigned long save_flags; | ||
3204 | void *objp = NULL; | ||
3205 | |||
3206 | cache_alloc_debugcheck_before(cachep, flags); | ||
3207 | |||
3208 | local_irq_save(save_flags); | ||
3209 | |||
3210 | if (unlikely(NUMA_BUILD && | ||
3211 | current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY))) | ||
3212 | objp = alternate_node_alloc(cachep, flags); | ||
3213 | |||
3214 | if (!objp) | ||
3215 | objp = ____cache_alloc(cachep, flags); | ||
3216 | /* | ||
3217 | * We may just have run out of memory on the local node. | ||
3218 | * ____cache_alloc_node() knows how to locate memory on other nodes | ||
3219 | */ | ||
3220 | if (NUMA_BUILD && !objp) | ||
3221 | objp = ____cache_alloc_node(cachep, flags, numa_node_id()); | ||
3222 | local_irq_restore(save_flags); | ||
3223 | objp = cache_alloc_debugcheck_after(cachep, flags, objp, | ||
3224 | caller); | ||
3225 | prefetchw(objp); | ||
3226 | return objp; | ||
3227 | } | ||
3228 | |||
3229 | #ifdef CONFIG_NUMA | 3198 | #ifdef CONFIG_NUMA |
3230 | /* | 3199 | /* |
3231 | * Try allocating on another node if PF_SPREAD_SLAB|PF_MEMPOLICY. | 3200 | * Try allocating on another node if PF_SPREAD_SLAB|PF_MEMPOLICY. |
@@ -3257,14 +3226,20 @@ static void *alternate_node_alloc(struct kmem_cache *cachep, gfp_t flags) | |||
3257 | * allocator to do its reclaim / fallback magic. We then insert the | 3226 | * allocator to do its reclaim / fallback magic. We then insert the |
3258 | * slab into the proper nodelist and then allocate from it. | 3227 | * slab into the proper nodelist and then allocate from it. |
3259 | */ | 3228 | */ |
3260 | void *fallback_alloc(struct kmem_cache *cache, gfp_t flags) | 3229 | static void *fallback_alloc(struct kmem_cache *cache, gfp_t flags) |
3261 | { | 3230 | { |
3262 | struct zonelist *zonelist = &NODE_DATA(slab_node(current->mempolicy)) | 3231 | struct zonelist *zonelist; |
3263 | ->node_zonelists[gfp_zone(flags)]; | 3232 | gfp_t local_flags; |
3264 | struct zone **z; | 3233 | struct zone **z; |
3265 | void *obj = NULL; | 3234 | void *obj = NULL; |
3266 | int nid; | 3235 | int nid; |
3267 | gfp_t local_flags = (flags & GFP_LEVEL_MASK); | 3236 | |
3237 | if (flags & __GFP_THISNODE) | ||
3238 | return NULL; | ||
3239 | |||
3240 | zonelist = &NODE_DATA(slab_node(current->mempolicy)) | ||
3241 | ->node_zonelists[gfp_zone(flags)]; | ||
3242 | local_flags = (flags & GFP_LEVEL_MASK); | ||
3268 | 3243 | ||
3269 | retry: | 3244 | retry: |
3270 | /* | 3245 | /* |
@@ -3374,16 +3349,110 @@ must_grow: | |||
3374 | if (x) | 3349 | if (x) |
3375 | goto retry; | 3350 | goto retry; |
3376 | 3351 | ||
3377 | if (!(flags & __GFP_THISNODE)) | 3352 | return fallback_alloc(cachep, flags); |
3378 | /* Unable to grow the cache. Fall back to other nodes. */ | ||
3379 | return fallback_alloc(cachep, flags); | ||
3380 | |||
3381 | return NULL; | ||
3382 | 3353 | ||
3383 | done: | 3354 | done: |
3384 | return obj; | 3355 | return obj; |
3385 | } | 3356 | } |
3386 | #endif | 3357 | |
3358 | /** | ||
3359 | * kmem_cache_alloc_node - Allocate an object on the specified node | ||
3360 | * @cachep: The cache to allocate from. | ||
3361 | * @flags: See kmalloc(). | ||
3362 | * @nodeid: node number of the target node. | ||
3363 | * @caller: return address of caller, used for debug information | ||
3364 | * | ||
3365 | * Identical to kmem_cache_alloc but it will allocate memory on the given | ||
3366 | * node, which can improve the performance for cpu bound structures. | ||
3367 | * | ||
3368 | * Fallback to other node is possible if __GFP_THISNODE is not set. | ||
3369 | */ | ||
3370 | static __always_inline void * | ||
3371 | __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, | ||
3372 | void *caller) | ||
3373 | { | ||
3374 | unsigned long save_flags; | ||
3375 | void *ptr; | ||
3376 | |||
3377 | cache_alloc_debugcheck_before(cachep, flags); | ||
3378 | local_irq_save(save_flags); | ||
3379 | |||
3380 | if (unlikely(nodeid == -1)) | ||
3381 | nodeid = numa_node_id(); | ||
3382 | |||
3383 | if (unlikely(!cachep->nodelists[nodeid])) { | ||
3384 | /* Node not bootstrapped yet */ | ||
3385 | ptr = fallback_alloc(cachep, flags); | ||
3386 | goto out; | ||
3387 | } | ||
3388 | |||
3389 | if (nodeid == numa_node_id()) { | ||
3390 | /* | ||
3391 | * Use the locally cached objects if possible. | ||
3392 | * However ____cache_alloc does not allow fallback | ||
3393 | * to other nodes. It may fail while we still have | ||
3394 | * objects on other nodes available. | ||
3395 | */ | ||
3396 | ptr = ____cache_alloc(cachep, flags); | ||
3397 | if (ptr) | ||
3398 | goto out; | ||
3399 | } | ||
3400 | /* ___cache_alloc_node can fall back to other nodes */ | ||
3401 | ptr = ____cache_alloc_node(cachep, flags, nodeid); | ||
3402 | out: | ||
3403 | local_irq_restore(save_flags); | ||
3404 | ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller); | ||
3405 | |||
3406 | return ptr; | ||
3407 | } | ||
3408 | |||
3409 | static __always_inline void * | ||
3410 | __do_cache_alloc(struct kmem_cache *cache, gfp_t flags) | ||
3411 | { | ||
3412 | void *objp; | ||
3413 | |||
3414 | if (unlikely(current->flags & (PF_SPREAD_SLAB | PF_MEMPOLICY))) { | ||
3415 | objp = alternate_node_alloc(cache, flags); | ||
3416 | if (objp) | ||
3417 | goto out; | ||
3418 | } | ||
3419 | objp = ____cache_alloc(cache, flags); | ||
3420 | |||
3421 | /* | ||
3422 | * We may just have run out of memory on the local node. | ||
3423 | * ____cache_alloc_node() knows how to locate memory on other nodes | ||
3424 | */ | ||
3425 | if (!objp) | ||
3426 | objp = ____cache_alloc_node(cache, flags, numa_node_id()); | ||
3427 | |||
3428 | out: | ||
3429 | return objp; | ||
3430 | } | ||
3431 | #else | ||
3432 | |||
3433 | static __always_inline void * | ||
3434 | __do_cache_alloc(struct kmem_cache *cachep, gfp_t flags) | ||
3435 | { | ||
3436 | return ____cache_alloc(cachep, flags); | ||
3437 | } | ||
3438 | |||
3439 | #endif /* CONFIG_NUMA */ | ||
3440 | |||
3441 | static __always_inline void * | ||
3442 | __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller) | ||
3443 | { | ||
3444 | unsigned long save_flags; | ||
3445 | void *objp; | ||
3446 | |||
3447 | cache_alloc_debugcheck_before(cachep, flags); | ||
3448 | local_irq_save(save_flags); | ||
3449 | objp = __do_cache_alloc(cachep, flags); | ||
3450 | local_irq_restore(save_flags); | ||
3451 | objp = cache_alloc_debugcheck_after(cachep, flags, objp, caller); | ||
3452 | prefetchw(objp); | ||
3453 | |||
3454 | return objp; | ||
3455 | } | ||
3387 | 3456 | ||
3388 | /* | 3457 | /* |
3389 | * Caller needs to acquire correct kmem_list's list_lock | 3458 | * Caller needs to acquire correct kmem_list's list_lock |
@@ -3582,57 +3651,6 @@ out: | |||
3582 | } | 3651 | } |
3583 | 3652 | ||
3584 | #ifdef CONFIG_NUMA | 3653 | #ifdef CONFIG_NUMA |
3585 | /** | ||
3586 | * kmem_cache_alloc_node - Allocate an object on the specified node | ||
3587 | * @cachep: The cache to allocate from. | ||
3588 | * @flags: See kmalloc(). | ||
3589 | * @nodeid: node number of the target node. | ||
3590 | * @caller: return address of caller, used for debug information | ||
3591 | * | ||
3592 | * Identical to kmem_cache_alloc but it will allocate memory on the given | ||
3593 | * node, which can improve the performance for cpu bound structures. | ||
3594 | * | ||
3595 | * Fallback to other node is possible if __GFP_THISNODE is not set. | ||
3596 | */ | ||
3597 | static __always_inline void * | ||
3598 | __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, | ||
3599 | int nodeid, void *caller) | ||
3600 | { | ||
3601 | unsigned long save_flags; | ||
3602 | void *ptr = NULL; | ||
3603 | |||
3604 | cache_alloc_debugcheck_before(cachep, flags); | ||
3605 | local_irq_save(save_flags); | ||
3606 | |||
3607 | if (unlikely(nodeid == -1)) | ||
3608 | nodeid = numa_node_id(); | ||
3609 | |||
3610 | if (likely(cachep->nodelists[nodeid])) { | ||
3611 | if (nodeid == numa_node_id()) { | ||
3612 | /* | ||
3613 | * Use the locally cached objects if possible. | ||
3614 | * However ____cache_alloc does not allow fallback | ||
3615 | * to other nodes. It may fail while we still have | ||
3616 | * objects on other nodes available. | ||
3617 | */ | ||
3618 | ptr = ____cache_alloc(cachep, flags); | ||
3619 | } | ||
3620 | if (!ptr) { | ||
3621 | /* ___cache_alloc_node can fall back to other nodes */ | ||
3622 | ptr = ____cache_alloc_node(cachep, flags, nodeid); | ||
3623 | } | ||
3624 | } else { | ||
3625 | /* Node not bootstrapped yet */ | ||
3626 | if (!(flags & __GFP_THISNODE)) | ||
3627 | ptr = fallback_alloc(cachep, flags); | ||
3628 | } | ||
3629 | |||
3630 | local_irq_restore(save_flags); | ||
3631 | ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller); | ||
3632 | |||
3633 | return ptr; | ||
3634 | } | ||
3635 | |||
3636 | void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid) | 3654 | void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid) |
3637 | { | 3655 | { |
3638 | return __cache_alloc_node(cachep, flags, nodeid, | 3656 | return __cache_alloc_node(cachep, flags, nodeid, |
@@ -3733,6 +3751,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp) | |||
3733 | BUG_ON(virt_to_cache(objp) != cachep); | 3751 | BUG_ON(virt_to_cache(objp) != cachep); |
3734 | 3752 | ||
3735 | local_irq_save(flags); | 3753 | local_irq_save(flags); |
3754 | debug_check_no_locks_freed(objp, obj_size(cachep)); | ||
3736 | __cache_free(cachep, objp); | 3755 | __cache_free(cachep, objp); |
3737 | local_irq_restore(flags); | 3756 | local_irq_restore(flags); |
3738 | } | 3757 | } |
@@ -4017,18 +4036,17 @@ void drain_array(struct kmem_cache *cachep, struct kmem_list3 *l3, | |||
4017 | * If we cannot acquire the cache chain mutex then just give up - we'll try | 4036 | * If we cannot acquire the cache chain mutex then just give up - we'll try |
4018 | * again on the next iteration. | 4037 | * again on the next iteration. |
4019 | */ | 4038 | */ |
4020 | static void cache_reap(struct work_struct *unused) | 4039 | static void cache_reap(struct work_struct *w) |
4021 | { | 4040 | { |
4022 | struct kmem_cache *searchp; | 4041 | struct kmem_cache *searchp; |
4023 | struct kmem_list3 *l3; | 4042 | struct kmem_list3 *l3; |
4024 | int node = numa_node_id(); | 4043 | int node = numa_node_id(); |
4044 | struct delayed_work *work = | ||
4045 | container_of(w, struct delayed_work, work); | ||
4025 | 4046 | ||
4026 | if (!mutex_trylock(&cache_chain_mutex)) { | 4047 | if (!mutex_trylock(&cache_chain_mutex)) |
4027 | /* Give up. Setup the next iteration. */ | 4048 | /* Give up. Setup the next iteration. */ |
4028 | schedule_delayed_work(&__get_cpu_var(reap_work), | 4049 | goto out; |
4029 | round_jiffies_relative(REAPTIMEOUT_CPUC)); | ||
4030 | return; | ||
4031 | } | ||
4032 | 4050 | ||
4033 | list_for_each_entry(searchp, &cache_chain, next) { | 4051 | list_for_each_entry(searchp, &cache_chain, next) { |
4034 | check_irq_on(); | 4052 | check_irq_on(); |
@@ -4071,9 +4089,9 @@ next: | |||
4071 | mutex_unlock(&cache_chain_mutex); | 4089 | mutex_unlock(&cache_chain_mutex); |
4072 | next_reap_node(); | 4090 | next_reap_node(); |
4073 | refresh_cpu_vm_stats(smp_processor_id()); | 4091 | refresh_cpu_vm_stats(smp_processor_id()); |
4092 | out: | ||
4074 | /* Set up the next iteration */ | 4093 | /* Set up the next iteration */ |
4075 | schedule_delayed_work(&__get_cpu_var(reap_work), | 4094 | schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_CPUC)); |
4076 | round_jiffies_relative(REAPTIMEOUT_CPUC)); | ||
4077 | } | 4095 | } |
4078 | 4096 | ||
4079 | #ifdef CONFIG_PROC_FS | 4097 | #ifdef CONFIG_PROC_FS |
diff --git a/mm/truncate.c b/mm/truncate.c index 5df947de7654..ebf3fcb4115b 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -85,7 +85,7 @@ EXPORT_SYMBOL(cancel_dirty_page); | |||
85 | * | 85 | * |
86 | * We need to bale out if page->mapping is no longer equal to the original | 86 | * We need to bale out if page->mapping is no longer equal to the original |
87 | * mapping. This happens a) when the VM reclaimed the page while we waited on | 87 | * mapping. This happens a) when the VM reclaimed the page while we waited on |
88 | * its lock, b) when a concurrent invalidate_inode_pages got there first and | 88 | * its lock, b) when a concurrent invalidate_mapping_pages got there first and |
89 | * c) when tmpfs swizzles a page between a tmpfs inode and swapper_space. | 89 | * c) when tmpfs swizzles a page between a tmpfs inode and swapper_space. |
90 | */ | 90 | */ |
91 | static void | 91 | static void |
@@ -106,7 +106,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | /* | 108 | /* |
109 | * This is for invalidate_inode_pages(). That function can be called at | 109 | * This is for invalidate_mapping_pages(). That function can be called at |
110 | * any time, and is not supposed to throw away dirty pages. But pages can | 110 | * any time, and is not supposed to throw away dirty pages. But pages can |
111 | * be marked dirty at any time too, so use remove_mapping which safely | 111 | * be marked dirty at any time too, so use remove_mapping which safely |
112 | * discards clean, unused pages. | 112 | * discards clean, unused pages. |
@@ -310,12 +310,7 @@ unlock: | |||
310 | } | 310 | } |
311 | return ret; | 311 | return ret; |
312 | } | 312 | } |
313 | 313 | EXPORT_SYMBOL(invalidate_mapping_pages); | |
314 | unsigned long invalidate_inode_pages(struct address_space *mapping) | ||
315 | { | ||
316 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
317 | } | ||
318 | EXPORT_SYMBOL(invalidate_inode_pages); | ||
319 | 314 | ||
320 | /* | 315 | /* |
321 | * This is like invalidate_complete_page(), except it ignores the page's | 316 | * This is like invalidate_complete_page(), except it ignores the page's |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 86897ee792d6..9eef486da909 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -699,7 +699,7 @@ finished: | |||
699 | * that it is big enough to cover the vma. Will return failure if | 699 | * that it is big enough to cover the vma. Will return failure if |
700 | * that criteria isn't met. | 700 | * that criteria isn't met. |
701 | * | 701 | * |
702 | * Similar to remap_pfn_range (see mm/memory.c) | 702 | * Similar to remap_pfn_range() (see mm/memory.c) |
703 | */ | 703 | */ |
704 | int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, | 704 | int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, |
705 | unsigned long pgoff) | 705 | unsigned long pgoff) |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 7430df68cb64..0655d5fe73e8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -679,7 +679,7 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, | |||
679 | nr_taken = isolate_lru_pages(sc->swap_cluster_max, | 679 | nr_taken = isolate_lru_pages(sc->swap_cluster_max, |
680 | &zone->inactive_list, | 680 | &zone->inactive_list, |
681 | &page_list, &nr_scan); | 681 | &page_list, &nr_scan); |
682 | zone->nr_inactive -= nr_taken; | 682 | __mod_zone_page_state(zone, NR_INACTIVE, -nr_taken); |
683 | zone->pages_scanned += nr_scan; | 683 | zone->pages_scanned += nr_scan; |
684 | spin_unlock_irq(&zone->lru_lock); | 684 | spin_unlock_irq(&zone->lru_lock); |
685 | 685 | ||
@@ -740,7 +740,8 @@ static inline void note_zone_scanning_priority(struct zone *zone, int priority) | |||
740 | 740 | ||
741 | static inline int zone_is_near_oom(struct zone *zone) | 741 | static inline int zone_is_near_oom(struct zone *zone) |
742 | { | 742 | { |
743 | return zone->pages_scanned >= (zone->nr_active + zone->nr_inactive)*3; | 743 | return zone->pages_scanned >= (zone_page_state(zone, NR_ACTIVE) |
744 | + zone_page_state(zone, NR_INACTIVE))*3; | ||
744 | } | 745 | } |
745 | 746 | ||
746 | /* | 747 | /* |
@@ -825,7 +826,7 @@ force_reclaim_mapped: | |||
825 | pgmoved = isolate_lru_pages(nr_pages, &zone->active_list, | 826 | pgmoved = isolate_lru_pages(nr_pages, &zone->active_list, |
826 | &l_hold, &pgscanned); | 827 | &l_hold, &pgscanned); |
827 | zone->pages_scanned += pgscanned; | 828 | zone->pages_scanned += pgscanned; |
828 | zone->nr_active -= pgmoved; | 829 | __mod_zone_page_state(zone, NR_ACTIVE, -pgmoved); |
829 | spin_unlock_irq(&zone->lru_lock); | 830 | spin_unlock_irq(&zone->lru_lock); |
830 | 831 | ||
831 | while (!list_empty(&l_hold)) { | 832 | while (!list_empty(&l_hold)) { |
@@ -857,7 +858,7 @@ force_reclaim_mapped: | |||
857 | list_move(&page->lru, &zone->inactive_list); | 858 | list_move(&page->lru, &zone->inactive_list); |
858 | pgmoved++; | 859 | pgmoved++; |
859 | if (!pagevec_add(&pvec, page)) { | 860 | if (!pagevec_add(&pvec, page)) { |
860 | zone->nr_inactive += pgmoved; | 861 | __mod_zone_page_state(zone, NR_INACTIVE, pgmoved); |
861 | spin_unlock_irq(&zone->lru_lock); | 862 | spin_unlock_irq(&zone->lru_lock); |
862 | pgdeactivate += pgmoved; | 863 | pgdeactivate += pgmoved; |
863 | pgmoved = 0; | 864 | pgmoved = 0; |
@@ -867,7 +868,7 @@ force_reclaim_mapped: | |||
867 | spin_lock_irq(&zone->lru_lock); | 868 | spin_lock_irq(&zone->lru_lock); |
868 | } | 869 | } |
869 | } | 870 | } |
870 | zone->nr_inactive += pgmoved; | 871 | __mod_zone_page_state(zone, NR_INACTIVE, pgmoved); |
871 | pgdeactivate += pgmoved; | 872 | pgdeactivate += pgmoved; |
872 | if (buffer_heads_over_limit) { | 873 | if (buffer_heads_over_limit) { |
873 | spin_unlock_irq(&zone->lru_lock); | 874 | spin_unlock_irq(&zone->lru_lock); |
@@ -885,14 +886,14 @@ force_reclaim_mapped: | |||
885 | list_move(&page->lru, &zone->active_list); | 886 | list_move(&page->lru, &zone->active_list); |
886 | pgmoved++; | 887 | pgmoved++; |
887 | if (!pagevec_add(&pvec, page)) { | 888 | if (!pagevec_add(&pvec, page)) { |
888 | zone->nr_active += pgmoved; | 889 | __mod_zone_page_state(zone, NR_ACTIVE, pgmoved); |
889 | pgmoved = 0; | 890 | pgmoved = 0; |
890 | spin_unlock_irq(&zone->lru_lock); | 891 | spin_unlock_irq(&zone->lru_lock); |
891 | __pagevec_release(&pvec); | 892 | __pagevec_release(&pvec); |
892 | spin_lock_irq(&zone->lru_lock); | 893 | spin_lock_irq(&zone->lru_lock); |
893 | } | 894 | } |
894 | } | 895 | } |
895 | zone->nr_active += pgmoved; | 896 | __mod_zone_page_state(zone, NR_ACTIVE, pgmoved); |
896 | 897 | ||
897 | __count_zone_vm_events(PGREFILL, zone, pgscanned); | 898 | __count_zone_vm_events(PGREFILL, zone, pgscanned); |
898 | __count_vm_events(PGDEACTIVATE, pgdeactivate); | 899 | __count_vm_events(PGDEACTIVATE, pgdeactivate); |
@@ -918,14 +919,16 @@ static unsigned long shrink_zone(int priority, struct zone *zone, | |||
918 | * Add one to `nr_to_scan' just to make sure that the kernel will | 919 | * Add one to `nr_to_scan' just to make sure that the kernel will |
919 | * slowly sift through the active list. | 920 | * slowly sift through the active list. |
920 | */ | 921 | */ |
921 | zone->nr_scan_active += (zone->nr_active >> priority) + 1; | 922 | zone->nr_scan_active += |
923 | (zone_page_state(zone, NR_ACTIVE) >> priority) + 1; | ||
922 | nr_active = zone->nr_scan_active; | 924 | nr_active = zone->nr_scan_active; |
923 | if (nr_active >= sc->swap_cluster_max) | 925 | if (nr_active >= sc->swap_cluster_max) |
924 | zone->nr_scan_active = 0; | 926 | zone->nr_scan_active = 0; |
925 | else | 927 | else |
926 | nr_active = 0; | 928 | nr_active = 0; |
927 | 929 | ||
928 | zone->nr_scan_inactive += (zone->nr_inactive >> priority) + 1; | 930 | zone->nr_scan_inactive += |
931 | (zone_page_state(zone, NR_INACTIVE) >> priority) + 1; | ||
929 | nr_inactive = zone->nr_scan_inactive; | 932 | nr_inactive = zone->nr_scan_inactive; |
930 | if (nr_inactive >= sc->swap_cluster_max) | 933 | if (nr_inactive >= sc->swap_cluster_max) |
931 | zone->nr_scan_inactive = 0; | 934 | zone->nr_scan_inactive = 0; |
@@ -1037,7 +1040,8 @@ unsigned long try_to_free_pages(struct zone **zones, gfp_t gfp_mask) | |||
1037 | if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) | 1040 | if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) |
1038 | continue; | 1041 | continue; |
1039 | 1042 | ||
1040 | lru_pages += zone->nr_active + zone->nr_inactive; | 1043 | lru_pages += zone_page_state(zone, NR_ACTIVE) |
1044 | + zone_page_state(zone, NR_INACTIVE); | ||
1041 | } | 1045 | } |
1042 | 1046 | ||
1043 | for (priority = DEF_PRIORITY; priority >= 0; priority--) { | 1047 | for (priority = DEF_PRIORITY; priority >= 0; priority--) { |
@@ -1182,7 +1186,8 @@ loop_again: | |||
1182 | for (i = 0; i <= end_zone; i++) { | 1186 | for (i = 0; i <= end_zone; i++) { |
1183 | struct zone *zone = pgdat->node_zones + i; | 1187 | struct zone *zone = pgdat->node_zones + i; |
1184 | 1188 | ||
1185 | lru_pages += zone->nr_active + zone->nr_inactive; | 1189 | lru_pages += zone_page_state(zone, NR_ACTIVE) |
1190 | + zone_page_state(zone, NR_INACTIVE); | ||
1186 | } | 1191 | } |
1187 | 1192 | ||
1188 | /* | 1193 | /* |
@@ -1219,8 +1224,9 @@ loop_again: | |||
1219 | if (zone->all_unreclaimable) | 1224 | if (zone->all_unreclaimable) |
1220 | continue; | 1225 | continue; |
1221 | if (nr_slab == 0 && zone->pages_scanned >= | 1226 | if (nr_slab == 0 && zone->pages_scanned >= |
1222 | (zone->nr_active + zone->nr_inactive) * 6) | 1227 | (zone_page_state(zone, NR_ACTIVE) |
1223 | zone->all_unreclaimable = 1; | 1228 | + zone_page_state(zone, NR_INACTIVE)) * 6) |
1229 | zone->all_unreclaimable = 1; | ||
1224 | /* | 1230 | /* |
1225 | * If we've done a decent amount of scanning and | 1231 | * If we've done a decent amount of scanning and |
1226 | * the reclaim ratio is low, start doing writepage | 1232 | * the reclaim ratio is low, start doing writepage |
@@ -1385,18 +1391,22 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int prio, | |||
1385 | 1391 | ||
1386 | /* For pass = 0 we don't shrink the active list */ | 1392 | /* For pass = 0 we don't shrink the active list */ |
1387 | if (pass > 0) { | 1393 | if (pass > 0) { |
1388 | zone->nr_scan_active += (zone->nr_active >> prio) + 1; | 1394 | zone->nr_scan_active += |
1395 | (zone_page_state(zone, NR_ACTIVE) >> prio) + 1; | ||
1389 | if (zone->nr_scan_active >= nr_pages || pass > 3) { | 1396 | if (zone->nr_scan_active >= nr_pages || pass > 3) { |
1390 | zone->nr_scan_active = 0; | 1397 | zone->nr_scan_active = 0; |
1391 | nr_to_scan = min(nr_pages, zone->nr_active); | 1398 | nr_to_scan = min(nr_pages, |
1399 | zone_page_state(zone, NR_ACTIVE)); | ||
1392 | shrink_active_list(nr_to_scan, zone, sc, prio); | 1400 | shrink_active_list(nr_to_scan, zone, sc, prio); |
1393 | } | 1401 | } |
1394 | } | 1402 | } |
1395 | 1403 | ||
1396 | zone->nr_scan_inactive += (zone->nr_inactive >> prio) + 1; | 1404 | zone->nr_scan_inactive += |
1405 | (zone_page_state(zone, NR_INACTIVE) >> prio) + 1; | ||
1397 | if (zone->nr_scan_inactive >= nr_pages || pass > 3) { | 1406 | if (zone->nr_scan_inactive >= nr_pages || pass > 3) { |
1398 | zone->nr_scan_inactive = 0; | 1407 | zone->nr_scan_inactive = 0; |
1399 | nr_to_scan = min(nr_pages, zone->nr_inactive); | 1408 | nr_to_scan = min(nr_pages, |
1409 | zone_page_state(zone, NR_INACTIVE)); | ||
1400 | ret += shrink_inactive_list(nr_to_scan, zone, sc); | 1410 | ret += shrink_inactive_list(nr_to_scan, zone, sc); |
1401 | if (ret >= nr_pages) | 1411 | if (ret >= nr_pages) |
1402 | return ret; | 1412 | return ret; |
@@ -1408,12 +1418,7 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int prio, | |||
1408 | 1418 | ||
1409 | static unsigned long count_lru_pages(void) | 1419 | static unsigned long count_lru_pages(void) |
1410 | { | 1420 | { |
1411 | struct zone *zone; | 1421 | return global_page_state(NR_ACTIVE) + global_page_state(NR_INACTIVE); |
1412 | unsigned long ret = 0; | ||
1413 | |||
1414 | for_each_zone(zone) | ||
1415 | ret += zone->nr_active + zone->nr_inactive; | ||
1416 | return ret; | ||
1417 | } | 1422 | } |
1418 | 1423 | ||
1419 | /* | 1424 | /* |
diff --git a/mm/vmstat.c b/mm/vmstat.c index dc005a0c96ae..6c488d6ac425 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -13,39 +13,6 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
15 | 15 | ||
16 | void __get_zone_counts(unsigned long *active, unsigned long *inactive, | ||
17 | unsigned long *free, struct pglist_data *pgdat) | ||
18 | { | ||
19 | struct zone *zones = pgdat->node_zones; | ||
20 | int i; | ||
21 | |||
22 | *active = 0; | ||
23 | *inactive = 0; | ||
24 | *free = 0; | ||
25 | for (i = 0; i < MAX_NR_ZONES; i++) { | ||
26 | *active += zones[i].nr_active; | ||
27 | *inactive += zones[i].nr_inactive; | ||
28 | *free += zones[i].free_pages; | ||
29 | } | ||
30 | } | ||
31 | |||
32 | void get_zone_counts(unsigned long *active, | ||
33 | unsigned long *inactive, unsigned long *free) | ||
34 | { | ||
35 | struct pglist_data *pgdat; | ||
36 | |||
37 | *active = 0; | ||
38 | *inactive = 0; | ||
39 | *free = 0; | ||
40 | for_each_online_pgdat(pgdat) { | ||
41 | unsigned long l, m, n; | ||
42 | __get_zone_counts(&l, &m, &n, pgdat); | ||
43 | *active += l; | ||
44 | *inactive += m; | ||
45 | *free += n; | ||
46 | } | ||
47 | } | ||
48 | |||
49 | #ifdef CONFIG_VM_EVENT_COUNTERS | 16 | #ifdef CONFIG_VM_EVENT_COUNTERS |
50 | DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}}; | 17 | DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}}; |
51 | EXPORT_PER_CPU_SYMBOL(vm_event_states); | 18 | EXPORT_PER_CPU_SYMBOL(vm_event_states); |
@@ -239,7 +206,7 @@ EXPORT_SYMBOL(mod_zone_page_state); | |||
239 | * in between and therefore the atomicity vs. interrupt cannot be exploited | 206 | * in between and therefore the atomicity vs. interrupt cannot be exploited |
240 | * in a useful way here. | 207 | * in a useful way here. |
241 | */ | 208 | */ |
242 | static void __inc_zone_state(struct zone *zone, enum zone_stat_item item) | 209 | void __inc_zone_state(struct zone *zone, enum zone_stat_item item) |
243 | { | 210 | { |
244 | struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id()); | 211 | struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id()); |
245 | s8 *p = pcp->vm_stat_diff + item; | 212 | s8 *p = pcp->vm_stat_diff + item; |
@@ -260,9 +227,8 @@ void __inc_zone_page_state(struct page *page, enum zone_stat_item item) | |||
260 | } | 227 | } |
261 | EXPORT_SYMBOL(__inc_zone_page_state); | 228 | EXPORT_SYMBOL(__inc_zone_page_state); |
262 | 229 | ||
263 | void __dec_zone_page_state(struct page *page, enum zone_stat_item item) | 230 | void __dec_zone_state(struct zone *zone, enum zone_stat_item item) |
264 | { | 231 | { |
265 | struct zone *zone = page_zone(page); | ||
266 | struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id()); | 232 | struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id()); |
267 | s8 *p = pcp->vm_stat_diff + item; | 233 | s8 *p = pcp->vm_stat_diff + item; |
268 | 234 | ||
@@ -275,6 +241,11 @@ void __dec_zone_page_state(struct page *page, enum zone_stat_item item) | |||
275 | *p = overstep; | 241 | *p = overstep; |
276 | } | 242 | } |
277 | } | 243 | } |
244 | |||
245 | void __dec_zone_page_state(struct page *page, enum zone_stat_item item) | ||
246 | { | ||
247 | __dec_zone_state(page_zone(page), item); | ||
248 | } | ||
278 | EXPORT_SYMBOL(__dec_zone_page_state); | 249 | EXPORT_SYMBOL(__dec_zone_page_state); |
279 | 250 | ||
280 | void inc_zone_state(struct zone *zone, enum zone_stat_item item) | 251 | void inc_zone_state(struct zone *zone, enum zone_stat_item item) |
@@ -437,6 +408,12 @@ const struct seq_operations fragmentation_op = { | |||
437 | .show = frag_show, | 408 | .show = frag_show, |
438 | }; | 409 | }; |
439 | 410 | ||
411 | #ifdef CONFIG_ZONE_DMA | ||
412 | #define TEXT_FOR_DMA(xx) xx "_dma", | ||
413 | #else | ||
414 | #define TEXT_FOR_DMA(xx) | ||
415 | #endif | ||
416 | |||
440 | #ifdef CONFIG_ZONE_DMA32 | 417 | #ifdef CONFIG_ZONE_DMA32 |
441 | #define TEXT_FOR_DMA32(xx) xx "_dma32", | 418 | #define TEXT_FOR_DMA32(xx) xx "_dma32", |
442 | #else | 419 | #else |
@@ -449,19 +426,22 @@ const struct seq_operations fragmentation_op = { | |||
449 | #define TEXT_FOR_HIGHMEM(xx) | 426 | #define TEXT_FOR_HIGHMEM(xx) |
450 | #endif | 427 | #endif |
451 | 428 | ||
452 | #define TEXTS_FOR_ZONES(xx) xx "_dma", TEXT_FOR_DMA32(xx) xx "_normal", \ | 429 | #define TEXTS_FOR_ZONES(xx) TEXT_FOR_DMA(xx) TEXT_FOR_DMA32(xx) xx "_normal", \ |
453 | TEXT_FOR_HIGHMEM(xx) | 430 | TEXT_FOR_HIGHMEM(xx) |
454 | 431 | ||
455 | static const char * const vmstat_text[] = { | 432 | static const char * const vmstat_text[] = { |
456 | /* Zoned VM counters */ | 433 | /* Zoned VM counters */ |
434 | "nr_free_pages", | ||
435 | "nr_active", | ||
436 | "nr_inactive", | ||
457 | "nr_anon_pages", | 437 | "nr_anon_pages", |
458 | "nr_mapped", | 438 | "nr_mapped", |
459 | "nr_file_pages", | 439 | "nr_file_pages", |
440 | "nr_dirty", | ||
441 | "nr_writeback", | ||
460 | "nr_slab_reclaimable", | 442 | "nr_slab_reclaimable", |
461 | "nr_slab_unreclaimable", | 443 | "nr_slab_unreclaimable", |
462 | "nr_page_table_pages", | 444 | "nr_page_table_pages", |
463 | "nr_dirty", | ||
464 | "nr_writeback", | ||
465 | "nr_unstable", | 445 | "nr_unstable", |
466 | "nr_bounce", | 446 | "nr_bounce", |
467 | "nr_vmscan_write", | 447 | "nr_vmscan_write", |
@@ -529,17 +509,13 @@ static int zoneinfo_show(struct seq_file *m, void *arg) | |||
529 | "\n min %lu" | 509 | "\n min %lu" |
530 | "\n low %lu" | 510 | "\n low %lu" |
531 | "\n high %lu" | 511 | "\n high %lu" |
532 | "\n active %lu" | ||
533 | "\n inactive %lu" | ||
534 | "\n scanned %lu (a: %lu i: %lu)" | 512 | "\n scanned %lu (a: %lu i: %lu)" |
535 | "\n spanned %lu" | 513 | "\n spanned %lu" |
536 | "\n present %lu", | 514 | "\n present %lu", |
537 | zone->free_pages, | 515 | zone_page_state(zone, NR_FREE_PAGES), |
538 | zone->pages_min, | 516 | zone->pages_min, |
539 | zone->pages_low, | 517 | zone->pages_low, |
540 | zone->pages_high, | 518 | zone->pages_high, |
541 | zone->nr_active, | ||
542 | zone->nr_inactive, | ||
543 | zone->pages_scanned, | 519 | zone->pages_scanned, |
544 | zone->nr_scan_active, zone->nr_scan_inactive, | 520 | zone->nr_scan_active, zone->nr_scan_inactive, |
545 | zone->spanned_pages, | 521 | zone->spanned_pages, |
@@ -563,12 +539,6 @@ static int zoneinfo_show(struct seq_file *m, void *arg) | |||
563 | 539 | ||
564 | pageset = zone_pcp(zone, i); | 540 | pageset = zone_pcp(zone, i); |
565 | for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { | 541 | for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { |
566 | if (pageset->pcp[j].count) | ||
567 | break; | ||
568 | } | ||
569 | if (j == ARRAY_SIZE(pageset->pcp)) | ||
570 | continue; | ||
571 | for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { | ||
572 | seq_printf(m, | 542 | seq_printf(m, |
573 | "\n cpu: %i pcp: %i" | 543 | "\n cpu: %i pcp: %i" |
574 | "\n count: %i" | 544 | "\n count: %i" |
diff --git a/net/core/dst.c b/net/core/dst.c index 1a53fb39b7e0..f9eace78d354 100644 --- a/net/core/dst.c +++ b/net/core/dst.c | |||
@@ -132,10 +132,9 @@ void * dst_alloc(struct dst_ops * ops) | |||
132 | if (ops->gc()) | 132 | if (ops->gc()) |
133 | return NULL; | 133 | return NULL; |
134 | } | 134 | } |
135 | dst = kmem_cache_alloc(ops->kmem_cachep, GFP_ATOMIC); | 135 | dst = kmem_cache_zalloc(ops->kmem_cachep, GFP_ATOMIC); |
136 | if (!dst) | 136 | if (!dst) |
137 | return NULL; | 137 | return NULL; |
138 | memset(dst, 0, ops->entry_size); | ||
139 | atomic_set(&dst->__refcnt, 0); | 138 | atomic_set(&dst->__refcnt, 0); |
140 | dst->ops = ops; | 139 | dst->ops = ops; |
141 | dst->lastuse = jiffies; | 140 | dst->lastuse = jiffies; |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 054d46493d2b..efb673ad1854 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -251,12 +251,10 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl) | |||
251 | goto out_entries; | 251 | goto out_entries; |
252 | } | 252 | } |
253 | 253 | ||
254 | n = kmem_cache_alloc(tbl->kmem_cachep, GFP_ATOMIC); | 254 | n = kmem_cache_zalloc(tbl->kmem_cachep, GFP_ATOMIC); |
255 | if (!n) | 255 | if (!n) |
256 | goto out_entries; | 256 | goto out_entries; |
257 | 257 | ||
258 | memset(n, 0, tbl->entry_size); | ||
259 | |||
260 | skb_queue_head_init(&n->arp_queue); | 258 | skb_queue_head_init(&n->arp_queue); |
261 | rwlock_init(&n->lock); | 259 | rwlock_init(&n->lock); |
262 | n->updated = n->used = now; | 260 | n->updated = n->used = now; |
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index e32d0c3d5a96..b6c98ac93dc8 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c | |||
@@ -151,10 +151,10 @@ static int dn_fib_rule_configure(struct fib_rule *rule, struct sk_buff *skb, | |||
151 | } | 151 | } |
152 | 152 | ||
153 | if (tb[FRA_SRC]) | 153 | if (tb[FRA_SRC]) |
154 | r->src = nla_get_u16(tb[FRA_SRC]); | 154 | r->src = nla_get_le16(tb[FRA_SRC]); |
155 | 155 | ||
156 | if (tb[FRA_DST]) | 156 | if (tb[FRA_DST]) |
157 | r->dst = nla_get_u16(tb[FRA_DST]); | 157 | r->dst = nla_get_le16(tb[FRA_DST]); |
158 | 158 | ||
159 | r->src_len = frh->src_len; | 159 | r->src_len = frh->src_len; |
160 | r->srcmask = dnet_make_mask(r->src_len); | 160 | r->srcmask = dnet_make_mask(r->src_len); |
@@ -176,10 +176,10 @@ static int dn_fib_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, | |||
176 | if (frh->dst_len && (r->dst_len != frh->dst_len)) | 176 | if (frh->dst_len && (r->dst_len != frh->dst_len)) |
177 | return 0; | 177 | return 0; |
178 | 178 | ||
179 | if (tb[FRA_SRC] && (r->src != nla_get_u16(tb[FRA_SRC]))) | 179 | if (tb[FRA_SRC] && (r->src != nla_get_le16(tb[FRA_SRC]))) |
180 | return 0; | 180 | return 0; |
181 | 181 | ||
182 | if (tb[FRA_DST] && (r->dst != nla_get_u16(tb[FRA_DST]))) | 182 | if (tb[FRA_DST] && (r->dst != nla_get_le16(tb[FRA_DST]))) |
183 | return 0; | 183 | return 0; |
184 | 184 | ||
185 | return 1; | 185 | return 1; |
@@ -214,9 +214,9 @@ static int dn_fib_rule_fill(struct fib_rule *rule, struct sk_buff *skb, | |||
214 | frh->tos = 0; | 214 | frh->tos = 0; |
215 | 215 | ||
216 | if (r->dst_len) | 216 | if (r->dst_len) |
217 | NLA_PUT_U16(skb, FRA_DST, r->dst); | 217 | NLA_PUT_LE16(skb, FRA_DST, r->dst); |
218 | if (r->src_len) | 218 | if (r->src_len) |
219 | NLA_PUT_U16(skb, FRA_SRC, r->src); | 219 | NLA_PUT_LE16(skb, FRA_SRC, r->src); |
220 | 220 | ||
221 | return 0; | 221 | return 0; |
222 | 222 | ||
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c index c1f0cc1b1c60..720501e1ae20 100644 --- a/net/decnet/dn_table.c +++ b/net/decnet/dn_table.c | |||
@@ -593,12 +593,10 @@ create: | |||
593 | 593 | ||
594 | replace: | 594 | replace: |
595 | err = -ENOBUFS; | 595 | err = -ENOBUFS; |
596 | new_f = kmem_cache_alloc(dn_hash_kmem, GFP_KERNEL); | 596 | new_f = kmem_cache_zalloc(dn_hash_kmem, GFP_KERNEL); |
597 | if (new_f == NULL) | 597 | if (new_f == NULL) |
598 | goto out; | 598 | goto out; |
599 | 599 | ||
600 | memset(new_f, 0, sizeof(struct dn_fib_node)); | ||
601 | |||
602 | new_f->fn_key = key; | 600 | new_f->fn_key = key; |
603 | new_f->fn_type = type; | 601 | new_f->fn_type = type; |
604 | new_f->fn_scope = r->rtm_scope; | 602 | new_f->fn_scope = r->rtm_scope; |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index ecb5422ea237..d7e1e60f51d5 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -479,20 +479,18 @@ static struct mfc_cache *ipmr_cache_find(__be32 origin, __be32 mcastgrp) | |||
479 | */ | 479 | */ |
480 | static struct mfc_cache *ipmr_cache_alloc(void) | 480 | static struct mfc_cache *ipmr_cache_alloc(void) |
481 | { | 481 | { |
482 | struct mfc_cache *c=kmem_cache_alloc(mrt_cachep, GFP_KERNEL); | 482 | struct mfc_cache *c=kmem_cache_zalloc(mrt_cachep, GFP_KERNEL); |
483 | if(c==NULL) | 483 | if(c==NULL) |
484 | return NULL; | 484 | return NULL; |
485 | memset(c, 0, sizeof(*c)); | ||
486 | c->mfc_un.res.minvif = MAXVIFS; | 485 | c->mfc_un.res.minvif = MAXVIFS; |
487 | return c; | 486 | return c; |
488 | } | 487 | } |
489 | 488 | ||
490 | static struct mfc_cache *ipmr_cache_alloc_unres(void) | 489 | static struct mfc_cache *ipmr_cache_alloc_unres(void) |
491 | { | 490 | { |
492 | struct mfc_cache *c=kmem_cache_alloc(mrt_cachep, GFP_ATOMIC); | 491 | struct mfc_cache *c=kmem_cache_zalloc(mrt_cachep, GFP_ATOMIC); |
493 | if(c==NULL) | 492 | if(c==NULL) |
494 | return NULL; | 493 | return NULL; |
495 | memset(c, 0, sizeof(*c)); | ||
496 | skb_queue_head_init(&c->mfc_un.unres.unresolved); | 494 | skb_queue_head_init(&c->mfc_un.unres.unresolved); |
497 | c->mfc_un.unres.expires = jiffies + 10*HZ; | 495 | c->mfc_un.unres.expires = jiffies + 10*HZ; |
498 | return c; | 496 | return c; |
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c index 8086787a2c51..3aec4ac66e3c 100644 --- a/net/ipv4/ipvs/ip_vs_conn.c +++ b/net/ipv4/ipvs/ip_vs_conn.c | |||
@@ -603,13 +603,12 @@ ip_vs_conn_new(int proto, __be32 caddr, __be16 cport, __be32 vaddr, __be16 vport | |||
603 | struct ip_vs_conn *cp; | 603 | struct ip_vs_conn *cp; |
604 | struct ip_vs_protocol *pp = ip_vs_proto_get(proto); | 604 | struct ip_vs_protocol *pp = ip_vs_proto_get(proto); |
605 | 605 | ||
606 | cp = kmem_cache_alloc(ip_vs_conn_cachep, GFP_ATOMIC); | 606 | cp = kmem_cache_zalloc(ip_vs_conn_cachep, GFP_ATOMIC); |
607 | if (cp == NULL) { | 607 | if (cp == NULL) { |
608 | IP_VS_ERR_RL("ip_vs_conn_new: no memory available.\n"); | 608 | IP_VS_ERR_RL("ip_vs_conn_new: no memory available.\n"); |
609 | return NULL; | 609 | return NULL; |
610 | } | 610 | } |
611 | 611 | ||
612 | memset(cp, 0, sizeof(*cp)); | ||
613 | INIT_LIST_HEAD(&cp->c_list); | 612 | INIT_LIST_HEAD(&cp->c_list); |
614 | init_timer(&cp->timer); | 613 | init_timer(&cp->timer); |
615 | cp->timer.data = (unsigned long)cp; | 614 | cp->timer.data = (unsigned long)cp; |
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 8556a4f4f60a..62be2eb37698 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -638,14 +638,13 @@ struct ip_conntrack *ip_conntrack_alloc(struct ip_conntrack_tuple *orig, | |||
638 | } | 638 | } |
639 | } | 639 | } |
640 | 640 | ||
641 | conntrack = kmem_cache_alloc(ip_conntrack_cachep, GFP_ATOMIC); | 641 | conntrack = kmem_cache_zalloc(ip_conntrack_cachep, GFP_ATOMIC); |
642 | if (!conntrack) { | 642 | if (!conntrack) { |
643 | DEBUGP("Can't allocate conntrack.\n"); | 643 | DEBUGP("Can't allocate conntrack.\n"); |
644 | atomic_dec(&ip_conntrack_count); | 644 | atomic_dec(&ip_conntrack_count); |
645 | return ERR_PTR(-ENOMEM); | 645 | return ERR_PTR(-ENOMEM); |
646 | } | 646 | } |
647 | 647 | ||
648 | memset(conntrack, 0, sizeof(*conntrack)); | ||
649 | atomic_set(&conntrack->ct_general.use, 1); | 648 | atomic_set(&conntrack->ct_general.use, 1); |
650 | conntrack->ct_general.destroy = destroy_conntrack; | 649 | conntrack->ct_general.destroy = destroy_conntrack; |
651 | conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; | 650 | conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 96d8310ae9c8..827f8842b578 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -150,8 +150,7 @@ static __inline__ struct fib6_node * node_alloc(void) | |||
150 | { | 150 | { |
151 | struct fib6_node *fn; | 151 | struct fib6_node *fn; |
152 | 152 | ||
153 | if ((fn = kmem_cache_alloc(fib6_node_kmem, GFP_ATOMIC)) != NULL) | 153 | fn = kmem_cache_zalloc(fib6_node_kmem, GFP_ATOMIC); |
154 | memset(fn, 0, sizeof(struct fib6_node)); | ||
155 | 154 | ||
156 | return fn; | 155 | return fn; |
157 | } | 156 | } |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 0b1ddb1005ac..783481860174 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -979,11 +979,10 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb, | |||
979 | { | 979 | { |
980 | struct sctp_chunk *retval; | 980 | struct sctp_chunk *retval; |
981 | 981 | ||
982 | retval = kmem_cache_alloc(sctp_chunk_cachep, GFP_ATOMIC); | 982 | retval = kmem_cache_zalloc(sctp_chunk_cachep, GFP_ATOMIC); |
983 | 983 | ||
984 | if (!retval) | 984 | if (!retval) |
985 | goto nodata; | 985 | goto nodata; |
986 | memset(retval, 0, sizeof(struct sctp_chunk)); | ||
987 | 986 | ||
988 | if (!sk) { | 987 | if (!sk) { |
989 | SCTP_DEBUG_PRINTK("chunkifying skb %p w/o an sk\n", skb); | 988 | SCTP_DEBUG_PRINTK("chunkifying skb %p w/o an sk\n", skb); |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index f50a70f550b3..c9b4d3631101 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -83,7 +83,7 @@ use strict; | |||
83 | # * my_function | 83 | # * my_function |
84 | # **/ | 84 | # **/ |
85 | # | 85 | # |
86 | # If the Description: header tag is ommitted, then there must be a blank line | 86 | # If the Description: header tag is omitted, then there must be a blank line |
87 | # after the last parameter specification. | 87 | # after the last parameter specification. |
88 | # e.g. | 88 | # e.g. |
89 | # /** | 89 | # /** |
@@ -265,7 +265,7 @@ my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start. | |||
265 | my $doc_end = '\*/'; | 265 | my $doc_end = '\*/'; |
266 | my $doc_com = '\s*\*\s*'; | 266 | my $doc_com = '\s*\*\s*'; |
267 | my $doc_decl = $doc_com.'(\w+)'; | 267 | my $doc_decl = $doc_com.'(\w+)'; |
268 | my $doc_sect = $doc_com.'(['.$doc_special.']?[\w ]+):(.*)'; | 268 | my $doc_sect = $doc_com.'(['.$doc_special.']?[\w\s]+):(.*)'; |
269 | my $doc_content = $doc_com.'(.*)'; | 269 | my $doc_content = $doc_com.'(.*)'; |
270 | my $doc_block = $doc_com.'DOC:\s*(.*)?'; | 270 | my $doc_block = $doc_com.'DOC:\s*(.*)?'; |
271 | 271 | ||
@@ -365,7 +365,7 @@ sub dump_section { | |||
365 | # parameterlist => @list of parameters | 365 | # parameterlist => @list of parameters |
366 | # parameterdescs => %parameter descriptions | 366 | # parameterdescs => %parameter descriptions |
367 | # sectionlist => @list of sections | 367 | # sectionlist => @list of sections |
368 | # sections => %descriont descriptions | 368 | # sections => %section descriptions |
369 | # | 369 | # |
370 | 370 | ||
371 | sub output_highlight { | 371 | sub output_highlight { |
@@ -583,14 +583,14 @@ sub output_function_xml(%) { | |||
583 | $id = "API-".$args{'function'}; | 583 | $id = "API-".$args{'function'}; |
584 | $id =~ s/[^A-Za-z0-9]/-/g; | 584 | $id =~ s/[^A-Za-z0-9]/-/g; |
585 | 585 | ||
586 | print "<refentry>\n"; | 586 | print "<refentry id=\"$id\">\n"; |
587 | print "<refentryinfo>\n"; | 587 | print "<refentryinfo>\n"; |
588 | print " <title>LINUX</title>\n"; | 588 | print " <title>LINUX</title>\n"; |
589 | print " <productname>Kernel Hackers Manual</productname>\n"; | 589 | print " <productname>Kernel Hackers Manual</productname>\n"; |
590 | print " <date>$man_date</date>\n"; | 590 | print " <date>$man_date</date>\n"; |
591 | print "</refentryinfo>\n"; | 591 | print "</refentryinfo>\n"; |
592 | print "<refmeta>\n"; | 592 | print "<refmeta>\n"; |
593 | print " <refentrytitle><phrase id=\"$id\">".$args{'function'}."</phrase></refentrytitle>\n"; | 593 | print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n"; |
594 | print " <manvolnum>9</manvolnum>\n"; | 594 | print " <manvolnum>9</manvolnum>\n"; |
595 | print "</refmeta>\n"; | 595 | print "</refmeta>\n"; |
596 | print "<refnamediv>\n"; | 596 | print "<refnamediv>\n"; |
@@ -659,14 +659,14 @@ sub output_struct_xml(%) { | |||
659 | $id = "API-struct-".$args{'struct'}; | 659 | $id = "API-struct-".$args{'struct'}; |
660 | $id =~ s/[^A-Za-z0-9]/-/g; | 660 | $id =~ s/[^A-Za-z0-9]/-/g; |
661 | 661 | ||
662 | print "<refentry>\n"; | 662 | print "<refentry id=\"$id\">\n"; |
663 | print "<refentryinfo>\n"; | 663 | print "<refentryinfo>\n"; |
664 | print " <title>LINUX</title>\n"; | 664 | print " <title>LINUX</title>\n"; |
665 | print " <productname>Kernel Hackers Manual</productname>\n"; | 665 | print " <productname>Kernel Hackers Manual</productname>\n"; |
666 | print " <date>$man_date</date>\n"; | 666 | print " <date>$man_date</date>\n"; |
667 | print "</refentryinfo>\n"; | 667 | print "</refentryinfo>\n"; |
668 | print "<refmeta>\n"; | 668 | print "<refmeta>\n"; |
669 | print " <refentrytitle><phrase id=\"$id\">".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n"; | 669 | print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n"; |
670 | print " <manvolnum>9</manvolnum>\n"; | 670 | print " <manvolnum>9</manvolnum>\n"; |
671 | print "</refmeta>\n"; | 671 | print "</refmeta>\n"; |
672 | print "<refnamediv>\n"; | 672 | print "<refnamediv>\n"; |
@@ -743,14 +743,14 @@ sub output_enum_xml(%) { | |||
743 | $id = "API-enum-".$args{'enum'}; | 743 | $id = "API-enum-".$args{'enum'}; |
744 | $id =~ s/[^A-Za-z0-9]/-/g; | 744 | $id =~ s/[^A-Za-z0-9]/-/g; |
745 | 745 | ||
746 | print "<refentry>\n"; | 746 | print "<refentry id=\"$id\">\n"; |
747 | print "<refentryinfo>\n"; | 747 | print "<refentryinfo>\n"; |
748 | print " <title>LINUX</title>\n"; | 748 | print " <title>LINUX</title>\n"; |
749 | print " <productname>Kernel Hackers Manual</productname>\n"; | 749 | print " <productname>Kernel Hackers Manual</productname>\n"; |
750 | print " <date>$man_date</date>\n"; | 750 | print " <date>$man_date</date>\n"; |
751 | print "</refentryinfo>\n"; | 751 | print "</refentryinfo>\n"; |
752 | print "<refmeta>\n"; | 752 | print "<refmeta>\n"; |
753 | print " <refentrytitle><phrase id=\"$id\">enum ".$args{'enum'}."</phrase></refentrytitle>\n"; | 753 | print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n"; |
754 | print " <manvolnum>9</manvolnum>\n"; | 754 | print " <manvolnum>9</manvolnum>\n"; |
755 | print "</refmeta>\n"; | 755 | print "</refmeta>\n"; |
756 | print "<refnamediv>\n"; | 756 | print "<refnamediv>\n"; |
@@ -809,14 +809,14 @@ sub output_typedef_xml(%) { | |||
809 | $id = "API-typedef-".$args{'typedef'}; | 809 | $id = "API-typedef-".$args{'typedef'}; |
810 | $id =~ s/[^A-Za-z0-9]/-/g; | 810 | $id =~ s/[^A-Za-z0-9]/-/g; |
811 | 811 | ||
812 | print "<refentry>\n"; | 812 | print "<refentry id=\"$id\">\n"; |
813 | print "<refentryinfo>\n"; | 813 | print "<refentryinfo>\n"; |
814 | print " <title>LINUX</title>\n"; | 814 | print " <title>LINUX</title>\n"; |
815 | print " <productname>Kernel Hackers Manual</productname>\n"; | 815 | print " <productname>Kernel Hackers Manual</productname>\n"; |
816 | print " <date>$man_date</date>\n"; | 816 | print " <date>$man_date</date>\n"; |
817 | print "</refentryinfo>\n"; | 817 | print "</refentryinfo>\n"; |
818 | print "<refmeta>\n"; | 818 | print "<refmeta>\n"; |
819 | print " <refentrytitle><phrase id=\"$id\">typedef ".$args{'typedef'}."</phrase></refentrytitle>\n"; | 819 | print " <refentrytitle><phrase>typedef ".$args{'typedef'}."</phrase></refentrytitle>\n"; |
820 | print " <manvolnum>9</manvolnum>\n"; | 820 | print " <manvolnum>9</manvolnum>\n"; |
821 | print "</refmeta>\n"; | 821 | print "</refmeta>\n"; |
822 | print "<refnamediv>\n"; | 822 | print "<refnamediv>\n"; |
@@ -953,7 +953,11 @@ sub output_function_man(%) { | |||
953 | print $args{'function'}." \\- ".$args{'purpose'}."\n"; | 953 | print $args{'function'}." \\- ".$args{'purpose'}."\n"; |
954 | 954 | ||
955 | print ".SH SYNOPSIS\n"; | 955 | print ".SH SYNOPSIS\n"; |
956 | print ".B \"".$args{'functiontype'}."\" ".$args{'function'}."\n"; | 956 | if ($args{'functiontype'} ne "") { |
957 | print ".B \"".$args{'functiontype'}."\" ".$args{'function'}."\n"; | ||
958 | } else { | ||
959 | print ".B \"".$args{'function'}."\n"; | ||
960 | } | ||
957 | $count = 0; | 961 | $count = 0; |
958 | my $parenth = "("; | 962 | my $parenth = "("; |
959 | my $post = ","; | 963 | my $post = ","; |
@@ -1118,13 +1122,19 @@ sub output_intro_man(%) { | |||
1118 | sub output_function_text(%) { | 1122 | sub output_function_text(%) { |
1119 | my %args = %{$_[0]}; | 1123 | my %args = %{$_[0]}; |
1120 | my ($parameter, $section); | 1124 | my ($parameter, $section); |
1125 | my $start; | ||
1121 | 1126 | ||
1122 | print "Name:\n\n"; | 1127 | print "Name:\n\n"; |
1123 | print $args{'function'}." - ".$args{'purpose'}."\n"; | 1128 | print $args{'function'}." - ".$args{'purpose'}."\n"; |
1124 | 1129 | ||
1125 | print "\nSynopsis:\n\n"; | 1130 | print "\nSynopsis:\n\n"; |
1126 | my $start=$args{'functiontype'}." ".$args{'function'}." ("; | 1131 | if ($args{'functiontype'} ne "") { |
1132 | $start = $args{'functiontype'}." ".$args{'function'}." ("; | ||
1133 | } else { | ||
1134 | $start = $args{'function'}." ("; | ||
1135 | } | ||
1127 | print $start; | 1136 | print $start; |
1137 | |||
1128 | my $count = 0; | 1138 | my $count = 0; |
1129 | foreach my $parameter (@{$args{'parameterlist'}}) { | 1139 | foreach my $parameter (@{$args{'parameterlist'}}) { |
1130 | $type = $args{'parametertypes'}{$parameter}; | 1140 | $type = $args{'parametertypes'}{$parameter}; |
@@ -1433,7 +1443,7 @@ sub create_parameterlist($$$) { | |||
1433 | } elsif ($arg =~ m/\(.*\*/) { | 1443 | } elsif ($arg =~ m/\(.*\*/) { |
1434 | # pointer-to-function | 1444 | # pointer-to-function |
1435 | $arg =~ tr/#/,/; | 1445 | $arg =~ tr/#/,/; |
1436 | $arg =~ m/[^\(]+\(\*([^\)]+)\)/; | 1446 | $arg =~ m/[^\(]+\(\*\s*([^\)]+)\)/; |
1437 | $param = $1; | 1447 | $param = $1; |
1438 | $type = $arg; | 1448 | $type = $arg; |
1439 | $type =~ s/([^\(]+\(\*)$param/$1/; | 1449 | $type =~ s/([^\(]+\(\*)$param/$1/; |
@@ -1536,7 +1546,7 @@ sub dump_function($$) { | |||
1536 | $prototype =~ s/^__always_inline +//; | 1546 | $prototype =~ s/^__always_inline +//; |
1537 | $prototype =~ s/^noinline +//; | 1547 | $prototype =~ s/^noinline +//; |
1538 | $prototype =~ s/__devinit +//; | 1548 | $prototype =~ s/__devinit +//; |
1539 | $prototype =~ s/^#define +//; #ak added | 1549 | $prototype =~ s/^#define\s+//; #ak added |
1540 | $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//; | 1550 | $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//; |
1541 | 1551 | ||
1542 | # Yes, this truly is vile. We are looking for: | 1552 | # Yes, this truly is vile. We are looking for: |
@@ -1710,6 +1720,7 @@ sub process_file($) { | |||
1710 | my $file; | 1720 | my $file; |
1711 | my $identifier; | 1721 | my $identifier; |
1712 | my $func; | 1722 | my $func; |
1723 | my $descr; | ||
1713 | my $initial_section_counter = $section_counter; | 1724 | my $initial_section_counter = $section_counter; |
1714 | 1725 | ||
1715 | if (defined($ENV{'SRCTREE'})) { | 1726 | if (defined($ENV{'SRCTREE'})) { |
@@ -1753,7 +1764,12 @@ sub process_file($) { | |||
1753 | 1764 | ||
1754 | $state = 2; | 1765 | $state = 2; |
1755 | if (/-(.*)/) { | 1766 | if (/-(.*)/) { |
1756 | $declaration_purpose = xml_escape($1); | 1767 | # strip leading/trailing/multiple spaces #RDD:T: |
1768 | $descr= $1; | ||
1769 | $descr =~ s/^\s*//; | ||
1770 | $descr =~ s/\s*$//; | ||
1771 | $descr =~ s/\s+/ /; | ||
1772 | $declaration_purpose = xml_escape($descr); | ||
1757 | } else { | 1773 | } else { |
1758 | $declaration_purpose = ""; | 1774 | $declaration_purpose = ""; |
1759 | } | 1775 | } |
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index e7c0b5e2066b..da8caf10ef97 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -332,11 +332,10 @@ static struct avc_node *avc_alloc_node(void) | |||
332 | { | 332 | { |
333 | struct avc_node *node; | 333 | struct avc_node *node; |
334 | 334 | ||
335 | node = kmem_cache_alloc(avc_node_cachep, GFP_ATOMIC); | 335 | node = kmem_cache_zalloc(avc_node_cachep, GFP_ATOMIC); |
336 | if (!node) | 336 | if (!node) |
337 | goto out; | 337 | goto out; |
338 | 338 | ||
339 | memset(node, 0, sizeof(*node)); | ||
340 | INIT_RCU_HEAD(&node->rhead); | 339 | INIT_RCU_HEAD(&node->rhead); |
341 | INIT_LIST_HEAD(&node->list); | 340 | INIT_LIST_HEAD(&node->list); |
342 | atomic_set(&node->ae.used, 1); | 341 | atomic_set(&node->ae.used, 1); |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 65fb5e8ea941..35eb8de892fc 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -181,11 +181,10 @@ static int inode_alloc_security(struct inode *inode) | |||
181 | struct task_security_struct *tsec = current->security; | 181 | struct task_security_struct *tsec = current->security; |
182 | struct inode_security_struct *isec; | 182 | struct inode_security_struct *isec; |
183 | 183 | ||
184 | isec = kmem_cache_alloc(sel_inode_cache, GFP_KERNEL); | 184 | isec = kmem_cache_zalloc(sel_inode_cache, GFP_KERNEL); |
185 | if (!isec) | 185 | if (!isec) |
186 | return -ENOMEM; | 186 | return -ENOMEM; |
187 | 187 | ||
188 | memset(isec, 0, sizeof(*isec)); | ||
189 | mutex_init(&isec->lock); | 188 | mutex_init(&isec->lock); |
190 | INIT_LIST_HEAD(&isec->list); | 189 | INIT_LIST_HEAD(&isec->list); |
191 | isec->inode = inode; | 190 | isec->inode = inode; |
@@ -2655,7 +2654,7 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk, | |||
2655 | struct file_security_struct *fsec; | 2654 | struct file_security_struct *fsec; |
2656 | 2655 | ||
2657 | /* struct fown_struct is never outside the context of a struct file */ | 2656 | /* struct fown_struct is never outside the context of a struct file */ |
2658 | file = (struct file *)((long)fown - offsetof(struct file,f_owner)); | 2657 | file = container_of(fown, struct file, f_owner); |
2659 | 2658 | ||
2660 | tsec = tsk->security; | 2659 | tsec = tsk->security; |
2661 | fsec = file->f_security; | 2660 | fsec = file->f_security; |
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c index ebb993c5c244..9142073319c0 100644 --- a/security/selinux/ss/avtab.c +++ b/security/selinux/ss/avtab.c | |||
@@ -36,10 +36,9 @@ avtab_insert_node(struct avtab *h, int hvalue, | |||
36 | struct avtab_key *key, struct avtab_datum *datum) | 36 | struct avtab_key *key, struct avtab_datum *datum) |
37 | { | 37 | { |
38 | struct avtab_node * newnode; | 38 | struct avtab_node * newnode; |
39 | newnode = kmem_cache_alloc(avtab_node_cachep, GFP_KERNEL); | 39 | newnode = kmem_cache_zalloc(avtab_node_cachep, GFP_KERNEL); |
40 | if (newnode == NULL) | 40 | if (newnode == NULL) |
41 | return NULL; | 41 | return NULL; |
42 | memset(newnode, 0, sizeof(struct avtab_node)); | ||
43 | newnode->key = *key; | 42 | newnode->key = *key; |
44 | newnode->datum = *datum; | 43 | newnode->datum = *datum; |
45 | if (prev) { | 44 | if (prev) { |
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index a0588c21324a..4c419300305d 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig | |||
@@ -5,6 +5,20 @@ | |||
5 | # | 5 | # |
6 | # Prompt user for primary drivers. | 6 | # Prompt user for primary drivers. |
7 | 7 | ||
8 | config OBSOLETE_OSS | ||
9 | bool "Obsolete OSS drivers" | ||
10 | depends on SOUND_PRIME | ||
11 | help | ||
12 | This option enables support for obsolete OSS drivers that | ||
13 | are scheduled for removal in the near future since there | ||
14 | are ALSA drivers for the same hardware. | ||
15 | |||
16 | Please contact Adrian Bunk <bunk@stusta.de> if you had to | ||
17 | say Y here because your soundcard is not properly supported | ||
18 | by ALSA. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
8 | config SOUND_BT878 | 22 | config SOUND_BT878 |
9 | tristate "BT878 audio dma" | 23 | tristate "BT878 audio dma" |
10 | depends on SOUND_PRIME && PCI | 24 | depends on SOUND_PRIME && PCI |
@@ -33,7 +47,7 @@ config SOUND_BCM_CS4297A | |||
33 | 47 | ||
34 | config SOUND_ES1371 | 48 | config SOUND_ES1371 |
35 | tristate "Creative Ensoniq AudioPCI 97 (ES1371)" | 49 | tristate "Creative Ensoniq AudioPCI 97 (ES1371)" |
36 | depends on SOUND_PRIME && PCI | 50 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS |
37 | help | 51 | help |
38 | Say Y or M if you have a PCI sound card utilizing the Ensoniq | 52 | Say Y or M if you have a PCI sound card utilizing the Ensoniq |
39 | ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if | 53 | ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if |
@@ -705,18 +719,6 @@ config AEDSP16_SBPRO | |||
705 | 719 | ||
706 | endchoice | 720 | endchoice |
707 | 721 | ||
708 | config AEDSP16_MPU401 | ||
709 | bool "Audio Excel DSP 16 (MPU401 emulation)" | ||
710 | depends on SOUND_AEDSP16 && SOUND_MPU401 | ||
711 | help | ||
712 | Answer Y if you want your audio card to emulate the MPU-401 midi | ||
713 | interface. You should then also say Y to "MPU-401 support". | ||
714 | |||
715 | Note that the I/O base for MPU-401 support of aedsp16 is the same | ||
716 | you have selected for "MPU-401 support". If you are using this | ||
717 | driver as a module you have to specify the MPU I/O base address with | ||
718 | the parameter 'mpu_base=0xNNN'. | ||
719 | |||
720 | config SOUND_VIDC | 722 | config SOUND_VIDC |
721 | tristate "VIDC 16-bit sound" | 723 | tristate "VIDC 16-bit sound" |
722 | depends on ARM && (ARCH_ACORN || ARCH_CLPS7500) && SOUND_OSS | 724 | depends on ARM && (ARCH_ACORN || ARCH_CLPS7500) && SOUND_OSS |
diff --git a/sound/oss/dmasound/Kconfig b/sound/oss/dmasound/Kconfig index cb845580fe03..18e149f52a88 100644 --- a/sound/oss/dmasound/Kconfig +++ b/sound/oss/dmasound/Kconfig | |||
@@ -14,7 +14,7 @@ config DMASOUND_ATARI | |||
14 | 14 | ||
15 | config DMASOUND_PMAC | 15 | config DMASOUND_PMAC |
16 | tristate "PowerMac DMA sound support" | 16 | tristate "PowerMac DMA sound support" |
17 | depends on PPC32 && PPC_PMAC && SOUND && I2C | 17 | depends on PPC32 && PPC_PMAC && SOUND && I2C && OBSOLETE_OSS |
18 | select DMASOUND | 18 | select DMASOUND |
19 | help | 19 | help |
20 | If you want to use the internal audio of your PowerMac in Linux, | 20 | If you want to use the internal audio of your PowerMac in Linux, |
diff --git a/usr/Makefile b/usr/Makefile index 382702ad663b..201f27f8cbaf 100644 --- a/usr/Makefile +++ b/usr/Makefile | |||
@@ -7,7 +7,7 @@ PHONY += klibcdirs | |||
7 | 7 | ||
8 | 8 | ||
9 | # Generate builtin.o based on initramfs_data.o | 9 | # Generate builtin.o based on initramfs_data.o |
10 | obj-y := initramfs_data.o | 10 | obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o |
11 | 11 | ||
12 | # initramfs_data.o contains the initramfs_data.cpio.gz image. | 12 | # initramfs_data.o contains the initramfs_data.cpio.gz image. |
13 | # The image is included using .incbin, a dependency which is not | 13 | # The image is included using .incbin, a dependency which is not |
diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c index 83acd6cc0b3c..8365db6cfe06 100644 --- a/usr/gen_init_cpio.c +++ b/usr/gen_init_cpio.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * Original work by Jeff Garzik | 14 | * Original work by Jeff Garzik |
15 | * | 15 | * |
16 | * External file lists, symlink, pipe and fifo support by Thayne Harbaugh | 16 | * External file lists, symlink, pipe and fifo support by Thayne Harbaugh |
17 | * Hard link support by Luciano Rocha | ||
17 | */ | 18 | */ |
18 | 19 | ||
19 | #define xstr(s) #s | 20 | #define xstr(s) #s |
@@ -286,16 +287,19 @@ static int cpio_mknod_line(const char *line) | |||
286 | return rc; | 287 | return rc; |
287 | } | 288 | } |
288 | 289 | ||
289 | /* Not marked static to keep the compiler quiet, as no one uses this yet... */ | ||
290 | static int cpio_mkfile(const char *name, const char *location, | 290 | static int cpio_mkfile(const char *name, const char *location, |
291 | unsigned int mode, uid_t uid, gid_t gid) | 291 | unsigned int mode, uid_t uid, gid_t gid, |
292 | unsigned int nlinks) | ||
292 | { | 293 | { |
293 | char s[256]; | 294 | char s[256]; |
294 | char *filebuf = NULL; | 295 | char *filebuf = NULL; |
295 | struct stat buf; | 296 | struct stat buf; |
297 | long size; | ||
296 | int file = -1; | 298 | int file = -1; |
297 | int retval; | 299 | int retval; |
298 | int rc = -1; | 300 | int rc = -1; |
301 | int namesize; | ||
302 | int i; | ||
299 | 303 | ||
300 | mode |= S_IFREG; | 304 | mode |= S_IFREG; |
301 | 305 | ||
@@ -323,29 +327,41 @@ static int cpio_mkfile(const char *name, const char *location, | |||
323 | goto error; | 327 | goto error; |
324 | } | 328 | } |
325 | 329 | ||
326 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" | 330 | size = 0; |
327 | "%08X%08X%08X%08X%08X%08X%08X", | 331 | for (i = 1; i <= nlinks; i++) { |
328 | "070701", /* magic */ | 332 | /* data goes on last link */ |
329 | ino++, /* ino */ | 333 | if (i == nlinks) size = buf.st_size; |
330 | mode, /* mode */ | 334 | |
331 | (long) uid, /* uid */ | 335 | namesize = strlen(name) + 1; |
332 | (long) gid, /* gid */ | 336 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" |
333 | 1, /* nlink */ | 337 | "%08lX%08X%08X%08X%08X%08X%08X", |
334 | (long) buf.st_mtime, /* mtime */ | 338 | "070701", /* magic */ |
335 | (int) buf.st_size, /* filesize */ | 339 | ino, /* ino */ |
336 | 3, /* major */ | 340 | mode, /* mode */ |
337 | 1, /* minor */ | 341 | (long) uid, /* uid */ |
338 | 0, /* rmajor */ | 342 | (long) gid, /* gid */ |
339 | 0, /* rminor */ | 343 | nlinks, /* nlink */ |
340 | (unsigned)strlen(name) + 1,/* namesize */ | 344 | (long) buf.st_mtime, /* mtime */ |
341 | 0); /* chksum */ | 345 | size, /* filesize */ |
342 | push_hdr(s); | 346 | 3, /* major */ |
343 | push_string(name); | 347 | 1, /* minor */ |
344 | push_pad(); | 348 | 0, /* rmajor */ |
349 | 0, /* rminor */ | ||
350 | namesize, /* namesize */ | ||
351 | 0); /* chksum */ | ||
352 | push_hdr(s); | ||
353 | push_string(name); | ||
354 | push_pad(); | ||
355 | |||
356 | if (size) { | ||
357 | fwrite(filebuf, size, 1, stdout); | ||
358 | offset += size; | ||
359 | push_pad(); | ||
360 | } | ||
345 | 361 | ||
346 | fwrite(filebuf, buf.st_size, 1, stdout); | 362 | name += namesize; |
347 | offset += buf.st_size; | 363 | } |
348 | push_pad(); | 364 | ino++; |
349 | rc = 0; | 365 | rc = 0; |
350 | 366 | ||
351 | error: | 367 | error: |
@@ -357,18 +373,51 @@ error: | |||
357 | static int cpio_mkfile_line(const char *line) | 373 | static int cpio_mkfile_line(const char *line) |
358 | { | 374 | { |
359 | char name[PATH_MAX + 1]; | 375 | char name[PATH_MAX + 1]; |
376 | char *dname = NULL; /* malloc'ed buffer for hard links */ | ||
360 | char location[PATH_MAX + 1]; | 377 | char location[PATH_MAX + 1]; |
361 | unsigned int mode; | 378 | unsigned int mode; |
362 | int uid; | 379 | int uid; |
363 | int gid; | 380 | int gid; |
381 | int nlinks = 1; | ||
382 | int end = 0, dname_len = 0; | ||
364 | int rc = -1; | 383 | int rc = -1; |
365 | 384 | ||
366 | if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, location, &mode, &uid, &gid)) { | 385 | if (5 > sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) |
386 | "s %o %d %d %n", | ||
387 | name, location, &mode, &uid, &gid, &end)) { | ||
367 | fprintf(stderr, "Unrecognized file format '%s'", line); | 388 | fprintf(stderr, "Unrecognized file format '%s'", line); |
368 | goto fail; | 389 | goto fail; |
369 | } | 390 | } |
370 | rc = cpio_mkfile(name, location, mode, uid, gid); | 391 | if (end && isgraph(line[end])) { |
392 | int len; | ||
393 | int nend; | ||
394 | |||
395 | dname = malloc(strlen(line)); | ||
396 | if (!dname) { | ||
397 | fprintf (stderr, "out of memory (%d)\n", dname_len); | ||
398 | goto fail; | ||
399 | } | ||
400 | |||
401 | dname_len = strlen(name) + 1; | ||
402 | memcpy(dname, name, dname_len); | ||
403 | |||
404 | do { | ||
405 | nend = 0; | ||
406 | if (sscanf(line + end, "%" str(PATH_MAX) "s %n", | ||
407 | name, &nend) < 1) | ||
408 | break; | ||
409 | len = strlen(name) + 1; | ||
410 | memcpy(dname + dname_len, name, len); | ||
411 | dname_len += len; | ||
412 | nlinks++; | ||
413 | end += nend; | ||
414 | } while (isgraph(line[end])); | ||
415 | } else { | ||
416 | dname = name; | ||
417 | } | ||
418 | rc = cpio_mkfile(dname, location, mode, uid, gid, nlinks); | ||
371 | fail: | 419 | fail: |
420 | if (dname_len) free(dname); | ||
372 | return rc; | 421 | return rc; |
373 | } | 422 | } |
374 | 423 | ||
@@ -381,22 +430,23 @@ void usage(const char *prog) | |||
381 | "describe the files to be included in the initramfs archive:\n" | 430 | "describe the files to be included in the initramfs archive:\n" |
382 | "\n" | 431 | "\n" |
383 | "# a comment\n" | 432 | "# a comment\n" |
384 | "file <name> <location> <mode> <uid> <gid>\n" | 433 | "file <name> <location> <mode> <uid> <gid> [<hard links>]\n" |
385 | "dir <name> <mode> <uid> <gid>\n" | 434 | "dir <name> <mode> <uid> <gid>\n" |
386 | "nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n" | 435 | "nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n" |
387 | "slink <name> <target> <mode> <uid> <gid>\n" | 436 | "slink <name> <target> <mode> <uid> <gid>\n" |
388 | "pipe <name> <mode> <uid> <gid>\n" | 437 | "pipe <name> <mode> <uid> <gid>\n" |
389 | "sock <name> <mode> <uid> <gid>\n" | 438 | "sock <name> <mode> <uid> <gid>\n" |
390 | "\n" | 439 | "\n" |
391 | "<name> name of the file/dir/nod/etc in the archive\n" | 440 | "<name> name of the file/dir/nod/etc in the archive\n" |
392 | "<location> location of the file in the current filesystem\n" | 441 | "<location> location of the file in the current filesystem\n" |
393 | "<target> link target\n" | 442 | "<target> link target\n" |
394 | "<mode> mode/permissions of the file\n" | 443 | "<mode> mode/permissions of the file\n" |
395 | "<uid> user id (0=root)\n" | 444 | "<uid> user id (0=root)\n" |
396 | "<gid> group id (0=root)\n" | 445 | "<gid> group id (0=root)\n" |
397 | "<dev_type> device type (b=block, c=character)\n" | 446 | "<dev_type> device type (b=block, c=character)\n" |
398 | "<maj> major number of nod\n" | 447 | "<maj> major number of nod\n" |
399 | "<min> minor number of nod\n" | 448 | "<min> minor number of nod\n" |
449 | "<hard links> space separated list of other links to file\n" | ||
400 | "\n" | 450 | "\n" |
401 | "example:\n" | 451 | "example:\n" |
402 | "# A simple initramfs\n" | 452 | "# A simple initramfs\n" |