diff options
135 files changed, 2513 insertions, 1979 deletions
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 22e5f9036f3c..eb7db3c19227 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -410,7 +410,26 @@ Kernel messages do not have to be terminated with a period. | |||
410 | Printing numbers in parentheses (%d) adds no value and should be avoided. | 410 | Printing numbers in parentheses (%d) adds no value and should be avoided. |
411 | 411 | ||
412 | 412 | ||
413 | Chapter 13: References | 413 | Chapter 13: Allocating memory |
414 | |||
415 | The kernel provides the following general purpose memory allocators: | ||
416 | kmalloc(), kzalloc(), kcalloc(), and vmalloc(). Please refer to the API | ||
417 | documentation for further information about them. | ||
418 | |||
419 | The preferred form for passing a size of a struct is the following: | ||
420 | |||
421 | p = kmalloc(sizeof(*p), ...); | ||
422 | |||
423 | The alternative form where struct name is spelled out hurts readability and | ||
424 | introduces an opportunity for a bug when the pointer variable type is changed | ||
425 | but the corresponding sizeof that is passed to a memory allocator is not. | ||
426 | |||
427 | Casting the return value which is a void pointer is redundant. The conversion | ||
428 | from void pointer to any other pointer type is guaranteed by the C programming | ||
429 | language. | ||
430 | |||
431 | |||
432 | Chapter 14: References | ||
414 | 433 | ||
415 | The C Programming Language, Second Edition | 434 | The C Programming Language, Second Edition |
416 | by Brian W. Kernighan and Dennis M. Ritchie. | 435 | by Brian W. Kernighan and Dennis M. Ritchie. |
diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt index bcfa5c35036b..95d7f62e4dbc 100644 --- a/Documentation/dell_rbu.txt +++ b/Documentation/dell_rbu.txt | |||
@@ -13,6 +13,8 @@ the BIOS on Dell servers (starting from servers sold since 1999), desktops | |||
13 | and notebooks (starting from those sold in 2005). | 13 | and notebooks (starting from those sold in 2005). |
14 | Please go to http://support.dell.com register and you can find info on | 14 | Please go to http://support.dell.com register and you can find info on |
15 | OpenManage and Dell Update packages (DUP). | 15 | OpenManage and Dell Update packages (DUP). |
16 | Libsmbios can also be used to update BIOS on Dell systems go to | ||
17 | http://linux.dell.com/libsmbios/ for details. | ||
16 | 18 | ||
17 | Dell_RBU driver supports BIOS update using the monilothic image and packetized | 19 | Dell_RBU driver supports BIOS update using the monilothic image and packetized |
18 | image methods. In case of moniolithic the driver allocates a contiguous chunk | 20 | image methods. In case of moniolithic the driver allocates a contiguous chunk |
@@ -22,8 +24,8 @@ would place each packet in contiguous physical memory. The driver also | |||
22 | maintains a link list of packets for reading them back. | 24 | maintains a link list of packets for reading them back. |
23 | If the dell_rbu driver is unloaded all the allocated memory is freed. | 25 | If the dell_rbu driver is unloaded all the allocated memory is freed. |
24 | 26 | ||
25 | The rbu driver needs to have an application which will inform the BIOS to | 27 | The rbu driver needs to have an application (as mentioned above)which will |
26 | enable the update in the next system reboot. | 28 | inform the BIOS to enable the update in the next system reboot. |
27 | 29 | ||
28 | The user should not unload the rbu driver after downloading the BIOS image | 30 | The user should not unload the rbu driver after downloading the BIOS image |
29 | or updating. | 31 | or updating. |
@@ -42,9 +44,11 @@ In case of packet mechanism the single memory can be broken in smaller chuks | |||
42 | of contiguous memory and the BIOS image is scattered in these packets. | 44 | of contiguous memory and the BIOS image is scattered in these packets. |
43 | 45 | ||
44 | By default the driver uses monolithic memory for the update type. This can be | 46 | By default the driver uses monolithic memory for the update type. This can be |
45 | changed to contiguous during the driver load time by specifying the load | 47 | changed to packets during the driver load time by specifying the load |
46 | parameter image_type=packet. This can also be changed later as below | 48 | parameter image_type=packet. This can also be changed later as below |
47 | echo packet > /sys/devices/platform/dell_rbu/image_type | 49 | echo packet > /sys/devices/platform/dell_rbu/image_type |
50 | Also echoing either mono ,packet or init in to image_type will free up the | ||
51 | memory allocated by the driver. | ||
48 | 52 | ||
49 | Do the steps below to download the BIOS image. | 53 | Do the steps below to download the BIOS image. |
50 | 1) echo 1 > /sys/class/firmware/dell_rbu/loading | 54 | 1) echo 1 > /sys/class/firmware/dell_rbu/loading |
@@ -53,9 +57,13 @@ Do the steps below to download the BIOS image. | |||
53 | 57 | ||
54 | The /sys/class/firmware/dell_rbu/ entries will remain till the following is | 58 | The /sys/class/firmware/dell_rbu/ entries will remain till the following is |
55 | done. | 59 | done. |
56 | echo -1 > /sys/class/firmware/dell_rbu/loading | 60 | echo -1 > /sys/class/firmware/dell_rbu/loading. |
57 | |||
58 | Until this step is completed the drivr cannot be unloaded. | 61 | Until this step is completed the drivr cannot be unloaded. |
62 | If an user by accident executes steps 1 and 3 above without executing step 2; | ||
63 | it will make the /sys/class/firmware/dell_rbu/ entries to disappear. | ||
64 | The entries can be recreated by doing the following | ||
65 | echo init > /sys/devices/platform/dell_rbu/image_type | ||
66 | NOTE: echoing init in image_type does not change it original value. | ||
59 | 67 | ||
60 | Also the driver provides /sys/devices/platform/dell_rbu/data readonly file to | 68 | Also the driver provides /sys/devices/platform/dell_rbu/data readonly file to |
61 | read back the image downloaded. This is useful in case of packet update | 69 | read back the image downloaded. This is useful in case of packet update |
diff --git a/Documentation/filesystems/relayfs.txt b/Documentation/filesystems/relayfs.txt index d24e1b0d4f39..d803abed29f0 100644 --- a/Documentation/filesystems/relayfs.txt +++ b/Documentation/filesystems/relayfs.txt | |||
@@ -15,7 +15,7 @@ retrieve the data as it becomes available. | |||
15 | 15 | ||
16 | The format of the data logged into the channel buffers is completely | 16 | The format of the data logged into the channel buffers is completely |
17 | up to the relayfs client; relayfs does however provide hooks which | 17 | up to the relayfs client; relayfs does however provide hooks which |
18 | allow clients to impose some stucture on the buffer data. Nor does | 18 | allow clients to impose some structure on the buffer data. Nor does |
19 | relayfs implement any form of data filtering - this also is left to | 19 | relayfs implement any form of data filtering - this also is left to |
20 | the client. The purpose is to keep relayfs as simple as possible. | 20 | the client. The purpose is to keep relayfs as simple as possible. |
21 | 21 | ||
diff --git a/Documentation/ia64/mca.txt b/Documentation/ia64/mca.txt new file mode 100644 index 000000000000..a71cc6a67ef7 --- /dev/null +++ b/Documentation/ia64/mca.txt | |||
@@ -0,0 +1,194 @@ | |||
1 | An ad-hoc collection of notes on IA64 MCA and INIT processing. Feel | ||
2 | free to update it with notes about any area that is not clear. | ||
3 | |||
4 | --- | ||
5 | |||
6 | MCA/INIT are completely asynchronous. They can occur at any time, when | ||
7 | the OS is in any state. Including when one of the cpus is already | ||
8 | holding a spinlock. Trying to get any lock from MCA/INIT state is | ||
9 | asking for deadlock. Also the state of structures that are protected | ||
10 | by locks is indeterminate, including linked lists. | ||
11 | |||
12 | --- | ||
13 | |||
14 | The complicated ia64 MCA process. All of this is mandated by Intel's | ||
15 | specification for ia64 SAL, error recovery and and unwind, it is not as | ||
16 | if we have a choice here. | ||
17 | |||
18 | * MCA occurs on one cpu, usually due to a double bit memory error. | ||
19 | This is the monarch cpu. | ||
20 | |||
21 | * SAL sends an MCA rendezvous interrupt (which is a normal interrupt) | ||
22 | to all the other cpus, the slaves. | ||
23 | |||
24 | * Slave cpus that receive the MCA interrupt call down into SAL, they | ||
25 | end up spinning disabled while the MCA is being serviced. | ||
26 | |||
27 | * If any slave cpu was already spinning disabled when the MCA occurred | ||
28 | then it cannot service the MCA interrupt. SAL waits ~20 seconds then | ||
29 | sends an unmaskable INIT event to the slave cpus that have not | ||
30 | already rendezvoused. | ||
31 | |||
32 | * Because MCA/INIT can be delivered at any time, including when the cpu | ||
33 | is down in PAL in physical mode, the registers at the time of the | ||
34 | event are _completely_ undefined. In particular the MCA/INIT | ||
35 | handlers cannot rely on the thread pointer, PAL physical mode can | ||
36 | (and does) modify TP. It is allowed to do that as long as it resets | ||
37 | TP on return. However MCA/INIT events expose us to these PAL | ||
38 | internal TP changes. Hence curr_task(). | ||
39 | |||
40 | * If an MCA/INIT event occurs while the kernel was running (not user | ||
41 | space) and the kernel has called PAL then the MCA/INIT handler cannot | ||
42 | assume that the kernel stack is in a fit state to be used. Mainly | ||
43 | because PAL may or may not maintain the stack pointer internally. | ||
44 | Because the MCA/INIT handlers cannot trust the kernel stack, they | ||
45 | have to use their own, per-cpu stacks. The MCA/INIT stacks are | ||
46 | preformatted with just enough task state to let the relevant handlers | ||
47 | do their job. | ||
48 | |||
49 | * Unlike most other architectures, the ia64 struct task is embedded in | ||
50 | the kernel stack[1]. So switching to a new kernel stack means that | ||
51 | we switch to a new task as well. Because various bits of the kernel | ||
52 | assume that current points into the struct task, switching to a new | ||
53 | stack also means a new value for current. | ||
54 | |||
55 | * Once all slaves have rendezvoused and are spinning disabled, the | ||
56 | monarch is entered. The monarch now tries to diagnose the problem | ||
57 | and decide if it can recover or not. | ||
58 | |||
59 | * Part of the monarch's job is to look at the state of all the other | ||
60 | tasks. The only way to do that on ia64 is to call the unwinder, | ||
61 | as mandated by Intel. | ||
62 | |||
63 | * The starting point for the unwind depends on whether a task is | ||
64 | running or not. That is, whether it is on a cpu or is blocked. The | ||
65 | monarch has to determine whether or not a task is on a cpu before it | ||
66 | knows how to start unwinding it. The tasks that received an MCA or | ||
67 | INIT event are no longer running, they have been converted to blocked | ||
68 | tasks. But (and its a big but), the cpus that received the MCA | ||
69 | rendezvous interrupt are still running on their normal kernel stacks! | ||
70 | |||
71 | * To distinguish between these two cases, the monarch must know which | ||
72 | tasks are on a cpu and which are not. Hence each slave cpu that | ||
73 | switches to an MCA/INIT stack, registers its new stack using | ||
74 | set_curr_task(), so the monarch can tell that the _original_ task is | ||
75 | no longer running on that cpu. That gives us a decent chance of | ||
76 | getting a valid backtrace of the _original_ task. | ||
77 | |||
78 | * MCA/INIT can be nested, to a depth of 2 on any cpu. In the case of a | ||
79 | nested error, we want diagnostics on the MCA/INIT handler that | ||
80 | failed, not on the task that was originally running. Again this | ||
81 | requires set_curr_task() so the MCA/INIT handlers can register their | ||
82 | own stack as running on that cpu. Then a recursive error gets a | ||
83 | trace of the failing handler's "task". | ||
84 | |||
85 | [1] My (Keith Owens) original design called for ia64 to separate its | ||
86 | struct task and the kernel stacks. Then the MCA/INIT data would be | ||
87 | chained stacks like i386 interrupt stacks. But that required | ||
88 | radical surgery on the rest of ia64, plus extra hard wired TLB | ||
89 | entries with its associated performance degradation. David | ||
90 | Mosberger vetoed that approach. Which meant that separate kernel | ||
91 | stacks meant separate "tasks" for the MCA/INIT handlers. | ||
92 | |||
93 | --- | ||
94 | |||
95 | INIT is less complicated than MCA. Pressing the nmi button or using | ||
96 | the equivalent command on the management console sends INIT to all | ||
97 | cpus. SAL picks one one of the cpus as the monarch and the rest are | ||
98 | slaves. All the OS INIT handlers are entered at approximately the same | ||
99 | time. The OS monarch prints the state of all tasks and returns, after | ||
100 | which the slaves return and the system resumes. | ||
101 | |||
102 | At least that is what is supposed to happen. Alas there are broken | ||
103 | versions of SAL out there. Some drive all the cpus as monarchs. Some | ||
104 | drive them all as slaves. Some drive one cpu as monarch, wait for that | ||
105 | cpu to return from the OS then drive the rest as slaves. Some versions | ||
106 | of SAL cannot even cope with returning from the OS, they spin inside | ||
107 | SAL on resume. The OS INIT code has workarounds for some of these | ||
108 | broken SAL symptoms, but some simply cannot be fixed from the OS side. | ||
109 | |||
110 | --- | ||
111 | |||
112 | The scheduler hooks used by ia64 (curr_task, set_curr_task) are layer | ||
113 | violations. Unfortunately MCA/INIT start off as massive layer | ||
114 | violations (can occur at _any_ time) and they build from there. | ||
115 | |||
116 | At least ia64 makes an attempt at recovering from hardware errors, but | ||
117 | it is a difficult problem because of the asynchronous nature of these | ||
118 | errors. When processing an unmaskable interrupt we sometimes need | ||
119 | special code to cope with our inability to take any locks. | ||
120 | |||
121 | --- | ||
122 | |||
123 | How is ia64 MCA/INIT different from x86 NMI? | ||
124 | |||
125 | * x86 NMI typically gets delivered to one cpu. MCA/INIT gets sent to | ||
126 | all cpus. | ||
127 | |||
128 | * x86 NMI cannot be nested. MCA/INIT can be nested, to a depth of 2 | ||
129 | per cpu. | ||
130 | |||
131 | * x86 has a separate struct task which points to one of multiple kernel | ||
132 | stacks. ia64 has the struct task embedded in the single kernel | ||
133 | stack, so switching stack means switching task. | ||
134 | |||
135 | * x86 does not call the BIOS so the NMI handler does not have to worry | ||
136 | about any registers having changed. MCA/INIT can occur while the cpu | ||
137 | is in PAL in physical mode, with undefined registers and an undefined | ||
138 | kernel stack. | ||
139 | |||
140 | * i386 backtrace is not very sensitive to whether a process is running | ||
141 | or not. ia64 unwind is very, very sensitive to whether a process is | ||
142 | running or not. | ||
143 | |||
144 | --- | ||
145 | |||
146 | What happens when MCA/INIT is delivered what a cpu is running user | ||
147 | space code? | ||
148 | |||
149 | The user mode registers are stored in the RSE area of the MCA/INIT on | ||
150 | entry to the OS and are restored from there on return to SAL, so user | ||
151 | mode registers are preserved across a recoverable MCA/INIT. Since the | ||
152 | OS has no idea what unwind data is available for the user space stack, | ||
153 | MCA/INIT never tries to backtrace user space. Which means that the OS | ||
154 | does not bother making the user space process look like a blocked task, | ||
155 | i.e. the OS does not copy pt_regs and switch_stack to the user space | ||
156 | stack. Also the OS has no idea how big the user space RSE and memory | ||
157 | stacks are, which makes it too risky to copy the saved state to a user | ||
158 | mode stack. | ||
159 | |||
160 | --- | ||
161 | |||
162 | How do we get a backtrace on the tasks that were running when MCA/INIT | ||
163 | was delivered? | ||
164 | |||
165 | mca.c:::ia64_mca_modify_original_stack(). That identifies and | ||
166 | verifies the original kernel stack, copies the dirty registers from | ||
167 | the MCA/INIT stack's RSE to the original stack's RSE, copies the | ||
168 | skeleton struct pt_regs and switch_stack to the original stack, fills | ||
169 | in the skeleton structures from the PAL minstate area and updates the | ||
170 | original stack's thread.ksp. That makes the original stack look | ||
171 | exactly like any other blocked task, i.e. it now appears to be | ||
172 | sleeping. To get a backtrace, just start with thread.ksp for the | ||
173 | original task and unwind like any other sleeping task. | ||
174 | |||
175 | --- | ||
176 | |||
177 | How do we identify the tasks that were running when MCA/INIT was | ||
178 | delivered? | ||
179 | |||
180 | If the previous task has been verified and converted to a blocked | ||
181 | state, then sos->prev_task on the MCA/INIT stack is updated to point to | ||
182 | the previous task. You can look at that field in dumps or debuggers. | ||
183 | To help distinguish between the handler and the original tasks, | ||
184 | handlers have _TIF_MCA_INIT set in thread_info.flags. | ||
185 | |||
186 | The sos data is always in the MCA/INIT handler stack, at offset | ||
187 | MCA_SOS_OFFSET. You can get that value from mca_asm.h or calculate it | ||
188 | as KERNEL_STACK_SIZE - sizeof(struct pt_regs) - sizeof(struct | ||
189 | ia64_sal_os_state), with 16 byte alignment for all structures. | ||
190 | |||
191 | Also the comm field of the MCA/INIT task is modified to include the pid | ||
192 | of the original task, for humans to use. For example, a comm field of | ||
193 | 'MCA 12159' means that pid 12159 was running when the MCA was | ||
194 | delivered. | ||
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 0636116210d2..01fe990d3e54 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/namei.h> | 37 | #include <linux/namei.h> |
38 | #include <linux/uio.h> | 38 | #include <linux/uio.h> |
39 | #include <linux/vfs.h> | 39 | #include <linux/vfs.h> |
40 | #include <linux/rcupdate.h> | ||
40 | 41 | ||
41 | #include <asm/fpu.h> | 42 | #include <asm/fpu.h> |
42 | #include <asm/io.h> | 43 | #include <asm/io.h> |
@@ -975,6 +976,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
975 | long timeout; | 976 | long timeout; |
976 | int ret = -EINVAL; | 977 | int ret = -EINVAL; |
977 | struct fdtable *fdt; | 978 | struct fdtable *fdt; |
979 | int max_fdset; | ||
978 | 980 | ||
979 | timeout = MAX_SCHEDULE_TIMEOUT; | 981 | timeout = MAX_SCHEDULE_TIMEOUT; |
980 | if (tvp) { | 982 | if (tvp) { |
@@ -996,8 +998,11 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
996 | } | 998 | } |
997 | } | 999 | } |
998 | 1000 | ||
1001 | rcu_read_lock(); | ||
999 | fdt = files_fdtable(current->files); | 1002 | fdt = files_fdtable(current->files); |
1000 | if (n < 0 || n > fdt->max_fdset) | 1003 | max_fdset = fdt->max_fdset; |
1004 | rcu_read_unlock(); | ||
1005 | if (n < 0 || n > max_fdset) | ||
1001 | goto out_nofds; | 1006 | goto out_nofds; |
1002 | 1007 | ||
1003 | /* | 1008 | /* |
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 2786f7c34b3f..a7bd85700152 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -551,7 +551,7 @@ struct locomo_save_data { | |||
551 | u16 LCM_SPIMD; | 551 | u16 LCM_SPIMD; |
552 | }; | 552 | }; |
553 | 553 | ||
554 | static int locomo_suspend(struct device *dev, u32 pm_message_t, u32 level) | 554 | static int locomo_suspend(struct device *dev, pm_message_t state, u32 level) |
555 | { | 555 | { |
556 | struct locomo *lchip = dev_get_drvdata(dev); | 556 | struct locomo *lchip = dev_get_drvdata(dev); |
557 | struct locomo_save_data *save; | 557 | struct locomo_save_data *save; |
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig index f67ca01b4982..30e6444f9aaa 100644 --- a/arch/arm/configs/enp2611_defconfig +++ b/arch/arm/configs/enp2611_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.13-rc2 | 3 | # Linux kernel version: 2.6.13 |
4 | # Thu Jul 7 16:41:21 2005 | 4 | # Wed Sep 14 10:51:52 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -135,7 +135,6 @@ CONFIG_PCI_NAMES=y | |||
135 | # | 135 | # |
136 | # Kernel Features | 136 | # Kernel Features |
137 | # | 137 | # |
138 | # CONFIG_SMP is not set | ||
139 | # CONFIG_PREEMPT is not set | 138 | # CONFIG_PREEMPT is not set |
140 | # CONFIG_NO_IDLE_HZ is not set | 139 | # CONFIG_NO_IDLE_HZ is not set |
141 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 140 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
@@ -179,6 +178,68 @@ CONFIG_BINFMT_ELF=y | |||
179 | # CONFIG_PM is not set | 178 | # CONFIG_PM is not set |
180 | 179 | ||
181 | # | 180 | # |
181 | # Networking | ||
182 | # | ||
183 | CONFIG_NET=y | ||
184 | |||
185 | # | ||
186 | # Networking options | ||
187 | # | ||
188 | CONFIG_PACKET=y | ||
189 | CONFIG_PACKET_MMAP=y | ||
190 | CONFIG_UNIX=y | ||
191 | # CONFIG_NET_KEY is not set | ||
192 | CONFIG_INET=y | ||
193 | # CONFIG_IP_MULTICAST is not set | ||
194 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
195 | CONFIG_IP_FIB_HASH=y | ||
196 | CONFIG_IP_PNP=y | ||
197 | CONFIG_IP_PNP_DHCP=y | ||
198 | CONFIG_IP_PNP_BOOTP=y | ||
199 | # CONFIG_IP_PNP_RARP is not set | ||
200 | # CONFIG_NET_IPIP is not set | ||
201 | # CONFIG_NET_IPGRE is not set | ||
202 | # CONFIG_ARPD is not set | ||
203 | CONFIG_SYN_COOKIES=y | ||
204 | # CONFIG_INET_AH is not set | ||
205 | # CONFIG_INET_ESP is not set | ||
206 | # CONFIG_INET_IPCOMP is not set | ||
207 | # CONFIG_INET_TUNNEL is not set | ||
208 | # CONFIG_IP_TCPDIAG is not set | ||
209 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
210 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
211 | CONFIG_TCP_CONG_BIC=y | ||
212 | # CONFIG_IPV6 is not set | ||
213 | # CONFIG_NETFILTER is not set | ||
214 | |||
215 | # | ||
216 | # SCTP Configuration (EXPERIMENTAL) | ||
217 | # | ||
218 | # CONFIG_IP_SCTP is not set | ||
219 | # CONFIG_ATM is not set | ||
220 | # CONFIG_BRIDGE is not set | ||
221 | # CONFIG_VLAN_8021Q is not set | ||
222 | # CONFIG_DECNET is not set | ||
223 | # CONFIG_LLC2 is not set | ||
224 | # CONFIG_IPX is not set | ||
225 | # CONFIG_ATALK is not set | ||
226 | # CONFIG_X25 is not set | ||
227 | # CONFIG_LAPB is not set | ||
228 | # CONFIG_NET_DIVERT is not set | ||
229 | # CONFIG_ECONET is not set | ||
230 | # CONFIG_WAN_ROUTER is not set | ||
231 | # CONFIG_NET_SCHED is not set | ||
232 | # CONFIG_NET_CLS_ROUTE is not set | ||
233 | |||
234 | # | ||
235 | # Network testing | ||
236 | # | ||
237 | # CONFIG_NET_PKTGEN is not set | ||
238 | # CONFIG_HAMRADIO is not set | ||
239 | # CONFIG_IRDA is not set | ||
240 | # CONFIG_BT is not set | ||
241 | |||
242 | # | ||
182 | # Device Drivers | 243 | # Device Drivers |
183 | # | 244 | # |
184 | 245 | ||
@@ -248,6 +309,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
248 | CONFIG_MTD_IXP2000=y | 309 | CONFIG_MTD_IXP2000=y |
249 | # CONFIG_MTD_EDB7312 is not set | 310 | # CONFIG_MTD_EDB7312 is not set |
250 | # CONFIG_MTD_PCI is not set | 311 | # CONFIG_MTD_PCI is not set |
312 | # CONFIG_MTD_PLATRAM is not set | ||
251 | 313 | ||
252 | # | 314 | # |
253 | # Self-contained MTD device drivers | 315 | # Self-contained MTD device drivers |
@@ -334,72 +396,8 @@ CONFIG_IOSCHED_CFQ=y | |||
334 | # CONFIG_I2O is not set | 396 | # CONFIG_I2O is not set |
335 | 397 | ||
336 | # | 398 | # |
337 | # Networking support | 399 | # Network device support |
338 | # | ||
339 | CONFIG_NET=y | ||
340 | |||
341 | # | ||
342 | # Networking options | ||
343 | # | ||
344 | CONFIG_PACKET=y | ||
345 | CONFIG_PACKET_MMAP=y | ||
346 | CONFIG_UNIX=y | ||
347 | # CONFIG_NET_KEY is not set | ||
348 | CONFIG_INET=y | ||
349 | # CONFIG_IP_MULTICAST is not set | ||
350 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
351 | CONFIG_IP_FIB_HASH=y | ||
352 | CONFIG_IP_PNP=y | ||
353 | CONFIG_IP_PNP_DHCP=y | ||
354 | CONFIG_IP_PNP_BOOTP=y | ||
355 | # CONFIG_IP_PNP_RARP is not set | ||
356 | # CONFIG_NET_IPIP is not set | ||
357 | # CONFIG_NET_IPGRE is not set | ||
358 | # CONFIG_ARPD is not set | ||
359 | CONFIG_SYN_COOKIES=y | ||
360 | # CONFIG_INET_AH is not set | ||
361 | # CONFIG_INET_ESP is not set | ||
362 | # CONFIG_INET_IPCOMP is not set | ||
363 | # CONFIG_INET_TUNNEL is not set | ||
364 | # CONFIG_IP_TCPDIAG is not set | ||
365 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
366 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
367 | CONFIG_TCP_CONG_BIC=y | ||
368 | # CONFIG_IPV6 is not set | ||
369 | # CONFIG_NETFILTER is not set | ||
370 | |||
371 | # | ||
372 | # SCTP Configuration (EXPERIMENTAL) | ||
373 | # | ||
374 | # CONFIG_IP_SCTP is not set | ||
375 | # CONFIG_ATM is not set | ||
376 | # CONFIG_BRIDGE is not set | ||
377 | # CONFIG_VLAN_8021Q is not set | ||
378 | # CONFIG_DECNET is not set | ||
379 | # CONFIG_LLC2 is not set | ||
380 | # CONFIG_IPX is not set | ||
381 | # CONFIG_ATALK is not set | ||
382 | # CONFIG_X25 is not set | ||
383 | # CONFIG_LAPB is not set | ||
384 | # CONFIG_NET_DIVERT is not set | ||
385 | # CONFIG_ECONET is not set | ||
386 | # CONFIG_WAN_ROUTER is not set | ||
387 | |||
388 | # | ||
389 | # QoS and/or fair queueing | ||
390 | # | ||
391 | # CONFIG_NET_SCHED is not set | ||
392 | # CONFIG_NET_CLS_ROUTE is not set | ||
393 | |||
394 | # | ||
395 | # Network testing | ||
396 | # | 400 | # |
397 | # CONFIG_NET_PKTGEN is not set | ||
398 | # CONFIG_NETPOLL is not set | ||
399 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
400 | # CONFIG_HAMRADIO is not set | ||
401 | # CONFIG_IRDA is not set | ||
402 | # CONFIG_BT is not set | ||
403 | CONFIG_NETDEVICES=y | 401 | CONFIG_NETDEVICES=y |
404 | CONFIG_DUMMY=y | 402 | CONFIG_DUMMY=y |
405 | # CONFIG_BONDING is not set | 403 | # CONFIG_BONDING is not set |
@@ -509,6 +507,8 @@ CONFIG_DLCI_MAX=8 | |||
509 | # CONFIG_SLIP is not set | 507 | # CONFIG_SLIP is not set |
510 | # CONFIG_SHAPER is not set | 508 | # CONFIG_SHAPER is not set |
511 | # CONFIG_NETCONSOLE is not set | 509 | # CONFIG_NETCONSOLE is not set |
510 | # CONFIG_NETPOLL is not set | ||
511 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
512 | 512 | ||
513 | # | 513 | # |
514 | # ISDN subsystem | 514 | # ISDN subsystem |
@@ -635,7 +635,7 @@ CONFIG_I2C_ALGOBIT=y | |||
635 | # CONFIG_I2C_I810 is not set | 635 | # CONFIG_I2C_I810 is not set |
636 | # CONFIG_I2C_PIIX4 is not set | 636 | # CONFIG_I2C_PIIX4 is not set |
637 | # CONFIG_I2C_ISA is not set | 637 | # CONFIG_I2C_ISA is not set |
638 | # CONFIG_I2C_IXP2000 is not set | 638 | CONFIG_I2C_IXP2000=y |
639 | # CONFIG_I2C_NFORCE2 is not set | 639 | # CONFIG_I2C_NFORCE2 is not set |
640 | # CONFIG_I2C_PARPORT_LIGHT is not set | 640 | # CONFIG_I2C_PARPORT_LIGHT is not set |
641 | # CONFIG_I2C_PROSAVAGE is not set | 641 | # CONFIG_I2C_PROSAVAGE is not set |
@@ -649,11 +649,28 @@ CONFIG_I2C_ALGOBIT=y | |||
649 | # CONFIG_I2C_VIAPRO is not set | 649 | # CONFIG_I2C_VIAPRO is not set |
650 | # CONFIG_I2C_VOODOO3 is not set | 650 | # CONFIG_I2C_VOODOO3 is not set |
651 | # CONFIG_I2C_PCA_ISA is not set | 651 | # CONFIG_I2C_PCA_ISA is not set |
652 | CONFIG_I2C_SENSOR=y | ||
652 | 653 | ||
653 | # | 654 | # |
654 | # Hardware Sensors Chip support | 655 | # Miscellaneous I2C Chip support |
655 | # | 656 | # |
656 | CONFIG_I2C_SENSOR=y | 657 | # CONFIG_SENSORS_DS1337 is not set |
658 | # CONFIG_SENSORS_DS1374 is not set | ||
659 | CONFIG_SENSORS_EEPROM=y | ||
660 | # CONFIG_SENSORS_PCF8574 is not set | ||
661 | # CONFIG_SENSORS_PCA9539 is not set | ||
662 | # CONFIG_SENSORS_PCF8591 is not set | ||
663 | # CONFIG_SENSORS_RTC8564 is not set | ||
664 | # CONFIG_SENSORS_MAX6875 is not set | ||
665 | # CONFIG_I2C_DEBUG_CORE is not set | ||
666 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
667 | # CONFIG_I2C_DEBUG_BUS is not set | ||
668 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
669 | |||
670 | # | ||
671 | # Hardware Monitoring support | ||
672 | # | ||
673 | CONFIG_HWMON=y | ||
657 | # CONFIG_SENSORS_ADM1021 is not set | 674 | # CONFIG_SENSORS_ADM1021 is not set |
658 | # CONFIG_SENSORS_ADM1025 is not set | 675 | # CONFIG_SENSORS_ADM1025 is not set |
659 | # CONFIG_SENSORS_ADM1026 is not set | 676 | # CONFIG_SENSORS_ADM1026 is not set |
@@ -679,30 +696,15 @@ CONFIG_I2C_SENSOR=y | |||
679 | # CONFIG_SENSORS_LM92 is not set | 696 | # CONFIG_SENSORS_LM92 is not set |
680 | # CONFIG_SENSORS_MAX1619 is not set | 697 | # CONFIG_SENSORS_MAX1619 is not set |
681 | # CONFIG_SENSORS_PC87360 is not set | 698 | # CONFIG_SENSORS_PC87360 is not set |
682 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
683 | # CONFIG_SENSORS_SIS5595 is not set | 699 | # CONFIG_SENSORS_SIS5595 is not set |
684 | # CONFIG_SENSORS_SMSC47M1 is not set | 700 | # CONFIG_SENSORS_SMSC47M1 is not set |
701 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
685 | # CONFIG_SENSORS_VIA686A is not set | 702 | # CONFIG_SENSORS_VIA686A is not set |
686 | # CONFIG_SENSORS_W83781D is not set | 703 | # CONFIG_SENSORS_W83781D is not set |
687 | # CONFIG_SENSORS_W83L785TS is not set | 704 | # CONFIG_SENSORS_W83L785TS is not set |
688 | # CONFIG_SENSORS_W83627HF is not set | 705 | # CONFIG_SENSORS_W83627HF is not set |
689 | # CONFIG_SENSORS_W83627EHF is not set | 706 | # CONFIG_SENSORS_W83627EHF is not set |
690 | 707 | # CONFIG_HWMON_DEBUG_CHIP is not set | |
691 | # | ||
692 | # Other I2C Chip support | ||
693 | # | ||
694 | # CONFIG_SENSORS_DS1337 is not set | ||
695 | # CONFIG_SENSORS_DS1374 is not set | ||
696 | CONFIG_SENSORS_EEPROM=y | ||
697 | # CONFIG_SENSORS_PCF8574 is not set | ||
698 | # CONFIG_SENSORS_PCA9539 is not set | ||
699 | # CONFIG_SENSORS_PCF8591 is not set | ||
700 | # CONFIG_SENSORS_RTC8564 is not set | ||
701 | # CONFIG_SENSORS_MAX6875 is not set | ||
702 | # CONFIG_I2C_DEBUG_CORE is not set | ||
703 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
704 | # CONFIG_I2C_DEBUG_BUS is not set | ||
705 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
706 | 708 | ||
707 | # | 709 | # |
708 | # Misc devices | 710 | # Misc devices |
@@ -770,6 +772,7 @@ CONFIG_FS_POSIX_ACL=y | |||
770 | # CONFIG_XFS_FS is not set | 772 | # CONFIG_XFS_FS is not set |
771 | # CONFIG_MINIX_FS is not set | 773 | # CONFIG_MINIX_FS is not set |
772 | # CONFIG_ROMFS_FS is not set | 774 | # CONFIG_ROMFS_FS is not set |
775 | CONFIG_INOTIFY=y | ||
773 | # CONFIG_QUOTA is not set | 776 | # CONFIG_QUOTA is not set |
774 | CONFIG_DNOTIFY=y | 777 | CONFIG_DNOTIFY=y |
775 | # CONFIG_AUTOFS_FS is not set | 778 | # CONFIG_AUTOFS_FS is not set |
@@ -812,8 +815,7 @@ CONFIG_RAMFS=y | |||
812 | # CONFIG_JFFS_FS is not set | 815 | # CONFIG_JFFS_FS is not set |
813 | CONFIG_JFFS2_FS=y | 816 | CONFIG_JFFS2_FS=y |
814 | CONFIG_JFFS2_FS_DEBUG=0 | 817 | CONFIG_JFFS2_FS_DEBUG=0 |
815 | # CONFIG_JFFS2_FS_NAND is not set | 818 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
816 | # CONFIG_JFFS2_FS_NOR_ECC is not set | ||
817 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 819 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
818 | CONFIG_JFFS2_ZLIB=y | 820 | CONFIG_JFFS2_ZLIB=y |
819 | CONFIG_JFFS2_RTIME=y | 821 | CONFIG_JFFS2_RTIME=y |
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig index 5c6c928215d0..678720fa2e2e 100644 --- a/arch/arm/configs/ixdp2400_defconfig +++ b/arch/arm/configs/ixdp2400_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.13-rc2 | 3 | # Linux kernel version: 2.6.13 |
4 | # Thu Jul 7 16:49:01 2005 | 4 | # Wed Sep 14 10:52:01 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y | |||
136 | # | 136 | # |
137 | # Kernel Features | 137 | # Kernel Features |
138 | # | 138 | # |
139 | # CONFIG_SMP is not set | ||
140 | # CONFIG_PREEMPT is not set | 139 | # CONFIG_PREEMPT is not set |
141 | # CONFIG_NO_IDLE_HZ is not set | 140 | # CONFIG_NO_IDLE_HZ is not set |
142 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 141 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y | |||
180 | # CONFIG_PM is not set | 179 | # CONFIG_PM is not set |
181 | 180 | ||
182 | # | 181 | # |
182 | # Networking | ||
183 | # | ||
184 | CONFIG_NET=y | ||
185 | |||
186 | # | ||
187 | # Networking options | ||
188 | # | ||
189 | CONFIG_PACKET=y | ||
190 | CONFIG_PACKET_MMAP=y | ||
191 | CONFIG_UNIX=y | ||
192 | # CONFIG_NET_KEY is not set | ||
193 | CONFIG_INET=y | ||
194 | # CONFIG_IP_MULTICAST is not set | ||
195 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
196 | CONFIG_IP_FIB_HASH=y | ||
197 | CONFIG_IP_PNP=y | ||
198 | CONFIG_IP_PNP_DHCP=y | ||
199 | CONFIG_IP_PNP_BOOTP=y | ||
200 | # CONFIG_IP_PNP_RARP is not set | ||
201 | # CONFIG_NET_IPIP is not set | ||
202 | # CONFIG_NET_IPGRE is not set | ||
203 | # CONFIG_ARPD is not set | ||
204 | CONFIG_SYN_COOKIES=y | ||
205 | # CONFIG_INET_AH is not set | ||
206 | # CONFIG_INET_ESP is not set | ||
207 | # CONFIG_INET_IPCOMP is not set | ||
208 | # CONFIG_INET_TUNNEL is not set | ||
209 | # CONFIG_IP_TCPDIAG is not set | ||
210 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
211 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
212 | CONFIG_TCP_CONG_BIC=y | ||
213 | # CONFIG_IPV6 is not set | ||
214 | # CONFIG_NETFILTER is not set | ||
215 | |||
216 | # | ||
217 | # SCTP Configuration (EXPERIMENTAL) | ||
218 | # | ||
219 | # CONFIG_IP_SCTP is not set | ||
220 | # CONFIG_ATM is not set | ||
221 | # CONFIG_BRIDGE is not set | ||
222 | # CONFIG_VLAN_8021Q is not set | ||
223 | # CONFIG_DECNET is not set | ||
224 | # CONFIG_LLC2 is not set | ||
225 | # CONFIG_IPX is not set | ||
226 | # CONFIG_ATALK is not set | ||
227 | # CONFIG_X25 is not set | ||
228 | # CONFIG_LAPB is not set | ||
229 | # CONFIG_NET_DIVERT is not set | ||
230 | # CONFIG_ECONET is not set | ||
231 | # CONFIG_WAN_ROUTER is not set | ||
232 | # CONFIG_NET_SCHED is not set | ||
233 | # CONFIG_NET_CLS_ROUTE is not set | ||
234 | |||
235 | # | ||
236 | # Network testing | ||
237 | # | ||
238 | # CONFIG_NET_PKTGEN is not set | ||
239 | # CONFIG_HAMRADIO is not set | ||
240 | # CONFIG_IRDA is not set | ||
241 | # CONFIG_BT is not set | ||
242 | |||
243 | # | ||
183 | # Device Drivers | 244 | # Device Drivers |
184 | # | 245 | # |
185 | 246 | ||
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
249 | CONFIG_MTD_IXP2000=y | 310 | CONFIG_MTD_IXP2000=y |
250 | # CONFIG_MTD_EDB7312 is not set | 311 | # CONFIG_MTD_EDB7312 is not set |
251 | # CONFIG_MTD_PCI is not set | 312 | # CONFIG_MTD_PCI is not set |
313 | # CONFIG_MTD_PLATRAM is not set | ||
252 | 314 | ||
253 | # | 315 | # |
254 | # Self-contained MTD device drivers | 316 | # Self-contained MTD device drivers |
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y | |||
335 | # CONFIG_I2O is not set | 397 | # CONFIG_I2O is not set |
336 | 398 | ||
337 | # | 399 | # |
338 | # Networking support | 400 | # Network device support |
339 | # | ||
340 | CONFIG_NET=y | ||
341 | |||
342 | # | ||
343 | # Networking options | ||
344 | # | ||
345 | CONFIG_PACKET=y | ||
346 | CONFIG_PACKET_MMAP=y | ||
347 | CONFIG_UNIX=y | ||
348 | # CONFIG_NET_KEY is not set | ||
349 | CONFIG_INET=y | ||
350 | # CONFIG_IP_MULTICAST is not set | ||
351 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
352 | CONFIG_IP_FIB_HASH=y | ||
353 | CONFIG_IP_PNP=y | ||
354 | CONFIG_IP_PNP_DHCP=y | ||
355 | CONFIG_IP_PNP_BOOTP=y | ||
356 | # CONFIG_IP_PNP_RARP is not set | ||
357 | # CONFIG_NET_IPIP is not set | ||
358 | # CONFIG_NET_IPGRE is not set | ||
359 | # CONFIG_ARPD is not set | ||
360 | CONFIG_SYN_COOKIES=y | ||
361 | # CONFIG_INET_AH is not set | ||
362 | # CONFIG_INET_ESP is not set | ||
363 | # CONFIG_INET_IPCOMP is not set | ||
364 | # CONFIG_INET_TUNNEL is not set | ||
365 | # CONFIG_IP_TCPDIAG is not set | ||
366 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
367 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
368 | CONFIG_TCP_CONG_BIC=y | ||
369 | # CONFIG_IPV6 is not set | ||
370 | # CONFIG_NETFILTER is not set | ||
371 | |||
372 | # | ||
373 | # SCTP Configuration (EXPERIMENTAL) | ||
374 | # | ||
375 | # CONFIG_IP_SCTP is not set | ||
376 | # CONFIG_ATM is not set | ||
377 | # CONFIG_BRIDGE is not set | ||
378 | # CONFIG_VLAN_8021Q is not set | ||
379 | # CONFIG_DECNET is not set | ||
380 | # CONFIG_LLC2 is not set | ||
381 | # CONFIG_IPX is not set | ||
382 | # CONFIG_ATALK is not set | ||
383 | # CONFIG_X25 is not set | ||
384 | # CONFIG_LAPB is not set | ||
385 | # CONFIG_NET_DIVERT is not set | ||
386 | # CONFIG_ECONET is not set | ||
387 | # CONFIG_WAN_ROUTER is not set | ||
388 | |||
389 | # | ||
390 | # QoS and/or fair queueing | ||
391 | # | ||
392 | # CONFIG_NET_SCHED is not set | ||
393 | # CONFIG_NET_CLS_ROUTE is not set | ||
394 | |||
395 | # | ||
396 | # Network testing | ||
397 | # | 401 | # |
398 | # CONFIG_NET_PKTGEN is not set | ||
399 | # CONFIG_NETPOLL is not set | ||
400 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
401 | # CONFIG_HAMRADIO is not set | ||
402 | # CONFIG_IRDA is not set | ||
403 | # CONFIG_BT is not set | ||
404 | CONFIG_NETDEVICES=y | 402 | CONFIG_NETDEVICES=y |
405 | CONFIG_DUMMY=y | 403 | CONFIG_DUMMY=y |
406 | # CONFIG_BONDING is not set | 404 | # CONFIG_BONDING is not set |
@@ -510,6 +508,8 @@ CONFIG_DLCI_MAX=8 | |||
510 | # CONFIG_SLIP is not set | 508 | # CONFIG_SLIP is not set |
511 | # CONFIG_SHAPER is not set | 509 | # CONFIG_SHAPER is not set |
512 | # CONFIG_NETCONSOLE is not set | 510 | # CONFIG_NETCONSOLE is not set |
511 | # CONFIG_NETPOLL is not set | ||
512 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
513 | 513 | ||
514 | # | 514 | # |
515 | # ISDN subsystem | 515 | # ISDN subsystem |
@@ -636,7 +636,7 @@ CONFIG_I2C_ALGOBIT=y | |||
636 | # CONFIG_I2C_I810 is not set | 636 | # CONFIG_I2C_I810 is not set |
637 | # CONFIG_I2C_PIIX4 is not set | 637 | # CONFIG_I2C_PIIX4 is not set |
638 | # CONFIG_I2C_ISA is not set | 638 | # CONFIG_I2C_ISA is not set |
639 | # CONFIG_I2C_IXP2000 is not set | 639 | CONFIG_I2C_IXP2000=y |
640 | # CONFIG_I2C_NFORCE2 is not set | 640 | # CONFIG_I2C_NFORCE2 is not set |
641 | # CONFIG_I2C_PARPORT_LIGHT is not set | 641 | # CONFIG_I2C_PARPORT_LIGHT is not set |
642 | # CONFIG_I2C_PROSAVAGE is not set | 642 | # CONFIG_I2C_PROSAVAGE is not set |
@@ -650,11 +650,28 @@ CONFIG_I2C_ALGOBIT=y | |||
650 | # CONFIG_I2C_VIAPRO is not set | 650 | # CONFIG_I2C_VIAPRO is not set |
651 | # CONFIG_I2C_VOODOO3 is not set | 651 | # CONFIG_I2C_VOODOO3 is not set |
652 | # CONFIG_I2C_PCA_ISA is not set | 652 | # CONFIG_I2C_PCA_ISA is not set |
653 | CONFIG_I2C_SENSOR=y | ||
653 | 654 | ||
654 | # | 655 | # |
655 | # Hardware Sensors Chip support | 656 | # Miscellaneous I2C Chip support |
656 | # | 657 | # |
657 | CONFIG_I2C_SENSOR=y | 658 | # CONFIG_SENSORS_DS1337 is not set |
659 | # CONFIG_SENSORS_DS1374 is not set | ||
660 | CONFIG_SENSORS_EEPROM=y | ||
661 | # CONFIG_SENSORS_PCF8574 is not set | ||
662 | # CONFIG_SENSORS_PCA9539 is not set | ||
663 | # CONFIG_SENSORS_PCF8591 is not set | ||
664 | # CONFIG_SENSORS_RTC8564 is not set | ||
665 | # CONFIG_SENSORS_MAX6875 is not set | ||
666 | # CONFIG_I2C_DEBUG_CORE is not set | ||
667 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
668 | # CONFIG_I2C_DEBUG_BUS is not set | ||
669 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
670 | |||
671 | # | ||
672 | # Hardware Monitoring support | ||
673 | # | ||
674 | CONFIG_HWMON=y | ||
658 | # CONFIG_SENSORS_ADM1021 is not set | 675 | # CONFIG_SENSORS_ADM1021 is not set |
659 | # CONFIG_SENSORS_ADM1025 is not set | 676 | # CONFIG_SENSORS_ADM1025 is not set |
660 | # CONFIG_SENSORS_ADM1026 is not set | 677 | # CONFIG_SENSORS_ADM1026 is not set |
@@ -680,30 +697,15 @@ CONFIG_I2C_SENSOR=y | |||
680 | # CONFIG_SENSORS_LM92 is not set | 697 | # CONFIG_SENSORS_LM92 is not set |
681 | # CONFIG_SENSORS_MAX1619 is not set | 698 | # CONFIG_SENSORS_MAX1619 is not set |
682 | # CONFIG_SENSORS_PC87360 is not set | 699 | # CONFIG_SENSORS_PC87360 is not set |
683 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
684 | # CONFIG_SENSORS_SIS5595 is not set | 700 | # CONFIG_SENSORS_SIS5595 is not set |
685 | # CONFIG_SENSORS_SMSC47M1 is not set | 701 | # CONFIG_SENSORS_SMSC47M1 is not set |
702 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
686 | # CONFIG_SENSORS_VIA686A is not set | 703 | # CONFIG_SENSORS_VIA686A is not set |
687 | # CONFIG_SENSORS_W83781D is not set | 704 | # CONFIG_SENSORS_W83781D is not set |
688 | # CONFIG_SENSORS_W83L785TS is not set | 705 | # CONFIG_SENSORS_W83L785TS is not set |
689 | # CONFIG_SENSORS_W83627HF is not set | 706 | # CONFIG_SENSORS_W83627HF is not set |
690 | # CONFIG_SENSORS_W83627EHF is not set | 707 | # CONFIG_SENSORS_W83627EHF is not set |
691 | 708 | # CONFIG_HWMON_DEBUG_CHIP is not set | |
692 | # | ||
693 | # Other I2C Chip support | ||
694 | # | ||
695 | # CONFIG_SENSORS_DS1337 is not set | ||
696 | # CONFIG_SENSORS_DS1374 is not set | ||
697 | CONFIG_SENSORS_EEPROM=y | ||
698 | # CONFIG_SENSORS_PCF8574 is not set | ||
699 | # CONFIG_SENSORS_PCA9539 is not set | ||
700 | # CONFIG_SENSORS_PCF8591 is not set | ||
701 | # CONFIG_SENSORS_RTC8564 is not set | ||
702 | # CONFIG_SENSORS_MAX6875 is not set | ||
703 | # CONFIG_I2C_DEBUG_CORE is not set | ||
704 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
705 | # CONFIG_I2C_DEBUG_BUS is not set | ||
706 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
707 | 709 | ||
708 | # | 710 | # |
709 | # Misc devices | 711 | # Misc devices |
@@ -771,6 +773,7 @@ CONFIG_FS_POSIX_ACL=y | |||
771 | # CONFIG_XFS_FS is not set | 773 | # CONFIG_XFS_FS is not set |
772 | # CONFIG_MINIX_FS is not set | 774 | # CONFIG_MINIX_FS is not set |
773 | # CONFIG_ROMFS_FS is not set | 775 | # CONFIG_ROMFS_FS is not set |
776 | CONFIG_INOTIFY=y | ||
774 | # CONFIG_QUOTA is not set | 777 | # CONFIG_QUOTA is not set |
775 | CONFIG_DNOTIFY=y | 778 | CONFIG_DNOTIFY=y |
776 | # CONFIG_AUTOFS_FS is not set | 779 | # CONFIG_AUTOFS_FS is not set |
@@ -813,8 +816,7 @@ CONFIG_RAMFS=y | |||
813 | # CONFIG_JFFS_FS is not set | 816 | # CONFIG_JFFS_FS is not set |
814 | CONFIG_JFFS2_FS=y | 817 | CONFIG_JFFS2_FS=y |
815 | CONFIG_JFFS2_FS_DEBUG=0 | 818 | CONFIG_JFFS2_FS_DEBUG=0 |
816 | # CONFIG_JFFS2_FS_NAND is not set | 819 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
817 | # CONFIG_JFFS2_FS_NOR_ECC is not set | ||
818 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 820 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
819 | CONFIG_JFFS2_ZLIB=y | 821 | CONFIG_JFFS2_ZLIB=y |
820 | CONFIG_JFFS2_RTIME=y | 822 | CONFIG_JFFS2_RTIME=y |
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig index 6dc40f6be0ef..38c9a721d5c9 100644 --- a/arch/arm/configs/ixdp2401_defconfig +++ b/arch/arm/configs/ixdp2401_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.13-rc2 | 3 | # Linux kernel version: 2.6.13 |
4 | # Thu Jul 7 16:49:08 2005 | 4 | # Wed Sep 14 10:52:10 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y | |||
136 | # | 136 | # |
137 | # Kernel Features | 137 | # Kernel Features |
138 | # | 138 | # |
139 | # CONFIG_SMP is not set | ||
140 | # CONFIG_PREEMPT is not set | 139 | # CONFIG_PREEMPT is not set |
141 | # CONFIG_NO_IDLE_HZ is not set | 140 | # CONFIG_NO_IDLE_HZ is not set |
142 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 141 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y | |||
180 | # CONFIG_PM is not set | 179 | # CONFIG_PM is not set |
181 | 180 | ||
182 | # | 181 | # |
182 | # Networking | ||
183 | # | ||
184 | CONFIG_NET=y | ||
185 | |||
186 | # | ||
187 | # Networking options | ||
188 | # | ||
189 | CONFIG_PACKET=y | ||
190 | CONFIG_PACKET_MMAP=y | ||
191 | CONFIG_UNIX=y | ||
192 | # CONFIG_NET_KEY is not set | ||
193 | CONFIG_INET=y | ||
194 | # CONFIG_IP_MULTICAST is not set | ||
195 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
196 | CONFIG_IP_FIB_HASH=y | ||
197 | CONFIG_IP_PNP=y | ||
198 | CONFIG_IP_PNP_DHCP=y | ||
199 | CONFIG_IP_PNP_BOOTP=y | ||
200 | # CONFIG_IP_PNP_RARP is not set | ||
201 | # CONFIG_NET_IPIP is not set | ||
202 | # CONFIG_NET_IPGRE is not set | ||
203 | # CONFIG_ARPD is not set | ||
204 | CONFIG_SYN_COOKIES=y | ||
205 | # CONFIG_INET_AH is not set | ||
206 | # CONFIG_INET_ESP is not set | ||
207 | # CONFIG_INET_IPCOMP is not set | ||
208 | # CONFIG_INET_TUNNEL is not set | ||
209 | CONFIG_IP_TCPDIAG=y | ||
210 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
211 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
212 | CONFIG_TCP_CONG_BIC=y | ||
213 | # CONFIG_IPV6 is not set | ||
214 | # CONFIG_NETFILTER is not set | ||
215 | |||
216 | # | ||
217 | # SCTP Configuration (EXPERIMENTAL) | ||
218 | # | ||
219 | # CONFIG_IP_SCTP is not set | ||
220 | # CONFIG_ATM is not set | ||
221 | # CONFIG_BRIDGE is not set | ||
222 | # CONFIG_VLAN_8021Q is not set | ||
223 | # CONFIG_DECNET is not set | ||
224 | # CONFIG_LLC2 is not set | ||
225 | # CONFIG_IPX is not set | ||
226 | # CONFIG_ATALK is not set | ||
227 | # CONFIG_X25 is not set | ||
228 | # CONFIG_LAPB is not set | ||
229 | # CONFIG_NET_DIVERT is not set | ||
230 | # CONFIG_ECONET is not set | ||
231 | # CONFIG_WAN_ROUTER is not set | ||
232 | # CONFIG_NET_SCHED is not set | ||
233 | # CONFIG_NET_CLS_ROUTE is not set | ||
234 | |||
235 | # | ||
236 | # Network testing | ||
237 | # | ||
238 | # CONFIG_NET_PKTGEN is not set | ||
239 | # CONFIG_HAMRADIO is not set | ||
240 | # CONFIG_IRDA is not set | ||
241 | # CONFIG_BT is not set | ||
242 | |||
243 | # | ||
183 | # Device Drivers | 244 | # Device Drivers |
184 | # | 245 | # |
185 | 246 | ||
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
249 | CONFIG_MTD_IXP2000=y | 310 | CONFIG_MTD_IXP2000=y |
250 | # CONFIG_MTD_EDB7312 is not set | 311 | # CONFIG_MTD_EDB7312 is not set |
251 | # CONFIG_MTD_PCI is not set | 312 | # CONFIG_MTD_PCI is not set |
313 | # CONFIG_MTD_PLATRAM is not set | ||
252 | 314 | ||
253 | # | 315 | # |
254 | # Self-contained MTD device drivers | 316 | # Self-contained MTD device drivers |
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y | |||
335 | # CONFIG_I2O is not set | 397 | # CONFIG_I2O is not set |
336 | 398 | ||
337 | # | 399 | # |
338 | # Networking support | 400 | # Network device support |
339 | # | ||
340 | CONFIG_NET=y | ||
341 | |||
342 | # | ||
343 | # Networking options | ||
344 | # | ||
345 | CONFIG_PACKET=y | ||
346 | CONFIG_PACKET_MMAP=y | ||
347 | CONFIG_UNIX=y | ||
348 | # CONFIG_NET_KEY is not set | ||
349 | CONFIG_INET=y | ||
350 | # CONFIG_IP_MULTICAST is not set | ||
351 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
352 | CONFIG_IP_FIB_HASH=y | ||
353 | CONFIG_IP_PNP=y | ||
354 | CONFIG_IP_PNP_DHCP=y | ||
355 | CONFIG_IP_PNP_BOOTP=y | ||
356 | # CONFIG_IP_PNP_RARP is not set | ||
357 | # CONFIG_NET_IPIP is not set | ||
358 | # CONFIG_NET_IPGRE is not set | ||
359 | # CONFIG_ARPD is not set | ||
360 | CONFIG_SYN_COOKIES=y | ||
361 | # CONFIG_INET_AH is not set | ||
362 | # CONFIG_INET_ESP is not set | ||
363 | # CONFIG_INET_IPCOMP is not set | ||
364 | # CONFIG_INET_TUNNEL is not set | ||
365 | CONFIG_IP_TCPDIAG=y | ||
366 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
367 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
368 | CONFIG_TCP_CONG_BIC=y | ||
369 | # CONFIG_IPV6 is not set | ||
370 | # CONFIG_NETFILTER is not set | ||
371 | |||
372 | # | ||
373 | # SCTP Configuration (EXPERIMENTAL) | ||
374 | # | ||
375 | # CONFIG_IP_SCTP is not set | ||
376 | # CONFIG_ATM is not set | ||
377 | # CONFIG_BRIDGE is not set | ||
378 | # CONFIG_VLAN_8021Q is not set | ||
379 | # CONFIG_DECNET is not set | ||
380 | # CONFIG_LLC2 is not set | ||
381 | # CONFIG_IPX is not set | ||
382 | # CONFIG_ATALK is not set | ||
383 | # CONFIG_X25 is not set | ||
384 | # CONFIG_LAPB is not set | ||
385 | # CONFIG_NET_DIVERT is not set | ||
386 | # CONFIG_ECONET is not set | ||
387 | # CONFIG_WAN_ROUTER is not set | ||
388 | |||
389 | # | ||
390 | # QoS and/or fair queueing | ||
391 | # | ||
392 | # CONFIG_NET_SCHED is not set | ||
393 | # CONFIG_NET_CLS_ROUTE is not set | ||
394 | |||
395 | # | ||
396 | # Network testing | ||
397 | # | 401 | # |
398 | # CONFIG_NET_PKTGEN is not set | ||
399 | # CONFIG_NETPOLL is not set | ||
400 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
401 | # CONFIG_HAMRADIO is not set | ||
402 | # CONFIG_IRDA is not set | ||
403 | # CONFIG_BT is not set | ||
404 | CONFIG_NETDEVICES=y | 402 | CONFIG_NETDEVICES=y |
405 | CONFIG_DUMMY=y | 403 | CONFIG_DUMMY=y |
406 | # CONFIG_BONDING is not set | 404 | # CONFIG_BONDING is not set |
@@ -511,6 +509,8 @@ CONFIG_DLCI_MAX=8 | |||
511 | # CONFIG_SLIP is not set | 509 | # CONFIG_SLIP is not set |
512 | # CONFIG_SHAPER is not set | 510 | # CONFIG_SHAPER is not set |
513 | # CONFIG_NETCONSOLE is not set | 511 | # CONFIG_NETCONSOLE is not set |
512 | # CONFIG_NETPOLL is not set | ||
513 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
514 | 514 | ||
515 | # | 515 | # |
516 | # ISDN subsystem | 516 | # ISDN subsystem |
@@ -637,7 +637,7 @@ CONFIG_I2C_ALGOBIT=y | |||
637 | # CONFIG_I2C_I810 is not set | 637 | # CONFIG_I2C_I810 is not set |
638 | # CONFIG_I2C_PIIX4 is not set | 638 | # CONFIG_I2C_PIIX4 is not set |
639 | # CONFIG_I2C_ISA is not set | 639 | # CONFIG_I2C_ISA is not set |
640 | # CONFIG_I2C_IXP2000 is not set | 640 | CONFIG_I2C_IXP2000=y |
641 | # CONFIG_I2C_NFORCE2 is not set | 641 | # CONFIG_I2C_NFORCE2 is not set |
642 | # CONFIG_I2C_PARPORT_LIGHT is not set | 642 | # CONFIG_I2C_PARPORT_LIGHT is not set |
643 | # CONFIG_I2C_PROSAVAGE is not set | 643 | # CONFIG_I2C_PROSAVAGE is not set |
@@ -651,11 +651,28 @@ CONFIG_I2C_ALGOBIT=y | |||
651 | # CONFIG_I2C_VIAPRO is not set | 651 | # CONFIG_I2C_VIAPRO is not set |
652 | # CONFIG_I2C_VOODOO3 is not set | 652 | # CONFIG_I2C_VOODOO3 is not set |
653 | # CONFIG_I2C_PCA_ISA is not set | 653 | # CONFIG_I2C_PCA_ISA is not set |
654 | CONFIG_I2C_SENSOR=y | ||
654 | 655 | ||
655 | # | 656 | # |
656 | # Hardware Sensors Chip support | 657 | # Miscellaneous I2C Chip support |
657 | # | 658 | # |
658 | CONFIG_I2C_SENSOR=y | 659 | # CONFIG_SENSORS_DS1337 is not set |
660 | # CONFIG_SENSORS_DS1374 is not set | ||
661 | CONFIG_SENSORS_EEPROM=y | ||
662 | # CONFIG_SENSORS_PCF8574 is not set | ||
663 | # CONFIG_SENSORS_PCA9539 is not set | ||
664 | # CONFIG_SENSORS_PCF8591 is not set | ||
665 | # CONFIG_SENSORS_RTC8564 is not set | ||
666 | # CONFIG_SENSORS_MAX6875 is not set | ||
667 | # CONFIG_I2C_DEBUG_CORE is not set | ||
668 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
669 | # CONFIG_I2C_DEBUG_BUS is not set | ||
670 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
671 | |||
672 | # | ||
673 | # Hardware Monitoring support | ||
674 | # | ||
675 | CONFIG_HWMON=y | ||
659 | # CONFIG_SENSORS_ADM1021 is not set | 676 | # CONFIG_SENSORS_ADM1021 is not set |
660 | # CONFIG_SENSORS_ADM1025 is not set | 677 | # CONFIG_SENSORS_ADM1025 is not set |
661 | # CONFIG_SENSORS_ADM1026 is not set | 678 | # CONFIG_SENSORS_ADM1026 is not set |
@@ -681,30 +698,15 @@ CONFIG_I2C_SENSOR=y | |||
681 | # CONFIG_SENSORS_LM92 is not set | 698 | # CONFIG_SENSORS_LM92 is not set |
682 | # CONFIG_SENSORS_MAX1619 is not set | 699 | # CONFIG_SENSORS_MAX1619 is not set |
683 | # CONFIG_SENSORS_PC87360 is not set | 700 | # CONFIG_SENSORS_PC87360 is not set |
684 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
685 | # CONFIG_SENSORS_SIS5595 is not set | 701 | # CONFIG_SENSORS_SIS5595 is not set |
686 | # CONFIG_SENSORS_SMSC47M1 is not set | 702 | # CONFIG_SENSORS_SMSC47M1 is not set |
703 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
687 | # CONFIG_SENSORS_VIA686A is not set | 704 | # CONFIG_SENSORS_VIA686A is not set |
688 | # CONFIG_SENSORS_W83781D is not set | 705 | # CONFIG_SENSORS_W83781D is not set |
689 | # CONFIG_SENSORS_W83L785TS is not set | 706 | # CONFIG_SENSORS_W83L785TS is not set |
690 | # CONFIG_SENSORS_W83627HF is not set | 707 | # CONFIG_SENSORS_W83627HF is not set |
691 | # CONFIG_SENSORS_W83627EHF is not set | 708 | # CONFIG_SENSORS_W83627EHF is not set |
692 | 709 | # CONFIG_HWMON_DEBUG_CHIP is not set | |
693 | # | ||
694 | # Other I2C Chip support | ||
695 | # | ||
696 | # CONFIG_SENSORS_DS1337 is not set | ||
697 | # CONFIG_SENSORS_DS1374 is not set | ||
698 | CONFIG_SENSORS_EEPROM=y | ||
699 | # CONFIG_SENSORS_PCF8574 is not set | ||
700 | # CONFIG_SENSORS_PCA9539 is not set | ||
701 | # CONFIG_SENSORS_PCF8591 is not set | ||
702 | # CONFIG_SENSORS_RTC8564 is not set | ||
703 | # CONFIG_SENSORS_MAX6875 is not set | ||
704 | # CONFIG_I2C_DEBUG_CORE is not set | ||
705 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
706 | # CONFIG_I2C_DEBUG_BUS is not set | ||
707 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
708 | 710 | ||
709 | # | 711 | # |
710 | # Misc devices | 712 | # Misc devices |
@@ -772,6 +774,7 @@ CONFIG_FS_POSIX_ACL=y | |||
772 | # CONFIG_XFS_FS is not set | 774 | # CONFIG_XFS_FS is not set |
773 | # CONFIG_MINIX_FS is not set | 775 | # CONFIG_MINIX_FS is not set |
774 | # CONFIG_ROMFS_FS is not set | 776 | # CONFIG_ROMFS_FS is not set |
777 | CONFIG_INOTIFY=y | ||
775 | # CONFIG_QUOTA is not set | 778 | # CONFIG_QUOTA is not set |
776 | CONFIG_DNOTIFY=y | 779 | CONFIG_DNOTIFY=y |
777 | # CONFIG_AUTOFS_FS is not set | 780 | # CONFIG_AUTOFS_FS is not set |
@@ -814,8 +817,7 @@ CONFIG_RAMFS=y | |||
814 | # CONFIG_JFFS_FS is not set | 817 | # CONFIG_JFFS_FS is not set |
815 | CONFIG_JFFS2_FS=y | 818 | CONFIG_JFFS2_FS=y |
816 | CONFIG_JFFS2_FS_DEBUG=0 | 819 | CONFIG_JFFS2_FS_DEBUG=0 |
817 | # CONFIG_JFFS2_FS_NAND is not set | 820 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
818 | # CONFIG_JFFS2_FS_NOR_ECC is not set | ||
819 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 821 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
820 | CONFIG_JFFS2_ZLIB=y | 822 | CONFIG_JFFS2_ZLIB=y |
821 | CONFIG_JFFS2_RTIME=y | 823 | CONFIG_JFFS2_RTIME=y |
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig index d2bb0b7153fe..261e2343903b 100644 --- a/arch/arm/configs/ixdp2800_defconfig +++ b/arch/arm/configs/ixdp2800_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.13-rc2 | 3 | # Linux kernel version: 2.6.13 |
4 | # Thu Jul 7 16:49:20 2005 | 4 | # Wed Sep 14 10:52:23 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y | |||
136 | # | 136 | # |
137 | # Kernel Features | 137 | # Kernel Features |
138 | # | 138 | # |
139 | # CONFIG_SMP is not set | ||
140 | # CONFIG_PREEMPT is not set | 139 | # CONFIG_PREEMPT is not set |
141 | # CONFIG_NO_IDLE_HZ is not set | 140 | # CONFIG_NO_IDLE_HZ is not set |
142 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 141 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y | |||
180 | # CONFIG_PM is not set | 179 | # CONFIG_PM is not set |
181 | 180 | ||
182 | # | 181 | # |
182 | # Networking | ||
183 | # | ||
184 | CONFIG_NET=y | ||
185 | |||
186 | # | ||
187 | # Networking options | ||
188 | # | ||
189 | CONFIG_PACKET=y | ||
190 | CONFIG_PACKET_MMAP=y | ||
191 | CONFIG_UNIX=y | ||
192 | # CONFIG_NET_KEY is not set | ||
193 | CONFIG_INET=y | ||
194 | # CONFIG_IP_MULTICAST is not set | ||
195 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
196 | CONFIG_IP_FIB_HASH=y | ||
197 | CONFIG_IP_PNP=y | ||
198 | CONFIG_IP_PNP_DHCP=y | ||
199 | CONFIG_IP_PNP_BOOTP=y | ||
200 | # CONFIG_IP_PNP_RARP is not set | ||
201 | # CONFIG_NET_IPIP is not set | ||
202 | # CONFIG_NET_IPGRE is not set | ||
203 | # CONFIG_ARPD is not set | ||
204 | CONFIG_SYN_COOKIES=y | ||
205 | # CONFIG_INET_AH is not set | ||
206 | # CONFIG_INET_ESP is not set | ||
207 | # CONFIG_INET_IPCOMP is not set | ||
208 | # CONFIG_INET_TUNNEL is not set | ||
209 | # CONFIG_IP_TCPDIAG is not set | ||
210 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
211 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
212 | CONFIG_TCP_CONG_BIC=y | ||
213 | # CONFIG_IPV6 is not set | ||
214 | # CONFIG_NETFILTER is not set | ||
215 | |||
216 | # | ||
217 | # SCTP Configuration (EXPERIMENTAL) | ||
218 | # | ||
219 | # CONFIG_IP_SCTP is not set | ||
220 | # CONFIG_ATM is not set | ||
221 | # CONFIG_BRIDGE is not set | ||
222 | # CONFIG_VLAN_8021Q is not set | ||
223 | # CONFIG_DECNET is not set | ||
224 | # CONFIG_LLC2 is not set | ||
225 | # CONFIG_IPX is not set | ||
226 | # CONFIG_ATALK is not set | ||
227 | # CONFIG_X25 is not set | ||
228 | # CONFIG_LAPB is not set | ||
229 | # CONFIG_NET_DIVERT is not set | ||
230 | # CONFIG_ECONET is not set | ||
231 | # CONFIG_WAN_ROUTER is not set | ||
232 | # CONFIG_NET_SCHED is not set | ||
233 | # CONFIG_NET_CLS_ROUTE is not set | ||
234 | |||
235 | # | ||
236 | # Network testing | ||
237 | # | ||
238 | # CONFIG_NET_PKTGEN is not set | ||
239 | # CONFIG_HAMRADIO is not set | ||
240 | # CONFIG_IRDA is not set | ||
241 | # CONFIG_BT is not set | ||
242 | |||
243 | # | ||
183 | # Device Drivers | 244 | # Device Drivers |
184 | # | 245 | # |
185 | 246 | ||
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
249 | CONFIG_MTD_IXP2000=y | 310 | CONFIG_MTD_IXP2000=y |
250 | # CONFIG_MTD_EDB7312 is not set | 311 | # CONFIG_MTD_EDB7312 is not set |
251 | # CONFIG_MTD_PCI is not set | 312 | # CONFIG_MTD_PCI is not set |
313 | # CONFIG_MTD_PLATRAM is not set | ||
252 | 314 | ||
253 | # | 315 | # |
254 | # Self-contained MTD device drivers | 316 | # Self-contained MTD device drivers |
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y | |||
335 | # CONFIG_I2O is not set | 397 | # CONFIG_I2O is not set |
336 | 398 | ||
337 | # | 399 | # |
338 | # Networking support | 400 | # Network device support |
339 | # | ||
340 | CONFIG_NET=y | ||
341 | |||
342 | # | ||
343 | # Networking options | ||
344 | # | ||
345 | CONFIG_PACKET=y | ||
346 | CONFIG_PACKET_MMAP=y | ||
347 | CONFIG_UNIX=y | ||
348 | # CONFIG_NET_KEY is not set | ||
349 | CONFIG_INET=y | ||
350 | # CONFIG_IP_MULTICAST is not set | ||
351 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
352 | CONFIG_IP_FIB_HASH=y | ||
353 | CONFIG_IP_PNP=y | ||
354 | CONFIG_IP_PNP_DHCP=y | ||
355 | CONFIG_IP_PNP_BOOTP=y | ||
356 | # CONFIG_IP_PNP_RARP is not set | ||
357 | # CONFIG_NET_IPIP is not set | ||
358 | # CONFIG_NET_IPGRE is not set | ||
359 | # CONFIG_ARPD is not set | ||
360 | CONFIG_SYN_COOKIES=y | ||
361 | # CONFIG_INET_AH is not set | ||
362 | # CONFIG_INET_ESP is not set | ||
363 | # CONFIG_INET_IPCOMP is not set | ||
364 | # CONFIG_INET_TUNNEL is not set | ||
365 | # CONFIG_IP_TCPDIAG is not set | ||
366 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
367 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
368 | CONFIG_TCP_CONG_BIC=y | ||
369 | # CONFIG_IPV6 is not set | ||
370 | # CONFIG_NETFILTER is not set | ||
371 | |||
372 | # | ||
373 | # SCTP Configuration (EXPERIMENTAL) | ||
374 | # | ||
375 | # CONFIG_IP_SCTP is not set | ||
376 | # CONFIG_ATM is not set | ||
377 | # CONFIG_BRIDGE is not set | ||
378 | # CONFIG_VLAN_8021Q is not set | ||
379 | # CONFIG_DECNET is not set | ||
380 | # CONFIG_LLC2 is not set | ||
381 | # CONFIG_IPX is not set | ||
382 | # CONFIG_ATALK is not set | ||
383 | # CONFIG_X25 is not set | ||
384 | # CONFIG_LAPB is not set | ||
385 | # CONFIG_NET_DIVERT is not set | ||
386 | # CONFIG_ECONET is not set | ||
387 | # CONFIG_WAN_ROUTER is not set | ||
388 | |||
389 | # | ||
390 | # QoS and/or fair queueing | ||
391 | # | ||
392 | # CONFIG_NET_SCHED is not set | ||
393 | # CONFIG_NET_CLS_ROUTE is not set | ||
394 | |||
395 | # | ||
396 | # Network testing | ||
397 | # | 401 | # |
398 | # CONFIG_NET_PKTGEN is not set | ||
399 | # CONFIG_NETPOLL is not set | ||
400 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
401 | # CONFIG_HAMRADIO is not set | ||
402 | # CONFIG_IRDA is not set | ||
403 | # CONFIG_BT is not set | ||
404 | CONFIG_NETDEVICES=y | 402 | CONFIG_NETDEVICES=y |
405 | CONFIG_DUMMY=y | 403 | CONFIG_DUMMY=y |
406 | # CONFIG_BONDING is not set | 404 | # CONFIG_BONDING is not set |
@@ -510,6 +508,8 @@ CONFIG_DLCI_MAX=8 | |||
510 | # CONFIG_SLIP is not set | 508 | # CONFIG_SLIP is not set |
511 | # CONFIG_SHAPER is not set | 509 | # CONFIG_SHAPER is not set |
512 | # CONFIG_NETCONSOLE is not set | 510 | # CONFIG_NETCONSOLE is not set |
511 | # CONFIG_NETPOLL is not set | ||
512 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
513 | 513 | ||
514 | # | 514 | # |
515 | # ISDN subsystem | 515 | # ISDN subsystem |
@@ -636,7 +636,7 @@ CONFIG_I2C_ALGOBIT=y | |||
636 | # CONFIG_I2C_I810 is not set | 636 | # CONFIG_I2C_I810 is not set |
637 | # CONFIG_I2C_PIIX4 is not set | 637 | # CONFIG_I2C_PIIX4 is not set |
638 | # CONFIG_I2C_ISA is not set | 638 | # CONFIG_I2C_ISA is not set |
639 | # CONFIG_I2C_IXP2000 is not set | 639 | CONFIG_I2C_IXP2000=y |
640 | # CONFIG_I2C_NFORCE2 is not set | 640 | # CONFIG_I2C_NFORCE2 is not set |
641 | # CONFIG_I2C_PARPORT_LIGHT is not set | 641 | # CONFIG_I2C_PARPORT_LIGHT is not set |
642 | # CONFIG_I2C_PROSAVAGE is not set | 642 | # CONFIG_I2C_PROSAVAGE is not set |
@@ -650,11 +650,28 @@ CONFIG_I2C_ALGOBIT=y | |||
650 | # CONFIG_I2C_VIAPRO is not set | 650 | # CONFIG_I2C_VIAPRO is not set |
651 | # CONFIG_I2C_VOODOO3 is not set | 651 | # CONFIG_I2C_VOODOO3 is not set |
652 | # CONFIG_I2C_PCA_ISA is not set | 652 | # CONFIG_I2C_PCA_ISA is not set |
653 | CONFIG_I2C_SENSOR=y | ||
653 | 654 | ||
654 | # | 655 | # |
655 | # Hardware Sensors Chip support | 656 | # Miscellaneous I2C Chip support |
656 | # | 657 | # |
657 | CONFIG_I2C_SENSOR=y | 658 | # CONFIG_SENSORS_DS1337 is not set |
659 | # CONFIG_SENSORS_DS1374 is not set | ||
660 | CONFIG_SENSORS_EEPROM=y | ||
661 | # CONFIG_SENSORS_PCF8574 is not set | ||
662 | # CONFIG_SENSORS_PCA9539 is not set | ||
663 | # CONFIG_SENSORS_PCF8591 is not set | ||
664 | # CONFIG_SENSORS_RTC8564 is not set | ||
665 | # CONFIG_SENSORS_MAX6875 is not set | ||
666 | # CONFIG_I2C_DEBUG_CORE is not set | ||
667 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
668 | # CONFIG_I2C_DEBUG_BUS is not set | ||
669 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
670 | |||
671 | # | ||
672 | # Hardware Monitoring support | ||
673 | # | ||
674 | CONFIG_HWMON=y | ||
658 | # CONFIG_SENSORS_ADM1021 is not set | 675 | # CONFIG_SENSORS_ADM1021 is not set |
659 | # CONFIG_SENSORS_ADM1025 is not set | 676 | # CONFIG_SENSORS_ADM1025 is not set |
660 | # CONFIG_SENSORS_ADM1026 is not set | 677 | # CONFIG_SENSORS_ADM1026 is not set |
@@ -680,30 +697,15 @@ CONFIG_I2C_SENSOR=y | |||
680 | # CONFIG_SENSORS_LM92 is not set | 697 | # CONFIG_SENSORS_LM92 is not set |
681 | # CONFIG_SENSORS_MAX1619 is not set | 698 | # CONFIG_SENSORS_MAX1619 is not set |
682 | # CONFIG_SENSORS_PC87360 is not set | 699 | # CONFIG_SENSORS_PC87360 is not set |
683 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
684 | # CONFIG_SENSORS_SIS5595 is not set | 700 | # CONFIG_SENSORS_SIS5595 is not set |
685 | # CONFIG_SENSORS_SMSC47M1 is not set | 701 | # CONFIG_SENSORS_SMSC47M1 is not set |
702 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
686 | # CONFIG_SENSORS_VIA686A is not set | 703 | # CONFIG_SENSORS_VIA686A is not set |
687 | # CONFIG_SENSORS_W83781D is not set | 704 | # CONFIG_SENSORS_W83781D is not set |
688 | # CONFIG_SENSORS_W83L785TS is not set | 705 | # CONFIG_SENSORS_W83L785TS is not set |
689 | # CONFIG_SENSORS_W83627HF is not set | 706 | # CONFIG_SENSORS_W83627HF is not set |
690 | # CONFIG_SENSORS_W83627EHF is not set | 707 | # CONFIG_SENSORS_W83627EHF is not set |
691 | 708 | # CONFIG_HWMON_DEBUG_CHIP is not set | |
692 | # | ||
693 | # Other I2C Chip support | ||
694 | # | ||
695 | # CONFIG_SENSORS_DS1337 is not set | ||
696 | # CONFIG_SENSORS_DS1374 is not set | ||
697 | CONFIG_SENSORS_EEPROM=y | ||
698 | # CONFIG_SENSORS_PCF8574 is not set | ||
699 | # CONFIG_SENSORS_PCA9539 is not set | ||
700 | # CONFIG_SENSORS_PCF8591 is not set | ||
701 | # CONFIG_SENSORS_RTC8564 is not set | ||
702 | # CONFIG_SENSORS_MAX6875 is not set | ||
703 | # CONFIG_I2C_DEBUG_CORE is not set | ||
704 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
705 | # CONFIG_I2C_DEBUG_BUS is not set | ||
706 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
707 | 709 | ||
708 | # | 710 | # |
709 | # Misc devices | 711 | # Misc devices |
@@ -771,6 +773,7 @@ CONFIG_FS_POSIX_ACL=y | |||
771 | # CONFIG_XFS_FS is not set | 773 | # CONFIG_XFS_FS is not set |
772 | # CONFIG_MINIX_FS is not set | 774 | # CONFIG_MINIX_FS is not set |
773 | # CONFIG_ROMFS_FS is not set | 775 | # CONFIG_ROMFS_FS is not set |
776 | CONFIG_INOTIFY=y | ||
774 | # CONFIG_QUOTA is not set | 777 | # CONFIG_QUOTA is not set |
775 | CONFIG_DNOTIFY=y | 778 | CONFIG_DNOTIFY=y |
776 | # CONFIG_AUTOFS_FS is not set | 779 | # CONFIG_AUTOFS_FS is not set |
@@ -813,8 +816,7 @@ CONFIG_RAMFS=y | |||
813 | # CONFIG_JFFS_FS is not set | 816 | # CONFIG_JFFS_FS is not set |
814 | CONFIG_JFFS2_FS=y | 817 | CONFIG_JFFS2_FS=y |
815 | CONFIG_JFFS2_FS_DEBUG=0 | 818 | CONFIG_JFFS2_FS_DEBUG=0 |
816 | # CONFIG_JFFS2_FS_NAND is not set | 819 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
817 | # CONFIG_JFFS2_FS_NOR_ECC is not set | ||
818 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 820 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
819 | CONFIG_JFFS2_ZLIB=y | 821 | CONFIG_JFFS2_ZLIB=y |
820 | CONFIG_JFFS2_RTIME=y | 822 | CONFIG_JFFS2_RTIME=y |
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig index 2d6f960e3395..12ef23d1c016 100644 --- a/arch/arm/configs/ixdp2801_defconfig +++ b/arch/arm/configs/ixdp2801_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.13-rc2 | 3 | # Linux kernel version: 2.6.13 |
4 | # Thu Jul 7 16:49:13 2005 | 4 | # Wed Sep 14 10:52:16 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y | |||
136 | # | 136 | # |
137 | # Kernel Features | 137 | # Kernel Features |
138 | # | 138 | # |
139 | # CONFIG_SMP is not set | ||
140 | # CONFIG_PREEMPT is not set | 139 | # CONFIG_PREEMPT is not set |
141 | # CONFIG_NO_IDLE_HZ is not set | 140 | # CONFIG_NO_IDLE_HZ is not set |
142 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 141 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y | |||
180 | # CONFIG_PM is not set | 179 | # CONFIG_PM is not set |
181 | 180 | ||
182 | # | 181 | # |
182 | # Networking | ||
183 | # | ||
184 | CONFIG_NET=y | ||
185 | |||
186 | # | ||
187 | # Networking options | ||
188 | # | ||
189 | CONFIG_PACKET=y | ||
190 | CONFIG_PACKET_MMAP=y | ||
191 | CONFIG_UNIX=y | ||
192 | # CONFIG_NET_KEY is not set | ||
193 | CONFIG_INET=y | ||
194 | # CONFIG_IP_MULTICAST is not set | ||
195 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
196 | CONFIG_IP_FIB_HASH=y | ||
197 | CONFIG_IP_PNP=y | ||
198 | CONFIG_IP_PNP_DHCP=y | ||
199 | CONFIG_IP_PNP_BOOTP=y | ||
200 | # CONFIG_IP_PNP_RARP is not set | ||
201 | # CONFIG_NET_IPIP is not set | ||
202 | # CONFIG_NET_IPGRE is not set | ||
203 | # CONFIG_ARPD is not set | ||
204 | CONFIG_SYN_COOKIES=y | ||
205 | # CONFIG_INET_AH is not set | ||
206 | # CONFIG_INET_ESP is not set | ||
207 | # CONFIG_INET_IPCOMP is not set | ||
208 | # CONFIG_INET_TUNNEL is not set | ||
209 | # CONFIG_IP_TCPDIAG is not set | ||
210 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
211 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
212 | CONFIG_TCP_CONG_BIC=y | ||
213 | # CONFIG_IPV6 is not set | ||
214 | # CONFIG_NETFILTER is not set | ||
215 | |||
216 | # | ||
217 | # SCTP Configuration (EXPERIMENTAL) | ||
218 | # | ||
219 | # CONFIG_IP_SCTP is not set | ||
220 | # CONFIG_ATM is not set | ||
221 | # CONFIG_BRIDGE is not set | ||
222 | # CONFIG_VLAN_8021Q is not set | ||
223 | # CONFIG_DECNET is not set | ||
224 | # CONFIG_LLC2 is not set | ||
225 | # CONFIG_IPX is not set | ||
226 | # CONFIG_ATALK is not set | ||
227 | # CONFIG_X25 is not set | ||
228 | # CONFIG_LAPB is not set | ||
229 | # CONFIG_NET_DIVERT is not set | ||
230 | # CONFIG_ECONET is not set | ||
231 | # CONFIG_WAN_ROUTER is not set | ||
232 | # CONFIG_NET_SCHED is not set | ||
233 | # CONFIG_NET_CLS_ROUTE is not set | ||
234 | |||
235 | # | ||
236 | # Network testing | ||
237 | # | ||
238 | # CONFIG_NET_PKTGEN is not set | ||
239 | # CONFIG_HAMRADIO is not set | ||
240 | # CONFIG_IRDA is not set | ||
241 | # CONFIG_BT is not set | ||
242 | |||
243 | # | ||
183 | # Device Drivers | 244 | # Device Drivers |
184 | # | 245 | # |
185 | 246 | ||
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
249 | CONFIG_MTD_IXP2000=y | 310 | CONFIG_MTD_IXP2000=y |
250 | # CONFIG_MTD_EDB7312 is not set | 311 | # CONFIG_MTD_EDB7312 is not set |
251 | # CONFIG_MTD_PCI is not set | 312 | # CONFIG_MTD_PCI is not set |
313 | # CONFIG_MTD_PLATRAM is not set | ||
252 | 314 | ||
253 | # | 315 | # |
254 | # Self-contained MTD device drivers | 316 | # Self-contained MTD device drivers |
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y | |||
335 | # CONFIG_I2O is not set | 397 | # CONFIG_I2O is not set |
336 | 398 | ||
337 | # | 399 | # |
338 | # Networking support | 400 | # Network device support |
339 | # | ||
340 | CONFIG_NET=y | ||
341 | |||
342 | # | ||
343 | # Networking options | ||
344 | # | ||
345 | CONFIG_PACKET=y | ||
346 | CONFIG_PACKET_MMAP=y | ||
347 | CONFIG_UNIX=y | ||
348 | # CONFIG_NET_KEY is not set | ||
349 | CONFIG_INET=y | ||
350 | # CONFIG_IP_MULTICAST is not set | ||
351 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
352 | CONFIG_IP_FIB_HASH=y | ||
353 | CONFIG_IP_PNP=y | ||
354 | CONFIG_IP_PNP_DHCP=y | ||
355 | CONFIG_IP_PNP_BOOTP=y | ||
356 | # CONFIG_IP_PNP_RARP is not set | ||
357 | # CONFIG_NET_IPIP is not set | ||
358 | # CONFIG_NET_IPGRE is not set | ||
359 | # CONFIG_ARPD is not set | ||
360 | CONFIG_SYN_COOKIES=y | ||
361 | # CONFIG_INET_AH is not set | ||
362 | # CONFIG_INET_ESP is not set | ||
363 | # CONFIG_INET_IPCOMP is not set | ||
364 | # CONFIG_INET_TUNNEL is not set | ||
365 | # CONFIG_IP_TCPDIAG is not set | ||
366 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
367 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
368 | CONFIG_TCP_CONG_BIC=y | ||
369 | # CONFIG_IPV6 is not set | ||
370 | # CONFIG_NETFILTER is not set | ||
371 | |||
372 | # | ||
373 | # SCTP Configuration (EXPERIMENTAL) | ||
374 | # | ||
375 | # CONFIG_IP_SCTP is not set | ||
376 | # CONFIG_ATM is not set | ||
377 | # CONFIG_BRIDGE is not set | ||
378 | # CONFIG_VLAN_8021Q is not set | ||
379 | # CONFIG_DECNET is not set | ||
380 | # CONFIG_LLC2 is not set | ||
381 | # CONFIG_IPX is not set | ||
382 | # CONFIG_ATALK is not set | ||
383 | # CONFIG_X25 is not set | ||
384 | # CONFIG_LAPB is not set | ||
385 | # CONFIG_NET_DIVERT is not set | ||
386 | # CONFIG_ECONET is not set | ||
387 | # CONFIG_WAN_ROUTER is not set | ||
388 | |||
389 | # | ||
390 | # QoS and/or fair queueing | ||
391 | # | ||
392 | # CONFIG_NET_SCHED is not set | ||
393 | # CONFIG_NET_CLS_ROUTE is not set | ||
394 | |||
395 | # | ||
396 | # Network testing | ||
397 | # | 401 | # |
398 | # CONFIG_NET_PKTGEN is not set | ||
399 | # CONFIG_NETPOLL is not set | ||
400 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
401 | # CONFIG_HAMRADIO is not set | ||
402 | # CONFIG_IRDA is not set | ||
403 | # CONFIG_BT is not set | ||
404 | CONFIG_NETDEVICES=y | 402 | CONFIG_NETDEVICES=y |
405 | CONFIG_DUMMY=y | 403 | CONFIG_DUMMY=y |
406 | # CONFIG_BONDING is not set | 404 | # CONFIG_BONDING is not set |
@@ -511,6 +509,8 @@ CONFIG_DLCI_MAX=8 | |||
511 | # CONFIG_SLIP is not set | 509 | # CONFIG_SLIP is not set |
512 | # CONFIG_SHAPER is not set | 510 | # CONFIG_SHAPER is not set |
513 | # CONFIG_NETCONSOLE is not set | 511 | # CONFIG_NETCONSOLE is not set |
512 | # CONFIG_NETPOLL is not set | ||
513 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
514 | 514 | ||
515 | # | 515 | # |
516 | # ISDN subsystem | 516 | # ISDN subsystem |
@@ -637,7 +637,7 @@ CONFIG_I2C_ALGOBIT=y | |||
637 | # CONFIG_I2C_I810 is not set | 637 | # CONFIG_I2C_I810 is not set |
638 | # CONFIG_I2C_PIIX4 is not set | 638 | # CONFIG_I2C_PIIX4 is not set |
639 | # CONFIG_I2C_ISA is not set | 639 | # CONFIG_I2C_ISA is not set |
640 | # CONFIG_I2C_IXP2000 is not set | 640 | CONFIG_I2C_IXP2000=y |
641 | # CONFIG_I2C_NFORCE2 is not set | 641 | # CONFIG_I2C_NFORCE2 is not set |
642 | # CONFIG_I2C_PARPORT_LIGHT is not set | 642 | # CONFIG_I2C_PARPORT_LIGHT is not set |
643 | # CONFIG_I2C_PROSAVAGE is not set | 643 | # CONFIG_I2C_PROSAVAGE is not set |
@@ -651,11 +651,28 @@ CONFIG_I2C_ALGOBIT=y | |||
651 | # CONFIG_I2C_VIAPRO is not set | 651 | # CONFIG_I2C_VIAPRO is not set |
652 | # CONFIG_I2C_VOODOO3 is not set | 652 | # CONFIG_I2C_VOODOO3 is not set |
653 | # CONFIG_I2C_PCA_ISA is not set | 653 | # CONFIG_I2C_PCA_ISA is not set |
654 | CONFIG_I2C_SENSOR=y | ||
654 | 655 | ||
655 | # | 656 | # |
656 | # Hardware Sensors Chip support | 657 | # Miscellaneous I2C Chip support |
657 | # | 658 | # |
658 | CONFIG_I2C_SENSOR=y | 659 | # CONFIG_SENSORS_DS1337 is not set |
660 | # CONFIG_SENSORS_DS1374 is not set | ||
661 | CONFIG_SENSORS_EEPROM=y | ||
662 | # CONFIG_SENSORS_PCF8574 is not set | ||
663 | # CONFIG_SENSORS_PCA9539 is not set | ||
664 | # CONFIG_SENSORS_PCF8591 is not set | ||
665 | # CONFIG_SENSORS_RTC8564 is not set | ||
666 | # CONFIG_SENSORS_MAX6875 is not set | ||
667 | # CONFIG_I2C_DEBUG_CORE is not set | ||
668 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
669 | # CONFIG_I2C_DEBUG_BUS is not set | ||
670 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
671 | |||
672 | # | ||
673 | # Hardware Monitoring support | ||
674 | # | ||
675 | CONFIG_HWMON=y | ||
659 | # CONFIG_SENSORS_ADM1021 is not set | 676 | # CONFIG_SENSORS_ADM1021 is not set |
660 | # CONFIG_SENSORS_ADM1025 is not set | 677 | # CONFIG_SENSORS_ADM1025 is not set |
661 | # CONFIG_SENSORS_ADM1026 is not set | 678 | # CONFIG_SENSORS_ADM1026 is not set |
@@ -681,30 +698,15 @@ CONFIG_I2C_SENSOR=y | |||
681 | # CONFIG_SENSORS_LM92 is not set | 698 | # CONFIG_SENSORS_LM92 is not set |
682 | # CONFIG_SENSORS_MAX1619 is not set | 699 | # CONFIG_SENSORS_MAX1619 is not set |
683 | # CONFIG_SENSORS_PC87360 is not set | 700 | # CONFIG_SENSORS_PC87360 is not set |
684 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
685 | # CONFIG_SENSORS_SIS5595 is not set | 701 | # CONFIG_SENSORS_SIS5595 is not set |
686 | # CONFIG_SENSORS_SMSC47M1 is not set | 702 | # CONFIG_SENSORS_SMSC47M1 is not set |
703 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
687 | # CONFIG_SENSORS_VIA686A is not set | 704 | # CONFIG_SENSORS_VIA686A is not set |
688 | # CONFIG_SENSORS_W83781D is not set | 705 | # CONFIG_SENSORS_W83781D is not set |
689 | # CONFIG_SENSORS_W83L785TS is not set | 706 | # CONFIG_SENSORS_W83L785TS is not set |
690 | # CONFIG_SENSORS_W83627HF is not set | 707 | # CONFIG_SENSORS_W83627HF is not set |
691 | # CONFIG_SENSORS_W83627EHF is not set | 708 | # CONFIG_SENSORS_W83627EHF is not set |
692 | 709 | # CONFIG_HWMON_DEBUG_CHIP is not set | |
693 | # | ||
694 | # Other I2C Chip support | ||
695 | # | ||
696 | # CONFIG_SENSORS_DS1337 is not set | ||
697 | # CONFIG_SENSORS_DS1374 is not set | ||
698 | CONFIG_SENSORS_EEPROM=y | ||
699 | # CONFIG_SENSORS_PCF8574 is not set | ||
700 | # CONFIG_SENSORS_PCA9539 is not set | ||
701 | # CONFIG_SENSORS_PCF8591 is not set | ||
702 | # CONFIG_SENSORS_RTC8564 is not set | ||
703 | # CONFIG_SENSORS_MAX6875 is not set | ||
704 | # CONFIG_I2C_DEBUG_CORE is not set | ||
705 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
706 | # CONFIG_I2C_DEBUG_BUS is not set | ||
707 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
708 | 710 | ||
709 | # | 711 | # |
710 | # Misc devices | 712 | # Misc devices |
@@ -772,6 +774,7 @@ CONFIG_FS_POSIX_ACL=y | |||
772 | # CONFIG_XFS_FS is not set | 774 | # CONFIG_XFS_FS is not set |
773 | # CONFIG_MINIX_FS is not set | 775 | # CONFIG_MINIX_FS is not set |
774 | # CONFIG_ROMFS_FS is not set | 776 | # CONFIG_ROMFS_FS is not set |
777 | CONFIG_INOTIFY=y | ||
775 | # CONFIG_QUOTA is not set | 778 | # CONFIG_QUOTA is not set |
776 | CONFIG_DNOTIFY=y | 779 | CONFIG_DNOTIFY=y |
777 | # CONFIG_AUTOFS_FS is not set | 780 | # CONFIG_AUTOFS_FS is not set |
@@ -814,8 +817,7 @@ CONFIG_RAMFS=y | |||
814 | # CONFIG_JFFS_FS is not set | 817 | # CONFIG_JFFS_FS is not set |
815 | CONFIG_JFFS2_FS=y | 818 | CONFIG_JFFS2_FS=y |
816 | CONFIG_JFFS2_FS_DEBUG=0 | 819 | CONFIG_JFFS2_FS_DEBUG=0 |
817 | # CONFIG_JFFS2_FS_NAND is not set | 820 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
818 | # CONFIG_JFFS2_FS_NOR_ECC is not set | ||
819 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 821 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
820 | CONFIG_JFFS2_ZLIB=y | 822 | CONFIG_JFFS2_ZLIB=y |
821 | CONFIG_JFFS2_RTIME=y | 823 | CONFIG_JFFS2_RTIME=y |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 426c2bc517eb..be37586cb1b0 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -198,13 +198,10 @@ static void corgi_mci_setpower(struct device *dev, unsigned int vdd) | |||
198 | { | 198 | { |
199 | struct pxamci_platform_data* p_d = dev->platform_data; | 199 | struct pxamci_platform_data* p_d = dev->platform_data; |
200 | 200 | ||
201 | if (( 1 << vdd) & p_d->ocr_mask) { | 201 | if (( 1 << vdd) & p_d->ocr_mask) |
202 | printk(KERN_DEBUG "%s: on\n", __FUNCTION__); | ||
203 | GPSR1 = GPIO_bit(CORGI_GPIO_SD_PWR); | 202 | GPSR1 = GPIO_bit(CORGI_GPIO_SD_PWR); |
204 | } else { | 203 | else |
205 | printk(KERN_DEBUG "%s: off\n", __FUNCTION__); | ||
206 | GPCR1 = GPIO_bit(CORGI_GPIO_SD_PWR); | 204 | GPCR1 = GPIO_bit(CORGI_GPIO_SD_PWR); |
207 | } | ||
208 | } | 205 | } |
209 | 206 | ||
210 | static int corgi_mci_get_ro(struct device *dev) | 207 | static int corgi_mci_get_ro(struct device *dev) |
@@ -259,6 +256,16 @@ static struct platform_device *devices[] __initdata = { | |||
259 | 256 | ||
260 | static void __init corgi_init(void) | 257 | static void __init corgi_init(void) |
261 | { | 258 | { |
259 | /* setup sleep mode values */ | ||
260 | PWER = 0x00000002; | ||
261 | PFER = 0x00000000; | ||
262 | PRER = 0x00000002; | ||
263 | PGSR0 = 0x0158C000; | ||
264 | PGSR1 = 0x00FF0080; | ||
265 | PGSR2 = 0x0001C004; | ||
266 | /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */ | ||
267 | PCFR |= PCFR_OPDE; | ||
268 | |||
262 | corgi_ssp_set_machinfo(&corgi_ssp_machinfo); | 269 | corgi_ssp_set_machinfo(&corgi_ssp_machinfo); |
263 | 270 | ||
264 | pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); | 271 | pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); |
@@ -285,42 +292,14 @@ static void __init fixup_corgi(struct machine_desc *desc, | |||
285 | mi->bank[0].size = (64*1024*1024); | 292 | mi->bank[0].size = (64*1024*1024); |
286 | } | 293 | } |
287 | 294 | ||
288 | static void __init corgi_init_irq(void) | ||
289 | { | ||
290 | pxa_init_irq(); | ||
291 | } | ||
292 | |||
293 | static struct map_desc corgi_io_desc[] __initdata = { | ||
294 | /* virtual physical length */ | ||
295 | /* { 0xf1000000, 0x08000000, 0x01000000, MT_DEVICE },*/ /* LCDC (readable for Qt driver) */ | ||
296 | /* { 0xef700000, 0x10800000, 0x00001000, MT_DEVICE },*/ /* SCOOP */ | ||
297 | { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */ | ||
298 | }; | ||
299 | |||
300 | static void __init corgi_map_io(void) | ||
301 | { | ||
302 | pxa_map_io(); | ||
303 | iotable_init(corgi_io_desc,ARRAY_SIZE(corgi_io_desc)); | ||
304 | |||
305 | /* setup sleep mode values */ | ||
306 | PWER = 0x00000002; | ||
307 | PFER = 0x00000000; | ||
308 | PRER = 0x00000002; | ||
309 | PGSR0 = 0x0158C000; | ||
310 | PGSR1 = 0x00FF0080; | ||
311 | PGSR2 = 0x0001C004; | ||
312 | /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */ | ||
313 | PCFR |= PCFR_OPDE; | ||
314 | } | ||
315 | |||
316 | #ifdef CONFIG_MACH_CORGI | 295 | #ifdef CONFIG_MACH_CORGI |
317 | MACHINE_START(CORGI, "SHARP Corgi") | 296 | MACHINE_START(CORGI, "SHARP Corgi") |
318 | .phys_ram = 0xa0000000, | 297 | .phys_ram = 0xa0000000, |
319 | .phys_io = 0x40000000, | 298 | .phys_io = 0x40000000, |
320 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 299 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
321 | .fixup = fixup_corgi, | 300 | .fixup = fixup_corgi, |
322 | .map_io = corgi_map_io, | 301 | .map_io = pxa_map_io, |
323 | .init_irq = corgi_init_irq, | 302 | .init_irq = pxa_init_irq, |
324 | .init_machine = corgi_init, | 303 | .init_machine = corgi_init, |
325 | .timer = &pxa_timer, | 304 | .timer = &pxa_timer, |
326 | MACHINE_END | 305 | MACHINE_END |
@@ -332,8 +311,8 @@ MACHINE_START(SHEPHERD, "SHARP Shepherd") | |||
332 | .phys_io = 0x40000000, | 311 | .phys_io = 0x40000000, |
333 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 312 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
334 | .fixup = fixup_corgi, | 313 | .fixup = fixup_corgi, |
335 | .map_io = corgi_map_io, | 314 | .map_io = pxa_map_io, |
336 | .init_irq = corgi_init_irq, | 315 | .init_irq = pxa_init_irq, |
337 | .init_machine = corgi_init, | 316 | .init_machine = corgi_init, |
338 | .timer = &pxa_timer, | 317 | .timer = &pxa_timer, |
339 | MACHINE_END | 318 | MACHINE_END |
@@ -345,8 +324,8 @@ MACHINE_START(HUSKY, "SHARP Husky") | |||
345 | .phys_io = 0x40000000, | 324 | .phys_io = 0x40000000, |
346 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 325 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
347 | .fixup = fixup_corgi, | 326 | .fixup = fixup_corgi, |
348 | .map_io = corgi_map_io, | 327 | .map_io = pxa_map_io, |
349 | .init_irq = corgi_init_irq, | 328 | .init_irq = pxa_init_irq, |
350 | .init_machine = corgi_init, | 329 | .init_machine = corgi_init, |
351 | .timer = &pxa_timer, | 330 | .timer = &pxa_timer, |
352 | MACHINE_END | 331 | MACHINE_END |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 47cfb8bb8318..f25638810017 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -30,6 +30,8 @@ | |||
30 | 30 | ||
31 | #include <asm/arch/pxa-regs.h> | 31 | #include <asm/arch/pxa-regs.h> |
32 | #include <asm/arch/irq.h> | 32 | #include <asm/arch/irq.h> |
33 | #include <asm/arch/mmc.h> | ||
34 | #include <asm/arch/udc.h> | ||
33 | #include <asm/arch/poodle.h> | 35 | #include <asm/arch/poodle.h> |
34 | #include <asm/arch/pxafb.h> | 36 | #include <asm/arch/pxafb.h> |
35 | 37 | ||
@@ -93,6 +95,83 @@ static struct platform_device locomo_device = { | |||
93 | .resource = locomo_resources, | 95 | .resource = locomo_resources, |
94 | }; | 96 | }; |
95 | 97 | ||
98 | |||
99 | /* | ||
100 | * MMC/SD Device | ||
101 | * | ||
102 | * The card detect interrupt isn't debounced so we delay it by 250ms | ||
103 | * to give the card a chance to fully insert/eject. | ||
104 | */ | ||
105 | static struct pxamci_platform_data poodle_mci_platform_data; | ||
106 | |||
107 | static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(int, void *, struct pt_regs *), void *data) | ||
108 | { | ||
109 | int err; | ||
110 | |||
111 | /* setup GPIO for PXA25x MMC controller */ | ||
112 | pxa_gpio_mode(GPIO6_MMCCLK_MD); | ||
113 | pxa_gpio_mode(GPIO8_MMCCS0_MD); | ||
114 | pxa_gpio_mode(POODLE_GPIO_nSD_DETECT | GPIO_IN); | ||
115 | pxa_gpio_mode(POODLE_GPIO_SD_PWR | GPIO_OUT); | ||
116 | |||
117 | poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250); | ||
118 | |||
119 | err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int, SA_INTERRUPT, | ||
120 | "MMC card detect", data); | ||
121 | if (err) { | ||
122 | printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); | ||
123 | return -1; | ||
124 | } | ||
125 | |||
126 | set_irq_type(POODLE_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE); | ||
127 | |||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static void poodle_mci_setpower(struct device *dev, unsigned int vdd) | ||
132 | { | ||
133 | struct pxamci_platform_data* p_d = dev->platform_data; | ||
134 | |||
135 | if (( 1 << vdd) & p_d->ocr_mask) | ||
136 | GPSR1 = GPIO_bit(POODLE_GPIO_SD_PWR); | ||
137 | else | ||
138 | GPCR1 = GPIO_bit(POODLE_GPIO_SD_PWR); | ||
139 | } | ||
140 | |||
141 | static void poodle_mci_exit(struct device *dev, void *data) | ||
142 | { | ||
143 | free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data); | ||
144 | } | ||
145 | |||
146 | static struct pxamci_platform_data poodle_mci_platform_data = { | ||
147 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | ||
148 | .init = poodle_mci_init, | ||
149 | .setpower = poodle_mci_setpower, | ||
150 | .exit = poodle_mci_exit, | ||
151 | }; | ||
152 | |||
153 | |||
154 | /* | ||
155 | * USB Device Controller | ||
156 | */ | ||
157 | static void poodle_udc_command(int cmd) | ||
158 | { | ||
159 | switch(cmd) { | ||
160 | case PXA2XX_UDC_CMD_CONNECT: | ||
161 | GPSR(POODLE_GPIO_USB_PULLUP) = GPIO_bit(POODLE_GPIO_USB_PULLUP); | ||
162 | break; | ||
163 | case PXA2XX_UDC_CMD_DISCONNECT: | ||
164 | GPCR(POODLE_GPIO_USB_PULLUP) = GPIO_bit(POODLE_GPIO_USB_PULLUP); | ||
165 | break; | ||
166 | } | ||
167 | } | ||
168 | |||
169 | static struct pxa2xx_udc_mach_info udc_info __initdata = { | ||
170 | /* no connect GPIO; poodle can't tell connection status */ | ||
171 | .udc_command = poodle_udc_command, | ||
172 | }; | ||
173 | |||
174 | |||
96 | /* PXAFB device */ | 175 | /* PXAFB device */ |
97 | static struct pxafb_mach_info poodle_fb_info __initdata = { | 176 | static struct pxafb_mach_info poodle_fb_info __initdata = { |
98 | .pixclock = 144700, | 177 | .pixclock = 144700, |
@@ -126,6 +205,15 @@ static void __init poodle_init(void) | |||
126 | { | 205 | { |
127 | int ret = 0; | 206 | int ret = 0; |
128 | 207 | ||
208 | /* setup sleep mode values */ | ||
209 | PWER = 0x00000002; | ||
210 | PFER = 0x00000000; | ||
211 | PRER = 0x00000002; | ||
212 | PGSR0 = 0x00008000; | ||
213 | PGSR1 = 0x003F0202; | ||
214 | PGSR2 = 0x0001C000; | ||
215 | PCFR |= PCFR_OPDE; | ||
216 | |||
129 | /* cpu initialize */ | 217 | /* cpu initialize */ |
130 | /* Pgsr Register */ | 218 | /* Pgsr Register */ |
131 | PGSR0 = 0x0146dd80; | 219 | PGSR0 = 0x0146dd80; |
@@ -155,6 +243,9 @@ static void __init poodle_init(void) | |||
155 | GPSR2 = 0x00000000; | 243 | GPSR2 = 0x00000000; |
156 | 244 | ||
157 | set_pxa_fb_info(&poodle_fb_info); | 245 | set_pxa_fb_info(&poodle_fb_info); |
246 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); | ||
247 | pxa_set_udc_info(&udc_info); | ||
248 | pxa_set_mci_info(&poodle_mci_platform_data); | ||
158 | 249 | ||
159 | scoop_num = 1; | 250 | scoop_num = 1; |
160 | scoop_devs = &poodle_pcmcia_scoop[0]; | 251 | scoop_devs = &poodle_pcmcia_scoop[0]; |
@@ -171,32 +262,12 @@ static void __init fixup_poodle(struct machine_desc *desc, | |||
171 | sharpsl_save_param(); | 262 | sharpsl_save_param(); |
172 | } | 263 | } |
173 | 264 | ||
174 | static struct map_desc poodle_io_desc[] __initdata = { | ||
175 | /* virtual physical length */ | ||
176 | { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */ | ||
177 | }; | ||
178 | |||
179 | static void __init poodle_map_io(void) | ||
180 | { | ||
181 | pxa_map_io(); | ||
182 | iotable_init(poodle_io_desc, ARRAY_SIZE(poodle_io_desc)); | ||
183 | |||
184 | /* setup sleep mode values */ | ||
185 | PWER = 0x00000002; | ||
186 | PFER = 0x00000000; | ||
187 | PRER = 0x00000002; | ||
188 | PGSR0 = 0x00008000; | ||
189 | PGSR1 = 0x003F0202; | ||
190 | PGSR2 = 0x0001C000; | ||
191 | PCFR |= PCFR_OPDE; | ||
192 | } | ||
193 | |||
194 | MACHINE_START(POODLE, "SHARP Poodle") | 265 | MACHINE_START(POODLE, "SHARP Poodle") |
195 | .phys_ram = 0xa0000000, | 266 | .phys_ram = 0xa0000000, |
196 | .phys_io = 0x40000000, | 267 | .phys_io = 0x40000000, |
197 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 268 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
198 | .fixup = fixup_poodle, | 269 | .fixup = fixup_poodle, |
199 | .map_io = poodle_map_io, | 270 | .map_io = pxa_map_io, |
200 | .init_irq = pxa_init_irq, | 271 | .init_irq = pxa_init_irq, |
201 | .timer = &pxa_timer, | 272 | .timer = &pxa_timer, |
202 | .init_machine = poodle_init, | 273 | .init_machine = poodle_init, |
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 8cb69113a57c..25d6a4e27533 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -111,12 +111,11 @@ static struct mtd_partition collie_partitions[] = { | |||
111 | 111 | ||
112 | static void collie_set_vpp(int vpp) | 112 | static void collie_set_vpp(int vpp) |
113 | { | 113 | { |
114 | write_scoop_reg(SCOOP_GPCR, read_scoop_reg(SCOOP_GPCR) | COLLIE_SCP_VPEN); | 114 | write_scoop_reg(&colliescoop_device.dev, SCOOP_GPCR, read_scoop_reg(SCOOP_GPCR) | COLLIE_SCP_VPEN); |
115 | if (vpp) { | 115 | if (vpp) |
116 | write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) | COLLIE_SCP_VPEN); | 116 | write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) | COLLIE_SCP_VPEN); |
117 | } else { | 117 | else |
118 | write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) & ~COLLIE_SCP_VPEN); | 118 | write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) & ~COLLIE_SCP_VPEN); |
119 | } | ||
120 | } | 119 | } |
121 | 120 | ||
122 | static struct flash_platform_data collie_flash_data = { | 121 | static struct flash_platform_data collie_flash_data = { |
diff --git a/arch/arm26/boot/compressed/hw-bse.c b/arch/arm26/boot/compressed/hw-bse.c deleted file mode 100644 index 3e8f07f8e08a..000000000000 --- a/arch/arm26/boot/compressed/hw-bse.c +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * Bright Star Engineering Inc. | ||
3 | * | ||
4 | * code for readng parameters from the | ||
5 | * parameter blocks of the boot block | ||
6 | * flash memory | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | static int strcmp(const char *s1, const char *s2) | ||
11 | { | ||
12 | while (*s1 != '\0' && *s1 == *s2) | ||
13 | { | ||
14 | s1++; | ||
15 | s2++; | ||
16 | } | ||
17 | |||
18 | return (*(unsigned char *) s1) - (*(unsigned char *) s2); | ||
19 | } | ||
20 | |||
21 | struct pblk_t { | ||
22 | char type; | ||
23 | unsigned short size; | ||
24 | }; | ||
25 | |||
26 | static char *bse_getflashparam(char *name) { | ||
27 | unsigned int esize; | ||
28 | char *q,*r; | ||
29 | unsigned char *p,*e; | ||
30 | struct pblk_t *thepb = (struct pblk_t *) 0x00004000; | ||
31 | struct pblk_t *altpb = (struct pblk_t *) 0x00006000; | ||
32 | if (thepb->type&1) { | ||
33 | if (altpb->type&1) { | ||
34 | /* no valid param block */ | ||
35 | return (char*)0; | ||
36 | } else { | ||
37 | /* altpb is valid */ | ||
38 | struct pblk_t *tmp; | ||
39 | tmp = thepb; | ||
40 | thepb = altpb; | ||
41 | altpb = tmp; | ||
42 | } | ||
43 | } | ||
44 | p = (char*)thepb + sizeof(struct pblk_t); | ||
45 | e = p + thepb->size; | ||
46 | while (p < e) { | ||
47 | q = p; | ||
48 | esize = *p; | ||
49 | if (esize == 0xFF) break; | ||
50 | if (esize == 0) break; | ||
51 | if (esize > 127) { | ||
52 | esize = (esize&0x7F)<<8 | p[1]; | ||
53 | q++; | ||
54 | } | ||
55 | q++; | ||
56 | r=q; | ||
57 | if (*r && ((name == 0) || (!strcmp(name,r)))) { | ||
58 | while (*q++) ; | ||
59 | return q; | ||
60 | } | ||
61 | p+=esize; | ||
62 | } | ||
63 | return (char*)0; | ||
64 | } | ||
65 | |||
66 | void bse_setup(void) { | ||
67 | /* extract the linux cmdline from flash */ | ||
68 | char *name=bse_getflashparam("linuxboot"); | ||
69 | char *x = (char *)0xc0000100; | ||
70 | if (name) { | ||
71 | while (*name) *x++=*name++; | ||
72 | } | ||
73 | *x=0; | ||
74 | } | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 28a4529fdd60..7e926471e4ec 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -899,7 +899,7 @@ int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) | |||
899 | if ((err = iosapic_init(phys_addr, gsi_base))) | 899 | if ((err = iosapic_init(phys_addr, gsi_base))) |
900 | return err; | 900 | return err; |
901 | 901 | ||
902 | #if CONFIG_ACPI_NUMA | 902 | #ifdef CONFIG_ACPI_NUMA |
903 | acpi_map_iosapic(handle, 0, NULL, NULL); | 903 | acpi_map_iosapic(handle, 0, NULL, NULL); |
904 | #endif /* CONFIG_ACPI_NUMA */ | 904 | #endif /* CONFIG_ACPI_NUMA */ |
905 | 905 | ||
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index ba0b6a1f429f..0741b066b98f 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -491,7 +491,7 @@ GLOBAL_ENTRY(prefetch_stack) | |||
491 | ;; | 491 | ;; |
492 | lfetch.fault [r16], 128 | 492 | lfetch.fault [r16], 128 |
493 | br.ret.sptk.many rp | 493 | br.ret.sptk.many rp |
494 | END(prefetch_switch_stack) | 494 | END(prefetch_stack) |
495 | 495 | ||
496 | GLOBAL_ENTRY(execve) | 496 | GLOBAL_ENTRY(execve) |
497 | mov r15=__NR_execve // put syscall number in place | 497 | mov r15=__NR_execve // put syscall number in place |
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 6e683745af49..80f83d6cdbfc 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -84,23 +84,23 @@ mca_page_isolate(unsigned long paddr) | |||
84 | struct page *p; | 84 | struct page *p; |
85 | 85 | ||
86 | /* whether physical address is valid or not */ | 86 | /* whether physical address is valid or not */ |
87 | if ( !ia64_phys_addr_valid(paddr) ) | 87 | if (!ia64_phys_addr_valid(paddr)) |
88 | return ISOLATE_NG; | 88 | return ISOLATE_NG; |
89 | 89 | ||
90 | /* convert physical address to physical page number */ | 90 | /* convert physical address to physical page number */ |
91 | p = pfn_to_page(paddr>>PAGE_SHIFT); | 91 | p = pfn_to_page(paddr>>PAGE_SHIFT); |
92 | 92 | ||
93 | /* check whether a page number have been already registered or not */ | 93 | /* check whether a page number have been already registered or not */ |
94 | for( i = 0; i < num_page_isolate; i++ ) | 94 | for (i = 0; i < num_page_isolate; i++) |
95 | if( page_isolate[i] == p ) | 95 | if (page_isolate[i] == p) |
96 | return ISOLATE_OK; /* already listed */ | 96 | return ISOLATE_OK; /* already listed */ |
97 | 97 | ||
98 | /* limitation check */ | 98 | /* limitation check */ |
99 | if( num_page_isolate == MAX_PAGE_ISOLATE ) | 99 | if (num_page_isolate == MAX_PAGE_ISOLATE) |
100 | return ISOLATE_NG; | 100 | return ISOLATE_NG; |
101 | 101 | ||
102 | /* kick pages having attribute 'SLAB' or 'Reserved' */ | 102 | /* kick pages having attribute 'SLAB' or 'Reserved' */ |
103 | if( PageSlab(p) || PageReserved(p) ) | 103 | if (PageSlab(p) || PageReserved(p)) |
104 | return ISOLATE_NG; | 104 | return ISOLATE_NG; |
105 | 105 | ||
106 | /* add attribute 'Reserved' and register the page */ | 106 | /* add attribute 'Reserved' and register the page */ |
@@ -139,10 +139,10 @@ mca_handler_bh(unsigned long paddr) | |||
139 | * @peidx: pointer to index of processor error section | 139 | * @peidx: pointer to index of processor error section |
140 | */ | 140 | */ |
141 | 141 | ||
142 | static void | 142 | static void |
143 | mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx) | 143 | mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx) |
144 | { | 144 | { |
145 | /* | 145 | /* |
146 | * calculate the start address of | 146 | * calculate the start address of |
147 | * "struct cpuid_info" and "sal_processor_static_info_t". | 147 | * "struct cpuid_info" and "sal_processor_static_info_t". |
148 | */ | 148 | */ |
@@ -164,7 +164,7 @@ mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx) | |||
164 | } | 164 | } |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * mca_make_slidx - Make index of SAL error record | 167 | * mca_make_slidx - Make index of SAL error record |
168 | * @buffer: pointer to SAL error record | 168 | * @buffer: pointer to SAL error record |
169 | * @slidx: pointer to index of SAL error record | 169 | * @slidx: pointer to index of SAL error record |
170 | * | 170 | * |
@@ -172,12 +172,12 @@ mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx) | |||
172 | * 1 if record has platform error / 0 if not | 172 | * 1 if record has platform error / 0 if not |
173 | */ | 173 | */ |
174 | #define LOG_INDEX_ADD_SECT_PTR(sect, ptr) \ | 174 | #define LOG_INDEX_ADD_SECT_PTR(sect, ptr) \ |
175 | { slidx_list_t *hl = &slidx_pool.buffer[slidx_pool.cur_idx]; \ | 175 | {slidx_list_t *hl = &slidx_pool.buffer[slidx_pool.cur_idx]; \ |
176 | hl->hdr = ptr; \ | 176 | hl->hdr = ptr; \ |
177 | list_add(&hl->list, &(sect)); \ | 177 | list_add(&hl->list, &(sect)); \ |
178 | slidx_pool.cur_idx = (slidx_pool.cur_idx + 1)%slidx_pool.max_idx; } | 178 | slidx_pool.cur_idx = (slidx_pool.cur_idx + 1)%slidx_pool.max_idx; } |
179 | 179 | ||
180 | static int | 180 | static int |
181 | mca_make_slidx(void *buffer, slidx_table_t *slidx) | 181 | mca_make_slidx(void *buffer, slidx_table_t *slidx) |
182 | { | 182 | { |
183 | int platform_err = 0; | 183 | int platform_err = 0; |
@@ -214,28 +214,36 @@ mca_make_slidx(void *buffer, slidx_table_t *slidx) | |||
214 | sp = (sal_log_section_hdr_t *)((char*)buffer + ercd_pos); | 214 | sp = (sal_log_section_hdr_t *)((char*)buffer + ercd_pos); |
215 | if (!efi_guidcmp(sp->guid, SAL_PROC_DEV_ERR_SECT_GUID)) { | 215 | if (!efi_guidcmp(sp->guid, SAL_PROC_DEV_ERR_SECT_GUID)) { |
216 | LOG_INDEX_ADD_SECT_PTR(slidx->proc_err, sp); | 216 | LOG_INDEX_ADD_SECT_PTR(slidx->proc_err, sp); |
217 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_MEM_DEV_ERR_SECT_GUID)) { | 217 | } else if (!efi_guidcmp(sp->guid, |
218 | SAL_PLAT_MEM_DEV_ERR_SECT_GUID)) { | ||
218 | platform_err = 1; | 219 | platform_err = 1; |
219 | LOG_INDEX_ADD_SECT_PTR(slidx->mem_dev_err, sp); | 220 | LOG_INDEX_ADD_SECT_PTR(slidx->mem_dev_err, sp); |
220 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SEL_DEV_ERR_SECT_GUID)) { | 221 | } else if (!efi_guidcmp(sp->guid, |
222 | SAL_PLAT_SEL_DEV_ERR_SECT_GUID)) { | ||
221 | platform_err = 1; | 223 | platform_err = 1; |
222 | LOG_INDEX_ADD_SECT_PTR(slidx->sel_dev_err, sp); | 224 | LOG_INDEX_ADD_SECT_PTR(slidx->sel_dev_err, sp); |
223 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_BUS_ERR_SECT_GUID)) { | 225 | } else if (!efi_guidcmp(sp->guid, |
226 | SAL_PLAT_PCI_BUS_ERR_SECT_GUID)) { | ||
224 | platform_err = 1; | 227 | platform_err = 1; |
225 | LOG_INDEX_ADD_SECT_PTR(slidx->pci_bus_err, sp); | 228 | LOG_INDEX_ADD_SECT_PTR(slidx->pci_bus_err, sp); |
226 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID)) { | 229 | } else if (!efi_guidcmp(sp->guid, |
230 | SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID)) { | ||
227 | platform_err = 1; | 231 | platform_err = 1; |
228 | LOG_INDEX_ADD_SECT_PTR(slidx->smbios_dev_err, sp); | 232 | LOG_INDEX_ADD_SECT_PTR(slidx->smbios_dev_err, sp); |
229 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_COMP_ERR_SECT_GUID)) { | 233 | } else if (!efi_guidcmp(sp->guid, |
234 | SAL_PLAT_PCI_COMP_ERR_SECT_GUID)) { | ||
230 | platform_err = 1; | 235 | platform_err = 1; |
231 | LOG_INDEX_ADD_SECT_PTR(slidx->pci_comp_err, sp); | 236 | LOG_INDEX_ADD_SECT_PTR(slidx->pci_comp_err, sp); |
232 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SPECIFIC_ERR_SECT_GUID)) { | 237 | } else if (!efi_guidcmp(sp->guid, |
238 | SAL_PLAT_SPECIFIC_ERR_SECT_GUID)) { | ||
233 | platform_err = 1; | 239 | platform_err = 1; |
234 | LOG_INDEX_ADD_SECT_PTR(slidx->plat_specific_err, sp); | 240 | LOG_INDEX_ADD_SECT_PTR(slidx->plat_specific_err, sp); |
235 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_HOST_CTLR_ERR_SECT_GUID)) { | 241 | } else if (!efi_guidcmp(sp->guid, |
242 | SAL_PLAT_HOST_CTLR_ERR_SECT_GUID)) { | ||
236 | platform_err = 1; | 243 | platform_err = 1; |
237 | LOG_INDEX_ADD_SECT_PTR(slidx->host_ctlr_err, sp); | 244 | LOG_INDEX_ADD_SECT_PTR(slidx->host_ctlr_err, sp); |
238 | } else if (!efi_guidcmp(sp->guid, SAL_PLAT_BUS_ERR_SECT_GUID)) { | 245 | } else if (!efi_guidcmp(sp->guid, |
246 | SAL_PLAT_BUS_ERR_SECT_GUID)) { | ||
239 | platform_err = 1; | 247 | platform_err = 1; |
240 | LOG_INDEX_ADD_SECT_PTR(slidx->plat_bus_err, sp); | 248 | LOG_INDEX_ADD_SECT_PTR(slidx->plat_bus_err, sp); |
241 | } else { | 249 | } else { |
@@ -253,15 +261,16 @@ mca_make_slidx(void *buffer, slidx_table_t *slidx) | |||
253 | * Return value: | 261 | * Return value: |
254 | * 0 on Success / -ENOMEM on Failure | 262 | * 0 on Success / -ENOMEM on Failure |
255 | */ | 263 | */ |
256 | static int | 264 | static int |
257 | init_record_index_pools(void) | 265 | init_record_index_pools(void) |
258 | { | 266 | { |
259 | int i; | 267 | int i; |
260 | int rec_max_size; /* Maximum size of SAL error records */ | 268 | int rec_max_size; /* Maximum size of SAL error records */ |
261 | int sect_min_size; /* Minimum size of SAL error sections */ | 269 | int sect_min_size; /* Minimum size of SAL error sections */ |
262 | /* minimum size table of each section */ | 270 | /* minimum size table of each section */ |
263 | static int sal_log_sect_min_sizes[] = { | 271 | static int sal_log_sect_min_sizes[] = { |
264 | sizeof(sal_log_processor_info_t) + sizeof(sal_processor_static_info_t), | 272 | sizeof(sal_log_processor_info_t) |
273 | + sizeof(sal_processor_static_info_t), | ||
265 | sizeof(sal_log_mem_dev_err_info_t), | 274 | sizeof(sal_log_mem_dev_err_info_t), |
266 | sizeof(sal_log_sel_dev_err_info_t), | 275 | sizeof(sal_log_sel_dev_err_info_t), |
267 | sizeof(sal_log_pci_bus_err_info_t), | 276 | sizeof(sal_log_pci_bus_err_info_t), |
@@ -294,7 +303,8 @@ init_record_index_pools(void) | |||
294 | 303 | ||
295 | /* - 3 - */ | 304 | /* - 3 - */ |
296 | slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1; | 305 | slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1; |
297 | slidx_pool.buffer = (slidx_list_t *) kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL); | 306 | slidx_pool.buffer = (slidx_list_t *) |
307 | kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL); | ||
298 | 308 | ||
299 | return slidx_pool.buffer ? 0 : -ENOMEM; | 309 | return slidx_pool.buffer ? 0 : -ENOMEM; |
300 | } | 310 | } |
@@ -308,6 +318,7 @@ init_record_index_pools(void) | |||
308 | * is_mca_global - Check whether this MCA is global or not | 318 | * is_mca_global - Check whether this MCA is global or not |
309 | * @peidx: pointer of index of processor error section | 319 | * @peidx: pointer of index of processor error section |
310 | * @pbci: pointer to pal_bus_check_info_t | 320 | * @pbci: pointer to pal_bus_check_info_t |
321 | * @sos: pointer to hand off struct between SAL and OS | ||
311 | * | 322 | * |
312 | * Return value: | 323 | * Return value: |
313 | * MCA_IS_LOCAL / MCA_IS_GLOBAL | 324 | * MCA_IS_LOCAL / MCA_IS_GLOBAL |
@@ -317,11 +328,12 @@ static mca_type_t | |||
317 | is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci, | 328 | is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci, |
318 | struct ia64_sal_os_state *sos) | 329 | struct ia64_sal_os_state *sos) |
319 | { | 330 | { |
320 | pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); | 331 | pal_processor_state_info_t *psp = |
332 | (pal_processor_state_info_t*)peidx_psp(peidx); | ||
321 | 333 | ||
322 | /* | 334 | /* |
323 | * PAL can request a rendezvous, if the MCA has a global scope. | 335 | * PAL can request a rendezvous, if the MCA has a global scope. |
324 | * If "rz_always" flag is set, SAL requests MCA rendezvous | 336 | * If "rz_always" flag is set, SAL requests MCA rendezvous |
325 | * in spite of global MCA. | 337 | * in spite of global MCA. |
326 | * Therefore it is local MCA when rendezvous has not been requested. | 338 | * Therefore it is local MCA when rendezvous has not been requested. |
327 | * Failed to rendezvous, the system must be down. | 339 | * Failed to rendezvous, the system must be down. |
@@ -381,13 +393,15 @@ is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci, | |||
381 | * @slidx: pointer of index of SAL error record | 393 | * @slidx: pointer of index of SAL error record |
382 | * @peidx: pointer of index of processor error section | 394 | * @peidx: pointer of index of processor error section |
383 | * @pbci: pointer of pal_bus_check_info | 395 | * @pbci: pointer of pal_bus_check_info |
396 | * @sos: pointer to hand off struct between SAL and OS | ||
384 | * | 397 | * |
385 | * Return value: | 398 | * Return value: |
386 | * 1 on Success / 0 on Failure | 399 | * 1 on Success / 0 on Failure |
387 | */ | 400 | */ |
388 | 401 | ||
389 | static int | 402 | static int |
390 | recover_from_read_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci, | 403 | recover_from_read_error(slidx_table_t *slidx, |
404 | peidx_table_t *peidx, pal_bus_check_info_t *pbci, | ||
391 | struct ia64_sal_os_state *sos) | 405 | struct ia64_sal_os_state *sos) |
392 | { | 406 | { |
393 | sal_log_mod_error_info_t *smei; | 407 | sal_log_mod_error_info_t *smei; |
@@ -453,24 +467,28 @@ recover_from_read_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_chec | |||
453 | * @slidx: pointer of index of SAL error record | 467 | * @slidx: pointer of index of SAL error record |
454 | * @peidx: pointer of index of processor error section | 468 | * @peidx: pointer of index of processor error section |
455 | * @pbci: pointer of pal_bus_check_info | 469 | * @pbci: pointer of pal_bus_check_info |
470 | * @sos: pointer to hand off struct between SAL and OS | ||
456 | * | 471 | * |
457 | * Return value: | 472 | * Return value: |
458 | * 1 on Success / 0 on Failure | 473 | * 1 on Success / 0 on Failure |
459 | */ | 474 | */ |
460 | 475 | ||
461 | static int | 476 | static int |
462 | recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci, | 477 | recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, |
478 | pal_bus_check_info_t *pbci, | ||
463 | struct ia64_sal_os_state *sos) | 479 | struct ia64_sal_os_state *sos) |
464 | { | 480 | { |
465 | int status = 0; | 481 | int status = 0; |
466 | pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); | 482 | pal_processor_state_info_t *psp = |
483 | (pal_processor_state_info_t*)peidx_psp(peidx); | ||
467 | 484 | ||
468 | if (psp->bc && pbci->eb && pbci->bsi == 0) { | 485 | if (psp->bc && pbci->eb && pbci->bsi == 0) { |
469 | switch(pbci->type) { | 486 | switch(pbci->type) { |
470 | case 1: /* partial read */ | 487 | case 1: /* partial read */ |
471 | case 3: /* full line(cpu) read */ | 488 | case 3: /* full line(cpu) read */ |
472 | case 9: /* I/O space read */ | 489 | case 9: /* I/O space read */ |
473 | status = recover_from_read_error(slidx, peidx, pbci, sos); | 490 | status = recover_from_read_error(slidx, peidx, pbci, |
491 | sos); | ||
474 | break; | 492 | break; |
475 | case 0: /* unknown */ | 493 | case 0: /* unknown */ |
476 | case 2: /* partial write */ | 494 | case 2: /* partial write */ |
@@ -481,7 +499,8 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_ | |||
481 | case 8: /* write coalescing transactions */ | 499 | case 8: /* write coalescing transactions */ |
482 | case 10: /* I/O space write */ | 500 | case 10: /* I/O space write */ |
483 | case 11: /* inter-processor interrupt message(IPI) */ | 501 | case 11: /* inter-processor interrupt message(IPI) */ |
484 | case 12: /* interrupt acknowledge or external task priority cycle */ | 502 | case 12: /* interrupt acknowledge or |
503 | external task priority cycle */ | ||
485 | default: | 504 | default: |
486 | break; | 505 | break; |
487 | } | 506 | } |
@@ -496,6 +515,7 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_ | |||
496 | * @slidx: pointer of index of SAL error record | 515 | * @slidx: pointer of index of SAL error record |
497 | * @peidx: pointer of index of processor error section | 516 | * @peidx: pointer of index of processor error section |
498 | * @pbci: pointer of pal_bus_check_info | 517 | * @pbci: pointer of pal_bus_check_info |
518 | * @sos: pointer to hand off struct between SAL and OS | ||
499 | * | 519 | * |
500 | * Return value: | 520 | * Return value: |
501 | * 1 on Success / 0 on Failure | 521 | * 1 on Success / 0 on Failure |
@@ -509,15 +529,17 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_ | |||
509 | */ | 529 | */ |
510 | 530 | ||
511 | static int | 531 | static int |
512 | recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci, | 532 | recover_from_processor_error(int platform, slidx_table_t *slidx, |
533 | peidx_table_t *peidx, pal_bus_check_info_t *pbci, | ||
513 | struct ia64_sal_os_state *sos) | 534 | struct ia64_sal_os_state *sos) |
514 | { | 535 | { |
515 | pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); | 536 | pal_processor_state_info_t *psp = |
537 | (pal_processor_state_info_t*)peidx_psp(peidx); | ||
516 | 538 | ||
517 | /* | 539 | /* |
518 | * We cannot recover errors with other than bus_check. | 540 | * We cannot recover errors with other than bus_check. |
519 | */ | 541 | */ |
520 | if (psp->cc || psp->rc || psp->uc) | 542 | if (psp->cc || psp->rc || psp->uc) |
521 | return 0; | 543 | return 0; |
522 | 544 | ||
523 | /* | 545 | /* |
@@ -546,10 +568,10 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t * | |||
546 | * (e.g. a load from poisoned memory) | 568 | * (e.g. a load from poisoned memory) |
547 | * This means "there are some platform errors". | 569 | * This means "there are some platform errors". |
548 | */ | 570 | */ |
549 | if (platform) | 571 | if (platform) |
550 | return recover_from_platform_error(slidx, peidx, pbci, sos); | 572 | return recover_from_platform_error(slidx, peidx, pbci, sos); |
551 | /* | 573 | /* |
552 | * On account of strange SAL error record, we cannot recover. | 574 | * On account of strange SAL error record, we cannot recover. |
553 | */ | 575 | */ |
554 | return 0; | 576 | return 0; |
555 | } | 577 | } |
@@ -557,14 +579,14 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t * | |||
557 | /** | 579 | /** |
558 | * mca_try_to_recover - Try to recover from MCA | 580 | * mca_try_to_recover - Try to recover from MCA |
559 | * @rec: pointer to a SAL error record | 581 | * @rec: pointer to a SAL error record |
582 | * @sos: pointer to hand off struct between SAL and OS | ||
560 | * | 583 | * |
561 | * Return value: | 584 | * Return value: |
562 | * 1 on Success / 0 on Failure | 585 | * 1 on Success / 0 on Failure |
563 | */ | 586 | */ |
564 | 587 | ||
565 | static int | 588 | static int |
566 | mca_try_to_recover(void *rec, | 589 | mca_try_to_recover(void *rec, struct ia64_sal_os_state *sos) |
567 | struct ia64_sal_os_state *sos) | ||
568 | { | 590 | { |
569 | int platform_err; | 591 | int platform_err; |
570 | int n_proc_err; | 592 | int n_proc_err; |
@@ -588,7 +610,8 @@ mca_try_to_recover(void *rec, | |||
588 | } | 610 | } |
589 | 611 | ||
590 | /* Make index of processor error section */ | 612 | /* Make index of processor error section */ |
591 | mca_make_peidx((sal_log_processor_info_t*)slidx_first_entry(&slidx.proc_err)->hdr, &peidx); | 613 | mca_make_peidx((sal_log_processor_info_t*) |
614 | slidx_first_entry(&slidx.proc_err)->hdr, &peidx); | ||
592 | 615 | ||
593 | /* Extract Processor BUS_CHECK[0] */ | 616 | /* Extract Processor BUS_CHECK[0] */ |
594 | *((u64*)&pbci) = peidx_check_info(&peidx, bus_check, 0); | 617 | *((u64*)&pbci) = peidx_check_info(&peidx, bus_check, 0); |
@@ -598,7 +621,8 @@ mca_try_to_recover(void *rec, | |||
598 | return 0; | 621 | return 0; |
599 | 622 | ||
600 | /* Try to recover a processor error */ | 623 | /* Try to recover a processor error */ |
601 | return recover_from_processor_error(platform_err, &slidx, &peidx, &pbci, sos); | 624 | return recover_from_processor_error(platform_err, &slidx, &peidx, |
625 | &pbci, sos); | ||
602 | } | 626 | } |
603 | 627 | ||
604 | /* | 628 | /* |
@@ -611,7 +635,7 @@ int __init mca_external_handler_init(void) | |||
611 | return -ENOMEM; | 635 | return -ENOMEM; |
612 | 636 | ||
613 | /* register external mca handlers */ | 637 | /* register external mca handlers */ |
614 | if (ia64_reg_MCA_extension(mca_try_to_recover)){ | 638 | if (ia64_reg_MCA_extension(mca_try_to_recover)) { |
615 | printk(KERN_ERR "ia64_reg_MCA_extension failed.\n"); | 639 | printk(KERN_ERR "ia64_reg_MCA_extension failed.\n"); |
616 | kfree(slidx_pool.buffer); | 640 | kfree(slidx_pool.buffer); |
617 | return -EFAULT; | 641 | return -EFAULT; |
diff --git a/arch/ia64/kernel/mca_drv.h b/arch/ia64/kernel/mca_drv.h index 0227b761f2c4..e2f6fa1e0ef6 100644 --- a/arch/ia64/kernel/mca_drv.h +++ b/arch/ia64/kernel/mca_drv.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) | 6 | * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) |
7 | */ | 7 | */ |
8 | /* | 8 | /* |
9 | * Processor error section: | 9 | * Processor error section: |
10 | * | 10 | * |
11 | * +-sal_log_processor_info_t *info-------------+ | 11 | * +-sal_log_processor_info_t *info-------------+ |
12 | * | sal_log_section_hdr_t header; | | 12 | * | sal_log_section_hdr_t header; | |
diff --git a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S index 2d7e0217638d..3f298ee4d00c 100644 --- a/arch/ia64/kernel/mca_drv_asm.S +++ b/arch/ia64/kernel/mca_drv_asm.S | |||
@@ -13,45 +13,45 @@ | |||
13 | #include <asm/ptrace.h> | 13 | #include <asm/ptrace.h> |
14 | 14 | ||
15 | GLOBAL_ENTRY(mca_handler_bhhook) | 15 | GLOBAL_ENTRY(mca_handler_bhhook) |
16 | invala // clear RSE ? | 16 | invala // clear RSE ? |
17 | ;; // | 17 | ;; |
18 | cover // | 18 | cover |
19 | ;; // | 19 | ;; |
20 | clrrrb // | 20 | clrrrb |
21 | ;; | 21 | ;; |
22 | alloc r16=ar.pfs,0,2,1,0 // make a new frame | 22 | alloc r16=ar.pfs,0,2,1,0 // make a new frame |
23 | ;; | 23 | ;; |
24 | mov ar.rsc=0 | 24 | mov ar.rsc=0 |
25 | ;; | 25 | ;; |
26 | mov r13=IA64_KR(CURRENT) // current task pointer | 26 | mov r13=IA64_KR(CURRENT) // current task pointer |
27 | ;; | 27 | ;; |
28 | mov r2=r13 | 28 | mov r2=r13 |
29 | ;; | 29 | ;; |
30 | addl r22=IA64_RBS_OFFSET,r2 | 30 | addl r22=IA64_RBS_OFFSET,r2 |
31 | ;; | 31 | ;; |
32 | mov ar.bspstore=r22 | 32 | mov ar.bspstore=r22 |
33 | ;; | 33 | ;; |
34 | addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2 | 34 | addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2 |
35 | ;; | 35 | ;; |
36 | adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13 | 36 | adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13 |
37 | ;; | 37 | ;; |
38 | st1 [r2]=r0 // clear current->thread.on_ustack flag | 38 | st1 [r2]=r0 // clear current->thread.on_ustack flag |
39 | mov loc0=r16 | 39 | mov loc0=r16 |
40 | movl loc1=mca_handler_bh // recovery C function | 40 | movl loc1=mca_handler_bh // recovery C function |
41 | ;; | 41 | ;; |
42 | mov out0=r8 // poisoned address | 42 | mov out0=r8 // poisoned address |
43 | mov b6=loc1 | 43 | mov b6=loc1 |
44 | ;; | 44 | ;; |
45 | mov loc1=rp | 45 | mov loc1=rp |
46 | ;; | 46 | ;; |
47 | ssm psr.i | 47 | ssm psr.i |
48 | ;; | 48 | ;; |
49 | br.call.sptk.many rp=b6 // does not return ... | 49 | br.call.sptk.many rp=b6 // does not return ... |
50 | ;; | 50 | ;; |
51 | mov ar.pfs=loc0 | 51 | mov ar.pfs=loc0 |
52 | mov rp=loc1 | 52 | mov rp=loc1 |
53 | ;; | 53 | ;; |
54 | mov r8=r0 | 54 | mov r8=r0 |
55 | br.ret.sptk.many rp | 55 | br.ret.sptk.many rp |
56 | ;; | 56 | ;; |
57 | END(mca_handler_bhhook) | 57 | END(mca_handler_bhhook) |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 1650353e3f77..d71731ee5b61 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -574,7 +574,7 @@ pfm_protect_ctx_ctxsw(pfm_context_t *x) | |||
574 | return 0UL; | 574 | return 0UL; |
575 | } | 575 | } |
576 | 576 | ||
577 | static inline unsigned long | 577 | static inline void |
578 | pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) | 578 | pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) |
579 | { | 579 | { |
580 | spin_unlock(&(x)->ctx_lock); | 580 | spin_unlock(&(x)->ctx_lock); |
@@ -2218,12 +2218,13 @@ static void | |||
2218 | pfm_free_fd(int fd, struct file *file) | 2218 | pfm_free_fd(int fd, struct file *file) |
2219 | { | 2219 | { |
2220 | struct files_struct *files = current->files; | 2220 | struct files_struct *files = current->files; |
2221 | struct fdtable *fdt = files_fdtable(files); | 2221 | struct fdtable *fdt; |
2222 | 2222 | ||
2223 | /* | 2223 | /* |
2224 | * there ie no fd_uninstall(), so we do it here | 2224 | * there ie no fd_uninstall(), so we do it here |
2225 | */ | 2225 | */ |
2226 | spin_lock(&files->file_lock); | 2226 | spin_lock(&files->file_lock); |
2227 | fdt = files_fdtable(files); | ||
2227 | rcu_assign_pointer(fdt->fd[fd], NULL); | 2228 | rcu_assign_pointer(fdt->fd[fd], NULL); |
2228 | spin_unlock(&files->file_lock); | 2229 | spin_unlock(&files->file_lock); |
2229 | 2230 | ||
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 8b9b226005d1..b8d08f33f7ee 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -34,7 +34,8 @@ ifeq ($(CONFIG_40x),y) | |||
34 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o | 34 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o |
35 | endif | 35 | endif |
36 | endif | 36 | endif |
37 | obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) | 37 | obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) \ |
38 | ppc_sys.o mpc8xx_devices.o mpc8xx_sys.o | ||
38 | ifeq ($(CONFIG_8xx),y) | 39 | ifeq ($(CONFIG_8xx),y) |
39 | obj-$(CONFIG_PCI) += qspan_pci.o i8259.o | 40 | obj-$(CONFIG_PCI) += qspan_pci.o i8259.o |
40 | endif | 41 | endif |
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c new file mode 100644 index 000000000000..2b5f0e701687 --- /dev/null +++ b/arch/ppc/syslib/mpc8xx_devices.c | |||
@@ -0,0 +1,224 @@ | |||
1 | /* | ||
2 | * arch/ppc/syslib/mpc8xx_devices.c | ||
3 | * | ||
4 | * MPC8xx Device descriptions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2005 MontaVista Software, Inc. by Vitaly Bordug<vbordug@ru.mvista.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/serial_8250.h> | ||
20 | #include <linux/mii.h> | ||
21 | #include <asm/commproc.h> | ||
22 | #include <asm/mpc8xx.h> | ||
23 | #include <asm/irq.h> | ||
24 | #include <asm/ppc_sys.h> | ||
25 | |||
26 | /* We use offsets for IORESOURCE_MEM to do not set dependences at compile time. | ||
27 | * They will get fixed up by mach_mpc8xx_fixup | ||
28 | */ | ||
29 | |||
30 | struct platform_device ppc_sys_platform_devices[] = { | ||
31 | [MPC8xx_CPM_FEC1] = { | ||
32 | .name = "fsl-cpm-fec", | ||
33 | .id = 1, | ||
34 | .num_resources = 2, | ||
35 | .resource = (struct resource[]) { | ||
36 | { | ||
37 | .name = "regs", | ||
38 | .start = 0xe00, | ||
39 | .end = 0xe88, | ||
40 | .flags = IORESOURCE_MEM, | ||
41 | }, | ||
42 | { | ||
43 | .name = "interrupt", | ||
44 | .start = MPC8xx_INT_FEC1, | ||
45 | .end = MPC8xx_INT_FEC1, | ||
46 | .flags = IORESOURCE_IRQ, | ||
47 | }, | ||
48 | }, | ||
49 | }, | ||
50 | [MPC8xx_CPM_FEC2] = { | ||
51 | .name = "fsl-cpm-fec", | ||
52 | .id = 2, | ||
53 | .num_resources = 2, | ||
54 | .resource = (struct resource[]) { | ||
55 | { | ||
56 | .name = "regs", | ||
57 | .start = 0x1e00, | ||
58 | .end = 0x1e88, | ||
59 | .flags = IORESOURCE_MEM, | ||
60 | }, | ||
61 | { | ||
62 | .name = "interrupt", | ||
63 | .start = MPC8xx_INT_FEC2, | ||
64 | .end = MPC8xx_INT_FEC2, | ||
65 | .flags = IORESOURCE_IRQ, | ||
66 | }, | ||
67 | }, | ||
68 | }, | ||
69 | [MPC8xx_CPM_SCC1] = { | ||
70 | .name = "fsl-cpm-scc", | ||
71 | .id = 1, | ||
72 | .num_resources = 3, | ||
73 | .resource = (struct resource[]) { | ||
74 | { | ||
75 | .name = "regs", | ||
76 | .start = 0xa00, | ||
77 | .end = 0xa18, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, | ||
80 | { | ||
81 | .name = "pram", | ||
82 | .start = 0x3c00, | ||
83 | .end = 0x3c80, | ||
84 | .flags = IORESOURCE_MEM, | ||
85 | }, | ||
86 | { | ||
87 | .name = "interrupt", | ||
88 | .start = MPC8xx_INT_SCC1, | ||
89 | .end = MPC8xx_INT_SCC1, | ||
90 | .flags = IORESOURCE_IRQ, | ||
91 | }, | ||
92 | }, | ||
93 | }, | ||
94 | [MPC8xx_CPM_SCC2] = { | ||
95 | .name = "fsl-cpm-scc", | ||
96 | .id = 2, | ||
97 | .num_resources = 3, | ||
98 | .resource = (struct resource[]) { | ||
99 | { | ||
100 | .name = "regs", | ||
101 | .start = 0xa20, | ||
102 | .end = 0xa38, | ||
103 | .flags = IORESOURCE_MEM, | ||
104 | }, | ||
105 | { | ||
106 | .name = "pram", | ||
107 | .start = 0x3d00, | ||
108 | .end = 0x3d80, | ||
109 | .flags = IORESOURCE_MEM, | ||
110 | }, | ||
111 | |||
112 | { | ||
113 | .name = "interrupt", | ||
114 | .start = MPC8xx_INT_SCC2, | ||
115 | .end = MPC8xx_INT_SCC2, | ||
116 | .flags = IORESOURCE_IRQ, | ||
117 | }, | ||
118 | }, | ||
119 | }, | ||
120 | [MPC8xx_CPM_SCC3] = { | ||
121 | .name = "fsl-cpm-scc", | ||
122 | .id = 3, | ||
123 | .num_resources = 3, | ||
124 | .resource = (struct resource[]) { | ||
125 | { | ||
126 | .name = "regs", | ||
127 | .start = 0xa40, | ||
128 | .end = 0xa58, | ||
129 | .flags = IORESOURCE_MEM, | ||
130 | }, | ||
131 | { | ||
132 | .name = "pram", | ||
133 | .start = 0x3e00, | ||
134 | .end = 0x3e80, | ||
135 | .flags = IORESOURCE_MEM, | ||
136 | }, | ||
137 | |||
138 | { | ||
139 | .name = "interrupt", | ||
140 | .start = MPC8xx_INT_SCC3, | ||
141 | .end = MPC8xx_INT_SCC3, | ||
142 | .flags = IORESOURCE_IRQ, | ||
143 | }, | ||
144 | }, | ||
145 | }, | ||
146 | [MPC8xx_CPM_SCC4] = { | ||
147 | .name = "fsl-cpm-scc", | ||
148 | .id = 4, | ||
149 | .num_resources = 3, | ||
150 | .resource = (struct resource[]) { | ||
151 | { | ||
152 | .name = "regs", | ||
153 | .start = 0xa60, | ||
154 | .end = 0xa78, | ||
155 | .flags = IORESOURCE_MEM, | ||
156 | }, | ||
157 | { | ||
158 | .name = "pram", | ||
159 | .start = 0x3f00, | ||
160 | .end = 0x3f80, | ||
161 | .flags = IORESOURCE_MEM, | ||
162 | }, | ||
163 | |||
164 | { | ||
165 | .name = "interrupt", | ||
166 | .start = MPC8xx_INT_SCC4, | ||
167 | .end = MPC8xx_INT_SCC4, | ||
168 | .flags = IORESOURCE_IRQ, | ||
169 | }, | ||
170 | }, | ||
171 | }, | ||
172 | [MPC8xx_CPM_SMC1] = { | ||
173 | .name = "fsl-cpm-smc", | ||
174 | .id = 1, | ||
175 | .num_resources = 2, | ||
176 | .resource = (struct resource[]) { | ||
177 | { | ||
178 | .name = "regs", | ||
179 | .start = 0xa82, | ||
180 | .end = 0xa91, | ||
181 | .flags = IORESOURCE_MEM, | ||
182 | }, | ||
183 | { | ||
184 | .name = "interrupt", | ||
185 | .start = MPC8xx_INT_SMC1, | ||
186 | .end = MPC8xx_INT_SMC1, | ||
187 | .flags = IORESOURCE_IRQ, | ||
188 | }, | ||
189 | }, | ||
190 | }, | ||
191 | [MPC8xx_CPM_SMC2] = { | ||
192 | .name = "fsl-cpm-smc", | ||
193 | .id = 2, | ||
194 | .num_resources = 2, | ||
195 | .resource = (struct resource[]) { | ||
196 | { | ||
197 | .name = "regs", | ||
198 | .start = 0xa92, | ||
199 | .end = 0xaa1, | ||
200 | .flags = IORESOURCE_MEM, | ||
201 | }, | ||
202 | { | ||
203 | .name = "interrupt", | ||
204 | .start = MPC8xx_INT_SMC2, | ||
205 | .end = MPC8xx_INT_SMC2, | ||
206 | .flags = IORESOURCE_IRQ, | ||
207 | }, | ||
208 | }, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static int __init mach_mpc8xx_fixup(struct platform_device *pdev) | ||
213 | { | ||
214 | ppc_sys_fixup_mem_resource (pdev, IMAP_ADDR); | ||
215 | return 0; | ||
216 | } | ||
217 | |||
218 | static int __init mach_mpc8xx_init(void) | ||
219 | { | ||
220 | ppc_sys_device_fixup = mach_mpc8xx_fixup; | ||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | postcore_initcall(mach_mpc8xx_init); | ||
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c new file mode 100644 index 000000000000..a532ccc861c0 --- /dev/null +++ b/arch/ppc/syslib/mpc8xx_sys.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/mpc8xx_sys.c | ||
3 | * | ||
4 | * MPC8xx System descriptions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2005 MontaVista Software, Inc. by Vitaly Bordug <vbordug@ru.mvista.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <asm/ppc_sys.h> | ||
20 | |||
21 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
22 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
23 | { | ||
24 | .ppc_sys_name = "MPC86X", | ||
25 | .mask = 0xFFFFFFFF, | ||
26 | .value = 0x00000000, | ||
27 | .num_devices = 2, | ||
28 | .device_list = (enum ppc_sys_devices[]) | ||
29 | { | ||
30 | MPC8xx_CPM_FEC1, | ||
31 | MPC8xx_CPM_SCC1, | ||
32 | MPC8xx_CPM_SCC2, | ||
33 | MPC8xx_CPM_SCC3, | ||
34 | MPC8xx_CPM_SCC4, | ||
35 | MPC8xx_CPM_SMC1, | ||
36 | MPC8xx_CPM_SMC2, | ||
37 | }, | ||
38 | }, | ||
39 | { | ||
40 | .ppc_sys_name = "MPC885", | ||
41 | .mask = 0xFFFFFFFF, | ||
42 | .value = 0x00000000, | ||
43 | .num_devices = 3, | ||
44 | .device_list = (enum ppc_sys_devices[]) | ||
45 | { | ||
46 | MPC8xx_CPM_FEC1, | ||
47 | MPC8xx_CPM_FEC2, | ||
48 | MPC8xx_CPM_SCC1, | ||
49 | MPC8xx_CPM_SCC2, | ||
50 | MPC8xx_CPM_SCC3, | ||
51 | MPC8xx_CPM_SCC4, | ||
52 | MPC8xx_CPM_SMC1, | ||
53 | MPC8xx_CPM_SMC2, | ||
54 | }, | ||
55 | }, | ||
56 | { /* default match */ | ||
57 | .ppc_sys_name = "", | ||
58 | .mask = 0x00000000, | ||
59 | .value = 0x00000000, | ||
60 | }, | ||
61 | }; | ||
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index 2e0ea92144f6..9a7e8748e2b2 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c | |||
@@ -575,7 +575,7 @@ static void openpic2_cached_disable_irq(u_int irq) | |||
575 | * we need something better to deal with that... Maybe switch to S1 for | 575 | * we need something better to deal with that... Maybe switch to S1 for |
576 | * cpufreq changes | 576 | * cpufreq changes |
577 | */ | 577 | */ |
578 | int openpic2_suspend(struct sys_device *sysdev, u32 state) | 578 | int openpic2_suspend(struct sys_device *sysdev, pm_message_t state) |
579 | { | 579 | { |
580 | int i; | 580 | int i; |
581 | unsigned long flags; | 581 | unsigned long flags; |
diff --git a/arch/ppc64/mm/fault.c b/arch/ppc64/mm/fault.c index 7fbc68bbb739..be3f25cf3e9f 100644 --- a/arch/ppc64/mm/fault.c +++ b/arch/ppc64/mm/fault.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/system.h> | 38 | #include <asm/system.h> |
39 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
40 | #include <asm/kdebug.h> | 40 | #include <asm/kdebug.h> |
41 | #include <asm/siginfo.h> | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Check whether the instruction at regs->nip is a store using | 44 | * Check whether the instruction at regs->nip is a store using |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 0865251a3f44..45d44c6bb39d 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.13-rc4 | 3 | # Linux kernel version: 2.6.14-rc1 |
4 | # Fri Jul 29 14:49:30 2005 | 4 | # Wed Sep 14 16:46:19 2005 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
@@ -21,6 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
21 | # General setup | 21 | # General setup |
22 | # | 22 | # |
23 | CONFIG_LOCALVERSION="" | 23 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | ||
24 | CONFIG_SWAP=y | 25 | CONFIG_SWAP=y |
25 | CONFIG_SYSVIPC=y | 26 | CONFIG_SYSVIPC=y |
26 | CONFIG_POSIX_MQUEUE=y | 27 | CONFIG_POSIX_MQUEUE=y |
@@ -33,6 +34,7 @@ CONFIG_KOBJECT_UEVENT=y | |||
33 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
34 | CONFIG_IKCONFIG_PROC=y | 35 | CONFIG_IKCONFIG_PROC=y |
35 | # CONFIG_CPUSETS is not set | 36 | # CONFIG_CPUSETS is not set |
37 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | # CONFIG_EMBEDDED is not set | 38 | # CONFIG_EMBEDDED is not set |
37 | CONFIG_KALLSYMS=y | 39 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_ALL is not set | 40 | # CONFIG_KALLSYMS_ALL is not set |
@@ -94,6 +96,7 @@ CONFIG_FLATMEM_MANUAL=y | |||
94 | # CONFIG_SPARSEMEM_MANUAL is not set | 96 | # CONFIG_SPARSEMEM_MANUAL is not set |
95 | CONFIG_FLATMEM=y | 97 | CONFIG_FLATMEM=y |
96 | CONFIG_FLAT_NODE_MEM_MAP=y | 98 | CONFIG_FLAT_NODE_MEM_MAP=y |
99 | # CONFIG_SPARSEMEM_STATIC is not set | ||
97 | 100 | ||
98 | # | 101 | # |
99 | # I/O subsystem configuration | 102 | # I/O subsystem configuration |
@@ -151,8 +154,8 @@ CONFIG_IP_FIB_HASH=y | |||
151 | # CONFIG_INET_ESP is not set | 154 | # CONFIG_INET_ESP is not set |
152 | # CONFIG_INET_IPCOMP is not set | 155 | # CONFIG_INET_IPCOMP is not set |
153 | # CONFIG_INET_TUNNEL is not set | 156 | # CONFIG_INET_TUNNEL is not set |
154 | CONFIG_IP_TCPDIAG=y | 157 | CONFIG_INET_DIAG=y |
155 | CONFIG_IP_TCPDIAG_IPV6=y | 158 | CONFIG_INET_TCP_DIAG=y |
156 | # CONFIG_TCP_CONG_ADVANCED is not set | 159 | # CONFIG_TCP_CONG_ADVANCED is not set |
157 | CONFIG_TCP_CONG_BIC=y | 160 | CONFIG_TCP_CONG_BIC=y |
158 | CONFIG_IPV6=y | 161 | CONFIG_IPV6=y |
@@ -165,6 +168,11 @@ CONFIG_IPV6=y | |||
165 | # CONFIG_NETFILTER is not set | 168 | # CONFIG_NETFILTER is not set |
166 | 169 | ||
167 | # | 170 | # |
171 | # DCCP Configuration (EXPERIMENTAL) | ||
172 | # | ||
173 | # CONFIG_IP_DCCP is not set | ||
174 | |||
175 | # | ||
168 | # SCTP Configuration (EXPERIMENTAL) | 176 | # SCTP Configuration (EXPERIMENTAL) |
169 | # | 177 | # |
170 | # CONFIG_IP_SCTP is not set | 178 | # CONFIG_IP_SCTP is not set |
@@ -217,9 +225,11 @@ CONFIG_NET_CLS_POLICE=y | |||
217 | # Network testing | 225 | # Network testing |
218 | # | 226 | # |
219 | # CONFIG_NET_PKTGEN is not set | 227 | # CONFIG_NET_PKTGEN is not set |
228 | # CONFIG_NETFILTER_NETLINK is not set | ||
220 | # CONFIG_HAMRADIO is not set | 229 | # CONFIG_HAMRADIO is not set |
221 | # CONFIG_IRDA is not set | 230 | # CONFIG_IRDA is not set |
222 | # CONFIG_BT is not set | 231 | # CONFIG_BT is not set |
232 | # CONFIG_IEEE80211 is not set | ||
223 | # CONFIG_PCMCIA is not set | 233 | # CONFIG_PCMCIA is not set |
224 | 234 | ||
225 | # | 235 | # |
@@ -233,6 +243,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
233 | # | 243 | # |
234 | # SCSI device support | 244 | # SCSI device support |
235 | # | 245 | # |
246 | # CONFIG_RAID_ATTRS is not set | ||
236 | CONFIG_SCSI=y | 247 | CONFIG_SCSI=y |
237 | CONFIG_SCSI_PROC_FS=y | 248 | CONFIG_SCSI_PROC_FS=y |
238 | 249 | ||
@@ -260,6 +271,7 @@ CONFIG_SCSI_LOGGING=y | |||
260 | # CONFIG_SCSI_SPI_ATTRS is not set | 271 | # CONFIG_SCSI_SPI_ATTRS is not set |
261 | CONFIG_SCSI_FC_ATTRS=y | 272 | CONFIG_SCSI_FC_ATTRS=y |
262 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 273 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
274 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
263 | 275 | ||
264 | # | 276 | # |
265 | # SCSI low-level drivers | 277 | # SCSI low-level drivers |
@@ -280,7 +292,6 @@ CONFIG_BLK_DEV_RAM=y | |||
280 | CONFIG_BLK_DEV_RAM_COUNT=16 | 292 | CONFIG_BLK_DEV_RAM_COUNT=16 |
281 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 293 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
282 | CONFIG_BLK_DEV_INITRD=y | 294 | CONFIG_BLK_DEV_INITRD=y |
283 | CONFIG_INITRAMFS_SOURCE="" | ||
284 | # CONFIG_LBD is not set | 295 | # CONFIG_LBD is not set |
285 | # CONFIG_CDROM_PKTCDVD is not set | 296 | # CONFIG_CDROM_PKTCDVD is not set |
286 | 297 | ||
@@ -384,6 +395,10 @@ CONFIG_EQUALIZER=m | |||
384 | CONFIG_TUN=m | 395 | CONFIG_TUN=m |
385 | 396 | ||
386 | # | 397 | # |
398 | # PHY device support | ||
399 | # | ||
400 | |||
401 | # | ||
387 | # Ethernet (10 or 100Mbit) | 402 | # Ethernet (10 or 100Mbit) |
388 | # | 403 | # |
389 | CONFIG_NET_ETHERNET=y | 404 | CONFIG_NET_ETHERNET=y |
@@ -453,10 +468,6 @@ CONFIG_FS_MBCACHE=y | |||
453 | # CONFIG_REISERFS_FS is not set | 468 | # CONFIG_REISERFS_FS is not set |
454 | # CONFIG_JFS_FS is not set | 469 | # CONFIG_JFS_FS is not set |
455 | # CONFIG_FS_POSIX_ACL is not set | 470 | # CONFIG_FS_POSIX_ACL is not set |
456 | |||
457 | # | ||
458 | # XFS support | ||
459 | # | ||
460 | # CONFIG_XFS_FS is not set | 471 | # CONFIG_XFS_FS is not set |
461 | # CONFIG_MINIX_FS is not set | 472 | # CONFIG_MINIX_FS is not set |
462 | # CONFIG_ROMFS_FS is not set | 473 | # CONFIG_ROMFS_FS is not set |
@@ -465,6 +476,7 @@ CONFIG_INOTIFY=y | |||
465 | CONFIG_DNOTIFY=y | 476 | CONFIG_DNOTIFY=y |
466 | # CONFIG_AUTOFS_FS is not set | 477 | # CONFIG_AUTOFS_FS is not set |
467 | # CONFIG_AUTOFS4_FS is not set | 478 | # CONFIG_AUTOFS4_FS is not set |
479 | # CONFIG_FUSE_FS is not set | ||
468 | 480 | ||
469 | # | 481 | # |
470 | # CD-ROM/DVD Filesystems | 482 | # CD-ROM/DVD Filesystems |
@@ -485,11 +497,10 @@ CONFIG_DNOTIFY=y | |||
485 | CONFIG_PROC_FS=y | 497 | CONFIG_PROC_FS=y |
486 | CONFIG_PROC_KCORE=y | 498 | CONFIG_PROC_KCORE=y |
487 | CONFIG_SYSFS=y | 499 | CONFIG_SYSFS=y |
488 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
489 | CONFIG_TMPFS=y | 500 | CONFIG_TMPFS=y |
490 | # CONFIG_TMPFS_XATTR is not set | ||
491 | # CONFIG_HUGETLB_PAGE is not set | 501 | # CONFIG_HUGETLB_PAGE is not set |
492 | CONFIG_RAMFS=y | 502 | CONFIG_RAMFS=y |
503 | # CONFIG_RELAYFS_FS is not set | ||
493 | 504 | ||
494 | # | 505 | # |
495 | # Miscellaneous filesystems | 506 | # Miscellaneous filesystems |
@@ -533,6 +544,7 @@ CONFIG_SUNRPC=y | |||
533 | # CONFIG_NCP_FS is not set | 544 | # CONFIG_NCP_FS is not set |
534 | # CONFIG_CODA_FS is not set | 545 | # CONFIG_CODA_FS is not set |
535 | # CONFIG_AFS_FS is not set | 546 | # CONFIG_AFS_FS is not set |
547 | # CONFIG_9P_FS is not set | ||
536 | 548 | ||
537 | # | 549 | # |
538 | # Partition Types | 550 | # Partition Types |
@@ -572,6 +584,7 @@ CONFIG_MSDOS_PARTITION=y | |||
572 | CONFIG_DEBUG_KERNEL=y | 584 | CONFIG_DEBUG_KERNEL=y |
573 | CONFIG_MAGIC_SYSRQ=y | 585 | CONFIG_MAGIC_SYSRQ=y |
574 | CONFIG_LOG_BUF_SHIFT=17 | 586 | CONFIG_LOG_BUF_SHIFT=17 |
587 | CONFIG_DETECT_SOFTLOCKUP=y | ||
575 | # CONFIG_SCHEDSTATS is not set | 588 | # CONFIG_SCHEDSTATS is not set |
576 | # CONFIG_DEBUG_SLAB is not set | 589 | # CONFIG_DEBUG_SLAB is not set |
577 | CONFIG_DEBUG_PREEMPT=y | 590 | CONFIG_DEBUG_PREEMPT=y |
@@ -626,5 +639,6 @@ CONFIG_CRYPTO=y | |||
626 | # Library routines | 639 | # Library routines |
627 | # | 640 | # |
628 | # CONFIG_CRC_CCITT is not set | 641 | # CONFIG_CRC_CCITT is not set |
642 | # CONFIG_CRC16 is not set | ||
629 | CONFIG_CRC32=m | 643 | CONFIG_CRC32=m |
630 | # CONFIG_LIBCRC32C is not set | 644 | # CONFIG_LIBCRC32C is not set |
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index ab1e49d2e518..8584dd823218 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile | |||
@@ -6,7 +6,7 @@ EXTRA_AFLAGS := -traditional | |||
6 | 6 | ||
7 | obj-y := bitmap.o traps.o time.o process.o \ | 7 | obj-y := bitmap.o traps.o time.o process.o \ |
8 | setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ | 8 | setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ |
9 | semaphore.o s390_ext.o debug.o profile.o irq.o | 9 | semaphore.o s390_ext.o debug.o profile.o irq.o reipl_diag.o |
10 | 10 | ||
11 | extra-$(CONFIG_ARCH_S390_31) += head.o | 11 | extra-$(CONFIG_ARCH_S390_31) += head.o |
12 | extra-$(CONFIG_ARCH_S390X) += head64.o | 12 | extra-$(CONFIG_ARCH_S390X) += head64.o |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 58fc7fbcb40e..9b30f4cf32c4 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -108,7 +108,7 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
108 | bl BASED(0f) | 108 | bl BASED(0f) |
109 | l %r14,BASED(.Lcleanup_critical) | 109 | l %r14,BASED(.Lcleanup_critical) |
110 | basr %r14,%r14 | 110 | basr %r14,%r14 |
111 | tm 0(%r12),0x01 # retest problem state after cleanup | 111 | tm 1(%r12),0x01 # retest problem state after cleanup |
112 | bnz BASED(1f) | 112 | bnz BASED(1f) |
113 | 0: l %r14,__LC_ASYNC_STACK # are we already on the async stack ? | 113 | 0: l %r14,__LC_ASYNC_STACK # are we already on the async stack ? |
114 | slr %r14,%r15 | 114 | slr %r14,%r15 |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index d0c9ffaa25db..7b9b4a2ba1d7 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -101,7 +101,7 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING) | |||
101 | clc \psworg+8(8),BASED(.Lcritical_start) | 101 | clc \psworg+8(8),BASED(.Lcritical_start) |
102 | jl 0f | 102 | jl 0f |
103 | brasl %r14,cleanup_critical | 103 | brasl %r14,cleanup_critical |
104 | tm 0(%r12),0x01 # retest problem state after cleanup | 104 | tm 1(%r12),0x01 # retest problem state after cleanup |
105 | jnz 1f | 105 | jnz 1f |
106 | 0: lg %r14,__LC_ASYNC_STACK # are we already on the async. stack ? | 106 | 0: lg %r14,__LC_ASYNC_STACK # are we already on the async. stack ? |
107 | slgr %r14,%r15 | 107 | slgr %r14,%r15 |
diff --git a/arch/s390/kernel/reipl_diag.c b/arch/s390/kernel/reipl_diag.c new file mode 100644 index 000000000000..83cb42bc0b76 --- /dev/null +++ b/arch/s390/kernel/reipl_diag.c | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * This file contains the implementation of the | ||
3 | * Linux re-IPL support | ||
4 | * | ||
5 | * (C) Copyright IBM Corp. 2005 | ||
6 | * | ||
7 | * Author(s): Volker Sameske (sameske@de.ibm.com) | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | |||
13 | static unsigned int reipl_diag_rc1; | ||
14 | static unsigned int reipl_diag_rc2; | ||
15 | |||
16 | /* | ||
17 | * re-IPL the system using the last used IPL parameters | ||
18 | */ | ||
19 | void reipl_diag(void) | ||
20 | { | ||
21 | asm volatile ( | ||
22 | " la %%r4,0\n" | ||
23 | " la %%r5,0\n" | ||
24 | " diag %%r4,%2,0x308\n" | ||
25 | "0:\n" | ||
26 | " st %%r4,%0\n" | ||
27 | " st %%r5,%1\n" | ||
28 | ".section __ex_table,\"a\"\n" | ||
29 | #ifdef __s390x__ | ||
30 | " .align 8\n" | ||
31 | " .quad 0b, 0b\n" | ||
32 | #else | ||
33 | " .align 4\n" | ||
34 | " .long 0b, 0b\n" | ||
35 | #endif | ||
36 | ".previous\n" | ||
37 | : "=m" (reipl_diag_rc1), "=m" (reipl_diag_rc2) | ||
38 | : "d" (3) : "cc", "4", "5" ); | ||
39 | } | ||
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 5ba5a5485da9..5204778b8e5e 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -261,8 +261,11 @@ void (*_machine_power_off)(void) = machine_power_off_smp; | |||
261 | * Reboot, halt and power_off routines for non SMP. | 261 | * Reboot, halt and power_off routines for non SMP. |
262 | */ | 262 | */ |
263 | extern void reipl(unsigned long devno); | 263 | extern void reipl(unsigned long devno); |
264 | extern void reipl_diag(void); | ||
264 | static void do_machine_restart_nonsmp(char * __unused) | 265 | static void do_machine_restart_nonsmp(char * __unused) |
265 | { | 266 | { |
267 | reipl_diag(); | ||
268 | |||
266 | if (MACHINE_IS_VM) | 269 | if (MACHINE_IS_VM) |
267 | cpcmd ("IPL", NULL, 0); | 270 | cpcmd ("IPL", NULL, 0); |
268 | else | 271 | else |
@@ -634,6 +637,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
634 | struct cpuinfo_S390 *cpuinfo; | 637 | struct cpuinfo_S390 *cpuinfo; |
635 | unsigned long n = (unsigned long) v - 1; | 638 | unsigned long n = (unsigned long) v - 1; |
636 | 639 | ||
640 | preempt_disable(); | ||
637 | if (!n) { | 641 | if (!n) { |
638 | seq_printf(m, "vendor_id : IBM/S390\n" | 642 | seq_printf(m, "vendor_id : IBM/S390\n" |
639 | "# processors : %i\n" | 643 | "# processors : %i\n" |
@@ -658,6 +662,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
658 | cpuinfo->cpu_id.ident, | 662 | cpuinfo->cpu_id.ident, |
659 | cpuinfo->cpu_id.machine); | 663 | cpuinfo->cpu_id.machine); |
660 | } | 664 | } |
665 | preempt_enable(); | ||
661 | return 0; | 666 | return 0; |
662 | } | 667 | } |
663 | 668 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 85222fee4361..e13c87b446b2 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -65,6 +65,7 @@ extern char vmhalt_cmd[]; | |||
65 | extern char vmpoff_cmd[]; | 65 | extern char vmpoff_cmd[]; |
66 | 66 | ||
67 | extern void reipl(unsigned long devno); | 67 | extern void reipl(unsigned long devno); |
68 | extern void reipl_diag(void); | ||
68 | 69 | ||
69 | static void smp_ext_bitcall(int, ec_bit_sig); | 70 | static void smp_ext_bitcall(int, ec_bit_sig); |
70 | static void smp_ext_bitcall_others(ec_bit_sig); | 71 | static void smp_ext_bitcall_others(ec_bit_sig); |
@@ -283,6 +284,8 @@ static void do_machine_restart(void * __unused) | |||
283 | * interrupted by an external interrupt and s390irq | 284 | * interrupted by an external interrupt and s390irq |
284 | * locks are always held disabled). | 285 | * locks are always held disabled). |
285 | */ | 286 | */ |
287 | reipl_diag(); | ||
288 | |||
286 | if (MACHINE_IS_VM) | 289 | if (MACHINE_IS_VM) |
287 | cpcmd ("IPL", NULL, 0, NULL); | 290 | cpcmd ("IPL", NULL, 0, NULL); |
288 | else | 291 | else |
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386 index 8ad156a00499..5d92cacd56c6 100644 --- a/arch/um/Kconfig.i386 +++ b/arch/um/Kconfig.i386 | |||
@@ -42,3 +42,7 @@ config ARCH_HAS_SC_SIGNALS | |||
42 | config ARCH_REUSE_HOST_VSYSCALL_AREA | 42 | config ARCH_REUSE_HOST_VSYSCALL_AREA |
43 | bool | 43 | bool |
44 | default y | 44 | default y |
45 | |||
46 | config X86_CMPXCHG | ||
47 | bool | ||
48 | default y | ||
diff --git a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c index 7a0d115b29d0..5db136e2651c 100644 --- a/arch/um/drivers/mcast_user.c +++ b/arch/um/drivers/mcast_user.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <errno.h> | 14 | #include <errno.h> |
15 | #include <unistd.h> | 15 | #include <unistd.h> |
16 | #include <linux/inet.h> | ||
17 | #include <sys/socket.h> | 16 | #include <sys/socket.h> |
18 | #include <sys/un.h> | 17 | #include <sys/un.h> |
19 | #include <sys/time.h> | 18 | #include <sys/time.h> |
@@ -55,7 +54,7 @@ static int mcast_open(void *data) | |||
55 | struct mcast_data *pri = data; | 54 | struct mcast_data *pri = data; |
56 | struct sockaddr_in *sin = pri->mcast_addr; | 55 | struct sockaddr_in *sin = pri->mcast_addr; |
57 | struct ip_mreq mreq; | 56 | struct ip_mreq mreq; |
58 | int fd = -EINVAL, yes = 1, err = -EINVAL;; | 57 | int fd, yes = 1, err = 0; |
59 | 58 | ||
60 | 59 | ||
61 | if ((sin->sin_addr.s_addr == 0) || (sin->sin_port == 0)) | 60 | if ((sin->sin_addr.s_addr == 0) || (sin->sin_port == 0)) |
@@ -66,13 +65,14 @@ static int mcast_open(void *data) | |||
66 | if (fd < 0){ | 65 | if (fd < 0){ |
67 | printk("mcast_open : data socket failed, errno = %d\n", | 66 | printk("mcast_open : data socket failed, errno = %d\n", |
68 | errno); | 67 | errno); |
69 | fd = -errno; | 68 | err = -errno; |
70 | goto out; | 69 | goto out; |
71 | } | 70 | } |
72 | 71 | ||
73 | if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { | 72 | if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { |
74 | printk("mcast_open: SO_REUSEADDR failed, errno = %d\n", | 73 | printk("mcast_open: SO_REUSEADDR failed, errno = %d\n", |
75 | errno); | 74 | errno); |
75 | err = -errno; | ||
76 | goto out_close; | 76 | goto out_close; |
77 | } | 77 | } |
78 | 78 | ||
@@ -81,6 +81,7 @@ static int mcast_open(void *data) | |||
81 | sizeof(pri->ttl)) < 0) { | 81 | sizeof(pri->ttl)) < 0) { |
82 | printk("mcast_open: IP_MULTICAST_TTL failed, error = %d\n", | 82 | printk("mcast_open: IP_MULTICAST_TTL failed, error = %d\n", |
83 | errno); | 83 | errno); |
84 | err = -errno; | ||
84 | goto out_close; | 85 | goto out_close; |
85 | } | 86 | } |
86 | 87 | ||
@@ -88,12 +89,14 @@ static int mcast_open(void *data) | |||
88 | if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) { | 89 | if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) { |
89 | printk("mcast_open: IP_MULTICAST_LOOP failed, error = %d\n", | 90 | printk("mcast_open: IP_MULTICAST_LOOP failed, error = %d\n", |
90 | errno); | 91 | errno); |
92 | err = -errno; | ||
91 | goto out_close; | 93 | goto out_close; |
92 | } | 94 | } |
93 | 95 | ||
94 | /* bind socket to mcast address */ | 96 | /* bind socket to mcast address */ |
95 | if (bind(fd, (struct sockaddr *) sin, sizeof(*sin)) < 0) { | 97 | if (bind(fd, (struct sockaddr *) sin, sizeof(*sin)) < 0) { |
96 | printk("mcast_open : data bind failed, errno = %d\n", errno); | 98 | printk("mcast_open : data bind failed, errno = %d\n", errno); |
99 | err = -errno; | ||
97 | goto out_close; | 100 | goto out_close; |
98 | } | 101 | } |
99 | 102 | ||
@@ -108,14 +111,15 @@ static int mcast_open(void *data) | |||
108 | "interface on the host.\n"); | 111 | "interface on the host.\n"); |
109 | printk("eth0 should be configured in order to use the " | 112 | printk("eth0 should be configured in order to use the " |
110 | "multicast transport.\n"); | 113 | "multicast transport.\n"); |
114 | err = -errno; | ||
111 | goto out_close; | 115 | goto out_close; |
112 | } | 116 | } |
113 | 117 | ||
114 | out: | ||
115 | return fd; | 118 | return fd; |
116 | 119 | ||
117 | out_close: | 120 | out_close: |
118 | os_close_file(fd); | 121 | os_close_file(fd); |
122 | out: | ||
119 | return err; | 123 | return err; |
120 | } | 124 | } |
121 | 125 | ||
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index c190c2414197..12c95368124a 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "os.h" | 32 | #include "os.h" |
33 | #include "umid.h" | 33 | #include "umid.h" |
34 | #include "irq_kern.h" | 34 | #include "irq_kern.h" |
35 | #include "choose-mode.h" | ||
35 | 36 | ||
36 | static int do_unlink_socket(struct notifier_block *notifier, | 37 | static int do_unlink_socket(struct notifier_block *notifier, |
37 | unsigned long what, void *data) | 38 | unsigned long what, void *data) |
@@ -276,6 +277,7 @@ void mconsole_proc(struct mc_request *req) | |||
276 | go - continue the UML after a 'stop' \n\ | 277 | go - continue the UML after a 'stop' \n\ |
277 | log <string> - make UML enter <string> into the kernel log\n\ | 278 | log <string> - make UML enter <string> into the kernel log\n\ |
278 | proc <file> - returns the contents of the UML's /proc/<file>\n\ | 279 | proc <file> - returns the contents of the UML's /proc/<file>\n\ |
280 | stack <pid> - returns the stack of the specified pid\n\ | ||
279 | " | 281 | " |
280 | 282 | ||
281 | void mconsole_help(struct mc_request *req) | 283 | void mconsole_help(struct mc_request *req) |
@@ -479,6 +481,56 @@ void mconsole_sysrq(struct mc_request *req) | |||
479 | } | 481 | } |
480 | #endif | 482 | #endif |
481 | 483 | ||
484 | /* Mconsole stack trace | ||
485 | * Added by Allan Graves, Jeff Dike | ||
486 | * Dumps a stacks registers to the linux console. | ||
487 | * Usage stack <pid>. | ||
488 | */ | ||
489 | void do_stack(struct mc_request *req) | ||
490 | { | ||
491 | char *ptr = req->request.data; | ||
492 | int pid_requested= -1; | ||
493 | struct task_struct *from = NULL; | ||
494 | struct task_struct *to = NULL; | ||
495 | |||
496 | /* Would be nice: | ||
497 | * 1) Send showregs output to mconsole. | ||
498 | * 2) Add a way to stack dump all pids. | ||
499 | */ | ||
500 | |||
501 | ptr += strlen("stack"); | ||
502 | while(isspace(*ptr)) ptr++; | ||
503 | |||
504 | /* Should really check for multiple pids or reject bad args here */ | ||
505 | /* What do the arguments in mconsole_reply mean? */ | ||
506 | if(sscanf(ptr, "%d", &pid_requested) == 0){ | ||
507 | mconsole_reply(req, "Please specify a pid", 1, 0); | ||
508 | return; | ||
509 | } | ||
510 | |||
511 | from = current; | ||
512 | to = find_task_by_pid(pid_requested); | ||
513 | |||
514 | if((to == NULL) || (pid_requested == 0)) { | ||
515 | mconsole_reply(req, "Couldn't find that pid", 1, 0); | ||
516 | return; | ||
517 | } | ||
518 | to->thread.saved_task = current; | ||
519 | |||
520 | switch_to(from, to, from); | ||
521 | mconsole_reply(req, "Stack Dumped to console and message log", 0, 0); | ||
522 | } | ||
523 | |||
524 | void mconsole_stack(struct mc_request *req) | ||
525 | { | ||
526 | /* This command doesn't work in TT mode, so let's check and then | ||
527 | * get out of here | ||
528 | */ | ||
529 | CHOOSE_MODE(mconsole_reply(req, "Sorry, this doesn't work in TT mode", | ||
530 | 1, 0), | ||
531 | do_stack(req)); | ||
532 | } | ||
533 | |||
482 | /* Changed by mconsole_setup, which is __setup, and called before SMP is | 534 | /* Changed by mconsole_setup, which is __setup, and called before SMP is |
483 | * active. | 535 | * active. |
484 | */ | 536 | */ |
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c index fe5afb13252c..310c1f823f26 100644 --- a/arch/um/drivers/mconsole_user.c +++ b/arch/um/drivers/mconsole_user.c | |||
@@ -30,6 +30,7 @@ static struct mconsole_command commands[] = { | |||
30 | { "go", mconsole_go, MCONSOLE_INTR }, | 30 | { "go", mconsole_go, MCONSOLE_INTR }, |
31 | { "log", mconsole_log, MCONSOLE_INTR }, | 31 | { "log", mconsole_log, MCONSOLE_INTR }, |
32 | { "proc", mconsole_proc, MCONSOLE_PROC }, | 32 | { "proc", mconsole_proc, MCONSOLE_PROC }, |
33 | { "stack", mconsole_stack, MCONSOLE_INTR }, | ||
33 | }; | 34 | }; |
34 | 35 | ||
35 | /* Initialized in mconsole_init, which is an initcall */ | 36 | /* Initialized in mconsole_init, which is an initcall */ |
@@ -172,9 +173,9 @@ int mconsole_notify(char *sock_name, int type, const void *data, int len) | |||
172 | if(notify_sock < 0){ | 173 | if(notify_sock < 0){ |
173 | notify_sock = socket(PF_UNIX, SOCK_DGRAM, 0); | 174 | notify_sock = socket(PF_UNIX, SOCK_DGRAM, 0); |
174 | if(notify_sock < 0){ | 175 | if(notify_sock < 0){ |
175 | printk("mconsole_notify - socket failed, errno = %d\n", | ||
176 | errno); | ||
177 | err = -errno; | 176 | err = -errno; |
177 | printk("mconsole_notify - socket failed, errno = %d\n", | ||
178 | err); | ||
178 | } | 179 | } |
179 | } | 180 | } |
180 | unlock_notify(); | 181 | unlock_notify(); |
@@ -197,8 +198,8 @@ int mconsole_notify(char *sock_name, int type, const void *data, int len) | |||
197 | n = sendto(notify_sock, &packet, len, 0, (struct sockaddr *) &target, | 198 | n = sendto(notify_sock, &packet, len, 0, (struct sockaddr *) &target, |
198 | sizeof(target)); | 199 | sizeof(target)); |
199 | if(n < 0){ | 200 | if(n < 0){ |
200 | printk("mconsole_notify - sendto failed, errno = %d\n", errno); | ||
201 | err = -errno; | 201 | err = -errno; |
202 | printk("mconsole_notify - sendto failed, errno = %d\n", errno); | ||
202 | } | 203 | } |
203 | return(err); | 204 | return(err); |
204 | } | 205 | } |
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c index ed84d01df6cc..0306a1b215b7 100644 --- a/arch/um/drivers/pty.c +++ b/arch/um/drivers/pty.c | |||
@@ -43,8 +43,9 @@ static int pts_open(int input, int output, int primary, void *d, | |||
43 | 43 | ||
44 | fd = get_pty(); | 44 | fd = get_pty(); |
45 | if(fd < 0){ | 45 | if(fd < 0){ |
46 | err = -errno; | ||
46 | printk("open_pts : Failed to open pts\n"); | 47 | printk("open_pts : Failed to open pts\n"); |
47 | return(-errno); | 48 | return err; |
48 | } | 49 | } |
49 | if(data->raw){ | 50 | if(data->raw){ |
50 | CATCH_EINTR(err = tcgetattr(fd, &data->tt)); | 51 | CATCH_EINTR(err = tcgetattr(fd, &data->tt)); |
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c deleted file mode 100644 index b94d2bc4fe06..000000000000 --- a/arch/um/drivers/ubd_user.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Copyright (C) 2001 Ridgerun,Inc (glonnon@ridgerun.com) | ||
4 | * Licensed under the GPL | ||
5 | */ | ||
6 | |||
7 | #include <stddef.h> | ||
8 | #include <unistd.h> | ||
9 | #include <errno.h> | ||
10 | #include <sched.h> | ||
11 | #include <signal.h> | ||
12 | #include <string.h> | ||
13 | #include <netinet/in.h> | ||
14 | #include <sys/time.h> | ||
15 | #include <sys/socket.h> | ||
16 | #include <sys/mman.h> | ||
17 | #include <sys/param.h> | ||
18 | #include "asm/types.h" | ||
19 | #include "user_util.h" | ||
20 | #include "kern_util.h" | ||
21 | #include "user.h" | ||
22 | #include "ubd_user.h" | ||
23 | #include "os.h" | ||
24 | #include "cow.h" | ||
25 | |||
26 | #include <endian.h> | ||
27 | #include <byteswap.h> | ||
28 | |||
29 | void ignore_sigwinch_sig(void) | ||
30 | { | ||
31 | signal(SIGWINCH, SIG_IGN); | ||
32 | } | ||
33 | |||
34 | int start_io_thread(unsigned long sp, int *fd_out) | ||
35 | { | ||
36 | int pid, fds[2], err; | ||
37 | |||
38 | err = os_pipe(fds, 1, 1); | ||
39 | if(err < 0){ | ||
40 | printk("start_io_thread - os_pipe failed, err = %d\n", -err); | ||
41 | goto out; | ||
42 | } | ||
43 | |||
44 | kernel_fd = fds[0]; | ||
45 | *fd_out = fds[1]; | ||
46 | |||
47 | pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD, | ||
48 | NULL); | ||
49 | if(pid < 0){ | ||
50 | printk("start_io_thread - clone failed : errno = %d\n", errno); | ||
51 | err = -errno; | ||
52 | goto out_close; | ||
53 | } | ||
54 | |||
55 | return(pid); | ||
56 | |||
57 | out_close: | ||
58 | os_close_file(fds[0]); | ||
59 | os_close_file(fds[1]); | ||
60 | kernel_fd = -1; | ||
61 | *fd_out = -1; | ||
62 | out: | ||
63 | return(err); | ||
64 | } | ||
65 | |||
66 | /* | ||
67 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
68 | * Emacs will notice this stuff at the end of the file and automatically | ||
69 | * adjust the settings for this buffer only. This must remain at the end | ||
70 | * of the file. | ||
71 | * --------------------------------------------------------------------------- | ||
72 | * Local variables: | ||
73 | * c-file-style: "linux" | ||
74 | * End: | ||
75 | */ | ||
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 93dc1911363f..90e0e5ff451e 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c | |||
@@ -110,13 +110,15 @@ int xterm_open(int input, int output, int primary, void *d, | |||
110 | 110 | ||
111 | fd = mkstemp(file); | 111 | fd = mkstemp(file); |
112 | if(fd < 0){ | 112 | if(fd < 0){ |
113 | err = -errno; | ||
113 | printk("xterm_open : mkstemp failed, errno = %d\n", errno); | 114 | printk("xterm_open : mkstemp failed, errno = %d\n", errno); |
114 | return(-errno); | 115 | return err; |
115 | } | 116 | } |
116 | 117 | ||
117 | if(unlink(file)){ | 118 | if(unlink(file)){ |
119 | err = -errno; | ||
118 | printk("xterm_open : unlink failed, errno = %d\n", errno); | 120 | printk("xterm_open : unlink failed, errno = %d\n", errno); |
119 | return(-errno); | 121 | return err; |
120 | } | 122 | } |
121 | os_close_file(fd); | 123 | os_close_file(fd); |
122 | 124 | ||
diff --git a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h index cfa368e045a5..b1b512f47035 100644 --- a/arch/um/include/mconsole.h +++ b/arch/um/include/mconsole.h | |||
@@ -81,6 +81,7 @@ extern void mconsole_stop(struct mc_request *req); | |||
81 | extern void mconsole_go(struct mc_request *req); | 81 | extern void mconsole_go(struct mc_request *req); |
82 | extern void mconsole_log(struct mc_request *req); | 82 | extern void mconsole_log(struct mc_request *req); |
83 | extern void mconsole_proc(struct mc_request *req); | 83 | extern void mconsole_proc(struct mc_request *req); |
84 | extern void mconsole_stack(struct mc_request *req); | ||
84 | 85 | ||
85 | extern int mconsole_get_request(int fd, struct mc_request *req); | 86 | extern int mconsole_get_request(int fd, struct mc_request *req); |
86 | extern int mconsole_notify(char *sock_name, int type, const void *data, | 87 | extern int mconsole_notify(char *sock_name, int type, const void *data, |
diff --git a/arch/um/include/mem_user.h b/arch/um/include/mem_user.h index d6404bb64662..9fef4123a65a 100644 --- a/arch/um/include/mem_user.h +++ b/arch/um/include/mem_user.h | |||
@@ -51,7 +51,6 @@ extern unsigned long task_size; | |||
51 | 51 | ||
52 | extern void check_devanon(void); | 52 | extern void check_devanon(void); |
53 | extern int init_mem_user(void); | 53 | extern int init_mem_user(void); |
54 | extern int create_mem_file(unsigned long len); | ||
55 | extern void setup_memory(void *entry); | 54 | extern void setup_memory(void *entry); |
56 | extern unsigned long find_iomem(char *driver, unsigned long *len_out); | 55 | extern unsigned long find_iomem(char *driver, unsigned long *len_out); |
57 | extern int init_maps(unsigned long physmem, unsigned long iomem, | 56 | extern int init_maps(unsigned long physmem, unsigned long iomem, |
@@ -64,20 +63,6 @@ extern unsigned long phys_offset(unsigned long phys); | |||
64 | extern void unmap_physmem(void); | 63 | extern void unmap_physmem(void); |
65 | extern void map_memory(unsigned long virt, unsigned long phys, | 64 | extern void map_memory(unsigned long virt, unsigned long phys, |
66 | unsigned long len, int r, int w, int x); | 65 | unsigned long len, int r, int w, int x); |
67 | extern int protect_memory(unsigned long addr, unsigned long len, | ||
68 | int r, int w, int x, int must_succeed); | ||
69 | extern unsigned long get_kmem_end(void); | 66 | extern unsigned long get_kmem_end(void); |
70 | extern void check_tmpexec(void); | ||
71 | 67 | ||
72 | #endif | 68 | #endif |
73 | |||
74 | /* | ||
75 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
76 | * Emacs will notice this stuff at the end of the file and automatically | ||
77 | * adjust the settings for this buffer only. This must remain at the end | ||
78 | * of the file. | ||
79 | * --------------------------------------------------------------------------- | ||
80 | * Local variables: | ||
81 | * c-file-style: "linux" | ||
82 | * End: | ||
83 | */ | ||
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 4c362458052c..583329d0a539 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -157,6 +157,9 @@ extern int os_lock_file(int fd, int excl); | |||
157 | extern void os_early_checks(void); | 157 | extern void os_early_checks(void); |
158 | extern int can_do_skas(void); | 158 | extern int can_do_skas(void); |
159 | 159 | ||
160 | /* mem.c */ | ||
161 | extern int create_mem_file(unsigned long len); | ||
162 | |||
160 | /* process.c */ | 163 | /* process.c */ |
161 | extern unsigned long os_process_pc(int pid); | 164 | extern unsigned long os_process_pc(int pid); |
162 | extern int os_process_parent(int pid); | 165 | extern int os_process_parent(int pid); |
@@ -181,6 +184,8 @@ extern unsigned long long os_usecs(void); | |||
181 | /* tt.c | 184 | /* tt.c |
182 | * for tt mode only (will be deleted in future...) | 185 | * for tt mode only (will be deleted in future...) |
183 | */ | 186 | */ |
187 | extern int protect_memory(unsigned long addr, unsigned long len, | ||
188 | int r, int w, int x, int must_succeed); | ||
184 | extern void forward_pending_sigio(int target); | 189 | extern void forward_pending_sigio(int target); |
185 | extern int start_fork_tramp(void *arg, unsigned long temp_stack, | 190 | extern int start_fork_tramp(void *arg, unsigned long temp_stack, |
186 | int clone_flags, int (*tramp)(void *)); | 191 | int clone_flags, int (*tramp)(void *)); |
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile index 614b8ebeb0ed..1a0001b3850c 100644 --- a/arch/um/kernel/Makefile +++ b/arch/um/kernel/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # | 1 | # |
2 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
@@ -7,11 +7,11 @@ extra-y := vmlinux.lds | |||
7 | clean-files := | 7 | clean-files := |
8 | 8 | ||
9 | obj-y = config.o exec_kern.o exitcode.o \ | 9 | obj-y = config.o exec_kern.o exitcode.o \ |
10 | helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ | 10 | helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o physmem.o \ |
11 | physmem.o process_kern.o ptrace.o reboot.o resource.o sigio_user.o \ | 11 | process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \ |
12 | sigio_kern.o signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o \ | 12 | signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \ |
13 | tempfile.o time.o time_kern.o tlb.o trap_kern.o trap_user.o \ | 13 | time_kern.o tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o \ |
14 | uaccess_user.o um_arch.o umid.o user_util.o | 14 | umid.o user_util.o |
15 | 15 | ||
16 | obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o | 16 | obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o |
17 | obj-$(CONFIG_GPROF) += gprof_syms.o | 17 | obj-$(CONFIG_GPROF) += gprof_syms.o |
@@ -24,8 +24,8 @@ obj-$(CONFIG_MODE_SKAS) += skas/ | |||
24 | 24 | ||
25 | user-objs-$(CONFIG_TTY_LOG) += tty_log.o | 25 | user-objs-$(CONFIG_TTY_LOG) += tty_log.o |
26 | 26 | ||
27 | USER_OBJS := $(user-objs-y) config.o helper.o main.o tempfile.o time.o \ | 27 | USER_OBJS := $(user-objs-y) config.o helper.o main.o time.o tty_log.o umid.o \ |
28 | tty_log.o umid.o user_util.o | 28 | user_util.o |
29 | 29 | ||
30 | include arch/um/scripts/Makefile.rules | 30 | include arch/um/scripts/Makefile.rules |
31 | 31 | ||
diff --git a/arch/um/kernel/helper.c b/arch/um/kernel/helper.c index f83e1e8e2392..33fb0bd3b11a 100644 --- a/arch/um/kernel/helper.c +++ b/arch/um/kernel/helper.c | |||
@@ -85,8 +85,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, | |||
85 | data.fd = fds[1]; | 85 | data.fd = fds[1]; |
86 | pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); | 86 | pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); |
87 | if(pid < 0){ | 87 | if(pid < 0){ |
88 | printk("run_helper : clone failed, errno = %d\n", errno); | ||
89 | ret = -errno; | 88 | ret = -errno; |
89 | printk("run_helper : clone failed, errno = %d\n", errno); | ||
90 | goto out_close; | 90 | goto out_close; |
91 | } | 91 | } |
92 | 92 | ||
@@ -122,7 +122,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, | |||
122 | unsigned long *stack_out, int stack_order) | 122 | unsigned long *stack_out, int stack_order) |
123 | { | 123 | { |
124 | unsigned long stack, sp; | 124 | unsigned long stack, sp; |
125 | int pid, status; | 125 | int pid, status, err; |
126 | 126 | ||
127 | stack = alloc_stack(stack_order, um_in_interrupt()); | 127 | stack = alloc_stack(stack_order, um_in_interrupt()); |
128 | if(stack == 0) return(-ENOMEM); | 128 | if(stack == 0) return(-ENOMEM); |
@@ -130,16 +130,18 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, | |||
130 | sp = stack + (page_size() << stack_order) - sizeof(void *); | 130 | sp = stack + (page_size() << stack_order) - sizeof(void *); |
131 | pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); | 131 | pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); |
132 | if(pid < 0){ | 132 | if(pid < 0){ |
133 | err = -errno; | ||
133 | printk("run_helper_thread : clone failed, errno = %d\n", | 134 | printk("run_helper_thread : clone failed, errno = %d\n", |
134 | errno); | 135 | errno); |
135 | return(-errno); | 136 | return err; |
136 | } | 137 | } |
137 | if(stack_out == NULL){ | 138 | if(stack_out == NULL){ |
138 | CATCH_EINTR(pid = waitpid(pid, &status, 0)); | 139 | CATCH_EINTR(pid = waitpid(pid, &status, 0)); |
139 | if(pid < 0){ | 140 | if(pid < 0){ |
141 | err = -errno; | ||
140 | printk("run_helper_thread - wait failed, errno = %d\n", | 142 | printk("run_helper_thread - wait failed, errno = %d\n", |
141 | errno); | 143 | errno); |
142 | pid = -errno; | 144 | pid = err; |
143 | } | 145 | } |
144 | if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) | 146 | if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) |
145 | printk("run_helper_thread - thread returned status " | 147 | printk("run_helper_thread - thread returned status " |
@@ -156,8 +158,8 @@ int helper_wait(int pid) | |||
156 | 158 | ||
157 | CATCH_EINTR(ret = waitpid(pid, NULL, WNOHANG)); | 159 | CATCH_EINTR(ret = waitpid(pid, NULL, WNOHANG)); |
158 | if(ret < 0){ | 160 | if(ret < 0){ |
161 | ret = -errno; | ||
159 | printk("helper_wait : waitpid failed, errno = %d\n", errno); | 162 | printk("helper_wait : waitpid failed, errno = %d\n", errno); |
160 | return(-errno); | ||
161 | } | 163 | } |
162 | return(ret); | 164 | return(ret); |
163 | } | 165 | } |
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c index cd7c85be0a1b..49ed5ddf0704 100644 --- a/arch/um/kernel/init_task.c +++ b/arch/um/kernel/init_task.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "asm/pgtable.h" | 13 | #include "asm/pgtable.h" |
14 | #include "user_util.h" | 14 | #include "user_util.h" |
15 | #include "mem_user.h" | 15 | #include "mem_user.h" |
16 | #include "os.h" | ||
16 | 17 | ||
17 | static struct fs_struct init_fs = INIT_FS; | 18 | static struct fs_struct init_fs = INIT_FS; |
18 | struct mm_struct init_mm = INIT_MM(init_mm); | 19 | struct mm_struct init_mm = INIT_MM(init_mm); |
@@ -45,8 +46,8 @@ __attribute__((__section__(".data.init_task"))) = | |||
45 | 46 | ||
46 | void unprotect_stack(unsigned long stack) | 47 | void unprotect_stack(unsigned long stack) |
47 | { | 48 | { |
48 | protect_memory(stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE, | 49 | os_protect_memory((void *) stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE, |
49 | 1, 1, 0, 1); | 50 | 1, 1, 0); |
50 | } | 51 | } |
51 | 52 | ||
52 | /* | 53 | /* |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 64fa062cc119..ea008b031a8f 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) | 2 | * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -19,6 +19,10 @@ | |||
19 | #include "mem_user.h" | 19 | #include "mem_user.h" |
20 | #include "uml_uaccess.h" | 20 | #include "uml_uaccess.h" |
21 | #include "os.h" | 21 | #include "os.h" |
22 | #include "linux/types.h" | ||
23 | #include "linux/string.h" | ||
24 | #include "init.h" | ||
25 | #include "kern_constants.h" | ||
22 | 26 | ||
23 | extern char __binary_start; | 27 | extern char __binary_start; |
24 | 28 | ||
@@ -368,6 +372,16 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
368 | return pte; | 372 | return pte; |
369 | } | 373 | } |
370 | 374 | ||
375 | struct iomem_region *iomem_regions = NULL; | ||
376 | int iomem_size = 0; | ||
377 | |||
378 | extern int parse_iomem(char *str, int *add) __init; | ||
379 | |||
380 | __uml_setup("iomem=", parse_iomem, | ||
381 | "iomem=<name>,<file>\n" | ||
382 | " Configure <file> as an IO memory region named <name>.\n\n" | ||
383 | ); | ||
384 | |||
371 | /* | 385 | /* |
372 | * Overrides for Emacs so that we follow Linus's tabbing style. | 386 | * Overrides for Emacs so that we follow Linus's tabbing style. |
373 | * Emacs will notice this stuff at the end of the file and automatically | 387 | * Emacs will notice this stuff at the end of the file and automatically |
diff --git a/arch/um/kernel/mem_user.c b/arch/um/kernel/mem_user.c deleted file mode 100644 index 4a663fd434bb..000000000000 --- a/arch/um/kernel/mem_user.c +++ /dev/null | |||
@@ -1,273 +0,0 @@ | |||
1 | /* | ||
2 | * arch/um/kernel/mem_user.c | ||
3 | * | ||
4 | * BRIEF MODULE DESCRIPTION | ||
5 | * user side memory routines for supporting IO memory inside user mode linux | ||
6 | * | ||
7 | * Copyright (C) 2001 RidgeRun, Inc. | ||
8 | * Author: RidgeRun, Inc. | ||
9 | * Greg Lonnon glonnon@ridgerun.com or info@ridgerun.com | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
19 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
22 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
23 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | * You should have received a copy of the GNU General Public License along | ||
28 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
29 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
30 | */ | ||
31 | |||
32 | #include <stdio.h> | ||
33 | #include <stdlib.h> | ||
34 | #include <stddef.h> | ||
35 | #include <stdarg.h> | ||
36 | #include <unistd.h> | ||
37 | #include <errno.h> | ||
38 | #include <string.h> | ||
39 | #include <fcntl.h> | ||
40 | #include <sys/types.h> | ||
41 | #include <sys/mman.h> | ||
42 | #include "kern_util.h" | ||
43 | #include "user.h" | ||
44 | #include "user_util.h" | ||
45 | #include "mem_user.h" | ||
46 | #include "init.h" | ||
47 | #include "os.h" | ||
48 | #include "tempfile.h" | ||
49 | #include "kern_constants.h" | ||
50 | |||
51 | #define TEMPNAME_TEMPLATE "vm_file-XXXXXX" | ||
52 | |||
53 | static int create_tmp_file(unsigned long len) | ||
54 | { | ||
55 | int fd, err; | ||
56 | char zero; | ||
57 | |||
58 | fd = make_tempfile(TEMPNAME_TEMPLATE, NULL, 1); | ||
59 | if(fd < 0) { | ||
60 | os_print_error(fd, "make_tempfile"); | ||
61 | exit(1); | ||
62 | } | ||
63 | |||
64 | err = os_mode_fd(fd, 0777); | ||
65 | if(err < 0){ | ||
66 | os_print_error(err, "os_mode_fd"); | ||
67 | exit(1); | ||
68 | } | ||
69 | err = os_seek_file(fd, len); | ||
70 | if(err < 0){ | ||
71 | os_print_error(err, "os_seek_file"); | ||
72 | exit(1); | ||
73 | } | ||
74 | zero = 0; | ||
75 | err = os_write_file(fd, &zero, 1); | ||
76 | if(err != 1){ | ||
77 | os_print_error(err, "os_write_file"); | ||
78 | exit(1); | ||
79 | } | ||
80 | |||
81 | return(fd); | ||
82 | } | ||
83 | |||
84 | void check_tmpexec(void) | ||
85 | { | ||
86 | void *addr; | ||
87 | int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE); | ||
88 | |||
89 | addr = mmap(NULL, UM_KERN_PAGE_SIZE, | ||
90 | PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0); | ||
91 | printf("Checking PROT_EXEC mmap in /tmp..."); | ||
92 | fflush(stdout); | ||
93 | if(addr == MAP_FAILED){ | ||
94 | err = errno; | ||
95 | perror("failed"); | ||
96 | if(err == EPERM) | ||
97 | printf("/tmp must be not mounted noexec\n"); | ||
98 | exit(1); | ||
99 | } | ||
100 | printf("OK\n"); | ||
101 | munmap(addr, UM_KERN_PAGE_SIZE); | ||
102 | |||
103 | os_close_file(fd); | ||
104 | } | ||
105 | |||
106 | static int have_devanon = 0; | ||
107 | |||
108 | void check_devanon(void) | ||
109 | { | ||
110 | int fd; | ||
111 | |||
112 | printk("Checking for /dev/anon on the host..."); | ||
113 | fd = open("/dev/anon", O_RDWR); | ||
114 | if(fd < 0){ | ||
115 | printk("Not available (open failed with errno %d)\n", errno); | ||
116 | return; | ||
117 | } | ||
118 | |||
119 | printk("OK\n"); | ||
120 | have_devanon = 1; | ||
121 | } | ||
122 | |||
123 | static int create_anon_file(unsigned long len) | ||
124 | { | ||
125 | void *addr; | ||
126 | int fd; | ||
127 | |||
128 | fd = open("/dev/anon", O_RDWR); | ||
129 | if(fd < 0) { | ||
130 | os_print_error(fd, "opening /dev/anon"); | ||
131 | exit(1); | ||
132 | } | ||
133 | |||
134 | addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); | ||
135 | if(addr == MAP_FAILED){ | ||
136 | perror("mapping physmem file"); | ||
137 | exit(1); | ||
138 | } | ||
139 | munmap(addr, len); | ||
140 | |||
141 | return(fd); | ||
142 | } | ||
143 | |||
144 | int create_mem_file(unsigned long len) | ||
145 | { | ||
146 | int err, fd; | ||
147 | |||
148 | if(have_devanon) | ||
149 | fd = create_anon_file(len); | ||
150 | else fd = create_tmp_file(len); | ||
151 | |||
152 | err = os_set_exec_close(fd, 1); | ||
153 | if(err < 0) | ||
154 | os_print_error(err, "exec_close"); | ||
155 | return(fd); | ||
156 | } | ||
157 | |||
158 | struct iomem_region *iomem_regions = NULL; | ||
159 | int iomem_size = 0; | ||
160 | |||
161 | static int __init parse_iomem(char *str, int *add) | ||
162 | { | ||
163 | struct iomem_region *new; | ||
164 | struct uml_stat buf; | ||
165 | char *file, *driver; | ||
166 | int fd, err, size; | ||
167 | |||
168 | driver = str; | ||
169 | file = strchr(str,','); | ||
170 | if(file == NULL){ | ||
171 | printf("parse_iomem : failed to parse iomem\n"); | ||
172 | goto out; | ||
173 | } | ||
174 | *file = '\0'; | ||
175 | file++; | ||
176 | fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0); | ||
177 | if(fd < 0){ | ||
178 | os_print_error(fd, "parse_iomem - Couldn't open io file"); | ||
179 | goto out; | ||
180 | } | ||
181 | |||
182 | err = os_stat_fd(fd, &buf); | ||
183 | if(err < 0){ | ||
184 | os_print_error(err, "parse_iomem - cannot stat_fd file"); | ||
185 | goto out_close; | ||
186 | } | ||
187 | |||
188 | new = malloc(sizeof(*new)); | ||
189 | if(new == NULL){ | ||
190 | perror("Couldn't allocate iomem_region struct"); | ||
191 | goto out_close; | ||
192 | } | ||
193 | |||
194 | size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1); | ||
195 | |||
196 | *new = ((struct iomem_region) { .next = iomem_regions, | ||
197 | .driver = driver, | ||
198 | .fd = fd, | ||
199 | .size = size, | ||
200 | .phys = 0, | ||
201 | .virt = 0 }); | ||
202 | iomem_regions = new; | ||
203 | iomem_size += new->size + UM_KERN_PAGE_SIZE; | ||
204 | |||
205 | return(0); | ||
206 | out_close: | ||
207 | os_close_file(fd); | ||
208 | out: | ||
209 | return(1); | ||
210 | } | ||
211 | |||
212 | __uml_setup("iomem=", parse_iomem, | ||
213 | "iomem=<name>,<file>\n" | ||
214 | " Configure <file> as an IO memory region named <name>.\n\n" | ||
215 | ); | ||
216 | |||
217 | int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x, | ||
218 | int must_succeed) | ||
219 | { | ||
220 | int err; | ||
221 | |||
222 | err = os_protect_memory((void *) addr, len, r, w, x); | ||
223 | if(err < 0){ | ||
224 | if(must_succeed) | ||
225 | panic("protect failed, err = %d", -err); | ||
226 | else return(err); | ||
227 | } | ||
228 | return(0); | ||
229 | } | ||
230 | |||
231 | #if 0 | ||
232 | /* Debugging facility for dumping stuff out to the host, avoiding the timing | ||
233 | * problems that come with printf and breakpoints. | ||
234 | * Enable in case of emergency. | ||
235 | */ | ||
236 | |||
237 | int logging = 1; | ||
238 | int logging_fd = -1; | ||
239 | |||
240 | int logging_line = 0; | ||
241 | char logging_buf[512]; | ||
242 | |||
243 | void log(char *fmt, ...) | ||
244 | { | ||
245 | va_list ap; | ||
246 | struct timeval tv; | ||
247 | struct openflags flags; | ||
248 | |||
249 | if(logging == 0) return; | ||
250 | if(logging_fd < 0){ | ||
251 | flags = of_create(of_trunc(of_rdwr(OPENFLAGS()))); | ||
252 | logging_fd = os_open_file("log", flags, 0644); | ||
253 | } | ||
254 | gettimeofday(&tv, NULL); | ||
255 | sprintf(logging_buf, "%d\t %u.%u ", logging_line++, tv.tv_sec, | ||
256 | tv.tv_usec); | ||
257 | va_start(ap, fmt); | ||
258 | vsprintf(&logging_buf[strlen(logging_buf)], fmt, ap); | ||
259 | va_end(ap); | ||
260 | write(logging_fd, logging_buf, strlen(logging_buf)); | ||
261 | } | ||
262 | #endif | ||
263 | |||
264 | /* | ||
265 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
266 | * Emacs will notice this stuff at the end of the file and automatically | ||
267 | * adjust the settings for this buffer only. This must remain at the end | ||
268 | * of the file. | ||
269 | * --------------------------------------------------------------------------- | ||
270 | * Local variables: | ||
271 | * c-file-style: "linux" | ||
272 | * End: | ||
273 | */ | ||
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index c23d8a08d0ff..39cf568ccfaf 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
@@ -113,8 +113,23 @@ void set_current(void *t) | |||
113 | 113 | ||
114 | void *_switch_to(void *prev, void *next, void *last) | 114 | void *_switch_to(void *prev, void *next, void *last) |
115 | { | 115 | { |
116 | return(CHOOSE_MODE(switch_to_tt(prev, next), | 116 | struct task_struct *from = prev; |
117 | switch_to_skas(prev, next))); | 117 | struct task_struct *to= next; |
118 | |||
119 | to->thread.prev_sched = from; | ||
120 | set_current(to); | ||
121 | |||
122 | do { | ||
123 | current->thread.saved_task = NULL ; | ||
124 | CHOOSE_MODE_PROC(switch_to_tt, switch_to_skas, prev, next); | ||
125 | if(current->thread.saved_task) | ||
126 | show_regs(&(current->thread.regs)); | ||
127 | next= current->thread.saved_task; | ||
128 | prev= current; | ||
129 | } while(current->thread.saved_task); | ||
130 | |||
131 | return(current->thread.prev_sched); | ||
132 | |||
118 | } | 133 | } |
119 | 134 | ||
120 | void interrupt_end(void) | 135 | void interrupt_end(void) |
diff --git a/arch/um/kernel/skas/include/mode_kern-skas.h b/arch/um/kernel/skas/include/mode_kern-skas.h index e48490028111..c97a80dfe370 100644 --- a/arch/um/kernel/skas/include/mode_kern-skas.h +++ b/arch/um/kernel/skas/include/mode_kern-skas.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "asm/ptrace.h" | 11 | #include "asm/ptrace.h" |
12 | 12 | ||
13 | extern void flush_thread_skas(void); | 13 | extern void flush_thread_skas(void); |
14 | extern void *switch_to_skas(void *prev, void *next); | 14 | extern void switch_to_skas(void *prev, void *next); |
15 | extern void start_thread_skas(struct pt_regs *regs, unsigned long eip, | 15 | extern void start_thread_skas(struct pt_regs *regs, unsigned long eip, |
16 | unsigned long esp); | 16 | unsigned long esp); |
17 | extern int copy_thread_skas(int nr, unsigned long clone_flags, | 17 | extern int copy_thread_skas(int nr, unsigned long clone_flags, |
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index 3d1b227226e6..efe92e8aa2a9 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "proc_mm.h" | 24 | #include "proc_mm.h" |
25 | #include "registers.h" | 25 | #include "registers.h" |
26 | 26 | ||
27 | void *switch_to_skas(void *prev, void *next) | 27 | void switch_to_skas(void *prev, void *next) |
28 | { | 28 | { |
29 | struct task_struct *from, *to; | 29 | struct task_struct *from, *to; |
30 | 30 | ||
@@ -35,16 +35,11 @@ void *switch_to_skas(void *prev, void *next) | |||
35 | if(current->pid == 0) | 35 | if(current->pid == 0) |
36 | switch_timers(0); | 36 | switch_timers(0); |
37 | 37 | ||
38 | to->thread.prev_sched = from; | ||
39 | set_current(to); | ||
40 | |||
41 | switch_threads(&from->thread.mode.skas.switch_buf, | 38 | switch_threads(&from->thread.mode.skas.switch_buf, |
42 | to->thread.mode.skas.switch_buf); | 39 | to->thread.mode.skas.switch_buf); |
43 | 40 | ||
44 | if(current->pid == 0) | 41 | if(current->pid == 0) |
45 | switch_timers(1); | 42 | switch_timers(1); |
46 | |||
47 | return(current->thread.prev_sched); | ||
48 | } | 43 | } |
49 | 44 | ||
50 | extern void schedule_tail(struct task_struct *prev); | 45 | extern void schedule_tail(struct task_struct *prev); |
diff --git a/arch/um/kernel/tempfile.c b/arch/um/kernel/tempfile.c deleted file mode 100644 index b1674bc1395d..000000000000 --- a/arch/um/kernel/tempfile.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <stdio.h> | ||
7 | #include <stdlib.h> | ||
8 | #include <unistd.h> | ||
9 | #include <string.h> | ||
10 | #include <errno.h> | ||
11 | #include <sys/param.h> | ||
12 | #include "init.h" | ||
13 | |||
14 | /* Modified from create_mem_file and start_debugger */ | ||
15 | static char *tempdir = NULL; | ||
16 | |||
17 | static void __init find_tempdir(void) | ||
18 | { | ||
19 | char *dirs[] = { "TMP", "TEMP", "TMPDIR", NULL }; | ||
20 | int i; | ||
21 | char *dir = NULL; | ||
22 | |||
23 | if(tempdir != NULL) return; /* We've already been called */ | ||
24 | for(i = 0; dirs[i]; i++){ | ||
25 | dir = getenv(dirs[i]); | ||
26 | if((dir != NULL) && (*dir != '\0')) | ||
27 | break; | ||
28 | } | ||
29 | if((dir == NULL) || (*dir == '\0')) | ||
30 | dir = "/tmp"; | ||
31 | |||
32 | tempdir = malloc(strlen(dir) + 2); | ||
33 | if(tempdir == NULL){ | ||
34 | fprintf(stderr, "Failed to malloc tempdir, " | ||
35 | "errno = %d\n", errno); | ||
36 | return; | ||
37 | } | ||
38 | strcpy(tempdir, dir); | ||
39 | strcat(tempdir, "/"); | ||
40 | } | ||
41 | |||
42 | int make_tempfile(const char *template, char **out_tempname, int do_unlink) | ||
43 | { | ||
44 | char tempname[MAXPATHLEN]; | ||
45 | int fd; | ||
46 | |||
47 | find_tempdir(); | ||
48 | if (*template != '/') | ||
49 | strcpy(tempname, tempdir); | ||
50 | else | ||
51 | *tempname = 0; | ||
52 | strcat(tempname, template); | ||
53 | fd = mkstemp(tempname); | ||
54 | if(fd < 0){ | ||
55 | fprintf(stderr, "open - cannot create %s: %s\n", tempname, | ||
56 | strerror(errno)); | ||
57 | return -1; | ||
58 | } | ||
59 | if(do_unlink && (unlink(tempname) < 0)){ | ||
60 | perror("unlink"); | ||
61 | return -1; | ||
62 | } | ||
63 | if(out_tempname){ | ||
64 | *out_tempname = strdup(tempname); | ||
65 | if(*out_tempname == NULL){ | ||
66 | perror("strdup"); | ||
67 | return -1; | ||
68 | } | ||
69 | } | ||
70 | return(fd); | ||
71 | } | ||
72 | |||
73 | /* | ||
74 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
75 | * Emacs will notice this stuff at the end of the file and automatically | ||
76 | * adjust the settings for this buffer only. This must remain at the end | ||
77 | * of the file. | ||
78 | * --------------------------------------------------------------------------- | ||
79 | * Local variables: | ||
80 | * c-file-style: "linux" | ||
81 | * End: | ||
82 | */ | ||
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 80ed6188e8a2..0a562c3c0fd8 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c | |||
@@ -307,7 +307,7 @@ int flush_tlb_kernel_range_common(unsigned long start, unsigned long end) | |||
307 | } | 307 | } |
308 | else if(pte_newprot(*pte)){ | 308 | else if(pte_newprot(*pte)){ |
309 | updated = 1; | 309 | updated = 1; |
310 | protect_memory(addr, PAGE_SIZE, 1, 1, 1, 1); | 310 | os_protect_memory((void *) addr, PAGE_SIZE, 1, 1, 1); |
311 | } | 311 | } |
312 | addr += PAGE_SIZE; | 312 | addr += PAGE_SIZE; |
313 | } | 313 | } |
diff --git a/arch/um/kernel/tt/include/mode_kern-tt.h b/arch/um/kernel/tt/include/mode_kern-tt.h index e0ca0e0b2516..2a35b15c5fef 100644 --- a/arch/um/kernel/tt/include/mode_kern-tt.h +++ b/arch/um/kernel/tt/include/mode_kern-tt.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "asm/ptrace.h" | 11 | #include "asm/ptrace.h" |
12 | #include "asm/uaccess.h" | 12 | #include "asm/uaccess.h" |
13 | 13 | ||
14 | extern void *switch_to_tt(void *prev, void *next); | 14 | extern void switch_to_tt(void *prev, void *next); |
15 | extern void flush_thread_tt(void); | 15 | extern void flush_thread_tt(void); |
16 | extern void start_thread_tt(struct pt_regs *regs, unsigned long eip, | 16 | extern void start_thread_tt(struct pt_regs *regs, unsigned long eip, |
17 | unsigned long esp); | 17 | unsigned long esp); |
diff --git a/arch/um/kernel/tt/mem_user.c b/arch/um/kernel/tt/mem_user.c index 3085267459b1..03e589895388 100644 --- a/arch/um/kernel/tt/mem_user.c +++ b/arch/um/kernel/tt/mem_user.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "tt.h" | 12 | #include "tt.h" |
13 | #include "mem_user.h" | 13 | #include "mem_user.h" |
14 | #include "user_util.h" | 14 | #include "user_util.h" |
15 | #include "os.h" | ||
15 | 16 | ||
16 | void remap_data(void *segment_start, void *segment_end, int w) | 17 | void remap_data(void *segment_start, void *segment_end, int w) |
17 | { | 18 | { |
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c index a189a2b92935..0de05a268b22 100644 --- a/arch/um/kernel/tt/process_kern.c +++ b/arch/um/kernel/tt/process_kern.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "init.h" | 26 | #include "init.h" |
27 | #include "tt.h" | 27 | #include "tt.h" |
28 | 28 | ||
29 | void *switch_to_tt(void *prev, void *next, void *last) | 29 | int switch_to_tt(void *prev, void *next, void *last) |
30 | { | 30 | { |
31 | struct task_struct *from, *to, *prev_sched; | 31 | struct task_struct *from, *to, *prev_sched; |
32 | unsigned long flags; | 32 | unsigned long flags; |
@@ -36,8 +36,6 @@ void *switch_to_tt(void *prev, void *next, void *last) | |||
36 | from = prev; | 36 | from = prev; |
37 | to = next; | 37 | to = next; |
38 | 38 | ||
39 | to->thread.prev_sched = from; | ||
40 | |||
41 | cpu = from->thread_info->cpu; | 39 | cpu = from->thread_info->cpu; |
42 | if(cpu == 0) | 40 | if(cpu == 0) |
43 | forward_interrupts(to->thread.mode.tt.extern_pid); | 41 | forward_interrupts(to->thread.mode.tt.extern_pid); |
@@ -53,7 +51,6 @@ void *switch_to_tt(void *prev, void *next, void *last) | |||
53 | forward_pending_sigio(to->thread.mode.tt.extern_pid); | 51 | forward_pending_sigio(to->thread.mode.tt.extern_pid); |
54 | 52 | ||
55 | c = 0; | 53 | c = 0; |
56 | set_current(to); | ||
57 | 54 | ||
58 | err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); | 55 | err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); |
59 | if(err != sizeof(c)) | 56 | if(err != sizeof(c)) |
@@ -85,8 +82,6 @@ void *switch_to_tt(void *prev, void *next, void *last) | |||
85 | 82 | ||
86 | flush_tlb_all(); | 83 | flush_tlb_all(); |
87 | local_irq_restore(flags); | 84 | local_irq_restore(flags); |
88 | |||
89 | return(current->thread.prev_sched); | ||
90 | } | 85 | } |
91 | 86 | ||
92 | void release_thread_tt(struct task_struct *task) | 87 | void release_thread_tt(struct task_struct *task) |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 09f6f7ce4695..f0a275947d34 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -361,11 +361,6 @@ int linux_main(int argc, char **argv) | |||
361 | uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, | 361 | uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, |
362 | &host_task_size, &task_size); | 362 | &host_task_size, &task_size); |
363 | 363 | ||
364 | /* Need to check this early because mmapping happens before the | ||
365 | * kernel is running. | ||
366 | */ | ||
367 | check_tmpexec(); | ||
368 | |||
369 | brk_start = (unsigned long) sbrk(0); | 364 | brk_start = (unsigned long) sbrk(0); |
370 | CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start); | 365 | CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start); |
371 | /* Increase physical memory size for exec-shield users | 366 | /* Increase physical memory size for exec-shield users |
diff --git a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c index 954ff67cc8b3..a25f3ea11fd7 100644 --- a/arch/um/kernel/user_util.c +++ b/arch/um/kernel/user_util.c | |||
@@ -109,18 +109,14 @@ int raw(int fd) | |||
109 | int err; | 109 | int err; |
110 | 110 | ||
111 | CATCH_EINTR(err = tcgetattr(fd, &tt)); | 111 | CATCH_EINTR(err = tcgetattr(fd, &tt)); |
112 | if (err < 0) { | 112 | if(err < 0) |
113 | printk("tcgetattr failed, errno = %d\n", errno); | 113 | return -errno; |
114 | return(-errno); | ||
115 | } | ||
116 | 114 | ||
117 | cfmakeraw(&tt); | 115 | cfmakeraw(&tt); |
118 | 116 | ||
119 | CATCH_EINTR(err = tcsetattr(fd, TCSADRAIN, &tt)); | 117 | CATCH_EINTR(err = tcsetattr(fd, TCSADRAIN, &tt)); |
120 | if (err < 0) { | 118 | if(err < 0) |
121 | printk("tcsetattr failed, errno = %d\n", errno); | 119 | return -errno; |
122 | return(-errno); | ||
123 | } | ||
124 | 120 | ||
125 | /* XXX tcsetattr could have applied only some changes | 121 | /* XXX tcsetattr could have applied only some changes |
126 | * (and cfmakeraw() is a set of changes) */ | 122 | * (and cfmakeraw() is a set of changes) */ |
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile index 7a1662419c0c..d15ec2af6a22 100644 --- a/arch/um/os-Linux/Makefile +++ b/arch/um/os-Linux/Makefile | |||
@@ -3,11 +3,11 @@ | |||
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
5 | 5 | ||
6 | obj-y = aio.o elf_aux.o file.o process.o signal.o start_up.o time.o tt.o \ | 6 | obj-y = aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o time.o \ |
7 | tty.o user_syms.o drivers/ sys-$(SUBARCH)/ | 7 | tt.o tty.o user_syms.o drivers/ sys-$(SUBARCH)/ |
8 | 8 | ||
9 | USER_OBJS := aio.o elf_aux.o file.o process.o signal.o start_up.o time.o tt.o \ | 9 | USER_OBJS := aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o \ |
10 | tty.o | 10 | time.o tt.o tty.o |
11 | 11 | ||
12 | elf_aux.o: $(ARCH_DIR)/kernel-offsets.h | 12 | elf_aux.o: $(ARCH_DIR)/kernel-offsets.h |
13 | CFLAGS_elf_aux.o += -I$(objtree)/arch/um | 13 | CFLAGS_elf_aux.o += -I$(objtree)/arch/um |
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c index b04897cd995d..298d5632128b 100644 --- a/arch/um/os-Linux/aio.c +++ b/arch/um/os-Linux/aio.c | |||
@@ -117,6 +117,8 @@ static int do_aio(aio_context_t ctx, struct aio_context *aio) | |||
117 | err = io_submit(ctx, 1, &iocbp); | 117 | err = io_submit(ctx, 1, &iocbp); |
118 | if(err > 0) | 118 | if(err > 0) |
119 | err = 0; | 119 | err = 0; |
120 | else | ||
121 | err = -errno; | ||
120 | 122 | ||
121 | out: | 123 | out: |
122 | return err; | 124 | return err; |
@@ -142,7 +144,7 @@ static int aio_thread(void *arg) | |||
142 | "errno = %d\n", errno); | 144 | "errno = %d\n", errno); |
143 | } | 145 | } |
144 | else { | 146 | else { |
145 | aio = (struct aio_context *) event.data; | 147 | aio = (struct aio_context *) (long) event.data; |
146 | if(update_aio(aio, event.res)){ | 148 | if(update_aio(aio, event.res)){ |
147 | do_aio(ctx, aio); | 149 | do_aio(ctx, aio); |
148 | continue; | 150 | continue; |
@@ -313,15 +315,16 @@ static int init_aio_26(void) | |||
313 | int err; | 315 | int err; |
314 | 316 | ||
315 | if(io_setup(256, &ctx)){ | 317 | if(io_setup(256, &ctx)){ |
318 | err = -errno; | ||
316 | printk("aio_thread failed to initialize context, err = %d\n", | 319 | printk("aio_thread failed to initialize context, err = %d\n", |
317 | errno); | 320 | errno); |
318 | return -errno; | 321 | return err; |
319 | } | 322 | } |
320 | 323 | ||
321 | err = run_helper_thread(aio_thread, NULL, | 324 | err = run_helper_thread(aio_thread, NULL, |
322 | CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); | 325 | CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); |
323 | if(err < 0) | 326 | if(err < 0) |
324 | return -errno; | 327 | return err; |
325 | 328 | ||
326 | aio_pid = err; | 329 | aio_pid = err; |
327 | 330 | ||
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c index 4b83c6c3f48d..4ba9b17adf13 100644 --- a/arch/um/os-Linux/drivers/tuntap_user.c +++ b/arch/um/os-Linux/drivers/tuntap_user.c | |||
@@ -75,7 +75,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote, | |||
75 | struct msghdr msg; | 75 | struct msghdr msg; |
76 | struct cmsghdr *cmsg; | 76 | struct cmsghdr *cmsg; |
77 | struct iovec iov; | 77 | struct iovec iov; |
78 | int pid, n; | 78 | int pid, n, err; |
79 | 79 | ||
80 | sprintf(version_buf, "%d", UML_NET_VERSION); | 80 | sprintf(version_buf, "%d", UML_NET_VERSION); |
81 | 81 | ||
@@ -105,9 +105,10 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote, | |||
105 | n = recvmsg(me, &msg, 0); | 105 | n = recvmsg(me, &msg, 0); |
106 | *used_out = n; | 106 | *used_out = n; |
107 | if(n < 0){ | 107 | if(n < 0){ |
108 | err = -errno; | ||
108 | printk("tuntap_open_tramp : recvmsg failed - errno = %d\n", | 109 | printk("tuntap_open_tramp : recvmsg failed - errno = %d\n", |
109 | errno); | 110 | errno); |
110 | return(-errno); | 111 | return err; |
111 | } | 112 | } |
112 | CATCH_EINTR(waitpid(pid, NULL, 0)); | 113 | CATCH_EINTR(waitpid(pid, NULL, 0)); |
113 | 114 | ||
@@ -147,9 +148,10 @@ static int tuntap_open(void *data) | |||
147 | ifr.ifr_flags = IFF_TAP | IFF_NO_PI; | 148 | ifr.ifr_flags = IFF_TAP | IFF_NO_PI; |
148 | strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name)); | 149 | strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name)); |
149 | if(ioctl(pri->fd, TUNSETIFF, (void *) &ifr) < 0){ | 150 | if(ioctl(pri->fd, TUNSETIFF, (void *) &ifr) < 0){ |
151 | err = -errno; | ||
150 | printk("TUNSETIFF failed, errno = %d\n", errno); | 152 | printk("TUNSETIFF failed, errno = %d\n", errno); |
151 | os_close_file(pri->fd); | 153 | os_close_file(pri->fd); |
152 | return(-errno); | 154 | return err; |
153 | } | 155 | } |
154 | } | 156 | } |
155 | else { | 157 | else { |
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c index 1399520a8588..e770cb029578 100644 --- a/arch/um/os-Linux/elf_aux.c +++ b/arch/um/os-Linux/elf_aux.c | |||
@@ -54,7 +54,8 @@ __init void scan_elf_aux( char **envp) | |||
54 | * a_un, so we have to use a_val, which is | 54 | * a_un, so we have to use a_val, which is |
55 | * all that's left. | 55 | * all that's left. |
56 | */ | 56 | */ |
57 | elf_aux_platform = (char *) auxv->a_un.a_val; | 57 | elf_aux_platform = |
58 | (char *) (long) auxv->a_un.a_val; | ||
58 | break; | 59 | break; |
59 | case AT_PAGESZ: | 60 | case AT_PAGESZ: |
60 | page_size = auxv->a_un.a_val; | 61 | page_size = auxv->a_un.a_val; |
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index fd45bb260907..f55773c819e6 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c | |||
@@ -119,15 +119,11 @@ int os_window_size(int fd, int *rows, int *cols) | |||
119 | 119 | ||
120 | int os_new_tty_pgrp(int fd, int pid) | 120 | int os_new_tty_pgrp(int fd, int pid) |
121 | { | 121 | { |
122 | if(ioctl(fd, TIOCSCTTY, 0) < 0){ | 122 | if(ioctl(fd, TIOCSCTTY, 0) < 0) |
123 | printk("TIOCSCTTY failed, errno = %d\n", errno); | 123 | return -errno; |
124 | return(-errno); | ||
125 | } | ||
126 | 124 | ||
127 | if(tcsetpgrp(fd, pid) < 0){ | 125 | if(tcsetpgrp(fd, pid) < 0) |
128 | printk("tcsetpgrp failed, errno = %d\n", errno); | 126 | return -errno; |
129 | return(-errno); | ||
130 | } | ||
131 | 127 | ||
132 | return(0); | 128 | return(0); |
133 | } | 129 | } |
@@ -146,18 +142,12 @@ int os_set_slip(int fd) | |||
146 | int disc, sencap; | 142 | int disc, sencap; |
147 | 143 | ||
148 | disc = N_SLIP; | 144 | disc = N_SLIP; |
149 | if(ioctl(fd, TIOCSETD, &disc) < 0){ | 145 | if(ioctl(fd, TIOCSETD, &disc) < 0) |
150 | printk("Failed to set slip line discipline - " | 146 | return -errno; |
151 | "errno = %d\n", errno); | ||
152 | return(-errno); | ||
153 | } | ||
154 | 147 | ||
155 | sencap = 0; | 148 | sencap = 0; |
156 | if(ioctl(fd, SIOCSIFENCAP, &sencap) < 0){ | 149 | if(ioctl(fd, SIOCSIFENCAP, &sencap) < 0) |
157 | printk("Failed to set slip encapsulation - " | 150 | return -errno; |
158 | "errno = %d\n", errno); | ||
159 | return(-errno); | ||
160 | } | ||
161 | 151 | ||
162 | return(0); | 152 | return(0); |
163 | } | 153 | } |
@@ -180,22 +170,15 @@ int os_sigio_async(int master, int slave) | |||
180 | int flags; | 170 | int flags; |
181 | 171 | ||
182 | flags = fcntl(master, F_GETFL); | 172 | flags = fcntl(master, F_GETFL); |
183 | if(flags < 0) { | 173 | if(flags < 0) |
184 | printk("fcntl F_GETFL failed, errno = %d\n", errno); | 174 | return errno; |
185 | return(-errno); | ||
186 | } | ||
187 | 175 | ||
188 | if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || | 176 | if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || |
189 | (fcntl(master, F_SETOWN, os_getpid()) < 0)){ | 177 | (fcntl(master, F_SETOWN, os_getpid()) < 0)) |
190 | printk("fcntl F_SETFL or F_SETOWN failed, errno = %d\n", | 178 | return -errno; |
191 | errno); | ||
192 | return(-errno); | ||
193 | } | ||
194 | 179 | ||
195 | if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)){ | 180 | if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)) |
196 | printk("fcntl F_SETFL failed, errno = %d\n", errno); | 181 | return -errno; |
197 | return(-errno); | ||
198 | } | ||
199 | 182 | ||
200 | return(0); | 183 | return(0); |
201 | } | 184 | } |
@@ -255,7 +238,7 @@ int os_file_mode(char *file, struct openflags *mode_out) | |||
255 | 238 | ||
256 | int os_open_file(char *file, struct openflags flags, int mode) | 239 | int os_open_file(char *file, struct openflags flags, int mode) |
257 | { | 240 | { |
258 | int fd, f = 0; | 241 | int fd, err, f = 0; |
259 | 242 | ||
260 | if(flags.r && flags.w) f = O_RDWR; | 243 | if(flags.r && flags.w) f = O_RDWR; |
261 | else if(flags.r) f = O_RDONLY; | 244 | else if(flags.r) f = O_RDONLY; |
@@ -272,8 +255,9 @@ int os_open_file(char *file, struct openflags flags, int mode) | |||
272 | return(-errno); | 255 | return(-errno); |
273 | 256 | ||
274 | if(flags.cl && fcntl(fd, F_SETFD, 1)){ | 257 | if(flags.cl && fcntl(fd, F_SETFD, 1)){ |
258 | err = -errno; | ||
275 | os_close_file(fd); | 259 | os_close_file(fd); |
276 | return(-errno); | 260 | return err; |
277 | } | 261 | } |
278 | 262 | ||
279 | return(fd); | 263 | return(fd); |
@@ -383,9 +367,9 @@ int os_file_size(char *file, unsigned long long *size_out) | |||
383 | return(fd); | 367 | return(fd); |
384 | } | 368 | } |
385 | if(ioctl(fd, BLKGETSIZE, &blocks) < 0){ | 369 | if(ioctl(fd, BLKGETSIZE, &blocks) < 0){ |
370 | err = -errno; | ||
386 | printk("Couldn't get the block size of \"%s\", " | 371 | printk("Couldn't get the block size of \"%s\", " |
387 | "errno = %d\n", file, errno); | 372 | "errno = %d\n", file, errno); |
388 | err = -errno; | ||
389 | os_close_file(fd); | 373 | os_close_file(fd); |
390 | return(err); | 374 | return(err); |
391 | } | 375 | } |
@@ -473,11 +457,14 @@ int os_pipe(int *fds, int stream, int close_on_exec) | |||
473 | 457 | ||
474 | int os_set_fd_async(int fd, int owner) | 458 | int os_set_fd_async(int fd, int owner) |
475 | { | 459 | { |
460 | int err; | ||
461 | |||
476 | /* XXX This should do F_GETFL first */ | 462 | /* XXX This should do F_GETFL first */ |
477 | if(fcntl(fd, F_SETFL, O_ASYNC | O_NONBLOCK) < 0){ | 463 | if(fcntl(fd, F_SETFL, O_ASYNC | O_NONBLOCK) < 0){ |
464 | err = -errno; | ||
478 | printk("os_set_fd_async : failed to set O_ASYNC and " | 465 | printk("os_set_fd_async : failed to set O_ASYNC and " |
479 | "O_NONBLOCK on fd # %d, errno = %d\n", fd, errno); | 466 | "O_NONBLOCK on fd # %d, errno = %d\n", fd, errno); |
480 | return(-errno); | 467 | return err; |
481 | } | 468 | } |
482 | #ifdef notdef | 469 | #ifdef notdef |
483 | if(fcntl(fd, F_SETFD, 1) < 0){ | 470 | if(fcntl(fd, F_SETFD, 1) < 0){ |
@@ -488,10 +475,11 @@ int os_set_fd_async(int fd, int owner) | |||
488 | 475 | ||
489 | if((fcntl(fd, F_SETSIG, SIGIO) < 0) || | 476 | if((fcntl(fd, F_SETSIG, SIGIO) < 0) || |
490 | (fcntl(fd, F_SETOWN, owner) < 0)){ | 477 | (fcntl(fd, F_SETOWN, owner) < 0)){ |
478 | err = -errno; | ||
491 | printk("os_set_fd_async : Failed to fcntl F_SETOWN " | 479 | printk("os_set_fd_async : Failed to fcntl F_SETOWN " |
492 | "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd, | 480 | "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd, |
493 | owner, errno); | 481 | owner, errno); |
494 | return(-errno); | 482 | return err; |
495 | } | 483 | } |
496 | 484 | ||
497 | return(0); | 485 | return(0); |
@@ -516,11 +504,9 @@ int os_set_fd_block(int fd, int blocking) | |||
516 | if(blocking) flags &= ~O_NONBLOCK; | 504 | if(blocking) flags &= ~O_NONBLOCK; |
517 | else flags |= O_NONBLOCK; | 505 | else flags |= O_NONBLOCK; |
518 | 506 | ||
519 | if(fcntl(fd, F_SETFL, flags) < 0){ | 507 | if(fcntl(fd, F_SETFL, flags) < 0) |
520 | printk("Failed to change blocking on fd # %d, errno = %d\n", | 508 | return -errno; |
521 | fd, errno); | 509 | |
522 | return(-errno); | ||
523 | } | ||
524 | return(0); | 510 | return(0); |
525 | } | 511 | } |
526 | 512 | ||
@@ -609,11 +595,8 @@ int os_create_unix_socket(char *file, int len, int close_on_exec) | |||
609 | int sock, err; | 595 | int sock, err; |
610 | 596 | ||
611 | sock = socket(PF_UNIX, SOCK_DGRAM, 0); | 597 | sock = socket(PF_UNIX, SOCK_DGRAM, 0); |
612 | if (sock < 0){ | 598 | if(sock < 0) |
613 | printk("create_unix_socket - socket failed, errno = %d\n", | 599 | return -errno; |
614 | errno); | ||
615 | return(-errno); | ||
616 | } | ||
617 | 600 | ||
618 | if(close_on_exec) { | 601 | if(close_on_exec) { |
619 | err = os_set_exec_close(sock, 1); | 602 | err = os_set_exec_close(sock, 1); |
@@ -628,11 +611,8 @@ int os_create_unix_socket(char *file, int len, int close_on_exec) | |||
628 | snprintf(addr.sun_path, len, "%s", file); | 611 | snprintf(addr.sun_path, len, "%s", file); |
629 | 612 | ||
630 | err = bind(sock, (struct sockaddr *) &addr, sizeof(addr)); | 613 | err = bind(sock, (struct sockaddr *) &addr, sizeof(addr)); |
631 | if (err < 0){ | 614 | if(err < 0) |
632 | printk("create_listening_socket at '%s' - bind failed, " | 615 | return -errno; |
633 | "errno = %d\n", file, errno); | ||
634 | return(-errno); | ||
635 | } | ||
636 | 616 | ||
637 | return(sock); | 617 | return(sock); |
638 | } | 618 | } |
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c new file mode 100644 index 000000000000..8e71edaaf80b --- /dev/null +++ b/arch/um/os-Linux/mem.c | |||
@@ -0,0 +1,161 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <stddef.h> | ||
4 | #include <stdarg.h> | ||
5 | #include <unistd.h> | ||
6 | #include <errno.h> | ||
7 | #include <string.h> | ||
8 | #include <fcntl.h> | ||
9 | #include <sys/types.h> | ||
10 | #include <sys/mman.h> | ||
11 | #include "kern_util.h" | ||
12 | #include "user.h" | ||
13 | #include "user_util.h" | ||
14 | #include "mem_user.h" | ||
15 | #include "init.h" | ||
16 | #include "os.h" | ||
17 | #include "tempfile.h" | ||
18 | #include "kern_constants.h" | ||
19 | |||
20 | #include <sys/param.h> | ||
21 | |||
22 | static char *tempdir = NULL; | ||
23 | |||
24 | static void __init find_tempdir(void) | ||
25 | { | ||
26 | char *dirs[] = { "TMP", "TEMP", "TMPDIR", NULL }; | ||
27 | int i; | ||
28 | char *dir = NULL; | ||
29 | |||
30 | if(tempdir != NULL) return; /* We've already been called */ | ||
31 | for(i = 0; dirs[i]; i++){ | ||
32 | dir = getenv(dirs[i]); | ||
33 | if((dir != NULL) && (*dir != '\0')) | ||
34 | break; | ||
35 | } | ||
36 | if((dir == NULL) || (*dir == '\0')) | ||
37 | dir = "/tmp"; | ||
38 | |||
39 | tempdir = malloc(strlen(dir) + 2); | ||
40 | if(tempdir == NULL){ | ||
41 | fprintf(stderr, "Failed to malloc tempdir, " | ||
42 | "errno = %d\n", errno); | ||
43 | return; | ||
44 | } | ||
45 | strcpy(tempdir, dir); | ||
46 | strcat(tempdir, "/"); | ||
47 | } | ||
48 | |||
49 | /* | ||
50 | * This proc still used in tt-mode | ||
51 | * (file: kernel/tt/ptproxy/proxy.c, proc: start_debugger). | ||
52 | * So it isn't 'static' yet. | ||
53 | */ | ||
54 | int make_tempfile(const char *template, char **out_tempname, int do_unlink) | ||
55 | { | ||
56 | char tempname[MAXPATHLEN]; | ||
57 | int fd; | ||
58 | |||
59 | find_tempdir(); | ||
60 | if (*template != '/') | ||
61 | strcpy(tempname, tempdir); | ||
62 | else | ||
63 | *tempname = 0; | ||
64 | strcat(tempname, template); | ||
65 | fd = mkstemp(tempname); | ||
66 | if(fd < 0){ | ||
67 | fprintf(stderr, "open - cannot create %s: %s\n", tempname, | ||
68 | strerror(errno)); | ||
69 | return -1; | ||
70 | } | ||
71 | if(do_unlink && (unlink(tempname) < 0)){ | ||
72 | perror("unlink"); | ||
73 | return -1; | ||
74 | } | ||
75 | if(out_tempname){ | ||
76 | *out_tempname = strdup(tempname); | ||
77 | if(*out_tempname == NULL){ | ||
78 | perror("strdup"); | ||
79 | return -1; | ||
80 | } | ||
81 | } | ||
82 | return(fd); | ||
83 | } | ||
84 | |||
85 | #define TEMPNAME_TEMPLATE "vm_file-XXXXXX" | ||
86 | |||
87 | /* | ||
88 | * This proc is used in start_up.c | ||
89 | * So it isn't 'static'. | ||
90 | */ | ||
91 | int create_tmp_file(unsigned long len) | ||
92 | { | ||
93 | int fd, err; | ||
94 | char zero; | ||
95 | |||
96 | fd = make_tempfile(TEMPNAME_TEMPLATE, NULL, 1); | ||
97 | if(fd < 0) { | ||
98 | exit(1); | ||
99 | } | ||
100 | |||
101 | err = fchmod(fd, 0777); | ||
102 | if(err < 0){ | ||
103 | perror("os_mode_fd"); | ||
104 | exit(1); | ||
105 | } | ||
106 | |||
107 | if (lseek64(fd, len, SEEK_SET) < 0) { | ||
108 | perror("os_seek_file"); | ||
109 | exit(1); | ||
110 | } | ||
111 | |||
112 | zero = 0; | ||
113 | |||
114 | err = os_write_file(fd, &zero, 1); | ||
115 | if(err != 1){ | ||
116 | errno = -err; | ||
117 | perror("os_write_file"); | ||
118 | exit(1); | ||
119 | } | ||
120 | |||
121 | return(fd); | ||
122 | } | ||
123 | |||
124 | static int create_anon_file(unsigned long len) | ||
125 | { | ||
126 | void *addr; | ||
127 | int fd; | ||
128 | |||
129 | fd = open("/dev/anon", O_RDWR); | ||
130 | if(fd < 0) { | ||
131 | perror("opening /dev/anon"); | ||
132 | exit(1); | ||
133 | } | ||
134 | |||
135 | addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); | ||
136 | if(addr == MAP_FAILED){ | ||
137 | perror("mapping physmem file"); | ||
138 | exit(1); | ||
139 | } | ||
140 | munmap(addr, len); | ||
141 | |||
142 | return(fd); | ||
143 | } | ||
144 | |||
145 | extern int have_devanon; | ||
146 | |||
147 | int create_mem_file(unsigned long len) | ||
148 | { | ||
149 | int err, fd; | ||
150 | |||
151 | if(have_devanon) | ||
152 | fd = create_anon_file(len); | ||
153 | else fd = create_tmp_file(len); | ||
154 | |||
155 | err = os_set_exec_close(fd, 1); | ||
156 | if(err < 0){ | ||
157 | errno = -err; | ||
158 | perror("exec_close"); | ||
159 | } | ||
160 | return(fd); | ||
161 | } | ||
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 040cc1472bc7..6af83171ca4e 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c | |||
@@ -4,18 +4,22 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <stdio.h> | 6 | #include <stdio.h> |
7 | #include <stddef.h> | ||
8 | #include <stdarg.h> | ||
9 | #include <stdlib.h> | ||
10 | #include <string.h> | ||
7 | #include <unistd.h> | 11 | #include <unistd.h> |
8 | #include <signal.h> | 12 | #include <signal.h> |
9 | #include <sched.h> | 13 | #include <sched.h> |
14 | #include <fcntl.h> | ||
10 | #include <errno.h> | 15 | #include <errno.h> |
11 | #include <stdarg.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <setjmp.h> | 16 | #include <setjmp.h> |
14 | #include <sys/time.h> | 17 | #include <sys/time.h> |
15 | #include <sys/wait.h> | 18 | #include <sys/wait.h> |
16 | #include <sys/mman.h> | 19 | #include <sys/mman.h> |
17 | #include <asm/unistd.h> | 20 | #include <asm/unistd.h> |
18 | #include <asm/page.h> | 21 | #include <asm/page.h> |
22 | #include <sys/types.h> | ||
19 | #include "user_util.h" | 23 | #include "user_util.h" |
20 | #include "kern_util.h" | 24 | #include "kern_util.h" |
21 | #include "user.h" | 25 | #include "user.h" |
@@ -25,6 +29,7 @@ | |||
25 | #include "sysdep/sigcontext.h" | 29 | #include "sysdep/sigcontext.h" |
26 | #include "irq_user.h" | 30 | #include "irq_user.h" |
27 | #include "ptrace_user.h" | 31 | #include "ptrace_user.h" |
32 | #include "mem_user.h" | ||
28 | #include "time_user.h" | 33 | #include "time_user.h" |
29 | #include "init.h" | 34 | #include "init.h" |
30 | #include "os.h" | 35 | #include "os.h" |
@@ -32,6 +37,8 @@ | |||
32 | #include "choose-mode.h" | 37 | #include "choose-mode.h" |
33 | #include "mode.h" | 38 | #include "mode.h" |
34 | #include "tempfile.h" | 39 | #include "tempfile.h" |
40 | #include "kern_constants.h" | ||
41 | |||
35 | #ifdef UML_CONFIG_MODE_SKAS | 42 | #ifdef UML_CONFIG_MODE_SKAS |
36 | #include "skas.h" | 43 | #include "skas.h" |
37 | #include "skas_ptrace.h" | 44 | #include "skas_ptrace.h" |
@@ -276,9 +283,38 @@ static void __init check_ptrace(void) | |||
276 | check_sysemu(); | 283 | check_sysemu(); |
277 | } | 284 | } |
278 | 285 | ||
286 | extern int create_tmp_file(unsigned long len); | ||
287 | |||
288 | static void check_tmpexec(void) | ||
289 | { | ||
290 | void *addr; | ||
291 | int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE); | ||
292 | |||
293 | addr = mmap(NULL, UM_KERN_PAGE_SIZE, | ||
294 | PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0); | ||
295 | printf("Checking PROT_EXEC mmap in /tmp..."); | ||
296 | fflush(stdout); | ||
297 | if(addr == MAP_FAILED){ | ||
298 | err = errno; | ||
299 | perror("failed"); | ||
300 | if(err == EPERM) | ||
301 | printf("/tmp must be not mounted noexec\n"); | ||
302 | exit(1); | ||
303 | } | ||
304 | printf("OK\n"); | ||
305 | munmap(addr, UM_KERN_PAGE_SIZE); | ||
306 | |||
307 | close(fd); | ||
308 | } | ||
309 | |||
279 | void os_early_checks(void) | 310 | void os_early_checks(void) |
280 | { | 311 | { |
281 | check_ptrace(); | 312 | check_ptrace(); |
313 | |||
314 | /* Need to check this early because mmapping happens before the | ||
315 | * kernel is running. | ||
316 | */ | ||
317 | check_tmpexec(); | ||
282 | } | 318 | } |
283 | 319 | ||
284 | static int __init noprocmm_cmd_param(char *str, int* add) | 320 | static int __init noprocmm_cmd_param(char *str, int* add) |
@@ -357,3 +393,72 @@ int can_do_skas(void) | |||
357 | return(0); | 393 | return(0); |
358 | } | 394 | } |
359 | #endif | 395 | #endif |
396 | |||
397 | int have_devanon = 0; | ||
398 | |||
399 | void check_devanon(void) | ||
400 | { | ||
401 | int fd; | ||
402 | |||
403 | printk("Checking for /dev/anon on the host..."); | ||
404 | fd = open("/dev/anon", O_RDWR); | ||
405 | if(fd < 0){ | ||
406 | printk("Not available (open failed with errno %d)\n", errno); | ||
407 | return; | ||
408 | } | ||
409 | |||
410 | printk("OK\n"); | ||
411 | have_devanon = 1; | ||
412 | } | ||
413 | |||
414 | int __init parse_iomem(char *str, int *add) | ||
415 | { | ||
416 | struct iomem_region *new; | ||
417 | struct uml_stat buf; | ||
418 | char *file, *driver; | ||
419 | int fd, err, size; | ||
420 | |||
421 | driver = str; | ||
422 | file = strchr(str,','); | ||
423 | if(file == NULL){ | ||
424 | printf("parse_iomem : failed to parse iomem\n"); | ||
425 | goto out; | ||
426 | } | ||
427 | *file = '\0'; | ||
428 | file++; | ||
429 | fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0); | ||
430 | if(fd < 0){ | ||
431 | os_print_error(fd, "parse_iomem - Couldn't open io file"); | ||
432 | goto out; | ||
433 | } | ||
434 | |||
435 | err = os_stat_fd(fd, &buf); | ||
436 | if(err < 0){ | ||
437 | os_print_error(err, "parse_iomem - cannot stat_fd file"); | ||
438 | goto out_close; | ||
439 | } | ||
440 | |||
441 | new = malloc(sizeof(*new)); | ||
442 | if(new == NULL){ | ||
443 | perror("Couldn't allocate iomem_region struct"); | ||
444 | goto out_close; | ||
445 | } | ||
446 | |||
447 | size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1); | ||
448 | |||
449 | *new = ((struct iomem_region) { .next = iomem_regions, | ||
450 | .driver = driver, | ||
451 | .fd = fd, | ||
452 | .size = size, | ||
453 | .phys = 0, | ||
454 | .virt = 0 }); | ||
455 | iomem_regions = new; | ||
456 | iomem_size += new->size + UM_KERN_PAGE_SIZE; | ||
457 | |||
458 | return(0); | ||
459 | out_close: | ||
460 | os_close_file(fd); | ||
461 | out: | ||
462 | return(1); | ||
463 | } | ||
464 | |||
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c index 5b047ab8416a..a6db8877931a 100644 --- a/arch/um/os-Linux/tt.c +++ b/arch/um/os-Linux/tt.c | |||
@@ -36,6 +36,20 @@ | |||
36 | #include "mode.h" | 36 | #include "mode.h" |
37 | #include "tempfile.h" | 37 | #include "tempfile.h" |
38 | 38 | ||
39 | int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x, | ||
40 | int must_succeed) | ||
41 | { | ||
42 | int err; | ||
43 | |||
44 | err = os_protect_memory((void *) addr, len, r, w, x); | ||
45 | if(err < 0){ | ||
46 | if(must_succeed) | ||
47 | panic("protect failed, err = %d", -err); | ||
48 | else return(err); | ||
49 | } | ||
50 | return(0); | ||
51 | } | ||
52 | |||
39 | /* | 53 | /* |
40 | *------------------------- | 54 | *------------------------- |
41 | * only for tt mode (will be deleted in future...) | 55 | * only for tt mode (will be deleted in future...) |
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 4e34b0f9d613..ab3f87aaff70 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/kexec.h> | 19 | #include <linux/kexec.h> |
20 | #include <linux/module.h> | ||
21 | |||
20 | #include <asm/page.h> | 22 | #include <asm/page.h> |
21 | #include <asm/e820.h> | 23 | #include <asm/e820.h> |
22 | #include <asm/proto.h> | 24 | #include <asm/proto.h> |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 351d8d64c2fb..238f73e1a834 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -831,11 +831,26 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
831 | #endif | 831 | #endif |
832 | } | 832 | } |
833 | 833 | ||
834 | #define HWCR 0xc0010015 | ||
835 | |||
834 | static int __init init_amd(struct cpuinfo_x86 *c) | 836 | static int __init init_amd(struct cpuinfo_x86 *c) |
835 | { | 837 | { |
836 | int r; | 838 | int r; |
837 | int level; | 839 | int level; |
838 | 840 | ||
841 | #ifdef CONFIG_SMP | ||
842 | unsigned long value; | ||
843 | |||
844 | // Disable TLB flush filter by setting HWCR.FFDIS: | ||
845 | // bit 6 of msr C001_0015 | ||
846 | // | ||
847 | // Errata 63 for SH-B3 steppings | ||
848 | // Errata 122 for all(?) steppings | ||
849 | rdmsrl(HWCR, value); | ||
850 | value |= 1 << 6; | ||
851 | wrmsrl(HWCR, value); | ||
852 | #endif | ||
853 | |||
839 | /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; | 854 | /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; |
840 | 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ | 855 | 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ |
841 | clear_bit(0*32+31, &c->x86_capability); | 856 | clear_bit(0*32+31, &c->x86_capability); |
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index 711d2f314ac3..94af920465b5 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c | |||
@@ -750,6 +750,14 @@ static int pf_ready(void) | |||
750 | 750 | ||
751 | static struct request_queue *pf_queue; | 751 | static struct request_queue *pf_queue; |
752 | 752 | ||
753 | static void pf_end_request(int uptodate) | ||
754 | { | ||
755 | if (pf_req) { | ||
756 | end_request(pf_req, uptodate); | ||
757 | pf_req = NULL; | ||
758 | } | ||
759 | } | ||
760 | |||
753 | static void do_pf_request(request_queue_t * q) | 761 | static void do_pf_request(request_queue_t * q) |
754 | { | 762 | { |
755 | if (pf_busy) | 763 | if (pf_busy) |
@@ -765,7 +773,7 @@ repeat: | |||
765 | pf_count = pf_req->current_nr_sectors; | 773 | pf_count = pf_req->current_nr_sectors; |
766 | 774 | ||
767 | if (pf_block + pf_count > get_capacity(pf_req->rq_disk)) { | 775 | if (pf_block + pf_count > get_capacity(pf_req->rq_disk)) { |
768 | end_request(pf_req, 0); | 776 | pf_end_request(0); |
769 | goto repeat; | 777 | goto repeat; |
770 | } | 778 | } |
771 | 779 | ||
@@ -780,7 +788,7 @@ repeat: | |||
780 | pi_do_claimed(pf_current->pi, do_pf_write); | 788 | pi_do_claimed(pf_current->pi, do_pf_write); |
781 | else { | 789 | else { |
782 | pf_busy = 0; | 790 | pf_busy = 0; |
783 | end_request(pf_req, 0); | 791 | pf_end_request(0); |
784 | goto repeat; | 792 | goto repeat; |
785 | } | 793 | } |
786 | } | 794 | } |
@@ -798,9 +806,11 @@ static int pf_next_buf(void) | |||
798 | if (!pf_count) | 806 | if (!pf_count) |
799 | return 1; | 807 | return 1; |
800 | spin_lock_irqsave(&pf_spin_lock, saved_flags); | 808 | spin_lock_irqsave(&pf_spin_lock, saved_flags); |
801 | end_request(pf_req, 1); | 809 | pf_end_request(1); |
802 | pf_count = pf_req->current_nr_sectors; | 810 | if (pf_req) { |
803 | pf_buf = pf_req->buffer; | 811 | pf_count = pf_req->current_nr_sectors; |
812 | pf_buf = pf_req->buffer; | ||
813 | } | ||
804 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); | 814 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); |
805 | return 1; | 815 | return 1; |
806 | } | 816 | } |
@@ -810,7 +820,7 @@ static inline void next_request(int success) | |||
810 | unsigned long saved_flags; | 820 | unsigned long saved_flags; |
811 | 821 | ||
812 | spin_lock_irqsave(&pf_spin_lock, saved_flags); | 822 | spin_lock_irqsave(&pf_spin_lock, saved_flags); |
813 | end_request(pf_req, success); | 823 | pf_end_request(success); |
814 | pf_busy = 0; | 824 | pf_busy = 0; |
815 | do_pf_request(pf_queue); | 825 | do_pf_request(pf_queue); |
816 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); | 826 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); |
diff --git a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c index 856c2278e9d0..079ec344eb47 100644 --- a/drivers/block/scsi_ioctl.c +++ b/drivers/block/scsi_ioctl.c | |||
@@ -168,6 +168,7 @@ static int verify_command(struct file *file, unsigned char *cmd) | |||
168 | safe_for_write(WRITE_VERIFY_12), | 168 | safe_for_write(WRITE_VERIFY_12), |
169 | safe_for_write(WRITE_16), | 169 | safe_for_write(WRITE_16), |
170 | safe_for_write(WRITE_LONG), | 170 | safe_for_write(WRITE_LONG), |
171 | safe_for_write(WRITE_LONG_2), | ||
171 | safe_for_write(ERASE), | 172 | safe_for_write(ERASE), |
172 | safe_for_write(GPCMD_MODE_SELECT_10), | 173 | safe_for_write(GPCMD_MODE_SELECT_10), |
173 | safe_for_write(MODE_SELECT), | 174 | safe_for_write(MODE_SELECT), |
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index 99762b6c19ae..de5d6d212674 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c | |||
@@ -252,7 +252,7 @@ hp_zx1_configure (void) | |||
252 | readl(hp->ioc_regs+HP_ZX1_PDIR_BASE); | 252 | readl(hp->ioc_regs+HP_ZX1_PDIR_BASE); |
253 | writel(hp->io_tlb_ps, hp->ioc_regs+HP_ZX1_TCNFG); | 253 | writel(hp->io_tlb_ps, hp->ioc_regs+HP_ZX1_TCNFG); |
254 | readl(hp->ioc_regs+HP_ZX1_TCNFG); | 254 | readl(hp->ioc_regs+HP_ZX1_TCNFG); |
255 | writel(~(HP_ZX1_IOVA_SIZE-1), hp->ioc_regs+HP_ZX1_IMASK); | 255 | writel((unsigned int)(~(HP_ZX1_IOVA_SIZE-1)), hp->ioc_regs+HP_ZX1_IMASK); |
256 | readl(hp->ioc_regs+HP_ZX1_IMASK); | 256 | readl(hp->ioc_regs+HP_ZX1_IMASK); |
257 | writel(hp->iova_base|1, hp->ioc_regs+HP_ZX1_IBASE); | 257 | writel(hp->iova_base|1, hp->ioc_regs+HP_ZX1_IBASE); |
258 | readl(hp->ioc_regs+HP_ZX1_IBASE); | 258 | readl(hp->ioc_regs+HP_ZX1_IBASE); |
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index 58d3738a2b7f..407708a001e4 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -534,7 +534,7 @@ static void shutdown(struct channel *ch) | |||
534 | 534 | ||
535 | unsigned long flags; | 535 | unsigned long flags; |
536 | struct tty_struct *tty; | 536 | struct tty_struct *tty; |
537 | struct board_chan *bc; | 537 | struct board_chan __iomem *bc; |
538 | 538 | ||
539 | if (!(ch->asyncflags & ASYNC_INITIALIZED)) | 539 | if (!(ch->asyncflags & ASYNC_INITIALIZED)) |
540 | return; | 540 | return; |
@@ -618,7 +618,7 @@ static int pc_write(struct tty_struct * tty, | |||
618 | struct channel *ch; | 618 | struct channel *ch; |
619 | unsigned long flags; | 619 | unsigned long flags; |
620 | int remain; | 620 | int remain; |
621 | struct board_chan *bc; | 621 | struct board_chan __iomem *bc; |
622 | 622 | ||
623 | /* ---------------------------------------------------------------- | 623 | /* ---------------------------------------------------------------- |
624 | pc_write is primarily called directly by the kernel routine | 624 | pc_write is primarily called directly by the kernel routine |
@@ -685,7 +685,7 @@ static int pc_write(struct tty_struct * tty, | |||
685 | ------------------------------------------------------------------- */ | 685 | ------------------------------------------------------------------- */ |
686 | 686 | ||
687 | dataLen = min(bytesAvailable, dataLen); | 687 | dataLen = min(bytesAvailable, dataLen); |
688 | memcpy(ch->txptr + head, buf, dataLen); | 688 | memcpy_toio(ch->txptr + head, buf, dataLen); |
689 | buf += dataLen; | 689 | buf += dataLen; |
690 | head += dataLen; | 690 | head += dataLen; |
691 | amountCopied += dataLen; | 691 | amountCopied += dataLen; |
@@ -726,7 +726,7 @@ static int pc_write_room(struct tty_struct *tty) | |||
726 | struct channel *ch; | 726 | struct channel *ch; |
727 | unsigned long flags; | 727 | unsigned long flags; |
728 | unsigned int head, tail; | 728 | unsigned int head, tail; |
729 | struct board_chan *bc; | 729 | struct board_chan __iomem *bc; |
730 | 730 | ||
731 | remain = 0; | 731 | remain = 0; |
732 | 732 | ||
@@ -773,7 +773,7 @@ static int pc_chars_in_buffer(struct tty_struct *tty) | |||
773 | int remain; | 773 | int remain; |
774 | unsigned long flags; | 774 | unsigned long flags; |
775 | struct channel *ch; | 775 | struct channel *ch; |
776 | struct board_chan *bc; | 776 | struct board_chan __iomem *bc; |
777 | 777 | ||
778 | /* --------------------------------------------------------- | 778 | /* --------------------------------------------------------- |
779 | verifyChannel returns the channel from the tty struct | 779 | verifyChannel returns the channel from the tty struct |
@@ -830,7 +830,7 @@ static void pc_flush_buffer(struct tty_struct *tty) | |||
830 | unsigned int tail; | 830 | unsigned int tail; |
831 | unsigned long flags; | 831 | unsigned long flags; |
832 | struct channel *ch; | 832 | struct channel *ch; |
833 | struct board_chan *bc; | 833 | struct board_chan __iomem *bc; |
834 | /* --------------------------------------------------------- | 834 | /* --------------------------------------------------------- |
835 | verifyChannel returns the channel from the tty struct | 835 | verifyChannel returns the channel from the tty struct |
836 | if it is valid. This serves as a sanity check. | 836 | if it is valid. This serves as a sanity check. |
@@ -976,7 +976,7 @@ static int pc_open(struct tty_struct *tty, struct file * filp) | |||
976 | struct channel *ch; | 976 | struct channel *ch; |
977 | unsigned long flags; | 977 | unsigned long flags; |
978 | int line, retval, boardnum; | 978 | int line, retval, boardnum; |
979 | struct board_chan *bc; | 979 | struct board_chan __iomem *bc; |
980 | unsigned int head; | 980 | unsigned int head; |
981 | 981 | ||
982 | line = tty->index; | 982 | line = tty->index; |
@@ -1041,7 +1041,7 @@ static int pc_open(struct tty_struct *tty, struct file * filp) | |||
1041 | ch->statusflags = 0; | 1041 | ch->statusflags = 0; |
1042 | 1042 | ||
1043 | /* Save boards current modem status */ | 1043 | /* Save boards current modem status */ |
1044 | ch->imodem = bc->mstat; | 1044 | ch->imodem = readb(&bc->mstat); |
1045 | 1045 | ||
1046 | /* ---------------------------------------------------------------- | 1046 | /* ---------------------------------------------------------------- |
1047 | Set receive head and tail ptrs to each other. This indicates | 1047 | Set receive head and tail ptrs to each other. This indicates |
@@ -1399,10 +1399,10 @@ static void post_fep_init(unsigned int crd) | |||
1399 | { /* Begin post_fep_init */ | 1399 | { /* Begin post_fep_init */ |
1400 | 1400 | ||
1401 | int i; | 1401 | int i; |
1402 | unsigned char *memaddr; | 1402 | void __iomem *memaddr; |
1403 | struct global_data *gd; | 1403 | struct global_data __iomem *gd; |
1404 | struct board_info *bd; | 1404 | struct board_info *bd; |
1405 | struct board_chan *bc; | 1405 | struct board_chan __iomem *bc; |
1406 | struct channel *ch; | 1406 | struct channel *ch; |
1407 | int shrinkmem = 0, lowwater ; | 1407 | int shrinkmem = 0, lowwater ; |
1408 | 1408 | ||
@@ -1461,7 +1461,7 @@ static void post_fep_init(unsigned int crd) | |||
1461 | 8 and 64 of these structures. | 1461 | 8 and 64 of these structures. |
1462 | -------------------------------------------------------------------- */ | 1462 | -------------------------------------------------------------------- */ |
1463 | 1463 | ||
1464 | bc = (struct board_chan *)(memaddr + CHANSTRUCT); | 1464 | bc = memaddr + CHANSTRUCT; |
1465 | 1465 | ||
1466 | /* ------------------------------------------------------------------- | 1466 | /* ------------------------------------------------------------------- |
1467 | The below assignment will set gd to point at the BEGINING of | 1467 | The below assignment will set gd to point at the BEGINING of |
@@ -1470,7 +1470,7 @@ static void post_fep_init(unsigned int crd) | |||
1470 | pointer begins at 0xd10. | 1470 | pointer begins at 0xd10. |
1471 | ---------------------------------------------------------------------- */ | 1471 | ---------------------------------------------------------------------- */ |
1472 | 1472 | ||
1473 | gd = (struct global_data *)(memaddr + GLOBAL); | 1473 | gd = memaddr + GLOBAL; |
1474 | 1474 | ||
1475 | /* -------------------------------------------------------------------- | 1475 | /* -------------------------------------------------------------------- |
1476 | XEPORTS (address 0xc22) points at the number of channels the | 1476 | XEPORTS (address 0xc22) points at the number of channels the |
@@ -1493,6 +1493,7 @@ static void post_fep_init(unsigned int crd) | |||
1493 | 1493 | ||
1494 | for (i = 0; i < bd->numports; i++, ch++, bc++) { /* Begin for each port */ | 1494 | for (i = 0; i < bd->numports; i++, ch++, bc++) { /* Begin for each port */ |
1495 | unsigned long flags; | 1495 | unsigned long flags; |
1496 | u16 tseg, rseg; | ||
1496 | 1497 | ||
1497 | ch->brdchan = bc; | 1498 | ch->brdchan = bc; |
1498 | ch->mailbox = gd; | 1499 | ch->mailbox = gd; |
@@ -1553,50 +1554,53 @@ static void post_fep_init(unsigned int crd) | |||
1553 | shrinkmem = 0; | 1554 | shrinkmem = 0; |
1554 | } | 1555 | } |
1555 | 1556 | ||
1557 | tseg = readw(&bc->tseg); | ||
1558 | rseg = readw(&bc->rseg); | ||
1559 | |||
1556 | switch (bd->type) { | 1560 | switch (bd->type) { |
1557 | 1561 | ||
1558 | case PCIXEM: | 1562 | case PCIXEM: |
1559 | case PCIXRJ: | 1563 | case PCIXRJ: |
1560 | case PCIXR: | 1564 | case PCIXR: |
1561 | /* Cover all the 2MEG cards */ | 1565 | /* Cover all the 2MEG cards */ |
1562 | ch->txptr = memaddr + (((bc->tseg) << 4) & 0x1fffff); | 1566 | ch->txptr = memaddr + ((tseg << 4) & 0x1fffff); |
1563 | ch->rxptr = memaddr + (((bc->rseg) << 4) & 0x1fffff); | 1567 | ch->rxptr = memaddr + ((rseg << 4) & 0x1fffff); |
1564 | ch->txwin = FEPWIN | ((bc->tseg) >> 11); | 1568 | ch->txwin = FEPWIN | (tseg >> 11); |
1565 | ch->rxwin = FEPWIN | ((bc->rseg) >> 11); | 1569 | ch->rxwin = FEPWIN | (rseg >> 11); |
1566 | break; | 1570 | break; |
1567 | 1571 | ||
1568 | case PCXEM: | 1572 | case PCXEM: |
1569 | case EISAXEM: | 1573 | case EISAXEM: |
1570 | /* Cover all the 32K windowed cards */ | 1574 | /* Cover all the 32K windowed cards */ |
1571 | /* Mask equal to window size - 1 */ | 1575 | /* Mask equal to window size - 1 */ |
1572 | ch->txptr = memaddr + (((bc->tseg) << 4) & 0x7fff); | 1576 | ch->txptr = memaddr + ((tseg << 4) & 0x7fff); |
1573 | ch->rxptr = memaddr + (((bc->rseg) << 4) & 0x7fff); | 1577 | ch->rxptr = memaddr + ((rseg << 4) & 0x7fff); |
1574 | ch->txwin = FEPWIN | ((bc->tseg) >> 11); | 1578 | ch->txwin = FEPWIN | (tseg >> 11); |
1575 | ch->rxwin = FEPWIN | ((bc->rseg) >> 11); | 1579 | ch->rxwin = FEPWIN | (rseg >> 11); |
1576 | break; | 1580 | break; |
1577 | 1581 | ||
1578 | case PCXEVE: | 1582 | case PCXEVE: |
1579 | case PCXE: | 1583 | case PCXE: |
1580 | ch->txptr = memaddr + (((bc->tseg - bd->memory_seg) << 4) & 0x1fff); | 1584 | ch->txptr = memaddr + (((tseg - bd->memory_seg) << 4) & 0x1fff); |
1581 | ch->txwin = FEPWIN | ((bc->tseg - bd->memory_seg) >> 9); | 1585 | ch->txwin = FEPWIN | ((tseg - bd->memory_seg) >> 9); |
1582 | ch->rxptr = memaddr + (((bc->rseg - bd->memory_seg) << 4) & 0x1fff); | 1586 | ch->rxptr = memaddr + (((rseg - bd->memory_seg) << 4) & 0x1fff); |
1583 | ch->rxwin = FEPWIN | ((bc->rseg - bd->memory_seg) >>9 ); | 1587 | ch->rxwin = FEPWIN | ((rseg - bd->memory_seg) >>9 ); |
1584 | break; | 1588 | break; |
1585 | 1589 | ||
1586 | case PCXI: | 1590 | case PCXI: |
1587 | case PC64XE: | 1591 | case PC64XE: |
1588 | ch->txptr = memaddr + ((bc->tseg - bd->memory_seg) << 4); | 1592 | ch->txptr = memaddr + ((tseg - bd->memory_seg) << 4); |
1589 | ch->rxptr = memaddr + ((bc->rseg - bd->memory_seg) << 4); | 1593 | ch->rxptr = memaddr + ((rseg - bd->memory_seg) << 4); |
1590 | ch->txwin = ch->rxwin = 0; | 1594 | ch->txwin = ch->rxwin = 0; |
1591 | break; | 1595 | break; |
1592 | 1596 | ||
1593 | } /* End switch bd->type */ | 1597 | } /* End switch bd->type */ |
1594 | 1598 | ||
1595 | ch->txbufhead = 0; | 1599 | ch->txbufhead = 0; |
1596 | ch->txbufsize = bc->tmax + 1; | 1600 | ch->txbufsize = readw(&bc->tmax) + 1; |
1597 | 1601 | ||
1598 | ch->rxbufhead = 0; | 1602 | ch->rxbufhead = 0; |
1599 | ch->rxbufsize = bc->rmax + 1; | 1603 | ch->rxbufsize = readw(&bc->rmax) + 1; |
1600 | 1604 | ||
1601 | lowwater = ch->txbufsize >= 2000 ? 1024 : (ch->txbufsize / 2); | 1605 | lowwater = ch->txbufsize >= 2000 ? 1024 : (ch->txbufsize / 2); |
1602 | 1606 | ||
@@ -1718,11 +1722,11 @@ static void epcapoll(unsigned long ignored) | |||
1718 | static void doevent(int crd) | 1722 | static void doevent(int crd) |
1719 | { /* Begin doevent */ | 1723 | { /* Begin doevent */ |
1720 | 1724 | ||
1721 | void *eventbuf; | 1725 | void __iomem *eventbuf; |
1722 | struct channel *ch, *chan0; | 1726 | struct channel *ch, *chan0; |
1723 | static struct tty_struct *tty; | 1727 | static struct tty_struct *tty; |
1724 | struct board_info *bd; | 1728 | struct board_info *bd; |
1725 | struct board_chan *bc; | 1729 | struct board_chan __iomem *bc; |
1726 | unsigned int tail, head; | 1730 | unsigned int tail, head; |
1727 | int event, channel; | 1731 | int event, channel; |
1728 | int mstat, lstat; | 1732 | int mstat, lstat; |
@@ -1817,7 +1821,7 @@ static void doevent(int crd) | |||
1817 | static void fepcmd(struct channel *ch, int cmd, int word_or_byte, | 1821 | static void fepcmd(struct channel *ch, int cmd, int word_or_byte, |
1818 | int byte2, int ncmds, int bytecmd) | 1822 | int byte2, int ncmds, int bytecmd) |
1819 | { /* Begin fepcmd */ | 1823 | { /* Begin fepcmd */ |
1820 | unchar *memaddr; | 1824 | unchar __iomem *memaddr; |
1821 | unsigned int head, cmdTail, cmdStart, cmdMax; | 1825 | unsigned int head, cmdTail, cmdStart, cmdMax; |
1822 | long count; | 1826 | long count; |
1823 | int n; | 1827 | int n; |
@@ -2000,7 +2004,7 @@ static void epcaparam(struct tty_struct *tty, struct channel *ch) | |||
2000 | 2004 | ||
2001 | unsigned int cmdHead; | 2005 | unsigned int cmdHead; |
2002 | struct termios *ts; | 2006 | struct termios *ts; |
2003 | struct board_chan *bc; | 2007 | struct board_chan __iomem *bc; |
2004 | unsigned mval, hflow, cflag, iflag; | 2008 | unsigned mval, hflow, cflag, iflag; |
2005 | 2009 | ||
2006 | bc = ch->brdchan; | 2010 | bc = ch->brdchan; |
@@ -2010,7 +2014,7 @@ static void epcaparam(struct tty_struct *tty, struct channel *ch) | |||
2010 | ts = tty->termios; | 2014 | ts = tty->termios; |
2011 | if ((ts->c_cflag & CBAUD) == 0) { /* Begin CBAUD detected */ | 2015 | if ((ts->c_cflag & CBAUD) == 0) { /* Begin CBAUD detected */ |
2012 | cmdHead = readw(&bc->rin); | 2016 | cmdHead = readw(&bc->rin); |
2013 | bc->rout = cmdHead; | 2017 | writew(cmdHead, &bc->rout); |
2014 | cmdHead = readw(&bc->tin); | 2018 | cmdHead = readw(&bc->tin); |
2015 | /* Changing baud in mid-stream transmission can be wonderful */ | 2019 | /* Changing baud in mid-stream transmission can be wonderful */ |
2016 | /* --------------------------------------------------------------- | 2020 | /* --------------------------------------------------------------- |
@@ -2116,7 +2120,7 @@ static void receive_data(struct channel *ch) | |||
2116 | unchar *rptr; | 2120 | unchar *rptr; |
2117 | struct termios *ts = NULL; | 2121 | struct termios *ts = NULL; |
2118 | struct tty_struct *tty; | 2122 | struct tty_struct *tty; |
2119 | struct board_chan *bc; | 2123 | struct board_chan __iomem *bc; |
2120 | int dataToRead, wrapgap, bytesAvailable; | 2124 | int dataToRead, wrapgap, bytesAvailable; |
2121 | unsigned int tail, head; | 2125 | unsigned int tail, head; |
2122 | unsigned int wrapmask; | 2126 | unsigned int wrapmask; |
@@ -2154,7 +2158,7 @@ static void receive_data(struct channel *ch) | |||
2154 | --------------------------------------------------------------------- */ | 2158 | --------------------------------------------------------------------- */ |
2155 | 2159 | ||
2156 | if (!tty || !ts || !(ts->c_cflag & CREAD)) { | 2160 | if (!tty || !ts || !(ts->c_cflag & CREAD)) { |
2157 | bc->rout = head; | 2161 | writew(head, &bc->rout); |
2158 | return; | 2162 | return; |
2159 | } | 2163 | } |
2160 | 2164 | ||
@@ -2270,7 +2274,7 @@ static int info_ioctl(struct tty_struct *tty, struct file * file, | |||
2270 | static int pc_tiocmget(struct tty_struct *tty, struct file *file) | 2274 | static int pc_tiocmget(struct tty_struct *tty, struct file *file) |
2271 | { | 2275 | { |
2272 | struct channel *ch = (struct channel *) tty->driver_data; | 2276 | struct channel *ch = (struct channel *) tty->driver_data; |
2273 | struct board_chan *bc; | 2277 | struct board_chan __iomem *bc; |
2274 | unsigned int mstat, mflag = 0; | 2278 | unsigned int mstat, mflag = 0; |
2275 | unsigned long flags; | 2279 | unsigned long flags; |
2276 | 2280 | ||
@@ -2351,7 +2355,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file, | |||
2351 | unsigned long flags; | 2355 | unsigned long flags; |
2352 | unsigned int mflag, mstat; | 2356 | unsigned int mflag, mstat; |
2353 | unsigned char startc, stopc; | 2357 | unsigned char startc, stopc; |
2354 | struct board_chan *bc; | 2358 | struct board_chan __iomem *bc; |
2355 | struct channel *ch = (struct channel *) tty->driver_data; | 2359 | struct channel *ch = (struct channel *) tty->driver_data; |
2356 | void __user *argp = (void __user *)arg; | 2360 | void __user *argp = (void __user *)arg; |
2357 | 2361 | ||
@@ -2633,7 +2637,7 @@ static void pc_start(struct tty_struct *tty) | |||
2633 | spin_lock_irqsave(&epca_lock, flags); | 2637 | spin_lock_irqsave(&epca_lock, flags); |
2634 | /* Just in case output was resumed because of a change in Digi-flow */ | 2638 | /* Just in case output was resumed because of a change in Digi-flow */ |
2635 | if (ch->statusflags & TXSTOPPED) { /* Begin transmit resume requested */ | 2639 | if (ch->statusflags & TXSTOPPED) { /* Begin transmit resume requested */ |
2636 | struct board_chan *bc; | 2640 | struct board_chan __iomem *bc; |
2637 | globalwinon(ch); | 2641 | globalwinon(ch); |
2638 | bc = ch->brdchan; | 2642 | bc = ch->brdchan; |
2639 | if (ch->statusflags & LOWWAIT) | 2643 | if (ch->statusflags & LOWWAIT) |
@@ -2727,7 +2731,7 @@ void digi_send_break(struct channel *ch, int msec) | |||
2727 | static void setup_empty_event(struct tty_struct *tty, struct channel *ch) | 2731 | static void setup_empty_event(struct tty_struct *tty, struct channel *ch) |
2728 | { /* Begin setup_empty_event */ | 2732 | { /* Begin setup_empty_event */ |
2729 | 2733 | ||
2730 | struct board_chan *bc = ch->brdchan; | 2734 | struct board_chan __iomem *bc = ch->brdchan; |
2731 | 2735 | ||
2732 | globalwinon(ch); | 2736 | globalwinon(ch); |
2733 | ch->statusflags |= EMPTYWAIT; | 2737 | ch->statusflags |= EMPTYWAIT; |
diff --git a/drivers/char/epca.h b/drivers/char/epca.h index 20eeb5a70e1a..456d6c8f94a8 100644 --- a/drivers/char/epca.h +++ b/drivers/char/epca.h | |||
@@ -128,17 +128,17 @@ struct channel | |||
128 | unsigned long c_cflag; | 128 | unsigned long c_cflag; |
129 | unsigned long c_lflag; | 129 | unsigned long c_lflag; |
130 | unsigned long c_oflag; | 130 | unsigned long c_oflag; |
131 | unsigned char *txptr; | 131 | unsigned char __iomem *txptr; |
132 | unsigned char *rxptr; | 132 | unsigned char __iomem *rxptr; |
133 | unsigned char *tmp_buf; | 133 | unsigned char *tmp_buf; |
134 | struct board_info *board; | 134 | struct board_info *board; |
135 | struct board_chan *brdchan; | 135 | struct board_chan __iomem *brdchan; |
136 | struct digi_struct digiext; | 136 | struct digi_struct digiext; |
137 | struct tty_struct *tty; | 137 | struct tty_struct *tty; |
138 | wait_queue_head_t open_wait; | 138 | wait_queue_head_t open_wait; |
139 | wait_queue_head_t close_wait; | 139 | wait_queue_head_t close_wait; |
140 | struct work_struct tqueue; | 140 | struct work_struct tqueue; |
141 | struct global_data *mailbox; | 141 | struct global_data __iomem *mailbox; |
142 | }; | 142 | }; |
143 | 143 | ||
144 | struct board_info | 144 | struct board_info |
@@ -149,8 +149,8 @@ struct board_info | |||
149 | unsigned short numports; | 149 | unsigned short numports; |
150 | unsigned long port; | 150 | unsigned long port; |
151 | unsigned long membase; | 151 | unsigned long membase; |
152 | unsigned char __iomem *re_map_port; | 152 | void __iomem *re_map_port; |
153 | unsigned char *re_map_membase; | 153 | void __iomem *re_map_membase; |
154 | unsigned long memory_seg; | 154 | unsigned long memory_seg; |
155 | void ( * memwinon ) (struct board_info *, unsigned int) ; | 155 | void ( * memwinon ) (struct board_info *, unsigned int) ; |
156 | void ( * memwinoff ) (struct board_info *, unsigned int) ; | 156 | void ( * memwinoff ) (struct board_info *, unsigned int) ; |
diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c index 3b865f34a095..b66782398258 100644 --- a/drivers/firmware/dell_rbu.c +++ b/drivers/firmware/dell_rbu.c | |||
@@ -50,7 +50,7 @@ | |||
50 | MODULE_AUTHOR("Abhay Salunke <abhay_salunke@dell.com>"); | 50 | MODULE_AUTHOR("Abhay Salunke <abhay_salunke@dell.com>"); |
51 | MODULE_DESCRIPTION("Driver for updating BIOS image on DELL systems"); | 51 | MODULE_DESCRIPTION("Driver for updating BIOS image on DELL systems"); |
52 | MODULE_LICENSE("GPL"); | 52 | MODULE_LICENSE("GPL"); |
53 | MODULE_VERSION("1.0"); | 53 | MODULE_VERSION("2.0"); |
54 | 54 | ||
55 | #define BIOS_SCAN_LIMIT 0xffffffff | 55 | #define BIOS_SCAN_LIMIT 0xffffffff |
56 | #define MAX_IMAGE_LENGTH 16 | 56 | #define MAX_IMAGE_LENGTH 16 |
@@ -65,10 +65,11 @@ static struct _rbu_data { | |||
65 | unsigned long packet_write_count; | 65 | unsigned long packet_write_count; |
66 | unsigned long num_packets; | 66 | unsigned long num_packets; |
67 | unsigned long packetsize; | 67 | unsigned long packetsize; |
68 | int entry_created; | ||
68 | } rbu_data; | 69 | } rbu_data; |
69 | 70 | ||
70 | static char image_type[MAX_IMAGE_LENGTH] = "mono"; | 71 | static char image_type[MAX_IMAGE_LENGTH + 1] = "mono"; |
71 | module_param_string(image_type, image_type, sizeof(image_type), 0); | 72 | module_param_string(image_type, image_type, sizeof (image_type), 0); |
72 | MODULE_PARM_DESC(image_type, "BIOS image type. choose- mono or packet"); | 73 | MODULE_PARM_DESC(image_type, "BIOS image type. choose- mono or packet"); |
73 | 74 | ||
74 | struct packet_data { | 75 | struct packet_data { |
@@ -114,7 +115,7 @@ static int fill_last_packet(void *data, size_t length) | |||
114 | 115 | ||
115 | if ((rbu_data.packet_write_count + length) > rbu_data.packetsize) { | 116 | if ((rbu_data.packet_write_count + length) > rbu_data.packetsize) { |
116 | pr_debug("dell_rbu:%s: packet size data " | 117 | pr_debug("dell_rbu:%s: packet size data " |
117 | "overrun\n", __FUNCTION__); | 118 | "overrun\n", __FUNCTION__); |
118 | return -EINVAL; | 119 | return -EINVAL; |
119 | } | 120 | } |
120 | 121 | ||
@@ -146,12 +147,14 @@ static int create_packet(size_t length) | |||
146 | pr_debug("create_packet: packetsize not specified\n"); | 147 | pr_debug("create_packet: packetsize not specified\n"); |
147 | return -EINVAL; | 148 | return -EINVAL; |
148 | } | 149 | } |
150 | spin_unlock(&rbu_data.lock); | ||
151 | newpacket = kmalloc(sizeof (struct packet_data), GFP_KERNEL); | ||
152 | spin_lock(&rbu_data.lock); | ||
149 | 153 | ||
150 | newpacket = kmalloc(sizeof(struct packet_data), GFP_KERNEL); | ||
151 | if (!newpacket) { | 154 | if (!newpacket) { |
152 | printk(KERN_WARNING | 155 | printk(KERN_WARNING |
153 | "dell_rbu:%s: failed to allocate new " | 156 | "dell_rbu:%s: failed to allocate new " |
154 | "packet\n", __FUNCTION__); | 157 | "packet\n", __FUNCTION__); |
155 | return -ENOMEM; | 158 | return -ENOMEM; |
156 | } | 159 | } |
157 | 160 | ||
@@ -160,15 +163,17 @@ static int create_packet(size_t length) | |||
160 | * there is no upper limit on memory | 163 | * there is no upper limit on memory |
161 | * address for packetized mechanism | 164 | * address for packetized mechanism |
162 | */ | 165 | */ |
163 | newpacket->data = (unsigned char *)__get_free_pages(GFP_KERNEL, | 166 | spin_unlock(&rbu_data.lock); |
164 | ordernum); | 167 | newpacket->data = (unsigned char *) __get_free_pages(GFP_KERNEL, |
168 | ordernum); | ||
169 | spin_lock(&rbu_data.lock); | ||
165 | 170 | ||
166 | pr_debug("create_packet: newpacket %p\n", newpacket->data); | 171 | pr_debug("create_packet: newpacket %p\n", newpacket->data); |
167 | 172 | ||
168 | if (!newpacket->data) { | 173 | if (!newpacket->data) { |
169 | printk(KERN_WARNING | 174 | printk(KERN_WARNING |
170 | "dell_rbu:%s: failed to allocate new " | 175 | "dell_rbu:%s: failed to allocate new " |
171 | "packet\n", __FUNCTION__); | 176 | "packet\n", __FUNCTION__); |
172 | kfree(newpacket); | 177 | kfree(newpacket); |
173 | return -ENOMEM; | 178 | return -ENOMEM; |
174 | } | 179 | } |
@@ -204,9 +209,8 @@ static int packetize_data(void *data, size_t length) | |||
204 | return rc; | 209 | return rc; |
205 | } | 210 | } |
206 | 211 | ||
207 | static int | 212 | static int do_packet_read(char *data, struct list_head *ptemp_list, |
208 | do_packet_read(char *data, struct list_head *ptemp_list, | 213 | int length, int bytes_read, int *list_read_count) |
209 | int length, int bytes_read, int *list_read_count) | ||
210 | { | 214 | { |
211 | void *ptemp_buf; | 215 | void *ptemp_buf; |
212 | struct packet_data *newpacket = NULL; | 216 | struct packet_data *newpacket = NULL; |
@@ -239,7 +243,7 @@ do_packet_read(char *data, struct list_head *ptemp_list, | |||
239 | return bytes_copied; | 243 | return bytes_copied; |
240 | } | 244 | } |
241 | 245 | ||
242 | static int packet_read_list(char *data, size_t * pread_length) | 246 | static int packet_read_list(char *data, size_t *pread_length) |
243 | { | 247 | { |
244 | struct list_head *ptemp_list; | 248 | struct list_head *ptemp_list; |
245 | int temp_count = 0; | 249 | int temp_count = 0; |
@@ -258,8 +262,7 @@ static int packet_read_list(char *data, size_t * pread_length) | |||
258 | ptemp_list = (&packet_data_head.list)->next; | 262 | ptemp_list = (&packet_data_head.list)->next; |
259 | while (!list_empty(ptemp_list)) { | 263 | while (!list_empty(ptemp_list)) { |
260 | bytes_copied = do_packet_read(pdest, ptemp_list, | 264 | bytes_copied = do_packet_read(pdest, ptemp_list, |
261 | remaining_bytes, bytes_read, | 265 | remaining_bytes, bytes_read, &temp_count); |
262 | &temp_count); | ||
263 | remaining_bytes -= bytes_copied; | 266 | remaining_bytes -= bytes_copied; |
264 | bytes_read += bytes_copied; | 267 | bytes_read += bytes_copied; |
265 | pdest += bytes_copied; | 268 | pdest += bytes_copied; |
@@ -287,7 +290,7 @@ static void packet_empty_list(void) | |||
287 | ptemp_list = (&packet_data_head.list)->next; | 290 | ptemp_list = (&packet_data_head.list)->next; |
288 | while (!list_empty(ptemp_list)) { | 291 | while (!list_empty(ptemp_list)) { |
289 | newpacket = | 292 | newpacket = |
290 | list_entry(ptemp_list, struct packet_data, list); | 293 | list_entry(ptemp_list, struct packet_data, list); |
291 | pnext_list = ptemp_list->next; | 294 | pnext_list = ptemp_list->next; |
292 | list_del(ptemp_list); | 295 | list_del(ptemp_list); |
293 | ptemp_list = pnext_list; | 296 | ptemp_list = pnext_list; |
@@ -296,8 +299,8 @@ static void packet_empty_list(void) | |||
296 | * to make sure there are no stale RBU packets left in memory | 299 | * to make sure there are no stale RBU packets left in memory |
297 | */ | 300 | */ |
298 | memset(newpacket->data, 0, rbu_data.packetsize); | 301 | memset(newpacket->data, 0, rbu_data.packetsize); |
299 | free_pages((unsigned long)newpacket->data, | 302 | free_pages((unsigned long) newpacket->data, |
300 | newpacket->ordernum); | 303 | newpacket->ordernum); |
301 | kfree(newpacket); | 304 | kfree(newpacket); |
302 | } | 305 | } |
303 | rbu_data.packet_write_count = 0; | 306 | rbu_data.packet_write_count = 0; |
@@ -319,14 +322,13 @@ static void img_update_free(void) | |||
319 | * BIOS image copied in memory. | 322 | * BIOS image copied in memory. |
320 | */ | 323 | */ |
321 | memset(rbu_data.image_update_buffer, 0, | 324 | memset(rbu_data.image_update_buffer, 0, |
322 | rbu_data.image_update_buffer_size); | 325 | rbu_data.image_update_buffer_size); |
323 | if (rbu_data.dma_alloc == 1) | 326 | if (rbu_data.dma_alloc == 1) |
324 | dma_free_coherent(NULL, rbu_data.bios_image_size, | 327 | dma_free_coherent(NULL, rbu_data.bios_image_size, |
325 | rbu_data.image_update_buffer, | 328 | rbu_data.image_update_buffer, dell_rbu_dmaaddr); |
326 | dell_rbu_dmaaddr); | ||
327 | else | 329 | else |
328 | free_pages((unsigned long)rbu_data.image_update_buffer, | 330 | free_pages((unsigned long) rbu_data.image_update_buffer, |
329 | rbu_data.image_update_ordernum); | 331 | rbu_data.image_update_ordernum); |
330 | 332 | ||
331 | /* | 333 | /* |
332 | * Re-initialize the rbu_data variables after a free | 334 | * Re-initialize the rbu_data variables after a free |
@@ -366,7 +368,7 @@ static int img_update_realloc(unsigned long size) | |||
366 | */ | 368 | */ |
367 | if ((size != 0) && (rbu_data.image_update_buffer == NULL)) { | 369 | if ((size != 0) && (rbu_data.image_update_buffer == NULL)) { |
368 | printk(KERN_ERR "dell_rbu:%s: corruption " | 370 | printk(KERN_ERR "dell_rbu:%s: corruption " |
369 | "check failed\n", __FUNCTION__); | 371 | "check failed\n", __FUNCTION__); |
370 | return -EINVAL; | 372 | return -EINVAL; |
371 | } | 373 | } |
372 | /* | 374 | /* |
@@ -385,17 +387,16 @@ static int img_update_realloc(unsigned long size) | |||
385 | 387 | ||
386 | ordernum = get_order(size); | 388 | ordernum = get_order(size); |
387 | image_update_buffer = | 389 | image_update_buffer = |
388 | (unsigned char *)__get_free_pages(GFP_KERNEL, ordernum); | 390 | (unsigned char *) __get_free_pages(GFP_KERNEL, ordernum); |
389 | 391 | ||
390 | img_buf_phys_addr = | 392 | img_buf_phys_addr = |
391 | (unsigned long)virt_to_phys(image_update_buffer); | 393 | (unsigned long) virt_to_phys(image_update_buffer); |
392 | 394 | ||
393 | if (img_buf_phys_addr > BIOS_SCAN_LIMIT) { | 395 | if (img_buf_phys_addr > BIOS_SCAN_LIMIT) { |
394 | free_pages((unsigned long)image_update_buffer, ordernum); | 396 | free_pages((unsigned long) image_update_buffer, ordernum); |
395 | ordernum = -1; | 397 | ordernum = -1; |
396 | image_update_buffer = dma_alloc_coherent(NULL, size, | 398 | image_update_buffer = dma_alloc_coherent(NULL, size, |
397 | &dell_rbu_dmaaddr, | 399 | &dell_rbu_dmaaddr, GFP_KERNEL); |
398 | GFP_KERNEL); | ||
399 | dma_alloc = 1; | 400 | dma_alloc = 1; |
400 | } | 401 | } |
401 | 402 | ||
@@ -405,13 +406,13 @@ static int img_update_realloc(unsigned long size) | |||
405 | rbu_data.image_update_buffer = image_update_buffer; | 406 | rbu_data.image_update_buffer = image_update_buffer; |
406 | rbu_data.image_update_buffer_size = size; | 407 | rbu_data.image_update_buffer_size = size; |
407 | rbu_data.bios_image_size = | 408 | rbu_data.bios_image_size = |
408 | rbu_data.image_update_buffer_size; | 409 | rbu_data.image_update_buffer_size; |
409 | rbu_data.image_update_ordernum = ordernum; | 410 | rbu_data.image_update_ordernum = ordernum; |
410 | rbu_data.dma_alloc = dma_alloc; | 411 | rbu_data.dma_alloc = dma_alloc; |
411 | rc = 0; | 412 | rc = 0; |
412 | } else { | 413 | } else { |
413 | pr_debug("Not enough memory for image update:" | 414 | pr_debug("Not enough memory for image update:" |
414 | "size = %ld\n", size); | 415 | "size = %ld\n", size); |
415 | rc = -ENOMEM; | 416 | rc = -ENOMEM; |
416 | } | 417 | } |
417 | 418 | ||
@@ -438,7 +439,7 @@ static ssize_t read_packet_data(char *buffer, loff_t pos, size_t count) | |||
438 | if (pos > imagesize) { | 439 | if (pos > imagesize) { |
439 | retval = 0; | 440 | retval = 0; |
440 | printk(KERN_WARNING "dell_rbu:read_packet_data: " | 441 | printk(KERN_WARNING "dell_rbu:read_packet_data: " |
441 | "data underrun\n"); | 442 | "data underrun\n"); |
442 | goto read_rbu_data_exit; | 443 | goto read_rbu_data_exit; |
443 | } | 444 | } |
444 | 445 | ||
@@ -468,11 +469,11 @@ static ssize_t read_rbu_mono_data(char *buffer, loff_t pos, size_t count) | |||
468 | 469 | ||
469 | /* check to see if we have something to return */ | 470 | /* check to see if we have something to return */ |
470 | if ((rbu_data.image_update_buffer == NULL) || | 471 | if ((rbu_data.image_update_buffer == NULL) || |
471 | (rbu_data.bios_image_size == 0)) { | 472 | (rbu_data.bios_image_size == 0)) { |
472 | pr_debug("read_rbu_data_mono: image_update_buffer %p ," | 473 | pr_debug("read_rbu_data_mono: image_update_buffer %p ," |
473 | "bios_image_size %lu\n", | 474 | "bios_image_size %lu\n", |
474 | rbu_data.image_update_buffer, | 475 | rbu_data.image_update_buffer, |
475 | rbu_data.bios_image_size); | 476 | rbu_data.bios_image_size); |
476 | ret_count = -ENOMEM; | 477 | ret_count = -ENOMEM; |
477 | goto read_rbu_data_exit; | 478 | goto read_rbu_data_exit; |
478 | } | 479 | } |
@@ -497,8 +498,8 @@ static ssize_t read_rbu_mono_data(char *buffer, loff_t pos, size_t count) | |||
497 | return ret_count; | 498 | return ret_count; |
498 | } | 499 | } |
499 | 500 | ||
500 | static ssize_t | 501 | static ssize_t read_rbu_data(struct kobject *kobj, char *buffer, |
501 | read_rbu_data(struct kobject *kobj, char *buffer, loff_t pos, size_t count) | 502 | loff_t pos, size_t count) |
502 | { | 503 | { |
503 | ssize_t ret_count = 0; | 504 | ssize_t ret_count = 0; |
504 | 505 | ||
@@ -515,62 +516,20 @@ read_rbu_data(struct kobject *kobj, char *buffer, loff_t pos, size_t count) | |||
515 | return ret_count; | 516 | return ret_count; |
516 | } | 517 | } |
517 | 518 | ||
518 | static ssize_t | ||
519 | read_rbu_image_type(struct kobject *kobj, char *buffer, loff_t pos, | ||
520 | size_t count) | ||
521 | { | ||
522 | int size = 0; | ||
523 | if (!pos) | ||
524 | size = sprintf(buffer, "%s\n", image_type); | ||
525 | return size; | ||
526 | } | ||
527 | |||
528 | static ssize_t | ||
529 | write_rbu_image_type(struct kobject *kobj, char *buffer, loff_t pos, | ||
530 | size_t count) | ||
531 | { | ||
532 | int rc = count; | ||
533 | spin_lock(&rbu_data.lock); | ||
534 | |||
535 | if (strlen(buffer) < MAX_IMAGE_LENGTH) | ||
536 | sscanf(buffer, "%s", image_type); | ||
537 | else | ||
538 | printk(KERN_WARNING "dell_rbu: image_type is invalid" | ||
539 | "max chars = %d, \n incoming str--%s-- \n", | ||
540 | MAX_IMAGE_LENGTH, buffer); | ||
541 | |||
542 | /* we must free all previous allocations */ | ||
543 | packet_empty_list(); | ||
544 | img_update_free(); | ||
545 | |||
546 | spin_unlock(&rbu_data.lock); | ||
547 | return rc; | ||
548 | |||
549 | } | ||
550 | |||
551 | static struct bin_attribute rbu_data_attr = { | ||
552 | .attr = {.name = "data",.owner = THIS_MODULE,.mode = 0444}, | ||
553 | .read = read_rbu_data, | ||
554 | }; | ||
555 | |||
556 | static struct bin_attribute rbu_image_type_attr = { | ||
557 | .attr = {.name = "image_type",.owner = THIS_MODULE,.mode = 0644}, | ||
558 | .read = read_rbu_image_type, | ||
559 | .write = write_rbu_image_type, | ||
560 | }; | ||
561 | |||
562 | static void callbackfn_rbu(const struct firmware *fw, void *context) | 519 | static void callbackfn_rbu(const struct firmware *fw, void *context) |
563 | { | 520 | { |
564 | int rc = 0; | 521 | int rc = 0; |
565 | 522 | ||
566 | if (!fw || !fw->size) | 523 | if (!fw || !fw->size) { |
524 | rbu_data.entry_created = 0; | ||
567 | return; | 525 | return; |
526 | } | ||
568 | 527 | ||
569 | spin_lock(&rbu_data.lock); | 528 | spin_lock(&rbu_data.lock); |
570 | if (!strcmp(image_type, "mono")) { | 529 | if (!strcmp(image_type, "mono")) { |
571 | if (!img_update_realloc(fw->size)) | 530 | if (!img_update_realloc(fw->size)) |
572 | memcpy(rbu_data.image_update_buffer, | 531 | memcpy(rbu_data.image_update_buffer, |
573 | fw->data, fw->size); | 532 | fw->data, fw->size); |
574 | } else if (!strcmp(image_type, "packet")) { | 533 | } else if (!strcmp(image_type, "packet")) { |
575 | if (!rbu_data.packetsize) | 534 | if (!rbu_data.packetsize) |
576 | rbu_data.packetsize = fw->size; | 535 | rbu_data.packetsize = fw->size; |
@@ -584,14 +543,103 @@ static void callbackfn_rbu(const struct firmware *fw, void *context) | |||
584 | spin_unlock(&rbu_data.lock); | 543 | spin_unlock(&rbu_data.lock); |
585 | 544 | ||
586 | rc = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG, | 545 | rc = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG, |
587 | "dell_rbu", &rbu_device->dev, | 546 | "dell_rbu", &rbu_device->dev, &context, callbackfn_rbu); |
588 | &context, callbackfn_rbu); | ||
589 | if (rc) | 547 | if (rc) |
590 | printk(KERN_ERR | 548 | printk(KERN_ERR |
591 | "dell_rbu:%s request_firmware_nowait failed" | 549 | "dell_rbu:%s request_firmware_nowait failed" |
592 | " %d\n", __FUNCTION__, rc); | 550 | " %d\n", __FUNCTION__, rc); |
551 | else | ||
552 | rbu_data.entry_created = 1; | ||
553 | } | ||
554 | |||
555 | static ssize_t read_rbu_image_type(struct kobject *kobj, char *buffer, | ||
556 | loff_t pos, size_t count) | ||
557 | { | ||
558 | int size = 0; | ||
559 | if (!pos) | ||
560 | size = sprintf(buffer, "%s\n", image_type); | ||
561 | return size; | ||
562 | } | ||
563 | |||
564 | static ssize_t write_rbu_image_type(struct kobject *kobj, char *buffer, | ||
565 | loff_t pos, size_t count) | ||
566 | { | ||
567 | int rc = count; | ||
568 | int req_firm_rc = 0; | ||
569 | int i; | ||
570 | spin_lock(&rbu_data.lock); | ||
571 | /* | ||
572 | * Find the first newline or space | ||
573 | */ | ||
574 | for (i = 0; i < count; ++i) | ||
575 | if (buffer[i] == '\n' || buffer[i] == ' ') { | ||
576 | buffer[i] = '\0'; | ||
577 | break; | ||
578 | } | ||
579 | if (i == count) | ||
580 | buffer[count] = '\0'; | ||
581 | |||
582 | if (strstr(buffer, "mono")) | ||
583 | strcpy(image_type, "mono"); | ||
584 | else if (strstr(buffer, "packet")) | ||
585 | strcpy(image_type, "packet"); | ||
586 | else if (strstr(buffer, "init")) { | ||
587 | /* | ||
588 | * If due to the user error the driver gets in a bad | ||
589 | * state where even though it is loaded , the | ||
590 | * /sys/class/firmware/dell_rbu entries are missing. | ||
591 | * to cover this situation the user can recreate entries | ||
592 | * by writing init to image_type. | ||
593 | */ | ||
594 | if (!rbu_data.entry_created) { | ||
595 | spin_unlock(&rbu_data.lock); | ||
596 | req_firm_rc = request_firmware_nowait(THIS_MODULE, | ||
597 | FW_ACTION_NOHOTPLUG, "dell_rbu", | ||
598 | &rbu_device->dev, &context, | ||
599 | callbackfn_rbu); | ||
600 | if (req_firm_rc) { | ||
601 | printk(KERN_ERR | ||
602 | "dell_rbu:%s request_firmware_nowait" | ||
603 | " failed %d\n", __FUNCTION__, rc); | ||
604 | rc = -EIO; | ||
605 | } else | ||
606 | rbu_data.entry_created = 1; | ||
607 | |||
608 | spin_lock(&rbu_data.lock); | ||
609 | } | ||
610 | } else { | ||
611 | printk(KERN_WARNING "dell_rbu: image_type is invalid\n"); | ||
612 | spin_unlock(&rbu_data.lock); | ||
613 | return -EINVAL; | ||
614 | } | ||
615 | |||
616 | /* we must free all previous allocations */ | ||
617 | packet_empty_list(); | ||
618 | img_update_free(); | ||
619 | spin_unlock(&rbu_data.lock); | ||
620 | |||
621 | return rc; | ||
593 | } | 622 | } |
594 | 623 | ||
624 | static struct bin_attribute rbu_data_attr = { | ||
625 | .attr = { | ||
626 | .name = "data", | ||
627 | .owner = THIS_MODULE, | ||
628 | .mode = 0444, | ||
629 | }, | ||
630 | .read = read_rbu_data, | ||
631 | }; | ||
632 | |||
633 | static struct bin_attribute rbu_image_type_attr = { | ||
634 | .attr = { | ||
635 | .name = "image_type", | ||
636 | .owner = THIS_MODULE, | ||
637 | .mode = 0644, | ||
638 | }, | ||
639 | .read = read_rbu_image_type, | ||
640 | .write = write_rbu_image_type, | ||
641 | }; | ||
642 | |||
595 | static int __init dcdrbu_init(void) | 643 | static int __init dcdrbu_init(void) |
596 | { | 644 | { |
597 | int rc = 0; | 645 | int rc = 0; |
@@ -599,11 +647,11 @@ static int __init dcdrbu_init(void) | |||
599 | 647 | ||
600 | init_packet_head(); | 648 | init_packet_head(); |
601 | rbu_device = | 649 | rbu_device = |
602 | platform_device_register_simple("dell_rbu", -1, NULL, 0); | 650 | platform_device_register_simple("dell_rbu", -1, NULL, 0); |
603 | if (!rbu_device) { | 651 | if (!rbu_device) { |
604 | printk(KERN_ERR | 652 | printk(KERN_ERR |
605 | "dell_rbu:%s:platform_device_register_simple " | 653 | "dell_rbu:%s:platform_device_register_simple " |
606 | "failed\n", __FUNCTION__); | 654 | "failed\n", __FUNCTION__); |
607 | return -EIO; | 655 | return -EIO; |
608 | } | 656 | } |
609 | 657 | ||
@@ -611,11 +659,12 @@ static int __init dcdrbu_init(void) | |||
611 | sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr); | 659 | sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr); |
612 | 660 | ||
613 | rc = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG, | 661 | rc = request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG, |
614 | "dell_rbu", &rbu_device->dev, | 662 | "dell_rbu", &rbu_device->dev, &context, callbackfn_rbu); |
615 | &context, callbackfn_rbu); | ||
616 | if (rc) | 663 | if (rc) |
617 | printk(KERN_ERR "dell_rbu:%s:request_firmware_nowait" | 664 | printk(KERN_ERR "dell_rbu:%s:request_firmware_nowait" |
618 | " failed %d\n", __FUNCTION__, rc); | 665 | " failed %d\n", __FUNCTION__, rc); |
666 | else | ||
667 | rbu_data.entry_created = 1; | ||
619 | 668 | ||
620 | return rc; | 669 | return rc; |
621 | 670 | ||
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index eaebfc14c933..4c56411f3993 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c | |||
@@ -5,10 +5,10 @@ | |||
5 | * Copyright (C) 2005 Jesper Juhl <jesper.juhl@gmail.com> | 5 | * Copyright (C) 2005 Jesper Juhl <jesper.juhl@gmail.com> |
6 | * | 6 | * |
7 | * The HardDisk Active Protection System (hdaps) is present in the IBM ThinkPad | 7 | * The HardDisk Active Protection System (hdaps) is present in the IBM ThinkPad |
8 | * T41, T42, T43, R51, and X40, at least. It provides a basic two-axis | 8 | * T41, T42, T43, R50, R50p, R51, and X40, at least. It provides a basic |
9 | * accelerometer and other data, such as the device's temperature. | 9 | * two-axis accelerometer and other data, such as the device's temperature. |
10 | * | 10 | * |
11 | * Based on the document by Mark A. Smith available at | 11 | * This driver is based on the document by Mark A. Smith available at |
12 | * http://www.almaden.ibm.com/cs/people/marksmith/tpaps.html and a lot of trial | 12 | * http://www.almaden.ibm.com/cs/people/marksmith/tpaps.html and a lot of trial |
13 | * and error. | 13 | * and error. |
14 | * | 14 | * |
@@ -36,12 +36,7 @@ | |||
36 | #include <asm/io.h> | 36 | #include <asm/io.h> |
37 | 37 | ||
38 | #define HDAPS_LOW_PORT 0x1600 /* first port used by hdaps */ | 38 | #define HDAPS_LOW_PORT 0x1600 /* first port used by hdaps */ |
39 | #define HDAPS_NR_PORTS 0x30 /* 0x1600 - 0x162f */ | 39 | #define HDAPS_NR_PORTS 0x30 /* number of ports: 0x1600 - 0x162f */ |
40 | |||
41 | #define STATE_FRESH 0x50 /* accelerometer data is fresh */ | ||
42 | |||
43 | #define REFRESH_ASYNC 0x00 /* do asynchronous refresh */ | ||
44 | #define REFRESH_SYNC 0x01 /* do synchronous refresh */ | ||
45 | 40 | ||
46 | #define HDAPS_PORT_STATE 0x1611 /* device state */ | 41 | #define HDAPS_PORT_STATE 0x1611 /* device state */ |
47 | #define HDAPS_PORT_YPOS 0x1612 /* y-axis position */ | 42 | #define HDAPS_PORT_YPOS 0x1612 /* y-axis position */ |
@@ -53,7 +48,7 @@ | |||
53 | #define HDAPS_PORT_UNKNOWN 0x161c /* what is this? */ | 48 | #define HDAPS_PORT_UNKNOWN 0x161c /* what is this? */ |
54 | #define HDAPS_PORT_KMACT 0x161d /* keyboard or mouse activity */ | 49 | #define HDAPS_PORT_KMACT 0x161d /* keyboard or mouse activity */ |
55 | 50 | ||
56 | #define HDAPS_READ_MASK 0xff /* some reads have the low 8 bits set */ | 51 | #define STATE_FRESH 0x50 /* accelerometer data is fresh */ |
57 | 52 | ||
58 | #define KEYBD_MASK 0x20 /* set if keyboard activity */ | 53 | #define KEYBD_MASK 0x20 /* set if keyboard activity */ |
59 | #define MOUSE_MASK 0x40 /* set if mouse activity */ | 54 | #define MOUSE_MASK 0x40 /* set if mouse activity */ |
@@ -63,12 +58,11 @@ | |||
63 | #define INIT_TIMEOUT_MSECS 4000 /* wait up to 4s for device init ... */ | 58 | #define INIT_TIMEOUT_MSECS 4000 /* wait up to 4s for device init ... */ |
64 | #define INIT_WAIT_MSECS 200 /* ... in 200ms increments */ | 59 | #define INIT_WAIT_MSECS 200 /* ... in 200ms increments */ |
65 | 60 | ||
66 | static struct platform_device *pdev; | 61 | #define HDAPS_POLL_PERIOD (HZ/20) /* poll for input every 1/20s */ |
67 | static struct input_dev hdaps_idev; | 62 | #define HDAPS_INPUT_FUZZ 4 /* input event threshold */ |
63 | |||
68 | static struct timer_list hdaps_timer; | 64 | static struct timer_list hdaps_timer; |
69 | static unsigned int hdaps_mousedev_threshold = 4; | 65 | static struct platform_device *pdev; |
70 | static unsigned long hdaps_poll_ms = 50; | ||
71 | static unsigned int hdaps_mousedev; | ||
72 | static unsigned int hdaps_invert; | 66 | static unsigned int hdaps_invert; |
73 | static u8 km_activity; | 67 | static u8 km_activity; |
74 | static int rest_x; | 68 | static int rest_x; |
@@ -81,14 +75,14 @@ static DECLARE_MUTEX(hdaps_sem); | |||
81 | */ | 75 | */ |
82 | static inline u8 __get_latch(u16 port) | 76 | static inline u8 __get_latch(u16 port) |
83 | { | 77 | { |
84 | return inb(port) & HDAPS_READ_MASK; | 78 | return inb(port) & 0xff; |
85 | } | 79 | } |
86 | 80 | ||
87 | /* | 81 | /* |
88 | * __check_latch - Check a port latch for a given value. Callers must hold | 82 | * __check_latch - Check a port latch for a given value. Returns zero if the |
89 | * hdaps_sem. Returns zero if the port contains the given value. | 83 | * port contains the given value. Callers must hold hdaps_sem. |
90 | */ | 84 | */ |
91 | static inline unsigned int __check_latch(u16 port, u8 val) | 85 | static inline int __check_latch(u16 port, u8 val) |
92 | { | 86 | { |
93 | if (__get_latch(port) == val) | 87 | if (__get_latch(port) == val) |
94 | return 0; | 88 | return 0; |
@@ -99,7 +93,7 @@ static inline unsigned int __check_latch(u16 port, u8 val) | |||
99 | * __wait_latch - Wait up to 100us for a port latch to get a certain value, | 93 | * __wait_latch - Wait up to 100us for a port latch to get a certain value, |
100 | * returning zero if the value is obtained. Callers must hold hdaps_sem. | 94 | * returning zero if the value is obtained. Callers must hold hdaps_sem. |
101 | */ | 95 | */ |
102 | static unsigned int __wait_latch(u16 port, u8 val) | 96 | static int __wait_latch(u16 port, u8 val) |
103 | { | 97 | { |
104 | unsigned int i; | 98 | unsigned int i; |
105 | 99 | ||
@@ -109,59 +103,42 @@ static unsigned int __wait_latch(u16 port, u8 val) | |||
109 | udelay(5); | 103 | udelay(5); |
110 | } | 104 | } |
111 | 105 | ||
112 | return -EINVAL; | 106 | return -EIO; |
113 | } | 107 | } |
114 | 108 | ||
115 | /* | 109 | /* |
116 | * __device_refresh - Request a refresh from the accelerometer. | 110 | * __device_refresh - request a refresh from the accelerometer. Does not wait |
117 | * | 111 | * for refresh to complete. Callers must hold hdaps_sem. |
118 | * If sync is REFRESH_SYNC, we perform a synchronous refresh and will wait. | ||
119 | * Returns zero if successful and nonzero on error. | ||
120 | * | ||
121 | * If sync is REFRESH_ASYNC, we merely kick off a new refresh if the device is | ||
122 | * not up-to-date. Always returns zero. | ||
123 | * | ||
124 | * Callers must hold hdaps_sem. | ||
125 | */ | 112 | */ |
126 | static int __device_refresh(unsigned int sync) | 113 | static void __device_refresh(void) |
127 | { | 114 | { |
128 | u8 state; | 115 | udelay(200); |
129 | 116 | if (inb(0x1604) != STATE_FRESH) { | |
130 | udelay(100); | 117 | outb(0x11, 0x1610); |
131 | 118 | outb(0x01, 0x161f); | |
132 | state = inb(0x1604); | 119 | } |
133 | if (state == STATE_FRESH) | 120 | } |
134 | return 0; | ||
135 | |||
136 | outb(0x11, 0x1610); | ||
137 | outb(0x01, 0x161f); | ||
138 | if (sync == REFRESH_ASYNC) | ||
139 | return 0; | ||
140 | 121 | ||
122 | /* | ||
123 | * __device_refresh_sync - request a synchronous refresh from the | ||
124 | * accelerometer. We wait for the refresh to complete. Returns zero if | ||
125 | * successful and nonzero on error. Callers must hold hdaps_sem. | ||
126 | */ | ||
127 | static int __device_refresh_sync(void) | ||
128 | { | ||
129 | __device_refresh(); | ||
141 | return __wait_latch(0x1604, STATE_FRESH); | 130 | return __wait_latch(0x1604, STATE_FRESH); |
142 | } | 131 | } |
143 | 132 | ||
144 | /* | 133 | /* |
145 | * __device_complete - Indicate to the accelerometer that we are done reading | 134 | * __device_complete - indicate to the accelerometer that we are done reading |
146 | * data, and then initiate an async refresh. Callers must hold hdaps_sem. | 135 | * data, and then initiate an async refresh. Callers must hold hdaps_sem. |
147 | */ | 136 | */ |
148 | static inline void __device_complete(void) | 137 | static inline void __device_complete(void) |
149 | { | 138 | { |
150 | inb(0x161f); | 139 | inb(0x161f); |
151 | inb(0x1604); | 140 | inb(0x1604); |
152 | __device_refresh(REFRESH_ASYNC); | 141 | __device_refresh(); |
153 | } | ||
154 | |||
155 | static int __hdaps_readb_one(unsigned int port, u8 *val) | ||
156 | { | ||
157 | /* do a sync refresh -- we need to be sure that we read fresh data */ | ||
158 | if (__device_refresh(REFRESH_SYNC)) | ||
159 | return -EIO; | ||
160 | |||
161 | *val = inb(port); | ||
162 | __device_complete(); | ||
163 | |||
164 | return 0; | ||
165 | } | 142 | } |
166 | 143 | ||
167 | /* | 144 | /* |
@@ -174,17 +151,26 @@ static int hdaps_readb_one(unsigned int port, u8 *val) | |||
174 | int ret; | 151 | int ret; |
175 | 152 | ||
176 | down(&hdaps_sem); | 153 | down(&hdaps_sem); |
177 | ret = __hdaps_readb_one(port, val); | ||
178 | up(&hdaps_sem); | ||
179 | 154 | ||
155 | /* do a sync refresh -- we need to be sure that we read fresh data */ | ||
156 | ret = __device_refresh_sync(); | ||
157 | if (ret) | ||
158 | goto out; | ||
159 | |||
160 | *val = inb(port); | ||
161 | __device_complete(); | ||
162 | |||
163 | out: | ||
164 | up(&hdaps_sem); | ||
180 | return ret; | 165 | return ret; |
181 | } | 166 | } |
182 | 167 | ||
168 | /* __hdaps_read_pair - internal lockless helper for hdaps_read_pair(). */ | ||
183 | static int __hdaps_read_pair(unsigned int port1, unsigned int port2, | 169 | static int __hdaps_read_pair(unsigned int port1, unsigned int port2, |
184 | int *x, int *y) | 170 | int *x, int *y) |
185 | { | 171 | { |
186 | /* do a sync refresh -- we need to be sure that we read fresh data */ | 172 | /* do a sync refresh -- we need to be sure that we read fresh data */ |
187 | if (__device_refresh(REFRESH_SYNC)) | 173 | if (__device_refresh_sync()) |
188 | return -EIO; | 174 | return -EIO; |
189 | 175 | ||
190 | *y = inw(port2); | 176 | *y = inw(port2); |
@@ -217,11 +203,13 @@ static int hdaps_read_pair(unsigned int port1, unsigned int port2, | |||
217 | return ret; | 203 | return ret; |
218 | } | 204 | } |
219 | 205 | ||
220 | /* initialize the accelerometer */ | 206 | /* |
207 | * hdaps_device_init - initialize the accelerometer. Returns zero on success | ||
208 | * and negative error code on failure. Can sleep. | ||
209 | */ | ||
221 | static int hdaps_device_init(void) | 210 | static int hdaps_device_init(void) |
222 | { | 211 | { |
223 | unsigned int total_msecs = INIT_TIMEOUT_MSECS; | 212 | int total, ret = -ENXIO; |
224 | int ret = -ENXIO; | ||
225 | 213 | ||
226 | down(&hdaps_sem); | 214 | down(&hdaps_sem); |
227 | 215 | ||
@@ -231,8 +219,10 @@ static int hdaps_device_init(void) | |||
231 | goto out; | 219 | goto out; |
232 | 220 | ||
233 | /* | 221 | /* |
234 | * The 0x03 value appears to only work on some thinkpads, such as the | 222 | * Most ThinkPads return 0x01. |
235 | * T42p. Others return 0x01. | 223 | * |
224 | * Others--namely the R50p, T41p, and T42p--return 0x03. These laptops | ||
225 | * have "inverted" axises. | ||
236 | * | 226 | * |
237 | * The 0x02 value occurs when the chip has been previously initialized. | 227 | * The 0x02 value occurs when the chip has been previously initialized. |
238 | */ | 228 | */ |
@@ -267,24 +257,23 @@ static int hdaps_device_init(void) | |||
267 | outb(0x01, 0x161f); | 257 | outb(0x01, 0x161f); |
268 | if (__wait_latch(0x161f, 0x00)) | 258 | if (__wait_latch(0x161f, 0x00)) |
269 | goto out; | 259 | goto out; |
270 | if (__device_refresh(REFRESH_SYNC)) | 260 | if (__device_refresh_sync()) |
271 | goto out; | 261 | goto out; |
272 | if (__wait_latch(0x1611, 0x00)) | 262 | if (__wait_latch(0x1611, 0x00)) |
273 | goto out; | 263 | goto out; |
274 | 264 | ||
275 | /* we have done our dance, now let's wait for the applause */ | 265 | /* we have done our dance, now let's wait for the applause */ |
276 | while (total_msecs > 0) { | 266 | for (total = INIT_TIMEOUT_MSECS; total > 0; total -= INIT_WAIT_MSECS) { |
277 | u8 ignored; | 267 | int x, y; |
278 | 268 | ||
279 | /* a read of the device helps push it into action */ | 269 | /* a read of the device helps push it into action */ |
280 | __hdaps_readb_one(HDAPS_PORT_UNKNOWN, &ignored); | 270 | __hdaps_read_pair(HDAPS_PORT_XPOS, HDAPS_PORT_YPOS, &x, &y); |
281 | if (!__wait_latch(0x1611, 0x02)) { | 271 | if (!__wait_latch(0x1611, 0x02)) { |
282 | ret = 0; | 272 | ret = 0; |
283 | break; | 273 | break; |
284 | } | 274 | } |
285 | 275 | ||
286 | msleep(INIT_WAIT_MSECS); | 276 | msleep(INIT_WAIT_MSECS); |
287 | total_msecs -= INIT_WAIT_MSECS; | ||
288 | } | 277 | } |
289 | 278 | ||
290 | out: | 279 | out: |
@@ -293,96 +282,6 @@ out: | |||
293 | } | 282 | } |
294 | 283 | ||
295 | 284 | ||
296 | /* Input class stuff */ | ||
297 | |||
298 | /* | ||
299 | * hdaps_calibrate - Zero out our "resting" values. Callers must hold hdaps_sem. | ||
300 | */ | ||
301 | static void hdaps_calibrate(void) | ||
302 | { | ||
303 | int x, y; | ||
304 | |||
305 | if (__hdaps_read_pair(HDAPS_PORT_XPOS, HDAPS_PORT_YPOS, &x, &y)) | ||
306 | return; | ||
307 | |||
308 | rest_x = x; | ||
309 | rest_y = y; | ||
310 | } | ||
311 | |||
312 | static void hdaps_mousedev_poll(unsigned long unused) | ||
313 | { | ||
314 | int x, y; | ||
315 | |||
316 | /* Cannot sleep. Try nonblockingly. If we fail, try again later. */ | ||
317 | if (down_trylock(&hdaps_sem)) { | ||
318 | mod_timer(&hdaps_timer,jiffies+msecs_to_jiffies(hdaps_poll_ms)); | ||
319 | return; | ||
320 | } | ||
321 | |||
322 | if (__hdaps_read_pair(HDAPS_PORT_XPOS, HDAPS_PORT_YPOS, &x, &y)) | ||
323 | goto out; | ||
324 | |||
325 | x -= rest_x; | ||
326 | y -= rest_y; | ||
327 | if (abs(x) > hdaps_mousedev_threshold) | ||
328 | input_report_rel(&hdaps_idev, REL_X, x); | ||
329 | if (abs(y) > hdaps_mousedev_threshold) | ||
330 | input_report_rel(&hdaps_idev, REL_Y, y); | ||
331 | input_sync(&hdaps_idev); | ||
332 | |||
333 | mod_timer(&hdaps_timer, jiffies + msecs_to_jiffies(hdaps_poll_ms)); | ||
334 | |||
335 | out: | ||
336 | up(&hdaps_sem); | ||
337 | } | ||
338 | |||
339 | /* | ||
340 | * hdaps_mousedev_enable - enable the input class device. Can sleep. | ||
341 | */ | ||
342 | static void hdaps_mousedev_enable(void) | ||
343 | { | ||
344 | down(&hdaps_sem); | ||
345 | |||
346 | /* calibrate the device before enabling */ | ||
347 | hdaps_calibrate(); | ||
348 | |||
349 | /* initialize the input class */ | ||
350 | init_input_dev(&hdaps_idev); | ||
351 | hdaps_idev.dev = &pdev->dev; | ||
352 | hdaps_idev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); | ||
353 | hdaps_idev.relbit[0] = BIT(REL_X) | BIT(REL_Y); | ||
354 | hdaps_idev.keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT); | ||
355 | input_register_device(&hdaps_idev); | ||
356 | |||
357 | /* start up our timer */ | ||
358 | init_timer(&hdaps_timer); | ||
359 | hdaps_timer.function = hdaps_mousedev_poll; | ||
360 | hdaps_timer.expires = jiffies + msecs_to_jiffies(hdaps_poll_ms); | ||
361 | add_timer(&hdaps_timer); | ||
362 | |||
363 | hdaps_mousedev = 1; | ||
364 | |||
365 | up(&hdaps_sem); | ||
366 | |||
367 | printk(KERN_INFO "hdaps: input device enabled.\n"); | ||
368 | } | ||
369 | |||
370 | /* | ||
371 | * hdaps_mousedev_disable - disable the input class device. Caller must hold | ||
372 | * hdaps_sem. | ||
373 | */ | ||
374 | static void hdaps_mousedev_disable(void) | ||
375 | { | ||
376 | down(&hdaps_sem); | ||
377 | if (hdaps_mousedev) { | ||
378 | hdaps_mousedev = 0; | ||
379 | del_timer_sync(&hdaps_timer); | ||
380 | input_unregister_device(&hdaps_idev); | ||
381 | } | ||
382 | up(&hdaps_sem); | ||
383 | } | ||
384 | |||
385 | |||
386 | /* Device model stuff */ | 285 | /* Device model stuff */ |
387 | 286 | ||
388 | static int hdaps_probe(struct device *dev) | 287 | static int hdaps_probe(struct device *dev) |
@@ -412,6 +311,49 @@ static struct device_driver hdaps_driver = { | |||
412 | .resume = hdaps_resume | 311 | .resume = hdaps_resume |
413 | }; | 312 | }; |
414 | 313 | ||
314 | /* Input class stuff */ | ||
315 | |||
316 | static struct input_dev hdaps_idev = { | ||
317 | .name = "hdaps", | ||
318 | .evbit = { BIT(EV_ABS) }, | ||
319 | .absbit = { BIT(ABS_X) | BIT(ABS_Y) }, | ||
320 | .absmin = { [ABS_X] = -256, [ABS_Y] = -256 }, | ||
321 | .absmax = { [ABS_X] = 256, [ABS_Y] = 256 }, | ||
322 | .absfuzz = { [ABS_X] = HDAPS_INPUT_FUZZ, [ABS_Y] = HDAPS_INPUT_FUZZ }, | ||
323 | .absflat = { [ABS_X] = HDAPS_INPUT_FUZZ, [ABS_Y] = HDAPS_INPUT_FUZZ }, | ||
324 | }; | ||
325 | |||
326 | /* | ||
327 | * hdaps_calibrate - Set our "resting" values. Callers must hold hdaps_sem. | ||
328 | */ | ||
329 | static void hdaps_calibrate(void) | ||
330 | { | ||
331 | __hdaps_read_pair(HDAPS_PORT_XPOS, HDAPS_PORT_YPOS, &rest_x, &rest_y); | ||
332 | } | ||
333 | |||
334 | static void hdaps_mousedev_poll(unsigned long unused) | ||
335 | { | ||
336 | int x, y; | ||
337 | |||
338 | /* Cannot sleep. Try nonblockingly. If we fail, try again later. */ | ||
339 | if (down_trylock(&hdaps_sem)) { | ||
340 | mod_timer(&hdaps_timer,jiffies + HDAPS_POLL_PERIOD); | ||
341 | return; | ||
342 | } | ||
343 | |||
344 | if (__hdaps_read_pair(HDAPS_PORT_XPOS, HDAPS_PORT_YPOS, &x, &y)) | ||
345 | goto out; | ||
346 | |||
347 | input_report_abs(&hdaps_idev, ABS_X, x - rest_x); | ||
348 | input_report_abs(&hdaps_idev, ABS_Y, y - rest_y); | ||
349 | input_sync(&hdaps_idev); | ||
350 | |||
351 | mod_timer(&hdaps_timer, jiffies + HDAPS_POLL_PERIOD); | ||
352 | |||
353 | out: | ||
354 | up(&hdaps_sem); | ||
355 | } | ||
356 | |||
415 | 357 | ||
416 | /* Sysfs Files */ | 358 | /* Sysfs Files */ |
417 | 359 | ||
@@ -517,69 +459,6 @@ static ssize_t hdaps_invert_store(struct device *dev, | |||
517 | return count; | 459 | return count; |
518 | } | 460 | } |
519 | 461 | ||
520 | static ssize_t hdaps_mousedev_show(struct device *dev, | ||
521 | struct device_attribute *attr, char *buf) | ||
522 | { | ||
523 | return sprintf(buf, "%d\n", hdaps_mousedev); | ||
524 | } | ||
525 | |||
526 | static ssize_t hdaps_mousedev_store(struct device *dev, | ||
527 | struct device_attribute *attr, | ||
528 | const char *buf, size_t count) | ||
529 | { | ||
530 | int enable; | ||
531 | |||
532 | if (sscanf(buf, "%d", &enable) != 1) | ||
533 | return -EINVAL; | ||
534 | |||
535 | if (enable == 1) | ||
536 | hdaps_mousedev_enable(); | ||
537 | else if (enable == 0) | ||
538 | hdaps_mousedev_disable(); | ||
539 | else | ||
540 | return -EINVAL; | ||
541 | |||
542 | return count; | ||
543 | } | ||
544 | |||
545 | static ssize_t hdaps_poll_show(struct device *dev, | ||
546 | struct device_attribute *attr, char *buf) | ||
547 | { | ||
548 | return sprintf(buf, "%lu\n", hdaps_poll_ms); | ||
549 | } | ||
550 | |||
551 | static ssize_t hdaps_poll_store(struct device *dev, | ||
552 | struct device_attribute *attr, | ||
553 | const char *buf, size_t count) | ||
554 | { | ||
555 | unsigned int poll; | ||
556 | |||
557 | if (sscanf(buf, "%u", &poll) != 1 || poll == 0) | ||
558 | return -EINVAL; | ||
559 | hdaps_poll_ms = poll; | ||
560 | |||
561 | return count; | ||
562 | } | ||
563 | |||
564 | static ssize_t hdaps_threshold_show(struct device *dev, | ||
565 | struct device_attribute *attr, char *buf) | ||
566 | { | ||
567 | return sprintf(buf, "%u\n", hdaps_mousedev_threshold); | ||
568 | } | ||
569 | |||
570 | static ssize_t hdaps_threshold_store(struct device *dev, | ||
571 | struct device_attribute *attr, | ||
572 | const char *buf, size_t count) | ||
573 | { | ||
574 | unsigned int threshold; | ||
575 | |||
576 | if (sscanf(buf, "%u", &threshold) != 1 || threshold == 0) | ||
577 | return -EINVAL; | ||
578 | hdaps_mousedev_threshold = threshold; | ||
579 | |||
580 | return count; | ||
581 | } | ||
582 | |||
583 | static DEVICE_ATTR(position, 0444, hdaps_position_show, NULL); | 462 | static DEVICE_ATTR(position, 0444, hdaps_position_show, NULL); |
584 | static DEVICE_ATTR(variance, 0444, hdaps_variance_show, NULL); | 463 | static DEVICE_ATTR(variance, 0444, hdaps_variance_show, NULL); |
585 | static DEVICE_ATTR(temp1, 0444, hdaps_temp1_show, NULL); | 464 | static DEVICE_ATTR(temp1, 0444, hdaps_temp1_show, NULL); |
@@ -588,10 +467,6 @@ static DEVICE_ATTR(keyboard_activity, 0444, hdaps_keyboard_activity_show, NULL); | |||
588 | static DEVICE_ATTR(mouse_activity, 0444, hdaps_mouse_activity_show, NULL); | 467 | static DEVICE_ATTR(mouse_activity, 0444, hdaps_mouse_activity_show, NULL); |
589 | static DEVICE_ATTR(calibrate, 0644, hdaps_calibrate_show,hdaps_calibrate_store); | 468 | static DEVICE_ATTR(calibrate, 0644, hdaps_calibrate_show,hdaps_calibrate_store); |
590 | static DEVICE_ATTR(invert, 0644, hdaps_invert_show, hdaps_invert_store); | 469 | static DEVICE_ATTR(invert, 0644, hdaps_invert_show, hdaps_invert_store); |
591 | static DEVICE_ATTR(mousedev, 0644, hdaps_mousedev_show, hdaps_mousedev_store); | ||
592 | static DEVICE_ATTR(mousedev_poll_ms, 0644, hdaps_poll_show, hdaps_poll_store); | ||
593 | static DEVICE_ATTR(mousedev_threshold, 0644, hdaps_threshold_show, | ||
594 | hdaps_threshold_store); | ||
595 | 470 | ||
596 | static struct attribute *hdaps_attributes[] = { | 471 | static struct attribute *hdaps_attributes[] = { |
597 | &dev_attr_position.attr, | 472 | &dev_attr_position.attr, |
@@ -601,9 +476,6 @@ static struct attribute *hdaps_attributes[] = { | |||
601 | &dev_attr_keyboard_activity.attr, | 476 | &dev_attr_keyboard_activity.attr, |
602 | &dev_attr_mouse_activity.attr, | 477 | &dev_attr_mouse_activity.attr, |
603 | &dev_attr_calibrate.attr, | 478 | &dev_attr_calibrate.attr, |
604 | &dev_attr_mousedev.attr, | ||
605 | &dev_attr_mousedev_threshold.attr, | ||
606 | &dev_attr_mousedev_poll_ms.attr, | ||
607 | &dev_attr_invert.attr, | 479 | &dev_attr_invert.attr, |
608 | NULL, | 480 | NULL, |
609 | }; | 481 | }; |
@@ -619,7 +491,7 @@ static struct attribute_group hdaps_attribute_group = { | |||
619 | * XXX: We should be able to return nonzero and halt the detection process. | 491 | * XXX: We should be able to return nonzero and halt the detection process. |
620 | * But there is a bug in dmi_check_system() where a nonzero return from the | 492 | * But there is a bug in dmi_check_system() where a nonzero return from the |
621 | * first match will result in a return of failure from dmi_check_system(). | 493 | * first match will result in a return of failure from dmi_check_system(). |
622 | * I fixed this; the patch is in 2.6-mm. Once in Linus's tree we can make | 494 | * I fixed this; the patch is 2.6-git. Once in a released tree, we can make |
623 | * hdaps_dmi_match_invert() return hdaps_dmi_match(), which in turn returns 1. | 495 | * hdaps_dmi_match_invert() return hdaps_dmi_match(), which in turn returns 1. |
624 | */ | 496 | */ |
625 | static int hdaps_dmi_match(struct dmi_system_id *id) | 497 | static int hdaps_dmi_match(struct dmi_system_id *id) |
@@ -668,6 +540,7 @@ static int __init hdaps_init(void) | |||
668 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T42"), | 540 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T42"), |
669 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T43"), | 541 | HDAPS_DMI_MATCH_NORMAL("ThinkPad T43"), |
670 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X40"), | 542 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X40"), |
543 | HDAPS_DMI_MATCH_NORMAL("ThinkPad X41 Tablet"), | ||
671 | { .ident = NULL } | 544 | { .ident = NULL } |
672 | }; | 545 | }; |
673 | 546 | ||
@@ -696,8 +569,18 @@ static int __init hdaps_init(void) | |||
696 | if (ret) | 569 | if (ret) |
697 | goto out_device; | 570 | goto out_device; |
698 | 571 | ||
699 | if (hdaps_mousedev) | 572 | /* initial calibrate for the input device */ |
700 | hdaps_mousedev_enable(); | 573 | hdaps_calibrate(); |
574 | |||
575 | /* initialize the input class */ | ||
576 | hdaps_idev.dev = &pdev->dev; | ||
577 | input_register_device(&hdaps_idev); | ||
578 | |||
579 | /* start up our timer for the input device */ | ||
580 | init_timer(&hdaps_timer); | ||
581 | hdaps_timer.function = hdaps_mousedev_poll; | ||
582 | hdaps_timer.expires = jiffies + HDAPS_POLL_PERIOD; | ||
583 | add_timer(&hdaps_timer); | ||
701 | 584 | ||
702 | printk(KERN_INFO "hdaps: driver successfully loaded.\n"); | 585 | printk(KERN_INFO "hdaps: driver successfully loaded.\n"); |
703 | return 0; | 586 | return 0; |
@@ -715,8 +598,8 @@ out: | |||
715 | 598 | ||
716 | static void __exit hdaps_exit(void) | 599 | static void __exit hdaps_exit(void) |
717 | { | 600 | { |
718 | hdaps_mousedev_disable(); | 601 | del_timer_sync(&hdaps_timer); |
719 | 602 | input_unregister_device(&hdaps_idev); | |
720 | sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group); | 603 | sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group); |
721 | platform_device_unregister(pdev); | 604 | platform_device_unregister(pdev); |
722 | driver_unregister(&hdaps_driver); | 605 | driver_unregister(&hdaps_driver); |
@@ -728,9 +611,6 @@ static void __exit hdaps_exit(void) | |||
728 | module_init(hdaps_init); | 611 | module_init(hdaps_init); |
729 | module_exit(hdaps_exit); | 612 | module_exit(hdaps_exit); |
730 | 613 | ||
731 | module_param_named(mousedev, hdaps_mousedev, bool, 0); | ||
732 | MODULE_PARM_DESC(mousedev, "enable the input class device"); | ||
733 | |||
734 | module_param_named(invert, hdaps_invert, bool, 0); | 614 | module_param_named(invert, hdaps_invert, bool, 0); |
735 | MODULE_PARM_DESC(invert, "invert data along each axis"); | 615 | MODULE_PARM_DESC(invert, "invert data along each axis"); |
736 | 616 | ||
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index d04f62ab5de1..ace8edad6e96 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -500,6 +500,7 @@ static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long | |||
500 | } | 500 | } |
501 | 501 | ||
502 | rq.special = args; | 502 | rq.special = args; |
503 | args->rq = &rq; | ||
503 | return ide_do_drive_cmd(drive, &rq, ide_wait); | 504 | return ide_do_drive_cmd(drive, &rq, ide_wait); |
504 | } | 505 | } |
505 | 506 | ||
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 8337b0f26cc4..4866fc32d8d9 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
@@ -61,6 +61,7 @@ static const PCI_ENTRY id_list[] = | |||
61 | {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_E,"Digi International", "Digi DataFire Micro V (Europe)"}, | 61 | {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_E,"Digi International", "Digi DataFire Micro V (Europe)"}, |
62 | {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A,"Digi International", "Digi DataFire Micro V IOM2 (North America)"}, | 62 | {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A,"Digi International", "Digi DataFire Micro V IOM2 (North America)"}, |
63 | {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_A,"Digi International", "Digi DataFire Micro V (North America)"}, | 63 | {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_A,"Digi International", "Digi DataFire Micro V (North America)"}, |
64 | {PCI_VENDOR_ID_SITECOM, PCI_DEVICE_ID_SITECOM_DC105V2, "Sitecom Europe", "DC-105 ISDN PCI"}, | ||
64 | {0, 0, NULL, NULL}, | 65 | {0, 0, NULL, NULL}, |
65 | }; | 66 | }; |
66 | 67 | ||
diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h index 0fda5c89429b..9ffaae7c657a 100644 --- a/drivers/isdn/hisax/st5481.h +++ b/drivers/isdn/hisax/st5481.h | |||
@@ -466,10 +466,10 @@ void st5481_stop(struct st5481_adapter *adapter); | |||
466 | #define __debug_variable st5481_debug | 466 | #define __debug_variable st5481_debug |
467 | #include "hisax_debug.h" | 467 | #include "hisax_debug.h" |
468 | 468 | ||
469 | #ifdef CONFIG_HISAX_DEBUG | ||
470 | |||
471 | extern int st5481_debug; | 469 | extern int st5481_debug; |
472 | 470 | ||
471 | #ifdef CONFIG_HISAX_DEBUG | ||
472 | |||
473 | #define DBG_ISO_PACKET(level,urb) \ | 473 | #define DBG_ISO_PACKET(level,urb) \ |
474 | if (level & __debug_variable) dump_iso_packet(__FUNCTION__,urb) | 474 | if (level & __debug_variable) dump_iso_packet(__FUNCTION__,urb) |
475 | 475 | ||
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c index 2fcd093921d8..0a2536d62402 100644 --- a/drivers/isdn/hisax/st5481_b.c +++ b/drivers/isdn/hisax/st5481_b.c | |||
@@ -172,14 +172,18 @@ static void usb_b_out_complete(struct urb *urb, struct pt_regs *regs) | |||
172 | test_and_clear_bit(buf_nr, &b_out->busy); | 172 | test_and_clear_bit(buf_nr, &b_out->busy); |
173 | 173 | ||
174 | if (unlikely(urb->status < 0)) { | 174 | if (unlikely(urb->status < 0)) { |
175 | if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { | 175 | switch (urb->status) { |
176 | WARN("urb status %d",urb->status); | 176 | case -ENOENT: |
177 | if (b_out->busy == 0) { | 177 | case -ESHUTDOWN: |
178 | st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL); | 178 | case -ECONNRESET: |
179 | } | 179 | DBG(4,"urb killed status %d", urb->status); |
180 | } else { | 180 | return; // Give up |
181 | DBG(1,"urb killed"); | 181 | default: |
182 | return; // Give up | 182 | WARN("urb status %d",urb->status); |
183 | if (b_out->busy == 0) { | ||
184 | st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL); | ||
185 | } | ||
186 | break; | ||
183 | } | 187 | } |
184 | } | 188 | } |
185 | 189 | ||
@@ -205,7 +209,9 @@ static void st5481B_mode(struct st5481_bcs *bcs, int mode) | |||
205 | bcs->mode = mode; | 209 | bcs->mode = mode; |
206 | 210 | ||
207 | // Cancel all USB transfers on this B channel | 211 | // Cancel all USB transfers on this B channel |
212 | b_out->urb[0]->transfer_flags |= URB_ASYNC_UNLINK; | ||
208 | usb_unlink_urb(b_out->urb[0]); | 213 | usb_unlink_urb(b_out->urb[0]); |
214 | b_out->urb[1]->transfer_flags |= URB_ASYNC_UNLINK; | ||
209 | usb_unlink_urb(b_out->urb[1]); | 215 | usb_unlink_urb(b_out->urb[1]); |
210 | b_out->busy = 0; | 216 | b_out->busy = 0; |
211 | 217 | ||
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c index 071b1d31999f..941f7022ada1 100644 --- a/drivers/isdn/hisax/st5481_d.c +++ b/drivers/isdn/hisax/st5481_d.c | |||
@@ -382,16 +382,20 @@ static void usb_d_out_complete(struct urb *urb, struct pt_regs *regs) | |||
382 | test_and_clear_bit(buf_nr, &d_out->busy); | 382 | test_and_clear_bit(buf_nr, &d_out->busy); |
383 | 383 | ||
384 | if (unlikely(urb->status < 0)) { | 384 | if (unlikely(urb->status < 0)) { |
385 | if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { | 385 | switch (urb->status) { |
386 | WARN("urb status %d",urb->status); | 386 | case -ENOENT: |
387 | if (d_out->busy == 0) { | 387 | case -ESHUTDOWN: |
388 | st5481_usb_pipe_reset(adapter, EP_D_OUT | USB_DIR_OUT, fifo_reseted, adapter); | 388 | case -ECONNRESET: |
389 | } | 389 | DBG(1,"urb killed status %d", urb->status); |
390 | return; | 390 | break; |
391 | } else { | 391 | default: |
392 | DBG(1,"urb killed"); | 392 | WARN("urb status %d",urb->status); |
393 | return; // Give up | 393 | if (d_out->busy == 0) { |
394 | st5481_usb_pipe_reset(adapter, EP_D_OUT | USB_DIR_OUT, fifo_reseted, adapter); | ||
395 | } | ||
396 | break; | ||
394 | } | 397 | } |
398 | return; // Give up | ||
395 | } | 399 | } |
396 | 400 | ||
397 | FsmEvent(&adapter->d_out.fsm, EV_DOUT_COMPLETE, (void *) buf_nr); | 401 | FsmEvent(&adapter->d_out.fsm, EV_DOUT_COMPLETE, (void *) buf_nr); |
@@ -709,14 +713,14 @@ int st5481_setup_d(struct st5481_adapter *adapter) | |||
709 | 713 | ||
710 | adapter->l1m.fsm = &l1fsm; | 714 | adapter->l1m.fsm = &l1fsm; |
711 | adapter->l1m.state = ST_L1_F3; | 715 | adapter->l1m.state = ST_L1_F3; |
712 | adapter->l1m.debug = 1; | 716 | adapter->l1m.debug = st5481_debug & 0x100; |
713 | adapter->l1m.userdata = adapter; | 717 | adapter->l1m.userdata = adapter; |
714 | adapter->l1m.printdebug = l1m_debug; | 718 | adapter->l1m.printdebug = l1m_debug; |
715 | FsmInitTimer(&adapter->l1m, &adapter->timer); | 719 | FsmInitTimer(&adapter->l1m, &adapter->timer); |
716 | 720 | ||
717 | adapter->d_out.fsm.fsm = &dout_fsm; | 721 | adapter->d_out.fsm.fsm = &dout_fsm; |
718 | adapter->d_out.fsm.state = ST_DOUT_NONE; | 722 | adapter->d_out.fsm.state = ST_DOUT_NONE; |
719 | adapter->d_out.fsm.debug = 1; | 723 | adapter->d_out.fsm.debug = st5481_debug & 0x100; |
720 | adapter->d_out.fsm.userdata = adapter; | 724 | adapter->d_out.fsm.userdata = adapter; |
721 | adapter->d_out.fsm.printdebug = dout_debug; | 725 | adapter->d_out.fsm.printdebug = dout_debug; |
722 | 726 | ||
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c index 7aa810d5d333..2cf5d1a6df6c 100644 --- a/drivers/isdn/hisax/st5481_init.c +++ b/drivers/isdn/hisax/st5481_init.c | |||
@@ -43,10 +43,10 @@ static int number_of_leds = 2; /* 2 LEDs on the adpater default */ | |||
43 | module_param(number_of_leds, int, 0); | 43 | module_param(number_of_leds, int, 0); |
44 | 44 | ||
45 | #ifdef CONFIG_HISAX_DEBUG | 45 | #ifdef CONFIG_HISAX_DEBUG |
46 | static int debug = 0x1; | 46 | static int debug = 0; |
47 | module_param(debug, int, 0); | 47 | module_param(debug, int, 0); |
48 | int st5481_debug; | ||
49 | #endif | 48 | #endif |
49 | int st5481_debug; | ||
50 | 50 | ||
51 | static LIST_HEAD(adapter_list); | 51 | static LIST_HEAD(adapter_list); |
52 | 52 | ||
diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c index ab62223297a5..ffd5b2d45552 100644 --- a/drivers/isdn/hisax/st5481_usb.c +++ b/drivers/isdn/hisax/st5481_usb.c | |||
@@ -132,11 +132,15 @@ static void usb_ctrl_complete(struct urb *urb, struct pt_regs *regs) | |||
132 | struct ctrl_msg *ctrl_msg; | 132 | struct ctrl_msg *ctrl_msg; |
133 | 133 | ||
134 | if (unlikely(urb->status < 0)) { | 134 | if (unlikely(urb->status < 0)) { |
135 | if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { | 135 | switch (urb->status) { |
136 | WARN("urb status %d",urb->status); | 136 | case -ENOENT: |
137 | } else { | 137 | case -ESHUTDOWN: |
138 | DBG(1,"urb killed"); | 138 | case -ECONNRESET: |
139 | return; // Give up | 139 | DBG(1,"urb killed status %d", urb->status); |
140 | return; // Give up | ||
141 | default: | ||
142 | WARN("urb status %d",urb->status); | ||
143 | break; | ||
140 | } | 144 | } |
141 | } | 145 | } |
142 | 146 | ||
@@ -184,22 +188,22 @@ static void usb_int_complete(struct urb *urb, struct pt_regs *regs) | |||
184 | int status; | 188 | int status; |
185 | 189 | ||
186 | switch (urb->status) { | 190 | switch (urb->status) { |
187 | case 0: | 191 | case 0: |
188 | /* success */ | 192 | /* success */ |
189 | break; | 193 | break; |
190 | case -ECONNRESET: | 194 | case -ECONNRESET: |
191 | case -ENOENT: | 195 | case -ENOENT: |
192 | case -ESHUTDOWN: | 196 | case -ESHUTDOWN: |
193 | /* this urb is terminated, clean up */ | 197 | /* this urb is terminated, clean up */ |
194 | DBG(1, "urb shutting down with status: %d", urb->status); | 198 | DBG(2, "urb shutting down with status: %d", urb->status); |
195 | return; | 199 | return; |
196 | default: | 200 | default: |
197 | WARN("nonzero urb status received: %d", urb->status); | 201 | WARN("nonzero urb status received: %d", urb->status); |
198 | goto exit; | 202 | goto exit; |
199 | } | 203 | } |
200 | 204 | ||
201 | 205 | ||
202 | DBG_PACKET(1, data, INT_PKT_SIZE); | 206 | DBG_PACKET(2, data, INT_PKT_SIZE); |
203 | 207 | ||
204 | if (urb->actual_length == 0) { | 208 | if (urb->actual_length == 0) { |
205 | goto exit; | 209 | goto exit; |
@@ -250,7 +254,7 @@ int st5481_setup_usb(struct st5481_adapter *adapter) | |||
250 | struct urb *urb; | 254 | struct urb *urb; |
251 | u8 *buf; | 255 | u8 *buf; |
252 | 256 | ||
253 | DBG(1,""); | 257 | DBG(2,""); |
254 | 258 | ||
255 | if ((status = usb_reset_configuration (dev)) < 0) { | 259 | if ((status = usb_reset_configuration (dev)) < 0) { |
256 | WARN("reset_configuration failed,status=%d",status); | 260 | WARN("reset_configuration failed,status=%d",status); |
@@ -330,15 +334,17 @@ void st5481_release_usb(struct st5481_adapter *adapter) | |||
330 | DBG(1,""); | 334 | DBG(1,""); |
331 | 335 | ||
332 | // Stop and free Control and Interrupt URBs | 336 | // Stop and free Control and Interrupt URBs |
333 | usb_unlink_urb(ctrl->urb); | 337 | usb_kill_urb(ctrl->urb); |
334 | if (ctrl->urb->transfer_buffer) | 338 | if (ctrl->urb->transfer_buffer) |
335 | kfree(ctrl->urb->transfer_buffer); | 339 | kfree(ctrl->urb->transfer_buffer); |
336 | usb_free_urb(ctrl->urb); | 340 | usb_free_urb(ctrl->urb); |
341 | ctrl->urb = NULL; | ||
337 | 342 | ||
338 | usb_unlink_urb(intr->urb); | 343 | usb_kill_urb(intr->urb); |
339 | if (intr->urb->transfer_buffer) | 344 | if (intr->urb->transfer_buffer) |
340 | kfree(intr->urb->transfer_buffer); | 345 | kfree(intr->urb->transfer_buffer); |
341 | usb_free_urb(intr->urb); | 346 | usb_free_urb(intr->urb); |
347 | ctrl->urb = NULL; | ||
342 | } | 348 | } |
343 | 349 | ||
344 | /* | 350 | /* |
@@ -406,6 +412,7 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, | |||
406 | spin_lock_init(&urb->lock); | 412 | spin_lock_init(&urb->lock); |
407 | urb->dev=dev; | 413 | urb->dev=dev; |
408 | urb->pipe=pipe; | 414 | urb->pipe=pipe; |
415 | urb->interval = 1; | ||
409 | urb->transfer_buffer=buf; | 416 | urb->transfer_buffer=buf; |
410 | urb->number_of_packets = num_packets; | 417 | urb->number_of_packets = num_packets; |
411 | urb->transfer_buffer_length=num_packets*packet_size; | 418 | urb->transfer_buffer_length=num_packets*packet_size; |
@@ -452,7 +459,9 @@ st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev, | |||
452 | if (urb[j]) { | 459 | if (urb[j]) { |
453 | if (urb[j]->transfer_buffer) | 460 | if (urb[j]->transfer_buffer) |
454 | kfree(urb[j]->transfer_buffer); | 461 | kfree(urb[j]->transfer_buffer); |
462 | urb[j]->transfer_buffer = NULL; | ||
455 | usb_free_urb(urb[j]); | 463 | usb_free_urb(urb[j]); |
464 | urb[j] = NULL; | ||
456 | } | 465 | } |
457 | } | 466 | } |
458 | return retval; | 467 | return retval; |
@@ -463,10 +472,11 @@ void st5481_release_isocpipes(struct urb* urb[2]) | |||
463 | int j; | 472 | int j; |
464 | 473 | ||
465 | for (j = 0; j < 2; j++) { | 474 | for (j = 0; j < 2; j++) { |
466 | usb_unlink_urb(urb[j]); | 475 | usb_kill_urb(urb[j]); |
467 | if (urb[j]->transfer_buffer) | 476 | if (urb[j]->transfer_buffer) |
468 | kfree(urb[j]->transfer_buffer); | 477 | kfree(urb[j]->transfer_buffer); |
469 | usb_free_urb(urb[j]); | 478 | usb_free_urb(urb[j]); |
479 | urb[j] = NULL; | ||
470 | } | 480 | } |
471 | } | 481 | } |
472 | 482 | ||
@@ -485,11 +495,15 @@ static void usb_in_complete(struct urb *urb, struct pt_regs *regs) | |||
485 | int len, count, status; | 495 | int len, count, status; |
486 | 496 | ||
487 | if (unlikely(urb->status < 0)) { | 497 | if (unlikely(urb->status < 0)) { |
488 | if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { | 498 | switch (urb->status) { |
489 | WARN("urb status %d",urb->status); | 499 | case -ENOENT: |
490 | } else { | 500 | case -ESHUTDOWN: |
491 | DBG(1,"urb killed"); | 501 | case -ECONNRESET: |
492 | return; // Give up | 502 | DBG(1,"urb killed status %d", urb->status); |
503 | return; // Give up | ||
504 | default: | ||
505 | WARN("urb status %d",urb->status); | ||
506 | break; | ||
493 | } | 507 | } |
494 | } | 508 | } |
495 | 509 | ||
@@ -631,7 +645,9 @@ void st5481_in_mode(struct st5481_in *in, int mode) | |||
631 | 645 | ||
632 | in->mode = mode; | 646 | in->mode = mode; |
633 | 647 | ||
648 | in->urb[0]->transfer_flags |= URB_ASYNC_UNLINK; | ||
634 | usb_unlink_urb(in->urb[0]); | 649 | usb_unlink_urb(in->urb[0]); |
650 | in->urb[1]->transfer_flags |= URB_ASYNC_UNLINK; | ||
635 | usb_unlink_urb(in->urb[1]); | 651 | usb_unlink_urb(in->urb[1]); |
636 | 652 | ||
637 | if (in->mode != L1_MODE_NULL) { | 653 | if (in->mode != L1_MODE_NULL) { |
diff --git a/drivers/md/raid6.h b/drivers/md/raid6.h index f80ee6350edf..31cbee71365f 100644 --- a/drivers/md/raid6.h +++ b/drivers/md/raid6.h | |||
@@ -69,9 +69,13 @@ extern const char raid6_empty_zero_page[PAGE_SIZE]; | |||
69 | #define __init | 69 | #define __init |
70 | #define __exit | 70 | #define __exit |
71 | #define __attribute_const__ __attribute__((const)) | 71 | #define __attribute_const__ __attribute__((const)) |
72 | #define noinline __attribute__((noinline)) | ||
72 | 73 | ||
73 | #define preempt_enable() | 74 | #define preempt_enable() |
74 | #define preempt_disable() | 75 | #define preempt_disable() |
76 | #define cpu_has_feature(x) 1 | ||
77 | #define enable_kernel_altivec() | ||
78 | #define disable_kernel_altivec() | ||
75 | 79 | ||
76 | #endif /* __KERNEL__ */ | 80 | #endif /* __KERNEL__ */ |
77 | 81 | ||
diff --git a/drivers/md/raid6algos.c b/drivers/md/raid6algos.c index acf386fc4b4f..51c63c0cf1c9 100644 --- a/drivers/md/raid6algos.c +++ b/drivers/md/raid6algos.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "raid6.h" | 19 | #include "raid6.h" |
20 | #ifndef __KERNEL__ | 20 | #ifndef __KERNEL__ |
21 | #include <sys/mman.h> | 21 | #include <sys/mman.h> |
22 | #include <stdio.h> | ||
22 | #endif | 23 | #endif |
23 | 24 | ||
24 | struct raid6_calls raid6_call; | 25 | struct raid6_calls raid6_call; |
diff --git a/drivers/md/raid6altivec.uc b/drivers/md/raid6altivec.uc index 1de8f030eee0..b9afd35b8812 100644 --- a/drivers/md/raid6altivec.uc +++ b/drivers/md/raid6altivec.uc | |||
@@ -27,16 +27,20 @@ | |||
27 | #ifdef CONFIG_ALTIVEC | 27 | #ifdef CONFIG_ALTIVEC |
28 | 28 | ||
29 | #include <altivec.h> | 29 | #include <altivec.h> |
30 | #include <asm/system.h> | 30 | #ifdef __KERNEL__ |
31 | #include <asm/cputable.h> | 31 | # include <asm/system.h> |
32 | # include <asm/cputable.h> | ||
33 | #endif | ||
32 | 34 | ||
33 | /* | 35 | /* |
34 | * This is the C data type to use | 36 | * This is the C data type to use. We use a vector of |
37 | * signed char so vec_cmpgt() will generate the right | ||
38 | * instruction. | ||
35 | */ | 39 | */ |
36 | 40 | ||
37 | typedef vector unsigned char unative_t; | 41 | typedef vector signed char unative_t; |
38 | 42 | ||
39 | #define NBYTES(x) ((vector unsigned char) {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}) | 43 | #define NBYTES(x) ((vector signed char) {x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x}) |
40 | #define NSIZE sizeof(unative_t) | 44 | #define NSIZE sizeof(unative_t) |
41 | 45 | ||
42 | /* | 46 | /* |
@@ -108,7 +112,11 @@ int raid6_have_altivec(void); | |||
108 | int raid6_have_altivec(void) | 112 | int raid6_have_altivec(void) |
109 | { | 113 | { |
110 | /* This assumes either all CPUs have Altivec or none does */ | 114 | /* This assumes either all CPUs have Altivec or none does */ |
115 | # ifdef __KERNEL__ | ||
111 | return cpu_has_feature(CPU_FTR_ALTIVEC); | 116 | return cpu_has_feature(CPU_FTR_ALTIVEC); |
117 | # else | ||
118 | return 1; | ||
119 | # endif | ||
112 | } | 120 | } |
113 | #endif | 121 | #endif |
114 | 122 | ||
diff --git a/drivers/md/raid6test/Makefile b/drivers/md/raid6test/Makefile index 557806728609..78e0396adf2a 100644 --- a/drivers/md/raid6test/Makefile +++ b/drivers/md/raid6test/Makefile | |||
@@ -8,6 +8,8 @@ OPTFLAGS = -O2 # Adjust as desired | |||
8 | CFLAGS = -I.. -g $(OPTFLAGS) | 8 | CFLAGS = -I.. -g $(OPTFLAGS) |
9 | LD = ld | 9 | LD = ld |
10 | PERL = perl | 10 | PERL = perl |
11 | AR = ar | ||
12 | RANLIB = ranlib | ||
11 | 13 | ||
12 | .c.o: | 14 | .c.o: |
13 | $(CC) $(CFLAGS) -c -o $@ $< | 15 | $(CC) $(CFLAGS) -c -o $@ $< |
@@ -18,18 +20,33 @@ PERL = perl | |||
18 | %.uc: ../%.uc | 20 | %.uc: ../%.uc |
19 | cp -f $< $@ | 21 | cp -f $< $@ |
20 | 22 | ||
21 | all: raid6.o raid6test | 23 | all: raid6.a raid6test |
22 | 24 | ||
23 | raid6.o: raid6int1.o raid6int2.o raid6int4.o raid6int8.o raid6int16.o \ | 25 | raid6.a: raid6int1.o raid6int2.o raid6int4.o raid6int8.o raid6int16.o \ |
24 | raid6int32.o \ | 26 | raid6int32.o \ |
25 | raid6mmx.o raid6sse1.o raid6sse2.o \ | 27 | raid6mmx.o raid6sse1.o raid6sse2.o \ |
28 | raid6altivec1.o raid6altivec2.o raid6altivec4.o raid6altivec8.o \ | ||
26 | raid6recov.o raid6algos.o \ | 29 | raid6recov.o raid6algos.o \ |
27 | raid6tables.o | 30 | raid6tables.o |
28 | $(LD) -r -o $@ $^ | 31 | rm -f $@ |
32 | $(AR) cq $@ $^ | ||
33 | $(RANLIB) $@ | ||
29 | 34 | ||
30 | raid6test: raid6.o test.c | 35 | raid6test: test.c raid6.a |
31 | $(CC) $(CFLAGS) -o raid6test $^ | 36 | $(CC) $(CFLAGS) -o raid6test $^ |
32 | 37 | ||
38 | raid6altivec1.c: raid6altivec.uc ../unroll.pl | ||
39 | $(PERL) ../unroll.pl 1 < raid6altivec.uc > $@ | ||
40 | |||
41 | raid6altivec2.c: raid6altivec.uc ../unroll.pl | ||
42 | $(PERL) ../unroll.pl 2 < raid6altivec.uc > $@ | ||
43 | |||
44 | raid6altivec4.c: raid6altivec.uc ../unroll.pl | ||
45 | $(PERL) ../unroll.pl 4 < raid6altivec.uc > $@ | ||
46 | |||
47 | raid6altivec8.c: raid6altivec.uc ../unroll.pl | ||
48 | $(PERL) ../unroll.pl 8 < raid6altivec.uc > $@ | ||
49 | |||
33 | raid6int1.c: raid6int.uc ../unroll.pl | 50 | raid6int1.c: raid6int.uc ../unroll.pl |
34 | $(PERL) ../unroll.pl 1 < raid6int.uc > $@ | 51 | $(PERL) ../unroll.pl 1 < raid6int.uc > $@ |
35 | 52 | ||
@@ -52,7 +69,7 @@ raid6tables.c: mktables | |||
52 | ./mktables > raid6tables.c | 69 | ./mktables > raid6tables.c |
53 | 70 | ||
54 | clean: | 71 | clean: |
55 | rm -f *.o mktables mktables.c raid6int.uc raid6*.c raid6test | 72 | rm -f *.o *.a mktables mktables.c raid6int.uc raid6*.c raid6test |
56 | 73 | ||
57 | spotless: clean | 74 | spotless: clean |
58 | rm -f *~ | 75 | rm -f *~ |
diff --git a/drivers/mtd/maps/sharpsl-flash.c b/drivers/mtd/maps/sharpsl-flash.c index d15da6fd84c1..b7f093fbf9b0 100644 --- a/drivers/mtd/maps/sharpsl-flash.c +++ b/drivers/mtd/maps/sharpsl-flash.c | |||
@@ -82,7 +82,7 @@ int __init init_sharpsl(void) | |||
82 | } else if (machine_is_tosa()) { | 82 | } else if (machine_is_tosa()) { |
83 | sharpsl_partitions[0].size=0x006a0000; | 83 | sharpsl_partitions[0].size=0x006a0000; |
84 | sharpsl_partitions[0].offset=0x00160000; | 84 | sharpsl_partitions[0].offset=0x00160000; |
85 | } else if (machine_is_spitz()) { | 85 | } else if (machine_is_spitz() || machine_is_akita() || machine_is_borzoi()) { |
86 | sharpsl_partitions[0].size=0x006b0000; | 86 | sharpsl_partitions[0].size=0x006b0000; |
87 | sharpsl_partitions[0].offset=0x00140000; | 87 | sharpsl_partitions[0].offset=0x00140000; |
88 | } else { | 88 | } else { |
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c index 9853b87bb756..88b5b5b40b43 100644 --- a/drivers/mtd/nand/sharpsl.c +++ b/drivers/mtd/nand/sharpsl.c | |||
@@ -221,10 +221,16 @@ sharpsl_nand_init(void) | |||
221 | sharpsl_partition_info[1].size=25 * 1024 * 1024; | 221 | sharpsl_partition_info[1].size=25 * 1024 * 1024; |
222 | } else if (machine_is_husky()) { | 222 | } else if (machine_is_husky()) { |
223 | sharpsl_partition_info[1].size=53 * 1024 * 1024; | 223 | sharpsl_partition_info[1].size=53 * 1024 * 1024; |
224 | } | 224 | } else if (machine_is_spitz()) { |
225 | sharpsl_partition_info[1].size=5 * 1024 * 1024; | ||
226 | } else if (machine_is_akita()) { | ||
227 | sharpsl_partition_info[1].size=58 * 1024 * 1024; | ||
228 | } else if (machine_is_borzoi()) { | ||
229 | sharpsl_partition_info[1].size=32 * 1024 * 1024; | ||
230 | } | ||
225 | } | 231 | } |
226 | 232 | ||
227 | if (machine_is_husky()) { | 233 | if (machine_is_husky() || machine_is_borzoi()) { |
228 | /* Need to use small eraseblock size for backward compatibility */ | 234 | /* Need to use small eraseblock size for backward compatibility */ |
229 | sharpsl_mtd->flags |= MTD_NO_VIRTBLOCKS; | 235 | sharpsl_mtd->flags |= MTD_NO_VIRTBLOCKS; |
230 | } | 236 | } |
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 34b80de34fae..bc537440ca02 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -353,8 +353,6 @@ struct cp_private { | |||
353 | 353 | ||
354 | struct net_device_stats net_stats; | 354 | struct net_device_stats net_stats; |
355 | struct cp_extra_stats cp_stats; | 355 | struct cp_extra_stats cp_stats; |
356 | struct cp_dma_stats *nic_stats; | ||
357 | dma_addr_t nic_stats_dma; | ||
358 | 356 | ||
359 | unsigned rx_tail ____cacheline_aligned; | 357 | unsigned rx_tail ____cacheline_aligned; |
360 | struct cp_desc *rx_ring; | 358 | struct cp_desc *rx_ring; |
@@ -1143,10 +1141,6 @@ static int cp_alloc_rings (struct cp_private *cp) | |||
1143 | cp->rx_ring = mem; | 1141 | cp->rx_ring = mem; |
1144 | cp->tx_ring = &cp->rx_ring[CP_RX_RING_SIZE]; | 1142 | cp->tx_ring = &cp->rx_ring[CP_RX_RING_SIZE]; |
1145 | 1143 | ||
1146 | mem += (CP_RING_BYTES - CP_STATS_SIZE); | ||
1147 | cp->nic_stats = mem; | ||
1148 | cp->nic_stats_dma = cp->ring_dma + (CP_RING_BYTES - CP_STATS_SIZE); | ||
1149 | |||
1150 | return cp_init_rings(cp); | 1144 | return cp_init_rings(cp); |
1151 | } | 1145 | } |
1152 | 1146 | ||
@@ -1187,7 +1181,6 @@ static void cp_free_rings (struct cp_private *cp) | |||
1187 | pci_free_consistent(cp->pdev, CP_RING_BYTES, cp->rx_ring, cp->ring_dma); | 1181 | pci_free_consistent(cp->pdev, CP_RING_BYTES, cp->rx_ring, cp->ring_dma); |
1188 | cp->rx_ring = NULL; | 1182 | cp->rx_ring = NULL; |
1189 | cp->tx_ring = NULL; | 1183 | cp->tx_ring = NULL; |
1190 | cp->nic_stats = NULL; | ||
1191 | } | 1184 | } |
1192 | 1185 | ||
1193 | static int cp_open (struct net_device *dev) | 1186 | static int cp_open (struct net_device *dev) |
@@ -1516,13 +1509,17 @@ static void cp_get_ethtool_stats (struct net_device *dev, | |||
1516 | struct ethtool_stats *estats, u64 *tmp_stats) | 1509 | struct ethtool_stats *estats, u64 *tmp_stats) |
1517 | { | 1510 | { |
1518 | struct cp_private *cp = netdev_priv(dev); | 1511 | struct cp_private *cp = netdev_priv(dev); |
1512 | struct cp_dma_stats *nic_stats; | ||
1513 | dma_addr_t dma; | ||
1519 | int i; | 1514 | int i; |
1520 | 1515 | ||
1521 | memset(cp->nic_stats, 0, sizeof(struct cp_dma_stats)); | 1516 | nic_stats = pci_alloc_consistent(cp->pdev, sizeof(*nic_stats), &dma); |
1517 | if (!nic_stats) | ||
1518 | return; | ||
1522 | 1519 | ||
1523 | /* begin NIC statistics dump */ | 1520 | /* begin NIC statistics dump */ |
1524 | cpw32(StatsAddr + 4, (cp->nic_stats_dma >> 16) >> 16); | 1521 | cpw32(StatsAddr + 4, (u64)dma >> 32); |
1525 | cpw32(StatsAddr, (cp->nic_stats_dma & 0xffffffff) | DumpStats); | 1522 | cpw32(StatsAddr, ((u64)dma & DMA_32BIT_MASK) | DumpStats); |
1526 | cpr32(StatsAddr); | 1523 | cpr32(StatsAddr); |
1527 | 1524 | ||
1528 | for (i = 0; i < 1000; i++) { | 1525 | for (i = 0; i < 1000; i++) { |
@@ -1532,24 +1529,27 @@ static void cp_get_ethtool_stats (struct net_device *dev, | |||
1532 | } | 1529 | } |
1533 | cpw32(StatsAddr, 0); | 1530 | cpw32(StatsAddr, 0); |
1534 | cpw32(StatsAddr + 4, 0); | 1531 | cpw32(StatsAddr + 4, 0); |
1532 | cpr32(StatsAddr); | ||
1535 | 1533 | ||
1536 | i = 0; | 1534 | i = 0; |
1537 | tmp_stats[i++] = le64_to_cpu(cp->nic_stats->tx_ok); | 1535 | tmp_stats[i++] = le64_to_cpu(nic_stats->tx_ok); |
1538 | tmp_stats[i++] = le64_to_cpu(cp->nic_stats->rx_ok); | 1536 | tmp_stats[i++] = le64_to_cpu(nic_stats->rx_ok); |
1539 | tmp_stats[i++] = le64_to_cpu(cp->nic_stats->tx_err); | 1537 | tmp_stats[i++] = le64_to_cpu(nic_stats->tx_err); |
1540 | tmp_stats[i++] = le32_to_cpu(cp->nic_stats->rx_err); | 1538 | tmp_stats[i++] = le32_to_cpu(nic_stats->rx_err); |
1541 | tmp_stats[i++] = le16_to_cpu(cp->nic_stats->rx_fifo); | 1539 | tmp_stats[i++] = le16_to_cpu(nic_stats->rx_fifo); |
1542 | tmp_stats[i++] = le16_to_cpu(cp->nic_stats->frame_align); | 1540 | tmp_stats[i++] = le16_to_cpu(nic_stats->frame_align); |
1543 | tmp_stats[i++] = le32_to_cpu(cp->nic_stats->tx_ok_1col); | 1541 | tmp_stats[i++] = le32_to_cpu(nic_stats->tx_ok_1col); |
1544 | tmp_stats[i++] = le32_to_cpu(cp->nic_stats->tx_ok_mcol); | 1542 | tmp_stats[i++] = le32_to_cpu(nic_stats->tx_ok_mcol); |
1545 | tmp_stats[i++] = le64_to_cpu(cp->nic_stats->rx_ok_phys); | 1543 | tmp_stats[i++] = le64_to_cpu(nic_stats->rx_ok_phys); |
1546 | tmp_stats[i++] = le64_to_cpu(cp->nic_stats->rx_ok_bcast); | 1544 | tmp_stats[i++] = le64_to_cpu(nic_stats->rx_ok_bcast); |
1547 | tmp_stats[i++] = le32_to_cpu(cp->nic_stats->rx_ok_mcast); | 1545 | tmp_stats[i++] = le32_to_cpu(nic_stats->rx_ok_mcast); |
1548 | tmp_stats[i++] = le16_to_cpu(cp->nic_stats->tx_abort); | 1546 | tmp_stats[i++] = le16_to_cpu(nic_stats->tx_abort); |
1549 | tmp_stats[i++] = le16_to_cpu(cp->nic_stats->tx_underrun); | 1547 | tmp_stats[i++] = le16_to_cpu(nic_stats->tx_underrun); |
1550 | tmp_stats[i++] = cp->cp_stats.rx_frags; | 1548 | tmp_stats[i++] = cp->cp_stats.rx_frags; |
1551 | if (i != CP_NUM_STATS) | 1549 | if (i != CP_NUM_STATS) |
1552 | BUG(); | 1550 | BUG(); |
1551 | |||
1552 | pci_free_consistent(cp->pdev, sizeof(*nic_stats), nic_stats, dma); | ||
1553 | } | 1553 | } |
1554 | 1554 | ||
1555 | static struct ethtool_ops cp_ethtool_ops = { | 1555 | static struct ethtool_ops cp_ethtool_ops = { |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 94c9f68dd16b..f8dedb623dc0 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -2879,6 +2879,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave) | |||
2879 | * This target is not on a VLAN | 2879 | * This target is not on a VLAN |
2880 | */ | 2880 | */ |
2881 | if (rt->u.dst.dev == bond->dev) { | 2881 | if (rt->u.dst.dev == bond->dev) { |
2882 | ip_rt_put(rt); | ||
2882 | dprintk("basa: rtdev == bond->dev: arp_send\n"); | 2883 | dprintk("basa: rtdev == bond->dev: arp_send\n"); |
2883 | bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], | 2884 | bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], |
2884 | bond->master_ip, 0); | 2885 | bond->master_ip, 0); |
@@ -2898,6 +2899,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave) | |||
2898 | } | 2899 | } |
2899 | 2900 | ||
2900 | if (vlan_id) { | 2901 | if (vlan_id) { |
2902 | ip_rt_put(rt); | ||
2901 | bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], | 2903 | bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], |
2902 | vlan->vlan_ip, vlan_id); | 2904 | vlan->vlan_ip, vlan_id); |
2903 | continue; | 2905 | continue; |
@@ -2909,6 +2911,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave) | |||
2909 | bond->dev->name, NIPQUAD(fl.fl4_dst), | 2911 | bond->dev->name, NIPQUAD(fl.fl4_dst), |
2910 | rt->u.dst.dev ? rt->u.dst.dev->name : "NULL"); | 2912 | rt->u.dst.dev ? rt->u.dst.dev->name : "NULL"); |
2911 | } | 2913 | } |
2914 | ip_rt_put(rt); | ||
2912 | } | 2915 | } |
2913 | } | 2916 | } |
2914 | 2917 | ||
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 4e19220473d0..c796f41b4a52 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1817,6 +1817,10 @@ spider_net_setup_phy(struct spider_net_card *card) | |||
1817 | /* LEDs active in both modes, autosense prio = fiber */ | 1817 | /* LEDs active in both modes, autosense prio = fiber */ |
1818 | spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0x945f); | 1818 | spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0x945f); |
1819 | 1819 | ||
1820 | /* switch off fibre autoneg */ | ||
1821 | spider_net_write_phy(card->netdev, 1, MII_NCONFIG, 0xfc01); | ||
1822 | spider_net_write_phy(card->netdev, 1, 0x0b, 0x0004); | ||
1823 | |||
1820 | phy->def->ops->read_link(phy); | 1824 | phy->def->ops->read_link(phy); |
1821 | pr_info("Found %s with %i Mbps, %s-duplex.\n", phy->def->name, | 1825 | pr_info("Found %s with %i Mbps, %s-duplex.\n", phy->def->name, |
1822 | phy->speed, phy->duplex==1 ? "Full" : "Half"); | 1826 | phy->speed, phy->duplex==1 ? "Full" : "Half"); |
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c index 8122fe734aa7..b1ba429e0a2d 100644 --- a/drivers/pci/hotplug/ibmphp_pci.c +++ b/drivers/pci/hotplug/ibmphp_pci.c | |||
@@ -558,7 +558,7 @@ static int configure_device (struct pci_func *func) | |||
558 | pci_bus_write_config_byte (ibmphp_pci_bus, devfn, PCI_CACHE_LINE_SIZE, CACHE); | 558 | pci_bus_write_config_byte (ibmphp_pci_bus, devfn, PCI_CACHE_LINE_SIZE, CACHE); |
559 | pci_bus_write_config_byte (ibmphp_pci_bus, devfn, PCI_LATENCY_TIMER, LATENCY); | 559 | pci_bus_write_config_byte (ibmphp_pci_bus, devfn, PCI_LATENCY_TIMER, LATENCY); |
560 | 560 | ||
561 | pci_bus_write_config_word (ibmphp_pci_bus, devfn, PCI_ROM_ADDRESS, 0x00L); | 561 | pci_bus_write_config_dword (ibmphp_pci_bus, devfn, PCI_ROM_ADDRESS, 0x00L); |
562 | pci_bus_write_config_word (ibmphp_pci_bus, devfn, PCI_COMMAND, DEVICEENABLE); | 562 | pci_bus_write_config_word (ibmphp_pci_bus, devfn, PCI_COMMAND, DEVICEENABLE); |
563 | 563 | ||
564 | return 0; | 564 | return 0; |
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 0e0947601526..898f6da6f0de 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -2526,7 +2526,6 @@ configure_new_function(struct controller *ctrl, struct pci_func *func, | |||
2526 | int cloop; | 2526 | int cloop; |
2527 | u8 temp_byte; | 2527 | u8 temp_byte; |
2528 | u8 class_code; | 2528 | u8 class_code; |
2529 | u16 temp_word; | ||
2530 | u32 rc; | 2529 | u32 rc; |
2531 | u32 temp_register; | 2530 | u32 temp_register; |
2532 | u32 base; | 2531 | u32 base; |
@@ -2682,8 +2681,7 @@ configure_new_function(struct controller *ctrl, struct pci_func *func, | |||
2682 | } /* End of base register loop */ | 2681 | } /* End of base register loop */ |
2683 | 2682 | ||
2684 | /* disable ROM base Address */ | 2683 | /* disable ROM base Address */ |
2685 | temp_word = 0x00L; | 2684 | rc = pci_bus_write_config_dword (pci_bus, devfn, PCI_ROM_ADDRESS, 0x00); |
2686 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_ROM_ADDRESS, temp_word); | ||
2687 | 2685 | ||
2688 | /* Set HP parameters (Cache Line Size, Latency Timer) */ | 2686 | /* Set HP parameters (Cache Line Size, Latency Timer) */ |
2689 | rc = pciehprm_set_hpp(ctrl, func, PCI_HEADER_TYPE_NORMAL); | 2687 | rc = pciehprm_set_hpp(ctrl, func, PCI_HEADER_TYPE_NORMAL); |
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index 783b5abb0717..91c9903e621f 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c | |||
@@ -2824,8 +2824,7 @@ static int configure_new_function (struct controller * ctrl, struct pci_func * f | |||
2824 | } | 2824 | } |
2825 | #endif | 2825 | #endif |
2826 | /* Disable ROM base Address */ | 2826 | /* Disable ROM base Address */ |
2827 | temp_word = 0x00L; | 2827 | rc = pci_bus_write_config_dword (pci_bus, devfn, PCI_ROM_ADDRESS, 0x00); |
2828 | rc = pci_bus_write_config_word (pci_bus, devfn, PCI_ROM_ADDRESS, temp_word); | ||
2829 | 2828 | ||
2830 | /* Set HP parameters (Cache Line Size, Latency Timer) */ | 2829 | /* Set HP parameters (Cache Line Size, Latency Timer) */ |
2831 | rc = shpchprm_set_hpp(ctrl, func, PCI_HEADER_TYPE_NORMAL); | 2830 | rc = shpchprm_set_hpp(ctrl, func, PCI_HEADER_TYPE_NORMAL); |
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index aac83ce6469c..a1c52a682191 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/s390/cio/blacklist.c | 2 | * drivers/s390/cio/blacklist.c |
3 | * S/390 common I/O routines -- blacklisting of specific devices | 3 | * S/390 common I/O routines -- blacklisting of specific devices |
4 | * $Revision: 1.34 $ | 4 | * $Revision: 1.35 $ |
5 | * | 5 | * |
6 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, |
7 | * IBM Corporation | 7 | * IBM Corporation |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | /* 65536 bits to indicate if a devno is blacklisted or not */ | 37 | /* 65536 bits to indicate if a devno is blacklisted or not */ |
38 | #define __BL_DEV_WORDS (__MAX_SUBCHANNELS + (8*sizeof(long) - 1) / \ | 38 | #define __BL_DEV_WORDS ((__MAX_SUBCHANNELS + (8*sizeof(long) - 1)) / \ |
39 | (8*sizeof(long))) | 39 | (8*sizeof(long))) |
40 | static unsigned long bl_dev[__BL_DEV_WORDS]; | 40 | static unsigned long bl_dev[__BL_DEV_WORDS]; |
41 | typedef enum {add, free} range_action; | 41 | typedef enum {add, free} range_action; |
diff --git a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c index 6aeef3bacc33..0cb47eca91f3 100644 --- a/drivers/s390/crypto/z90main.c +++ b/drivers/s390/crypto/z90main.c | |||
@@ -682,9 +682,6 @@ z90crypt_cleanup_module(void) | |||
682 | del_timer(&config_timer); | 682 | del_timer(&config_timer); |
683 | del_timer(&cleanup_timer); | 683 | del_timer(&cleanup_timer); |
684 | 684 | ||
685 | if (z90_device_work) | ||
686 | destroy_workqueue(z90_device_work); | ||
687 | |||
688 | destroy_z90crypt(); | 685 | destroy_z90crypt(); |
689 | 686 | ||
690 | PRINTKN("Unloaded.\n"); | 687 | PRINTKN("Unloaded.\n"); |
diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 3a0285669adf..2ad4797ce024 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "qeth_mpc.h" | 25 | #include "qeth_mpc.h" |
26 | 26 | ||
27 | #define VERSION_QETH_H "$Revision: 1.139 $" | 27 | #define VERSION_QETH_H "$Revision: 1.142 $" |
28 | 28 | ||
29 | #ifdef CONFIG_QETH_IPV6 | 29 | #ifdef CONFIG_QETH_IPV6 |
30 | #define QETH_VERSION_IPV6 ":IPv6" | 30 | #define QETH_VERSION_IPV6 ":IPv6" |
@@ -1172,7 +1172,7 @@ extern int | |||
1172 | qeth_realloc_buffer_pool(struct qeth_card *, int); | 1172 | qeth_realloc_buffer_pool(struct qeth_card *, int); |
1173 | 1173 | ||
1174 | extern int | 1174 | extern int |
1175 | qeth_set_large_send(struct qeth_card *); | 1175 | qeth_set_large_send(struct qeth_card *, enum qeth_large_send_types); |
1176 | 1176 | ||
1177 | extern void | 1177 | extern void |
1178 | qeth_fill_header(struct qeth_card *, struct qeth_hdr *, | 1178 | qeth_fill_header(struct qeth_card *, struct qeth_hdr *, |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 79c74f3a11f5..86582cf1e19e 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * linux/drivers/s390/net/qeth_main.c ($Revision: 1.214 $) | 3 | * linux/drivers/s390/net/qeth_main.c ($Revision: 1.224 $) |
4 | * | 4 | * |
5 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * | 6 | * |
@@ -12,7 +12,7 @@ | |||
12 | * Frank Pavlic (pavlic@de.ibm.com) and | 12 | * Frank Pavlic (pavlic@de.ibm.com) and |
13 | * Thomas Spatzier <tspat@de.ibm.com> | 13 | * Thomas Spatzier <tspat@de.ibm.com> |
14 | * | 14 | * |
15 | * $Revision: 1.214 $ $Date: 2005/05/04 20:19:18 $ | 15 | * $Revision: 1.224 $ $Date: 2005/05/04 20:19:18 $ |
16 | * | 16 | * |
17 | * This program is free software; you can redistribute it and/or modify | 17 | * This program is free software; you can redistribute it and/or modify |
18 | * it under the terms of the GNU General Public License as published by | 18 | * it under the terms of the GNU General Public License as published by |
@@ -29,14 +29,6 @@ | |||
29 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 29 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /*** | ||
33 | * eye catcher; just for debugging purposes | ||
34 | */ | ||
35 | void volatile | ||
36 | qeth_eyecatcher(void) | ||
37 | { | ||
38 | return; | ||
39 | } | ||
40 | 32 | ||
41 | #include <linux/config.h> | 33 | #include <linux/config.h> |
42 | #include <linux/module.h> | 34 | #include <linux/module.h> |
@@ -80,7 +72,7 @@ qeth_eyecatcher(void) | |||
80 | #include "qeth_eddp.h" | 72 | #include "qeth_eddp.h" |
81 | #include "qeth_tso.h" | 73 | #include "qeth_tso.h" |
82 | 74 | ||
83 | #define VERSION_QETH_C "$Revision: 1.214 $" | 75 | #define VERSION_QETH_C "$Revision: 1.224 $" |
84 | static const char *version = "qeth S/390 OSA-Express driver"; | 76 | static const char *version = "qeth S/390 OSA-Express driver"; |
85 | 77 | ||
86 | /** | 78 | /** |
@@ -2759,11 +2751,9 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, | |||
2759 | queue->card->perf_stats.outbound_do_qdio_start_time; | 2751 | queue->card->perf_stats.outbound_do_qdio_start_time; |
2760 | #endif | 2752 | #endif |
2761 | if (rc){ | 2753 | if (rc){ |
2762 | QETH_DBF_SPRINTF(trace, 0, "qeth_flush_buffers: do_QDIO " | ||
2763 | "returned error (%i) on device %s.", | ||
2764 | rc, CARD_DDEV_ID(queue->card)); | ||
2765 | QETH_DBF_TEXT(trace, 2, "flushbuf"); | 2754 | QETH_DBF_TEXT(trace, 2, "flushbuf"); |
2766 | QETH_DBF_TEXT_(trace, 2, " err%d", rc); | 2755 | QETH_DBF_TEXT_(trace, 2, " err%d", rc); |
2756 | QETH_DBF_TEXT_(trace, 2, "%s", CARD_DDEV_ID(queue->card)); | ||
2767 | queue->card->stats.tx_errors += count; | 2757 | queue->card->stats.tx_errors += count; |
2768 | /* this must not happen under normal circumstances. if it | 2758 | /* this must not happen under normal circumstances. if it |
2769 | * happens something is really wrong -> recover */ | 2759 | * happens something is really wrong -> recover */ |
@@ -2909,11 +2899,8 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status, | |||
2909 | QETH_DBF_TEXT(trace, 6, "qdouhdl"); | 2899 | QETH_DBF_TEXT(trace, 6, "qdouhdl"); |
2910 | if (status & QDIO_STATUS_LOOK_FOR_ERROR) { | 2900 | if (status & QDIO_STATUS_LOOK_FOR_ERROR) { |
2911 | if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION){ | 2901 | if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION){ |
2912 | QETH_DBF_SPRINTF(trace, 2, "On device %s: " | 2902 | QETH_DBF_TEXT(trace, 2, "achkcond"); |
2913 | "received active check " | 2903 | QETH_DBF_TEXT_(trace, 2, "%s", CARD_BUS_ID(card)); |
2914 | "condition (0x%08x).", | ||
2915 | CARD_BUS_ID(card), status); | ||
2916 | QETH_DBF_TEXT(trace, 2, "chkcond"); | ||
2917 | QETH_DBF_TEXT_(trace, 2, "%08x", status); | 2904 | QETH_DBF_TEXT_(trace, 2, "%08x", status); |
2918 | netif_stop_queue(card->dev); | 2905 | netif_stop_queue(card->dev); |
2919 | qeth_schedule_recovery(card); | 2906 | qeth_schedule_recovery(card); |
@@ -3356,26 +3343,32 @@ qeth_halt_channel(struct qeth_channel *channel) | |||
3356 | static int | 3343 | static int |
3357 | qeth_halt_channels(struct qeth_card *card) | 3344 | qeth_halt_channels(struct qeth_card *card) |
3358 | { | 3345 | { |
3359 | int rc = 0; | 3346 | int rc1 = 0, rc2=0, rc3 = 0; |
3360 | 3347 | ||
3361 | QETH_DBF_TEXT(trace,3,"haltchs"); | 3348 | QETH_DBF_TEXT(trace,3,"haltchs"); |
3362 | if ((rc = qeth_halt_channel(&card->read))) | 3349 | rc1 = qeth_halt_channel(&card->read); |
3363 | return rc; | 3350 | rc2 = qeth_halt_channel(&card->write); |
3364 | if ((rc = qeth_halt_channel(&card->write))) | 3351 | rc3 = qeth_halt_channel(&card->data); |
3365 | return rc; | 3352 | if (rc1) |
3366 | return qeth_halt_channel(&card->data); | 3353 | return rc1; |
3354 | if (rc2) | ||
3355 | return rc2; | ||
3356 | return rc3; | ||
3367 | } | 3357 | } |
3368 | static int | 3358 | static int |
3369 | qeth_clear_channels(struct qeth_card *card) | 3359 | qeth_clear_channels(struct qeth_card *card) |
3370 | { | 3360 | { |
3371 | int rc = 0; | 3361 | int rc1 = 0, rc2=0, rc3 = 0; |
3372 | 3362 | ||
3373 | QETH_DBF_TEXT(trace,3,"clearchs"); | 3363 | QETH_DBF_TEXT(trace,3,"clearchs"); |
3374 | if ((rc = qeth_clear_channel(&card->read))) | 3364 | rc1 = qeth_clear_channel(&card->read); |
3375 | return rc; | 3365 | rc2 = qeth_clear_channel(&card->write); |
3376 | if ((rc = qeth_clear_channel(&card->write))) | 3366 | rc3 = qeth_clear_channel(&card->data); |
3377 | return rc; | 3367 | if (rc1) |
3378 | return qeth_clear_channel(&card->data); | 3368 | return rc1; |
3369 | if (rc2) | ||
3370 | return rc2; | ||
3371 | return rc3; | ||
3379 | } | 3372 | } |
3380 | 3373 | ||
3381 | static int | 3374 | static int |
@@ -3445,23 +3438,23 @@ qeth_mpc_initialize(struct qeth_card *card) | |||
3445 | } | 3438 | } |
3446 | if ((rc = qeth_cm_enable(card))){ | 3439 | if ((rc = qeth_cm_enable(card))){ |
3447 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); | 3440 | QETH_DBF_TEXT_(setup, 2, "2err%d", rc); |
3448 | return rc; | 3441 | goto out_qdio; |
3449 | } | 3442 | } |
3450 | if ((rc = qeth_cm_setup(card))){ | 3443 | if ((rc = qeth_cm_setup(card))){ |
3451 | QETH_DBF_TEXT_(setup, 2, "3err%d", rc); | 3444 | QETH_DBF_TEXT_(setup, 2, "3err%d", rc); |
3452 | return rc; | 3445 | goto out_qdio; |
3453 | } | 3446 | } |
3454 | if ((rc = qeth_ulp_enable(card))){ | 3447 | if ((rc = qeth_ulp_enable(card))){ |
3455 | QETH_DBF_TEXT_(setup, 2, "4err%d", rc); | 3448 | QETH_DBF_TEXT_(setup, 2, "4err%d", rc); |
3456 | return rc; | 3449 | goto out_qdio; |
3457 | } | 3450 | } |
3458 | if ((rc = qeth_ulp_setup(card))){ | 3451 | if ((rc = qeth_ulp_setup(card))){ |
3459 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); | 3452 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); |
3460 | return rc; | 3453 | goto out_qdio; |
3461 | } | 3454 | } |
3462 | if ((rc = qeth_alloc_qdio_buffers(card))){ | 3455 | if ((rc = qeth_alloc_qdio_buffers(card))){ |
3463 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); | 3456 | QETH_DBF_TEXT_(setup, 2, "5err%d", rc); |
3464 | return rc; | 3457 | goto out_qdio; |
3465 | } | 3458 | } |
3466 | if ((rc = qeth_qdio_establish(card))){ | 3459 | if ((rc = qeth_qdio_establish(card))){ |
3467 | QETH_DBF_TEXT_(setup, 2, "6err%d", rc); | 3460 | QETH_DBF_TEXT_(setup, 2, "6err%d", rc); |
@@ -3795,12 +3788,16 @@ static inline int | |||
3795 | qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, | 3788 | qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, |
3796 | struct qeth_hdr **hdr, int ipv) | 3789 | struct qeth_hdr **hdr, int ipv) |
3797 | { | 3790 | { |
3791 | int rc; | ||
3798 | #ifdef CONFIG_QETH_VLAN | 3792 | #ifdef CONFIG_QETH_VLAN |
3799 | u16 *tag; | 3793 | u16 *tag; |
3800 | #endif | 3794 | #endif |
3801 | 3795 | ||
3802 | QETH_DBF_TEXT(trace, 6, "prepskb"); | 3796 | QETH_DBF_TEXT(trace, 6, "prepskb"); |
3803 | 3797 | ||
3798 | rc = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr)); | ||
3799 | if (rc) | ||
3800 | return rc; | ||
3804 | #ifdef CONFIG_QETH_VLAN | 3801 | #ifdef CONFIG_QETH_VLAN |
3805 | if (card->vlangrp && vlan_tx_tag_present(*skb) && | 3802 | if (card->vlangrp && vlan_tx_tag_present(*skb) && |
3806 | ((ipv == 6) || card->options.layer2) ) { | 3803 | ((ipv == 6) || card->options.layer2) ) { |
@@ -4251,7 +4248,8 @@ out: | |||
4251 | } | 4248 | } |
4252 | 4249 | ||
4253 | static inline int | 4250 | static inline int |
4254 | qeth_get_elements_no(struct qeth_card *card, void *hdr, struct sk_buff *skb) | 4251 | qeth_get_elements_no(struct qeth_card *card, void *hdr, |
4252 | struct sk_buff *skb, int elems) | ||
4255 | { | 4253 | { |
4256 | int elements_needed = 0; | 4254 | int elements_needed = 0; |
4257 | 4255 | ||
@@ -4261,9 +4259,10 @@ qeth_get_elements_no(struct qeth_card *card, void *hdr, struct sk_buff *skb) | |||
4261 | if (elements_needed == 0 ) | 4259 | if (elements_needed == 0 ) |
4262 | elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) | 4260 | elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) |
4263 | + skb->len) >> PAGE_SHIFT); | 4261 | + skb->len) >> PAGE_SHIFT); |
4264 | if (elements_needed > QETH_MAX_BUFFER_ELEMENTS(card)){ | 4262 | if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)){ |
4265 | PRINT_ERR("qeth_do_send_packet: invalid size of " | 4263 | PRINT_ERR("qeth_do_send_packet: invalid size of " |
4266 | "IP packet. Discarded."); | 4264 | "IP packet (Number=%d / Length=%d). Discarded.\n", |
4265 | (elements_needed+elems), skb->len); | ||
4267 | return 0; | 4266 | return 0; |
4268 | } | 4267 | } |
4269 | return elements_needed; | 4268 | return elements_needed; |
@@ -4275,7 +4274,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4275 | int ipv = 0; | 4274 | int ipv = 0; |
4276 | int cast_type; | 4275 | int cast_type; |
4277 | struct qeth_qdio_out_q *queue; | 4276 | struct qeth_qdio_out_q *queue; |
4278 | struct qeth_hdr *hdr; | 4277 | struct qeth_hdr *hdr = NULL; |
4279 | int elements_needed = 0; | 4278 | int elements_needed = 0; |
4280 | enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; | 4279 | enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; |
4281 | struct qeth_eddp_context *ctx = NULL; | 4280 | struct qeth_eddp_context *ctx = NULL; |
@@ -4337,9 +4336,11 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) | |||
4337 | return -EINVAL; | 4336 | return -EINVAL; |
4338 | } | 4337 | } |
4339 | } else { | 4338 | } else { |
4340 | elements_needed += qeth_get_elements_no(card,(void*) hdr, skb); | 4339 | int elems = qeth_get_elements_no(card,(void*) hdr, skb, |
4341 | if (!elements_needed) | 4340 | elements_needed); |
4341 | if (!elems) | ||
4342 | return -EINVAL; | 4342 | return -EINVAL; |
4343 | elements_needed += elems; | ||
4343 | } | 4344 | } |
4344 | 4345 | ||
4345 | if (card->info.type != QETH_CARD_TYPE_IQD) | 4346 | if (card->info.type != QETH_CARD_TYPE_IQD) |
@@ -4504,7 +4505,11 @@ qeth_arp_set_no_entries(struct qeth_card *card, int no_entries) | |||
4504 | 4505 | ||
4505 | QETH_DBF_TEXT(trace,3,"arpstnoe"); | 4506 | QETH_DBF_TEXT(trace,3,"arpstnoe"); |
4506 | 4507 | ||
4507 | /* TODO: really not supported by GuestLAN? */ | 4508 | /* |
4509 | * currently GuestLAN only supports the ARP assist function | ||
4510 | * IPA_CMD_ASS_ARP_QUERY_INFO, but not IPA_CMD_ASS_ARP_SET_NO_ENTRIES; | ||
4511 | * thus we say EOPNOTSUPP for this ARP function | ||
4512 | */ | ||
4508 | if (card->info.guestlan) | 4513 | if (card->info.guestlan) |
4509 | return -EOPNOTSUPP; | 4514 | return -EOPNOTSUPP; |
4510 | if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { | 4515 | if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { |
@@ -4681,14 +4686,6 @@ qeth_arp_query(struct qeth_card *card, char *udata) | |||
4681 | 4686 | ||
4682 | QETH_DBF_TEXT(trace,3,"arpquery"); | 4687 | QETH_DBF_TEXT(trace,3,"arpquery"); |
4683 | 4688 | ||
4684 | /* | ||
4685 | * currently GuestLAN does only deliver all zeros on query arp, | ||
4686 | * even though arp processing is supported (according to IPA supp. | ||
4687 | * funcs flags); since all zeros is no valueable information, | ||
4688 | * we say EOPNOTSUPP for all ARP functions | ||
4689 | */ | ||
4690 | /*if (card->info.guestlan) | ||
4691 | return -EOPNOTSUPP; */ | ||
4692 | if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ | 4689 | if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ |
4693 | IPA_ARP_PROCESSING)) { | 4690 | IPA_ARP_PROCESSING)) { |
4694 | PRINT_WARN("ARP processing not supported " | 4691 | PRINT_WARN("ARP processing not supported " |
@@ -4894,10 +4891,9 @@ qeth_arp_add_entry(struct qeth_card *card, struct qeth_arp_cache_entry *entry) | |||
4894 | QETH_DBF_TEXT(trace,3,"arpadent"); | 4891 | QETH_DBF_TEXT(trace,3,"arpadent"); |
4895 | 4892 | ||
4896 | /* | 4893 | /* |
4897 | * currently GuestLAN does only deliver all zeros on query arp, | 4894 | * currently GuestLAN only supports the ARP assist function |
4898 | * even though arp processing is supported (according to IPA supp. | 4895 | * IPA_CMD_ASS_ARP_QUERY_INFO, but not IPA_CMD_ASS_ARP_ADD_ENTRY; |
4899 | * funcs flags); since all zeros is no valueable information, | 4896 | * thus we say EOPNOTSUPP for this ARP function |
4900 | * we say EOPNOTSUPP for all ARP functions | ||
4901 | */ | 4897 | */ |
4902 | if (card->info.guestlan) | 4898 | if (card->info.guestlan) |
4903 | return -EOPNOTSUPP; | 4899 | return -EOPNOTSUPP; |
@@ -4937,10 +4933,9 @@ qeth_arp_remove_entry(struct qeth_card *card, struct qeth_arp_cache_entry *entry | |||
4937 | QETH_DBF_TEXT(trace,3,"arprment"); | 4933 | QETH_DBF_TEXT(trace,3,"arprment"); |
4938 | 4934 | ||
4939 | /* | 4935 | /* |
4940 | * currently GuestLAN does only deliver all zeros on query arp, | 4936 | * currently GuestLAN only supports the ARP assist function |
4941 | * even though arp processing is supported (according to IPA supp. | 4937 | * IPA_CMD_ASS_ARP_QUERY_INFO, but not IPA_CMD_ASS_ARP_REMOVE_ENTRY; |
4942 | * funcs flags); since all zeros is no valueable information, | 4938 | * thus we say EOPNOTSUPP for this ARP function |
4943 | * we say EOPNOTSUPP for all ARP functions | ||
4944 | */ | 4939 | */ |
4945 | if (card->info.guestlan) | 4940 | if (card->info.guestlan) |
4946 | return -EOPNOTSUPP; | 4941 | return -EOPNOTSUPP; |
@@ -4978,11 +4973,10 @@ qeth_arp_flush_cache(struct qeth_card *card) | |||
4978 | QETH_DBF_TEXT(trace,3,"arpflush"); | 4973 | QETH_DBF_TEXT(trace,3,"arpflush"); |
4979 | 4974 | ||
4980 | /* | 4975 | /* |
4981 | * currently GuestLAN does only deliver all zeros on query arp, | 4976 | * currently GuestLAN only supports the ARP assist function |
4982 | * even though arp processing is supported (according to IPA supp. | 4977 | * IPA_CMD_ASS_ARP_QUERY_INFO, but not IPA_CMD_ASS_ARP_FLUSH_CACHE; |
4983 | * funcs flags); since all zeros is no valueable information, | 4978 | * thus we say EOPNOTSUPP for this ARP function |
4984 | * we say EOPNOTSUPP for all ARP functions | 4979 | */ |
4985 | */ | ||
4986 | if (card->info.guestlan || (card->info.type == QETH_CARD_TYPE_IQD)) | 4980 | if (card->info.guestlan || (card->info.type == QETH_CARD_TYPE_IQD)) |
4987 | return -EOPNOTSUPP; | 4981 | return -EOPNOTSUPP; |
4988 | if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { | 4982 | if (!qeth_is_supported(card,IPA_ARP_PROCESSING)) { |
@@ -7038,14 +7032,16 @@ qeth_setrouting_v6(struct qeth_card *card) | |||
7038 | } | 7032 | } |
7039 | 7033 | ||
7040 | int | 7034 | int |
7041 | qeth_set_large_send(struct qeth_card *card) | 7035 | qeth_set_large_send(struct qeth_card *card, enum qeth_large_send_types type) |
7042 | { | 7036 | { |
7043 | int rc = 0; | 7037 | int rc = 0; |
7044 | 7038 | ||
7045 | if (card->dev == NULL) | 7039 | if (card->dev == NULL) { |
7040 | card->options.large_send = type; | ||
7046 | return 0; | 7041 | return 0; |
7047 | 7042 | } | |
7048 | netif_stop_queue(card->dev); | 7043 | netif_stop_queue(card->dev); |
7044 | card->options.large_send = type; | ||
7049 | switch (card->options.large_send) { | 7045 | switch (card->options.large_send) { |
7050 | case QETH_LARGE_SEND_EDDP: | 7046 | case QETH_LARGE_SEND_EDDP: |
7051 | card->dev->features |= NETIF_F_TSO | NETIF_F_SG; | 7047 | card->dev->features |= NETIF_F_TSO | NETIF_F_SG; |
@@ -7066,7 +7062,6 @@ qeth_set_large_send(struct qeth_card *card) | |||
7066 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); | 7062 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); |
7067 | break; | 7063 | break; |
7068 | } | 7064 | } |
7069 | |||
7070 | netif_wake_queue(card->dev); | 7065 | netif_wake_queue(card->dev); |
7071 | return rc; | 7066 | return rc; |
7072 | } | 7067 | } |
@@ -8257,7 +8252,6 @@ qeth_init(void) | |||
8257 | { | 8252 | { |
8258 | int rc=0; | 8253 | int rc=0; |
8259 | 8254 | ||
8260 | qeth_eyecatcher(); | ||
8261 | PRINT_INFO("loading %s (%s/%s/%s/%s/%s/%s/%s %s %s)\n", | 8255 | PRINT_INFO("loading %s (%s/%s/%s/%s/%s/%s/%s %s %s)\n", |
8262 | version, VERSION_QETH_C, VERSION_QETH_H, | 8256 | version, VERSION_QETH_C, VERSION_QETH_H, |
8263 | VERSION_QETH_MPC_H, VERSION_QETH_MPC_C, | 8257 | VERSION_QETH_MPC_H, VERSION_QETH_MPC_C, |
@@ -8338,7 +8332,6 @@ again: | |||
8338 | printk("qeth: removed\n"); | 8332 | printk("qeth: removed\n"); |
8339 | } | 8333 | } |
8340 | 8334 | ||
8341 | EXPORT_SYMBOL(qeth_eyecatcher); | ||
8342 | module_init(qeth_init); | 8335 | module_init(qeth_init); |
8343 | module_exit(qeth_exit); | 8336 | module_exit(qeth_exit); |
8344 | MODULE_AUTHOR("Frank Pavlic <pavlic@de.ibm.com>"); | 8337 | MODULE_AUTHOR("Frank Pavlic <pavlic@de.ibm.com>"); |
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index 98bedb0cb387..dda105b73063 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.51 $) | 3 | * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.54 $) |
4 | * | 4 | * |
5 | * Linux on zSeries OSA Express and HiperSockets support | 5 | * Linux on zSeries OSA Express and HiperSockets support |
6 | * This file contains code related to sysfs. | 6 | * This file contains code related to sysfs. |
@@ -20,7 +20,7 @@ | |||
20 | #include "qeth_mpc.h" | 20 | #include "qeth_mpc.h" |
21 | #include "qeth_fs.h" | 21 | #include "qeth_fs.h" |
22 | 22 | ||
23 | const char *VERSION_QETH_SYS_C = "$Revision: 1.51 $"; | 23 | const char *VERSION_QETH_SYS_C = "$Revision: 1.54 $"; |
24 | 24 | ||
25 | /*****************************************************************************/ | 25 | /*****************************************************************************/ |
26 | /* */ | 26 | /* */ |
@@ -722,10 +722,13 @@ qeth_dev_layer2_store(struct device *dev, struct device_attribute *attr, const c | |||
722 | 722 | ||
723 | if (!card) | 723 | if (!card) |
724 | return -EINVAL; | 724 | return -EINVAL; |
725 | if (card->info.type == QETH_CARD_TYPE_IQD) { | ||
726 | PRINT_WARN("Layer2 on Hipersockets is not supported! \n"); | ||
727 | return -EPERM; | ||
728 | } | ||
725 | 729 | ||
726 | if (((card->state != CARD_STATE_DOWN) && | 730 | if (((card->state != CARD_STATE_DOWN) && |
727 | (card->state != CARD_STATE_RECOVER)) || | 731 | (card->state != CARD_STATE_RECOVER))) |
728 | (card->info.type != QETH_CARD_TYPE_OSAE)) | ||
729 | return -EPERM; | 732 | return -EPERM; |
730 | 733 | ||
731 | i = simple_strtoul(buf, &tmp, 16); | 734 | i = simple_strtoul(buf, &tmp, 16); |
@@ -771,9 +774,7 @@ qeth_dev_large_send_store(struct device *dev, struct device_attribute *attr, con | |||
771 | 774 | ||
772 | if (!card) | 775 | if (!card) |
773 | return -EINVAL; | 776 | return -EINVAL; |
774 | |||
775 | tmp = strsep((char **) &buf, "\n"); | 777 | tmp = strsep((char **) &buf, "\n"); |
776 | |||
777 | if (!strcmp(tmp, "no")){ | 778 | if (!strcmp(tmp, "no")){ |
778 | type = QETH_LARGE_SEND_NO; | 779 | type = QETH_LARGE_SEND_NO; |
779 | } else if (!strcmp(tmp, "EDDP")) { | 780 | } else if (!strcmp(tmp, "EDDP")) { |
@@ -786,10 +787,8 @@ qeth_dev_large_send_store(struct device *dev, struct device_attribute *attr, con | |||
786 | } | 787 | } |
787 | if (card->options.large_send == type) | 788 | if (card->options.large_send == type) |
788 | return count; | 789 | return count; |
789 | card->options.large_send = type; | 790 | if ((rc = qeth_set_large_send(card, type))) |
790 | if ((rc = qeth_set_large_send(card))) | ||
791 | return rc; | 791 | return rc; |
792 | |||
793 | return count; | 792 | return count; |
794 | } | 793 | } |
795 | 794 | ||
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 5cc53cd9323e..d92273cbe0de 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -2465,9 +2465,12 @@ static unsigned long ata_pio_poll(struct ata_port *ap) | |||
2465 | * | 2465 | * |
2466 | * LOCKING: | 2466 | * LOCKING: |
2467 | * None. (executing in kernel thread context) | 2467 | * None. (executing in kernel thread context) |
2468 | * | ||
2469 | * RETURNS: | ||
2470 | * Non-zero if qc completed, zero otherwise. | ||
2468 | */ | 2471 | */ |
2469 | 2472 | ||
2470 | static void ata_pio_complete (struct ata_port *ap) | 2473 | static int ata_pio_complete (struct ata_port *ap) |
2471 | { | 2474 | { |
2472 | struct ata_queued_cmd *qc; | 2475 | struct ata_queued_cmd *qc; |
2473 | u8 drv_stat; | 2476 | u8 drv_stat; |
@@ -2486,14 +2489,14 @@ static void ata_pio_complete (struct ata_port *ap) | |||
2486 | if (drv_stat & (ATA_BUSY | ATA_DRQ)) { | 2489 | if (drv_stat & (ATA_BUSY | ATA_DRQ)) { |
2487 | ap->pio_task_state = PIO_ST_LAST_POLL; | 2490 | ap->pio_task_state = PIO_ST_LAST_POLL; |
2488 | ap->pio_task_timeout = jiffies + ATA_TMOUT_PIO; | 2491 | ap->pio_task_timeout = jiffies + ATA_TMOUT_PIO; |
2489 | return; | 2492 | return 0; |
2490 | } | 2493 | } |
2491 | } | 2494 | } |
2492 | 2495 | ||
2493 | drv_stat = ata_wait_idle(ap); | 2496 | drv_stat = ata_wait_idle(ap); |
2494 | if (!ata_ok(drv_stat)) { | 2497 | if (!ata_ok(drv_stat)) { |
2495 | ap->pio_task_state = PIO_ST_ERR; | 2498 | ap->pio_task_state = PIO_ST_ERR; |
2496 | return; | 2499 | return 0; |
2497 | } | 2500 | } |
2498 | 2501 | ||
2499 | qc = ata_qc_from_tag(ap, ap->active_tag); | 2502 | qc = ata_qc_from_tag(ap, ap->active_tag); |
@@ -2502,6 +2505,10 @@ static void ata_pio_complete (struct ata_port *ap) | |||
2502 | ap->pio_task_state = PIO_ST_IDLE; | 2505 | ap->pio_task_state = PIO_ST_IDLE; |
2503 | 2506 | ||
2504 | ata_poll_qc_complete(qc, drv_stat); | 2507 | ata_poll_qc_complete(qc, drv_stat); |
2508 | |||
2509 | /* another command may start at this point */ | ||
2510 | |||
2511 | return 1; | ||
2505 | } | 2512 | } |
2506 | 2513 | ||
2507 | 2514 | ||
@@ -2709,7 +2716,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes) | |||
2709 | 2716 | ||
2710 | next_sg: | 2717 | next_sg: |
2711 | if (unlikely(qc->cursg >= qc->n_elem)) { | 2718 | if (unlikely(qc->cursg >= qc->n_elem)) { |
2712 | /* | 2719 | /* |
2713 | * The end of qc->sg is reached and the device expects | 2720 | * The end of qc->sg is reached and the device expects |
2714 | * more data to transfer. In order not to overrun qc->sg | 2721 | * more data to transfer. In order not to overrun qc->sg |
2715 | * and fulfill length specified in the byte count register, | 2722 | * and fulfill length specified in the byte count register, |
@@ -2721,7 +2728,7 @@ next_sg: | |||
2721 | unsigned int i; | 2728 | unsigned int i; |
2722 | 2729 | ||
2723 | if (words) /* warning if bytes > 1 */ | 2730 | if (words) /* warning if bytes > 1 */ |
2724 | printk(KERN_WARNING "ata%u: %u bytes trailing data\n", | 2731 | printk(KERN_WARNING "ata%u: %u bytes trailing data\n", |
2725 | ap->id, bytes); | 2732 | ap->id, bytes); |
2726 | 2733 | ||
2727 | for (i = 0; i < words; i++) | 2734 | for (i = 0; i < words; i++) |
@@ -2849,9 +2856,7 @@ static void ata_pio_block(struct ata_port *ap) | |||
2849 | if (is_atapi_taskfile(&qc->tf)) { | 2856 | if (is_atapi_taskfile(&qc->tf)) { |
2850 | /* no more data to transfer or unsupported ATAPI command */ | 2857 | /* no more data to transfer or unsupported ATAPI command */ |
2851 | if ((status & ATA_DRQ) == 0) { | 2858 | if ((status & ATA_DRQ) == 0) { |
2852 | ap->pio_task_state = PIO_ST_IDLE; | 2859 | ap->pio_task_state = PIO_ST_LAST; |
2853 | |||
2854 | ata_poll_qc_complete(qc, status); | ||
2855 | return; | 2860 | return; |
2856 | } | 2861 | } |
2857 | 2862 | ||
@@ -2887,7 +2892,12 @@ static void ata_pio_error(struct ata_port *ap) | |||
2887 | static void ata_pio_task(void *_data) | 2892 | static void ata_pio_task(void *_data) |
2888 | { | 2893 | { |
2889 | struct ata_port *ap = _data; | 2894 | struct ata_port *ap = _data; |
2890 | unsigned long timeout = 0; | 2895 | unsigned long timeout; |
2896 | int qc_completed; | ||
2897 | |||
2898 | fsm_start: | ||
2899 | timeout = 0; | ||
2900 | qc_completed = 0; | ||
2891 | 2901 | ||
2892 | switch (ap->pio_task_state) { | 2902 | switch (ap->pio_task_state) { |
2893 | case PIO_ST_IDLE: | 2903 | case PIO_ST_IDLE: |
@@ -2898,7 +2908,7 @@ static void ata_pio_task(void *_data) | |||
2898 | break; | 2908 | break; |
2899 | 2909 | ||
2900 | case PIO_ST_LAST: | 2910 | case PIO_ST_LAST: |
2901 | ata_pio_complete(ap); | 2911 | qc_completed = ata_pio_complete(ap); |
2902 | break; | 2912 | break; |
2903 | 2913 | ||
2904 | case PIO_ST_POLL: | 2914 | case PIO_ST_POLL: |
@@ -2913,10 +2923,9 @@ static void ata_pio_task(void *_data) | |||
2913 | } | 2923 | } |
2914 | 2924 | ||
2915 | if (timeout) | 2925 | if (timeout) |
2916 | queue_delayed_work(ata_wq, &ap->pio_task, | 2926 | queue_delayed_work(ata_wq, &ap->pio_task, timeout); |
2917 | timeout); | 2927 | else if (!qc_completed) |
2918 | else | 2928 | goto fsm_start; |
2919 | queue_work(ata_wq, &ap->pio_task); | ||
2920 | } | 2929 | } |
2921 | 2930 | ||
2922 | static void atapi_request_sense(struct ata_port *ap, struct ata_device *dev, | 2931 | static void atapi_request_sense(struct ata_port *ap, struct ata_device *dev, |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 3e9b64137873..23d095d3817b 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -201,6 +201,7 @@ int | |||
201 | qla2100_pci_config(scsi_qla_host_t *ha) | 201 | qla2100_pci_config(scsi_qla_host_t *ha) |
202 | { | 202 | { |
203 | uint16_t w, mwi; | 203 | uint16_t w, mwi; |
204 | uint32_t d; | ||
204 | unsigned long flags; | 205 | unsigned long flags; |
205 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 206 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
206 | 207 | ||
@@ -215,9 +216,9 @@ qla2100_pci_config(scsi_qla_host_t *ha) | |||
215 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); | 216 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); |
216 | 217 | ||
217 | /* Reset expansion ROM address decode enable */ | 218 | /* Reset expansion ROM address decode enable */ |
218 | pci_read_config_word(ha->pdev, PCI_ROM_ADDRESS, &w); | 219 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); |
219 | w &= ~PCI_ROM_ADDRESS_ENABLE; | 220 | d &= ~PCI_ROM_ADDRESS_ENABLE; |
220 | pci_write_config_word(ha->pdev, PCI_ROM_ADDRESS, w); | 221 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); |
221 | 222 | ||
222 | /* Get PCI bus information. */ | 223 | /* Get PCI bus information. */ |
223 | spin_lock_irqsave(&ha->hardware_lock, flags); | 224 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -237,6 +238,7 @@ int | |||
237 | qla2300_pci_config(scsi_qla_host_t *ha) | 238 | qla2300_pci_config(scsi_qla_host_t *ha) |
238 | { | 239 | { |
239 | uint16_t w, mwi; | 240 | uint16_t w, mwi; |
241 | uint32_t d; | ||
240 | unsigned long flags = 0; | 242 | unsigned long flags = 0; |
241 | uint32_t cnt; | 243 | uint32_t cnt; |
242 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 244 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
@@ -302,9 +304,9 @@ qla2300_pci_config(scsi_qla_host_t *ha) | |||
302 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); | 304 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); |
303 | 305 | ||
304 | /* Reset expansion ROM address decode enable */ | 306 | /* Reset expansion ROM address decode enable */ |
305 | pci_read_config_word(ha->pdev, PCI_ROM_ADDRESS, &w); | 307 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); |
306 | w &= ~PCI_ROM_ADDRESS_ENABLE; | 308 | d &= ~PCI_ROM_ADDRESS_ENABLE; |
307 | pci_write_config_word(ha->pdev, PCI_ROM_ADDRESS, w); | 309 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); |
308 | 310 | ||
309 | /* Get PCI bus information. */ | 311 | /* Get PCI bus information. */ |
310 | spin_lock_irqsave(&ha->hardware_lock, flags); | 312 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -324,6 +326,7 @@ int | |||
324 | qla24xx_pci_config(scsi_qla_host_t *ha) | 326 | qla24xx_pci_config(scsi_qla_host_t *ha) |
325 | { | 327 | { |
326 | uint16_t w, mwi; | 328 | uint16_t w, mwi; |
329 | uint32_t d; | ||
327 | unsigned long flags = 0; | 330 | unsigned long flags = 0; |
328 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 331 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
329 | int pcix_cmd_reg, pcie_dctl_reg; | 332 | int pcix_cmd_reg, pcie_dctl_reg; |
@@ -366,9 +369,9 @@ qla24xx_pci_config(scsi_qla_host_t *ha) | |||
366 | } | 369 | } |
367 | 370 | ||
368 | /* Reset expansion ROM address decode enable */ | 371 | /* Reset expansion ROM address decode enable */ |
369 | pci_read_config_word(ha->pdev, PCI_ROM_ADDRESS, &w); | 372 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); |
370 | w &= ~PCI_ROM_ADDRESS_ENABLE; | 373 | d &= ~PCI_ROM_ADDRESS_ENABLE; |
371 | pci_write_config_word(ha->pdev, PCI_ROM_ADDRESS, w); | 374 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); |
372 | 375 | ||
373 | /* Get PCI bus information. */ | 376 | /* Get PCI bus information. */ |
374 | spin_lock_irqsave(&ha->hardware_lock, flags); | 377 | spin_lock_irqsave(&ha->hardware_lock, flags); |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index a3cd0ee8486d..0585ab27ffde 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -781,7 +781,7 @@ mpc52xx_uart_remove(struct device *dev) | |||
781 | 781 | ||
782 | #ifdef CONFIG_PM | 782 | #ifdef CONFIG_PM |
783 | static int | 783 | static int |
784 | mpc52xx_uart_suspend(struct device *dev, u32 state, u32 level) | 784 | mpc52xx_uart_suspend(struct device *dev, pm_message_t state, u32 level) |
785 | { | 785 | { |
786 | struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev); | 786 | struct uart_port *port = (struct uart_port *) dev_get_drvdata(dev); |
787 | 787 | ||
diff --git a/drivers/video/backlight/corgi_bl.c b/drivers/video/backlight/corgi_bl.c index a32817678552..630f2dfa9699 100644 --- a/drivers/video/backlight/corgi_bl.c +++ b/drivers/video/backlight/corgi_bl.c | |||
@@ -19,17 +19,18 @@ | |||
19 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
20 | #include <linux/backlight.h> | 20 | #include <linux/backlight.h> |
21 | 21 | ||
22 | #include <asm/arch-pxa/corgi.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/hardware/scoop.h> | 23 | #include <asm/arch/sharpsl.h> |
24 | 24 | ||
25 | #define CORGI_MAX_INTENSITY 0x3e | ||
26 | #define CORGI_DEFAULT_INTENSITY 0x1f | 25 | #define CORGI_DEFAULT_INTENSITY 0x1f |
27 | #define CORGI_LIMIT_MASK 0x0b | 26 | #define CORGI_LIMIT_MASK 0x0b |
28 | 27 | ||
29 | static int corgibl_powermode = FB_BLANK_UNBLANK; | 28 | static int corgibl_powermode = FB_BLANK_UNBLANK; |
30 | static int current_intensity = 0; | 29 | static int current_intensity = 0; |
31 | static int corgibl_limit = 0; | 30 | static int corgibl_limit = 0; |
31 | static void (*corgibl_mach_set_intensity)(int intensity); | ||
32 | static spinlock_t bl_lock = SPIN_LOCK_UNLOCKED; | 32 | static spinlock_t bl_lock = SPIN_LOCK_UNLOCKED; |
33 | static struct backlight_properties corgibl_data; | ||
33 | 34 | ||
34 | static void corgibl_send_intensity(int intensity) | 35 | static void corgibl_send_intensity(int intensity) |
35 | { | 36 | { |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index cabd53cec991..6c2244cf0e74 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -425,7 +425,7 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi) | |||
425 | * Power management hooks. Note that we won't be called from IRQ context, | 425 | * Power management hooks. Note that we won't be called from IRQ context, |
426 | * unlike the blank functions above, so we may sleep. | 426 | * unlike the blank functions above, so we may sleep. |
427 | */ | 427 | */ |
428 | static int imxfb_suspend(struct device *dev, u32 state, u32 level) | 428 | static int imxfb_suspend(struct device *dev, pm_message_t state, u32 level) |
429 | { | 429 | { |
430 | struct imxfb_info *fbi = dev_get_drvdata(dev); | 430 | struct imxfb_info *fbi = dev_get_drvdata(dev); |
431 | pr_debug("%s\n",__FUNCTION__); | 431 | pr_debug("%s\n",__FUNCTION__); |
@@ -562,6 +562,7 @@ static inline void lock_kiocb(struct kiocb *iocb) | |||
562 | static inline void unlock_kiocb(struct kiocb *iocb) | 562 | static inline void unlock_kiocb(struct kiocb *iocb) |
563 | { | 563 | { |
564 | kiocbClearLocked(iocb); | 564 | kiocbClearLocked(iocb); |
565 | smp_mb__after_clear_bit(); | ||
565 | wake_up_bit(&iocb->ki_flags, KIF_LOCKED); | 566 | wake_up_bit(&iocb->ki_flags, KIF_LOCKED); |
566 | } | 567 | } |
567 | 568 | ||
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 6ab1dd0ca904..403b90a1213d 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -231,8 +231,9 @@ struct ep_pqueue { | |||
231 | 231 | ||
232 | static void ep_poll_safewake_init(struct poll_safewake *psw); | 232 | static void ep_poll_safewake_init(struct poll_safewake *psw); |
233 | static void ep_poll_safewake(struct poll_safewake *psw, wait_queue_head_t *wq); | 233 | static void ep_poll_safewake(struct poll_safewake *psw, wait_queue_head_t *wq); |
234 | static int ep_getfd(int *efd, struct inode **einode, struct file **efile); | 234 | static int ep_getfd(int *efd, struct inode **einode, struct file **efile, |
235 | static int ep_file_init(struct file *file); | 235 | struct eventpoll *ep); |
236 | static int ep_alloc(struct eventpoll **pep); | ||
236 | static void ep_free(struct eventpoll *ep); | 237 | static void ep_free(struct eventpoll *ep); |
237 | static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd); | 238 | static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd); |
238 | static void ep_use_epitem(struct epitem *epi); | 239 | static void ep_use_epitem(struct epitem *epi); |
@@ -501,38 +502,37 @@ void eventpoll_release_file(struct file *file) | |||
501 | asmlinkage long sys_epoll_create(int size) | 502 | asmlinkage long sys_epoll_create(int size) |
502 | { | 503 | { |
503 | int error, fd; | 504 | int error, fd; |
505 | struct eventpoll *ep; | ||
504 | struct inode *inode; | 506 | struct inode *inode; |
505 | struct file *file; | 507 | struct file *file; |
506 | 508 | ||
507 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d)\n", | 509 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d)\n", |
508 | current, size)); | 510 | current, size)); |
509 | 511 | ||
510 | /* Sanity check on the size parameter */ | 512 | /* |
513 | * Sanity check on the size parameter, and create the internal data | ||
514 | * structure ( "struct eventpoll" ). | ||
515 | */ | ||
511 | error = -EINVAL; | 516 | error = -EINVAL; |
512 | if (size <= 0) | 517 | if (size <= 0 || (error = ep_alloc(&ep)) != 0) |
513 | goto eexit_1; | 518 | goto eexit_1; |
514 | 519 | ||
515 | /* | 520 | /* |
516 | * Creates all the items needed to setup an eventpoll file. That is, | 521 | * Creates all the items needed to setup an eventpoll file. That is, |
517 | * a file structure, and inode and a free file descriptor. | 522 | * a file structure, and inode and a free file descriptor. |
518 | */ | 523 | */ |
519 | error = ep_getfd(&fd, &inode, &file); | 524 | error = ep_getfd(&fd, &inode, &file, ep); |
520 | if (error) | ||
521 | goto eexit_1; | ||
522 | |||
523 | /* Setup the file internal data structure ( "struct eventpoll" ) */ | ||
524 | error = ep_file_init(file); | ||
525 | if (error) | 525 | if (error) |
526 | goto eexit_2; | 526 | goto eexit_2; |
527 | 527 | ||
528 | |||
529 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", | 528 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", |
530 | current, size, fd)); | 529 | current, size, fd)); |
531 | 530 | ||
532 | return fd; | 531 | return fd; |
533 | 532 | ||
534 | eexit_2: | 533 | eexit_2: |
535 | sys_close(fd); | 534 | ep_free(ep); |
535 | kfree(ep); | ||
536 | eexit_1: | 536 | eexit_1: |
537 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", | 537 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", |
538 | current, size, error)); | 538 | current, size, error)); |
@@ -706,7 +706,8 @@ eexit_1: | |||
706 | /* | 706 | /* |
707 | * Creates the file descriptor to be used by the epoll interface. | 707 | * Creates the file descriptor to be used by the epoll interface. |
708 | */ | 708 | */ |
709 | static int ep_getfd(int *efd, struct inode **einode, struct file **efile) | 709 | static int ep_getfd(int *efd, struct inode **einode, struct file **efile, |
710 | struct eventpoll *ep) | ||
710 | { | 711 | { |
711 | struct qstr this; | 712 | struct qstr this; |
712 | char name[32]; | 713 | char name[32]; |
@@ -756,7 +757,7 @@ static int ep_getfd(int *efd, struct inode **einode, struct file **efile) | |||
756 | file->f_op = &eventpoll_fops; | 757 | file->f_op = &eventpoll_fops; |
757 | file->f_mode = FMODE_READ; | 758 | file->f_mode = FMODE_READ; |
758 | file->f_version = 0; | 759 | file->f_version = 0; |
759 | file->private_data = NULL; | 760 | file->private_data = ep; |
760 | 761 | ||
761 | /* Install the new setup file into the allocated fd. */ | 762 | /* Install the new setup file into the allocated fd. */ |
762 | fd_install(fd, file); | 763 | fd_install(fd, file); |
@@ -777,14 +778,13 @@ eexit_1: | |||
777 | } | 778 | } |
778 | 779 | ||
779 | 780 | ||
780 | static int ep_file_init(struct file *file) | 781 | static int ep_alloc(struct eventpoll **pep) |
781 | { | 782 | { |
782 | struct eventpoll *ep; | 783 | struct eventpoll *ep = kzalloc(sizeof(*ep), GFP_KERNEL); |
783 | 784 | ||
784 | if (!(ep = kmalloc(sizeof(struct eventpoll), GFP_KERNEL))) | 785 | if (!ep) |
785 | return -ENOMEM; | 786 | return -ENOMEM; |
786 | 787 | ||
787 | memset(ep, 0, sizeof(*ep)); | ||
788 | rwlock_init(&ep->lock); | 788 | rwlock_init(&ep->lock); |
789 | init_rwsem(&ep->sem); | 789 | init_rwsem(&ep->sem); |
790 | init_waitqueue_head(&ep->wq); | 790 | init_waitqueue_head(&ep->wq); |
@@ -792,9 +792,9 @@ static int ep_file_init(struct file *file) | |||
792 | INIT_LIST_HEAD(&ep->rdllist); | 792 | INIT_LIST_HEAD(&ep->rdllist); |
793 | ep->rbr = RB_ROOT; | 793 | ep->rbr = RB_ROOT; |
794 | 794 | ||
795 | file->private_data = ep; | 795 | *pep = ep; |
796 | 796 | ||
797 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_file_init() ep=%p\n", | 797 | DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_alloc() ep=%p\n", |
798 | current, ep)); | 798 | current, ep)); |
799 | return 0; | 799 | return 0; |
800 | } | 800 | } |
diff --git a/fs/fat/file.c b/fs/fat/file.c index 62ffa9139400..7134403d5be2 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
@@ -12,39 +12,6 @@ | |||
12 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
13 | #include <linux/buffer_head.h> | 13 | #include <linux/buffer_head.h> |
14 | 14 | ||
15 | static ssize_t fat_file_aio_write(struct kiocb *iocb, const char __user *buf, | ||
16 | size_t count, loff_t pos) | ||
17 | { | ||
18 | struct inode *inode = iocb->ki_filp->f_dentry->d_inode; | ||
19 | int retval; | ||
20 | |||
21 | retval = generic_file_aio_write(iocb, buf, count, pos); | ||
22 | if (retval > 0) { | ||
23 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; | ||
24 | MSDOS_I(inode)->i_attrs |= ATTR_ARCH; | ||
25 | mark_inode_dirty(inode); | ||
26 | // check the locking rules | ||
27 | // if (IS_SYNC(inode)) | ||
28 | // fat_sync_inode(inode); | ||
29 | } | ||
30 | return retval; | ||
31 | } | ||
32 | |||
33 | static ssize_t fat_file_writev(struct file *filp, const struct iovec *iov, | ||
34 | unsigned long nr_segs, loff_t *ppos) | ||
35 | { | ||
36 | struct inode *inode = filp->f_dentry->d_inode; | ||
37 | int retval; | ||
38 | |||
39 | retval = generic_file_writev(filp, iov, nr_segs, ppos); | ||
40 | if (retval > 0) { | ||
41 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; | ||
42 | MSDOS_I(inode)->i_attrs |= ATTR_ARCH; | ||
43 | mark_inode_dirty(inode); | ||
44 | } | ||
45 | return retval; | ||
46 | } | ||
47 | |||
48 | int fat_generic_ioctl(struct inode *inode, struct file *filp, | 15 | int fat_generic_ioctl(struct inode *inode, struct file *filp, |
49 | unsigned int cmd, unsigned long arg) | 16 | unsigned int cmd, unsigned long arg) |
50 | { | 17 | { |
@@ -148,9 +115,9 @@ struct file_operations fat_file_operations = { | |||
148 | .read = do_sync_read, | 115 | .read = do_sync_read, |
149 | .write = do_sync_write, | 116 | .write = do_sync_write, |
150 | .readv = generic_file_readv, | 117 | .readv = generic_file_readv, |
151 | .writev = fat_file_writev, | 118 | .writev = generic_file_writev, |
152 | .aio_read = generic_file_aio_read, | 119 | .aio_read = generic_file_aio_read, |
153 | .aio_write = fat_file_aio_write, | 120 | .aio_write = generic_file_aio_write, |
154 | .mmap = generic_file_mmap, | 121 | .mmap = generic_file_mmap, |
155 | .ioctl = fat_generic_ioctl, | 122 | .ioctl = fat_generic_ioctl, |
156 | .fsync = file_fsync, | 123 | .fsync = file_fsync, |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index a7cbe68e2259..51b1d15d9d5c 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -102,6 +102,19 @@ static int fat_prepare_write(struct file *file, struct page *page, | |||
102 | &MSDOS_I(page->mapping->host)->mmu_private); | 102 | &MSDOS_I(page->mapping->host)->mmu_private); |
103 | } | 103 | } |
104 | 104 | ||
105 | static int fat_commit_write(struct file *file, struct page *page, | ||
106 | unsigned from, unsigned to) | ||
107 | { | ||
108 | struct inode *inode = page->mapping->host; | ||
109 | int err = generic_commit_write(file, page, from, to); | ||
110 | if (!err && !(MSDOS_I(inode)->i_attrs & ATTR_ARCH)) { | ||
111 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; | ||
112 | MSDOS_I(inode)->i_attrs |= ATTR_ARCH; | ||
113 | mark_inode_dirty(inode); | ||
114 | } | ||
115 | return err; | ||
116 | } | ||
117 | |||
105 | static sector_t _fat_bmap(struct address_space *mapping, sector_t block) | 118 | static sector_t _fat_bmap(struct address_space *mapping, sector_t block) |
106 | { | 119 | { |
107 | return generic_block_bmap(mapping, block, fat_get_block); | 120 | return generic_block_bmap(mapping, block, fat_get_block); |
@@ -112,7 +125,7 @@ static struct address_space_operations fat_aops = { | |||
112 | .writepage = fat_writepage, | 125 | .writepage = fat_writepage, |
113 | .sync_page = block_sync_page, | 126 | .sync_page = block_sync_page, |
114 | .prepare_write = fat_prepare_write, | 127 | .prepare_write = fat_prepare_write, |
115 | .commit_write = generic_commit_write, | 128 | .commit_write = fat_commit_write, |
116 | .bmap = _fat_bmap | 129 | .bmap = _fat_bmap |
117 | }; | 130 | }; |
118 | 131 | ||
diff --git a/fs/locks.c b/fs/locks.c index c2c09b4798d6..f7daa5f48949 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -124,6 +124,7 @@ | |||
124 | #include <linux/smp_lock.h> | 124 | #include <linux/smp_lock.h> |
125 | #include <linux/syscalls.h> | 125 | #include <linux/syscalls.h> |
126 | #include <linux/time.h> | 126 | #include <linux/time.h> |
127 | #include <linux/rcupdate.h> | ||
127 | 128 | ||
128 | #include <asm/semaphore.h> | 129 | #include <asm/semaphore.h> |
129 | #include <asm/uaccess.h> | 130 | #include <asm/uaccess.h> |
@@ -2205,6 +2206,7 @@ void steal_locks(fl_owner_t from) | |||
2205 | 2206 | ||
2206 | lock_kernel(); | 2207 | lock_kernel(); |
2207 | j = 0; | 2208 | j = 0; |
2209 | rcu_read_lock(); | ||
2208 | fdt = files_fdtable(files); | 2210 | fdt = files_fdtable(files); |
2209 | for (;;) { | 2211 | for (;;) { |
2210 | unsigned long set; | 2212 | unsigned long set; |
@@ -2222,6 +2224,7 @@ void steal_locks(fl_owner_t from) | |||
2222 | set >>= 1; | 2224 | set >>= 1; |
2223 | } | 2225 | } |
2224 | } | 2226 | } |
2227 | rcu_read_unlock(); | ||
2225 | unlock_kernel(); | 2228 | unlock_kernel(); |
2226 | } | 2229 | } |
2227 | EXPORT_SYMBOL(steal_locks); | 2230 | EXPORT_SYMBOL(steal_locks); |
diff --git a/fs/proc/array.c b/fs/proc/array.c index d88d518d30f6..d84eecacbeaf 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -74,6 +74,7 @@ | |||
74 | #include <linux/file.h> | 74 | #include <linux/file.h> |
75 | #include <linux/times.h> | 75 | #include <linux/times.h> |
76 | #include <linux/cpuset.h> | 76 | #include <linux/cpuset.h> |
77 | #include <linux/rcupdate.h> | ||
77 | 78 | ||
78 | #include <asm/uaccess.h> | 79 | #include <asm/uaccess.h> |
79 | #include <asm/pgtable.h> | 80 | #include <asm/pgtable.h> |
@@ -180,12 +181,14 @@ static inline char * task_state(struct task_struct *p, char *buffer) | |||
180 | p->gid, p->egid, p->sgid, p->fsgid); | 181 | p->gid, p->egid, p->sgid, p->fsgid); |
181 | read_unlock(&tasklist_lock); | 182 | read_unlock(&tasklist_lock); |
182 | task_lock(p); | 183 | task_lock(p); |
184 | rcu_read_lock(); | ||
183 | if (p->files) | 185 | if (p->files) |
184 | fdt = files_fdtable(p->files); | 186 | fdt = files_fdtable(p->files); |
185 | buffer += sprintf(buffer, | 187 | buffer += sprintf(buffer, |
186 | "FDSize:\t%d\n" | 188 | "FDSize:\t%d\n" |
187 | "Groups:\t", | 189 | "Groups:\t", |
188 | fdt ? fdt->max_fds : 0); | 190 | fdt ? fdt->max_fds : 0); |
191 | rcu_read_unlock(); | ||
189 | 192 | ||
190 | group_info = p->group_info; | 193 | group_info = p->group_info; |
191 | get_group_info(group_info); | 194 | get_group_info(group_info); |
diff --git a/include/asm-arm/arch-aaec2000/memory.h b/include/asm-arm/arch-aaec2000/memory.h index 681b6a6171a1..79c90813bc3e 100644 --- a/include/asm-arm/arch-aaec2000/memory.h +++ b/include/asm-arm/arch-aaec2000/memory.h | |||
@@ -64,10 +64,6 @@ | |||
64 | #define NODE_MAX_MEM_SHIFT 26 | 64 | #define NODE_MAX_MEM_SHIFT 26 |
65 | #define NODE_MAX_MEM_SIZE (1 << NODE_MAX_MEM_SHIFT) | 65 | #define NODE_MAX_MEM_SIZE (1 << NODE_MAX_MEM_SHIFT) |
66 | 66 | ||
67 | #else | ||
68 | |||
69 | #define PFN_TO_NID(addr) (0) | ||
70 | |||
71 | #endif /* CONFIG_DISCONTIGMEM */ | 67 | #endif /* CONFIG_DISCONTIGMEM */ |
72 | 68 | ||
73 | #endif /* __ASM_ARCH_MEMORY_H */ | 69 | #endif /* __ASM_ARCH_MEMORY_H */ |
diff --git a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop3xx/memory.h index dc4735cb0c10..45351f5cd904 100644 --- a/include/asm-arm/arch-iop3xx/memory.h +++ b/include/asm-arm/arch-iop3xx/memory.h | |||
@@ -36,6 +36,4 @@ | |||
36 | 36 | ||
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #define PFN_TO_NID(addr) (0) | ||
40 | |||
41 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h index 75623f81ef75..32aece069869 100644 --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h | |||
@@ -370,8 +370,6 @@ | |||
370 | #define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00) | 370 | #define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00) |
371 | #define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x)) | 371 | #define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x)) |
372 | 372 | ||
373 | #define IXP2000_PROD_ID GLOBAL_REG(0x00) | ||
374 | |||
375 | #define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000 | 373 | #define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000 |
376 | #define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000 | 374 | #define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000 |
377 | #define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00 | 375 | #define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00 |
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h index c0caf3e3e6fd..abdcf51bd283 100644 --- a/include/asm-arm/arch-ixp2000/platform.h +++ b/include/asm-arm/arch-ixp2000/platform.h | |||
@@ -31,20 +31,24 @@ | |||
31 | 31 | ||
32 | #include <asm/system.h> /* Pickup local_irq_ functions */ | 32 | #include <asm/system.h> /* Pickup local_irq_ functions */ |
33 | 33 | ||
34 | static inline void ixp2000_reg_write(volatile unsigned long *reg, unsigned long val) | 34 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) |
35 | { | 35 | { |
36 | volatile unsigned long dummy; | 36 | unsigned long dummy; |
37 | unsigned long flags; | 37 | unsigned long flags; |
38 | 38 | ||
39 | local_irq_save(flags); | 39 | local_irq_save(flags); |
40 | *reg = val; | 40 | *((volatile unsigned long *)reg) = val; |
41 | barrier(); | 41 | barrier(); |
42 | dummy = *reg; | 42 | dummy = *((volatile unsigned long *)reg); |
43 | local_irq_restore(flags); | 43 | local_irq_restore(flags); |
44 | } | 44 | } |
45 | #else | 45 | #else |
46 | #define ixp2000_reg_write(reg, val) (*reg = val) | 46 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) |
47 | { | ||
48 | *((volatile unsigned long *)reg) = val; | ||
49 | } | ||
47 | #endif /* IXDP2400 || IXDP2401 */ | 50 | #endif /* IXDP2400 || IXDP2401 */ |
51 | #define ixp2000_reg_read(reg) (*((volatile unsigned long *)reg)) | ||
48 | 52 | ||
49 | /* | 53 | /* |
50 | * Boards may multiplex different devices on the 2nd channel of | 54 | * Boards may multiplex different devices on the 2nd channel of |
@@ -84,7 +88,7 @@ void ixp2000_release_slowport(struct slowport_cfg *); | |||
84 | */ | 88 | */ |
85 | static inline unsigned ixp2000_has_broken_slowport(void) | 89 | static inline unsigned ixp2000_has_broken_slowport(void) |
86 | { | 90 | { |
87 | unsigned long id = *IXP2000_PROD_ID; | 91 | unsigned long id = *IXP2000_PRODUCT_ID; |
88 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | | 92 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | |
89 | IXP2000_MIN_PROD_TYPE_MASK); | 93 | IXP2000_MIN_PROD_TYPE_MASK); |
90 | return (((id_prod == | 94 | return (((id_prod == |
diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h index 7e2fea372663..c650e6feb9d5 100644 --- a/include/asm-arm/arch-lh7a40x/memory.h +++ b/include/asm-arm/arch-lh7a40x/memory.h | |||
@@ -85,10 +85,6 @@ | |||
85 | (((unsigned long)(addr) & 0x01ffffff) >> PAGE_SHIFT) | 85 | (((unsigned long)(addr) & 0x01ffffff) >> PAGE_SHIFT) |
86 | # endif | 86 | # endif |
87 | 87 | ||
88 | #else | ||
89 | |||
90 | # define PFN_TO_NID(addr) (0) | ||
91 | |||
92 | #endif | 88 | #endif |
93 | 89 | ||
94 | #endif | 90 | #endif |
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h index 84f81e315a25..ef32d61eec7a 100644 --- a/include/asm-arm/arch-omap/memory.h +++ b/include/asm-arm/arch-omap/memory.h | |||
@@ -86,6 +86,5 @@ | |||
86 | 86 | ||
87 | #endif /* CONFIG_ARCH_OMAP1510 */ | 87 | #endif /* CONFIG_ARCH_OMAP1510 */ |
88 | 88 | ||
89 | #define PHYS_TO_NID(addr) (0) | ||
90 | #endif | 89 | #endif |
91 | 90 | ||
diff --git a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h index 217a80b820ff..58bad9748b5c 100644 --- a/include/asm-arm/arch-pxa/memory.h +++ b/include/asm-arm/arch-pxa/memory.h | |||
@@ -67,10 +67,6 @@ | |||
67 | #define LOCAL_MAP_NR(addr) \ | 67 | #define LOCAL_MAP_NR(addr) \ |
68 | (((unsigned long)(addr) & 0x03ffffff) >> PAGE_SHIFT) | 68 | (((unsigned long)(addr) & 0x03ffffff) >> PAGE_SHIFT) |
69 | 69 | ||
70 | #else | ||
71 | |||
72 | #define PFN_TO_NID(addr) (0) | ||
73 | |||
74 | #endif | 70 | #endif |
75 | 71 | ||
76 | #endif | 72 | #endif |
diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h index 58bda9d571a5..6b5ac5144e70 100644 --- a/include/asm-arm/arch-pxa/poodle.h +++ b/include/asm-arm/arch-pxa/poodle.h | |||
@@ -37,24 +37,25 @@ | |||
37 | #define POODLE_GPIO_nSD_DETECT (9) | 37 | #define POODLE_GPIO_nSD_DETECT (9) |
38 | #define POODLE_GPIO_MAIN_BAT_LOW (13) | 38 | #define POODLE_GPIO_MAIN_BAT_LOW (13) |
39 | #define POODLE_GPIO_BAT_COVER (13) | 39 | #define POODLE_GPIO_BAT_COVER (13) |
40 | #define POODLE_GPIO_USB_PULLUP (20) | ||
40 | #define POODLE_GPIO_ADC_TEMP_ON (21) | 41 | #define POODLE_GPIO_ADC_TEMP_ON (21) |
41 | #define POODLE_GPIO_BYPASS_ON (36) | 42 | #define POODLE_GPIO_BYPASS_ON (36) |
42 | #define POODLE_GPIO_CHRG_ON (38) | 43 | #define POODLE_GPIO_CHRG_ON (38) |
43 | #define POODLE_GPIO_CHRG_FULL (16) | 44 | #define POODLE_GPIO_CHRG_FULL (16) |
44 | 45 | ||
45 | /* PXA GPIOs */ | 46 | /* PXA GPIOs */ |
46 | #define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO0 | 47 | #define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0) |
47 | #define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO1 | 48 | #define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO(1) |
48 | #define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO4 | 49 | #define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO(4) |
49 | #define POODLE_IRQ_GPIO_CO IRQ_GPIO16 | 50 | #define POODLE_IRQ_GPIO_CO IRQ_GPIO(16) |
50 | #define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO5 | 51 | #define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO(5) |
51 | #define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO11 | 52 | #define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO(11) |
52 | #define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO10 | 53 | #define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO(10) |
53 | #define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO17 | 54 | #define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO(17) |
54 | #define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO14 | 55 | #define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO(14) |
55 | #define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO8 | 56 | #define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO(8) |
56 | #define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO9 | 57 | #define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9) |
57 | #define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO13 | 58 | #define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(13) |
58 | 59 | ||
59 | /* SCOOP GPIOs */ | 60 | /* SCOOP GPIOs */ |
60 | #define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11 | 61 | #define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11 |
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index 32d3d5bde34d..8743ff5c1b23 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h | |||
@@ -99,10 +99,6 @@ __arch_adjust_zones(int node, unsigned long *size, unsigned long *holes) | |||
99 | #define LOCAL_MAP_NR(addr) \ | 99 | #define LOCAL_MAP_NR(addr) \ |
100 | (((unsigned long)(addr) & 0x07ffffff) >> PAGE_SHIFT) | 100 | (((unsigned long)(addr) & 0x07ffffff) >> PAGE_SHIFT) |
101 | 101 | ||
102 | #else | ||
103 | |||
104 | #define PFN_TO_NID(addr) (0) | ||
105 | |||
106 | #endif | 102 | #endif |
107 | 103 | ||
108 | #endif | 104 | #endif |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index e47bea7d1723..a8a933a775db 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -160,12 +160,25 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
160 | #define page_to_pfn(page) \ | 160 | #define page_to_pfn(page) \ |
161 | (( (page) - page_zone(page)->zone_mem_map) \ | 161 | (( (page) - page_zone(page)->zone_mem_map) \ |
162 | + page_zone(page)->zone_start_pfn) | 162 | + page_zone(page)->zone_start_pfn) |
163 | |||
163 | #define pfn_to_page(pfn) \ | 164 | #define pfn_to_page(pfn) \ |
164 | (PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT)) | 165 | (PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT)) |
165 | #define pfn_valid(pfn) (PFN_TO_NID(pfn) < MAX_NUMNODES) | 166 | |
167 | #define pfn_valid(pfn) \ | ||
168 | ({ \ | ||
169 | unsigned int nid = PFN_TO_NID(pfn); \ | ||
170 | int valid = nid < MAX_NUMNODES; \ | ||
171 | if (valid) { \ | ||
172 | pg_data_t *node = NODE_DATA(nid); \ | ||
173 | valid = (pfn - node->node_start_pfn) < \ | ||
174 | node->node_spanned_pages; \ | ||
175 | } \ | ||
176 | valid; \ | ||
177 | }) | ||
166 | 178 | ||
167 | #define virt_to_page(kaddr) \ | 179 | #define virt_to_page(kaddr) \ |
168 | (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) | 180 | (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) |
181 | |||
169 | #define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES) | 182 | #define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES) |
170 | 183 | ||
171 | /* | 184 | /* |
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h index 55752474d0d9..bd9674807f05 100644 --- a/include/asm-ppc/irq.h +++ b/include/asm-ppc/irq.h | |||
@@ -138,6 +138,16 @@ irq_canonicalize(int irq) | |||
138 | #define SIU_IRQ7 (14) | 138 | #define SIU_IRQ7 (14) |
139 | #define SIU_LEVEL7 (15) | 139 | #define SIU_LEVEL7 (15) |
140 | 140 | ||
141 | #define MPC8xx_INT_FEC1 SIU_LEVEL1 | ||
142 | #define MPC8xx_INT_FEC2 SIU_LEVEL3 | ||
143 | |||
144 | #define MPC8xx_INT_SCC1 (CPM_IRQ_OFFSET + CPMVEC_SCC1) | ||
145 | #define MPC8xx_INT_SCC2 (CPM_IRQ_OFFSET + CPMVEC_SCC2) | ||
146 | #define MPC8xx_INT_SCC3 (CPM_IRQ_OFFSET + CPMVEC_SCC3) | ||
147 | #define MPC8xx_INT_SCC4 (CPM_IRQ_OFFSET + CPMVEC_SCC4) | ||
148 | #define MPC8xx_INT_SMC1 (CPM_IRQ_OFFSET + CPMVEC_SMC1) | ||
149 | #define MPC8xx_INT_SMC2 (CPM_IRQ_OFFSET + CPMVEC_SMC2) | ||
150 | |||
141 | /* The internal interrupts we can configure as we see fit. | 151 | /* The internal interrupts we can configure as we see fit. |
142 | * My personal preference is CPM at level 2, which puts it above the | 152 | * My personal preference is CPM at level 2, which puts it above the |
143 | * MBX PCI/ISA/IDE interrupts. | 153 | * MBX PCI/ISA/IDE interrupts. |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index dc8e59896050..208a2e11daee 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -97,6 +97,22 @@ extern unsigned char __res[]; | |||
97 | 97 | ||
98 | struct pt_regs; | 98 | struct pt_regs; |
99 | 99 | ||
100 | enum ppc_sys_devices { | ||
101 | MPC8xx_CPM_FEC1, | ||
102 | MPC8xx_CPM_FEC2, | ||
103 | MPC8xx_CPM_I2C, | ||
104 | MPC8xx_CPM_SCC1, | ||
105 | MPC8xx_CPM_SCC2, | ||
106 | MPC8xx_CPM_SCC3, | ||
107 | MPC8xx_CPM_SCC4, | ||
108 | MPC8xx_CPM_SPI, | ||
109 | MPC8xx_CPM_MCC1, | ||
110 | MPC8xx_CPM_MCC2, | ||
111 | MPC8xx_CPM_SMC1, | ||
112 | MPC8xx_CPM_SMC2, | ||
113 | MPC8xx_CPM_USB, | ||
114 | }; | ||
115 | |||
100 | #endif /* !__ASSEMBLY__ */ | 116 | #endif /* !__ASSEMBLY__ */ |
101 | #endif /* CONFIG_8xx */ | 117 | #endif /* CONFIG_8xx */ |
102 | #endif /* __CONFIG_8xx_DEFS */ | 118 | #endif /* __CONFIG_8xx_DEFS */ |
diff --git a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h index 048f7c8596ee..549f44843c5e 100644 --- a/include/asm-ppc/ppc_sys.h +++ b/include/asm-ppc/ppc_sys.h | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <asm/mpc83xx.h> | 27 | #include <asm/mpc83xx.h> |
28 | #elif defined(CONFIG_85xx) | 28 | #elif defined(CONFIG_85xx) |
29 | #include <asm/mpc85xx.h> | 29 | #include <asm/mpc85xx.h> |
30 | #elif defined(CONFIG_8xx) | ||
31 | #include <asm/mpc8xx.h> | ||
30 | #elif defined(CONFIG_PPC_MPC52xx) | 32 | #elif defined(CONFIG_PPC_MPC52xx) |
31 | #include <asm/mpc52xx.h> | 33 | #include <asm/mpc52xx.h> |
32 | #elif defined(CONFIG_MPC10X_BRIDGE) | 34 | #elif defined(CONFIG_MPC10X_BRIDGE) |
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index b2fc94fbc2d9..2d242360c3d6 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -21,6 +21,7 @@ struct thread_struct { | |||
21 | * copy_thread) to mark that we are begin called from userspace (fork / | 21 | * copy_thread) to mark that we are begin called from userspace (fork / |
22 | * vfork / clone), and reset to 0 after. It is left to 0 when called | 22 | * vfork / clone), and reset to 0 after. It is left to 0 when called |
23 | * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */ | 23 | * from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */ |
24 | struct task_struct *saved_task; | ||
24 | int forking; | 25 | int forking; |
25 | int nsyscalls; | 26 | int nsyscalls; |
26 | struct pt_regs regs; | 27 | struct pt_regs regs; |
diff --git a/include/asm-um/system-i386.h b/include/asm-um/system-i386.h index ea8381de3cc9..c436263e67ba 100644 --- a/include/asm-um/system-i386.h +++ b/include/asm-um/system-i386.h | |||
@@ -3,6 +3,4 @@ | |||
3 | 3 | ||
4 | #include "asm/system-generic.h" | 4 | #include "asm/system-generic.h" |
5 | 5 | ||
6 | #define __HAVE_ARCH_CMPXCHG 1 | ||
7 | |||
8 | #endif | 6 | #endif |
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h index 594e610f4a1e..68ac3c62fe3d 100644 --- a/include/asm-x86_64/desc.h +++ b/include/asm-x86_64/desc.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef __ASSEMBLY__ | 8 | #ifndef __ASSEMBLY__ |
9 | 9 | ||
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/smp.h> | ||
12 | |||
11 | #include <asm/segment.h> | 13 | #include <asm/segment.h> |
12 | #include <asm/mmu.h> | 14 | #include <asm/mmu.h> |
13 | 15 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index be35332b67e6..3d49a305bf88 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -230,11 +230,6 @@ struct i2c_adapter { | |||
230 | struct device dev; /* the adapter device */ | 230 | struct device dev; /* the adapter device */ |
231 | struct class_device class_dev; /* the class device */ | 231 | struct class_device class_dev; /* the class device */ |
232 | 232 | ||
233 | #ifdef CONFIG_PROC_FS | ||
234 | /* No need to set this when you initialize the adapter */ | ||
235 | int inode; | ||
236 | #endif /* def CONFIG_PROC_FS */ | ||
237 | |||
238 | int nr; | 233 | int nr; |
239 | struct list_head clients; | 234 | struct list_head clients; |
240 | struct list_head list; | 235 | struct list_head list; |
diff --git a/include/linux/joystick.h b/include/linux/joystick.h index 06b9af77eb7f..5fd20ddd7ae3 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h | |||
@@ -111,29 +111,30 @@ struct js_corr { | |||
111 | #define JS_SET_ALL 8 | 111 | #define JS_SET_ALL 8 |
112 | 112 | ||
113 | struct JS_DATA_TYPE { | 113 | struct JS_DATA_TYPE { |
114 | __s32 buttons; | 114 | int32_t buttons; |
115 | __s32 x; | 115 | int32_t x; |
116 | __s32 y; | 116 | int32_t y; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct JS_DATA_SAVE_TYPE_32 { | 119 | struct JS_DATA_SAVE_TYPE_32 { |
120 | __s32 JS_TIMEOUT; | 120 | int32_t JS_TIMEOUT; |
121 | __s32 BUSY; | 121 | int32_t BUSY; |
122 | __s32 JS_EXPIRETIME; | 122 | int32_t JS_EXPIRETIME; |
123 | __s32 JS_TIMELIMIT; | 123 | int32_t JS_TIMELIMIT; |
124 | struct JS_DATA_TYPE JS_SAVE; | 124 | struct JS_DATA_TYPE JS_SAVE; |
125 | struct JS_DATA_TYPE JS_CORR; | 125 | struct JS_DATA_TYPE JS_CORR; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | struct JS_DATA_SAVE_TYPE_64 { | 128 | struct JS_DATA_SAVE_TYPE_64 { |
129 | __s32 JS_TIMEOUT; | 129 | int32_t JS_TIMEOUT; |
130 | __s32 BUSY; | 130 | int32_t BUSY; |
131 | __s64 JS_EXPIRETIME; | 131 | int64_t JS_EXPIRETIME; |
132 | __s64 JS_TIMELIMIT; | 132 | int64_t JS_TIMELIMIT; |
133 | struct JS_DATA_TYPE JS_SAVE; | 133 | struct JS_DATA_TYPE JS_SAVE; |
134 | struct JS_DATA_TYPE JS_CORR; | 134 | struct JS_DATA_TYPE JS_CORR; |
135 | }; | 135 | }; |
136 | 136 | ||
137 | #ifdef __KERNEL__ | ||
137 | #if BITS_PER_LONG == 64 | 138 | #if BITS_PER_LONG == 64 |
138 | #define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64 | 139 | #define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64 |
139 | #elif BITS_PER_LONG == 32 | 140 | #elif BITS_PER_LONG == 32 |
@@ -141,5 +142,6 @@ struct JS_DATA_SAVE_TYPE_64 { | |||
141 | #else | 142 | #else |
142 | #error Unexpected BITS_PER_LONG | 143 | #error Unexpected BITS_PER_LONG |
143 | #endif | 144 | #endif |
145 | #endif | ||
144 | 146 | ||
145 | #endif /* _LINUX_JOYSTICK_H */ | 147 | #endif /* _LINUX_JOYSTICK_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3dc161894c7b..c49d28eca561 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2253,6 +2253,9 @@ | |||
2253 | 2253 | ||
2254 | #define PCI_VENDOR_ID_INFINICON 0x1820 | 2254 | #define PCI_VENDOR_ID_INFINICON 0x1820 |
2255 | 2255 | ||
2256 | #define PCI_VENDOR_ID_SITECOM 0x182d | ||
2257 | #define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 | ||
2258 | |||
2256 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 | 2259 | #define PCI_VENDOR_ID_TOPSPIN 0x1867 |
2257 | 2260 | ||
2258 | #define PCI_VENDOR_ID_TDI 0x192E | 2261 | #define PCI_VENDOR_ID_TDI 0x192E |
diff --git a/kernel/exit.c b/kernel/exit.c index 6d2089a1bce7..ee6d8b8abef5 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -371,6 +371,12 @@ static inline void close_files(struct files_struct * files) | |||
371 | struct fdtable *fdt; | 371 | struct fdtable *fdt; |
372 | 372 | ||
373 | j = 0; | 373 | j = 0; |
374 | |||
375 | /* | ||
376 | * It is safe to dereference the fd table without RCU or | ||
377 | * ->file_lock because this is the last reference to the | ||
378 | * files structure. | ||
379 | */ | ||
374 | fdt = files_fdtable(files); | 380 | fdt = files_fdtable(files); |
375 | for (;;) { | 381 | for (;;) { |
376 | unsigned long set; | 382 | unsigned long set; |
diff --git a/kernel/fork.c b/kernel/fork.c index 8149f3602881..533ce27f4b2c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1062,7 +1062,8 @@ static task_t *copy_process(unsigned long clone_flags, | |||
1062 | * parent's CPU). This avoids alot of nasty races. | 1062 | * parent's CPU). This avoids alot of nasty races. |
1063 | */ | 1063 | */ |
1064 | p->cpus_allowed = current->cpus_allowed; | 1064 | p->cpus_allowed = current->cpus_allowed; |
1065 | if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed))) | 1065 | if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) || |
1066 | !cpu_online(task_cpu(p)))) | ||
1066 | set_task_cpu(p, smp_processor_id()); | 1067 | set_task_cpu(p, smp_processor_id()); |
1067 | 1068 | ||
1068 | /* | 1069 | /* |
diff --git a/kernel/sys.c b/kernel/sys.c index c80412be2302..f723522e6986 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1728,8 +1728,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
1728 | error = put_user(current->pdeath_signal, (int __user *)arg2); | 1728 | error = put_user(current->pdeath_signal, (int __user *)arg2); |
1729 | break; | 1729 | break; |
1730 | case PR_GET_DUMPABLE: | 1730 | case PR_GET_DUMPABLE: |
1731 | if (current->mm->dumpable) | 1731 | error = current->mm->dumpable; |
1732 | error = 1; | ||
1733 | break; | 1732 | break; |
1734 | case PR_SET_DUMPABLE: | 1733 | case PR_SET_DUMPABLE: |
1735 | if (arg2 < 0 || arg2 > 2) { | 1734 | if (arg2 < 0 || arg2 > 2) { |
diff --git a/mm/Kconfig b/mm/Kconfig index 4e9937ac3529..391ffc54d136 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -29,7 +29,7 @@ config FLATMEM_MANUAL | |||
29 | If unsure, choose this option (Flat Memory) over any other. | 29 | If unsure, choose this option (Flat Memory) over any other. |
30 | 30 | ||
31 | config DISCONTIGMEM_MANUAL | 31 | config DISCONTIGMEM_MANUAL |
32 | bool "Discontigious Memory" | 32 | bool "Discontiguous Memory" |
33 | depends on ARCH_DISCONTIGMEM_ENABLE | 33 | depends on ARCH_DISCONTIGMEM_ENABLE |
34 | help | 34 | help |
35 | This option provides enhanced support for discontiguous | 35 | This option provides enhanced support for discontiguous |
@@ -52,7 +52,7 @@ config SPARSEMEM_MANUAL | |||
52 | memory hotplug systems. This is normal. | 52 | memory hotplug systems. This is normal. |
53 | 53 | ||
54 | For many other systems, this will be an alternative to | 54 | For many other systems, this will be an alternative to |
55 | "Discontigious Memory". This option provides some potential | 55 | "Discontiguous Memory". This option provides some potential |
56 | performance benefits, along with decreased code complexity, | 56 | performance benefits, along with decreased code complexity, |
57 | but it is newer, and more experimental. | 57 | but it is newer, and more experimental. |
58 | 58 | ||
diff --git a/security/seclvl.c b/security/seclvl.c index dc4e17b6eaf6..1caac0164643 100644 --- a/security/seclvl.c +++ b/security/seclvl.c | |||
@@ -252,10 +252,9 @@ passwd_write_file(struct file * file, const char __user * buf, | |||
252 | } | 252 | } |
253 | 253 | ||
254 | if (count < 0 || count >= PAGE_SIZE) | 254 | if (count < 0 || count >= PAGE_SIZE) |
255 | return -ENOMEM; | ||
256 | if (*ppos != 0) { | ||
257 | return -EINVAL; | 255 | return -EINVAL; |
258 | } | 256 | if (*ppos != 0) |
257 | return -EINVAL; | ||
259 | page = (char *)get_zeroed_page(GFP_KERNEL); | 258 | page = (char *)get_zeroed_page(GFP_KERNEL); |
260 | if (!page) | 259 | if (!page) |
261 | return -ENOMEM; | 260 | return -ENOMEM; |
@@ -265,9 +264,8 @@ passwd_write_file(struct file * file, const char __user * buf, | |||
265 | 264 | ||
266 | len = strlen(page); | 265 | len = strlen(page); |
267 | /* ``echo "secret" > seclvl/passwd'' includes a newline */ | 266 | /* ``echo "secret" > seclvl/passwd'' includes a newline */ |
268 | if (page[len - 1] == '\n') { | 267 | if (page[len - 1] == '\n') |
269 | len--; | 268 | len--; |
270 | } | ||
271 | /* Hash the password, then compare the hashed values */ | 269 | /* Hash the password, then compare the hashed values */ |
272 | if ((rc = plaintext_to_sha1(tmp, page, len))) { | 270 | if ((rc = plaintext_to_sha1(tmp, page, len))) { |
273 | seclvl_printk(0, KERN_ERR, "Error hashing password: rc = " | 271 | seclvl_printk(0, KERN_ERR, "Error hashing password: rc = " |
@@ -275,9 +273,8 @@ passwd_write_file(struct file * file, const char __user * buf, | |||
275 | return rc; | 273 | return rc; |
276 | } | 274 | } |
277 | for (i = 0; i < SHA1_DIGEST_SIZE; i++) { | 275 | for (i = 0; i < SHA1_DIGEST_SIZE; i++) { |
278 | if (hashedPassword[i] != tmp[i]) { | 276 | if (hashedPassword[i] != tmp[i]) |
279 | return -EPERM; | 277 | return -EPERM; |
280 | } | ||
281 | } | 278 | } |
282 | seclvl_printk(0, KERN_INFO, | 279 | seclvl_printk(0, KERN_INFO, |
283 | "Password accepted; seclvl reduced to 0.\n"); | 280 | "Password accepted; seclvl reduced to 0.\n"); |
@@ -482,9 +479,8 @@ static void seclvl_file_free_security(struct file *filp) | |||
482 | */ | 479 | */ |
483 | static int seclvl_umount(struct vfsmount *mnt, int flags) | 480 | static int seclvl_umount(struct vfsmount *mnt, int flags) |
484 | { | 481 | { |
485 | if (current->pid == 1) { | 482 | if (current->pid == 1) |
486 | return 0; | 483 | return 0; |
487 | } | ||
488 | if (seclvl == 2) { | 484 | if (seclvl == 2) { |
489 | seclvl_printk(1, KERN_WARNING, "Attempt to unmount in secure " | 485 | seclvl_printk(1, KERN_WARNING, "Attempt to unmount in secure " |
490 | "level %d\n", seclvl); | 486 | "level %d\n", seclvl); |
@@ -638,9 +634,8 @@ static int __init seclvl_init(void) | |||
638 | static void __exit seclvl_exit(void) | 634 | static void __exit seclvl_exit(void) |
639 | { | 635 | { |
640 | securityfs_remove(seclvl_ino); | 636 | securityfs_remove(seclvl_ino); |
641 | if (*passwd || *sha1_passwd) { | 637 | if (*passwd || *sha1_passwd) |
642 | securityfs_remove(passwd_ino); | 638 | securityfs_remove(passwd_ino); |
643 | } | ||
644 | securityfs_remove(dir_ino); | 639 | securityfs_remove(dir_ino); |
645 | if (secondary == 1) { | 640 | if (secondary == 1) { |
646 | mod_unreg_security(MY_NAME, &seclvl_ops); | 641 | mod_unreg_security(MY_NAME, &seclvl_ops); |
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 34195b748608..b2d5db20ec8c 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -650,7 +650,7 @@ static int aaci_do_resume(snd_card_t *card, unsigned int state) | |||
650 | return 0; | 650 | return 0; |
651 | } | 651 | } |
652 | 652 | ||
653 | static int aaci_suspend(struct amba_device *dev, u32 state) | 653 | static int aaci_suspend(struct amba_device *dev, pm_message_t state) |
654 | { | 654 | { |
655 | snd_card_t *card = amba_get_drvdata(dev); | 655 | snd_card_t *card = amba_get_drvdata(dev); |
656 | return card ? aaci_do_suspend(card) : 0; | 656 | return card ? aaci_do_suspend(card) : 0; |