diff options
103 files changed, 777 insertions, 588 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index b22db521cec1..9c592aa0280c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2232,7 +2232,23 @@ P: Martin Schwidefsky | |||
2232 | M: schwidefsky@de.ibm.com | 2232 | M: schwidefsky@de.ibm.com |
2233 | M: linux390@de.ibm.com | 2233 | M: linux390@de.ibm.com |
2234 | L: linux-390@vm.marist.edu | 2234 | L: linux-390@vm.marist.edu |
2235 | W: http://oss.software.ibm.com/developerworks/opensource/linux390 | 2235 | W: http://www.ibm.com/developerworks/linux/linux390/ |
2236 | S: Supported | ||
2237 | |||
2238 | S390 NETWORK DRIVERS | ||
2239 | P: Frank Pavlic | ||
2240 | M: fpavlic@de.ibm.com | ||
2241 | M: linux390@de.ibm.com | ||
2242 | L: linux-390@vm.marist.edu | ||
2243 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
2244 | S: Supported | ||
2245 | |||
2246 | S390 ZFCP DRIVER | ||
2247 | P: Andreas Herrmann | ||
2248 | M: aherrman@de.ibm.com | ||
2249 | M: linux390@de.ibm.com | ||
2250 | L: linux-390@vm.marist.edu | ||
2251 | W: http://www.ibm.com/developerworks/linux/linux390/ | ||
2236 | S: Supported | 2252 | S: Supported |
2237 | 2253 | ||
2238 | SAA7146 VIDEO4LINUX-2 DRIVER | 2254 | SAA7146 VIDEO4LINUX-2 DRIVER |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 16 | 3 | SUBLEVEL = 16 |
4 | EXTRAVERSION =-rc2 | 4 | EXTRAVERSION =-rc3 |
5 | NAME=Sliding Snow Leopard | 5 | NAME=Sliding Snow Leopard |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 5884469f6bfe..2bee6499edd9 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -398,7 +398,11 @@ ignore_int: | |||
398 | pushl 32(%esp) | 398 | pushl 32(%esp) |
399 | pushl 40(%esp) | 399 | pushl 40(%esp) |
400 | pushl $int_msg | 400 | pushl $int_msg |
401 | #ifdef CONFIG_EARLY_PRINTK | ||
402 | call early_printk | ||
403 | #else | ||
401 | call printk | 404 | call printk |
405 | #endif | ||
402 | addl $(5*4),%esp | 406 | addl $(5*4),%esp |
403 | popl %ds | 407 | popl %ds |
404 | popl %es | 408 | popl %es |
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index 5a8b3fb6d27b..ac687d00a1ce 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S | |||
@@ -299,7 +299,7 @@ ENTRY(sys_call_table) | |||
299 | .long sys_mknodat | 299 | .long sys_mknodat |
300 | .long sys_fchownat | 300 | .long sys_fchownat |
301 | .long sys_futimesat | 301 | .long sys_futimesat |
302 | .long sys_newfstatat /* 300 */ | 302 | .long sys_fstatat64 /* 300 */ |
303 | .long sys_unlinkat | 303 | .long sys_unlinkat |
304 | .long sys_renameat | 304 | .long sys_renameat |
305 | .long sys_linkat | 305 | .long sys_linkat |
diff --git a/arch/m68k/fpsp040/bindec.S b/arch/m68k/fpsp040/bindec.S index 3ba446a99a12..72f1159cb804 100644 --- a/arch/m68k/fpsp040/bindec.S +++ b/arch/m68k/fpsp040/bindec.S | |||
@@ -131,9 +131,8 @@ | |||
131 | | Copyright (C) Motorola, Inc. 1990 | 131 | | Copyright (C) Motorola, Inc. 1990 |
132 | | All Rights Reserved | 132 | | All Rights Reserved |
133 | | | 133 | | |
134 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 134 | | For details on the license for this file, please see the |
135 | | The copyright notice above does not evidence any | 135 | | file, README, in this same directory. |
136 | | actual or intended publication of such source code. | ||
137 | 136 | ||
138 | |BINDEC idnt 2,1 | Motorola 040 Floating Point Software Package | 137 | |BINDEC idnt 2,1 | Motorola 040 Floating Point Software Package |
139 | 138 | ||
diff --git a/arch/m68k/fpsp040/binstr.S b/arch/m68k/fpsp040/binstr.S index d53555c0a2b6..8a05ba92a8a0 100644 --- a/arch/m68k/fpsp040/binstr.S +++ b/arch/m68k/fpsp040/binstr.S | |||
@@ -60,9 +60,8 @@ | |||
60 | | Copyright (C) Motorola, Inc. 1990 | 60 | | Copyright (C) Motorola, Inc. 1990 |
61 | | All Rights Reserved | 61 | | All Rights Reserved |
62 | | | 62 | | |
63 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 63 | | For details on the license for this file, please see the |
64 | | The copyright notice above does not evidence any | 64 | | file, README, in this same directory. |
65 | | actual or intended publication of such source code. | ||
66 | 65 | ||
67 | |BINSTR idnt 2,1 | Motorola 040 Floating Point Software Package | 66 | |BINSTR idnt 2,1 | Motorola 040 Floating Point Software Package |
68 | 67 | ||
diff --git a/arch/m68k/fpsp040/bugfix.S b/arch/m68k/fpsp040/bugfix.S index 942c4f6f4fd1..3bb9c84bb058 100644 --- a/arch/m68k/fpsp040/bugfix.S +++ b/arch/m68k/fpsp040/bugfix.S | |||
@@ -152,9 +152,8 @@ | |||
152 | | Copyright (C) Motorola, Inc. 1990 | 152 | | Copyright (C) Motorola, Inc. 1990 |
153 | | All Rights Reserved | 153 | | All Rights Reserved |
154 | | | 154 | | |
155 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 155 | | For details on the license for this file, please see the |
156 | | The copyright notice above does not evidence any | 156 | | file, README, in this same directory. |
157 | | actual or intended publication of such source code. | ||
158 | 157 | ||
159 | |BUGFIX idnt 2,1 | Motorola 040 Floating Point Software Package | 158 | |BUGFIX idnt 2,1 | Motorola 040 Floating Point Software Package |
160 | 159 | ||
diff --git a/arch/m68k/fpsp040/decbin.S b/arch/m68k/fpsp040/decbin.S index 2160609e328d..16ed796bad87 100644 --- a/arch/m68k/fpsp040/decbin.S +++ b/arch/m68k/fpsp040/decbin.S | |||
@@ -69,9 +69,8 @@ | |||
69 | | Copyright (C) Motorola, Inc. 1990 | 69 | | Copyright (C) Motorola, Inc. 1990 |
70 | | All Rights Reserved | 70 | | All Rights Reserved |
71 | | | 71 | | |
72 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 72 | | For details on the license for this file, please see the |
73 | | The copyright notice above does not evidence any | 73 | | file, README, in this same directory. |
74 | | actual or intended publication of such source code. | ||
75 | 74 | ||
76 | |DECBIN idnt 2,1 | Motorola 040 Floating Point Software Package | 75 | |DECBIN idnt 2,1 | Motorola 040 Floating Point Software Package |
77 | 76 | ||
diff --git a/arch/m68k/fpsp040/do_func.S b/arch/m68k/fpsp040/do_func.S index 81f6a9856dce..3eff99a80413 100644 --- a/arch/m68k/fpsp040/do_func.S +++ b/arch/m68k/fpsp040/do_func.S | |||
@@ -22,9 +22,8 @@ | |||
22 | | Copyright (C) Motorola, Inc. 1990 | 22 | | Copyright (C) Motorola, Inc. 1990 |
23 | | All Rights Reserved | 23 | | All Rights Reserved |
24 | | | 24 | | |
25 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 25 | | For details on the license for this file, please see the |
26 | | The copyright notice above does not evidence any | 26 | | file, README, in this same directory. |
27 | | actual or intended publication of such source code. | ||
28 | 27 | ||
29 | DO_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package | 28 | DO_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package |
30 | 29 | ||
diff --git a/arch/m68k/fpsp040/fpsp.h b/arch/m68k/fpsp040/fpsp.h index 984a4eb8010a..5df4cd772934 100644 --- a/arch/m68k/fpsp040/fpsp.h +++ b/arch/m68k/fpsp040/fpsp.h | |||
@@ -5,9 +5,8 @@ | |||
5 | | Copyright (C) Motorola, Inc. 1990 | 5 | | Copyright (C) Motorola, Inc. 1990 |
6 | | All Rights Reserved | 6 | | All Rights Reserved |
7 | | | 7 | | |
8 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 8 | | For details on the license for this file, please see the |
9 | | The copyright notice above does not evidence any | 9 | | file, README, in this same directory. |
10 | | actual or intended publication of such source code. | ||
11 | 10 | ||
12 | | fpsp.h --- stack frame offsets during FPSP exception handling | 11 | | fpsp.h --- stack frame offsets during FPSP exception handling |
13 | | | 12 | | |
diff --git a/arch/m68k/fpsp040/gen_except.S b/arch/m68k/fpsp040/gen_except.S index 401d06f39f73..3642cb7e3641 100644 --- a/arch/m68k/fpsp040/gen_except.S +++ b/arch/m68k/fpsp040/gen_except.S | |||
@@ -29,9 +29,8 @@ | |||
29 | | Copyright (C) Motorola, Inc. 1990 | 29 | | Copyright (C) Motorola, Inc. 1990 |
30 | | All Rights Reserved | 30 | | All Rights Reserved |
31 | | | 31 | | |
32 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 32 | | For details on the license for this file, please see the |
33 | | The copyright notice above does not evidence any | 33 | | file, README, in this same directory. |
34 | | actual or intended publication of such source code. | ||
35 | 34 | ||
36 | GEN_EXCEPT: |idnt 2,1 | Motorola 040 Floating Point Software Package | 35 | GEN_EXCEPT: |idnt 2,1 | Motorola 040 Floating Point Software Package |
37 | 36 | ||
diff --git a/arch/m68k/fpsp040/get_op.S b/arch/m68k/fpsp040/get_op.S index c7c2f3727425..64c36d79ef83 100644 --- a/arch/m68k/fpsp040/get_op.S +++ b/arch/m68k/fpsp040/get_op.S | |||
@@ -54,9 +54,8 @@ | |||
54 | | Copyright (C) Motorola, Inc. 1990 | 54 | | Copyright (C) Motorola, Inc. 1990 |
55 | | All Rights Reserved | 55 | | All Rights Reserved |
56 | | | 56 | | |
57 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 57 | | For details on the license for this file, please see the |
58 | | The copyright notice above does not evidence any | 58 | | file, README, in this same directory. |
59 | | actual or intended publication of such source code. | ||
60 | 59 | ||
61 | GET_OP: |idnt 2,1 | Motorola 040 Floating Point Software Package | 60 | GET_OP: |idnt 2,1 | Motorola 040 Floating Point Software Package |
62 | 61 | ||
diff --git a/arch/m68k/fpsp040/kernel_ex.S b/arch/m68k/fpsp040/kernel_ex.S index 476b711967ce..45bcf3455d34 100644 --- a/arch/m68k/fpsp040/kernel_ex.S +++ b/arch/m68k/fpsp040/kernel_ex.S | |||
@@ -12,9 +12,8 @@ | |||
12 | | Copyright (C) Motorola, Inc. 1990 | 12 | | Copyright (C) Motorola, Inc. 1990 |
13 | | All Rights Reserved | 13 | | All Rights Reserved |
14 | | | 14 | | |
15 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 15 | | For details on the license for this file, please see the |
16 | | The copyright notice above does not evidence any | 16 | | file, README, in this same directory. |
17 | | actual or intended publication of such source code. | ||
18 | 17 | ||
19 | KERNEL_EX: |idnt 2,1 | Motorola 040 Floating Point Software Package | 18 | KERNEL_EX: |idnt 2,1 | Motorola 040 Floating Point Software Package |
20 | 19 | ||
diff --git a/arch/m68k/fpsp040/res_func.S b/arch/m68k/fpsp040/res_func.S index 8f6b95217865..d9cdf4383545 100644 --- a/arch/m68k/fpsp040/res_func.S +++ b/arch/m68k/fpsp040/res_func.S | |||
@@ -16,9 +16,8 @@ | |||
16 | | Copyright (C) Motorola, Inc. 1990 | 16 | | Copyright (C) Motorola, Inc. 1990 |
17 | | All Rights Reserved | 17 | | All Rights Reserved |
18 | | | 18 | | |
19 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 19 | | For details on the license for this file, please see the |
20 | | The copyright notice above does not evidence any | 20 | | file, README, in this same directory. |
21 | | actual or intended publication of such source code. | ||
22 | 21 | ||
23 | RES_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package | 22 | RES_FUNC: |idnt 2,1 | Motorola 040 Floating Point Software Package |
24 | 23 | ||
diff --git a/arch/m68k/fpsp040/round.S b/arch/m68k/fpsp040/round.S index 00f98068783f..f84ae0dd4358 100644 --- a/arch/m68k/fpsp040/round.S +++ b/arch/m68k/fpsp040/round.S | |||
@@ -8,9 +8,8 @@ | |||
8 | | Copyright (C) Motorola, Inc. 1990 | 8 | | Copyright (C) Motorola, Inc. 1990 |
9 | | All Rights Reserved | 9 | | All Rights Reserved |
10 | | | 10 | | |
11 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 11 | | For details on the license for this file, please see the |
12 | | The copyright notice above does not evidence any | 12 | | file, README, in this same directory. |
13 | | actual or intended publication of such source code. | ||
14 | 13 | ||
15 | |ROUND idnt 2,1 | Motorola 040 Floating Point Software Package | 14 | |ROUND idnt 2,1 | Motorola 040 Floating Point Software Package |
16 | 15 | ||
diff --git a/arch/m68k/fpsp040/sacos.S b/arch/m68k/fpsp040/sacos.S index 83b00ab1c48f..513c7cca7318 100644 --- a/arch/m68k/fpsp040/sacos.S +++ b/arch/m68k/fpsp040/sacos.S | |||
@@ -38,9 +38,8 @@ | |||
38 | | Copyright (C) Motorola, Inc. 1990 | 38 | | Copyright (C) Motorola, Inc. 1990 |
39 | | All Rights Reserved | 39 | | All Rights Reserved |
40 | | | 40 | | |
41 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 41 | | For details on the license for this file, please see the |
42 | | The copyright notice above does not evidence any | 42 | | file, README, in this same directory. |
43 | | actual or intended publication of such source code. | ||
44 | 43 | ||
45 | |SACOS idnt 2,1 | Motorola 040 Floating Point Software Package | 44 | |SACOS idnt 2,1 | Motorola 040 Floating Point Software Package |
46 | 45 | ||
diff --git a/arch/m68k/fpsp040/sasin.S b/arch/m68k/fpsp040/sasin.S index 5647a6043903..2a269a58ceaa 100644 --- a/arch/m68k/fpsp040/sasin.S +++ b/arch/m68k/fpsp040/sasin.S | |||
@@ -38,9 +38,8 @@ | |||
38 | | Copyright (C) Motorola, Inc. 1990 | 38 | | Copyright (C) Motorola, Inc. 1990 |
39 | | All Rights Reserved | 39 | | All Rights Reserved |
40 | | | 40 | | |
41 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 41 | | For details on the license for this file, please see the |
42 | | The copyright notice above does not evidence any | 42 | | file, README, in this same directory. |
43 | | actual or intended publication of such source code. | ||
44 | 43 | ||
45 | |SASIN idnt 2,1 | Motorola 040 Floating Point Software Package | 44 | |SASIN idnt 2,1 | Motorola 040 Floating Point Software Package |
46 | 45 | ||
diff --git a/arch/m68k/fpsp040/satan.S b/arch/m68k/fpsp040/satan.S index 20dae222d51e..c8a664998f92 100644 --- a/arch/m68k/fpsp040/satan.S +++ b/arch/m68k/fpsp040/satan.S | |||
@@ -43,9 +43,8 @@ | |||
43 | | Copyright (C) Motorola, Inc. 1990 | 43 | | Copyright (C) Motorola, Inc. 1990 |
44 | | All Rights Reserved | 44 | | All Rights Reserved |
45 | | | 45 | | |
46 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 46 | | For details on the license for this file, please see the |
47 | | The copyright notice above does not evidence any | 47 | | file, README, in this same directory. |
48 | | actual or intended publication of such source code. | ||
49 | 48 | ||
50 | |satan idnt 2,1 | Motorola 040 Floating Point Software Package | 49 | |satan idnt 2,1 | Motorola 040 Floating Point Software Package |
51 | 50 | ||
diff --git a/arch/m68k/fpsp040/satanh.S b/arch/m68k/fpsp040/satanh.S index 20f07810bcda..ba91f77a7571 100644 --- a/arch/m68k/fpsp040/satanh.S +++ b/arch/m68k/fpsp040/satanh.S | |||
@@ -45,9 +45,8 @@ | |||
45 | | Copyright (C) Motorola, Inc. 1990 | 45 | | Copyright (C) Motorola, Inc. 1990 |
46 | | All Rights Reserved | 46 | | All Rights Reserved |
47 | | | 47 | | |
48 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 48 | | For details on the license for this file, please see the |
49 | | The copyright notice above does not evidence any | 49 | | file, README, in this same directory. |
50 | | actual or intended publication of such source code. | ||
51 | 50 | ||
52 | |satanh idnt 2,1 | Motorola 040 Floating Point Software Package | 51 | |satanh idnt 2,1 | Motorola 040 Floating Point Software Package |
53 | 52 | ||
diff --git a/arch/m68k/fpsp040/scale.S b/arch/m68k/fpsp040/scale.S index 5c9b805265f2..04829dd4f1f4 100644 --- a/arch/m68k/fpsp040/scale.S +++ b/arch/m68k/fpsp040/scale.S | |||
@@ -21,9 +21,8 @@ | |||
21 | | Copyright (C) Motorola, Inc. 1990 | 21 | | Copyright (C) Motorola, Inc. 1990 |
22 | | All Rights Reserved | 22 | | All Rights Reserved |
23 | | | 23 | | |
24 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 24 | | For details on the license for this file, please see the |
25 | | The copyright notice above does not evidence any | 25 | | file, README, in this same directory. |
26 | | actual or intended publication of such source code. | ||
27 | 26 | ||
28 | |SCALE idnt 2,1 | Motorola 040 Floating Point Software Package | 27 | |SCALE idnt 2,1 | Motorola 040 Floating Point Software Package |
29 | 28 | ||
diff --git a/arch/m68k/fpsp040/scosh.S b/arch/m68k/fpsp040/scosh.S index e81edbb87642..07d3a4d7c86d 100644 --- a/arch/m68k/fpsp040/scosh.S +++ b/arch/m68k/fpsp040/scosh.S | |||
@@ -49,9 +49,8 @@ | |||
49 | | Copyright (C) Motorola, Inc. 1990 | 49 | | Copyright (C) Motorola, Inc. 1990 |
50 | | All Rights Reserved | 50 | | All Rights Reserved |
51 | | | 51 | | |
52 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 52 | | For details on the license for this file, please see the |
53 | | The copyright notice above does not evidence any | 53 | | file, README, in this same directory. |
54 | | actual or intended publication of such source code. | ||
55 | 54 | ||
56 | |SCOSH idnt 2,1 | Motorola 040 Floating Point Software Package | 55 | |SCOSH idnt 2,1 | Motorola 040 Floating Point Software Package |
57 | 56 | ||
diff --git a/arch/m68k/fpsp040/setox.S b/arch/m68k/fpsp040/setox.S index 0aa75f9bf7d1..145af5447581 100644 --- a/arch/m68k/fpsp040/setox.S +++ b/arch/m68k/fpsp040/setox.S | |||
@@ -331,9 +331,8 @@ | |||
331 | | Copyright (C) Motorola, Inc. 1990 | 331 | | Copyright (C) Motorola, Inc. 1990 |
332 | | All Rights Reserved | 332 | | All Rights Reserved |
333 | | | 333 | | |
334 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 334 | | For details on the license for this file, please see the |
335 | | The copyright notice above does not evidence any | 335 | | file, README, in this same directory. |
336 | | actual or intended publication of such source code. | ||
337 | 336 | ||
338 | |setox idnt 2,1 | Motorola 040 Floating Point Software Package | 337 | |setox idnt 2,1 | Motorola 040 Floating Point Software Package |
339 | 338 | ||
diff --git a/arch/m68k/fpsp040/sgetem.S b/arch/m68k/fpsp040/sgetem.S index 0fcbd045ba75..d9234f4aed57 100644 --- a/arch/m68k/fpsp040/sgetem.S +++ b/arch/m68k/fpsp040/sgetem.S | |||
@@ -24,9 +24,8 @@ | |||
24 | | Copyright (C) Motorola, Inc. 1990 | 24 | | Copyright (C) Motorola, Inc. 1990 |
25 | | All Rights Reserved | 25 | | All Rights Reserved |
26 | | | 26 | | |
27 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 27 | | For details on the license for this file, please see the |
28 | | The copyright notice above does not evidence any | 28 | | file, README, in this same directory. |
29 | | actual or intended publication of such source code. | ||
30 | 29 | ||
31 | |SGETEM idnt 2,1 | Motorola 040 Floating Point Software Package | 30 | |SGETEM idnt 2,1 | Motorola 040 Floating Point Software Package |
32 | 31 | ||
diff --git a/arch/m68k/fpsp040/sint.S b/arch/m68k/fpsp040/sint.S index 0f9bd28e55a0..0e92d4e5d231 100644 --- a/arch/m68k/fpsp040/sint.S +++ b/arch/m68k/fpsp040/sint.S | |||
@@ -51,9 +51,8 @@ | |||
51 | | Copyright (C) Motorola, Inc. 1990 | 51 | | Copyright (C) Motorola, Inc. 1990 |
52 | | All Rights Reserved | 52 | | All Rights Reserved |
53 | | | 53 | | |
54 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 54 | | For details on the license for this file, please see the |
55 | | The copyright notice above does not evidence any | 55 | | file, README, in this same directory. |
56 | | actual or intended publication of such source code. | ||
57 | 56 | ||
58 | |SINT idnt 2,1 | Motorola 040 Floating Point Software Package | 57 | |SINT idnt 2,1 | Motorola 040 Floating Point Software Package |
59 | 58 | ||
diff --git a/arch/m68k/fpsp040/skeleton.S b/arch/m68k/fpsp040/skeleton.S index a1629194e3fd..a8f41615d94a 100644 --- a/arch/m68k/fpsp040/skeleton.S +++ b/arch/m68k/fpsp040/skeleton.S | |||
@@ -30,9 +30,8 @@ | |||
30 | | Copyright (C) Motorola, Inc. 1990 | 30 | | Copyright (C) Motorola, Inc. 1990 |
31 | | All Rights Reserved | 31 | | All Rights Reserved |
32 | | | 32 | | |
33 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 33 | | For details on the license for this file, please see the |
34 | | The copyright notice above does not evidence any | 34 | | file, README, in this same directory. |
35 | | actual or intended publication of such source code. | ||
36 | 35 | ||
37 | | | 36 | | |
38 | | Modified for Linux-1.3.x by Jes Sorensen (jds@kom.auc.dk) | 37 | | Modified for Linux-1.3.x by Jes Sorensen (jds@kom.auc.dk) |
diff --git a/arch/m68k/fpsp040/slog2.S b/arch/m68k/fpsp040/slog2.S index 517fa4563246..fac2c738382e 100644 --- a/arch/m68k/fpsp040/slog2.S +++ b/arch/m68k/fpsp040/slog2.S | |||
@@ -96,9 +96,8 @@ | |||
96 | | Copyright (C) Motorola, Inc. 1990 | 96 | | Copyright (C) Motorola, Inc. 1990 |
97 | | All Rights Reserved | 97 | | All Rights Reserved |
98 | | | 98 | | |
99 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 99 | | For details on the license for this file, please see the |
100 | | The copyright notice above does not evidence any | 100 | | file, README, in this same directory. |
101 | | actual or intended publication of such source code. | ||
102 | 101 | ||
103 | |SLOG2 idnt 2,1 | Motorola 040 Floating Point Software Package | 102 | |SLOG2 idnt 2,1 | Motorola 040 Floating Point Software Package |
104 | 103 | ||
diff --git a/arch/m68k/fpsp040/slogn.S b/arch/m68k/fpsp040/slogn.S index 2aaa0725c035..d98eaf641ec4 100644 --- a/arch/m68k/fpsp040/slogn.S +++ b/arch/m68k/fpsp040/slogn.S | |||
@@ -63,9 +63,8 @@ | |||
63 | | Copyright (C) Motorola, Inc. 1990 | 63 | | Copyright (C) Motorola, Inc. 1990 |
64 | | All Rights Reserved | 64 | | All Rights Reserved |
65 | | | 65 | | |
66 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 66 | | For details on the license for this file, please see the |
67 | | The copyright notice above does not evidence any | 67 | | file, README, in this same directory. |
68 | | actual or intended publication of such source code. | ||
69 | 68 | ||
70 | |slogn idnt 2,1 | Motorola 040 Floating Point Software Package | 69 | |slogn idnt 2,1 | Motorola 040 Floating Point Software Package |
71 | 70 | ||
diff --git a/arch/m68k/fpsp040/smovecr.S b/arch/m68k/fpsp040/smovecr.S index a0127fa55e9c..73c36512081b 100644 --- a/arch/m68k/fpsp040/smovecr.S +++ b/arch/m68k/fpsp040/smovecr.S | |||
@@ -15,9 +15,8 @@ | |||
15 | | Copyright (C) Motorola, Inc. 1990 | 15 | | Copyright (C) Motorola, Inc. 1990 |
16 | | All Rights Reserved | 16 | | All Rights Reserved |
17 | | | 17 | | |
18 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 18 | | For details on the license for this file, please see the |
19 | | The copyright notice above does not evidence any | 19 | | file, README, in this same directory. |
20 | | actual or intended publication of such source code. | ||
21 | 20 | ||
22 | |SMOVECR idnt 2,1 | Motorola 040 Floating Point Software Package | 21 | |SMOVECR idnt 2,1 | Motorola 040 Floating Point Software Package |
23 | 22 | ||
diff --git a/arch/m68k/fpsp040/srem_mod.S b/arch/m68k/fpsp040/srem_mod.S index 8c8d7f50cc68..a27e70c9a0eb 100644 --- a/arch/m68k/fpsp040/srem_mod.S +++ b/arch/m68k/fpsp040/srem_mod.S | |||
@@ -66,9 +66,8 @@ | |||
66 | | Copyright (C) Motorola, Inc. 1990 | 66 | | Copyright (C) Motorola, Inc. 1990 |
67 | | All Rights Reserved | 67 | | All Rights Reserved |
68 | | | 68 | | |
69 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 69 | | For details on the license for this file, please see the |
70 | | The copyright notice above does not evidence any | 70 | | file, README, in this same directory. |
71 | | actual or intended publication of such source code. | ||
72 | 71 | ||
73 | SREM_MOD: |idnt 2,1 | Motorola 040 Floating Point Software Package | 72 | SREM_MOD: |idnt 2,1 | Motorola 040 Floating Point Software Package |
74 | 73 | ||
diff --git a/arch/m68k/fpsp040/ssin.S b/arch/m68k/fpsp040/ssin.S index 043c91cdd657..a1ef8e01bf06 100644 --- a/arch/m68k/fpsp040/ssin.S +++ b/arch/m68k/fpsp040/ssin.S | |||
@@ -83,9 +83,8 @@ | |||
83 | | Copyright (C) Motorola, Inc. 1990 | 83 | | Copyright (C) Motorola, Inc. 1990 |
84 | | All Rights Reserved | 84 | | All Rights Reserved |
85 | | | 85 | | |
86 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 86 | | For details on the license for this file, please see the |
87 | | The copyright notice above does not evidence any | 87 | | file, README, in this same directory. |
88 | | actual or intended publication of such source code. | ||
89 | 88 | ||
90 | |SSIN idnt 2,1 | Motorola 040 Floating Point Software Package | 89 | |SSIN idnt 2,1 | Motorola 040 Floating Point Software Package |
91 | 90 | ||
diff --git a/arch/m68k/fpsp040/ssinh.S b/arch/m68k/fpsp040/ssinh.S index c8b3308bb143..8a560edc7653 100644 --- a/arch/m68k/fpsp040/ssinh.S +++ b/arch/m68k/fpsp040/ssinh.S | |||
@@ -49,9 +49,8 @@ | |||
49 | | Copyright (C) Motorola, Inc. 1990 | 49 | | Copyright (C) Motorola, Inc. 1990 |
50 | | All Rights Reserved | 50 | | All Rights Reserved |
51 | | | 51 | | |
52 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 52 | | For details on the license for this file, please see the |
53 | | The copyright notice above does not evidence any | 53 | | file, README, in this same directory. |
54 | | actual or intended publication of such source code. | ||
55 | 54 | ||
56 | |SSINH idnt 2,1 | Motorola 040 Floating Point Software Package | 55 | |SSINH idnt 2,1 | Motorola 040 Floating Point Software Package |
57 | 56 | ||
diff --git a/arch/m68k/fpsp040/stan.S b/arch/m68k/fpsp040/stan.S index b5c2a196e617..f8553aaececb 100644 --- a/arch/m68k/fpsp040/stan.S +++ b/arch/m68k/fpsp040/stan.S | |||
@@ -50,9 +50,8 @@ | |||
50 | | Copyright (C) Motorola, Inc. 1990 | 50 | | Copyright (C) Motorola, Inc. 1990 |
51 | | All Rights Reserved | 51 | | All Rights Reserved |
52 | | | 52 | | |
53 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 53 | | For details on the license for this file, please see the |
54 | | The copyright notice above does not evidence any | 54 | | file, README, in this same directory. |
55 | | actual or intended publication of such source code. | ||
56 | 55 | ||
57 | |STAN idnt 2,1 | Motorola 040 Floating Point Software Package | 56 | |STAN idnt 2,1 | Motorola 040 Floating Point Software Package |
58 | 57 | ||
diff --git a/arch/m68k/fpsp040/stanh.S b/arch/m68k/fpsp040/stanh.S index 33b009802243..7e12e59ee8c7 100644 --- a/arch/m68k/fpsp040/stanh.S +++ b/arch/m68k/fpsp040/stanh.S | |||
@@ -49,9 +49,8 @@ | |||
49 | | Copyright (C) Motorola, Inc. 1990 | 49 | | Copyright (C) Motorola, Inc. 1990 |
50 | | All Rights Reserved | 50 | | All Rights Reserved |
51 | | | 51 | | |
52 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 52 | | For details on the license for this file, please see the |
53 | | The copyright notice above does not evidence any | 53 | | file, README, in this same directory. |
54 | | actual or intended publication of such source code. | ||
55 | 54 | ||
56 | |STANH idnt 2,1 | Motorola 040 Floating Point Software Package | 55 | |STANH idnt 2,1 | Motorola 040 Floating Point Software Package |
57 | 56 | ||
diff --git a/arch/m68k/fpsp040/sto_res.S b/arch/m68k/fpsp040/sto_res.S index 0cdca3b060ad..484b47d4eaad 100644 --- a/arch/m68k/fpsp040/sto_res.S +++ b/arch/m68k/fpsp040/sto_res.S | |||
@@ -19,9 +19,8 @@ | |||
19 | | Copyright (C) Motorola, Inc. 1990 | 19 | | Copyright (C) Motorola, Inc. 1990 |
20 | | All Rights Reserved | 20 | | All Rights Reserved |
21 | | | 21 | | |
22 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 22 | | For details on the license for this file, please see the |
23 | | The copyright notice above does not evidence any | 23 | | file, README, in this same directory. |
24 | | actual or intended publication of such source code. | ||
25 | 24 | ||
26 | STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package | 25 | STO_RES: |idnt 2,1 | Motorola 040 Floating Point Software Package |
27 | 26 | ||
diff --git a/arch/m68k/fpsp040/stwotox.S b/arch/m68k/fpsp040/stwotox.S index 4e3c1407d3df..0d5e6a1436a6 100644 --- a/arch/m68k/fpsp040/stwotox.S +++ b/arch/m68k/fpsp040/stwotox.S | |||
@@ -76,9 +76,8 @@ | |||
76 | | Copyright (C) Motorola, Inc. 1990 | 76 | | Copyright (C) Motorola, Inc. 1990 |
77 | | All Rights Reserved | 77 | | All Rights Reserved |
78 | | | 78 | | |
79 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 79 | | For details on the license for this file, please see the |
80 | | The copyright notice above does not evidence any | 80 | | file, README, in this same directory. |
81 | | actual or intended publication of such source code. | ||
82 | 81 | ||
83 | |STWOTOX idnt 2,1 | Motorola 040 Floating Point Software Package | 82 | |STWOTOX idnt 2,1 | Motorola 040 Floating Point Software Package |
84 | 83 | ||
diff --git a/arch/m68k/fpsp040/tbldo.S b/arch/m68k/fpsp040/tbldo.S index fe60cf4d20d7..fd5c37a5a2b9 100644 --- a/arch/m68k/fpsp040/tbldo.S +++ b/arch/m68k/fpsp040/tbldo.S | |||
@@ -17,9 +17,8 @@ | |||
17 | | Copyright (C) Motorola, Inc. 1990 | 17 | | Copyright (C) Motorola, Inc. 1990 |
18 | | All Rights Reserved | 18 | | All Rights Reserved |
19 | | | 19 | | |
20 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 20 | | For details on the license for this file, please see the |
21 | | The copyright notice above does not evidence any | 21 | | file, README, in this same directory. |
22 | | actual or intended publication of such source code. | ||
23 | 22 | ||
24 | |TBLDO idnt 2,1 | Motorola 040 Floating Point Software Package | 23 | |TBLDO idnt 2,1 | Motorola 040 Floating Point Software Package |
25 | 24 | ||
diff --git a/arch/m68k/fpsp040/util.S b/arch/m68k/fpsp040/util.S index 452f3d65857b..65b26fa88c60 100644 --- a/arch/m68k/fpsp040/util.S +++ b/arch/m68k/fpsp040/util.S | |||
@@ -16,9 +16,8 @@ | |||
16 | | Copyright (C) Motorola, Inc. 1990 | 16 | | Copyright (C) Motorola, Inc. 1990 |
17 | | All Rights Reserved | 17 | | All Rights Reserved |
18 | | | 18 | | |
19 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 19 | | For details on the license for this file, please see the |
20 | | The copyright notice above does not evidence any | 20 | | file, README, in this same directory. |
21 | | actual or intended publication of such source code. | ||
22 | 21 | ||
23 | |UTIL idnt 2,1 | Motorola 040 Floating Point Software Package | 22 | |UTIL idnt 2,1 | Motorola 040 Floating Point Software Package |
24 | 23 | ||
diff --git a/arch/m68k/fpsp040/x_bsun.S b/arch/m68k/fpsp040/x_bsun.S index 039247b09c8b..d5a576bfac79 100644 --- a/arch/m68k/fpsp040/x_bsun.S +++ b/arch/m68k/fpsp040/x_bsun.S | |||
@@ -13,9 +13,8 @@ | |||
13 | | Copyright (C) Motorola, Inc. 1990 | 13 | | Copyright (C) Motorola, Inc. 1990 |
14 | | All Rights Reserved | 14 | | All Rights Reserved |
15 | | | 15 | | |
16 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 16 | | For details on the license for this file, please see the |
17 | | The copyright notice above does not evidence any | 17 | | file, README, in this same directory. |
18 | | actual or intended publication of such source code. | ||
19 | 18 | ||
20 | X_BSUN: |idnt 2,1 | Motorola 040 Floating Point Software Package | 19 | X_BSUN: |idnt 2,1 | Motorola 040 Floating Point Software Package |
21 | 20 | ||
diff --git a/arch/m68k/fpsp040/x_fline.S b/arch/m68k/fpsp040/x_fline.S index 3917710b0fde..264e126d1db7 100644 --- a/arch/m68k/fpsp040/x_fline.S +++ b/arch/m68k/fpsp040/x_fline.S | |||
@@ -13,9 +13,8 @@ | |||
13 | | Copyright (C) Motorola, Inc. 1990 | 13 | | Copyright (C) Motorola, Inc. 1990 |
14 | | All Rights Reserved | 14 | | All Rights Reserved |
15 | | | 15 | | |
16 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 16 | | For details on the license for this file, please see the |
17 | | The copyright notice above does not evidence any | 17 | | file, README, in this same directory. |
18 | | actual or intended publication of such source code. | ||
19 | 18 | ||
20 | X_FLINE: |idnt 2,1 | Motorola 040 Floating Point Software Package | 19 | X_FLINE: |idnt 2,1 | Motorola 040 Floating Point Software Package |
21 | 20 | ||
diff --git a/arch/m68k/fpsp040/x_operr.S b/arch/m68k/fpsp040/x_operr.S index b0f54bcb49a7..e2c371c3a45d 100644 --- a/arch/m68k/fpsp040/x_operr.S +++ b/arch/m68k/fpsp040/x_operr.S | |||
@@ -43,9 +43,8 @@ | |||
43 | | Copyright (C) Motorola, Inc. 1990 | 43 | | Copyright (C) Motorola, Inc. 1990 |
44 | | All Rights Reserved | 44 | | All Rights Reserved |
45 | | | 45 | | |
46 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 46 | | For details on the license for this file, please see the |
47 | | The copyright notice above does not evidence any | 47 | | file, README, in this same directory. |
48 | | actual or intended publication of such source code. | ||
49 | 48 | ||
50 | X_OPERR: |idnt 2,1 | Motorola 040 Floating Point Software Package | 49 | X_OPERR: |idnt 2,1 | Motorola 040 Floating Point Software Package |
51 | 50 | ||
diff --git a/arch/m68k/fpsp040/x_ovfl.S b/arch/m68k/fpsp040/x_ovfl.S index 22cb8b42c7b6..6fe4989ee31f 100644 --- a/arch/m68k/fpsp040/x_ovfl.S +++ b/arch/m68k/fpsp040/x_ovfl.S | |||
@@ -35,9 +35,8 @@ | |||
35 | | Copyright (C) Motorola, Inc. 1990 | 35 | | Copyright (C) Motorola, Inc. 1990 |
36 | | All Rights Reserved | 36 | | All Rights Reserved |
37 | | | 37 | | |
38 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 38 | | For details on the license for this file, please see the |
39 | | The copyright notice above does not evidence any | 39 | | file, README, in this same directory. |
40 | | actual or intended publication of such source code. | ||
41 | 40 | ||
42 | X_OVFL: |idnt 2,1 | Motorola 040 Floating Point Software Package | 41 | X_OVFL: |idnt 2,1 | Motorola 040 Floating Point Software Package |
43 | 42 | ||
diff --git a/arch/m68k/fpsp040/x_snan.S b/arch/m68k/fpsp040/x_snan.S index 039af573312e..4ed766416378 100644 --- a/arch/m68k/fpsp040/x_snan.S +++ b/arch/m68k/fpsp040/x_snan.S | |||
@@ -22,9 +22,8 @@ | |||
22 | | Copyright (C) Motorola, Inc. 1990 | 22 | | Copyright (C) Motorola, Inc. 1990 |
23 | | All Rights Reserved | 23 | | All Rights Reserved |
24 | | | 24 | | |
25 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 25 | | For details on the license for this file, please see the |
26 | | The copyright notice above does not evidence any | 26 | | file, README, in this same directory. |
27 | | actual or intended publication of such source code. | ||
28 | 27 | ||
29 | X_SNAN: |idnt 2,1 | Motorola 040 Floating Point Software Package | 28 | X_SNAN: |idnt 2,1 | Motorola 040 Floating Point Software Package |
30 | 29 | ||
diff --git a/arch/m68k/fpsp040/x_store.S b/arch/m68k/fpsp040/x_store.S index 4282fa67d449..402dc0c0ebc0 100644 --- a/arch/m68k/fpsp040/x_store.S +++ b/arch/m68k/fpsp040/x_store.S | |||
@@ -11,9 +11,8 @@ | |||
11 | | Copyright (C) Motorola, Inc. 1990 | 11 | | Copyright (C) Motorola, Inc. 1990 |
12 | | All Rights Reserved | 12 | | All Rights Reserved |
13 | | | 13 | | |
14 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 14 | | For details on the license for this file, please see the |
15 | | The copyright notice above does not evidence any | 15 | | file, README, in this same directory. |
16 | | actual or intended publication of such source code. | ||
17 | 16 | ||
18 | X_STORE: |idnt 2,1 | Motorola 040 Floating Point Software Package | 17 | X_STORE: |idnt 2,1 | Motorola 040 Floating Point Software Package |
19 | 18 | ||
diff --git a/arch/m68k/fpsp040/x_unfl.S b/arch/m68k/fpsp040/x_unfl.S index 077fcc230fcc..eb772ff3b812 100644 --- a/arch/m68k/fpsp040/x_unfl.S +++ b/arch/m68k/fpsp040/x_unfl.S | |||
@@ -21,9 +21,8 @@ | |||
21 | | Copyright (C) Motorola, Inc. 1990 | 21 | | Copyright (C) Motorola, Inc. 1990 |
22 | | All Rights Reserved | 22 | | All Rights Reserved |
23 | | | 23 | | |
24 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 24 | | For details on the license for this file, please see the |
25 | | The copyright notice above does not evidence any | 25 | | file, README, in this same directory. |
26 | | actual or intended publication of such source code. | ||
27 | 26 | ||
28 | X_UNFL: |idnt 2,1 | Motorola 040 Floating Point Software Package | 27 | X_UNFL: |idnt 2,1 | Motorola 040 Floating Point Software Package |
29 | 28 | ||
diff --git a/arch/m68k/fpsp040/x_unimp.S b/arch/m68k/fpsp040/x_unimp.S index 920cb9410e9e..6f382b21228b 100644 --- a/arch/m68k/fpsp040/x_unimp.S +++ b/arch/m68k/fpsp040/x_unimp.S | |||
@@ -22,9 +22,8 @@ | |||
22 | | Copyright (C) Motorola, Inc. 1990 | 22 | | Copyright (C) Motorola, Inc. 1990 |
23 | | All Rights Reserved | 23 | | All Rights Reserved |
24 | | | 24 | | |
25 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 25 | | For details on the license for this file, please see the |
26 | | The copyright notice above does not evidence any | 26 | | file, README, in this same directory. |
27 | | actual or intended publication of such source code. | ||
28 | 27 | ||
29 | X_UNIMP: |idnt 2,1 | Motorola 040 Floating Point Software Package | 28 | X_UNIMP: |idnt 2,1 | Motorola 040 Floating Point Software Package |
30 | 29 | ||
diff --git a/arch/m68k/fpsp040/x_unsupp.S b/arch/m68k/fpsp040/x_unsupp.S index 4ec57285b683..d7cf46208c62 100644 --- a/arch/m68k/fpsp040/x_unsupp.S +++ b/arch/m68k/fpsp040/x_unsupp.S | |||
@@ -23,9 +23,8 @@ | |||
23 | | Copyright (C) Motorola, Inc. 1990 | 23 | | Copyright (C) Motorola, Inc. 1990 |
24 | | All Rights Reserved | 24 | | All Rights Reserved |
25 | | | 25 | | |
26 | | THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA | 26 | | For details on the license for this file, please see the |
27 | | The copyright notice above does not evidence any | 27 | | file, README, in this same directory. |
28 | | actual or intended publication of such source code. | ||
29 | 28 | ||
30 | X_UNSUPP: |idnt 2,1 | Motorola 040 Floating Point Software Package | 29 | X_UNSUPP: |idnt 2,1 | Motorola 040 Floating Point Software Package |
31 | 30 | ||
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 3525c91204d4..f8d0cd540a06 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16-rc1 | 3 | # Linux kernel version: 2.6.16-rc2 |
4 | # Thu Jan 19 10:58:53 2006 | 4 | # Wed Feb 8 10:44:39 2006 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
@@ -12,7 +12,6 @@ CONFIG_S390=y | |||
12 | # Code maturity level options | 12 | # Code maturity level options |
13 | # | 13 | # |
14 | CONFIG_EXPERIMENTAL=y | 14 | CONFIG_EXPERIMENTAL=y |
15 | CONFIG_CLEAN_COMPILE=y | ||
16 | CONFIG_LOCK_KERNEL=y | 15 | CONFIG_LOCK_KERNEL=y |
17 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 16 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
18 | 17 | ||
@@ -154,6 +153,7 @@ CONFIG_NET=y | |||
154 | # | 153 | # |
155 | # Networking options | 154 | # Networking options |
156 | # | 155 | # |
156 | # CONFIG_NETDEBUG is not set | ||
157 | CONFIG_PACKET=y | 157 | CONFIG_PACKET=y |
158 | # CONFIG_PACKET_MMAP is not set | 158 | # CONFIG_PACKET_MMAP is not set |
159 | CONFIG_UNIX=y | 159 | CONFIG_UNIX=y |
@@ -607,6 +607,7 @@ CONFIG_MSDOS_PARTITION=y | |||
607 | # Instrumentation Support | 607 | # Instrumentation Support |
608 | # | 608 | # |
609 | # CONFIG_PROFILING is not set | 609 | # CONFIG_PROFILING is not set |
610 | # CONFIG_STATISTICS is not set | ||
610 | 611 | ||
611 | # | 612 | # |
612 | # Kernel hacking | 613 | # Kernel hacking |
@@ -624,7 +625,7 @@ CONFIG_DEBUG_MUTEXES=y | |||
624 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 625 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
625 | # CONFIG_DEBUG_KOBJECT is not set | 626 | # CONFIG_DEBUG_KOBJECT is not set |
626 | # CONFIG_DEBUG_INFO is not set | 627 | # CONFIG_DEBUG_INFO is not set |
627 | # CONFIG_DEBUG_FS is not set | 628 | CONFIG_DEBUG_FS=y |
628 | # CONFIG_DEBUG_VM is not set | 629 | # CONFIG_DEBUG_VM is not set |
629 | CONFIG_FORCED_INLINING=y | 630 | CONFIG_FORCED_INLINING=y |
630 | # CONFIG_RCU_TORTURE_TEST is not set | 631 | # CONFIG_RCU_TORTURE_TEST is not set |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index cc20f0e3a7d3..2d021626c1a6 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -905,6 +905,26 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta | |||
905 | return ret; | 905 | return ret; |
906 | } | 906 | } |
907 | 907 | ||
908 | asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename, | ||
909 | struct stat64_emu31 __user* statbuf, int flag) | ||
910 | { | ||
911 | struct kstat stat; | ||
912 | int error = -EINVAL; | ||
913 | |||
914 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
915 | goto out; | ||
916 | |||
917 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
918 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
919 | else | ||
920 | error = vfs_stat_fd(dfd, filename, &stat); | ||
921 | |||
922 | if (!error) | ||
923 | error = cp_stat64(statbuf, &stat); | ||
924 | out: | ||
925 | return error; | ||
926 | } | ||
927 | |||
908 | /* | 928 | /* |
909 | * Linux/i386 didn't use to be able to handle more than | 929 | * Linux/i386 didn't use to be able to handle more than |
910 | * 4 system call parameters, so these system calls used a memory | 930 | * 4 system call parameters, so these system calls used a memory |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 83b33fe1923c..dd2d6c3e8df8 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1523,13 +1523,13 @@ compat_sys_futimesat_wrapper: | |||
1523 | llgtr %r4,%r4 # struct timeval * | 1523 | llgtr %r4,%r4 # struct timeval * |
1524 | jg compat_sys_futimesat | 1524 | jg compat_sys_futimesat |
1525 | 1525 | ||
1526 | .globl compat_sys_newfstatat_wrapper | 1526 | .globl sys32_fstatat_wrapper |
1527 | compat_sys_newfstatat_wrapper: | 1527 | sys32_fstatat_wrapper: |
1528 | llgfr %r2,%r2 # unsigned int | 1528 | llgfr %r2,%r2 # unsigned int |
1529 | llgtr %r3,%r3 # char * | 1529 | llgtr %r3,%r3 # char * |
1530 | llgtr %r4,%r4 # struct stat * | 1530 | llgtr %r4,%r4 # struct stat64 * |
1531 | lgfr %r5,%r5 # int | 1531 | lgfr %r5,%r5 # int |
1532 | jg compat_sys_newfstatat | 1532 | jg sys32_fstatat |
1533 | 1533 | ||
1534 | .globl sys_unlinkat_wrapper | 1534 | .globl sys_unlinkat_wrapper |
1535 | sys_unlinkat_wrapper: | 1535 | sys_unlinkat_wrapper: |
@@ -1602,3 +1602,8 @@ compat_sys_ppoll_wrapper: | |||
1602 | llgtr %r5,%r5 # const sigset_t * | 1602 | llgtr %r5,%r5 # const sigset_t * |
1603 | llgfr %r6,%r6 # size_t | 1603 | llgfr %r6,%r6 # size_t |
1604 | jg compat_sys_ppoll | 1604 | jg compat_sys_ppoll |
1605 | |||
1606 | .globl sys_unshare_wrapper | ||
1607 | sys_unshare_wrapper: | ||
1608 | llgfr %r2,%r2 # unsigned long | ||
1609 | jg sys_unshare | ||
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index f0ed5c642c74..bad81b5832db 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c | |||
@@ -12,15 +12,16 @@ | |||
12 | * on the S390 architecture. | 12 | * on the S390 architecture. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <asm/cio.h> | ||
16 | #include <asm/setup.h> | ||
17 | #include <linux/device.h> | 15 | #include <linux/device.h> |
18 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
19 | #include <linux/kexec.h> | 17 | #include <linux/kexec.h> |
20 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <asm/cio.h> | ||
20 | #include <asm/setup.h> | ||
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
22 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | #include <asm/smp.h> | ||
24 | 25 | ||
25 | static void kexec_halt_all_cpus(void *); | 26 | static void kexec_halt_all_cpus(void *); |
26 | 27 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index cbfcfd02a43a..0d1ad5dbe2b1 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -52,7 +52,7 @@ extern volatile int __cpu_logical_map[]; | |||
52 | struct _lowcore *lowcore_ptr[NR_CPUS]; | 52 | struct _lowcore *lowcore_ptr[NR_CPUS]; |
53 | 53 | ||
54 | cpumask_t cpu_online_map; | 54 | cpumask_t cpu_online_map; |
55 | cpumask_t cpu_possible_map; | 55 | cpumask_t cpu_possible_map = CPU_MASK_ALL; |
56 | 56 | ||
57 | static struct task_struct *current_set[NR_CPUS]; | 57 | static struct task_struct *current_set[NR_CPUS]; |
58 | 58 | ||
@@ -514,9 +514,6 @@ __init smp_check_cpus(unsigned int max_cpus) | |||
514 | num_cpus++; | 514 | num_cpus++; |
515 | } | 515 | } |
516 | 516 | ||
517 | for (cpu = 1; cpu < max_cpus; cpu++) | ||
518 | cpu_set(cpu, cpu_possible_map); | ||
519 | |||
520 | printk("Detected %d CPU's\n",(int) num_cpus); | 517 | printk("Detected %d CPU's\n",(int) num_cpus); |
521 | printk("Boot cpu address %2X\n", boot_cpu_addr); | 518 | printk("Boot cpu address %2X\n", boot_cpu_addr); |
522 | } | 519 | } |
@@ -810,7 +807,6 @@ void __devinit smp_prepare_boot_cpu(void) | |||
810 | 807 | ||
811 | cpu_set(0, cpu_online_map); | 808 | cpu_set(0, cpu_online_map); |
812 | cpu_set(0, cpu_present_map); | 809 | cpu_set(0, cpu_present_map); |
813 | cpu_set(0, cpu_possible_map); | ||
814 | S390_lowcore.percpu_offset = __per_cpu_offset[0]; | 810 | S390_lowcore.percpu_offset = __per_cpu_offset[0]; |
815 | current_set[0] = current; | 811 | current_set[0] = current; |
816 | } | 812 | } |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 3280345efacd..84921fe8d266 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -301,7 +301,7 @@ SYSCALL(sys_mkdirat,sys_mkdirat,sys_mkdirat_wrapper) | |||
301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ | 301 | SYSCALL(sys_mknodat,sys_mknodat,sys_mknodat_wrapper) /* 290 */ |
302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) | 302 | SYSCALL(sys_fchownat,sys_fchownat,sys_fchownat_wrapper) |
303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) | 303 | SYSCALL(sys_futimesat,sys_futimesat,compat_sys_futimesat_wrapper) |
304 | SYSCALL(sys_newfstatat,sys_newfstatat,compat_sys_newfstatat_wrapper) | 304 | SYSCALL(sys_fstatat64,sys_newfstatat,sys32_fstatat_wrapper) |
305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) | 305 | SYSCALL(sys_unlinkat,sys_unlinkat,sys_unlinkat_wrapper) |
306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ | 306 | SYSCALL(sys_renameat,sys_renameat,sys_renameat_wrapper) /* 295 */ |
307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) | 307 | SYSCALL(sys_linkat,sys_linkat,sys_linkat_wrapper) |
@@ -311,3 +311,4 @@ SYSCALL(sys_fchmodat,sys_fchmodat,sys_fchmodat_wrapper) | |||
311 | SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */ | 311 | SYSCALL(sys_faccessat,sys_faccessat,sys_faccessat_wrapper) /* 300 */ |
312 | SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper) | 312 | SYSCALL(sys_pselect6,sys_pselect6,compat_sys_pselect6_wrapper) |
313 | SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper) | 313 | SYSCALL(sys_ppoll,sys_ppoll,compat_sys_ppoll_wrapper) |
314 | SYSCALL(sys_unshare,sys_unshare,sys_unshare_wrapper) | ||
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index ada4535d0161..00dee176c08e 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -677,7 +677,7 @@ ia32_sys_call_table: | |||
677 | .quad sys_mknodat | 677 | .quad sys_mknodat |
678 | .quad sys_fchownat | 678 | .quad sys_fchownat |
679 | .quad compat_sys_futimesat | 679 | .quad compat_sys_futimesat |
680 | .quad compat_sys_newfstatat /* 300 */ | 680 | .quad sys32_fstatat /* 300 */ |
681 | .quad sys_unlinkat | 681 | .quad sys_unlinkat |
682 | .quad sys_renameat | 682 | .quad sys_renameat |
683 | .quad sys_linkat | 683 | .quad sys_linkat |
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 54481af5344a..2bc55af95419 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c | |||
@@ -180,6 +180,28 @@ sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf) | |||
180 | return ret; | 180 | return ret; |
181 | } | 181 | } |
182 | 182 | ||
183 | asmlinkage long | ||
184 | sys32_fstatat(unsigned int dfd, char __user *filename, | ||
185 | struct stat64 __user* statbuf, int flag) | ||
186 | { | ||
187 | struct kstat stat; | ||
188 | int error = -EINVAL; | ||
189 | |||
190 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
191 | goto out; | ||
192 | |||
193 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
194 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
195 | else | ||
196 | error = vfs_stat_fd(dfd, filename, &stat); | ||
197 | |||
198 | if (!error) | ||
199 | error = cp_stat64(statbuf, &stat); | ||
200 | |||
201 | out: | ||
202 | return error; | ||
203 | } | ||
204 | |||
183 | /* | 205 | /* |
184 | * Linux/i386 didn't use to be able to handle more than | 206 | * Linux/i386 didn't use to be able to handle more than |
185 | * 4 system call parameters, so these system calls used a memory | 207 | * 4 system call parameters, so these system calls used a memory |
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 6147770b4347..7a0a3e8d5d72 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c | |||
@@ -708,7 +708,7 @@ static void setup_APIC_timer(unsigned int clocks) | |||
708 | local_irq_save(flags); | 708 | local_irq_save(flags); |
709 | 709 | ||
710 | /* wait for irq slice */ | 710 | /* wait for irq slice */ |
711 | if (vxtime.hpet_address) { | 711 | if (vxtime.hpet_address && hpet_use_timer) { |
712 | int trigger = hpet_readl(HPET_T0_CMP); | 712 | int trigger = hpet_readl(HPET_T0_CMP); |
713 | while (hpet_readl(HPET_COUNTER) >= trigger) | 713 | while (hpet_readl(HPET_COUNTER) >= trigger) |
714 | /* do nothing */ ; | 714 | /* do nothing */ ; |
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 2fe23a6c361b..dd0718dc178b 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c | |||
@@ -310,7 +310,7 @@ void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int di | |||
310 | 310 | ||
311 | for (i = 0; i < nents; i++) { | 311 | for (i = 0; i < nents; i++) { |
312 | struct scatterlist *s = &sg[i]; | 312 | struct scatterlist *s = &sg[i]; |
313 | if (!s->dma_length || !s->length) | 313 | if (!s->dma_length) |
314 | break; | 314 | break; |
315 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); | 315 | dma_unmap_single(dev, s->dma_address, s->dma_length, dir); |
316 | } | 316 | } |
@@ -364,7 +364,6 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
364 | 364 | ||
365 | BUG_ON(i > start && s->offset); | 365 | BUG_ON(i > start && s->offset); |
366 | if (i == start) { | 366 | if (i == start) { |
367 | *sout = *s; | ||
368 | sout->dma_address = iommu_bus_base; | 367 | sout->dma_address = iommu_bus_base; |
369 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; | 368 | sout->dma_address += iommu_page*PAGE_SIZE + s->offset; |
370 | sout->dma_length = s->length; | 369 | sout->dma_length = s->length; |
@@ -379,7 +378,7 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
379 | SET_LEAK(iommu_page); | 378 | SET_LEAK(iommu_page); |
380 | addr += PAGE_SIZE; | 379 | addr += PAGE_SIZE; |
381 | iommu_page++; | 380 | iommu_page++; |
382 | } | 381 | } |
383 | } | 382 | } |
384 | BUG_ON(iommu_page - iommu_start != pages); | 383 | BUG_ON(iommu_page - iommu_start != pages); |
385 | return 0; | 384 | return 0; |
@@ -391,7 +390,6 @@ static inline int dma_map_cont(struct scatterlist *sg, int start, int stopat, | |||
391 | { | 390 | { |
392 | if (!need) { | 391 | if (!need) { |
393 | BUG_ON(stopat - start != 1); | 392 | BUG_ON(stopat - start != 1); |
394 | *sout = sg[start]; | ||
395 | sout->dma_length = sg[start].length; | 393 | sout->dma_length = sg[start].length; |
396 | return 0; | 394 | return 0; |
397 | } | 395 | } |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index dba7237be5c1..3c58c30506a1 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -59,7 +59,7 @@ static int notsc __initdata = 0; | |||
59 | unsigned int cpu_khz; /* TSC clocks / usec, not used here */ | 59 | unsigned int cpu_khz; /* TSC clocks / usec, not used here */ |
60 | static unsigned long hpet_period; /* fsecs / HPET clock */ | 60 | static unsigned long hpet_period; /* fsecs / HPET clock */ |
61 | unsigned long hpet_tick; /* HPET clocks / interrupt */ | 61 | unsigned long hpet_tick; /* HPET clocks / interrupt */ |
62 | static int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ | 62 | int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ |
63 | unsigned long vxtime_hz = PIT_TICK_RATE; | 63 | unsigned long vxtime_hz = PIT_TICK_RATE; |
64 | int report_lost_ticks; /* command line option */ | 64 | int report_lost_ticks; /* command line option */ |
65 | unsigned long long monotonic_base; | 65 | unsigned long long monotonic_base; |
@@ -326,7 +326,10 @@ static noinline void handle_lost_ticks(int lost, struct pt_regs *regs) | |||
326 | print_symbol("rip %s\n", regs->rip); | 326 | print_symbol("rip %s\n", regs->rip); |
327 | if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { | 327 | if (vxtime.mode == VXTIME_TSC && vxtime.hpet_address) { |
328 | printk(KERN_WARNING "Falling back to HPET\n"); | 328 | printk(KERN_WARNING "Falling back to HPET\n"); |
329 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | 329 | if (hpet_use_timer) |
330 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | ||
331 | else | ||
332 | vxtime.last = hpet_readl(HPET_COUNTER); | ||
330 | vxtime.mode = VXTIME_HPET; | 333 | vxtime.mode = VXTIME_HPET; |
331 | do_gettimeoffset = do_gettimeoffset_hpet; | 334 | do_gettimeoffset = do_gettimeoffset_hpet; |
332 | } | 335 | } |
@@ -988,7 +991,10 @@ void __init time_init_gtod(void) | |||
988 | notsc = 1; | 991 | notsc = 1; |
989 | if (vxtime.hpet_address && notsc) { | 992 | if (vxtime.hpet_address && notsc) { |
990 | timetype = hpet_use_timer ? "HPET" : "PIT/HPET"; | 993 | timetype = hpet_use_timer ? "HPET" : "PIT/HPET"; |
991 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | 994 | if (hpet_use_timer) |
995 | vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick; | ||
996 | else | ||
997 | vxtime.last = hpet_readl(HPET_COUNTER); | ||
992 | vxtime.mode = VXTIME_HPET; | 998 | vxtime.mode = VXTIME_HPET; |
993 | do_gettimeoffset = do_gettimeoffset_hpet; | 999 | do_gettimeoffset = do_gettimeoffset_hpet; |
994 | #ifdef CONFIG_X86_PM_TIMER | 1000 | #ifdef CONFIG_X86_PM_TIMER |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index ee1b2da9e5e7..28d50dc540e8 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -90,6 +90,20 @@ static inline void conditional_sti(struct pt_regs *regs) | |||
90 | local_irq_enable(); | 90 | local_irq_enable(); |
91 | } | 91 | } |
92 | 92 | ||
93 | static inline void preempt_conditional_sti(struct pt_regs *regs) | ||
94 | { | ||
95 | preempt_disable(); | ||
96 | if (regs->eflags & X86_EFLAGS_IF) | ||
97 | local_irq_enable(); | ||
98 | } | ||
99 | |||
100 | static inline void preempt_conditional_cli(struct pt_regs *regs) | ||
101 | { | ||
102 | if (regs->eflags & X86_EFLAGS_IF) | ||
103 | local_irq_disable(); | ||
104 | preempt_enable_no_resched(); | ||
105 | } | ||
106 | |||
93 | static int kstack_depth_to_print = 10; | 107 | static int kstack_depth_to_print = 10; |
94 | 108 | ||
95 | #ifdef CONFIG_KALLSYMS | 109 | #ifdef CONFIG_KALLSYMS |
@@ -693,7 +707,7 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, | |||
693 | SIGTRAP) == NOTIFY_STOP) | 707 | SIGTRAP) == NOTIFY_STOP) |
694 | return; | 708 | return; |
695 | 709 | ||
696 | conditional_sti(regs); | 710 | preempt_conditional_sti(regs); |
697 | 711 | ||
698 | /* Mask out spurious debug traps due to lazy DR7 setting */ | 712 | /* Mask out spurious debug traps due to lazy DR7 setting */ |
699 | if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) { | 713 | if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) { |
@@ -738,11 +752,13 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, | |||
738 | 752 | ||
739 | clear_dr7: | 753 | clear_dr7: |
740 | set_debugreg(0UL, 7); | 754 | set_debugreg(0UL, 7); |
755 | preempt_conditional_cli(regs); | ||
741 | return; | 756 | return; |
742 | 757 | ||
743 | clear_TF_reenable: | 758 | clear_TF_reenable: |
744 | set_tsk_thread_flag(tsk, TIF_SINGLESTEP); | 759 | set_tsk_thread_flag(tsk, TIF_SINGLESTEP); |
745 | regs->eflags &= ~TF_MASK; | 760 | regs->eflags &= ~TF_MASK; |
761 | preempt_conditional_cli(regs); | ||
746 | } | 762 | } |
747 | 763 | ||
748 | static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr) | 764 | static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr) |
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index 41a94bc79f67..eb2eb3e12d6a 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c | |||
@@ -250,12 +250,17 @@ tipar_open(struct inode *inode, struct file *file) | |||
250 | { | 250 | { |
251 | unsigned int minor = iminor(inode) - TIPAR_MINOR; | 251 | unsigned int minor = iminor(inode) - TIPAR_MINOR; |
252 | 252 | ||
253 | if (minor > tp_count - 1) | 253 | if (tp_count == 0 || minor > tp_count - 1) |
254 | return -ENXIO; | 254 | return -ENXIO; |
255 | 255 | ||
256 | if (test_and_set_bit(minor, &opened)) | 256 | if (test_and_set_bit(minor, &opened)) |
257 | return -EBUSY; | 257 | return -EBUSY; |
258 | 258 | ||
259 | if (!table[minor].dev) { | ||
260 | printk(KERN_ERR "%s: NULL device for minor %u\n", | ||
261 | __FUNCTION__, minor); | ||
262 | return -ENXIO; | ||
263 | } | ||
259 | parport_claim_or_block(table[minor].dev); | 264 | parport_claim_or_block(table[minor].dev); |
260 | init_ti_parallel(minor); | 265 | init_ti_parallel(minor); |
261 | parport_release(table[minor].dev); | 266 | parport_release(table[minor].dev); |
@@ -510,16 +515,20 @@ tipar_init_module(void) | |||
510 | err = PTR_ERR(tipar_class); | 515 | err = PTR_ERR(tipar_class); |
511 | goto out_chrdev; | 516 | goto out_chrdev; |
512 | } | 517 | } |
513 | if (parport_register_driver(&tipar_driver)) { | 518 | if (parport_register_driver(&tipar_driver) || tp_count == 0) { |
514 | printk(KERN_ERR "tipar: unable to register with parport\n"); | 519 | printk(KERN_ERR "tipar: unable to register with parport\n"); |
515 | err = -EIO; | 520 | err = -EIO; |
516 | goto out; | 521 | goto out_class; |
517 | } | 522 | } |
518 | 523 | ||
519 | err = 0; | 524 | err = 0; |
520 | goto out; | 525 | goto out; |
521 | 526 | ||
527 | out_class: | ||
528 | class_destroy(tipar_class); | ||
529 | |||
522 | out_chrdev: | 530 | out_chrdev: |
531 | devfs_remove("ticables/par"); | ||
523 | unregister_chrdev(TIPAR_MAJOR, "tipar"); | 532 | unregister_chrdev(TIPAR_MAJOR, "tipar"); |
524 | out: | 533 | out: |
525 | return err; | 534 | return err; |
diff --git a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c index 37c9e13ad3ac..8d6b249ad66b 100644 --- a/drivers/char/watchdog/pcwd.c +++ b/drivers/char/watchdog/pcwd.c | |||
@@ -49,29 +49,37 @@ | |||
49 | * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ | 49 | * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include <linux/module.h> | 52 | #include <linux/config.h> /* For CONFIG_WATCHDOG_NOWAYOUT/... */ |
53 | #include <linux/moduleparam.h> | 53 | #include <linux/module.h> /* For module specific items */ |
54 | #include <linux/types.h> | 54 | #include <linux/moduleparam.h> /* For new moduleparam's */ |
55 | #include <linux/timer.h> | 55 | #include <linux/types.h> /* For standard types (like size_t) */ |
56 | #include <linux/jiffies.h> | 56 | #include <linux/errno.h> /* For the -ENODEV/... values */ |
57 | #include <linux/config.h> | 57 | #include <linux/kernel.h> /* For printk/panic/... */ |
58 | #include <linux/wait.h> | 58 | #include <linux/delay.h> /* For mdelay function */ |
59 | #include <linux/slab.h> | 59 | #include <linux/timer.h> /* For timer related operations */ |
60 | #include <linux/ioport.h> | 60 | #include <linux/jiffies.h> /* For jiffies stuff */ |
61 | #include <linux/delay.h> | 61 | #include <linux/miscdevice.h> /* For MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR) */ |
62 | #include <linux/fs.h> | 62 | #include <linux/watchdog.h> /* For the watchdog specific items */ |
63 | #include <linux/miscdevice.h> | 63 | #include <linux/notifier.h> /* For notifier support */ |
64 | #include <linux/watchdog.h> | 64 | #include <linux/reboot.h> /* For reboot_notifier stuff */ |
65 | #include <linux/notifier.h> | 65 | #include <linux/init.h> /* For __init/__exit/... */ |
66 | #include <linux/init.h> | 66 | #include <linux/fs.h> /* For file operations */ |
67 | #include <linux/spinlock.h> | 67 | #include <linux/ioport.h> /* For io-port access */ |
68 | #include <linux/reboot.h> | 68 | #include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */ |
69 | #include <linux/sched.h> /* TASK_INTERRUPTIBLE, set_current_state() and friends */ | 69 | #include <linux/sched.h> /* TASK_INTERRUPTIBLE, set_current_state() and friends */ |
70 | #include <asm/uaccess.h> | 70 | #include <linux/slab.h> /* For kmalloc */ |
71 | #include <asm/io.h> | ||
72 | 71 | ||
73 | #define WD_VER "1.16 (06/12/2004)" | 72 | #include <asm/uaccess.h> /* For copy_to_user/put_user/... */ |
74 | #define PFX "pcwd: " | 73 | #include <asm/io.h> /* For inb/outb/... */ |
74 | |||
75 | /* Module and version information */ | ||
76 | #define WATCHDOG_VERSION "1.16" | ||
77 | #define WATCHDOG_DATE "03 Jan 2006" | ||
78 | #define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog" | ||
79 | #define WATCHDOG_NAME "pcwd" | ||
80 | #define PFX WATCHDOG_NAME ": " | ||
81 | #define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n" | ||
82 | #define WD_VER WATCHDOG_VERSION " (" WATCHDOG_DATE ")" | ||
75 | 83 | ||
76 | /* | 84 | /* |
77 | * It should be noted that PCWD_REVISION_B was removed because A and B | 85 | * It should be noted that PCWD_REVISION_B was removed because A and B |
@@ -85,36 +93,38 @@ | |||
85 | 93 | ||
86 | /* | 94 | /* |
87 | * These are the defines that describe the control status bits for the | 95 | * These are the defines that describe the control status bits for the |
88 | * PC Watchdog card, revision A. | 96 | * PCI-PC Watchdog card. |
89 | */ | 97 | */ |
98 | /* Port 1 : Control Status #1 for the PC Watchdog card, revision A. */ | ||
90 | #define WD_WDRST 0x01 /* Previously reset state */ | 99 | #define WD_WDRST 0x01 /* Previously reset state */ |
91 | #define WD_T110 0x02 /* Temperature overheat sense */ | 100 | #define WD_T110 0x02 /* Temperature overheat sense */ |
92 | #define WD_HRTBT 0x04 /* Heartbeat sense */ | 101 | #define WD_HRTBT 0x04 /* Heartbeat sense */ |
93 | #define WD_RLY2 0x08 /* External relay triggered */ | 102 | #define WD_RLY2 0x08 /* External relay triggered */ |
94 | #define WD_SRLY2 0x80 /* Software external relay triggered */ | 103 | #define WD_SRLY2 0x80 /* Software external relay triggered */ |
95 | 104 | /* Port 1 : Control Status #1 for the PC Watchdog card, revision C. */ | |
96 | /* | ||
97 | * These are the defines that describe the control status bits for the | ||
98 | * PC Watchdog card, revision C. | ||
99 | */ | ||
100 | #define WD_REVC_WTRP 0x01 /* Watchdog Trip status */ | 105 | #define WD_REVC_WTRP 0x01 /* Watchdog Trip status */ |
101 | #define WD_REVC_HRBT 0x02 /* Watchdog Heartbeat */ | 106 | #define WD_REVC_HRBT 0x02 /* Watchdog Heartbeat */ |
102 | #define WD_REVC_TTRP 0x04 /* Temperature Trip status */ | 107 | #define WD_REVC_TTRP 0x04 /* Temperature Trip status */ |
108 | /* Port 2 : Control Status #2 */ | ||
109 | #define WD_WDIS 0x10 /* Watchdog Disabled */ | ||
110 | #define WD_ENTP 0x20 /* Watchdog Enable Temperature Trip */ | ||
111 | #define WD_SSEL 0x40 /* Watchdog Switch Select (1:SW1 <-> 0:SW2) */ | ||
112 | #define WD_WCMD 0x80 /* Watchdog Command Mode */ | ||
103 | 113 | ||
104 | /* max. time we give an ISA watchdog card to process a command */ | 114 | /* max. time we give an ISA watchdog card to process a command */ |
105 | /* 500ms for each 4 bit response (according to spec.) */ | 115 | /* 500ms for each 4 bit response (according to spec.) */ |
106 | #define ISA_COMMAND_TIMEOUT 1000 | 116 | #define ISA_COMMAND_TIMEOUT 1000 |
107 | 117 | ||
108 | /* Watchdog's internal commands */ | 118 | /* Watchdog's internal commands */ |
109 | #define CMD_ISA_IDLE 0x00 | 119 | #define CMD_ISA_IDLE 0x00 |
110 | #define CMD_ISA_VERSION_INTEGER 0x01 | 120 | #define CMD_ISA_VERSION_INTEGER 0x01 |
111 | #define CMD_ISA_VERSION_TENTH 0x02 | 121 | #define CMD_ISA_VERSION_TENTH 0x02 |
112 | #define CMD_ISA_VERSION_HUNDRETH 0x03 | 122 | #define CMD_ISA_VERSION_HUNDRETH 0x03 |
113 | #define CMD_ISA_VERSION_MINOR 0x04 | 123 | #define CMD_ISA_VERSION_MINOR 0x04 |
114 | #define CMD_ISA_SWITCH_SETTINGS 0x05 | 124 | #define CMD_ISA_SWITCH_SETTINGS 0x05 |
115 | #define CMD_ISA_DELAY_TIME_2SECS 0x0A | 125 | #define CMD_ISA_DELAY_TIME_2SECS 0x0A |
116 | #define CMD_ISA_DELAY_TIME_4SECS 0x0B | 126 | #define CMD_ISA_DELAY_TIME_4SECS 0x0B |
117 | #define CMD_ISA_DELAY_TIME_8SECS 0x0C | 127 | #define CMD_ISA_DELAY_TIME_8SECS 0x0C |
118 | 128 | ||
119 | /* | 129 | /* |
120 | * We are using an kernel timer to do the pinging of the watchdog | 130 | * We are using an kernel timer to do the pinging of the watchdog |
@@ -130,15 +140,17 @@ static int cards_found; | |||
130 | /* internal variables */ | 140 | /* internal variables */ |
131 | static atomic_t open_allowed = ATOMIC_INIT(1); | 141 | static atomic_t open_allowed = ATOMIC_INIT(1); |
132 | static char expect_close; | 142 | static char expect_close; |
133 | static struct timer_list timer; | ||
134 | static unsigned long next_heartbeat; | ||
135 | static int temp_panic; | 143 | static int temp_panic; |
136 | static int revision; /* The card's revision */ | 144 | static struct { /* this is private data for each ISA-PC watchdog card */ |
137 | static int supports_temp; /* Wether or not the card has a temperature device */ | 145 | int revision; /* The card's revision */ |
138 | static int command_mode; /* Wether or not the card is in command mode */ | 146 | int supports_temp; /* Wether or not the card has a temperature device */ |
139 | static int initial_status; /* The card's boot status */ | 147 | int command_mode; /* Wether or not the card is in command mode */ |
140 | static int current_readport; /* The cards I/O address */ | 148 | int boot_status; /* The card's boot status */ |
141 | static spinlock_t io_lock; | 149 | int io_addr; /* The cards I/O address */ |
150 | spinlock_t io_lock; /* the lock for io operations */ | ||
151 | struct timer_list timer; /* The timer that pings the watchdog */ | ||
152 | unsigned long next_heartbeat; /* the next_heartbeat for the timer */ | ||
153 | } pcwd_private; | ||
142 | 154 | ||
143 | /* module parameters */ | 155 | /* module parameters */ |
144 | #define WATCHDOG_HEARTBEAT 60 /* 60 sec default heartbeat */ | 156 | #define WATCHDOG_HEARTBEAT 60 /* 60 sec default heartbeat */ |
@@ -161,14 +173,14 @@ static int send_isa_command(int cmd) | |||
161 | int port0, last_port0; /* Double read for stabilising */ | 173 | int port0, last_port0; /* Double read for stabilising */ |
162 | 174 | ||
163 | /* The WCMD bit must be 1 and the command is only 4 bits in size */ | 175 | /* The WCMD bit must be 1 and the command is only 4 bits in size */ |
164 | control_status = (cmd & 0x0F) | 0x80; | 176 | control_status = (cmd & 0x0F) | WD_WCMD; |
165 | outb_p(control_status, current_readport + 2); | 177 | outb_p(control_status, pcwd_private.io_addr + 2); |
166 | udelay(ISA_COMMAND_TIMEOUT); | 178 | udelay(ISA_COMMAND_TIMEOUT); |
167 | 179 | ||
168 | port0 = inb_p(current_readport); | 180 | port0 = inb_p(pcwd_private.io_addr); |
169 | for (i = 0; i < 25; ++i) { | 181 | for (i = 0; i < 25; ++i) { |
170 | last_port0 = port0; | 182 | last_port0 = port0; |
171 | port0 = inb_p(current_readport); | 183 | port0 = inb_p(pcwd_private.io_addr); |
172 | 184 | ||
173 | if (port0 == last_port0) | 185 | if (port0 == last_port0) |
174 | break; /* Data is stable */ | 186 | break; /* Data is stable */ |
@@ -184,7 +196,7 @@ static int set_command_mode(void) | |||
184 | int i, found=0, count=0; | 196 | int i, found=0, count=0; |
185 | 197 | ||
186 | /* Set the card into command mode */ | 198 | /* Set the card into command mode */ |
187 | spin_lock(&io_lock); | 199 | spin_lock(&pcwd_private.io_lock); |
188 | while ((!found) && (count < 3)) { | 200 | while ((!found) && (count < 3)) { |
189 | i = send_isa_command(CMD_ISA_IDLE); | 201 | i = send_isa_command(CMD_ISA_IDLE); |
190 | 202 | ||
@@ -192,15 +204,15 @@ static int set_command_mode(void) | |||
192 | found = 1; | 204 | found = 1; |
193 | else if (i == 0xF3) { | 205 | else if (i == 0xF3) { |
194 | /* Card does not like what we've done to it */ | 206 | /* Card does not like what we've done to it */ |
195 | outb_p(0x00, current_readport + 2); | 207 | outb_p(0x00, pcwd_private.io_addr + 2); |
196 | udelay(1200); /* Spec says wait 1ms */ | 208 | udelay(1200); /* Spec says wait 1ms */ |
197 | outb_p(0x00, current_readport + 2); | 209 | outb_p(0x00, pcwd_private.io_addr + 2); |
198 | udelay(ISA_COMMAND_TIMEOUT); | 210 | udelay(ISA_COMMAND_TIMEOUT); |
199 | } | 211 | } |
200 | count++; | 212 | count++; |
201 | } | 213 | } |
202 | spin_unlock(&io_lock); | 214 | spin_unlock(&pcwd_private.io_lock); |
203 | command_mode = found; | 215 | pcwd_private.command_mode = found; |
204 | 216 | ||
205 | return(found); | 217 | return(found); |
206 | } | 218 | } |
@@ -208,12 +220,95 @@ static int set_command_mode(void) | |||
208 | static void unset_command_mode(void) | 220 | static void unset_command_mode(void) |
209 | { | 221 | { |
210 | /* Set the card into normal mode */ | 222 | /* Set the card into normal mode */ |
211 | spin_lock(&io_lock); | 223 | spin_lock(&pcwd_private.io_lock); |
212 | outb_p(0x00, current_readport + 2); | 224 | outb_p(0x00, pcwd_private.io_addr + 2); |
213 | udelay(ISA_COMMAND_TIMEOUT); | 225 | udelay(ISA_COMMAND_TIMEOUT); |
214 | spin_unlock(&io_lock); | 226 | spin_unlock(&pcwd_private.io_lock); |
227 | |||
228 | pcwd_private.command_mode = 0; | ||
229 | } | ||
230 | |||
231 | static inline void pcwd_check_temperature_support(void) | ||
232 | { | ||
233 | if (inb(pcwd_private.io_addr) != 0xF0) | ||
234 | pcwd_private.supports_temp = 1; | ||
235 | } | ||
236 | |||
237 | static inline char *get_firmware(void) | ||
238 | { | ||
239 | int one, ten, hund, minor; | ||
240 | char *ret; | ||
241 | |||
242 | ret = kmalloc(6, GFP_KERNEL); | ||
243 | if(ret == NULL) | ||
244 | return NULL; | ||
245 | |||
246 | if (set_command_mode()) { | ||
247 | one = send_isa_command(CMD_ISA_VERSION_INTEGER); | ||
248 | ten = send_isa_command(CMD_ISA_VERSION_TENTH); | ||
249 | hund = send_isa_command(CMD_ISA_VERSION_HUNDRETH); | ||
250 | minor = send_isa_command(CMD_ISA_VERSION_MINOR); | ||
251 | sprintf(ret, "%c.%c%c%c", one, ten, hund, minor); | ||
252 | } | ||
253 | else | ||
254 | sprintf(ret, "ERROR"); | ||
255 | |||
256 | unset_command_mode(); | ||
257 | return(ret); | ||
258 | } | ||
259 | |||
260 | static inline int pcwd_get_option_switches(void) | ||
261 | { | ||
262 | int option_switches=0; | ||
263 | |||
264 | if (set_command_mode()) { | ||
265 | /* Get switch settings */ | ||
266 | option_switches = send_isa_command(CMD_ISA_SWITCH_SETTINGS); | ||
267 | } | ||
268 | |||
269 | unset_command_mode(); | ||
270 | return(option_switches); | ||
271 | } | ||
272 | |||
273 | static void pcwd_show_card_info(void) | ||
274 | { | ||
275 | char *firmware; | ||
276 | int option_switches; | ||
277 | |||
278 | /* Get some extra info from the hardware (in command/debug/diag mode) */ | ||
279 | if (pcwd_private.revision == PCWD_REVISION_A) | ||
280 | printk(KERN_INFO PFX "ISA-PC Watchdog (REV.A) detected at port 0x%04x\n", pcwd_private.io_addr); | ||
281 | else if (pcwd_private.revision == PCWD_REVISION_C) { | ||
282 | firmware = get_firmware(); | ||
283 | printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n", | ||
284 | pcwd_private.io_addr, firmware); | ||
285 | kfree(firmware); | ||
286 | option_switches = pcwd_get_option_switches(); | ||
287 | printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", | ||
288 | option_switches, | ||
289 | ((option_switches & 0x10) ? "ON" : "OFF"), | ||
290 | ((option_switches & 0x08) ? "ON" : "OFF")); | ||
291 | |||
292 | /* Reprogram internal heartbeat to 2 seconds */ | ||
293 | if (set_command_mode()) { | ||
294 | send_isa_command(CMD_ISA_DELAY_TIME_2SECS); | ||
295 | unset_command_mode(); | ||
296 | } | ||
297 | } | ||
298 | |||
299 | if (pcwd_private.supports_temp) | ||
300 | printk(KERN_INFO PFX "Temperature Option Detected\n"); | ||
301 | |||
302 | if (pcwd_private.boot_status & WDIOF_CARDRESET) | ||
303 | printk(KERN_INFO PFX "Previous reboot was caused by the card\n"); | ||
304 | |||
305 | if (pcwd_private.boot_status & WDIOF_OVERHEAT) { | ||
306 | printk(KERN_EMERG PFX "Card senses a CPU Overheat. Panicking!\n"); | ||
307 | printk(KERN_EMERG PFX "CPU Overheat\n"); | ||
308 | } | ||
215 | 309 | ||
216 | command_mode = 0; | 310 | if (pcwd_private.boot_status == 0) |
311 | printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); | ||
217 | } | 312 | } |
218 | 313 | ||
219 | static void pcwd_timer_ping(unsigned long data) | 314 | static void pcwd_timer_ping(unsigned long data) |
@@ -222,25 +317,25 @@ static void pcwd_timer_ping(unsigned long data) | |||
222 | 317 | ||
223 | /* If we got a heartbeat pulse within the WDT_INTERVAL | 318 | /* If we got a heartbeat pulse within the WDT_INTERVAL |
224 | * we agree to ping the WDT */ | 319 | * we agree to ping the WDT */ |
225 | if(time_before(jiffies, next_heartbeat)) { | 320 | if(time_before(jiffies, pcwd_private.next_heartbeat)) { |
226 | /* Ping the watchdog */ | 321 | /* Ping the watchdog */ |
227 | spin_lock(&io_lock); | 322 | spin_lock(&pcwd_private.io_lock); |
228 | if (revision == PCWD_REVISION_A) { | 323 | if (pcwd_private.revision == PCWD_REVISION_A) { |
229 | /* Rev A cards are reset by setting the WD_WDRST bit in register 1 */ | 324 | /* Rev A cards are reset by setting the WD_WDRST bit in register 1 */ |
230 | wdrst_stat = inb_p(current_readport); | 325 | wdrst_stat = inb_p(pcwd_private.io_addr); |
231 | wdrst_stat &= 0x0F; | 326 | wdrst_stat &= 0x0F; |
232 | wdrst_stat |= WD_WDRST; | 327 | wdrst_stat |= WD_WDRST; |
233 | 328 | ||
234 | outb_p(wdrst_stat, current_readport + 1); | 329 | outb_p(wdrst_stat, pcwd_private.io_addr + 1); |
235 | } else { | 330 | } else { |
236 | /* Re-trigger watchdog by writing to port 0 */ | 331 | /* Re-trigger watchdog by writing to port 0 */ |
237 | outb_p(0x00, current_readport); | 332 | outb_p(0x00, pcwd_private.io_addr); |
238 | } | 333 | } |
239 | 334 | ||
240 | /* Re-set the timer interval */ | 335 | /* Re-set the timer interval */ |
241 | mod_timer(&timer, jiffies + WDT_INTERVAL); | 336 | mod_timer(&pcwd_private.timer, jiffies + WDT_INTERVAL); |
242 | 337 | ||
243 | spin_unlock(&io_lock); | 338 | spin_unlock(&pcwd_private.io_lock); |
244 | } else { | 339 | } else { |
245 | printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); | 340 | printk(KERN_WARNING PFX "Heartbeat lost! Will not ping the watchdog\n"); |
246 | } | 341 | } |
@@ -250,19 +345,19 @@ static int pcwd_start(void) | |||
250 | { | 345 | { |
251 | int stat_reg; | 346 | int stat_reg; |
252 | 347 | ||
253 | next_heartbeat = jiffies + (heartbeat * HZ); | 348 | pcwd_private.next_heartbeat = jiffies + (heartbeat * HZ); |
254 | 349 | ||
255 | /* Start the timer */ | 350 | /* Start the timer */ |
256 | mod_timer(&timer, jiffies + WDT_INTERVAL); | 351 | mod_timer(&pcwd_private.timer, jiffies + WDT_INTERVAL); |
257 | 352 | ||
258 | /* Enable the port */ | 353 | /* Enable the port */ |
259 | if (revision == PCWD_REVISION_C) { | 354 | if (pcwd_private.revision == PCWD_REVISION_C) { |
260 | spin_lock(&io_lock); | 355 | spin_lock(&pcwd_private.io_lock); |
261 | outb_p(0x00, current_readport + 3); | 356 | outb_p(0x00, pcwd_private.io_addr + 3); |
262 | udelay(ISA_COMMAND_TIMEOUT); | 357 | udelay(ISA_COMMAND_TIMEOUT); |
263 | stat_reg = inb_p(current_readport + 2); | 358 | stat_reg = inb_p(pcwd_private.io_addr + 2); |
264 | spin_unlock(&io_lock); | 359 | spin_unlock(&pcwd_private.io_lock); |
265 | if (stat_reg & 0x10) { | 360 | if (stat_reg & WD_WDIS) { |
266 | printk(KERN_INFO PFX "Could not start watchdog\n"); | 361 | printk(KERN_INFO PFX "Could not start watchdog\n"); |
267 | return -EIO; | 362 | return -EIO; |
268 | } | 363 | } |
@@ -275,18 +370,18 @@ static int pcwd_stop(void) | |||
275 | int stat_reg; | 370 | int stat_reg; |
276 | 371 | ||
277 | /* Stop the timer */ | 372 | /* Stop the timer */ |
278 | del_timer(&timer); | 373 | del_timer(&pcwd_private.timer); |
279 | 374 | ||
280 | /* Disable the board */ | 375 | /* Disable the board */ |
281 | if (revision == PCWD_REVISION_C) { | 376 | if (pcwd_private.revision == PCWD_REVISION_C) { |
282 | spin_lock(&io_lock); | 377 | spin_lock(&pcwd_private.io_lock); |
283 | outb_p(0xA5, current_readport + 3); | 378 | outb_p(0xA5, pcwd_private.io_addr + 3); |
284 | udelay(ISA_COMMAND_TIMEOUT); | 379 | udelay(ISA_COMMAND_TIMEOUT); |
285 | outb_p(0xA5, current_readport + 3); | 380 | outb_p(0xA5, pcwd_private.io_addr + 3); |
286 | udelay(ISA_COMMAND_TIMEOUT); | 381 | udelay(ISA_COMMAND_TIMEOUT); |
287 | stat_reg = inb_p(current_readport + 2); | 382 | stat_reg = inb_p(pcwd_private.io_addr + 2); |
288 | spin_unlock(&io_lock); | 383 | spin_unlock(&pcwd_private.io_lock); |
289 | if ((stat_reg & 0x10) == 0) { | 384 | if ((stat_reg & WD_WDIS) == 0) { |
290 | printk(KERN_INFO PFX "Could not stop watchdog\n"); | 385 | printk(KERN_INFO PFX "Could not stop watchdog\n"); |
291 | return -EIO; | 386 | return -EIO; |
292 | } | 387 | } |
@@ -297,7 +392,7 @@ static int pcwd_stop(void) | |||
297 | static int pcwd_keepalive(void) | 392 | static int pcwd_keepalive(void) |
298 | { | 393 | { |
299 | /* user land ping */ | 394 | /* user land ping */ |
300 | next_heartbeat = jiffies + (heartbeat * HZ); | 395 | pcwd_private.next_heartbeat = jiffies + (heartbeat * HZ); |
301 | return 0; | 396 | return 0; |
302 | } | 397 | } |
303 | 398 | ||
@@ -315,23 +410,23 @@ static int pcwd_get_status(int *status) | |||
315 | int card_status; | 410 | int card_status; |
316 | 411 | ||
317 | *status=0; | 412 | *status=0; |
318 | spin_lock(&io_lock); | 413 | spin_lock(&pcwd_private.io_lock); |
319 | if (revision == PCWD_REVISION_A) | 414 | if (pcwd_private.revision == PCWD_REVISION_A) |
320 | /* Rev A cards return status information from | 415 | /* Rev A cards return status information from |
321 | * the base register, which is used for the | 416 | * the base register, which is used for the |
322 | * temperature in other cards. */ | 417 | * temperature in other cards. */ |
323 | card_status = inb(current_readport); | 418 | card_status = inb(pcwd_private.io_addr); |
324 | else { | 419 | else { |
325 | /* Rev C cards return card status in the base | 420 | /* Rev C cards return card status in the base |
326 | * address + 1 register. And use different bits | 421 | * address + 1 register. And use different bits |
327 | * to indicate a card initiated reset, and an | 422 | * to indicate a card initiated reset, and an |
328 | * over-temperature condition. And the reboot | 423 | * over-temperature condition. And the reboot |
329 | * status can be reset. */ | 424 | * status can be reset. */ |
330 | card_status = inb(current_readport + 1); | 425 | card_status = inb(pcwd_private.io_addr + 1); |
331 | } | 426 | } |
332 | spin_unlock(&io_lock); | 427 | spin_unlock(&pcwd_private.io_lock); |
333 | 428 | ||
334 | if (revision == PCWD_REVISION_A) { | 429 | if (pcwd_private.revision == PCWD_REVISION_A) { |
335 | if (card_status & WD_WDRST) | 430 | if (card_status & WD_WDRST) |
336 | *status |= WDIOF_CARDRESET; | 431 | *status |= WDIOF_CARDRESET; |
337 | 432 | ||
@@ -360,10 +455,10 @@ static int pcwd_get_status(int *status) | |||
360 | 455 | ||
361 | static int pcwd_clear_status(void) | 456 | static int pcwd_clear_status(void) |
362 | { | 457 | { |
363 | if (revision == PCWD_REVISION_C) { | 458 | if (pcwd_private.revision == PCWD_REVISION_C) { |
364 | spin_lock(&io_lock); | 459 | spin_lock(&pcwd_private.io_lock); |
365 | outb_p(0x00, current_readport + 1); /* clear reset status */ | 460 | outb_p(0x00, pcwd_private.io_addr + 1); /* clear reset status */ |
366 | spin_unlock(&io_lock); | 461 | spin_unlock(&pcwd_private.io_lock); |
367 | } | 462 | } |
368 | return 0; | 463 | return 0; |
369 | } | 464 | } |
@@ -371,20 +466,20 @@ static int pcwd_clear_status(void) | |||
371 | static int pcwd_get_temperature(int *temperature) | 466 | static int pcwd_get_temperature(int *temperature) |
372 | { | 467 | { |
373 | /* check that port 0 gives temperature info and no command results */ | 468 | /* check that port 0 gives temperature info and no command results */ |
374 | if (command_mode) | 469 | if (pcwd_private.command_mode) |
375 | return -1; | 470 | return -1; |
376 | 471 | ||
377 | *temperature = 0; | 472 | *temperature = 0; |
378 | if (!supports_temp) | 473 | if (!pcwd_private.supports_temp) |
379 | return -ENODEV; | 474 | return -ENODEV; |
380 | 475 | ||
381 | /* | 476 | /* |
382 | * Convert celsius to fahrenheit, since this was | 477 | * Convert celsius to fahrenheit, since this was |
383 | * the decided 'standard' for this return value. | 478 | * the decided 'standard' for this return value. |
384 | */ | 479 | */ |
385 | spin_lock(&io_lock); | 480 | spin_lock(&pcwd_private.io_lock); |
386 | *temperature = ((inb(current_readport)) * 9 / 5) + 32; | 481 | *temperature = ((inb(pcwd_private.io_addr)) * 9 / 5) + 32; |
387 | spin_unlock(&io_lock); | 482 | spin_unlock(&pcwd_private.io_lock); |
388 | 483 | ||
389 | return 0; | 484 | return 0; |
390 | } | 485 | } |
@@ -425,7 +520,7 @@ static int pcwd_ioctl(struct inode *inode, struct file *file, | |||
425 | return put_user(status, argp); | 520 | return put_user(status, argp); |
426 | 521 | ||
427 | case WDIOC_GETBOOTSTATUS: | 522 | case WDIOC_GETBOOTSTATUS: |
428 | return put_user(initial_status, argp); | 523 | return put_user(pcwd_private.boot_status, argp); |
429 | 524 | ||
430 | case WDIOC_GETTEMP: | 525 | case WDIOC_GETTEMP: |
431 | if (pcwd_get_temperature(&temperature)) | 526 | if (pcwd_get_temperature(&temperature)) |
@@ -434,7 +529,7 @@ static int pcwd_ioctl(struct inode *inode, struct file *file, | |||
434 | return put_user(temperature, argp); | 529 | return put_user(temperature, argp); |
435 | 530 | ||
436 | case WDIOC_SETOPTIONS: | 531 | case WDIOC_SETOPTIONS: |
437 | if (revision == PCWD_REVISION_C) | 532 | if (pcwd_private.revision == PCWD_REVISION_C) |
438 | { | 533 | { |
439 | if(copy_from_user(&rv, argp, sizeof(int))) | 534 | if(copy_from_user(&rv, argp, sizeof(int))) |
440 | return -EFAULT; | 535 | return -EFAULT; |
@@ -550,7 +645,7 @@ static ssize_t pcwd_temp_read(struct file *file, char __user *buf, size_t count, | |||
550 | 645 | ||
551 | static int pcwd_temp_open(struct inode *inode, struct file *file) | 646 | static int pcwd_temp_open(struct inode *inode, struct file *file) |
552 | { | 647 | { |
553 | if (!supports_temp) | 648 | if (!pcwd_private.supports_temp) |
554 | return -ENODEV; | 649 | return -ENODEV; |
555 | 650 | ||
556 | return nonseekable_open(inode, file); | 651 | return nonseekable_open(inode, file); |
@@ -616,68 +711,24 @@ static struct notifier_block pcwd_notifier = { | |||
616 | * Init & exit routines | 711 | * Init & exit routines |
617 | */ | 712 | */ |
618 | 713 | ||
619 | static inline void get_support(void) | ||
620 | { | ||
621 | if (inb(current_readport) != 0xF0) | ||
622 | supports_temp = 1; | ||
623 | } | ||
624 | |||
625 | static inline int get_revision(void) | 714 | static inline int get_revision(void) |
626 | { | 715 | { |
627 | int r = PCWD_REVISION_C; | 716 | int r = PCWD_REVISION_C; |
628 | 717 | ||
629 | spin_lock(&io_lock); | 718 | spin_lock(&pcwd_private.io_lock); |
630 | /* REV A cards use only 2 io ports; test | 719 | /* REV A cards use only 2 io ports; test |
631 | * presumes a floating bus reads as 0xff. */ | 720 | * presumes a floating bus reads as 0xff. */ |
632 | if ((inb(current_readport + 2) == 0xFF) || | 721 | if ((inb(pcwd_private.io_addr + 2) == 0xFF) || |
633 | (inb(current_readport + 3) == 0xFF)) | 722 | (inb(pcwd_private.io_addr + 3) == 0xFF)) |
634 | r=PCWD_REVISION_A; | 723 | r=PCWD_REVISION_A; |
635 | spin_unlock(&io_lock); | 724 | spin_unlock(&pcwd_private.io_lock); |
636 | 725 | ||
637 | return r; | 726 | return r; |
638 | } | 727 | } |
639 | 728 | ||
640 | static inline char *get_firmware(void) | ||
641 | { | ||
642 | int one, ten, hund, minor; | ||
643 | char *ret; | ||
644 | |||
645 | ret = kmalloc(6, GFP_KERNEL); | ||
646 | if(ret == NULL) | ||
647 | return NULL; | ||
648 | |||
649 | if (set_command_mode()) { | ||
650 | one = send_isa_command(CMD_ISA_VERSION_INTEGER); | ||
651 | ten = send_isa_command(CMD_ISA_VERSION_TENTH); | ||
652 | hund = send_isa_command(CMD_ISA_VERSION_HUNDRETH); | ||
653 | minor = send_isa_command(CMD_ISA_VERSION_MINOR); | ||
654 | sprintf(ret, "%c.%c%c%c", one, ten, hund, minor); | ||
655 | } | ||
656 | else | ||
657 | sprintf(ret, "ERROR"); | ||
658 | |||
659 | unset_command_mode(); | ||
660 | return(ret); | ||
661 | } | ||
662 | |||
663 | static inline int get_option_switches(void) | ||
664 | { | ||
665 | int rv=0; | ||
666 | |||
667 | if (set_command_mode()) { | ||
668 | /* Get switch settings */ | ||
669 | rv = send_isa_command(CMD_ISA_SWITCH_SETTINGS); | ||
670 | } | ||
671 | |||
672 | unset_command_mode(); | ||
673 | return(rv); | ||
674 | } | ||
675 | |||
676 | static int __devinit pcwatchdog_init(int base_addr) | 729 | static int __devinit pcwatchdog_init(int base_addr) |
677 | { | 730 | { |
678 | int ret; | 731 | int ret; |
679 | char *firmware; | ||
680 | int option_switches; | ||
681 | 732 | ||
682 | cards_found++; | 733 | cards_found++; |
683 | if (cards_found == 1) | 734 | if (cards_found == 1) |
@@ -692,104 +743,66 @@ static int __devinit pcwatchdog_init(int base_addr) | |||
692 | printk(KERN_ERR PFX "No I/O-Address for card detected\n"); | 743 | printk(KERN_ERR PFX "No I/O-Address for card detected\n"); |
693 | return -ENODEV; | 744 | return -ENODEV; |
694 | } | 745 | } |
695 | current_readport = base_addr; | 746 | pcwd_private.io_addr = base_addr; |
696 | 747 | ||
697 | /* Check card's revision */ | 748 | /* Check card's revision */ |
698 | revision = get_revision(); | 749 | pcwd_private.revision = get_revision(); |
699 | 750 | ||
700 | if (!request_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4, "PCWD")) { | 751 | if (!request_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4, "PCWD")) { |
701 | printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", | 752 | printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", |
702 | current_readport); | 753 | pcwd_private.io_addr); |
703 | current_readport = 0x0000; | 754 | pcwd_private.io_addr = 0x0000; |
704 | return -EIO; | 755 | return -EIO; |
705 | } | 756 | } |
706 | 757 | ||
707 | /* Initial variables */ | 758 | /* Initial variables */ |
708 | supports_temp = 0; | 759 | pcwd_private.supports_temp = 0; |
709 | temp_panic = 0; | 760 | temp_panic = 0; |
710 | initial_status = 0x0000; | 761 | pcwd_private.boot_status = 0x0000; |
711 | 762 | ||
712 | /* get the boot_status */ | 763 | /* get the boot_status */ |
713 | pcwd_get_status(&initial_status); | 764 | pcwd_get_status(&pcwd_private.boot_status); |
714 | 765 | ||
715 | /* clear the "card caused reboot" flag */ | 766 | /* clear the "card caused reboot" flag */ |
716 | pcwd_clear_status(); | 767 | pcwd_clear_status(); |
717 | 768 | ||
718 | init_timer(&timer); | 769 | init_timer(&pcwd_private.timer); |
719 | timer.function = pcwd_timer_ping; | 770 | pcwd_private.timer.function = pcwd_timer_ping; |
720 | timer.data = 0; | 771 | pcwd_private.timer.data = 0; |
721 | 772 | ||
722 | /* Disable the board */ | 773 | /* Disable the board */ |
723 | pcwd_stop(); | 774 | pcwd_stop(); |
724 | 775 | ||
725 | /* Check whether or not the card supports the temperature device */ | 776 | /* Check whether or not the card supports the temperature device */ |
726 | get_support(); | 777 | pcwd_check_temperature_support(); |
727 | |||
728 | /* Get some extra info from the hardware (in command/debug/diag mode) */ | ||
729 | if (revision == PCWD_REVISION_A) | ||
730 | printk(KERN_INFO PFX "ISA-PC Watchdog (REV.A) detected at port 0x%04x\n", current_readport); | ||
731 | else if (revision == PCWD_REVISION_C) { | ||
732 | firmware = get_firmware(); | ||
733 | printk(KERN_INFO PFX "ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n", | ||
734 | current_readport, firmware); | ||
735 | kfree(firmware); | ||
736 | option_switches = get_option_switches(); | ||
737 | printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", | ||
738 | option_switches, | ||
739 | ((option_switches & 0x10) ? "ON" : "OFF"), | ||
740 | ((option_switches & 0x08) ? "ON" : "OFF")); | ||
741 | |||
742 | /* Reprogram internal heartbeat to 2 seconds */ | ||
743 | if (set_command_mode()) { | ||
744 | send_isa_command(CMD_ISA_DELAY_TIME_2SECS); | ||
745 | unset_command_mode(); | ||
746 | } | ||
747 | } else { | ||
748 | /* Should NEVER happen, unless get_revision() fails. */ | ||
749 | printk(KERN_INFO PFX "Unable to get revision\n"); | ||
750 | release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); | ||
751 | current_readport = 0x0000; | ||
752 | return -1; | ||
753 | } | ||
754 | 778 | ||
755 | if (supports_temp) | 779 | /* Show info about the card itself */ |
756 | printk(KERN_INFO PFX "Temperature Option Detected\n"); | 780 | pcwd_show_card_info(); |
757 | |||
758 | if (initial_status & WDIOF_CARDRESET) | ||
759 | printk(KERN_INFO PFX "Previous reboot was caused by the card\n"); | ||
760 | |||
761 | if (initial_status & WDIOF_OVERHEAT) { | ||
762 | printk(KERN_EMERG PFX "Card senses a CPU Overheat. Panicking!\n"); | ||
763 | printk(KERN_EMERG PFX "CPU Overheat\n"); | ||
764 | } | ||
765 | |||
766 | if (initial_status == 0) | ||
767 | printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n"); | ||
768 | 781 | ||
769 | /* Check that the heartbeat value is within it's range ; if not reset to the default */ | 782 | /* Check that the heartbeat value is within it's range ; if not reset to the default */ |
770 | if (pcwd_set_heartbeat(heartbeat)) { | 783 | if (pcwd_set_heartbeat(heartbeat)) { |
771 | pcwd_set_heartbeat(WATCHDOG_HEARTBEAT); | 784 | pcwd_set_heartbeat(WATCHDOG_HEARTBEAT); |
772 | printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n", | 785 | printk(KERN_INFO PFX "heartbeat value must be 2<=heartbeat<=7200, using %d\n", |
773 | WATCHDOG_HEARTBEAT); | 786 | WATCHDOG_HEARTBEAT); |
774 | } | 787 | } |
775 | 788 | ||
776 | ret = register_reboot_notifier(&pcwd_notifier); | 789 | ret = register_reboot_notifier(&pcwd_notifier); |
777 | if (ret) { | 790 | if (ret) { |
778 | printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", | 791 | printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", |
779 | ret); | 792 | ret); |
780 | release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); | 793 | release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); |
781 | current_readport = 0x0000; | 794 | pcwd_private.io_addr = 0x0000; |
782 | return ret; | 795 | return ret; |
783 | } | 796 | } |
784 | 797 | ||
785 | if (supports_temp) { | 798 | if (pcwd_private.supports_temp) { |
786 | ret = misc_register(&temp_miscdev); | 799 | ret = misc_register(&temp_miscdev); |
787 | if (ret) { | 800 | if (ret) { |
788 | printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | 801 | printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", |
789 | TEMP_MINOR, ret); | 802 | TEMP_MINOR, ret); |
790 | unregister_reboot_notifier(&pcwd_notifier); | 803 | unregister_reboot_notifier(&pcwd_notifier); |
791 | release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); | 804 | release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); |
792 | current_readport = 0x0000; | 805 | pcwd_private.io_addr = 0x0000; |
793 | return ret; | 806 | return ret; |
794 | } | 807 | } |
795 | } | 808 | } |
@@ -798,11 +811,11 @@ static int __devinit pcwatchdog_init(int base_addr) | |||
798 | if (ret) { | 811 | if (ret) { |
799 | printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | 812 | printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", |
800 | WATCHDOG_MINOR, ret); | 813 | WATCHDOG_MINOR, ret); |
801 | if (supports_temp) | 814 | if (pcwd_private.supports_temp) |
802 | misc_deregister(&temp_miscdev); | 815 | misc_deregister(&temp_miscdev); |
803 | unregister_reboot_notifier(&pcwd_notifier); | 816 | unregister_reboot_notifier(&pcwd_notifier); |
804 | release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); | 817 | release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); |
805 | current_readport = 0x0000; | 818 | pcwd_private.io_addr = 0x0000; |
806 | return ret; | 819 | return ret; |
807 | } | 820 | } |
808 | 821 | ||
@@ -820,11 +833,12 @@ static void __devexit pcwatchdog_exit(void) | |||
820 | 833 | ||
821 | /* Deregister */ | 834 | /* Deregister */ |
822 | misc_deregister(&pcwd_miscdev); | 835 | misc_deregister(&pcwd_miscdev); |
823 | if (supports_temp) | 836 | if (pcwd_private.supports_temp) |
824 | misc_deregister(&temp_miscdev); | 837 | misc_deregister(&temp_miscdev); |
825 | unregister_reboot_notifier(&pcwd_notifier); | 838 | unregister_reboot_notifier(&pcwd_notifier); |
826 | release_region(current_readport, (revision == PCWD_REVISION_A) ? 2 : 4); | 839 | release_region(pcwd_private.io_addr, (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); |
827 | current_readport = 0x0000; | 840 | pcwd_private.io_addr = 0x0000; |
841 | cards_found--; | ||
828 | } | 842 | } |
829 | 843 | ||
830 | /* | 844 | /* |
@@ -887,7 +901,7 @@ static int __init pcwd_init_module(void) | |||
887 | { | 901 | { |
888 | int i, found = 0; | 902 | int i, found = 0; |
889 | 903 | ||
890 | spin_lock_init(&io_lock); | 904 | spin_lock_init(&pcwd_private.io_lock); |
891 | 905 | ||
892 | for (i = 0; pcwd_ioports[i] != 0; i++) { | 906 | for (i = 0; pcwd_ioports[i] != 0; i++) { |
893 | if (pcwd_checkcard(pcwd_ioports[i])) { | 907 | if (pcwd_checkcard(pcwd_ioports[i])) { |
@@ -906,7 +920,7 @@ static int __init pcwd_init_module(void) | |||
906 | 920 | ||
907 | static void __exit pcwd_cleanup_module(void) | 921 | static void __exit pcwd_cleanup_module(void) |
908 | { | 922 | { |
909 | if (current_readport) | 923 | if (pcwd_private.io_addr) |
910 | pcwatchdog_exit(); | 924 | pcwatchdog_exit(); |
911 | return; | 925 | return; |
912 | } | 926 | } |
diff --git a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c index b474ea52d6e8..522a9370db94 100644 --- a/drivers/char/watchdog/sa1100_wdt.c +++ b/drivers/char/watchdog/sa1100_wdt.c | |||
@@ -93,23 +93,25 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file, | |||
93 | { | 93 | { |
94 | int ret = -ENOIOCTLCMD; | 94 | int ret = -ENOIOCTLCMD; |
95 | int time; | 95 | int time; |
96 | void __user *argp = (void __user *)arg; | ||
97 | int __user *p = argp; | ||
96 | 98 | ||
97 | switch (cmd) { | 99 | switch (cmd) { |
98 | case WDIOC_GETSUPPORT: | 100 | case WDIOC_GETSUPPORT: |
99 | ret = copy_to_user((struct watchdog_info __user *)arg, &ident, | 101 | ret = copy_to_user(argp, &ident, |
100 | sizeof(ident)) ? -EFAULT : 0; | 102 | sizeof(ident)) ? -EFAULT : 0; |
101 | break; | 103 | break; |
102 | 104 | ||
103 | case WDIOC_GETSTATUS: | 105 | case WDIOC_GETSTATUS: |
104 | ret = put_user(0, (int __user *)arg); | 106 | ret = put_user(0, p); |
105 | break; | 107 | break; |
106 | 108 | ||
107 | case WDIOC_GETBOOTSTATUS: | 109 | case WDIOC_GETBOOTSTATUS: |
108 | ret = put_user(boot_status, (int __user *)arg); | 110 | ret = put_user(boot_status, p); |
109 | break; | 111 | break; |
110 | 112 | ||
111 | case WDIOC_SETTIMEOUT: | 113 | case WDIOC_SETTIMEOUT: |
112 | ret = get_user(time, (int __user *)arg); | 114 | ret = get_user(time, p); |
113 | if (ret) | 115 | if (ret) |
114 | break; | 116 | break; |
115 | 117 | ||
@@ -123,7 +125,7 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file, | |||
123 | /*fall through*/ | 125 | /*fall through*/ |
124 | 126 | ||
125 | case WDIOC_GETTIMEOUT: | 127 | case WDIOC_GETTIMEOUT: |
126 | ret = put_user(pre_margin / OSCR_FREQ, (int __user *)arg); | 128 | ret = put_user(pre_margin / OSCR_FREQ, p); |
127 | break; | 129 | break; |
128 | 130 | ||
129 | case WDIOC_KEEPALIVE: | 131 | case WDIOC_KEEPALIVE: |
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index 3c128b692bce..ec6f2a48895b 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -590,6 +590,7 @@ static struct pcmcia_device_id orinoco_cs_ids[] = { | |||
590 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PC CARD HARMONY 80211B", 0xc6536a5e, 0x090c3cd9), | 590 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PC CARD HARMONY 80211B", 0xc6536a5e, 0x090c3cd9), |
591 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26), | 591 | PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26), |
592 | PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b), | 592 | PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b), |
593 | PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2532W-B EliteConnect Wireless Adapter", 0xc4f8b18b, 0x196bd757), | ||
593 | PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2632W", 0xc4f8b18b, 0x474a1f2a), | 594 | PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2632W", 0xc4f8b18b, 0x474a1f2a), |
594 | PCMCIA_DEVICE_PROD_ID12("Symbol Technologies", "LA4111 Spectrum24 Wireless LAN PC Card", 0x3f02b4d6, 0x3663cb0e), | 595 | PCMCIA_DEVICE_PROD_ID12("Symbol Technologies", "LA4111 Spectrum24 Wireless LAN PC Card", 0x3f02b4d6, 0x3663cb0e), |
595 | PCMCIA_DEVICE_PROD_ID123("The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", 0xa5f472c2, 0x590eb502, 0xc9049a39), | 596 | PCMCIA_DEVICE_PROD_ID123("The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", 0xa5f472c2, 0x590eb502, 0xc9049a39), |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index ceb0e474fde4..4138564402b8 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
@@ -85,11 +85,10 @@ static volatile enum sclp_mask_state_t { | |||
85 | /* Maximum retry counts */ | 85 | /* Maximum retry counts */ |
86 | #define SCLP_INIT_RETRY 3 | 86 | #define SCLP_INIT_RETRY 3 |
87 | #define SCLP_MASK_RETRY 3 | 87 | #define SCLP_MASK_RETRY 3 |
88 | #define SCLP_REQUEST_RETRY 3 | ||
89 | 88 | ||
90 | /* Timeout intervals in seconds.*/ | 89 | /* Timeout intervals in seconds.*/ |
91 | #define SCLP_BUSY_INTERVAL 2 | 90 | #define SCLP_BUSY_INTERVAL 10 |
92 | #define SCLP_RETRY_INTERVAL 5 | 91 | #define SCLP_RETRY_INTERVAL 15 |
93 | 92 | ||
94 | static void sclp_process_queue(void); | 93 | static void sclp_process_queue(void); |
95 | static int sclp_init_mask(int calculate); | 94 | static int sclp_init_mask(int calculate); |
@@ -153,11 +152,9 @@ __sclp_start_request(struct sclp_req *req) | |||
153 | if (sclp_running_state != sclp_running_state_idle) | 152 | if (sclp_running_state != sclp_running_state_idle) |
154 | return 0; | 153 | return 0; |
155 | del_timer(&sclp_request_timer); | 154 | del_timer(&sclp_request_timer); |
156 | if (req->start_count <= SCLP_REQUEST_RETRY) { | 155 | rc = service_call(req->command, req->sccb); |
157 | rc = service_call(req->command, req->sccb); | 156 | req->start_count++; |
158 | req->start_count++; | 157 | |
159 | } else | ||
160 | rc = -EIO; | ||
161 | if (rc == 0) { | 158 | if (rc == 0) { |
162 | /* Sucessfully started request */ | 159 | /* Sucessfully started request */ |
163 | req->status = SCLP_REQ_RUNNING; | 160 | req->status = SCLP_REQ_RUNNING; |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 92be75d99a56..8cf9905d484b 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -232,7 +232,7 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) | |||
232 | return 0; | 232 | return 0; |
233 | 233 | ||
234 | mask = 0x80 >> j; | 234 | mask = 0x80 >> j; |
235 | spin_lock(&sch->lock); | 235 | spin_lock_irq(&sch->lock); |
236 | 236 | ||
237 | stsch(sch->schid, &schib); | 237 | stsch(sch->schid, &schib); |
238 | if (!schib.pmcw.dnv) | 238 | if (!schib.pmcw.dnv) |
@@ -281,10 +281,10 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) | |||
281 | if (sch->driver && sch->driver->verify) | 281 | if (sch->driver && sch->driver->verify) |
282 | sch->driver->verify(&sch->dev); | 282 | sch->driver->verify(&sch->dev); |
283 | out_unlock: | 283 | out_unlock: |
284 | spin_unlock(&sch->lock); | 284 | spin_unlock_irq(&sch->lock); |
285 | return 0; | 285 | return 0; |
286 | out_unreg: | 286 | out_unreg: |
287 | spin_unlock(&sch->lock); | 287 | spin_unlock_irq(&sch->lock); |
288 | sch->lpm = 0; | 288 | sch->lpm = 0; |
289 | if (css_enqueue_subchannel_slow(sch->schid)) { | 289 | if (css_enqueue_subchannel_slow(sch->schid)) { |
290 | css_clear_subchannel_slow_list(); | 290 | css_clear_subchannel_slow_list(); |
@@ -652,7 +652,7 @@ __chp_add(struct subchannel_id schid, void *data) | |||
652 | if (!sch) | 652 | if (!sch) |
653 | /* Check if the subchannel is now available. */ | 653 | /* Check if the subchannel is now available. */ |
654 | return __chp_add_new_sch(schid); | 654 | return __chp_add_new_sch(schid); |
655 | spin_lock(&sch->lock); | 655 | spin_lock_irq(&sch->lock); |
656 | for (i=0; i<8; i++) | 656 | for (i=0; i<8; i++) |
657 | if (sch->schib.pmcw.chpid[i] == chp->id) { | 657 | if (sch->schib.pmcw.chpid[i] == chp->id) { |
658 | if (stsch(sch->schid, &sch->schib) != 0) { | 658 | if (stsch(sch->schid, &sch->schib) != 0) { |
@@ -674,7 +674,7 @@ __chp_add(struct subchannel_id schid, void *data) | |||
674 | if (sch->driver && sch->driver->verify) | 674 | if (sch->driver && sch->driver->verify) |
675 | sch->driver->verify(&sch->dev); | 675 | sch->driver->verify(&sch->dev); |
676 | 676 | ||
677 | spin_unlock(&sch->lock); | 677 | spin_unlock_irq(&sch->lock); |
678 | put_device(&sch->dev); | 678 | put_device(&sch->dev); |
679 | return 0; | 679 | return 0; |
680 | } | 680 | } |
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 24a54a5a91b8..1c2ab3dede71 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -211,7 +211,6 @@ static struct scsi_host_template ahci_sht = { | |||
211 | .can_queue = ATA_DEF_QUEUE, | 211 | .can_queue = ATA_DEF_QUEUE, |
212 | .this_id = ATA_SHT_THIS_ID, | 212 | .this_id = ATA_SHT_THIS_ID, |
213 | .sg_tablesize = AHCI_MAX_SG, | 213 | .sg_tablesize = AHCI_MAX_SG, |
214 | .max_sectors = ATA_MAX_SECTORS, | ||
215 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 214 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
216 | .emulated = ATA_SHT_EMULATED, | 215 | .emulated = ATA_SHT_EMULATED, |
217 | .use_clustering = AHCI_USE_CLUSTERING, | 216 | .use_clustering = AHCI_USE_CLUSTERING, |
@@ -617,7 +616,8 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) | |||
617 | ata_tf_to_fis(&qc->tf, pp->cmd_tbl, 0); | 616 | ata_tf_to_fis(&qc->tf, pp->cmd_tbl, 0); |
618 | if (is_atapi) { | 617 | if (is_atapi) { |
619 | memset(pp->cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32); | 618 | memset(pp->cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32); |
620 | memcpy(pp->cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, ap->cdb_len); | 619 | memcpy(pp->cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, |
620 | qc->dev->cdb_len); | ||
621 | } | 621 | } |
622 | 622 | ||
623 | n_elem = 0; | 623 | n_elem = 0; |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 4933ba284885..4cc1108f721a 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -185,7 +185,6 @@ static struct scsi_host_template piix_sht = { | |||
185 | .can_queue = ATA_DEF_QUEUE, | 185 | .can_queue = ATA_DEF_QUEUE, |
186 | .this_id = ATA_SHT_THIS_ID, | 186 | .this_id = ATA_SHT_THIS_ID, |
187 | .sg_tablesize = LIBATA_MAX_PRD, | 187 | .sg_tablesize = LIBATA_MAX_PRD, |
188 | .max_sectors = ATA_MAX_SECTORS, | ||
189 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 188 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
190 | .emulated = ATA_SHT_EMULATED, | 189 | .emulated = ATA_SHT_EMULATED, |
191 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 190 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
@@ -415,9 +414,6 @@ static int piix_sata_probe (struct ata_port *ap) | |||
415 | int orig_mask, mask, i; | 414 | int orig_mask, mask, i; |
416 | u8 pcs; | 415 | u8 pcs; |
417 | 416 | ||
418 | mask = (PIIX_PORT_PRESENT << ap->hard_port_no) | | ||
419 | (PIIX_PORT_ENABLED << ap->hard_port_no); | ||
420 | |||
421 | pci_read_config_byte(pdev, ICH5_PCS, &pcs); | 417 | pci_read_config_byte(pdev, ICH5_PCS, &pcs); |
422 | orig_mask = (int) pcs & 0xff; | 418 | orig_mask = (int) pcs & 0xff; |
423 | 419 | ||
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index bfe0a00b1135..5ab220e9907c 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -520,6 +520,49 @@ void ata_dev_id_string(const u16 *id, unsigned char *s, | |||
520 | } | 520 | } |
521 | } | 521 | } |
522 | 522 | ||
523 | /** | ||
524 | * ata_dev_id_c_string - Convert IDENTIFY DEVICE page into C string | ||
525 | * @id: IDENTIFY DEVICE results we will examine | ||
526 | * @s: string into which data is output | ||
527 | * @ofs: offset into identify device page | ||
528 | * @len: length of string to return. must be an odd number. | ||
529 | * | ||
530 | * This function is identical to ata_dev_id_string except that it | ||
531 | * trims trailing spaces and terminates the resulting string with | ||
532 | * null. @len must be actual maximum length (even number) + 1. | ||
533 | * | ||
534 | * LOCKING: | ||
535 | * caller. | ||
536 | */ | ||
537 | void ata_dev_id_c_string(const u16 *id, unsigned char *s, | ||
538 | unsigned int ofs, unsigned int len) | ||
539 | { | ||
540 | unsigned char *p; | ||
541 | |||
542 | WARN_ON(!(len & 1)); | ||
543 | |||
544 | ata_dev_id_string(id, s, ofs, len - 1); | ||
545 | |||
546 | p = s + strnlen(s, len - 1); | ||
547 | while (p > s && p[-1] == ' ') | ||
548 | p--; | ||
549 | *p = '\0'; | ||
550 | } | ||
551 | |||
552 | static u64 ata_id_n_sectors(const u16 *id) | ||
553 | { | ||
554 | if (ata_id_has_lba(id)) { | ||
555 | if (ata_id_has_lba48(id)) | ||
556 | return ata_id_u64(id, 100); | ||
557 | else | ||
558 | return ata_id_u32(id, 60); | ||
559 | } else { | ||
560 | if (ata_id_current_chs_valid(id)) | ||
561 | return ata_id_u32(id, 57); | ||
562 | else | ||
563 | return id[1] * id[3] * id[6]; | ||
564 | } | ||
565 | } | ||
523 | 566 | ||
524 | /** | 567 | /** |
525 | * ata_noop_dev_select - Select device 0/1 on ATA bus | 568 | * ata_noop_dev_select - Select device 0/1 on ATA bus |
@@ -609,41 +652,41 @@ void ata_dev_select(struct ata_port *ap, unsigned int device, | |||
609 | 652 | ||
610 | /** | 653 | /** |
611 | * ata_dump_id - IDENTIFY DEVICE info debugging output | 654 | * ata_dump_id - IDENTIFY DEVICE info debugging output |
612 | * @dev: Device whose IDENTIFY DEVICE page we will dump | 655 | * @id: IDENTIFY DEVICE page to dump |
613 | * | 656 | * |
614 | * Dump selected 16-bit words from a detected device's | 657 | * Dump selected 16-bit words from the given IDENTIFY DEVICE |
615 | * IDENTIFY PAGE page. | 658 | * page. |
616 | * | 659 | * |
617 | * LOCKING: | 660 | * LOCKING: |
618 | * caller. | 661 | * caller. |
619 | */ | 662 | */ |
620 | 663 | ||
621 | static inline void ata_dump_id(const struct ata_device *dev) | 664 | static inline void ata_dump_id(const u16 *id) |
622 | { | 665 | { |
623 | DPRINTK("49==0x%04x " | 666 | DPRINTK("49==0x%04x " |
624 | "53==0x%04x " | 667 | "53==0x%04x " |
625 | "63==0x%04x " | 668 | "63==0x%04x " |
626 | "64==0x%04x " | 669 | "64==0x%04x " |
627 | "75==0x%04x \n", | 670 | "75==0x%04x \n", |
628 | dev->id[49], | 671 | id[49], |
629 | dev->id[53], | 672 | id[53], |
630 | dev->id[63], | 673 | id[63], |
631 | dev->id[64], | 674 | id[64], |
632 | dev->id[75]); | 675 | id[75]); |
633 | DPRINTK("80==0x%04x " | 676 | DPRINTK("80==0x%04x " |
634 | "81==0x%04x " | 677 | "81==0x%04x " |
635 | "82==0x%04x " | 678 | "82==0x%04x " |
636 | "83==0x%04x " | 679 | "83==0x%04x " |
637 | "84==0x%04x \n", | 680 | "84==0x%04x \n", |
638 | dev->id[80], | 681 | id[80], |
639 | dev->id[81], | 682 | id[81], |
640 | dev->id[82], | 683 | id[82], |
641 | dev->id[83], | 684 | id[83], |
642 | dev->id[84]); | 685 | id[84]); |
643 | DPRINTK("88==0x%04x " | 686 | DPRINTK("88==0x%04x " |
644 | "93==0x%04x\n", | 687 | "93==0x%04x\n", |
645 | dev->id[88], | 688 | id[88], |
646 | dev->id[93]); | 689 | id[93]); |
647 | } | 690 | } |
648 | 691 | ||
649 | /* | 692 | /* |
@@ -877,12 +920,11 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device) | |||
877 | { | 920 | { |
878 | struct ata_device *dev = &ap->device[device]; | 921 | struct ata_device *dev = &ap->device[device]; |
879 | unsigned int major_version; | 922 | unsigned int major_version; |
880 | u16 tmp; | ||
881 | unsigned long xfer_modes; | 923 | unsigned long xfer_modes; |
882 | unsigned int using_edd; | 924 | unsigned int using_edd; |
883 | struct ata_taskfile tf; | 925 | struct ata_taskfile tf; |
884 | unsigned int err_mask; | 926 | unsigned int err_mask; |
885 | int rc; | 927 | int i, rc; |
886 | 928 | ||
887 | if (!ata_dev_present(dev)) { | 929 | if (!ata_dev_present(dev)) { |
888 | DPRINTK("ENTER/EXIT (host %u, dev %u) -- nodev\n", | 930 | DPRINTK("ENTER/EXIT (host %u, dev %u) -- nodev\n", |
@@ -890,7 +932,8 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device) | |||
890 | return; | 932 | return; |
891 | } | 933 | } |
892 | 934 | ||
893 | if (ap->flags & (ATA_FLAG_SRST | ATA_FLAG_SATA_RESET)) | 935 | if (ap->ops->probe_reset || |
936 | ap->flags & (ATA_FLAG_SRST | ATA_FLAG_SATA_RESET)) | ||
894 | using_edd = 0; | 937 | using_edd = 0; |
895 | else | 938 | else |
896 | using_edd = 1; | 939 | using_edd = 1; |
@@ -970,18 +1013,17 @@ retry: | |||
970 | if (!xfer_modes) | 1013 | if (!xfer_modes) |
971 | xfer_modes = ata_pio_modes(dev); | 1014 | xfer_modes = ata_pio_modes(dev); |
972 | 1015 | ||
973 | ata_dump_id(dev); | 1016 | ata_dump_id(dev->id); |
974 | 1017 | ||
975 | /* ATA-specific feature tests */ | 1018 | /* ATA-specific feature tests */ |
976 | if (dev->class == ATA_DEV_ATA) { | 1019 | if (dev->class == ATA_DEV_ATA) { |
1020 | dev->n_sectors = ata_id_n_sectors(dev->id); | ||
1021 | |||
977 | if (!ata_id_is_ata(dev->id)) /* sanity check */ | 1022 | if (!ata_id_is_ata(dev->id)) /* sanity check */ |
978 | goto err_out_nosup; | 1023 | goto err_out_nosup; |
979 | 1024 | ||
980 | /* get major version */ | 1025 | /* get major version */ |
981 | tmp = dev->id[ATA_ID_MAJOR_VER]; | 1026 | major_version = ata_id_major_version(dev->id); |
982 | for (major_version = 14; major_version >= 1; major_version--) | ||
983 | if (tmp & (1 << major_version)) | ||
984 | break; | ||
985 | 1027 | ||
986 | /* | 1028 | /* |
987 | * The exact sequence expected by certain pre-ATA4 drives is: | 1029 | * The exact sequence expected by certain pre-ATA4 drives is: |
@@ -1003,12 +1045,8 @@ retry: | |||
1003 | if (ata_id_has_lba(dev->id)) { | 1045 | if (ata_id_has_lba(dev->id)) { |
1004 | dev->flags |= ATA_DFLAG_LBA; | 1046 | dev->flags |= ATA_DFLAG_LBA; |
1005 | 1047 | ||
1006 | if (ata_id_has_lba48(dev->id)) { | 1048 | if (ata_id_has_lba48(dev->id)) |
1007 | dev->flags |= ATA_DFLAG_LBA48; | 1049 | dev->flags |= ATA_DFLAG_LBA48; |
1008 | dev->n_sectors = ata_id_u64(dev->id, 100); | ||
1009 | } else { | ||
1010 | dev->n_sectors = ata_id_u32(dev->id, 60); | ||
1011 | } | ||
1012 | 1050 | ||
1013 | /* print device info to dmesg */ | 1051 | /* print device info to dmesg */ |
1014 | printk(KERN_INFO "ata%u: dev %u ATA-%d, max %s, %Lu sectors:%s\n", | 1052 | printk(KERN_INFO "ata%u: dev %u ATA-%d, max %s, %Lu sectors:%s\n", |
@@ -1024,15 +1062,12 @@ retry: | |||
1024 | dev->cylinders = dev->id[1]; | 1062 | dev->cylinders = dev->id[1]; |
1025 | dev->heads = dev->id[3]; | 1063 | dev->heads = dev->id[3]; |
1026 | dev->sectors = dev->id[6]; | 1064 | dev->sectors = dev->id[6]; |
1027 | dev->n_sectors = dev->cylinders * dev->heads * dev->sectors; | ||
1028 | 1065 | ||
1029 | if (ata_id_current_chs_valid(dev->id)) { | 1066 | if (ata_id_current_chs_valid(dev->id)) { |
1030 | /* Current CHS translation is valid. */ | 1067 | /* Current CHS translation is valid. */ |
1031 | dev->cylinders = dev->id[54]; | 1068 | dev->cylinders = dev->id[54]; |
1032 | dev->heads = dev->id[55]; | 1069 | dev->heads = dev->id[55]; |
1033 | dev->sectors = dev->id[56]; | 1070 | dev->sectors = dev->id[56]; |
1034 | |||
1035 | dev->n_sectors = ata_id_u32(dev->id, 57); | ||
1036 | } | 1071 | } |
1037 | 1072 | ||
1038 | /* print device info to dmesg */ | 1073 | /* print device info to dmesg */ |
@@ -1051,7 +1086,6 @@ retry: | |||
1051 | ap->id, device, dev->multi_count); | 1086 | ap->id, device, dev->multi_count); |
1052 | } | 1087 | } |
1053 | 1088 | ||
1054 | ap->host->max_cmd_len = 16; | ||
1055 | } | 1089 | } |
1056 | 1090 | ||
1057 | /* ATAPI-specific feature tests */ | 1091 | /* ATAPI-specific feature tests */ |
@@ -1064,8 +1098,7 @@ retry: | |||
1064 | printk(KERN_WARNING "ata%u: unsupported CDB len\n", ap->id); | 1098 | printk(KERN_WARNING "ata%u: unsupported CDB len\n", ap->id); |
1065 | goto err_out_nosup; | 1099 | goto err_out_nosup; |
1066 | } | 1100 | } |
1067 | ap->cdb_len = (unsigned int) rc; | 1101 | dev->cdb_len = (unsigned int) rc; |
1068 | ap->host->max_cmd_len = (unsigned char) ap->cdb_len; | ||
1069 | 1102 | ||
1070 | if (ata_id_cdb_intr(dev->id)) | 1103 | if (ata_id_cdb_intr(dev->id)) |
1071 | dev->flags |= ATA_DFLAG_CDB_INTR; | 1104 | dev->flags |= ATA_DFLAG_CDB_INTR; |
@@ -1076,6 +1109,12 @@ retry: | |||
1076 | ata_mode_string(xfer_modes)); | 1109 | ata_mode_string(xfer_modes)); |
1077 | } | 1110 | } |
1078 | 1111 | ||
1112 | ap->host->max_cmd_len = 0; | ||
1113 | for (i = 0; i < ATA_MAX_DEVICES; i++) | ||
1114 | ap->host->max_cmd_len = max_t(unsigned int, | ||
1115 | ap->host->max_cmd_len, | ||
1116 | ap->device[i].cdb_len); | ||
1117 | |||
1079 | DPRINTK("EXIT, drv_stat = 0x%x\n", ata_chk_status(ap)); | 1118 | DPRINTK("EXIT, drv_stat = 0x%x\n", ata_chk_status(ap)); |
1080 | return; | 1119 | return; |
1081 | 1120 | ||
@@ -1088,9 +1127,10 @@ err_out: | |||
1088 | } | 1127 | } |
1089 | 1128 | ||
1090 | 1129 | ||
1091 | static inline u8 ata_dev_knobble(const struct ata_port *ap) | 1130 | static inline u8 ata_dev_knobble(const struct ata_port *ap, |
1131 | struct ata_device *dev) | ||
1092 | { | 1132 | { |
1093 | return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device->id))); | 1133 | return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id))); |
1094 | } | 1134 | } |
1095 | 1135 | ||
1096 | /** | 1136 | /** |
@@ -1104,13 +1144,11 @@ static inline u8 ata_dev_knobble(const struct ata_port *ap) | |||
1104 | void ata_dev_config(struct ata_port *ap, unsigned int i) | 1144 | void ata_dev_config(struct ata_port *ap, unsigned int i) |
1105 | { | 1145 | { |
1106 | /* limit bridge transfers to udma5, 200 sectors */ | 1146 | /* limit bridge transfers to udma5, 200 sectors */ |
1107 | if (ata_dev_knobble(ap)) { | 1147 | if (ata_dev_knobble(ap, &ap->device[i])) { |
1108 | printk(KERN_INFO "ata%u(%u): applying bridge limits\n", | 1148 | printk(KERN_INFO "ata%u(%u): applying bridge limits\n", |
1109 | ap->id, ap->device->devno); | 1149 | ap->id, i); |
1110 | ap->udma_mask &= ATA_UDMA5; | 1150 | ap->udma_mask &= ATA_UDMA5; |
1111 | ap->host->max_sectors = ATA_MAX_SECTORS; | 1151 | ap->device[i].max_sectors = ATA_MAX_SECTORS; |
1112 | ap->host->hostt->max_sectors = ATA_MAX_SECTORS; | ||
1113 | ap->device[i].flags |= ATA_DFLAG_LOCK_SECTORS; | ||
1114 | } | 1152 | } |
1115 | 1153 | ||
1116 | if (ap->ops->dev_config) | 1154 | if (ap->ops->dev_config) |
@@ -1144,8 +1182,11 @@ static int ata_bus_probe(struct ata_port *ap) | |||
1144 | 1182 | ||
1145 | rc = ap->ops->probe_reset(ap, classes); | 1183 | rc = ap->ops->probe_reset(ap, classes); |
1146 | if (rc == 0) { | 1184 | if (rc == 0) { |
1147 | for (i = 0; i < ATA_MAX_DEVICES; i++) | 1185 | for (i = 0; i < ATA_MAX_DEVICES; i++) { |
1186 | if (classes[i] == ATA_DEV_UNKNOWN) | ||
1187 | classes[i] = ATA_DEV_NONE; | ||
1148 | ap->device[i].class = classes[i]; | 1188 | ap->device[i].class = classes[i]; |
1189 | } | ||
1149 | } else { | 1190 | } else { |
1150 | printk(KERN_ERR "ata%u: probe reset failed, " | 1191 | printk(KERN_ERR "ata%u: probe reset failed, " |
1151 | "disabling port\n", ap->id); | 1192 | "disabling port\n", ap->id); |
@@ -2272,24 +2313,14 @@ static const char * const ata_dma_blacklist [] = { | |||
2272 | 2313 | ||
2273 | static int ata_dma_blacklisted(const struct ata_device *dev) | 2314 | static int ata_dma_blacklisted(const struct ata_device *dev) |
2274 | { | 2315 | { |
2275 | unsigned char model_num[40]; | 2316 | unsigned char model_num[41]; |
2276 | char *s; | ||
2277 | unsigned int len; | ||
2278 | int i; | 2317 | int i; |
2279 | 2318 | ||
2280 | ata_dev_id_string(dev->id, model_num, ATA_ID_PROD_OFS, | 2319 | ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, |
2281 | sizeof(model_num)); | 2320 | sizeof(model_num)); |
2282 | s = &model_num[0]; | ||
2283 | len = strnlen(s, sizeof(model_num)); | ||
2284 | |||
2285 | /* ATAPI specifies that empty space is blank-filled; remove blanks */ | ||
2286 | while ((len > 0) && (s[len - 1] == ' ')) { | ||
2287 | len--; | ||
2288 | s[len] = 0; | ||
2289 | } | ||
2290 | 2321 | ||
2291 | for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++) | 2322 | for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++) |
2292 | if (!strncmp(ata_dma_blacklist[i], s, len)) | 2323 | if (!strcmp(ata_dma_blacklist[i], model_num)) |
2293 | return 1; | 2324 | return 1; |
2294 | 2325 | ||
2295 | return 0; | 2326 | return 0; |
@@ -2485,7 +2516,7 @@ static void ata_dev_reread_id(struct ata_port *ap, struct ata_device *dev) | |||
2485 | 2516 | ||
2486 | swap_buf_le16(dev->id, ATA_ID_WORDS); | 2517 | swap_buf_le16(dev->id, ATA_ID_WORDS); |
2487 | 2518 | ||
2488 | ata_dump_id(dev); | 2519 | ata_dump_id(dev->id); |
2489 | 2520 | ||
2490 | DPRINTK("EXIT\n"); | 2521 | DPRINTK("EXIT\n"); |
2491 | 2522 | ||
@@ -5179,6 +5210,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_release); | |||
5179 | EXPORT_SYMBOL_GPL(ata_host_intr); | 5210 | EXPORT_SYMBOL_GPL(ata_host_intr); |
5180 | EXPORT_SYMBOL_GPL(ata_dev_classify); | 5211 | EXPORT_SYMBOL_GPL(ata_dev_classify); |
5181 | EXPORT_SYMBOL_GPL(ata_dev_id_string); | 5212 | EXPORT_SYMBOL_GPL(ata_dev_id_string); |
5213 | EXPORT_SYMBOL_GPL(ata_dev_id_c_string); | ||
5182 | EXPORT_SYMBOL_GPL(ata_dev_config); | 5214 | EXPORT_SYMBOL_GPL(ata_dev_config); |
5183 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); | 5215 | EXPORT_SYMBOL_GPL(ata_scsi_simulate); |
5184 | EXPORT_SYMBOL_GPL(ata_eh_qc_complete); | 5216 | EXPORT_SYMBOL_GPL(ata_eh_qc_complete); |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 26f07a2617f9..86da46502b3e 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -684,23 +684,23 @@ int ata_scsi_slave_config(struct scsi_device *sdev) | |||
684 | if (sdev->id < ATA_MAX_DEVICES) { | 684 | if (sdev->id < ATA_MAX_DEVICES) { |
685 | struct ata_port *ap; | 685 | struct ata_port *ap; |
686 | struct ata_device *dev; | 686 | struct ata_device *dev; |
687 | unsigned int max_sectors; | ||
687 | 688 | ||
688 | ap = (struct ata_port *) &sdev->host->hostdata[0]; | 689 | ap = (struct ata_port *) &sdev->host->hostdata[0]; |
689 | dev = &ap->device[sdev->id]; | 690 | dev = &ap->device[sdev->id]; |
690 | 691 | ||
691 | /* TODO: 1024 is an arbitrary number, not the | 692 | /* TODO: 2048 is an arbitrary number, not the |
692 | * hardware maximum. This should be increased to | 693 | * hardware maximum. This should be increased to |
693 | * 65534 when Jens Axboe's patch for dynamically | 694 | * 65534 when Jens Axboe's patch for dynamically |
694 | * determining max_sectors is merged. | 695 | * determining max_sectors is merged. |
695 | */ | 696 | */ |
696 | if ((dev->flags & ATA_DFLAG_LBA48) && | 697 | max_sectors = ATA_MAX_SECTORS; |
697 | ((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) { | 698 | if (dev->flags & ATA_DFLAG_LBA48) |
698 | /* | 699 | max_sectors = 2048; |
699 | * do not overwrite sdev->host->max_sectors, since | 700 | if (dev->max_sectors) |
700 | * other drives on this host may not support LBA48 | 701 | max_sectors = dev->max_sectors; |
701 | */ | 702 | |
702 | blk_queue_max_sectors(sdev->request_queue, 2048); | 703 | blk_queue_max_sectors(sdev->request_queue, max_sectors); |
703 | } | ||
704 | 704 | ||
705 | /* | 705 | /* |
706 | * SATA DMA transfers must be multiples of 4 byte, so | 706 | * SATA DMA transfers must be multiples of 4 byte, so |
@@ -1806,15 +1806,12 @@ static int ata_dev_supports_fua(u16 *id) | |||
1806 | if (!ata_id_has_fua(id)) | 1806 | if (!ata_id_has_fua(id)) |
1807 | return 0; | 1807 | return 0; |
1808 | 1808 | ||
1809 | model[40] = '\0'; | 1809 | ata_dev_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model)); |
1810 | fw[8] = '\0'; | 1810 | ata_dev_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw)); |
1811 | |||
1812 | ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1); | ||
1813 | ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1); | ||
1814 | 1811 | ||
1815 | if (strncmp(model, "Maxtor", 6)) | 1812 | if (strcmp(model, "Maxtor")) |
1816 | return 1; | 1813 | return 1; |
1817 | if (strncmp(fw, "BANC1G10", 8)) | 1814 | if (strcmp(fw, "BANC1G10")) |
1818 | return 1; | 1815 | return 1; |
1819 | 1816 | ||
1820 | return 0; /* blacklisted */ | 1817 | return 0; /* blacklisted */ |
@@ -2149,7 +2146,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc) | |||
2149 | ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer)); | 2146 | ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer)); |
2150 | qc->dma_dir = DMA_FROM_DEVICE; | 2147 | qc->dma_dir = DMA_FROM_DEVICE; |
2151 | 2148 | ||
2152 | memset(&qc->cdb, 0, ap->cdb_len); | 2149 | memset(&qc->cdb, 0, qc->dev->cdb_len); |
2153 | qc->cdb[0] = REQUEST_SENSE; | 2150 | qc->cdb[0] = REQUEST_SENSE; |
2154 | qc->cdb[4] = SCSI_SENSE_BUFFERSIZE; | 2151 | qc->cdb[4] = SCSI_SENSE_BUFFERSIZE; |
2155 | 2152 | ||
@@ -2251,7 +2248,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd) | |||
2251 | if (ata_check_atapi_dma(qc)) | 2248 | if (ata_check_atapi_dma(qc)) |
2252 | using_pio = 1; | 2249 | using_pio = 1; |
2253 | 2250 | ||
2254 | memcpy(&qc->cdb, scsicmd, qc->ap->cdb_len); | 2251 | memcpy(&qc->cdb, scsicmd, dev->cdb_len); |
2255 | 2252 | ||
2256 | qc->complete_fn = atapi_qc_complete; | 2253 | qc->complete_fn = atapi_qc_complete; |
2257 | 2254 | ||
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c index 0f7e45a39fd9..f32af5dc58c4 100644 --- a/drivers/scsi/pdc_adma.c +++ b/drivers/scsi/pdc_adma.c | |||
@@ -148,7 +148,6 @@ static struct scsi_host_template adma_ata_sht = { | |||
148 | .can_queue = ATA_DEF_QUEUE, | 148 | .can_queue = ATA_DEF_QUEUE, |
149 | .this_id = ATA_SHT_THIS_ID, | 149 | .this_id = ATA_SHT_THIS_ID, |
150 | .sg_tablesize = LIBATA_MAX_PRD, | 150 | .sg_tablesize = LIBATA_MAX_PRD, |
151 | .max_sectors = ATA_MAX_SECTORS, | ||
152 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 151 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
153 | .emulated = ATA_SHT_EMULATED, | 152 | .emulated = ATA_SHT_EMULATED, |
154 | .use_clustering = ENABLE_CLUSTERING, | 153 | .use_clustering = ENABLE_CLUSTERING, |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index d35460ff5275..e05751e7aad4 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -383,7 +383,6 @@ static struct scsi_host_template mv_sht = { | |||
383 | .can_queue = MV_USE_Q_DEPTH, | 383 | .can_queue = MV_USE_Q_DEPTH, |
384 | .this_id = ATA_SHT_THIS_ID, | 384 | .this_id = ATA_SHT_THIS_ID, |
385 | .sg_tablesize = MV_MAX_SG_CT / 2, | 385 | .sg_tablesize = MV_MAX_SG_CT / 2, |
386 | .max_sectors = ATA_MAX_SECTORS, | ||
387 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 386 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
388 | .emulated = ATA_SHT_EMULATED, | 387 | .emulated = ATA_SHT_EMULATED, |
389 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 388 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 94dc2e1a8f30..5168db981dde 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -234,7 +234,6 @@ static struct scsi_host_template nv_sht = { | |||
234 | .can_queue = ATA_DEF_QUEUE, | 234 | .can_queue = ATA_DEF_QUEUE, |
235 | .this_id = ATA_SHT_THIS_ID, | 235 | .this_id = ATA_SHT_THIS_ID, |
236 | .sg_tablesize = LIBATA_MAX_PRD, | 236 | .sg_tablesize = LIBATA_MAX_PRD, |
237 | .max_sectors = ATA_MAX_SECTORS, | ||
238 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 237 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
239 | .emulated = ATA_SHT_EMULATED, | 238 | .emulated = ATA_SHT_EMULATED, |
240 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 239 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index a88b563ebcc4..7fa807d7d9e1 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -117,7 +117,6 @@ static struct scsi_host_template pdc_ata_sht = { | |||
117 | .can_queue = ATA_DEF_QUEUE, | 117 | .can_queue = ATA_DEF_QUEUE, |
118 | .this_id = ATA_SHT_THIS_ID, | 118 | .this_id = ATA_SHT_THIS_ID, |
119 | .sg_tablesize = LIBATA_MAX_PRD, | 119 | .sg_tablesize = LIBATA_MAX_PRD, |
120 | .max_sectors = ATA_MAX_SECTORS, | ||
121 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 120 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
122 | .emulated = ATA_SHT_EMULATED, | 121 | .emulated = ATA_SHT_EMULATED, |
123 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 122 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 5730167d2e74..bfc1dc8e7779 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -137,7 +137,6 @@ static struct scsi_host_template qs_ata_sht = { | |||
137 | .can_queue = ATA_DEF_QUEUE, | 137 | .can_queue = ATA_DEF_QUEUE, |
138 | .this_id = ATA_SHT_THIS_ID, | 138 | .this_id = ATA_SHT_THIS_ID, |
139 | .sg_tablesize = QS_MAX_PRD, | 139 | .sg_tablesize = QS_MAX_PRD, |
140 | .max_sectors = ATA_MAX_SECTORS, | ||
141 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 140 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
142 | .emulated = ATA_SHT_EMULATED, | 141 | .emulated = ATA_SHT_EMULATED, |
143 | //FIXME .use_clustering = ATA_SHT_USE_CLUSTERING, | 142 | //FIXME .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index bd2887741d78..15346888faf2 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -140,7 +140,6 @@ static struct scsi_host_template sil_sht = { | |||
140 | .can_queue = ATA_DEF_QUEUE, | 140 | .can_queue = ATA_DEF_QUEUE, |
141 | .this_id = ATA_SHT_THIS_ID, | 141 | .this_id = ATA_SHT_THIS_ID, |
142 | .sg_tablesize = LIBATA_MAX_PRD, | 142 | .sg_tablesize = LIBATA_MAX_PRD, |
143 | .max_sectors = ATA_MAX_SECTORS, | ||
144 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 143 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
145 | .emulated = ATA_SHT_EMULATED, | 144 | .emulated = ATA_SHT_EMULATED, |
146 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 145 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
@@ -337,22 +336,13 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
337 | static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) | 336 | static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) |
338 | { | 337 | { |
339 | unsigned int n, quirks = 0; | 338 | unsigned int n, quirks = 0; |
340 | unsigned char model_num[40]; | 339 | unsigned char model_num[41]; |
341 | const char *s; | ||
342 | unsigned int len; | ||
343 | 340 | ||
344 | ata_dev_id_string(dev->id, model_num, ATA_ID_PROD_OFS, | 341 | ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, |
345 | sizeof(model_num)); | 342 | sizeof(model_num)); |
346 | s = &model_num[0]; | ||
347 | len = strnlen(s, sizeof(model_num)); | ||
348 | |||
349 | /* ATAPI specifies that empty space is blank-filled; remove blanks */ | ||
350 | while ((len > 0) && (s[len - 1] == ' ')) | ||
351 | len--; | ||
352 | 343 | ||
353 | for (n = 0; sil_blacklist[n].product; n++) | 344 | for (n = 0; sil_blacklist[n].product; n++) |
354 | if (!memcmp(sil_blacklist[n].product, s, | 345 | if (!strcmp(sil_blacklist[n].product, model_num)) { |
355 | strlen(sil_blacklist[n].product))) { | ||
356 | quirks = sil_blacklist[n].quirk; | 346 | quirks = sil_blacklist[n].quirk; |
357 | break; | 347 | break; |
358 | } | 348 | } |
@@ -363,16 +353,14 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) | |||
363 | (quirks & SIL_QUIRK_MOD15WRITE))) { | 353 | (quirks & SIL_QUIRK_MOD15WRITE))) { |
364 | printk(KERN_INFO "ata%u(%u): applying Seagate errata fix (mod15write workaround)\n", | 354 | printk(KERN_INFO "ata%u(%u): applying Seagate errata fix (mod15write workaround)\n", |
365 | ap->id, dev->devno); | 355 | ap->id, dev->devno); |
366 | ap->host->max_sectors = 15; | 356 | dev->max_sectors = 15; |
367 | ap->host->hostt->max_sectors = 15; | ||
368 | dev->flags |= ATA_DFLAG_LOCK_SECTORS; | ||
369 | return; | 357 | return; |
370 | } | 358 | } |
371 | 359 | ||
372 | /* limit to udma5 */ | 360 | /* limit to udma5 */ |
373 | if (quirks & SIL_QUIRK_UDMA5MAX) { | 361 | if (quirks & SIL_QUIRK_UDMA5MAX) { |
374 | printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n", | 362 | printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n", |
375 | ap->id, dev->devno, s); | 363 | ap->id, dev->devno, model_num); |
376 | ap->udma_mask &= ATA_UDMA5; | 364 | ap->udma_mask &= ATA_UDMA5; |
377 | return; | 365 | return; |
378 | } | 366 | } |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 228a7fabffff..a0e35a262156 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -285,7 +285,6 @@ static struct scsi_host_template sil24_sht = { | |||
285 | .can_queue = ATA_DEF_QUEUE, | 285 | .can_queue = ATA_DEF_QUEUE, |
286 | .this_id = ATA_SHT_THIS_ID, | 286 | .this_id = ATA_SHT_THIS_ID, |
287 | .sg_tablesize = LIBATA_MAX_PRD, | 287 | .sg_tablesize = LIBATA_MAX_PRD, |
288 | .max_sectors = ATA_MAX_SECTORS, | ||
289 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 288 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
290 | .emulated = ATA_SHT_EMULATED, | 289 | .emulated = ATA_SHT_EMULATED, |
291 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 290 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
@@ -371,7 +370,7 @@ static void sil24_dev_config(struct ata_port *ap, struct ata_device *dev) | |||
371 | { | 370 | { |
372 | void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; | 371 | void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; |
373 | 372 | ||
374 | if (ap->cdb_len == 16) | 373 | if (dev->cdb_len == 16) |
375 | writel(PORT_CS_CDB16, port + PORT_CTRL_STAT); | 374 | writel(PORT_CS_CDB16, port + PORT_CTRL_STAT); |
376 | else | 375 | else |
377 | writel(PORT_CS_CDB16, port + PORT_CTRL_CLR); | 376 | writel(PORT_CS_CDB16, port + PORT_CTRL_CLR); |
@@ -543,7 +542,7 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) | |||
543 | prb = &cb->atapi.prb; | 542 | prb = &cb->atapi.prb; |
544 | sge = cb->atapi.sge; | 543 | sge = cb->atapi.sge; |
545 | memset(cb->atapi.cdb, 0, 32); | 544 | memset(cb->atapi.cdb, 0, 32); |
546 | memcpy(cb->atapi.cdb, qc->cdb, ap->cdb_len); | 545 | memcpy(cb->atapi.cdb, qc->cdb, qc->dev->cdb_len); |
547 | 546 | ||
548 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { | 547 | if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { |
549 | if (qc->tf.flags & ATA_TFLAG_WRITE) | 548 | if (qc->tf.flags & ATA_TFLAG_WRITE) |
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 2f1815715705..7fd45f86de99 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -92,7 +92,6 @@ static struct scsi_host_template sis_sht = { | |||
92 | .can_queue = ATA_DEF_QUEUE, | 92 | .can_queue = ATA_DEF_QUEUE, |
93 | .this_id = ATA_SHT_THIS_ID, | 93 | .this_id = ATA_SHT_THIS_ID, |
94 | .sg_tablesize = ATA_MAX_PRD, | 94 | .sg_tablesize = ATA_MAX_PRD, |
95 | .max_sectors = ATA_MAX_SECTORS, | ||
96 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 95 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
97 | .emulated = ATA_SHT_EMULATED, | 96 | .emulated = ATA_SHT_EMULATED, |
98 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 97 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index f369c3003adf..4aaccd53e736 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -293,7 +293,6 @@ static struct scsi_host_template k2_sata_sht = { | |||
293 | .can_queue = ATA_DEF_QUEUE, | 293 | .can_queue = ATA_DEF_QUEUE, |
294 | .this_id = ATA_SHT_THIS_ID, | 294 | .this_id = ATA_SHT_THIS_ID, |
295 | .sg_tablesize = LIBATA_MAX_PRD, | 295 | .sg_tablesize = LIBATA_MAX_PRD, |
296 | .max_sectors = ATA_MAX_SECTORS, | ||
297 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 296 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
298 | .emulated = ATA_SHT_EMULATED, | 297 | .emulated = ATA_SHT_EMULATED, |
299 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 298 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 04465fb86e1d..60ebe5ce32c4 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -187,7 +187,6 @@ static struct scsi_host_template pdc_sata_sht = { | |||
187 | .can_queue = ATA_DEF_QUEUE, | 187 | .can_queue = ATA_DEF_QUEUE, |
188 | .this_id = ATA_SHT_THIS_ID, | 188 | .this_id = ATA_SHT_THIS_ID, |
189 | .sg_tablesize = LIBATA_MAX_PRD, | 189 | .sg_tablesize = LIBATA_MAX_PRD, |
190 | .max_sectors = ATA_MAX_SECTORS, | ||
191 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 190 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
192 | .emulated = ATA_SHT_EMULATED, | 191 | .emulated = ATA_SHT_EMULATED, |
193 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 192 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index c500f2490902..37a487b7d655 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c | |||
@@ -80,7 +80,6 @@ static struct scsi_host_template uli_sht = { | |||
80 | .can_queue = ATA_DEF_QUEUE, | 80 | .can_queue = ATA_DEF_QUEUE, |
81 | .this_id = ATA_SHT_THIS_ID, | 81 | .this_id = ATA_SHT_THIS_ID, |
82 | .sg_tablesize = LIBATA_MAX_PRD, | 82 | .sg_tablesize = LIBATA_MAX_PRD, |
83 | .max_sectors = ATA_MAX_SECTORS, | ||
84 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 83 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
85 | .emulated = ATA_SHT_EMULATED, | 84 | .emulated = ATA_SHT_EMULATED, |
86 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 85 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 2e20887dc88f..ff65a0b0457f 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
@@ -99,7 +99,6 @@ static struct scsi_host_template svia_sht = { | |||
99 | .can_queue = ATA_DEF_QUEUE, | 99 | .can_queue = ATA_DEF_QUEUE, |
100 | .this_id = ATA_SHT_THIS_ID, | 100 | .this_id = ATA_SHT_THIS_ID, |
101 | .sg_tablesize = LIBATA_MAX_PRD, | 101 | .sg_tablesize = LIBATA_MAX_PRD, |
102 | .max_sectors = ATA_MAX_SECTORS, | ||
103 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 102 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
104 | .emulated = ATA_SHT_EMULATED, | 103 | .emulated = ATA_SHT_EMULATED, |
105 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 104 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 4cfc03018ca3..976a6b124af9 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -228,7 +228,6 @@ static struct scsi_host_template vsc_sata_sht = { | |||
228 | .can_queue = ATA_DEF_QUEUE, | 228 | .can_queue = ATA_DEF_QUEUE, |
229 | .this_id = ATA_SHT_THIS_ID, | 229 | .this_id = ATA_SHT_THIS_ID, |
230 | .sg_tablesize = LIBATA_MAX_PRD, | 230 | .sg_tablesize = LIBATA_MAX_PRD, |
231 | .max_sectors = ATA_MAX_SECTORS, | ||
232 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 231 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
233 | .emulated = ATA_SHT_EMULATED, | 232 | .emulated = ATA_SHT_EMULATED, |
234 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 233 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3e153d313bb0..e64ed16bd42f 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -525,11 +525,6 @@ config FB_GBE_MEM | |||
525 | This is the amount of memory reserved for the framebuffer, | 525 | This is the amount of memory reserved for the framebuffer, |
526 | which can be any value between 1MB and 8MB. | 526 | which can be any value between 1MB and 8MB. |
527 | 527 | ||
528 | config BUS_I2C | ||
529 | bool | ||
530 | depends on (FB = y) && VISWS | ||
531 | default y | ||
532 | |||
533 | config FB_SUN3 | 528 | config FB_SUN3 |
534 | bool "Sun3 framebuffer support" | 529 | bool "Sun3 framebuffer support" |
535 | depends on (FB = y) && (SUN3 || SUN3X) && BROKEN | 530 | depends on (FB = y) && (SUN3 || SUN3X) && BROKEN |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index d2dede6ed3e5..996c7b58564e 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1550,6 +1550,7 @@ int fb_get_options(char *name, char **option) | |||
1550 | return retval; | 1550 | return retval; |
1551 | } | 1551 | } |
1552 | 1552 | ||
1553 | #ifndef MODULE | ||
1553 | /** | 1554 | /** |
1554 | * video_setup - process command line options | 1555 | * video_setup - process command line options |
1555 | * @options: string of options | 1556 | * @options: string of options |
@@ -1593,6 +1594,7 @@ static int __init video_setup(char *options) | |||
1593 | return 0; | 1594 | return 0; |
1594 | } | 1595 | } |
1595 | __setup("video=", video_setup); | 1596 | __setup("video=", video_setup); |
1597 | #endif | ||
1596 | 1598 | ||
1597 | /* | 1599 | /* |
1598 | * Visible symbols for modules | 1600 | * Visible symbols for modules |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index dbcb8962e57d..a7c4e5e8ead6 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -138,6 +138,8 @@ static struct pci_device_id nvidiafb_pci_tbl[] = { | |||
138 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 138 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
139 | {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X, | 139 | {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X, |
140 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 140 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
141 | {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000, | ||
142 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | ||
141 | {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO, | 143 | {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO, |
142 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 144 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
143 | {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO, | 145 | {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO, |
diff --git a/fs/compat.c b/fs/compat.c index 70c5af4cc270..a2ba78bdf7f7 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1751,11 +1751,15 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
1751 | ret = compat_core_sys_select(n, inp, outp, exp, &timeout); | 1751 | ret = compat_core_sys_select(n, inp, outp, exp, &timeout); |
1752 | 1752 | ||
1753 | if (tvp) { | 1753 | if (tvp) { |
1754 | struct compat_timeval rtv; | ||
1755 | |||
1754 | if (current->personality & STICKY_TIMEOUTS) | 1756 | if (current->personality & STICKY_TIMEOUTS) |
1755 | goto sticky; | 1757 | goto sticky; |
1756 | tv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); | 1758 | rtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); |
1757 | tv.tv_sec = timeout; | 1759 | rtv.tv_sec = timeout; |
1758 | if (copy_to_user(tvp, &tv, sizeof(tv))) { | 1760 | if (compat_timeval_compare(&rtv, &tv) < 0) |
1761 | rtv = tv; | ||
1762 | if (copy_to_user(tvp, &rtv, sizeof(rtv))) { | ||
1759 | sticky: | 1763 | sticky: |
1760 | /* | 1764 | /* |
1761 | * If an application puts its timeval in read-only | 1765 | * If an application puts its timeval in read-only |
@@ -1822,13 +1826,17 @@ asmlinkage long compat_sys_pselect7(int n, compat_ulong_t __user *inp, | |||
1822 | } while (!ret && !timeout && tsp && (ts.tv_sec || ts.tv_nsec)); | 1826 | } while (!ret && !timeout && tsp && (ts.tv_sec || ts.tv_nsec)); |
1823 | 1827 | ||
1824 | if (tsp && !(current->personality & STICKY_TIMEOUTS)) { | 1828 | if (tsp && !(current->personality & STICKY_TIMEOUTS)) { |
1825 | ts.tv_sec += timeout / HZ; | 1829 | struct compat_timespec rts; |
1826 | ts.tv_nsec += (timeout % HZ) * (1000000000/HZ); | 1830 | |
1827 | if (ts.tv_nsec >= 1000000000) { | 1831 | rts.tv_sec = timeout / HZ; |
1828 | ts.tv_sec++; | 1832 | rts.tv_nsec = (timeout % HZ) * (NSEC_PER_SEC/HZ); |
1829 | ts.tv_nsec -= 1000000000; | 1833 | if (rts.tv_nsec >= NSEC_PER_SEC) { |
1834 | rts.tv_sec++; | ||
1835 | rts.tv_nsec -= NSEC_PER_SEC; | ||
1830 | } | 1836 | } |
1831 | (void)copy_to_user(tsp, &ts, sizeof(ts)); | 1837 | if (compat_timespec_compare(&rts, &ts) < 0) |
1838 | rts = ts; | ||
1839 | copy_to_user(tsp, &rts, sizeof(rts)); | ||
1832 | } | 1840 | } |
1833 | 1841 | ||
1834 | if (ret == -ERESTARTNOHAND) { | 1842 | if (ret == -ERESTARTNOHAND) { |
@@ -1918,12 +1926,17 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, | |||
1918 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); | 1926 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); |
1919 | 1927 | ||
1920 | if (tsp && timeout >= 0) { | 1928 | if (tsp && timeout >= 0) { |
1929 | struct compat_timespec rts; | ||
1930 | |||
1921 | if (current->personality & STICKY_TIMEOUTS) | 1931 | if (current->personality & STICKY_TIMEOUTS) |
1922 | goto sticky; | 1932 | goto sticky; |
1923 | /* Yes, we know it's actually an s64, but it's also positive. */ | 1933 | /* Yes, we know it's actually an s64, but it's also positive. */ |
1924 | ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000; | 1934 | rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * |
1925 | ts.tv_sec = timeout; | 1935 | 1000; |
1926 | if (copy_to_user(tsp, &ts, sizeof(ts))) { | 1936 | rts.tv_sec = timeout; |
1937 | if (compat_timespec_compare(&rts, &ts) < 0) | ||
1938 | rts = ts; | ||
1939 | if (copy_to_user(tsp, &rts, sizeof(rts))) { | ||
1927 | sticky: | 1940 | sticky: |
1928 | /* | 1941 | /* |
1929 | * If an application puts its timeval in read-only | 1942 | * If an application puts its timeval in read-only |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index ef5e5414e7a8..d63da756eb49 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -1124,8 +1124,6 @@ static void handle_attrs(struct super_block *s) | |||
1124 | "reiserfs: cannot support attributes until flag is set in super-block"); | 1124 | "reiserfs: cannot support attributes until flag is set in super-block"); |
1125 | REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS); | 1125 | REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_ATTRS); |
1126 | } | 1126 | } |
1127 | } else if (le32_to_cpu(rs->s_flags) & reiserfs_attrs_cleared) { | ||
1128 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ATTRS); | ||
1129 | } | 1127 | } |
1130 | } | 1128 | } |
1131 | 1129 | ||
diff --git a/fs/select.c b/fs/select.c index bc60a3e14ef3..6ce68a9c8976 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -398,11 +398,15 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | |||
398 | ret = core_sys_select(n, inp, outp, exp, &timeout); | 398 | ret = core_sys_select(n, inp, outp, exp, &timeout); |
399 | 399 | ||
400 | if (tvp) { | 400 | if (tvp) { |
401 | struct timeval rtv; | ||
402 | |||
401 | if (current->personality & STICKY_TIMEOUTS) | 403 | if (current->personality & STICKY_TIMEOUTS) |
402 | goto sticky; | 404 | goto sticky; |
403 | tv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); | 405 | rtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)); |
404 | tv.tv_sec = timeout; | 406 | rtv.tv_sec = timeout; |
405 | if (copy_to_user(tvp, &tv, sizeof(tv))) { | 407 | if (timeval_compare(&rtv, &tv) < 0) |
408 | rtv = tv; | ||
409 | if (copy_to_user(tvp, &rtv, sizeof(rtv))) { | ||
406 | sticky: | 410 | sticky: |
407 | /* | 411 | /* |
408 | * If an application puts its timeval in read-only | 412 | * If an application puts its timeval in read-only |
@@ -460,11 +464,16 @@ asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, | |||
460 | ret = core_sys_select(n, inp, outp, exp, &timeout); | 464 | ret = core_sys_select(n, inp, outp, exp, &timeout); |
461 | 465 | ||
462 | if (tsp) { | 466 | if (tsp) { |
467 | struct timespec rts; | ||
468 | |||
463 | if (current->personality & STICKY_TIMEOUTS) | 469 | if (current->personality & STICKY_TIMEOUTS) |
464 | goto sticky; | 470 | goto sticky; |
465 | ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000; | 471 | rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * |
466 | ts.tv_sec = timeout; | 472 | 1000; |
467 | if (copy_to_user(tsp, &ts, sizeof(ts))) { | 473 | rts.tv_sec = timeout; |
474 | if (timespec_compare(&rts, &ts) < 0) | ||
475 | rts = ts; | ||
476 | if (copy_to_user(tsp, &rts, sizeof(rts))) { | ||
468 | sticky: | 477 | sticky: |
469 | /* | 478 | /* |
470 | * If an application puts its timeval in read-only | 479 | * If an application puts its timeval in read-only |
@@ -758,12 +767,17 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | |||
758 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); | 767 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); |
759 | 768 | ||
760 | if (tsp && timeout >= 0) { | 769 | if (tsp && timeout >= 0) { |
770 | struct timespec rts; | ||
771 | |||
761 | if (current->personality & STICKY_TIMEOUTS) | 772 | if (current->personality & STICKY_TIMEOUTS) |
762 | goto sticky; | 773 | goto sticky; |
763 | /* Yes, we know it's actually an s64, but it's also positive. */ | 774 | /* Yes, we know it's actually an s64, but it's also positive. */ |
764 | ts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * 1000; | 775 | rts.tv_nsec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ)) * |
765 | ts.tv_sec = timeout; | 776 | 1000; |
766 | if (copy_to_user(tsp, &ts, sizeof(ts))) { | 777 | rts.tv_sec = timeout; |
778 | if (timespec_compare(&rts, &ts) < 0) | ||
779 | rts = ts; | ||
780 | if (copy_to_user(tsp, &rts, sizeof(rts))) { | ||
767 | sticky: | 781 | sticky: |
768 | /* | 782 | /* |
769 | * If an application puts its timeval in read-only | 783 | * If an application puts its timeval in read-only |
@@ -261,6 +261,7 @@ asmlinkage long sys_newlstat(char __user *filename, struct stat __user *statbuf) | |||
261 | return error; | 261 | return error; |
262 | } | 262 | } |
263 | 263 | ||
264 | #ifndef __ARCH_WANT_STAT64 | ||
264 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, | 265 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, |
265 | struct stat __user *statbuf, int flag) | 266 | struct stat __user *statbuf, int flag) |
266 | { | 267 | { |
@@ -281,6 +282,7 @@ asmlinkage long sys_newfstatat(int dfd, char __user *filename, | |||
281 | out: | 282 | out: |
282 | return error; | 283 | return error; |
283 | } | 284 | } |
285 | #endif | ||
284 | 286 | ||
285 | asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf) | 287 | asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf) |
286 | { | 288 | { |
@@ -395,6 +397,26 @@ asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf) | |||
395 | return error; | 397 | return error; |
396 | } | 398 | } |
397 | 399 | ||
400 | asmlinkage long sys_fstatat64(int dfd, char __user *filename, | ||
401 | struct stat64 __user *statbuf, int flag) | ||
402 | { | ||
403 | struct kstat stat; | ||
404 | int error = -EINVAL; | ||
405 | |||
406 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
407 | goto out; | ||
408 | |||
409 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
410 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
411 | else | ||
412 | error = vfs_stat_fd(dfd, filename, &stat); | ||
413 | |||
414 | if (!error) | ||
415 | error = cp_new_stat64(&stat, statbuf); | ||
416 | |||
417 | out: | ||
418 | return error; | ||
419 | } | ||
398 | #endif /* __ARCH_WANT_STAT64 */ | 420 | #endif /* __ARCH_WANT_STAT64 */ |
399 | 421 | ||
400 | void inode_add_bytes(struct inode *inode, loff_t bytes) | 422 | void inode_add_bytes(struct inode *inode, loff_t bytes) |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index cf6f2cd9c514..dc81a55dd94d 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -305,7 +305,7 @@ | |||
305 | #define __NR_mknodat 297 | 305 | #define __NR_mknodat 297 |
306 | #define __NR_fchownat 298 | 306 | #define __NR_fchownat 298 |
307 | #define __NR_futimesat 299 | 307 | #define __NR_futimesat 299 |
308 | #define __NR_newfstatat 300 | 308 | #define __NR_fstatat64 300 |
309 | #define __NR_unlinkat 301 | 309 | #define __NR_unlinkat 301 |
310 | #define __NR_renameat 302 | 310 | #define __NR_renameat 302 |
311 | #define __NR_linkat 303 | 311 | #define __NR_linkat 303 |
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 61232760cc3b..3628899f48bb 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h | |||
@@ -518,8 +518,8 @@ static inline int __test_bit(unsigned long nr, const volatile unsigned long *ptr | |||
518 | 518 | ||
519 | static inline int | 519 | static inline int |
520 | __constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { | 520 | __constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { |
521 | return ((((volatile char *) addr) | 521 | return (((volatile char *) addr) |
522 | [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7)))) != 0; | 522 | [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7))) != 0; |
523 | } | 523 | } |
524 | 524 | ||
525 | #define test_bit(nr,addr) \ | 525 | #define test_bit(nr,addr) \ |
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 348a88137445..da3fd4a7bb32 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef _ASM_S390_SETUP_H | 8 | #ifndef _ASM_S390_SETUP_H |
9 | #define _ASM_S390_SETUP_H | 9 | #define _ASM_S390_SETUP_H |
10 | 10 | ||
11 | #ifdef __KERNEL__ | ||
12 | |||
11 | #include <asm/types.h> | 13 | #include <asm/types.h> |
12 | 14 | ||
13 | #define PARMAREA 0x10400 | 15 | #define PARMAREA 0x10400 |
@@ -114,7 +116,7 @@ extern u16 ipl_devno; | |||
114 | IPL_PARMBLOCK_ORIGIN) | 116 | IPL_PARMBLOCK_ORIGIN) |
115 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) | 117 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) |
116 | 118 | ||
117 | #else | 119 | #else /* __ASSEMBLY__ */ |
118 | 120 | ||
119 | #ifndef __s390x__ | 121 | #ifndef __s390x__ |
120 | #define IPL_DEVICE 0x10404 | 122 | #define IPL_DEVICE 0x10404 |
@@ -127,6 +129,6 @@ extern u16 ipl_devno; | |||
127 | #endif /* __s390x__ */ | 129 | #endif /* __s390x__ */ |
128 | #define COMMAND_LINE 0x10480 | 130 | #define COMMAND_LINE 0x10480 |
129 | 131 | ||
130 | #endif | 132 | #endif /* __ASSEMBLY__ */ |
131 | 133 | #endif /* __KERNEL__ */ | |
132 | #endif | 134 | #endif /* _ASM_S390_SETUP_H */ |
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index a2ae7628bbaa..9c6e9c300eb9 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -101,6 +101,7 @@ smp_call_function_on(void (*func) (void *info), void *info, | |||
101 | func(info); | 101 | func(info); |
102 | return 0; | 102 | return 0; |
103 | } | 103 | } |
104 | #define smp_cpu_not_running(cpu) 1 | ||
104 | #define smp_get_cpu(cpu) ({ 0; }) | 105 | #define smp_get_cpu(cpu) ({ 0; }) |
105 | #define smp_put_cpu(cpu) ({ 0; }) | 106 | #define smp_put_cpu(cpu) ({ 0; }) |
106 | #endif | 107 | #endif |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 29a9f357eb9e..657d582e8149 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -285,7 +285,7 @@ | |||
285 | #define __NR_mknodat 290 | 285 | #define __NR_mknodat 290 |
286 | #define __NR_fchownat 291 | 286 | #define __NR_fchownat 291 |
287 | #define __NR_futimesat 292 | 287 | #define __NR_futimesat 292 |
288 | #define __NR_newfstatat 293 | 288 | #define __NR_fstatat64 293 |
289 | #define __NR_unlinkat 294 | 289 | #define __NR_unlinkat 294 |
290 | #define __NR_renameat 295 | 290 | #define __NR_renameat 295 |
291 | #define __NR_linkat 296 | 291 | #define __NR_linkat 296 |
@@ -295,8 +295,9 @@ | |||
295 | #define __NR_faccessat 300 | 295 | #define __NR_faccessat 300 |
296 | #define __NR_pselect6 301 | 296 | #define __NR_pselect6 301 |
297 | #define __NR_ppoll 302 | 297 | #define __NR_ppoll 302 |
298 | #define __NR_unshare 303 | ||
298 | 299 | ||
299 | #define NR_syscalls 303 | 300 | #define NR_syscalls 304 |
300 | 301 | ||
301 | /* | 302 | /* |
302 | * There are some system calls that are not present on 64 bit, some | 303 | * There are some system calls that are not present on 64 bit, some |
@@ -358,6 +359,7 @@ | |||
358 | #undef __NR_fcntl64 | 359 | #undef __NR_fcntl64 |
359 | #undef __NR_sendfile64 | 360 | #undef __NR_sendfile64 |
360 | #undef __NR_fadvise64_64 | 361 | #undef __NR_fadvise64_64 |
362 | #undef __NR_fstatat64 | ||
361 | 363 | ||
362 | #define __NR_select 142 | 364 | #define __NR_select 142 |
363 | #define __NR_getrlimit 191 /* SuS compliant getrlimit */ | 365 | #define __NR_getrlimit 191 /* SuS compliant getrlimit */ |
@@ -380,6 +382,7 @@ | |||
380 | #define __NR_setgid 214 | 382 | #define __NR_setgid 214 |
381 | #define __NR_setfsuid 215 | 383 | #define __NR_setfsuid 215 |
382 | #define __NR_setfsgid 216 | 384 | #define __NR_setfsgid 216 |
385 | #define __NR_newfstatat 293 | ||
383 | 386 | ||
384 | #endif | 387 | #endif |
385 | 388 | ||
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index c20c28f5c7a0..08b75c15269a 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h | |||
@@ -55,6 +55,8 @@ extern int is_hpet_enabled(void); | |||
55 | extern int hpet_rtc_timer_init(void); | 55 | extern int hpet_rtc_timer_init(void); |
56 | extern int oem_force_hpet_timer(void); | 56 | extern int oem_force_hpet_timer(void); |
57 | 57 | ||
58 | extern int hpet_use_timer; | ||
59 | |||
58 | #ifdef CONFIG_HPET_EMULATE_RTC | 60 | #ifdef CONFIG_HPET_EMULATE_RTC |
59 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | 61 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); |
60 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); | 62 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index 20468983d453..eeb2bcd635de 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -305,7 +305,7 @@ | |||
305 | #define __NR_ia32_mknodat 297 | 305 | #define __NR_ia32_mknodat 297 |
306 | #define __NR_ia32_fchownat 298 | 306 | #define __NR_ia32_fchownat 298 |
307 | #define __NR_ia32_futimesat 299 | 307 | #define __NR_ia32_futimesat 299 |
308 | #define __NR_ia32_newfstatat 300 | 308 | #define __NR_ia32_fstatat64 300 |
309 | #define __NR_ia32_unlinkat 301 | 309 | #define __NR_ia32_unlinkat 301 |
310 | #define __NR_ia32_renameat 302 | 310 | #define __NR_ia32_renameat 302 |
311 | #define __NR_ia32_linkat 303 | 311 | #define __NR_ia32_linkat 303 |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 8e88efc565be..469952366ed4 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -270,6 +270,16 @@ struct ata_taskfile { | |||
270 | 270 | ||
271 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) | 271 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) |
272 | 272 | ||
273 | static inline unsigned int ata_id_major_version(const u16 *id) | ||
274 | { | ||
275 | unsigned int mver; | ||
276 | |||
277 | for (mver = 14; mver >= 1; mver--) | ||
278 | if (id[ATA_ID_MAJOR_VER] & (1 << mver)) | ||
279 | break; | ||
280 | return mver; | ||
281 | } | ||
282 | |||
273 | static inline int ata_id_current_chs_valid(const u16 *id) | 283 | static inline int ata_id_current_chs_valid(const u16 *id) |
274 | { | 284 | { |
275 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 285 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
diff --git a/include/linux/compat.h b/include/linux/compat.h index f9ca534787e2..c9ab2a26348c 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -161,5 +161,25 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from); | |||
161 | int get_compat_sigevent(struct sigevent *event, | 161 | int get_compat_sigevent(struct sigevent *event, |
162 | const struct compat_sigevent __user *u_event); | 162 | const struct compat_sigevent __user *u_event); |
163 | 163 | ||
164 | static inline int compat_timeval_compare(struct compat_timeval *lhs, | ||
165 | struct compat_timeval *rhs) | ||
166 | { | ||
167 | if (lhs->tv_sec < rhs->tv_sec) | ||
168 | return -1; | ||
169 | if (lhs->tv_sec > rhs->tv_sec) | ||
170 | return 1; | ||
171 | return lhs->tv_usec - rhs->tv_usec; | ||
172 | } | ||
173 | |||
174 | static inline int compat_timespec_compare(struct compat_timespec *lhs, | ||
175 | struct compat_timespec *rhs) | ||
176 | { | ||
177 | if (lhs->tv_sec < rhs->tv_sec) | ||
178 | return -1; | ||
179 | if (lhs->tv_sec > rhs->tv_sec) | ||
180 | return 1; | ||
181 | return lhs->tv_nsec - rhs->tv_nsec; | ||
182 | } | ||
183 | |||
164 | #endif /* CONFIG_COMPAT */ | 184 | #endif /* CONFIG_COMPAT */ |
165 | #endif /* _LINUX_COMPAT_H */ | 185 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 9873f4c54f1e..67d07c44b2e7 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -122,9 +122,8 @@ enum { | |||
122 | /* struct ata_device stuff */ | 122 | /* struct ata_device stuff */ |
123 | ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ | 123 | ATA_DFLAG_LBA48 = (1 << 0), /* device supports LBA48 */ |
124 | ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ | 124 | ATA_DFLAG_PIO = (1 << 1), /* device currently in PIO mode */ |
125 | ATA_DFLAG_LOCK_SECTORS = (1 << 2), /* don't adjust max_sectors */ | 125 | ATA_DFLAG_LBA = (1 << 2), /* device supports LBA */ |
126 | ATA_DFLAG_LBA = (1 << 3), /* device supports LBA */ | 126 | ATA_DFLAG_CDB_INTR = (1 << 3), /* device asserts INTRQ when ready for CDB */ |
127 | ATA_DFLAG_CDB_INTR = (1 << 4), /* device asserts INTRQ when ready for CDB */ | ||
128 | 127 | ||
129 | ATA_DEV_UNKNOWN = 0, /* unknown device */ | 128 | ATA_DEV_UNKNOWN = 0, /* unknown device */ |
130 | ATA_DEV_ATA = 1, /* ATA device */ | 129 | ATA_DEV_ATA = 1, /* ATA device */ |
@@ -353,6 +352,8 @@ struct ata_device { | |||
353 | 352 | ||
354 | unsigned int multi_count; /* sectors count for | 353 | unsigned int multi_count; /* sectors count for |
355 | READ/WRITE MULTIPLE */ | 354 | READ/WRITE MULTIPLE */ |
355 | unsigned int max_sectors; /* per-device max sectors */ | ||
356 | unsigned int cdb_len; | ||
356 | 357 | ||
357 | /* for CHS addressing */ | 358 | /* for CHS addressing */ |
358 | u16 cylinders; /* Number of cylinders */ | 359 | u16 cylinders; /* Number of cylinders */ |
@@ -382,7 +383,6 @@ struct ata_port { | |||
382 | unsigned int mwdma_mask; | 383 | unsigned int mwdma_mask; |
383 | unsigned int udma_mask; | 384 | unsigned int udma_mask; |
384 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ | 385 | unsigned int cbl; /* cable type; ATA_CBL_xxx */ |
385 | unsigned int cdb_len; | ||
386 | 386 | ||
387 | struct ata_device device[ATA_MAX_DEVICES]; | 387 | struct ata_device device[ATA_MAX_DEVICES]; |
388 | 388 | ||
@@ -543,6 +543,8 @@ extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, | |||
543 | extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); | 543 | extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); |
544 | extern void ata_dev_id_string(const u16 *id, unsigned char *s, | 544 | extern void ata_dev_id_string(const u16 *id, unsigned char *s, |
545 | unsigned int ofs, unsigned int len); | 545 | unsigned int ofs, unsigned int len); |
546 | extern void ata_dev_id_c_string(const u16 *id, unsigned char *s, | ||
547 | unsigned int ofs, unsigned int len); | ||
546 | extern void ata_dev_config(struct ata_port *ap, unsigned int i); | 548 | extern void ata_dev_config(struct ata_port *ap, unsigned int i); |
547 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 549 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
548 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 550 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7a61ccdcbc4b..82b83da25d77 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1087,6 +1087,7 @@ | |||
1087 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 | 1087 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 |
1088 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 | 1088 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 |
1089 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 | 1089 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 |
1090 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185 | ||
1090 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 | 1091 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 |
1091 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 | 1092 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 |
1092 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 | 1093 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 3877209d23c3..d73501ba7e44 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -557,6 +557,8 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | |||
557 | int mode); | 557 | int mode); |
558 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, | 558 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, |
559 | struct stat __user *statbuf, int flag); | 559 | struct stat __user *statbuf, int flag); |
560 | asmlinkage long sys_fstatat64(int dfd, char __user *filename, | ||
561 | struct stat64 __user *statbuf, int flag); | ||
560 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, | 562 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, |
561 | int bufsiz); | 563 | int bufsiz); |
562 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | 564 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, |
diff --git a/include/linux/time.h b/include/linux/time.h index 7b4dc36532bb..d9cdba54b789 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -33,11 +33,34 @@ struct timezone { | |||
33 | #define NSEC_PER_SEC 1000000000L | 33 | #define NSEC_PER_SEC 1000000000L |
34 | #define NSEC_PER_USEC 1000L | 34 | #define NSEC_PER_USEC 1000L |
35 | 35 | ||
36 | static __inline__ int timespec_equal(struct timespec *a, struct timespec *b) | 36 | static inline int timespec_equal(struct timespec *a, struct timespec *b) |
37 | { | 37 | { |
38 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); | 38 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); |
39 | } | 39 | } |
40 | 40 | ||
41 | /* | ||
42 | * lhs < rhs: return <0 | ||
43 | * lhs == rhs: return 0 | ||
44 | * lhs > rhs: return >0 | ||
45 | */ | ||
46 | static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | ||
47 | { | ||
48 | if (lhs->tv_sec < rhs->tv_sec) | ||
49 | return -1; | ||
50 | if (lhs->tv_sec > rhs->tv_sec) | ||
51 | return 1; | ||
52 | return lhs->tv_nsec - rhs->tv_nsec; | ||
53 | } | ||
54 | |||
55 | static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) | ||
56 | { | ||
57 | if (lhs->tv_sec < rhs->tv_sec) | ||
58 | return -1; | ||
59 | if (lhs->tv_sec > rhs->tv_sec) | ||
60 | return 1; | ||
61 | return lhs->tv_usec - rhs->tv_usec; | ||
62 | } | ||
63 | |||
41 | extern unsigned long mktime(const unsigned int year, const unsigned int mon, | 64 | extern unsigned long mktime(const unsigned int year, const unsigned int mon, |
42 | const unsigned int day, const unsigned int hour, | 65 | const unsigned int day, const unsigned int hour, |
43 | const unsigned int min, const unsigned int sec); | 66 | const unsigned int min, const unsigned int sec); |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 5db32fdfaf39..1838c15ca4fd 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -443,6 +443,10 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc) | |||
443 | BUG_ON(PageActive(page)); | 443 | BUG_ON(PageActive(page)); |
444 | 444 | ||
445 | sc->nr_scanned++; | 445 | sc->nr_scanned++; |
446 | |||
447 | if (!sc->may_swap && page_mapped(page)) | ||
448 | goto keep_locked; | ||
449 | |||
446 | /* Double the slab pressure for mapped and swapcache pages */ | 450 | /* Double the slab pressure for mapped and swapcache pages */ |
447 | if (page_mapped(page) || PageSwapCache(page)) | 451 | if (page_mapped(page) || PageSwapCache(page)) |
448 | sc->nr_scanned++; | 452 | sc->nr_scanned++; |
@@ -1191,9 +1195,47 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc) | |||
1191 | struct page *page; | 1195 | struct page *page; |
1192 | struct pagevec pvec; | 1196 | struct pagevec pvec; |
1193 | int reclaim_mapped = 0; | 1197 | int reclaim_mapped = 0; |
1194 | long mapped_ratio; | 1198 | |
1195 | long distress; | 1199 | if (unlikely(sc->may_swap)) { |
1196 | long swap_tendency; | 1200 | long mapped_ratio; |
1201 | long distress; | ||
1202 | long swap_tendency; | ||
1203 | |||
1204 | /* | ||
1205 | * `distress' is a measure of how much trouble we're having | ||
1206 | * reclaiming pages. 0 -> no problems. 100 -> great trouble. | ||
1207 | */ | ||
1208 | distress = 100 >> zone->prev_priority; | ||
1209 | |||
1210 | /* | ||
1211 | * The point of this algorithm is to decide when to start | ||
1212 | * reclaiming mapped memory instead of just pagecache. Work out | ||
1213 | * how much memory | ||
1214 | * is mapped. | ||
1215 | */ | ||
1216 | mapped_ratio = (sc->nr_mapped * 100) / total_memory; | ||
1217 | |||
1218 | /* | ||
1219 | * Now decide how much we really want to unmap some pages. The | ||
1220 | * mapped ratio is downgraded - just because there's a lot of | ||
1221 | * mapped memory doesn't necessarily mean that page reclaim | ||
1222 | * isn't succeeding. | ||
1223 | * | ||
1224 | * The distress ratio is important - we don't want to start | ||
1225 | * going oom. | ||
1226 | * | ||
1227 | * A 100% value of vm_swappiness overrides this algorithm | ||
1228 | * altogether. | ||
1229 | */ | ||
1230 | swap_tendency = mapped_ratio / 2 + distress + vm_swappiness; | ||
1231 | |||
1232 | /* | ||
1233 | * Now use this metric to decide whether to start moving mapped | ||
1234 | * memory onto the inactive list. | ||
1235 | */ | ||
1236 | if (swap_tendency >= 100) | ||
1237 | reclaim_mapped = 1; | ||
1238 | } | ||
1197 | 1239 | ||
1198 | lru_add_drain(); | 1240 | lru_add_drain(); |
1199 | spin_lock_irq(&zone->lru_lock); | 1241 | spin_lock_irq(&zone->lru_lock); |
@@ -1203,37 +1245,6 @@ refill_inactive_zone(struct zone *zone, struct scan_control *sc) | |||
1203 | zone->nr_active -= pgmoved; | 1245 | zone->nr_active -= pgmoved; |
1204 | spin_unlock_irq(&zone->lru_lock); | 1246 | spin_unlock_irq(&zone->lru_lock); |
1205 | 1247 | ||
1206 | /* | ||
1207 | * `distress' is a measure of how much trouble we're having reclaiming | ||
1208 | * pages. 0 -> no problems. 100 -> great trouble. | ||
1209 | */ | ||
1210 | distress = 100 >> zone->prev_priority; | ||
1211 | |||
1212 | /* | ||
1213 | * The point of this algorithm is to decide when to start reclaiming | ||
1214 | * mapped memory instead of just pagecache. Work out how much memory | ||
1215 | * is mapped. | ||
1216 | */ | ||
1217 | mapped_ratio = (sc->nr_mapped * 100) / total_memory; | ||
1218 | |||
1219 | /* | ||
1220 | * Now decide how much we really want to unmap some pages. The mapped | ||
1221 | * ratio is downgraded - just because there's a lot of mapped memory | ||
1222 | * doesn't necessarily mean that page reclaim isn't succeeding. | ||
1223 | * | ||
1224 | * The distress ratio is important - we don't want to start going oom. | ||
1225 | * | ||
1226 | * A 100% value of vm_swappiness overrides this algorithm altogether. | ||
1227 | */ | ||
1228 | swap_tendency = mapped_ratio / 2 + distress + vm_swappiness; | ||
1229 | |||
1230 | /* | ||
1231 | * Now use this metric to decide whether to start moving mapped memory | ||
1232 | * onto the inactive list. | ||
1233 | */ | ||
1234 | if (swap_tendency >= 100) | ||
1235 | reclaim_mapped = 1; | ||
1236 | |||
1237 | while (!list_empty(&l_hold)) { | 1248 | while (!list_empty(&l_hold)) { |
1238 | cond_resched(); | 1249 | cond_resched(); |
1239 | page = lru_to_page(&l_hold); | 1250 | page = lru_to_page(&l_hold); |
@@ -1610,9 +1621,7 @@ scan: | |||
1610 | sc.nr_reclaimed = 0; | 1621 | sc.nr_reclaimed = 0; |
1611 | sc.priority = priority; | 1622 | sc.priority = priority; |
1612 | sc.swap_cluster_max = nr_pages? nr_pages : SWAP_CLUSTER_MAX; | 1623 | sc.swap_cluster_max = nr_pages? nr_pages : SWAP_CLUSTER_MAX; |
1613 | atomic_inc(&zone->reclaim_in_progress); | ||
1614 | shrink_zone(zone, &sc); | 1624 | shrink_zone(zone, &sc); |
1615 | atomic_dec(&zone->reclaim_in_progress); | ||
1616 | reclaim_state->reclaimed_slab = 0; | 1625 | reclaim_state->reclaimed_slab = 0; |
1617 | nr_slab = shrink_slab(sc.nr_scanned, GFP_KERNEL, | 1626 | nr_slab = shrink_slab(sc.nr_scanned, GFP_KERNEL, |
1618 | lru_pages); | 1627 | lru_pages); |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index b5018166b0e5..c06cb0983530 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -805,7 +805,7 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb, | |||
805 | print_error: | 805 | print_error: |
806 | if (skb->dev != NULL) { | 806 | if (skb->dev != NULL) { |
807 | printk("[%s]", skb->dev->name); | 807 | printk("[%s]", skb->dev->name); |
808 | if (has_bridge_parent(skb->dev)) | 808 | if (bridge_parent(skb->dev)) |
809 | printk("[%s]", bridge_parent(skb->dev)->name); | 809 | printk("[%s]", bridge_parent(skb->dev)->name); |
810 | } | 810 | } |
811 | printk(" head:%p, raw:%p, data:%p\n", skb->head, skb->mac.raw, | 811 | printk(" head:%p, raw:%p, data:%p\n", skb->head, skb->mac.raw, |